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
omadahealth/CircularBarPager
library/src/main/java/com/github/omadahealth/circularbarpager/library/viewpager/WrapContentViewPager.java
WrapContentViewPager.onMeasure
@Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { """ Allows to redraw the view size to wrap the content of the bigger child. @param widthMeasureSpec with measured @param heightMeasureSpec height measured """ try { int mode = MeasureSpec.getMode(heig...
java
@Override protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { try { int mode = MeasureSpec.getMode(heightMeasureSpec); if (mode == MeasureSpec.UNSPECIFIED || mode == MeasureSpec.AT_MOST) { super.onMeasure(widthMeasureSpec, heightMeasureSpec); ...
[ "@", "Override", "protected", "void", "onMeasure", "(", "int", "widthMeasureSpec", ",", "int", "heightMeasureSpec", ")", "{", "try", "{", "int", "mode", "=", "MeasureSpec", ".", "getMode", "(", "heightMeasureSpec", ")", ";", "if", "(", "mode", "==", "Measure...
Allows to redraw the view size to wrap the content of the bigger child. @param widthMeasureSpec with measured @param heightMeasureSpec height measured
[ "Allows", "to", "redraw", "the", "view", "size", "to", "wrap", "the", "content", "of", "the", "bigger", "child", "." ]
train
https://github.com/omadahealth/CircularBarPager/blob/3a43e8828849da727fd13345e83b8432f7271155/library/src/main/java/com/github/omadahealth/circularbarpager/library/viewpager/WrapContentViewPager.java#L90-L115
beanshell/beanshell
src/main/java/bsh/BlockNameSpace.java
BlockNameSpace.setBlockVariable
public void setBlockVariable( String name, Object value ) throws UtilEvalError { """ Set an untyped variable in the block namespace. The BlockNameSpace would normally delegate this set to the parent. Typed variables are naturally set locally. This is used in try/catch block argument. """ sup...
java
public void setBlockVariable( String name, Object value ) throws UtilEvalError { super.setVariable( name, value, false/*strict?*/, false ); }
[ "public", "void", "setBlockVariable", "(", "String", "name", ",", "Object", "value", ")", "throws", "UtilEvalError", "{", "super", ".", "setVariable", "(", "name", ",", "value", ",", "false", "/*strict?*/", ",", "false", ")", ";", "}" ]
Set an untyped variable in the block namespace. The BlockNameSpace would normally delegate this set to the parent. Typed variables are naturally set locally. This is used in try/catch block argument.
[ "Set", "an", "untyped", "variable", "in", "the", "block", "namespace", ".", "The", "BlockNameSpace", "would", "normally", "delegate", "this", "set", "to", "the", "parent", ".", "Typed", "variables", "are", "naturally", "set", "locally", ".", "This", "is", "u...
train
https://github.com/beanshell/beanshell/blob/fdddee3de948c9e6babb2d1337028f6fd0a2ba5c/src/main/java/bsh/BlockNameSpace.java#L87-L91
jeremylong/DependencyCheck
core/src/main/java/org/owasp/dependencycheck/agent/DependencyCheckScanAgent.java
DependencyCheckScanAgent.generateExternalReports
private void generateExternalReports(Engine engine, File outDirectory) throws ScanAgentException { """ Generates the reports for a given dependency-check engine. @param engine a dependency-check engine @param outDirectory the directory to write the reports to @throws ScanAgentException thrown if there is an e...
java
private void generateExternalReports(Engine engine, File outDirectory) throws ScanAgentException { try { engine.writeReports(applicationName, outDirectory, this.reportFormat.name()); } catch (ReportException ex) { LOGGER.debug("Unexpected exception occurred during analysis; pleas...
[ "private", "void", "generateExternalReports", "(", "Engine", "engine", ",", "File", "outDirectory", ")", "throws", "ScanAgentException", "{", "try", "{", "engine", ".", "writeReports", "(", "applicationName", ",", "outDirectory", ",", "this", ".", "reportFormat", ...
Generates the reports for a given dependency-check engine. @param engine a dependency-check engine @param outDirectory the directory to write the reports to @throws ScanAgentException thrown if there is an error generating the report
[ "Generates", "the", "reports", "for", "a", "given", "dependency", "-", "check", "engine", "." ]
train
https://github.com/jeremylong/DependencyCheck/blob/6cc7690ea12e4ca1454210ceaa2e9a5523f0926c/core/src/main/java/org/owasp/dependencycheck/agent/DependencyCheckScanAgent.java#L893-L900
hypercube1024/firefly
firefly-common/src/main/java/com/firefly/utils/lang/AtomicBiInteger.java
AtomicBiInteger.encodeHi
public static long encodeHi(long encoded, int hi) { """ Sets the hi value into the given encoded value. @param encoded the encoded value @param hi the hi value @return the new encoded value """ long h = ((long) hi) & 0xFFFF_FFFFL; long l = encoded & 0xFFFF_FFFFL; return (h << ...
java
public static long encodeHi(long encoded, int hi) { long h = ((long) hi) & 0xFFFF_FFFFL; long l = encoded & 0xFFFF_FFFFL; return (h << 32) + l; }
[ "public", "static", "long", "encodeHi", "(", "long", "encoded", ",", "int", "hi", ")", "{", "long", "h", "=", "(", "(", "long", ")", "hi", ")", "&", "0xFFFF_FFFF", "", "L", ";", "long", "l", "=", "encoded", "&", "0xFFFF_FFFF", "", "L", ";", "retu...
Sets the hi value into the given encoded value. @param encoded the encoded value @param hi the hi value @return the new encoded value
[ "Sets", "the", "hi", "value", "into", "the", "given", "encoded", "value", "." ]
train
https://github.com/hypercube1024/firefly/blob/ed3fc75b7c54a65b1e7d8141d01b49144bb423a3/firefly-common/src/main/java/com/firefly/utils/lang/AtomicBiInteger.java#L224-L228
exoplatform/jcr
exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/GroupHandlerImpl.java
GroupHandlerImpl.readGroup
private Group readGroup(Node groupNode) throws Exception { """ Read group properties from node. @param groupNode the node where group properties are stored @return {@link Group} @throws OrganizationServiceException if unexpected exception is occurred during reading """ String groupName = groupNode...
java
private Group readGroup(Node groupNode) throws Exception { String groupName = groupNode.getName(); String desc = utils.readString(groupNode, GroupProperties.JOS_DESCRIPTION); String label = utils.readString(groupNode, GroupProperties.JOS_LABEL); String parentId = utils.getGroupIds(groupNode)....
[ "private", "Group", "readGroup", "(", "Node", "groupNode", ")", "throws", "Exception", "{", "String", "groupName", "=", "groupNode", ".", "getName", "(", ")", ";", "String", "desc", "=", "utils", ".", "readString", "(", "groupNode", ",", "GroupProperties", "...
Read group properties from node. @param groupNode the node where group properties are stored @return {@link Group} @throws OrganizationServiceException if unexpected exception is occurred during reading
[ "Read", "group", "properties", "from", "node", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.ext.services/src/main/java/org/exoplatform/services/jcr/ext/organization/GroupHandlerImpl.java#L473-L486
OpenLiberty/open-liberty
dev/com.ibm.ws.repository.resolver/src/com/ibm/ws/repository/resolver/RepositoryResolver.java
RepositoryResolver.byMaxDistance
static Comparator<RepositoryResource> byMaxDistance(final Map<String, Integer> maxDistanceMap) { """ Returns a comparator which sorts EsaResources by their values from {@code maxDistanceMap} from greatest to smallest <p> Resources whose symbolic names do not appear in the map or which are not EsaResources are as...
java
static Comparator<RepositoryResource> byMaxDistance(final Map<String, Integer> maxDistanceMap) { return new Comparator<RepositoryResource>() { @Override public int compare(RepositoryResource o1, RepositoryResource o2) { return Integer.compare(getDistance(o2), getDistance...
[ "static", "Comparator", "<", "RepositoryResource", ">", "byMaxDistance", "(", "final", "Map", "<", "String", ",", "Integer", ">", "maxDistanceMap", ")", "{", "return", "new", "Comparator", "<", "RepositoryResource", ">", "(", ")", "{", "@", "Override", "public...
Returns a comparator which sorts EsaResources by their values from {@code maxDistanceMap} from greatest to smallest <p> Resources whose symbolic names do not appear in the map or which are not EsaResources are assigned a value of zero meaning that they will appear last in a sorted list. @param maxDistanceMap map from ...
[ "Returns", "a", "comparator", "which", "sorts", "EsaResources", "by", "their", "values", "from", "{", "@code", "maxDistanceMap", "}", "from", "greatest", "to", "smallest", "<p", ">", "Resources", "whose", "symbolic", "names", "do", "not", "appear", "in", "the"...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.repository.resolver/src/com/ibm/ws/repository/resolver/RepositoryResolver.java#L589-L607
strator-dev/greenpepper
greenpepper/core/src/main/java/com/greenpepper/TypeConversion.java
TypeConversion.selfConvert
private static Object selfConvert( String parsingMethod, String value, Class<?> type ) { """ SelfConversion implies that if a class has the given static method named that receive a String and that returns a instance of the class, then it can serve for conversion purpose. """ try { ...
java
private static Object selfConvert( String parsingMethod, String value, Class<?> type ) { try { Method method = type.getMethod( parsingMethod, String.class ); return method.invoke( null, value ); } catch (InvocationTargetException e) { throw...
[ "private", "static", "Object", "selfConvert", "(", "String", "parsingMethod", ",", "String", "value", ",", "Class", "<", "?", ">", "type", ")", "{", "try", "{", "Method", "method", "=", "type", ".", "getMethod", "(", "parsingMethod", ",", "String", ".", ...
SelfConversion implies that if a class has the given static method named that receive a String and that returns a instance of the class, then it can serve for conversion purpose.
[ "SelfConversion", "implies", "that", "if", "a", "class", "has", "the", "given", "static", "method", "named", "that", "receive", "a", "String", "and", "that", "returns", "a", "instance", "of", "the", "class", "then", "it", "can", "serve", "for", "conversion",...
train
https://github.com/strator-dev/greenpepper/blob/2a61e6c179b74085babcc559d677490b0cad2d30/greenpepper/core/src/main/java/com/greenpepper/TypeConversion.java#L152-L167
ngageoint/geopackage-android-map
geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShapeConverter.java
GoogleMapShapeConverter.toCompoundCurveFromList
public CompoundCurve toCompoundCurveFromList( List<List<LatLng>> polylineList, boolean hasZ, boolean hasM) { """ Convert a list of List<LatLng> to a {@link CompoundCurve} @param polylineList polyline list @param hasZ has z flag @param hasM has m flag @return compound curve """...
java
public CompoundCurve toCompoundCurveFromList( List<List<LatLng>> polylineList, boolean hasZ, boolean hasM) { CompoundCurve compoundCurve = new CompoundCurve(hasZ, hasM); for (List<LatLng> polyline : polylineList) { LineString lineString = toLineString(polyline); com...
[ "public", "CompoundCurve", "toCompoundCurveFromList", "(", "List", "<", "List", "<", "LatLng", ">", ">", "polylineList", ",", "boolean", "hasZ", ",", "boolean", "hasM", ")", "{", "CompoundCurve", "compoundCurve", "=", "new", "CompoundCurve", "(", "hasZ", ",", ...
Convert a list of List<LatLng> to a {@link CompoundCurve} @param polylineList polyline list @param hasZ has z flag @param hasM has m flag @return compound curve
[ "Convert", "a", "list", "of", "List<LatLng", ">", "to", "a", "{", "@link", "CompoundCurve", "}" ]
train
https://github.com/ngageoint/geopackage-android-map/blob/634d78468a5c52d2bc98791cc7ff03981ebf573b/geopackage-map/src/main/java/mil/nga/geopackage/map/geom/GoogleMapShapeConverter.java#L903-L914
TheCoder4eu/BootsFaces-OSP
src/main/java/net/bootsfaces/component/selectBooleanCheckbox/SelectBooleanCheckboxRenderer.java
SelectBooleanCheckboxRenderer.closeColSpanDiv
protected void closeColSpanDiv(ResponseWriter rw, String span) throws IOException { """ Terminate the column span div (if there's one). This method is protected in order to allow third-party frameworks to derive from it. @param rw the response writer @param span the width of the components (in BS columns). ...
java
protected void closeColSpanDiv(ResponseWriter rw, String span) throws IOException { if (span != null && span.trim().length() > 0) { rw.endElement("div"); } }
[ "protected", "void", "closeColSpanDiv", "(", "ResponseWriter", "rw", ",", "String", "span", ")", "throws", "IOException", "{", "if", "(", "span", "!=", "null", "&&", "span", ".", "trim", "(", ")", ".", "length", "(", ")", ">", "0", ")", "{", "rw", "....
Terminate the column span div (if there's one). This method is protected in order to allow third-party frameworks to derive from it. @param rw the response writer @param span the width of the components (in BS columns). @throws IOException may be thrown by the response writer
[ "Terminate", "the", "column", "span", "div", "(", "if", "there", "s", "one", ")", ".", "This", "method", "is", "protected", "in", "order", "to", "allow", "third", "-", "party", "frameworks", "to", "derive", "from", "it", "." ]
train
https://github.com/TheCoder4eu/BootsFaces-OSP/blob/d1a70952bc240979b5272fa4fe1c7f100873add0/src/main/java/net/bootsfaces/component/selectBooleanCheckbox/SelectBooleanCheckboxRenderer.java#L178-L182
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cuda/src/main/java/org/nd4j/linalg/jcublas/ops/executioner/CudaGridExecutioner.java
CudaGridExecutioner.pointerizeOp
protected GridPointers pointerizeOp(Op op, int... dimensions) { """ This method returns Op as set of required pointers for it @param op @param dimensions @return """ GridPointers pointers = new GridPointers(op, dimensions); AtomicAllocator allocator = AtomicAllocator.getInstance(); ...
java
protected GridPointers pointerizeOp(Op op, int... dimensions) { GridPointers pointers = new GridPointers(op, dimensions); AtomicAllocator allocator = AtomicAllocator.getInstance(); // CudaContext context = AtomicAllocator.getInstance().getFlowController().prepareAction(op.z(), op.x(), o...
[ "protected", "GridPointers", "pointerizeOp", "(", "Op", "op", ",", "int", "...", "dimensions", ")", "{", "GridPointers", "pointers", "=", "new", "GridPointers", "(", "op", ",", "dimensions", ")", ";", "AtomicAllocator", "allocator", "=", "AtomicAllocator", ".", ...
This method returns Op as set of required pointers for it @param op @param dimensions @return
[ "This", "method", "returns", "Op", "as", "set", "of", "required", "pointers", "for", "it" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-backend-impls/nd4j-cuda/src/main/java/org/nd4j/linalg/jcublas/ops/executioner/CudaGridExecutioner.java#L504-L546
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/util/internal/DiscoveryUtils.java
DiscoveryUtils.loadImplementorClass
private static Class loadImplementorClass( String className, Class interfaceType, ClassLoader classLoader ) { """ Load an implementor class from the context classloader. @param className the name of the implementor class. @param interfaceType the interface that the given class should implement. @param classLo...
java
private static Class loadImplementorClass( String className, Class interfaceType, ClassLoader classLoader ) { try { if ( _log.isDebugEnabled() ) { _log.debug( "Trying to load implementor class for interface " + interfaceType.getName() ...
[ "private", "static", "Class", "loadImplementorClass", "(", "String", "className", ",", "Class", "interfaceType", ",", "ClassLoader", "classLoader", ")", "{", "try", "{", "if", "(", "_log", ".", "isDebugEnabled", "(", ")", ")", "{", "_log", ".", "debug", "(",...
Load an implementor class from the context classloader. @param className the name of the implementor class. @param interfaceType the interface that the given class should implement. @param classLoader the ClassLoader from which to load the implementor class. @return the implementor Class, or <code>null</code> if an er...
[ "Load", "an", "implementor", "class", "from", "the", "context", "classloader", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/util/internal/DiscoveryUtils.java#L168-L205
jqm4gwt/jqm4gwt
library/src/main/java/com/sksamuel/jqm4gwt/toolbar/JQMHeader.java
JQMHeader.setRightButton
public JQMButton setRightButton(String text, JQMPage page, DataIcon icon) { """ Creates a new {@link JQMButton} with the given text and linking to the given {@link JQMPage} and with the given icon and then sets that button in the right slot. Any existing right button will be replaced. @param text the text fo...
java
public JQMButton setRightButton(String text, JQMPage page, DataIcon icon) { return setRightButton(text, "#" + page.getId(), icon); }
[ "public", "JQMButton", "setRightButton", "(", "String", "text", ",", "JQMPage", "page", ",", "DataIcon", "icon", ")", "{", "return", "setRightButton", "(", "text", ",", "\"#\"", "+", "page", ".", "getId", "(", ")", ",", "icon", ")", ";", "}" ]
Creates a new {@link JQMButton} with the given text and linking to the given {@link JQMPage} and with the given icon and then sets that button in the right slot. Any existing right button will be replaced. @param text the text for the button @param page the optional page for the button to link to, if null then this bu...
[ "Creates", "a", "new", "{", "@link", "JQMButton", "}", "with", "the", "given", "text", "and", "linking", "to", "the", "given", "{", "@link", "JQMPage", "}", "and", "with", "the", "given", "icon", "and", "then", "sets", "that", "button", "in", "the", "r...
train
https://github.com/jqm4gwt/jqm4gwt/blob/cf59958e9ba6d4b70f42507b2c77f10c2465085b/library/src/main/java/com/sksamuel/jqm4gwt/toolbar/JQMHeader.java#L329-L331
Azure/azure-sdk-for-java
appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/DiagnosticsInner.java
DiagnosticsInner.getSiteDetectorSlotWithServiceResponseAsync
public Observable<ServiceResponse<Page<DetectorDefinitionInner>>> getSiteDetectorSlotWithServiceResponseAsync(final String resourceGroupName, final String siteName, final String diagnosticCategory, final String detectorName, final String slot) { """ Get Detector. Get Detector. @param resourceGroupName Name of ...
java
public Observable<ServiceResponse<Page<DetectorDefinitionInner>>> getSiteDetectorSlotWithServiceResponseAsync(final String resourceGroupName, final String siteName, final String diagnosticCategory, final String detectorName, final String slot) { return getSiteDetectorSlotSinglePageAsync(resourceGroupName, siteN...
[ "public", "Observable", "<", "ServiceResponse", "<", "Page", "<", "DetectorDefinitionInner", ">", ">", ">", "getSiteDetectorSlotWithServiceResponseAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "siteName", ",", "final", "String", "diagnosti...
Get Detector. Get Detector. @param resourceGroupName Name of the resource group to which the resource belongs. @param siteName Site Name @param diagnosticCategory Diagnostic Category @param detectorName Detector Name @param slot Slot Name @throws IllegalArgumentException thrown if parameters fail the validation @retur...
[ "Get", "Detector", ".", "Get", "Detector", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/appservice/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/appservice/v2018_02_01/implementation/DiagnosticsInner.java#L2289-L2301
joniles/mpxj
src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java
PrimaveraReader.processActivityCodes
public void processActivityCodes(List<Row> types, List<Row> typeValues, List<Row> assignments) { """ Read activity code types and values. @param types activity code type data @param typeValues activity code value data @param assignments activity code task assignments """ ActivityCodeContainer contai...
java
public void processActivityCodes(List<Row> types, List<Row> typeValues, List<Row> assignments) { ActivityCodeContainer container = m_project.getActivityCodes(); Map<Integer, ActivityCode> map = new HashMap<Integer, ActivityCode>(); for (Row row : types) { ActivityCode code = new Act...
[ "public", "void", "processActivityCodes", "(", "List", "<", "Row", ">", "types", ",", "List", "<", "Row", ">", "typeValues", ",", "List", "<", "Row", ">", "assignments", ")", "{", "ActivityCodeContainer", "container", "=", "m_project", ".", "getActivityCodes",...
Read activity code types and values. @param types activity code type data @param typeValues activity code value data @param assignments activity code task assignments
[ "Read", "activity", "code", "types", "and", "values", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/PrimaveraReader.java#L184-L217
Samsung/GearVRf
GVRf/Extensions/3DCursor/3DCursorLibrary/src/main/java/org/gearvrf/io/cursor3d/CursorManager.java
CursorManager.assignDeviceToCursor
int assignDeviceToCursor(final Cursor cursor) { """ Assign an {@link IoDevice} to the given {@link Cursor}. If the cursor is not already attached to an IO device, the highest priority device that is compatible with the cursor is selected. Otherwise a new device will be assigned only if its priority is greater ...
java
int assignDeviceToCursor(final Cursor cursor) { int currentPriority = cursor.getCurrentDevicePriority(); IoDevice savedDevice = cursor.getSavedIoDevice(); /* * Give preference to the saved device for this cursor */ if ((savedDevice != null) && (currentPriority < 0...
[ "int", "assignDeviceToCursor", "(", "final", "Cursor", "cursor", ")", "{", "int", "currentPriority", "=", "cursor", ".", "getCurrentDevicePriority", "(", ")", ";", "IoDevice", "savedDevice", "=", "cursor", ".", "getSavedIoDevice", "(", ")", ";", "/*\n * Gi...
Assign an {@link IoDevice} to the given {@link Cursor}. If the cursor is not already attached to an IO device, the highest priority device that is compatible with the cursor is selected. Otherwise a new device will be assigned only if its priority is greater than the one already attached. @param cursor @return 1 = cur...
[ "Assign", "an", "{" ]
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Extensions/3DCursor/3DCursorLibrary/src/main/java/org/gearvrf/io/cursor3d/CursorManager.java#L813-L853
powermock/powermock
powermock-api/powermock-api-easymock/src/main/java/org/powermock/api/easymock/PowerMock.java
PowerMock.createPartialMock
public static synchronized <T> T createPartialMock(Class<T> type, String... methodNames) { """ A utility method that may be used to mock several methods in an easy way (by just passing in the method names of the method you wish to mock). Note that you cannot uniquely specify a method to mock using this method i...
java
public static synchronized <T> T createPartialMock(Class<T> type, String... methodNames) { return createMock(type, Whitebox.getMethods(type, methodNames)); }
[ "public", "static", "synchronized", "<", "T", ">", "T", "createPartialMock", "(", "Class", "<", "T", ">", "type", ",", "String", "...", "methodNames", ")", "{", "return", "createMock", "(", "type", ",", "Whitebox", ".", "getMethods", "(", "type", ",", "m...
A utility method that may be used to mock several methods in an easy way (by just passing in the method names of the method you wish to mock). Note that you cannot uniquely specify a method to mock using this method if there are several methods with the same name in {@code type}. This method will mock ALL methods that ...
[ "A", "utility", "method", "that", "may", "be", "used", "to", "mock", "several", "methods", "in", "an", "easy", "way", "(", "by", "just", "passing", "in", "the", "method", "names", "of", "the", "method", "you", "wish", "to", "mock", ")", ".", "Note", ...
train
https://github.com/powermock/powermock/blob/e8cd68026c284c6a7efe66959809eeebd8d1f9ad/powermock-api/powermock-api-easymock/src/main/java/org/powermock/api/easymock/PowerMock.java#L667-L669
exoplatform/jcr
exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/script/groovy/GroovyScript2RestLoader.java
GroovyScript2RestLoader.setAttributeSmart
protected void setAttributeSmart(Element element, String attr, String value) { """ Set attribute value. If value is null the attribute will be removed. @param element The element to set attribute value @param attr The attribute name @param value The value of attribute """ if (value == null) { ...
java
protected void setAttributeSmart(Element element, String attr, String value) { if (value == null) { element.removeAttribute(attr); } else { element.setAttribute(attr, value); } }
[ "protected", "void", "setAttributeSmart", "(", "Element", "element", ",", "String", "attr", ",", "String", "value", ")", "{", "if", "(", "value", "==", "null", ")", "{", "element", ".", "removeAttribute", "(", "attr", ")", ";", "}", "else", "{", "element...
Set attribute value. If value is null the attribute will be removed. @param element The element to set attribute value @param attr The attribute name @param value The value of attribute
[ "Set", "attribute", "value", ".", "If", "value", "is", "null", "the", "attribute", "will", "be", "removed", "." ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.ext/src/main/java/org/exoplatform/services/jcr/ext/script/groovy/GroovyScript2RestLoader.java#L681-L691
j256/ormlite-android
src/main/java/com/j256/ormlite/android/AndroidCompiledStatement.java
AndroidCompiledStatement.execSql
static int execSql(SQLiteDatabase db, String label, String finalSql, Object[] argArray) throws SQLException { """ Execute some SQL on the database and return the number of rows changed. """ try { db.execSQL(finalSql, argArray); } catch (android.database.SQLException e) { throw SqlExceptionUtil.create...
java
static int execSql(SQLiteDatabase db, String label, String finalSql, Object[] argArray) throws SQLException { try { db.execSQL(finalSql, argArray); } catch (android.database.SQLException e) { throw SqlExceptionUtil.create("Problems executing " + label + " Android statement: " + finalSql, e); } int result;...
[ "static", "int", "execSql", "(", "SQLiteDatabase", "db", ",", "String", "label", ",", "String", "finalSql", ",", "Object", "[", "]", "argArray", ")", "throws", "SQLException", "{", "try", "{", "db", ".", "execSQL", "(", "finalSql", ",", "argArray", ")", ...
Execute some SQL on the database and return the number of rows changed.
[ "Execute", "some", "SQL", "on", "the", "database", "and", "return", "the", "number", "of", "rows", "changed", "." ]
train
https://github.com/j256/ormlite-android/blob/e82327a868ae242f994730fe2389f79684d7bcab/src/main/java/com/j256/ormlite/android/AndroidCompiledStatement.java#L212-L234
cdapio/tigon
tigon-api/src/main/java/co/cask/tigon/internal/io/Schema.java
Schema.recordOf
public static Schema recordOf(String name, Field...fields) { """ Creates a {@link Type#RECORD RECORD} {@link Schema} with the given name and {@link Field Fields}. The ordering of the fields inside the record would be the same as the one being passed in. @param name Name of the record @param fields All the fie...
java
public static Schema recordOf(String name, Field...fields) { return recordOf(name, ImmutableList.copyOf(fields)); }
[ "public", "static", "Schema", "recordOf", "(", "String", "name", ",", "Field", "...", "fields", ")", "{", "return", "recordOf", "(", "name", ",", "ImmutableList", ".", "copyOf", "(", "fields", ")", ")", ";", "}" ]
Creates a {@link Type#RECORD RECORD} {@link Schema} with the given name and {@link Field Fields}. The ordering of the fields inside the record would be the same as the one being passed in. @param name Name of the record @param fields All the fields that the record contains. @return A {@link Schema} of {@link Type#RECO...
[ "Creates", "a", "{", "@link", "Type#RECORD", "RECORD", "}", "{", "@link", "Schema", "}", "with", "the", "given", "name", "and", "{", "@link", "Field", "Fields", "}", ".", "The", "ordering", "of", "the", "fields", "inside", "the", "record", "would", "be",...
train
https://github.com/cdapio/tigon/blob/5be6dffd7c79519d1211bb08f75be7dcfbbad392/tigon-api/src/main/java/co/cask/tigon/internal/io/Schema.java#L210-L212
unbescape/unbescape
src/main/java/org/unbescape/properties/PropertiesEscape.java
PropertiesEscape.escapePropertiesValue
public static void escapePropertiesValue(final String text, final Writer writer) throws IOException { """ <p> Perform a Java Properties Value level 2 (basic set and all non-ASCII chars) <strong>escape</strong> operation on a <tt>String</tt> input, writing results to a <tt>Writer</tt>. </p> <p> <em...
java
public static void escapePropertiesValue(final String text, final Writer writer) throws IOException { escapePropertiesValue(text, writer, PropertiesValueEscapeLevel.LEVEL_2_ALL_NON_ASCII_PLUS_BASIC_ESCAPE_SET); }
[ "public", "static", "void", "escapePropertiesValue", "(", "final", "String", "text", ",", "final", "Writer", "writer", ")", "throws", "IOException", "{", "escapePropertiesValue", "(", "text", ",", "writer", ",", "PropertiesValueEscapeLevel", ".", "LEVEL_2_ALL_NON_ASCI...
<p> Perform a Java Properties Value level 2 (basic set and all non-ASCII chars) <strong>escape</strong> operation on a <tt>String</tt> input, writing results to a <tt>Writer</tt>. </p> <p> <em>Level 2</em> means this method will escape: </p> <ul> <li>The Java Properties basic escape set: <ul> <li>The <em>Single Escape ...
[ "<p", ">", "Perform", "a", "Java", "Properties", "Value", "level", "2", "(", "basic", "set", "and", "all", "non", "-", "ASCII", "chars", ")", "<strong", ">", "escape<", "/", "strong", ">", "operation", "on", "a", "<tt", ">", "String<", "/", "tt", ">"...
train
https://github.com/unbescape/unbescape/blob/ec5435fb3508c2eed25d8165dc27ded2602cae13/src/main/java/org/unbescape/properties/PropertiesEscape.java#L393-L396
iipc/openwayback
wayback-core/src/main/java/org/archive/wayback/util/bdb/BDBRecordSet.java
BDBRecordSet.put
public void put(String keyStr, String valueStr) throws DatabaseException { """ persistantly store key-value pair @param keyStr @param valueStr @throws DatabaseException """ DatabaseEntry key = new DatabaseEntry(stringToBytes(keyStr)); DatabaseEntry data = new DatabaseEntry(stringToBytes(valueStr)); db...
java
public void put(String keyStr, String valueStr) throws DatabaseException { DatabaseEntry key = new DatabaseEntry(stringToBytes(keyStr)); DatabaseEntry data = new DatabaseEntry(stringToBytes(valueStr)); db.put(null, key, data); }
[ "public", "void", "put", "(", "String", "keyStr", ",", "String", "valueStr", ")", "throws", "DatabaseException", "{", "DatabaseEntry", "key", "=", "new", "DatabaseEntry", "(", "stringToBytes", "(", "keyStr", ")", ")", ";", "DatabaseEntry", "data", "=", "new", ...
persistantly store key-value pair @param keyStr @param valueStr @throws DatabaseException
[ "persistantly", "store", "key", "-", "value", "pair" ]
train
https://github.com/iipc/openwayback/blob/da74c3a59a5b5a5c365bd4702dcb45d263535794/wayback-core/src/main/java/org/archive/wayback/util/bdb/BDBRecordSet.java#L190-L194
ldapchai/ldapchai
src/main/java/com/novell/ldapchai/util/ChaiUtility.java
ChaiUtility.createGroup
public static ChaiGroup createGroup( final String parentDN, final String name, final ChaiProvider provider ) throws ChaiOperationException, ChaiUnavailableException { """ Creates a new group entry in the ldap directory. A new "groupOfNames" object is created. The "cn" and "description" ldap attribute...
java
public static ChaiGroup createGroup( final String parentDN, final String name, final ChaiProvider provider ) throws ChaiOperationException, ChaiUnavailableException { //Get a good CN for it final String objectCN = findUniqueName( name, parentDN, provider ); //Concantonate the en...
[ "public", "static", "ChaiGroup", "createGroup", "(", "final", "String", "parentDN", ",", "final", "String", "name", ",", "final", "ChaiProvider", "provider", ")", "throws", "ChaiOperationException", ",", "ChaiUnavailableException", "{", "//Get a good CN for it", "final"...
Creates a new group entry in the ldap directory. A new "groupOfNames" object is created. The "cn" and "description" ldap attributes are set to the supplied name. @param parentDN the entryDN of the new group. @param name name of the group @param provider a ldap provider be used to create the group. @return an inst...
[ "Creates", "a", "new", "group", "entry", "in", "the", "ldap", "directory", ".", "A", "new", "groupOfNames", "object", "is", "created", ".", "The", "cn", "and", "description", "ldap", "attributes", "are", "set", "to", "the", "supplied", "name", "." ]
train
https://github.com/ldapchai/ldapchai/blob/a6d4b5dbfa4e270db0ce70892512cbe39e64b874/src/main/java/com/novell/ldapchai/util/ChaiUtility.java#L68-L92
Crab2died/Excel4J
src/main/java/com/github/crab2died/utils/DateUtils.java
DateUtils.str2DateUnmatch2Null
public static Date str2DateUnmatch2Null(String strDate) { """ <p>字符串时间转为{@link Date}类型,未找到匹配类型则返NULL</p> <p>支持匹配类型列表:</p> <p>yyyy-MM-dd</p> <p>yyyy/MM/dd</p> <p>HH:mm:ss</p> <p>yyyy-MM-dd HH:mm:ss</p> <p>yyyy-MM-dTHH:mm:ss.SSS</p> <p> author : Crab2Died date : 2017年06月02日 15:21:54 @param strDate 时间字...
java
public static Date str2DateUnmatch2Null(String strDate) { Date date; try { date = str2Date(strDate); } catch (Exception e) { throw new TimeMatchFormatException("[" + strDate + "] date auto parse exception", e); } return date; }
[ "public", "static", "Date", "str2DateUnmatch2Null", "(", "String", "strDate", ")", "{", "Date", "date", ";", "try", "{", "date", "=", "str2Date", "(", "strDate", ")", ";", "}", "catch", "(", "Exception", "e", ")", "{", "throw", "new", "TimeMatchFormatExcep...
<p>字符串时间转为{@link Date}类型,未找到匹配类型则返NULL</p> <p>支持匹配类型列表:</p> <p>yyyy-MM-dd</p> <p>yyyy/MM/dd</p> <p>HH:mm:ss</p> <p>yyyy-MM-dd HH:mm:ss</p> <p>yyyy-MM-dTHH:mm:ss.SSS</p> <p> author : Crab2Died date : 2017年06月02日 15:21:54 @param strDate 时间字符串 @return Date {@link Date}时间
[ "<p", ">", "字符串时间转为", "{", "@link", "Date", "}", "类型,未找到匹配类型则返NULL<", "/", "p", ">", "<p", ">", "支持匹配类型列表:<", "/", "p", ">", "<p", ">", "yyyy", "-", "MM", "-", "dd<", "/", "p", ">", "<p", ">", "yyyy", "/", "MM", "/", "dd<", "/", "p", ">", "<p...
train
https://github.com/Crab2died/Excel4J/blob/2ab0a3b8226a69ff868c3ead6e724f3a774f5f77/src/main/java/com/github/crab2died/utils/DateUtils.java#L202-L210
lucee/Lucee
core/src/main/java/lucee/runtime/util/NumberFormat.java
NumberFormat.formatX
public String formatX(Locale locale, double number, String mask) throws InvalidMaskException { """ format a number with given mask @param number @param mask @return formatted number as string @throws InvalidMaskException """ return format(locale, number, convertMask(mask)); }
java
public String formatX(Locale locale, double number, String mask) throws InvalidMaskException { return format(locale, number, convertMask(mask)); }
[ "public", "String", "formatX", "(", "Locale", "locale", ",", "double", "number", ",", "String", "mask", ")", "throws", "InvalidMaskException", "{", "return", "format", "(", "locale", ",", "number", ",", "convertMask", "(", "mask", ")", ")", ";", "}" ]
format a number with given mask @param number @param mask @return formatted number as string @throws InvalidMaskException
[ "format", "a", "number", "with", "given", "mask" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/util/NumberFormat.java#L59-L61
google/error-prone-javac
src/jdk.compiler/share/classes/com/sun/tools/javac/code/Printer.java
Printer.visitSymbols
public String visitSymbols(List<Symbol> ts, Locale locale) { """ * Get a localized string representation for all the symbols in the input list. @param ts symbols to be displayed @param locale the locale in which the string is to be rendered @return localized string representation """ ListBuffer<St...
java
public String visitSymbols(List<Symbol> ts, Locale locale) { ListBuffer<String> sbuf = new ListBuffer<>(); for (Symbol t : ts) { sbuf.append(visit(t, locale)); } return sbuf.toList().toString(); }
[ "public", "String", "visitSymbols", "(", "List", "<", "Symbol", ">", "ts", ",", "Locale", "locale", ")", "{", "ListBuffer", "<", "String", ">", "sbuf", "=", "new", "ListBuffer", "<>", "(", ")", ";", "for", "(", "Symbol", "t", ":", "ts", ")", "{", "...
* Get a localized string representation for all the symbols in the input list. @param ts symbols to be displayed @param locale the locale in which the string is to be rendered @return localized string representation
[ "*", "Get", "a", "localized", "string", "representation", "for", "all", "the", "symbols", "in", "the", "input", "list", "." ]
train
https://github.com/google/error-prone-javac/blob/a53d069bbdb2c60232ed3811c19b65e41c3e60e0/src/jdk.compiler/share/classes/com/sun/tools/javac/code/Printer.java#L120-L126
alibaba/canal
client-adapter/common/src/main/java/com/alibaba/otter/canal/client/adapter/config/common/AbstractResource.java
AbstractResource.getURI
@Override public URI getURI() throws IOException { """ This implementation builds a URI based on the URL returned by {@link #getURL()}. """ URL url = getURL(); try { return ResourceUtils.toURI(url); } catch (URISyntaxException ex) { throw new RuntimeExceptio...
java
@Override public URI getURI() throws IOException { URL url = getURL(); try { return ResourceUtils.toURI(url); } catch (URISyntaxException ex) { throw new RuntimeException("Invalid URI [" + url + "]", ex); } }
[ "@", "Override", "public", "URI", "getURI", "(", ")", "throws", "IOException", "{", "URL", "url", "=", "getURL", "(", ")", ";", "try", "{", "return", "ResourceUtils", ".", "toURI", "(", "url", ")", ";", "}", "catch", "(", "URISyntaxException", "ex", ")...
This implementation builds a URI based on the URL returned by {@link #getURL()}.
[ "This", "implementation", "builds", "a", "URI", "based", "on", "the", "URL", "returned", "by", "{" ]
train
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/client-adapter/common/src/main/java/com/alibaba/otter/canal/client/adapter/config/common/AbstractResource.java#L78-L86
cloudfoundry/cf-java-client
cloudfoundry-util/src/main/java/org/cloudfoundry/util/FileUtils.java
FileUtils.getRelativePathName
public static String getRelativePathName(Path root, Path path) { """ Get the relative path of an application @param root the root to relativize against @param path the path to relativize @return the relative path """ Path relative = root.relativize(path); return Files.isDirectory(path) && ...
java
public static String getRelativePathName(Path root, Path path) { Path relative = root.relativize(path); return Files.isDirectory(path) && !relative.toString().endsWith("/") ? String.format("%s/", relative.toString()) : relative.toString(); }
[ "public", "static", "String", "getRelativePathName", "(", "Path", "root", ",", "Path", "path", ")", "{", "Path", "relative", "=", "root", ".", "relativize", "(", "path", ")", ";", "return", "Files", ".", "isDirectory", "(", "path", ")", "&&", "!", "relat...
Get the relative path of an application @param root the root to relativize against @param path the path to relativize @return the relative path
[ "Get", "the", "relative", "path", "of", "an", "application" ]
train
https://github.com/cloudfoundry/cf-java-client/blob/caa1cb889cfe8717614c071703d833a1540784df/cloudfoundry-util/src/main/java/org/cloudfoundry/util/FileUtils.java#L108-L111
beangle/beangle3
commons/model/src/main/java/org/beangle/commons/transfer/excel/ExcelTools.java
ExcelTools.toExcel
public HSSFWorkbook toExcel(Collection<Object[]> datas, String propertyShowKeys) throws Exception { """ <p> toExcel. </p> @param datas a {@link java.util.Collection} object. @param propertyShowKeys a {@link java.lang.String} object. @return a {@link org.apache.poi.hssf.usermodel.HSSFWorkbook} object. @thro...
java
public HSSFWorkbook toExcel(Collection<Object[]> datas, String propertyShowKeys) throws Exception { // 建立新HSSFWorkbook对象 HSSFWorkbook wb = new HSSFWorkbook(); return toExcel(wb, "export data", datas, propertyShowKeys); }
[ "public", "HSSFWorkbook", "toExcel", "(", "Collection", "<", "Object", "[", "]", ">", "datas", ",", "String", "propertyShowKeys", ")", "throws", "Exception", "{", "// 建立新HSSFWorkbook对象", "HSSFWorkbook", "wb", "=", "new", "HSSFWorkbook", "(", ")", ";", "return", ...
<p> toExcel. </p> @param datas a {@link java.util.Collection} object. @param propertyShowKeys a {@link java.lang.String} object. @return a {@link org.apache.poi.hssf.usermodel.HSSFWorkbook} object. @throws java.lang.Exception if any.
[ "<p", ">", "toExcel", ".", "<", "/", "p", ">" ]
train
https://github.com/beangle/beangle3/blob/33df2873a5f38e28ac174a1d3b8144eb2f808e64/commons/model/src/main/java/org/beangle/commons/transfer/excel/ExcelTools.java#L62-L66
goldmansachs/gs-collections
collections/src/main/java/com/gs/collections/impl/utility/MapIterate.java
MapIterate.collectValues
public static <K, V, V2, R extends Map<K, V2>> R collectValues( Map<K, V> map, final Function2<? super K, ? super V, ? extends V2> function, final R target) { """ For each key and value of the map, the function is evaluated with the key and value as the parameter. The results o...
java
public static <K, V, V2, R extends Map<K, V2>> R collectValues( Map<K, V> map, final Function2<? super K, ? super V, ? extends V2> function, final R target) { MapIterate.forEachKeyValue(map, new Procedure2<K, V>() { public void value(K key, V value) ...
[ "public", "static", "<", "K", ",", "V", ",", "V2", ",", "R", "extends", "Map", "<", "K", ",", "V2", ">", ">", "R", "collectValues", "(", "Map", "<", "K", ",", "V", ">", "map", ",", "final", "Function2", "<", "?", "super", "K", ",", "?", "supe...
For each key and value of the map, the function is evaluated with the key and value as the parameter. The results of these evaluations are collected into the target map.
[ "For", "each", "key", "and", "value", "of", "the", "map", "the", "function", "is", "evaluated", "with", "the", "key", "and", "value", "as", "the", "parameter", ".", "The", "results", "of", "these", "evaluations", "are", "collected", "into", "the", "target"...
train
https://github.com/goldmansachs/gs-collections/blob/fa8bf3e103689efa18bca2ab70203e71cde34b52/collections/src/main/java/com/gs/collections/impl/utility/MapIterate.java#L668-L682
kubernetes-client/java
kubernetes/src/main/java/io/kubernetes/client/apis/CoreV1Api.java
CoreV1Api.connectPostNamespacedPodExecAsync
public com.squareup.okhttp.Call connectPostNamespacedPodExecAsync(String name, String namespace, String command, String container, Boolean stderr, Boolean stdin, Boolean stdout, Boolean tty, final ApiCallback<String> callback) throws ApiException { """ (asynchronously) connect POST requests to exec of Pod @param...
java
public com.squareup.okhttp.Call connectPostNamespacedPodExecAsync(String name, String namespace, String command, String container, Boolean stderr, Boolean stdin, Boolean stdout, Boolean tty, final ApiCallback<String> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null;...
[ "public", "com", ".", "squareup", ".", "okhttp", ".", "Call", "connectPostNamespacedPodExecAsync", "(", "String", "name", ",", "String", "namespace", ",", "String", "command", ",", "String", "container", ",", "Boolean", "stderr", ",", "Boolean", "stdin", ",", ...
(asynchronously) connect POST requests to exec of Pod @param name name of the PodExecOptions (required) @param namespace object name and auth scope, such as for teams and projects (required) @param command Command is the remote command to execute. argv array. Not executed within a shell. (optional) @param container Con...
[ "(", "asynchronously", ")", "connect", "POST", "requests", "to", "exec", "of", "Pod" ]
train
https://github.com/kubernetes-client/java/blob/7413e98bd904f09d1ad00fb60e8c6ff787f3f560/kubernetes/src/main/java/io/kubernetes/client/apis/CoreV1Api.java#L5231-L5256
UrielCh/ovh-java-sdk
ovh-java-sdk-emailexchange/src/main/java/net/minidev/ovh/api/ApiOvhEmailexchange.java
ApiOvhEmailexchange.organizationName_service_exchangeService_protocol_activeSyncMailNotification_notifiedAccountId_DELETE
public OvhTask organizationName_service_exchangeService_protocol_activeSyncMailNotification_notifiedAccountId_DELETE(String organizationName, String exchangeService, Long notifiedAccountId) throws IOException { """ Unubscribe address from ActiveSync quarantine notifications REST: DELETE /email/exchange/{organiz...
java
public OvhTask organizationName_service_exchangeService_protocol_activeSyncMailNotification_notifiedAccountId_DELETE(String organizationName, String exchangeService, Long notifiedAccountId) throws IOException { String qPath = "/email/exchange/{organizationName}/service/{exchangeService}/protocol/activeSyncMailNotific...
[ "public", "OvhTask", "organizationName_service_exchangeService_protocol_activeSyncMailNotification_notifiedAccountId_DELETE", "(", "String", "organizationName", ",", "String", "exchangeService", ",", "Long", "notifiedAccountId", ")", "throws", "IOException", "{", "String", "qPath",...
Unubscribe address from ActiveSync quarantine notifications REST: DELETE /email/exchange/{organizationName}/service/{exchangeService}/protocol/activeSyncMailNotification/{notifiedAccountId} @param organizationName [required] The internal name of your exchange organization @param exchangeService [required] The internal...
[ "Unubscribe", "address", "from", "ActiveSync", "quarantine", "notifications" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emailexchange/src/main/java/net/minidev/ovh/api/ApiOvhEmailexchange.java#L2326-L2331
jboss/jboss-el-api_spec
src/main/java/javax/el/ELContext.java
ELContext.enterLambdaScope
public void enterLambdaScope(Map<String,Object> args) { """ Installs a Lambda argument map, in preparation for the evaluation of a Lambda expression. The arguments in the map will be in scope during the evaluation of the Lambda expression. @param args The Lambda arguments map @since EL 3.0 """ if ...
java
public void enterLambdaScope(Map<String,Object> args) { if (lambdaArgs == null) { lambdaArgs = new Stack<Map<String,Object>>(); } lambdaArgs.push(args); }
[ "public", "void", "enterLambdaScope", "(", "Map", "<", "String", ",", "Object", ">", "args", ")", "{", "if", "(", "lambdaArgs", "==", "null", ")", "{", "lambdaArgs", "=", "new", "Stack", "<", "Map", "<", "String", ",", "Object", ">", ">", "(", ")", ...
Installs a Lambda argument map, in preparation for the evaluation of a Lambda expression. The arguments in the map will be in scope during the evaluation of the Lambda expression. @param args The Lambda arguments map @since EL 3.0
[ "Installs", "a", "Lambda", "argument", "map", "in", "preparation", "for", "the", "evaluation", "of", "a", "Lambda", "expression", ".", "The", "arguments", "in", "the", "map", "will", "be", "in", "scope", "during", "the", "evaluation", "of", "the", "Lambda", ...
train
https://github.com/jboss/jboss-el-api_spec/blob/4cef117cae3ccf9f76439845687a8d219ad2eb43/src/main/java/javax/el/ELContext.java#L422-L427
lessthanoptimal/ejml
main/ejml-ddense/src/org/ejml/dense/row/SpecializedOps_DDRM.java
SpecializedOps_DDRM.pivotMatrix
public static DMatrixRMaj pivotMatrix(DMatrixRMaj ret, int pivots[], int numPivots, boolean transposed ) { """ <p> Creates a pivot matrix that exchanges the rows in a matrix: <br> A' = P*A<br> </p> <p> For example, if element 0 in 'pivots' is 2 then the first row in A' will be the 3rd row in A. </p> @par...
java
public static DMatrixRMaj pivotMatrix(DMatrixRMaj ret, int pivots[], int numPivots, boolean transposed ) { if( ret == null ) { ret = new DMatrixRMaj(numPivots, numPivots); } else { if( ret.numCols != numPivots || ret.numRows != numPivots ) throw new IllegalArgume...
[ "public", "static", "DMatrixRMaj", "pivotMatrix", "(", "DMatrixRMaj", "ret", ",", "int", "pivots", "[", "]", ",", "int", "numPivots", ",", "boolean", "transposed", ")", "{", "if", "(", "ret", "==", "null", ")", "{", "ret", "=", "new", "DMatrixRMaj", "(",...
<p> Creates a pivot matrix that exchanges the rows in a matrix: <br> A' = P*A<br> </p> <p> For example, if element 0 in 'pivots' is 2 then the first row in A' will be the 3rd row in A. </p> @param ret If null then a new matrix is declared otherwise the results are written to it. Is modified. @param pivots Specifies t...
[ "<p", ">", "Creates", "a", "pivot", "matrix", "that", "exchanges", "the", "rows", "in", "a", "matrix", ":", "<br", ">", "A", "=", "P", "*", "A<br", ">", "<", "/", "p", ">", "<p", ">", "For", "example", "if", "element", "0", "in", "pivots", "is", ...
train
https://github.com/lessthanoptimal/ejml/blob/1444680cc487af5e866730e62f48f5f9636850d9/main/ejml-ddense/src/org/ejml/dense/row/SpecializedOps_DDRM.java#L380-L401
nohana/Amalgam
amalgam/src/main/java/com/amalgam/os/BundleUtils.java
BundleUtils.optDoubleArray
@Nullable public static double[] optDoubleArray(@Nullable Bundle bundle, @Nullable String key) { """ Returns a optional double array value. In other words, returns the value mapped by key if it exists and is a double array. The bundle argument is allowed to be {@code null}. If the bundle is null, this method ...
java
@Nullable public static double[] optDoubleArray(@Nullable Bundle bundle, @Nullable String key) { return optDoubleArray(bundle, key, new double[0]); }
[ "@", "Nullable", "public", "static", "double", "[", "]", "optDoubleArray", "(", "@", "Nullable", "Bundle", "bundle", ",", "@", "Nullable", "String", "key", ")", "{", "return", "optDoubleArray", "(", "bundle", ",", "key", ",", "new", "double", "[", "0", "...
Returns a optional double array value. In other words, returns the value mapped by key if it exists and is a double array. The bundle argument is allowed to be {@code null}. If the bundle is null, this method returns null. @param bundle a bundle. If the bundle is null, this method will return null. @param key a key for...
[ "Returns", "a", "optional", "double", "array", "value", ".", "In", "other", "words", "returns", "the", "value", "mapped", "by", "key", "if", "it", "exists", "and", "is", "a", "double", "array", ".", "The", "bundle", "argument", "is", "allowed", "to", "be...
train
https://github.com/nohana/Amalgam/blob/57809ddbfe7897e979cf507982ce0b3aa5e0ed8a/amalgam/src/main/java/com/amalgam/os/BundleUtils.java#L453-L456
alibaba/canal
parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/rds/request/AbstractRequest.java
AbstractRequest.HmacSHA1Encrypt
private byte[] HmacSHA1Encrypt(String encryptText, String encryptKey) throws Exception { """ 使用 HMAC-SHA1 签名方法对对encryptText进行签名 @param encryptText 被签名的字符串 @param encryptKey 密钥 @return @throws Exception """ byte[] data = encryptKey.getBytes(ENCODING); // 根据给定的字节数组构造一个密钥,第二参数指定一个密钥算法的名称 ...
java
private byte[] HmacSHA1Encrypt(String encryptText, String encryptKey) throws Exception { byte[] data = encryptKey.getBytes(ENCODING); // 根据给定的字节数组构造一个密钥,第二参数指定一个密钥算法的名称 SecretKey secretKey = new SecretKeySpec(data, MAC_NAME); // 生成一个指定 Mac 算法 的 Mac 对象 Mac mac = Mac.getInstance(MA...
[ "private", "byte", "[", "]", "HmacSHA1Encrypt", "(", "String", "encryptText", ",", "String", "encryptKey", ")", "throws", "Exception", "{", "byte", "[", "]", "data", "=", "encryptKey", ".", "getBytes", "(", "ENCODING", ")", ";", "// 根据给定的字节数组构造一个密钥,第二参数指定一个密钥算法的...
使用 HMAC-SHA1 签名方法对对encryptText进行签名 @param encryptText 被签名的字符串 @param encryptKey 密钥 @return @throws Exception
[ "使用", "HMAC", "-", "SHA1", "签名方法对对encryptText进行签名" ]
train
https://github.com/alibaba/canal/blob/8f088cddc0755f4350c5aaae95c6e4002d90a40f/parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/rds/request/AbstractRequest.java#L108-L120
jamesagnew/hapi-fhir
hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java
IniFile.getLongProperty
public Long getLongProperty(String pstrSection, String pstrProp) { """ Returns the specified long property from the specified section. @param pstrSection the INI section name. @param pstrProp the property to be retrieved. @return the long property value. """ Long lngRet = null; Str...
java
public Long getLongProperty(String pstrSection, String pstrProp) { Long lngRet = null; String strVal = null; INIProperty objProp = null; INISection objSec = null; objSec = (INISection) this.mhmapSections.get(pstrSection); if (objSec != null) ...
[ "public", "Long", "getLongProperty", "(", "String", "pstrSection", ",", "String", "pstrProp", ")", "{", "Long", "lngRet", "=", "null", ";", "String", "strVal", "=", "null", ";", "INIProperty", "objProp", "=", "null", ";", "INISection", "objSec", "=", "null",...
Returns the specified long property from the specified section. @param pstrSection the INI section name. @param pstrProp the property to be retrieved. @return the long property value.
[ "Returns", "the", "specified", "long", "property", "from", "the", "specified", "section", "." ]
train
https://github.com/jamesagnew/hapi-fhir/blob/150a84d52fe691b7f48fcb28247c4bddb7aec352/hapi-fhir-utilities/src/main/java/org/hl7/fhir/utilities/IniFile.java#L217-L246
sarl/sarl
main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/validator/AbstractExtraLanguageValidator.java
AbstractExtraLanguageValidator.createFeatureNameConverterInstance
protected ExtraLanguageFeatureNameConverter createFeatureNameConverterInstance( IExtraLanguageConversionInitializer initializer, IExtraLanguageGeneratorContext context) { """ Create the instance of the feature name converter. @param initializer the converter initializer. @param context the generation con...
java
protected ExtraLanguageFeatureNameConverter createFeatureNameConverterInstance( IExtraLanguageConversionInitializer initializer, IExtraLanguageGeneratorContext context) { return new ExtraLanguageFeatureNameConverter(initializer, context, getExtraLanguageKeywordProvider()); }
[ "protected", "ExtraLanguageFeatureNameConverter", "createFeatureNameConverterInstance", "(", "IExtraLanguageConversionInitializer", "initializer", ",", "IExtraLanguageGeneratorContext", "context", ")", "{", "return", "new", "ExtraLanguageFeatureNameConverter", "(", "initializer", ","...
Create the instance of the feature name converter. @param initializer the converter initializer. @param context the generation context. @return the feature name converter.
[ "Create", "the", "instance", "of", "the", "feature", "name", "converter", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang/src/io/sarl/lang/extralanguage/validator/AbstractExtraLanguageValidator.java#L377-L381
btaz/data-util
src/main/java/com/btaz/util/files/FileSplitter.java
FileSplitter.storageCalculation
private static long storageCalculation(int rows, int lineChars, long totalCharacters) { """ This calculation attempts to calculate how much storage x number of rows may use in an ArrayList assuming that capacity may be up to 1.5 times the actual space used. @param rows rows @param lineChars the amount of new ch...
java
private static long storageCalculation(int rows, int lineChars, long totalCharacters) { long size = (long) Math.ceil((rows* ARRAY_LIST_ROW_OVERHEAD + lineChars + totalCharacters) * LIST_CAPACITY_MULTIPLIER); return size; }
[ "private", "static", "long", "storageCalculation", "(", "int", "rows", ",", "int", "lineChars", ",", "long", "totalCharacters", ")", "{", "long", "size", "=", "(", "long", ")", "Math", ".", "ceil", "(", "(", "rows", "*", "ARRAY_LIST_ROW_OVERHEAD", "+", "li...
This calculation attempts to calculate how much storage x number of rows may use in an ArrayList assuming that capacity may be up to 1.5 times the actual space used. @param rows rows @param lineChars the amount of new character data we want to add @param totalCharacters total amount of characters already stored @return...
[ "This", "calculation", "attempts", "to", "calculate", "how", "much", "storage", "x", "number", "of", "rows", "may", "use", "in", "an", "ArrayList", "assuming", "that", "capacity", "may", "be", "up", "to", "1", ".", "5", "times", "the", "actual", "space", ...
train
https://github.com/btaz/data-util/blob/f01de64854c456a88a31ffbe8bac6d605151b496/src/main/java/com/btaz/util/files/FileSplitter.java#L163-L166
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/JsDestinationAddressFactoryImpl.java
JsDestinationAddressFactoryImpl.createJsSystemDestinationAddress
public final JsDestinationAddress createJsSystemDestinationAddress(String prefix ,SIBUuid8 meId ) throws NullPoint...
java
public final JsDestinationAddress createJsSystemDestinationAddress(String prefix ,SIBUuid8 meId ) throws NullPoint...
[ "public", "final", "JsDestinationAddress", "createJsSystemDestinationAddress", "(", "String", "prefix", ",", "SIBUuid8", "meId", ")", "throws", "NullPointerException", "{", "/* meId should never be null if busName is not specified */", "if", "(", "meId", "==", ...
Create a System JsDestinationAddress from the given parameters @param prefix The prefix to be used to generate the destination name @param meId The Id to be used to generate the destination name @return JsDestinationAddress The JsDestinationAddress corresponding to the buffer contents. The gener...
[ "Create", "a", "System", "JsDestinationAddress", "from", "the", "given", "parameters" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.common/src/com/ibm/ws/sib/mfp/impl/JsDestinationAddressFactoryImpl.java#L188-L197
jenkinsci/jenkins
core/src/main/java/hudson/model/LargeText.java
LargeText.writeLogTo
public long writeLogTo(long start, Writer w) throws IOException { """ Writes the tail portion of the file to the {@link Writer}. <p> The text file is assumed to be in the system default encoding. @param start The byte offset in the input file where the write operation starts. @return if the file is sti...
java
public long writeLogTo(long start, Writer w) throws IOException { CountingOutputStream os = new CountingOutputStream(new WriterOutputStream(w)); try (Session f = source.open()) { f.skip(start); if (completed) { // write everything till EOF byte[]...
[ "public", "long", "writeLogTo", "(", "long", "start", ",", "Writer", "w", ")", "throws", "IOException", "{", "CountingOutputStream", "os", "=", "new", "CountingOutputStream", "(", "new", "WriterOutputStream", "(", "w", ")", ")", ";", "try", "(", "Session", "...
Writes the tail portion of the file to the {@link Writer}. <p> The text file is assumed to be in the system default encoding. @param start The byte offset in the input file where the write operation starts. @return if the file is still being written, this method writes the file until the last newline character and r...
[ "Writes", "the", "tail", "portion", "of", "the", "file", "to", "the", "{", "@link", "Writer", "}", "." ]
train
https://github.com/jenkinsci/jenkins/blob/44c4d3989232082c254d27ae360aa810669f44b7/core/src/main/java/hudson/model/LargeText.java#L146-L172
micronaut-projects/micronaut-core
inject-java/src/main/java/io/micronaut/annotation/processing/GenericUtils.java
GenericUtils.resolveGenericTypes
protected Map<String, Object> resolveGenericTypes(TypeMirror type, Map<String, Object> boundTypes) { """ Resolve the generic type arguments for the given type mirror and bound type arguments. @param type The type mirror @param boundTypes The bound types (such as those declared on the class) @return A ma...
java
protected Map<String, Object> resolveGenericTypes(TypeMirror type, Map<String, Object> boundTypes) { if (type.getKind().isPrimitive() || type.getKind() == VOID || type.getKind() == ARRAY) { return Collections.emptyMap(); } if (type instanceof DeclaredType) { DeclaredType ...
[ "protected", "Map", "<", "String", ",", "Object", ">", "resolveGenericTypes", "(", "TypeMirror", "type", ",", "Map", "<", "String", ",", "Object", ">", "boundTypes", ")", "{", "if", "(", "type", ".", "getKind", "(", ")", ".", "isPrimitive", "(", ")", "...
Resolve the generic type arguments for the given type mirror and bound type arguments. @param type The type mirror @param boundTypes The bound types (such as those declared on the class) @return A map of generic type arguments
[ "Resolve", "the", "generic", "type", "arguments", "for", "the", "given", "type", "mirror", "and", "bound", "type", "arguments", "." ]
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/inject-java/src/main/java/io/micronaut/annotation/processing/GenericUtils.java#L149-L164
pressgang-ccms/PressGangCCMSQuery
src/main/java/org/jboss/pressgang/ccms/filter/base/BaseFilterQueryBuilder.java
BaseFilterQueryBuilder.addIdInCollectionCondition
protected void addIdInCollectionCondition(final String propertyName, final Collection<?> values) { """ Add a Field Search Condition that will check if the id field exists in an array of values. eg. {@code field IN (values)} @param propertyName The name of the field id as defined in the Entity mapping class. @p...
java
protected void addIdInCollectionCondition(final String propertyName, final Collection<?> values) { addIdInCollectionCondition(getRootPath().get(propertyName), values); }
[ "protected", "void", "addIdInCollectionCondition", "(", "final", "String", "propertyName", ",", "final", "Collection", "<", "?", ">", "values", ")", "{", "addIdInCollectionCondition", "(", "getRootPath", "(", ")", ".", "get", "(", "propertyName", ")", ",", "valu...
Add a Field Search Condition that will check if the id field exists in an array of values. eg. {@code field IN (values)} @param propertyName The name of the field id as defined in the Entity mapping class. @param values The List of Ids to be compared to.
[ "Add", "a", "Field", "Search", "Condition", "that", "will", "check", "if", "the", "id", "field", "exists", "in", "an", "array", "of", "values", ".", "eg", ".", "{", "@code", "field", "IN", "(", "values", ")", "}" ]
train
https://github.com/pressgang-ccms/PressGangCCMSQuery/blob/2bb23430adab956737d0301cd2ea933f986dd85b/src/main/java/org/jboss/pressgang/ccms/filter/base/BaseFilterQueryBuilder.java#L292-L294
alkacon/opencms-core
src/org/opencms/configuration/CmsParameterConfiguration.java
CmsParameterConfiguration.getBoolean
public boolean getBoolean(String key, boolean defaultValue) { """ Returns the boolean associated with the given parameter, or the default value in case there is no boolean value for this parameter.<p> @param key the parameter to look up the value for @param defaultValue the default value @return the boolea...
java
public boolean getBoolean(String key, boolean defaultValue) { Object value = m_configurationObjects.get(key); if (value instanceof Boolean) { return ((Boolean)value).booleanValue(); } else if (value instanceof String) { Boolean b = Boolean.valueOf((String)value...
[ "public", "boolean", "getBoolean", "(", "String", "key", ",", "boolean", "defaultValue", ")", "{", "Object", "value", "=", "m_configurationObjects", ".", "get", "(", "key", ")", ";", "if", "(", "value", "instanceof", "Boolean", ")", "{", "return", "(", "("...
Returns the boolean associated with the given parameter, or the default value in case there is no boolean value for this parameter.<p> @param key the parameter to look up the value for @param defaultValue the default value @return the boolean associated with the given parameter, or the default value in case there is ...
[ "Returns", "the", "boolean", "associated", "with", "the", "given", "parameter", "or", "the", "default", "value", "in", "case", "there", "is", "no", "boolean", "value", "for", "this", "parameter", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/configuration/CmsParameterConfiguration.java#L521-L536
apptik/jus
benchmark/src/perf/java/com/android/volley/Request.java
Request.getBody
public byte[] getBody() throws AuthFailureError { """ Returns the raw POST or PUT body to be sent. <p>By default, the body consists of the request parameters in application/x-www-form-urlencoded format. When overriding this method, consider overriding {@link #getBodyContentType()} as well to match the new bod...
java
public byte[] getBody() throws AuthFailureError { Map<String, String> params = getParams(); if (params != null && params.size() > 0) { return encodeParameters(params, getParamsEncoding()); } return null; }
[ "public", "byte", "[", "]", "getBody", "(", ")", "throws", "AuthFailureError", "{", "Map", "<", "String", ",", "String", ">", "params", "=", "getParams", "(", ")", ";", "if", "(", "params", "!=", "null", "&&", "params", ".", "size", "(", ")", ">", ...
Returns the raw POST or PUT body to be sent. <p>By default, the body consists of the request parameters in application/x-www-form-urlencoded format. When overriding this method, consider overriding {@link #getBodyContentType()} as well to match the new body format. @throws AuthFailureError in the event of auth failur...
[ "Returns", "the", "raw", "POST", "or", "PUT", "body", "to", "be", "sent", "." ]
train
https://github.com/apptik/jus/blob/8a37a21b41f897d68eaeaab07368ec22a1e5a60e/benchmark/src/perf/java/com/android/volley/Request.java#L407-L413
wildfly/wildfly-core
cli/src/main/java/org/jboss/as/cli/impl/ArgumentWithValue.java
ArgumentWithValue.getResolvedValue
public String getResolvedValue(ParsedCommandLine parsedLine, boolean required) throws CommandFormatException { """ Calls getOriginalValue(ParsedCommandLine parsedLine, boolean required) and correctly handles escape sequences and resolves system properties. @param parsedLine parsed command line @param require...
java
public String getResolvedValue(ParsedCommandLine parsedLine, boolean required) throws CommandFormatException { final String value = getOriginalValue(parsedLine, required); return resolveValue(value, initialState); }
[ "public", "String", "getResolvedValue", "(", "ParsedCommandLine", "parsedLine", ",", "boolean", "required", ")", "throws", "CommandFormatException", "{", "final", "String", "value", "=", "getOriginalValue", "(", "parsedLine", ",", "required", ")", ";", "return", "re...
Calls getOriginalValue(ParsedCommandLine parsedLine, boolean required) and correctly handles escape sequences and resolves system properties. @param parsedLine parsed command line @param required whether the argument is required @return resolved argument value @throws CommandFormatException in case the required ar...
[ "Calls", "getOriginalValue", "(", "ParsedCommandLine", "parsedLine", "boolean", "required", ")", "and", "correctly", "handles", "escape", "sequences", "and", "resolves", "system", "properties", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/cli/src/main/java/org/jboss/as/cli/impl/ArgumentWithValue.java#L117-L120
awin/rabbiteasy
rabbiteasy-core/src/main/java/com/zanox/rabbiteasy/MessageWriter.java
MessageWriter.writeBody
public <T> void writeBody(T body, Charset charset) { """ <p>Writes the message body using the given object of type T using the given charset for character encoding.</p> <p>For primitive types and Strings, the message body is written as plain text. In all other cases, the object is serialized to XML.</p> @p...
java
public <T> void writeBody(T body, Charset charset) { if (isPrimitive(body)) { String bodyAsString = String.valueOf(body); writeBodyFromString(bodyAsString, charset); } else if (isString(body)) { String bodyAsString = (String)body; writeBodyFromString...
[ "public", "<", "T", ">", "void", "writeBody", "(", "T", "body", ",", "Charset", "charset", ")", "{", "if", "(", "isPrimitive", "(", "body", ")", ")", "{", "String", "bodyAsString", "=", "String", ".", "valueOf", "(", "body", ")", ";", "writeBodyFromStr...
<p>Writes the message body using the given object of type T using the given charset for character encoding.</p> <p>For primitive types and Strings, the message body is written as plain text. In all other cases, the object is serialized to XML.</p> @param body The message body @param charset The charset to use for cha...
[ "<p", ">", "Writes", "the", "message", "body", "using", "the", "given", "object", "of", "type", "T", "using", "the", "given", "charset", "for", "character", "encoding", ".", "<", "/", "p", ">" ]
train
https://github.com/awin/rabbiteasy/blob/c161efda6c0f7ef319aedf09dfe40a4a90165510/rabbiteasy-core/src/main/java/com/zanox/rabbiteasy/MessageWriter.java#L48-L58
kiegroup/drools
kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/runtime/functions/DurationFunction.java
DurationFunction.invoke
public FEELFnResult<TemporalAmount> invoke(@ParameterName( "from" ) TemporalAmount val) { """ This is the identity function implementation @param val @return """ if ( val == null ) { return FEELFnResult.ofError(new InvalidParametersEvent(Severity.ERROR, "from", "cannot be null")); ...
java
public FEELFnResult<TemporalAmount> invoke(@ParameterName( "from" ) TemporalAmount val) { if ( val == null ) { return FEELFnResult.ofError(new InvalidParametersEvent(Severity.ERROR, "from", "cannot be null")); } return FEELFnResult.ofResult( val ); }
[ "public", "FEELFnResult", "<", "TemporalAmount", ">", "invoke", "(", "@", "ParameterName", "(", "\"from\"", ")", "TemporalAmount", "val", ")", "{", "if", "(", "val", "==", "null", ")", "{", "return", "FEELFnResult", ".", "ofError", "(", "new", "InvalidParame...
This is the identity function implementation @param val @return
[ "This", "is", "the", "identity", "function", "implementation" ]
train
https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/runtime/functions/DurationFunction.java#L67-L72
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/jcp/expression/ExpressionTreeElement.java
ExpressionTreeElement.replaceElement
public boolean replaceElement(@Nonnull final ExpressionTreeElement oldOne, @Nonnull final ExpressionTreeElement newOne) { """ It replaces a child element @param oldOne the old expression element to be replaced (must not be null) @param newOne the new expression element to be used instead the old one (must not ...
java
public boolean replaceElement(@Nonnull final ExpressionTreeElement oldOne, @Nonnull final ExpressionTreeElement newOne) { assertNotEmptySlot(); if (oldOne == null) { throw new PreprocessorException("[Expression]The old element is null", this.sourceString, this.includeStack, null); } if (newOne =...
[ "public", "boolean", "replaceElement", "(", "@", "Nonnull", "final", "ExpressionTreeElement", "oldOne", ",", "@", "Nonnull", "final", "ExpressionTreeElement", "newOne", ")", "{", "assertNotEmptySlot", "(", ")", ";", "if", "(", "oldOne", "==", "null", ")", "{", ...
It replaces a child element @param oldOne the old expression element to be replaced (must not be null) @param newOne the new expression element to be used instead the old one (must not be null) @return true if the element was found and replaced, else false
[ "It", "replaces", "a", "child", "element" ]
train
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/jcp/expression/ExpressionTreeElement.java#L200-L225
LearnLib/automatalib
util/src/main/java/net/automatalib/util/minimizer/Block.java
Block.addToBucket
boolean addToBucket(State<S, L> state) { """ Adds a state to this blocks bucket. @param state the state to add. @return <code>true</code> iff this was the first state to be added to the bucket, <code>false</code> otherwise. """ boolean first = bucket.isEmpty(); bucket.pushBack(state); ...
java
boolean addToBucket(State<S, L> state) { boolean first = bucket.isEmpty(); bucket.pushBack(state); return first; }
[ "boolean", "addToBucket", "(", "State", "<", "S", ",", "L", ">", "state", ")", "{", "boolean", "first", "=", "bucket", ".", "isEmpty", "(", ")", ";", "bucket", ".", "pushBack", "(", "state", ")", ";", "return", "first", ";", "}" ]
Adds a state to this blocks bucket. @param state the state to add. @return <code>true</code> iff this was the first state to be added to the bucket, <code>false</code> otherwise.
[ "Adds", "a", "state", "to", "this", "blocks", "bucket", "." ]
train
https://github.com/LearnLib/automatalib/blob/8a462ec52f6eaab9f8996e344f2163a72cb8aa6e/util/src/main/java/net/automatalib/util/minimizer/Block.java#L117-L121
beanshell/beanshell
src/main/java/bsh/org/objectweb/asm/Type.java
Type.getReturnType
public static Type getReturnType(final String methodDescriptor) { """ Returns the {@link Type} corresponding to the return type of the given method descriptor. @param methodDescriptor a method descriptor. @return the {@link Type} corresponding to the return type of the given method descriptor. """ // S...
java
public static Type getReturnType(final String methodDescriptor) { // Skip the first character, which is always a '('. int currentOffset = 1; // Skip the argument types, one at a each loop iteration. while (methodDescriptor.charAt(currentOffset) != ')') { while (methodDescriptor.charAt(currentOffse...
[ "public", "static", "Type", "getReturnType", "(", "final", "String", "methodDescriptor", ")", "{", "// Skip the first character, which is always a '('.", "int", "currentOffset", "=", "1", ";", "// Skip the argument types, one at a each loop iteration.", "while", "(", "methodDes...
Returns the {@link Type} corresponding to the return type of the given method descriptor. @param methodDescriptor a method descriptor. @return the {@link Type} corresponding to the return type of the given method descriptor.
[ "Returns", "the", "{", "@link", "Type", "}", "corresponding", "to", "the", "return", "type", "of", "the", "given", "method", "descriptor", "." ]
train
https://github.com/beanshell/beanshell/blob/fdddee3de948c9e6babb2d1337028f6fd0a2ba5c/src/main/java/bsh/org/objectweb/asm/Type.java#L336-L351
nohana/Amalgam
amalgam/src/main/java/com/amalgam/content/SharedPreferencesUtils.java
SharedPreferencesUtils.putDouble
public static SharedPreferences.Editor putDouble(SharedPreferences.Editor editor, String key, double value) { """ Set a double value in the preferences editor. @see android.content.SharedPreferences.Editor @param editor the editor @param key The name of the preference to modify. @param value The new value for ...
java
public static SharedPreferences.Editor putDouble(SharedPreferences.Editor editor, String key, double value) { return editor.putString(key, String.valueOf(value)); }
[ "public", "static", "SharedPreferences", ".", "Editor", "putDouble", "(", "SharedPreferences", ".", "Editor", "editor", ",", "String", "key", ",", "double", "value", ")", "{", "return", "editor", ".", "putString", "(", "key", ",", "String", ".", "valueOf", "...
Set a double value in the preferences editor. @see android.content.SharedPreferences.Editor @param editor the editor @param key The name of the preference to modify. @param value The new value for the preference. @return the editor.
[ "Set", "a", "double", "value", "in", "the", "preferences", "editor", "." ]
train
https://github.com/nohana/Amalgam/blob/57809ddbfe7897e979cf507982ce0b3aa5e0ed8a/amalgam/src/main/java/com/amalgam/content/SharedPreferencesUtils.java#L39-L41
drinkjava2/jDialects
core/src/main/java/com/github/drinkjava2/jdialects/springsrc/utils/ReflectionUtils.java
ReflectionUtils.doWithLocalMethods
public static void doWithLocalMethods(Class<?> clazz, MethodCallback mc) { """ Perform the given callback operation on all matching methods of the given class, as locally declared or equivalent thereof (such as default methods on Java 8 based interfaces that the given class implements). @param clazz the class t...
java
public static void doWithLocalMethods(Class<?> clazz, MethodCallback mc) { Method[] methods = getDeclaredMethods(clazz); for (Method method : methods) { try { mc.doWith(method); } catch (IllegalAccessException ex) { throw new IllegalStateException("Not allowed to access method '" + method.getName()...
[ "public", "static", "void", "doWithLocalMethods", "(", "Class", "<", "?", ">", "clazz", ",", "MethodCallback", "mc", ")", "{", "Method", "[", "]", "methods", "=", "getDeclaredMethods", "(", "clazz", ")", ";", "for", "(", "Method", "method", ":", "methods",...
Perform the given callback operation on all matching methods of the given class, as locally declared or equivalent thereof (such as default methods on Java 8 based interfaces that the given class implements). @param clazz the class to introspect @param mc the callback to invoke for each method @since 4.2 @see #doWithMe...
[ "Perform", "the", "given", "callback", "operation", "on", "all", "matching", "methods", "of", "the", "given", "class", "as", "locally", "declared", "or", "equivalent", "thereof", "(", "such", "as", "default", "methods", "on", "Java", "8", "based", "interfaces"...
train
https://github.com/drinkjava2/jDialects/blob/1c165f09c6042a599b681c279024abcc1b848b88/core/src/main/java/com/github/drinkjava2/jdialects/springsrc/utils/ReflectionUtils.java#L489-L499
orbisgis/h2gis
h2gis-functions/src/main/java/org/h2gis/functions/spatial/volume/GeometryExtrude.java
GeometryExtrude.extractRoof
public static Polygon extractRoof(Polygon polygon, double height) { """ Extract the roof of a polygon @param polygon @param height @return """ GeometryFactory factory = polygon.getFactory(); Polygon roofP = (Polygon)polygon.copy(); roofP.apply(new TranslateCoordinateSequenceFilter...
java
public static Polygon extractRoof(Polygon polygon, double height) { GeometryFactory factory = polygon.getFactory(); Polygon roofP = (Polygon)polygon.copy(); roofP.apply(new TranslateCoordinateSequenceFilter(height)); final LinearRing shell = factory.createLinearRing(getCounterClockWise(...
[ "public", "static", "Polygon", "extractRoof", "(", "Polygon", "polygon", ",", "double", "height", ")", "{", "GeometryFactory", "factory", "=", "polygon", ".", "getFactory", "(", ")", ";", "Polygon", "roofP", "=", "(", "Polygon", ")", "polygon", ".", "copy", ...
Extract the roof of a polygon @param polygon @param height @return
[ "Extract", "the", "roof", "of", "a", "polygon" ]
train
https://github.com/orbisgis/h2gis/blob/9cd70b447e6469cecbc2fc64b16774b59491df3b/h2gis-functions/src/main/java/org/h2gis/functions/spatial/volume/GeometryExtrude.java#L150-L162
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/align/multiple/util/MultipleAlignmentScorer.java
MultipleAlignmentScorer.getMCScore
public static double getMCScore(MultipleAlignment alignment, double gapOpen, double gapExtension, double dCutoff) throws StructureException { """ Calculates the MC score, specific for the MultipleAlignment algorithm. The score function is modified from the original CEMC paper, making it continuous and diff...
java
public static double getMCScore(MultipleAlignment alignment, double gapOpen, double gapExtension, double dCutoff) throws StructureException { List<Atom[]> trans = MultipleAlignmentTools.transformAtoms(alignment); // Calculate d0: same as the one in TM score int minLen = Integer.MAX_VALUE; for (Atom[] at...
[ "public", "static", "double", "getMCScore", "(", "MultipleAlignment", "alignment", ",", "double", "gapOpen", ",", "double", "gapExtension", ",", "double", "dCutoff", ")", "throws", "StructureException", "{", "List", "<", "Atom", "[", "]", ">", "trans", "=", "M...
Calculates the MC score, specific for the MultipleAlignment algorithm. The score function is modified from the original CEMC paper, making it continuous and differentiable. <p> The maximum score of a match is 20, and the penalties for gaps are part of the input. The half-score distance, d0, is chosen as in the TM-score...
[ "Calculates", "the", "MC", "score", "specific", "for", "the", "MultipleAlignment", "algorithm", ".", "The", "score", "function", "is", "modified", "from", "the", "original", "CEMC", "paper", "making", "it", "continuous", "and", "differentiable", ".", "<p", ">", ...
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/align/multiple/util/MultipleAlignmentScorer.java#L400-L417
versionone/VersionOne.SDK.Java.ObjectModel
src/main/java/com/versionone/om/V1Instance.java
V1Instance.clearCache
void clearCache(Entity entity, String name) { """ Clear an attribute from cache of specified Entity. @param entity to clear attribute of. @param name of the attribute to clear; if null, all attributes will be cleared from cache. """ final Asset asset = getAsset(entity); IAttributeDefinit...
java
void clearCache(Entity entity, String name) { final Asset asset = getAsset(entity); IAttributeDefinition def = null; if (name != null) { def = asset.getAssetType().getAttributeDefinition(name); } asset.clearAttributeCache(def); }
[ "void", "clearCache", "(", "Entity", "entity", ",", "String", "name", ")", "{", "final", "Asset", "asset", "=", "getAsset", "(", "entity", ")", ";", "IAttributeDefinition", "def", "=", "null", ";", "if", "(", "name", "!=", "null", ")", "{", "def", "=",...
Clear an attribute from cache of specified Entity. @param entity to clear attribute of. @param name of the attribute to clear; if null, all attributes will be cleared from cache.
[ "Clear", "an", "attribute", "from", "cache", "of", "specified", "Entity", "." ]
train
https://github.com/versionone/VersionOne.SDK.Java.ObjectModel/blob/59d35b67c849299631bca45ee94143237eb2ae1a/src/main/java/com/versionone/om/V1Instance.java#L670-L677
OpenLiberty/open-liberty
dev/com.ibm.ws.channel.ssl/src/com/ibm/ws/channel/ssl/internal/SSLUtils.java
SSLUtils.getBufferLimits
public static void getBufferLimits(WsByteBuffer[] buffers, int[] limits) { """ Assign an array of limits associated with the passed in buffer array. @param buffers @param limits """ // Double check that the parameters are non null. if ((buffers != null) && (limits != null)) { //...
java
public static void getBufferLimits(WsByteBuffer[] buffers, int[] limits) { // Double check that the parameters are non null. if ((buffers != null) && (limits != null)) { // Loop through the buffers. // In case of errant parameters, protect from array out of bounds. fo...
[ "public", "static", "void", "getBufferLimits", "(", "WsByteBuffer", "[", "]", "buffers", ",", "int", "[", "]", "limits", ")", "{", "// Double check that the parameters are non null.", "if", "(", "(", "buffers", "!=", "null", ")", "&&", "(", "limits", "!=", "nu...
Assign an array of limits associated with the passed in buffer array. @param buffers @param limits
[ "Assign", "an", "array", "of", "limits", "associated", "with", "the", "passed", "in", "buffer", "array", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.channel.ssl/src/com/ibm/ws/channel/ssl/internal/SSLUtils.java#L1370-L1392
versionone/VersionOne.SDK.Java.ObjectModel
src/main/java/com/versionone/om/Member.java
Member.getTotalToDo
public Double getTotalToDo(WorkitemFilter filter) { """ Return the total to do for all workitems owned by this member optionally filtered. @param filter Criteria to filter workitems on. @return total to do of selected Workitems. """ filter = (filter != null) ? filter : new WorkitemFilter(); ...
java
public Double getTotalToDo(WorkitemFilter filter) { filter = (filter != null) ? filter : new WorkitemFilter(); return getSum("OwnedWorkitems", filter, "ToDo"); }
[ "public", "Double", "getTotalToDo", "(", "WorkitemFilter", "filter", ")", "{", "filter", "=", "(", "filter", "!=", "null", ")", "?", "filter", ":", "new", "WorkitemFilter", "(", ")", ";", "return", "getSum", "(", "\"OwnedWorkitems\"", ",", "filter", ",", "...
Return the total to do for all workitems owned by this member optionally filtered. @param filter Criteria to filter workitems on. @return total to do of selected Workitems.
[ "Return", "the", "total", "to", "do", "for", "all", "workitems", "owned", "by", "this", "member", "optionally", "filtered", "." ]
train
https://github.com/versionone/VersionOne.SDK.Java.ObjectModel/blob/59d35b67c849299631bca45ee94143237eb2ae1a/src/main/java/com/versionone/om/Member.java#L309-L313
aol/cyclops
cyclops/src/main/java/cyclops/companion/Functions.java
Functions.concatLongs
public static Function<? super ReactiveSeq<Long>, ? extends ReactiveSeq<Long>> concatLongs( ReactiveSeq<Long> b) { """ /* Fluent integer concat operation using primitive types e.g. <pre> {@code import static cyclops.ReactiveSeq.concatLongs; ReactiveSeq.ofLongs(1l,2l,3l) .to(concatLongs(ReactiveSeq.ofLongs...
java
public static Function<? super ReactiveSeq<Long>, ? extends ReactiveSeq<Long>> concatLongs( ReactiveSeq<Long> b){ return a->ReactiveSeq.fromSpliterator(LongStream.concat(a.mapToLong(i->i),b.mapToLong(i->i)).spliterator()); }
[ "public", "static", "Function", "<", "?", "super", "ReactiveSeq", "<", "Long", ">", ",", "?", "extends", "ReactiveSeq", "<", "Long", ">", ">", "concatLongs", "(", "ReactiveSeq", "<", "Long", ">", "b", ")", "{", "return", "a", "->", "ReactiveSeq", ".", ...
/* Fluent integer concat operation using primitive types e.g. <pre> {@code import static cyclops.ReactiveSeq.concatLongs; ReactiveSeq.ofLongs(1l,2l,3l) .to(concatLongs(ReactiveSeq.ofLongs(5,10))); //[1l,2l,3l,5l,6l,7l,8l,9l] } </pre>
[ "/", "*", "Fluent", "integer", "concat", "operation", "using", "primitive", "types", "e", ".", "g", ".", "<pre", ">", "{", "@code", "import", "static", "cyclops", ".", "ReactiveSeq", ".", "concatLongs", ";" ]
train
https://github.com/aol/cyclops/blob/59a9fde30190a4d1faeb9f6d9851d209d82b81dd/cyclops/src/main/java/cyclops/companion/Functions.java#L433-L435
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/gd/StreamSet.java
StreamSet.createNonPersistentSubset
private ReliabilitySubset createNonPersistentSubset(Reliability reliability) { """ Create a new ReliabilitySubset for the given Reliability but do not persist it. @param reliability """ if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry( tc, "createNonPer...
java
private ReliabilitySubset createNonPersistentSubset(Reliability reliability) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry( tc, "createNonPersistentSubset", new Object[] { reliability }); ReliabilitySubset subset = new ReliabilitySubset(relia...
[ "private", "ReliabilitySubset", "createNonPersistentSubset", "(", "Reliability", "reliability", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "entry", "(", "tc", ",", ...
Create a new ReliabilitySubset for the given Reliability but do not persist it. @param reliability
[ "Create", "a", "new", "ReliabilitySubset", "for", "the", "given", "Reliability", "but", "do", "not", "persist", "it", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/gd/StreamSet.java#L440-L456
krummas/DrizzleJDBC
src/main/java/org/drizzle/jdbc/internal/mysql/MySQLProtocol.java
MySQLProtocol.createDrizzleQueryResult
private QueryResult createDrizzleQueryResult(final ResultSetPacket packet) throws IOException, QueryException { """ create a DrizzleQueryResult - precondition is that a result set packet has been read @param packet the result set packet from the server @return a DrizzleQueryResult @throws java.io.IOException ...
java
private QueryResult createDrizzleQueryResult(final ResultSetPacket packet) throws IOException, QueryException { final List<ColumnInformation> columnInformation = new ArrayList<ColumnInformation>(); for (int i = 0; i < packet.getFieldCount(); i++) { final RawPacket rawPacket = packetFetcher.g...
[ "private", "QueryResult", "createDrizzleQueryResult", "(", "final", "ResultSetPacket", "packet", ")", "throws", "IOException", ",", "QueryException", "{", "final", "List", "<", "ColumnInformation", ">", "columnInformation", "=", "new", "ArrayList", "<", "ColumnInformati...
create a DrizzleQueryResult - precondition is that a result set packet has been read @param packet the result set packet from the server @return a DrizzleQueryResult @throws java.io.IOException when something goes wrong while reading/writing from the server
[ "create", "a", "DrizzleQueryResult", "-", "precondition", "is", "that", "a", "result", "set", "packet", "has", "been", "read" ]
train
https://github.com/krummas/DrizzleJDBC/blob/716f31fd71f3cc289edf69844d8117deb86d98d6/src/main/java/org/drizzle/jdbc/internal/mysql/MySQLProtocol.java#L297-L332
zeroturnaround/zt-zip
src/main/java/org/zeroturnaround/zip/ZipUtil.java
ZipUtil.entryEquals
public static boolean entryEquals(File f1, File f2, String path1, String path2) { """ Compares two ZIP entries (byte-by-byte). . @param f1 first ZIP file. @param f2 second ZIP file. @param path1 name of the first entry. @param path2 name of the second entry. @return <code>true</code> if the contents of ...
java
public static boolean entryEquals(File f1, File f2, String path1, String path2) { ZipFile zf1 = null; ZipFile zf2 = null; try { zf1 = new ZipFile(f1); zf2 = new ZipFile(f2); return doEntryEquals(zf1, zf2, path1, path2); } catch (IOException e) { throw ZipExceptionUtil.rethr...
[ "public", "static", "boolean", "entryEquals", "(", "File", "f1", ",", "File", "f2", ",", "String", "path1", ",", "String", "path2", ")", "{", "ZipFile", "zf1", "=", "null", ";", "ZipFile", "zf2", "=", "null", ";", "try", "{", "zf1", "=", "new", "ZipF...
Compares two ZIP entries (byte-by-byte). . @param f1 first ZIP file. @param f2 second ZIP file. @param path1 name of the first entry. @param path2 name of the second entry. @return <code>true</code> if the contents of the entries were same.
[ "Compares", "two", "ZIP", "entries", "(", "byte", "-", "by", "-", "byte", ")", ".", "." ]
train
https://github.com/zeroturnaround/zt-zip/blob/abb4dc43583e4d19339c0c021035019798970a13/src/main/java/org/zeroturnaround/zip/ZipUtil.java#L3231-L3248
alkacon/opencms-core
src/org/opencms/util/CmsRequestUtil.java
CmsRequestUtil.getNotEmptyParameter
public static String getNotEmptyParameter(HttpServletRequest request, String paramName) { """ Reads value from the request parameters, will return <code>null</code> if the value is not available or only white space.<p> @param request the request to read the parameter from @param paramName the parameter name t...
java
public static String getNotEmptyParameter(HttpServletRequest request, String paramName) { String result = request.getParameter(paramName); if (CmsStringUtil.isEmptyOrWhitespaceOnly(result)) { result = null; } return result; }
[ "public", "static", "String", "getNotEmptyParameter", "(", "HttpServletRequest", "request", ",", "String", "paramName", ")", "{", "String", "result", "=", "request", ".", "getParameter", "(", "paramName", ")", ";", "if", "(", "CmsStringUtil", ".", "isEmptyOrWhites...
Reads value from the request parameters, will return <code>null</code> if the value is not available or only white space.<p> @param request the request to read the parameter from @param paramName the parameter name to read @return the request parameter value for the given parameter
[ "Reads", "value", "from", "the", "request", "parameters", "will", "return", "<code", ">", "null<", "/", "code", ">", "if", "the", "value", "is", "not", "available", "or", "only", "white", "space", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/util/CmsRequestUtil.java#L626-L633
alkacon/opencms-core
src/org/opencms/xml/containerpage/CmsDynamicFunctionParser.java
CmsDynamicFunctionParser.getMainFormat
protected Format getMainFormat(CmsObject cms, I_CmsXmlContentLocation location, CmsResource functionRes) { """ Parses the main format from the XML content.<p> @param cms the current CMS context @param location the location from which to parse main format @param functionRes the dynamic function resource @retu...
java
protected Format getMainFormat(CmsObject cms, I_CmsXmlContentLocation location, CmsResource functionRes) { I_CmsXmlContentValueLocation jspLoc = location.getSubValue("FunctionProvider"); CmsUUID structureId = jspLoc.asId(cms); I_CmsXmlContentValueLocation containerSettings = location.getSub...
[ "protected", "Format", "getMainFormat", "(", "CmsObject", "cms", ",", "I_CmsXmlContentLocation", "location", ",", "CmsResource", "functionRes", ")", "{", "I_CmsXmlContentValueLocation", "jspLoc", "=", "location", ".", "getSubValue", "(", "\"FunctionProvider\"", ")", ";"...
Parses the main format from the XML content.<p> @param cms the current CMS context @param location the location from which to parse main format @param functionRes the dynamic function resource @return the parsed main format
[ "Parses", "the", "main", "format", "from", "the", "XML", "content", ".", "<p", ">", "@param", "cms", "the", "current", "CMS", "context", "@param", "location", "the", "location", "from", "which", "to", "parse", "main", "format", "@param", "functionRes", "the"...
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/xml/containerpage/CmsDynamicFunctionParser.java#L183-L200
prestodb/presto
presto-hive/src/main/java/com/facebook/presto/hive/util/SerDeUtils.java
SerDeUtils.serializeObject
@VisibleForTesting public static Block serializeObject(Type type, BlockBuilder builder, Object object, ObjectInspector inspector, boolean filterNullMapKeys) { """ that contain null map keys. For production, null map keys are not allowed. """ switch (inspector.getCategory()) { case PRIM...
java
@VisibleForTesting public static Block serializeObject(Type type, BlockBuilder builder, Object object, ObjectInspector inspector, boolean filterNullMapKeys) { switch (inspector.getCategory()) { case PRIMITIVE: serializePrimitive(type, builder, object, (PrimitiveObjectInspecto...
[ "@", "VisibleForTesting", "public", "static", "Block", "serializeObject", "(", "Type", "type", ",", "BlockBuilder", "builder", ",", "Object", "object", ",", "ObjectInspector", "inspector", ",", "boolean", "filterNullMapKeys", ")", "{", "switch", "(", "inspector", ...
that contain null map keys. For production, null map keys are not allowed.
[ "that", "contain", "null", "map", "keys", ".", "For", "production", "null", "map", "keys", "are", "not", "allowed", "." ]
train
https://github.com/prestodb/presto/blob/89de5e379d8f85e139d292b0add8c537a2a01a88/presto-hive/src/main/java/com/facebook/presto/hive/util/SerDeUtils.java#L86-L101
palatable/lambda
src/main/java/com/jnape/palatable/lambda/adt/hmap/HMap.java
HMap.singletonHMap
public static <V> HMap singletonHMap(TypeSafeKey<?, V> key, V value) { """ Static factory method for creating a singleton HMap. @param key the only mapped key @param value the only mapped value @param <V> the only mapped value type @return a singleton HMap """ return emptyHMap().put(key, valu...
java
public static <V> HMap singletonHMap(TypeSafeKey<?, V> key, V value) { return emptyHMap().put(key, value); }
[ "public", "static", "<", "V", ">", "HMap", "singletonHMap", "(", "TypeSafeKey", "<", "?", ",", "V", ">", "key", ",", "V", "value", ")", "{", "return", "emptyHMap", "(", ")", ".", "put", "(", "key", ",", "value", ")", ";", "}" ]
Static factory method for creating a singleton HMap. @param key the only mapped key @param value the only mapped value @param <V> the only mapped value type @return a singleton HMap
[ "Static", "factory", "method", "for", "creating", "a", "singleton", "HMap", "." ]
train
https://github.com/palatable/lambda/blob/b643ba836c5916d1d8193822e5efb4e7b40c489a/src/main/java/com/jnape/palatable/lambda/adt/hmap/HMap.java#L197-L199
getsentry/sentry-java
sentry-appengine/src/main/java/io/sentry/appengine/connection/AppEngineAsyncConnection.java
AppEngineAsyncConnection.send
@Override public void send(Event event) { """ {@inheritDoc} <p> The event will be added to a queue and will be handled by a separate {@code Thread} later on. """ if (!closed) { queue.add(withPayload(new EventSubmitter(id, event))); } }
java
@Override public void send(Event event) { if (!closed) { queue.add(withPayload(new EventSubmitter(id, event))); } }
[ "@", "Override", "public", "void", "send", "(", "Event", "event", ")", "{", "if", "(", "!", "closed", ")", "{", "queue", ".", "add", "(", "withPayload", "(", "new", "EventSubmitter", "(", "id", ",", "event", ")", ")", ")", ";", "}", "}" ]
{@inheritDoc} <p> The event will be added to a queue and will be handled by a separate {@code Thread} later on.
[ "{" ]
train
https://github.com/getsentry/sentry-java/blob/2e01461775cbd5951ff82b566069c349146d8aca/sentry-appengine/src/main/java/io/sentry/appengine/connection/AppEngineAsyncConnection.java#L73-L78
lucee/Lucee
core/src/main/java/lucee/transformer/library/tag/TagLibTag.java
TagLibTag.setTDBTClassDefinition
public void setTDBTClassDefinition(String tdbtClass, Identification id, Attributes attr) { """ Setzt die implementierende Klassendefinition des TagDependentBodyTransformer. Diese Methode wird durch die Klasse TagLibFactory verwendet. @param tdbtClass Klassendefinition der TagDependentBodyTransformer-Implementa...
java
public void setTDBTClassDefinition(String tdbtClass, Identification id, Attributes attr) { this.tdbtCD = ClassDefinitionImpl.toClassDefinition(tdbtClass, id, attr); this.tdbt = null; }
[ "public", "void", "setTDBTClassDefinition", "(", "String", "tdbtClass", ",", "Identification", "id", ",", "Attributes", "attr", ")", "{", "this", ".", "tdbtCD", "=", "ClassDefinitionImpl", ".", "toClassDefinition", "(", "tdbtClass", ",", "id", ",", "attr", ")", ...
Setzt die implementierende Klassendefinition des TagDependentBodyTransformer. Diese Methode wird durch die Klasse TagLibFactory verwendet. @param tdbtClass Klassendefinition der TagDependentBodyTransformer-Implementation.
[ "Setzt", "die", "implementierende", "Klassendefinition", "des", "TagDependentBodyTransformer", ".", "Diese", "Methode", "wird", "durch", "die", "Klasse", "TagLibFactory", "verwendet", "." ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/transformer/library/tag/TagLibTag.java#L609-L612
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/collection/impl/queue/QueueContainer.java
QueueContainer.txnOfferReserveInternal
private TxQueueItem txnOfferReserveInternal(long itemId, String transactionId) { """ Add a reservation for an item with {@code itemId} offered in transaction with {@code transactionId} """ TxQueueItem item = new TxQueueItem(this, itemId, null) .setTransactionId(transactionId) ...
java
private TxQueueItem txnOfferReserveInternal(long itemId, String transactionId) { TxQueueItem item = new TxQueueItem(this, itemId, null) .setTransactionId(transactionId) .setPollOperation(false); return txMap.put(itemId, item); }
[ "private", "TxQueueItem", "txnOfferReserveInternal", "(", "long", "itemId", ",", "String", "transactionId", ")", "{", "TxQueueItem", "item", "=", "new", "TxQueueItem", "(", "this", ",", "itemId", ",", "null", ")", ".", "setTransactionId", "(", "transactionId", "...
Add a reservation for an item with {@code itemId} offered in transaction with {@code transactionId}
[ "Add", "a", "reservation", "for", "an", "item", "with", "{" ]
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/collection/impl/queue/QueueContainer.java#L329-L334
Azure/azure-sdk-for-java
compute/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/compute/v2017_12_01/implementation/VirtualMachineExtensionsInner.java
VirtualMachineExtensionsInner.beginCreateOrUpdate
public VirtualMachineExtensionInner beginCreateOrUpdate(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionInner extensionParameters) { """ The operation to create or update the extension. @param resourceGroupName The name of the resource group. @param vmName The name of th...
java
public VirtualMachineExtensionInner beginCreateOrUpdate(String resourceGroupName, String vmName, String vmExtensionName, VirtualMachineExtensionInner extensionParameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, vmName, vmExtensionName, extensionParameters).toBlocking().single().b...
[ "public", "VirtualMachineExtensionInner", "beginCreateOrUpdate", "(", "String", "resourceGroupName", ",", "String", "vmName", ",", "String", "vmExtensionName", ",", "VirtualMachineExtensionInner", "extensionParameters", ")", "{", "return", "beginCreateOrUpdateWithServiceResponseA...
The operation to create or update the extension. @param resourceGroupName The name of the resource group. @param vmName The name of the virtual machine where the extension should be created or updated. @param vmExtensionName The name of the virtual machine extension. @param extensionParameters Parameters supplied to t...
[ "The", "operation", "to", "create", "or", "update", "the", "extension", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_12_01/src/main/java/com/microsoft/azure/management/compute/v2017_12_01/implementation/VirtualMachineExtensionsInner.java#L186-L188
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/db/xmlutil/XmlUtilities.java
XmlUtilities.createXMLStringRecord
public static String createXMLStringRecord(Record record) { """ Convert the current record to an XML String. Careful, as this method just returns the XML fragment (with header or a top-level tag). @param The record to convert. @return The XML representation of this record. """ String string = DBCons...
java
public static String createXMLStringRecord(Record record) { String string = DBConstants.BLANK; DocumentBuilder db = Utility.getDocumentBuilder(); DocumentBuilder stringdb = Utility.getDocumentBuilder(); Document doc = null; synchronized (db) { doc = db.ne...
[ "public", "static", "String", "createXMLStringRecord", "(", "Record", "record", ")", "{", "String", "string", "=", "DBConstants", ".", "BLANK", ";", "DocumentBuilder", "db", "=", "Utility", ".", "getDocumentBuilder", "(", ")", ";", "DocumentBuilder", "stringdb", ...
Convert the current record to an XML String. Careful, as this method just returns the XML fragment (with header or a top-level tag). @param The record to convert. @return The XML representation of this record.
[ "Convert", "the", "current", "record", "to", "an", "XML", "String", ".", "Careful", "as", "this", "method", "just", "returns", "the", "XML", "fragment", "(", "with", "header", "or", "a", "top", "-", "level", "tag", ")", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/db/xmlutil/XmlUtilities.java#L316-L370
yidongnan/grpc-spring-boot-starter
examples/security-grpc-bearerAuth-server/src/main/java/net/devh/boot/grpc/examples/security/server/GrpcServerService.java
GrpcServerService.sayHello
@Override @Secured("ROLE_TEST") public void sayHello(final HelloRequest req, final StreamObserver<HelloReply> responseObserver) { """ A grpc method that requests the user to be authenticated and have the role "ROLE_GREET". """ final HelloReply reply = HelloReply.newBuilder().setMessage("Hello =...
java
@Override @Secured("ROLE_TEST") public void sayHello(final HelloRequest req, final StreamObserver<HelloReply> responseObserver) { final HelloReply reply = HelloReply.newBuilder().setMessage("Hello ==> " + req.getName()).build(); responseObserver.onNext(reply); responseObserver.onComplete...
[ "@", "Override", "@", "Secured", "(", "\"ROLE_TEST\"", ")", "public", "void", "sayHello", "(", "final", "HelloRequest", "req", ",", "final", "StreamObserver", "<", "HelloReply", ">", "responseObserver", ")", "{", "final", "HelloReply", "reply", "=", "HelloReply"...
A grpc method that requests the user to be authenticated and have the role "ROLE_GREET".
[ "A", "grpc", "method", "that", "requests", "the", "user", "to", "be", "authenticated", "and", "have", "the", "role", "ROLE_GREET", "." ]
train
https://github.com/yidongnan/grpc-spring-boot-starter/blob/07f8853cfafc9707584f2371aff012e590217b85/examples/security-grpc-bearerAuth-server/src/main/java/net/devh/boot/grpc/examples/security/server/GrpcServerService.java#L37-L43
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslpolicylabel.java
sslpolicylabel.get
public static sslpolicylabel get(nitro_service service, String labelname) throws Exception { """ Use this API to fetch sslpolicylabel resource of given name . """ sslpolicylabel obj = new sslpolicylabel(); obj.set_labelname(labelname); sslpolicylabel response = (sslpolicylabel) obj.get_resource(service);...
java
public static sslpolicylabel get(nitro_service service, String labelname) throws Exception{ sslpolicylabel obj = new sslpolicylabel(); obj.set_labelname(labelname); sslpolicylabel response = (sslpolicylabel) obj.get_resource(service); return response; }
[ "public", "static", "sslpolicylabel", "get", "(", "nitro_service", "service", ",", "String", "labelname", ")", "throws", "Exception", "{", "sslpolicylabel", "obj", "=", "new", "sslpolicylabel", "(", ")", ";", "obj", ".", "set_labelname", "(", "labelname", ")", ...
Use this API to fetch sslpolicylabel resource of given name .
[ "Use", "this", "API", "to", "fetch", "sslpolicylabel", "resource", "of", "given", "name", "." ]
train
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/ssl/sslpolicylabel.java#L314-L319
btrplace/scheduler
choco/src/main/java/org/btrplace/scheduler/choco/constraint/mttr/CMinMTTR.java
CMinMTTR.placeVMs
private void placeVMs(Parameters ps, List<AbstractStrategy<?>> strategies, List<VMTransition> actions, OnStableNodeFirst schedHeuristic, Map<IntVar, VM> map) { """ /* Try to place the VMs associated on the actions in a random node while trying first to stay on the current node """ IntValueSelector rnd...
java
private void placeVMs(Parameters ps, List<AbstractStrategy<?>> strategies, List<VMTransition> actions, OnStableNodeFirst schedHeuristic, Map<IntVar, VM> map) { IntValueSelector rnd = new WorstFit(map, rp, new BiggestDimension()); if (!useResources) { rnd = new RandomVMPlacement(rp, map, true...
[ "private", "void", "placeVMs", "(", "Parameters", "ps", ",", "List", "<", "AbstractStrategy", "<", "?", ">", ">", "strategies", ",", "List", "<", "VMTransition", ">", "actions", ",", "OnStableNodeFirst", "schedHeuristic", ",", "Map", "<", "IntVar", ",", "VM"...
/* Try to place the VMs associated on the actions in a random node while trying first to stay on the current node
[ "/", "*", "Try", "to", "place", "the", "VMs", "associated", "on", "the", "actions", "in", "a", "random", "node", "while", "trying", "first", "to", "stay", "on", "the", "current", "node" ]
train
https://github.com/btrplace/scheduler/blob/611063aad0b47a016e57ebf36fa4dfdf24de09e8/choco/src/main/java/org/btrplace/scheduler/choco/constraint/mttr/CMinMTTR.java#L186-L195
svenkubiak/mangooio
mangooio-core/src/main/java/io/mangoo/routing/handlers/InboundCookiesHandler.java
InboundCookiesHandler.getCookieValue
private String getCookieValue(HttpServerExchange exchange, String cookieName) { """ Retrieves the value of a cookie with a given name from a HttpServerExchange @param exchange The exchange containing the cookie @param cookieName The name of the cookie @return The value of the cookie or null if none found ...
java
private String getCookieValue(HttpServerExchange exchange, String cookieName) { String value = null; Map<String, Cookie> requestCookies = exchange.getRequestCookies(); if (requestCookies != null) { Cookie cookie = exchange.getRequestCookies().get(cookieName); if (cookie !...
[ "private", "String", "getCookieValue", "(", "HttpServerExchange", "exchange", ",", "String", "cookieName", ")", "{", "String", "value", "=", "null", ";", "Map", "<", "String", ",", "Cookie", ">", "requestCookies", "=", "exchange", ".", "getRequestCookies", "(", ...
Retrieves the value of a cookie with a given name from a HttpServerExchange @param exchange The exchange containing the cookie @param cookieName The name of the cookie @return The value of the cookie or null if none found
[ "Retrieves", "the", "value", "of", "a", "cookie", "with", "a", "given", "name", "from", "a", "HttpServerExchange" ]
train
https://github.com/svenkubiak/mangooio/blob/b3beb6d09510dbbab0ed947d5069c463e1fda6e7/mangooio-core/src/main/java/io/mangoo/routing/handlers/InboundCookiesHandler.java#L207-L218
facebook/SoLoader
java/com/facebook/soloader/ApplicationSoSource.java
ApplicationSoSource.checkAndMaybeUpdate
public boolean checkAndMaybeUpdate() throws IOException { """ check to make sure there haven't been any changes to the nativeLibraryDir since the last check, if there have been changes, update the context and soSource @return true if the nativeLibraryDir was updated """ try { File nativeLibDir = ...
java
public boolean checkAndMaybeUpdate() throws IOException { try { File nativeLibDir = soSource.soDirectory; Context updatedContext = applicationContext.createPackageContext(applicationContext.getPackageName(), 0); File updatedNativeLibDir = new File(updatedContext.getApplicationInfo().nati...
[ "public", "boolean", "checkAndMaybeUpdate", "(", ")", "throws", "IOException", "{", "try", "{", "File", "nativeLibDir", "=", "soSource", ".", "soDirectory", ";", "Context", "updatedContext", "=", "applicationContext", ".", "createPackageContext", "(", "applicationCont...
check to make sure there haven't been any changes to the nativeLibraryDir since the last check, if there have been changes, update the context and soSource @return true if the nativeLibraryDir was updated
[ "check", "to", "make", "sure", "there", "haven", "t", "been", "any", "changes", "to", "the", "nativeLibraryDir", "since", "the", "last", "check", "if", "there", "have", "been", "changes", "update", "the", "context", "and", "soSource" ]
train
https://github.com/facebook/SoLoader/blob/263af31d2960b2c0d0afe79d80197165a543be86/java/com/facebook/soloader/ApplicationSoSource.java#L54-L76
UrielCh/ovh-java-sdk
ovh-java-sdk-msServices/src/main/java/net/minidev/ovh/api/ApiOvhMsServices.java
ApiOvhMsServices.serviceName_account_userPrincipalName_sync_GET
public OvhSyncInformation serviceName_account_userPrincipalName_sync_GET(String serviceName, String userPrincipalName) throws IOException { """ Get this object properties REST: GET /msServices/{serviceName}/account/{userPrincipalName}/sync @param serviceName [required] The internal name of your Active Director...
java
public OvhSyncInformation serviceName_account_userPrincipalName_sync_GET(String serviceName, String userPrincipalName) throws IOException { String qPath = "/msServices/{serviceName}/account/{userPrincipalName}/sync"; StringBuilder sb = path(qPath, serviceName, userPrincipalName); String resp = exec(qPath, "GET", ...
[ "public", "OvhSyncInformation", "serviceName_account_userPrincipalName_sync_GET", "(", "String", "serviceName", ",", "String", "userPrincipalName", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/msServices/{serviceName}/account/{userPrincipalName}/sync\"", ";", "S...
Get this object properties REST: GET /msServices/{serviceName}/account/{userPrincipalName}/sync @param serviceName [required] The internal name of your Active Directory organization @param userPrincipalName [required] User Principal Name API beta
[ "Get", "this", "object", "properties" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-msServices/src/main/java/net/minidev/ovh/api/ApiOvhMsServices.java#L156-L161
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.updateCertificateIssuer
public IssuerBundle updateCertificateIssuer(String vaultBaseUrl, String issuerName) { """ Updates the specified certificate issuer. The UpdateCertificateIssuer operation performs an update on the specified certificate issuer entity. This operation requires the certificates/setissuers permission. @param vaultBa...
java
public IssuerBundle updateCertificateIssuer(String vaultBaseUrl, String issuerName) { return updateCertificateIssuerWithServiceResponseAsync(vaultBaseUrl, issuerName).toBlocking().single().body(); }
[ "public", "IssuerBundle", "updateCertificateIssuer", "(", "String", "vaultBaseUrl", ",", "String", "issuerName", ")", "{", "return", "updateCertificateIssuerWithServiceResponseAsync", "(", "vaultBaseUrl", ",", "issuerName", ")", ".", "toBlocking", "(", ")", ".", "single...
Updates the specified certificate issuer. The UpdateCertificateIssuer operation performs an update on the specified certificate issuer entity. This operation requires the certificates/setissuers permission. @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. @param issuerName The name of t...
[ "Updates", "the", "specified", "certificate", "issuer", ".", "The", "UpdateCertificateIssuer", "operation", "performs", "an", "update", "on", "the", "specified", "certificate", "issuer", "entity", ".", "This", "operation", "requires", "the", "certificates", "/", "se...
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#L6110-L6112
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPOptionPersistenceImpl.java
CPOptionPersistenceImpl.removeByUuid_C
@Override public void removeByUuid_C(String uuid, long companyId) { """ Removes all the cp options where uuid = &#63; and companyId = &#63; from the database. @param uuid the uuid @param companyId the company ID """ for (CPOption cpOption : findByUuid_C(uuid, companyId, QueryUtil.ALL_POS, QueryUtil....
java
@Override public void removeByUuid_C(String uuid, long companyId) { for (CPOption cpOption : findByUuid_C(uuid, companyId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(cpOption); } }
[ "@", "Override", "public", "void", "removeByUuid_C", "(", "String", "uuid", ",", "long", "companyId", ")", "{", "for", "(", "CPOption", "cpOption", ":", "findByUuid_C", "(", "uuid", ",", "companyId", ",", "QueryUtil", ".", "ALL_POS", ",", "QueryUtil", ".", ...
Removes all the cp options where uuid = &#63; and companyId = &#63; from the database. @param uuid the uuid @param companyId the company ID
[ "Removes", "all", "the", "cp", "options", "where", "uuid", "=", "&#63", ";", "and", "companyId", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPOptionPersistenceImpl.java#L1391-L1397
rwl/CSparseJ
src/main/java/edu/emory/mathcs/csparsej/tfloat/Scs_reach.java
Scs_reach.cs_reach
public static int cs_reach(Scs G, Scs B, int k, int[] xi, int[] pinv) { """ Finds a nonzero pattern of x=L\b for sparse L and b. @param G graph to search (G.p modified, then restored) @param B right hand side, b = B(:,k) @param k use kth column of B @param xi size 2*n, output in xi[top..n-1] @param pinv...
java
public static int cs_reach(Scs G, Scs B, int k, int[] xi, int[] pinv) { int p, n, top, Bp[], Bi[], Gp[]; if (!Scs_util.CS_CSC(G) || !Scs_util.CS_CSC(B) || xi == null) return (-1); /* check inputs */ n = G.n; Bp = B.p; Bi = B.i; Gp = G.p; top = ...
[ "public", "static", "int", "cs_reach", "(", "Scs", "G", ",", "Scs", "B", ",", "int", "k", ",", "int", "[", "]", "xi", ",", "int", "[", "]", "pinv", ")", "{", "int", "p", ",", "n", ",", "top", ",", "Bp", "[", "]", ",", "Bi", "[", "]", ",",...
Finds a nonzero pattern of x=L\b for sparse L and b. @param G graph to search (G.p modified, then restored) @param B right hand side, b = B(:,k) @param k use kth column of B @param xi size 2*n, output in xi[top..n-1] @param pinv mapping of rows to columns of G, ignored if null @return top, -1 on error
[ "Finds", "a", "nonzero", "pattern", "of", "x", "=", "L", "\\", "b", "for", "sparse", "L", "and", "b", "." ]
train
https://github.com/rwl/CSparseJ/blob/6a6f66bccce1558156a961494358952603b0ac84/src/main/java/edu/emory/mathcs/csparsej/tfloat/Scs_reach.java#L52-L70
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.msgstore/src/com/ibm/ws/sib/msgstore/persistence/objectManager/PersistentMessageStoreImpl.java
PersistentMessageStoreImpl.initialize
public void initialize(MessageStoreImpl ms, XidManager xidManager, Configuration configuration) { """ Initialises the PersistentMessageStore @param ms Reference to the owning MessageStoreImpl which offers a variety of utility methods @param xidManager The transaction layer's XidManager @param configuration Th...
java
public void initialize(MessageStoreImpl ms, XidManager xidManager, Configuration configuration) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "initialize", new Object[]{"MS="+ms, "XidManager="+xidManager, "Config="+configuration}); _ms = ms; ...
[ "public", "void", "initialize", "(", "MessageStoreImpl", "ms", ",", "XidManager", "xidManager", ",", "Configuration", "configuration", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", ...
Initialises the PersistentMessageStore @param ms Reference to the owning MessageStoreImpl which offers a variety of utility methods @param xidManager The transaction layer's XidManager @param configuration The configuration for the persistence layer
[ "Initialises", "the", "PersistentMessageStore" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.msgstore/src/com/ibm/ws/sib/msgstore/persistence/objectManager/PersistentMessageStoreImpl.java#L147-L162
Azure/azure-sdk-for-java
labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/GlobalUsersInner.java
GlobalUsersInner.getPersonalPreferencesAsync
public Observable<GetPersonalPreferencesResponseInner> getPersonalPreferencesAsync(String userName, PersonalPreferencesOperationsPayload personalPreferencesOperationsPayload) { """ Get personal preferences for a user. @param userName The name of the user. @param personalPreferencesOperationsPayload Represents ...
java
public Observable<GetPersonalPreferencesResponseInner> getPersonalPreferencesAsync(String userName, PersonalPreferencesOperationsPayload personalPreferencesOperationsPayload) { return getPersonalPreferencesWithServiceResponseAsync(userName, personalPreferencesOperationsPayload).map(new Func1<ServiceResponse<Get...
[ "public", "Observable", "<", "GetPersonalPreferencesResponseInner", ">", "getPersonalPreferencesAsync", "(", "String", "userName", ",", "PersonalPreferencesOperationsPayload", "personalPreferencesOperationsPayload", ")", "{", "return", "getPersonalPreferencesWithServiceResponseAsync", ...
Get personal preferences for a user. @param userName The name of the user. @param personalPreferencesOperationsPayload Represents payload for any Environment operations like get, start, stop, connect @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the GetPersonalPref...
[ "Get", "personal", "preferences", "for", "a", "user", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/GlobalUsersInner.java#L492-L499
Azure/azure-sdk-for-java
keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java
KeyVaultClientBaseImpl.setSecretAsync
public Observable<SecretBundle> setSecretAsync(String vaultBaseUrl, String secretName, String value) { """ Sets a secret in a specified key vault. The SET operation adds a secret to the Azure Key Vault. If the named secret already exists, Azure Key Vault creates a new version of that secret. This operation requir...
java
public Observable<SecretBundle> setSecretAsync(String vaultBaseUrl, String secretName, String value) { return setSecretWithServiceResponseAsync(vaultBaseUrl, secretName, value).map(new Func1<ServiceResponse<SecretBundle>, SecretBundle>() { @Override public SecretBundle call(ServiceRespon...
[ "public", "Observable", "<", "SecretBundle", ">", "setSecretAsync", "(", "String", "vaultBaseUrl", ",", "String", "secretName", ",", "String", "value", ")", "{", "return", "setSecretWithServiceResponseAsync", "(", "vaultBaseUrl", ",", "secretName", ",", "value", ")"...
Sets a secret in a specified key vault. The SET operation adds a secret to the Azure Key Vault. If the named secret already exists, Azure Key Vault creates a new version of that secret. This operation requires the secrets/set permission. @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net. ...
[ "Sets", "a", "secret", "in", "a", "specified", "key", "vault", ".", "The", "SET", "operation", "adds", "a", "secret", "to", "the", "Azure", "Key", "Vault", ".", "If", "the", "named", "secret", "already", "exists", "Azure", "Key", "Vault", "creates", "a",...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/keyvault/data-plane/azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java#L3351-L3358
kuali/ojb-1.0.4
src/java/org/apache/ojb/broker/ant/RepositoryDataTask.java
RepositoryDataTask.readSingleSchemaFile
private Database readSingleSchemaFile(DatabaseIO reader, File schemaFile) { """ Reads a single schema file. @param reader The schema reader @param schemaFile The schema file @return The model """ Database model = null; if (!schemaFile.isFile()) { log("Path "+s...
java
private Database readSingleSchemaFile(DatabaseIO reader, File schemaFile) { Database model = null; if (!schemaFile.isFile()) { log("Path "+schemaFile.getAbsolutePath()+" does not denote a schema file", Project.MSG_ERR); } else if (!schemaFile.canRead()) ...
[ "private", "Database", "readSingleSchemaFile", "(", "DatabaseIO", "reader", ",", "File", "schemaFile", ")", "{", "Database", "model", "=", "null", ";", "if", "(", "!", "schemaFile", ".", "isFile", "(", ")", ")", "{", "log", "(", "\"Path \"", "+", "schemaFi...
Reads a single schema file. @param reader The schema reader @param schemaFile The schema file @return The model
[ "Reads", "a", "single", "schema", "file", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/java/org/apache/ojb/broker/ant/RepositoryDataTask.java#L238-L263
Ekryd/sortpom
sorter/src/main/java/sortpom/wrapper/ElementSortOrderMap.java
ElementSortOrderMap.addElement
public void addElement(Element element, int sortOrder) { """ Add an Xml element to the map @param element Xml element @param sortOrder an index describing the sort order (lower number == element towards the start of the file) """ final String deepName = getDeepName(element); elementNameSo...
java
public void addElement(Element element, int sortOrder) { final String deepName = getDeepName(element); elementNameSortOrderMap.put(deepName, sortOrder); }
[ "public", "void", "addElement", "(", "Element", "element", ",", "int", "sortOrder", ")", "{", "final", "String", "deepName", "=", "getDeepName", "(", "element", ")", ";", "elementNameSortOrderMap", ".", "put", "(", "deepName", ",", "sortOrder", ")", ";", "}"...
Add an Xml element to the map @param element Xml element @param sortOrder an index describing the sort order (lower number == element towards the start of the file)
[ "Add", "an", "Xml", "element", "to", "the", "map" ]
train
https://github.com/Ekryd/sortpom/blob/27056420803ed04001e4149b04a719fbac774c5d/sorter/src/main/java/sortpom/wrapper/ElementSortOrderMap.java#L24-L28
operasoftware/operaprestodriver
src/com/opera/core/systems/runner/launcher/OperaLauncherRunner.java
OperaLauncherRunner.captureScreen
public ScreenCaptureReply captureScreen(long timeout, List<String> knownMD5s) throws OperaRunnerException { """ Take screenshot using external program. Will not trigger a screen repaint. @throws OperaRunnerException if runner is shutdown or not running @inheritDoc """ assertLauncherAlive(); ...
java
public ScreenCaptureReply captureScreen(long timeout, List<String> knownMD5s) throws OperaRunnerException { assertLauncherAlive(); String resultMd5; byte[] resultBytes; boolean blank = false; try { LauncherScreenshotRequest.Builder request = LauncherScreenshotRequest.newBuilder(); ...
[ "public", "ScreenCaptureReply", "captureScreen", "(", "long", "timeout", ",", "List", "<", "String", ">", "knownMD5s", ")", "throws", "OperaRunnerException", "{", "assertLauncherAlive", "(", ")", ";", "String", "resultMd5", ";", "byte", "[", "]", "resultBytes", ...
Take screenshot using external program. Will not trigger a screen repaint. @throws OperaRunnerException if runner is shutdown or not running @inheritDoc
[ "Take", "screenshot", "using", "external", "program", ".", "Will", "not", "trigger", "a", "screen", "repaint", "." ]
train
https://github.com/operasoftware/operaprestodriver/blob/1ccceda80f1c1a0489171d17dcaa6e7b18fb4c01/src/com/opera/core/systems/runner/launcher/OperaLauncherRunner.java#L354-L389
UrielCh/ovh-java-sdk
ovh-java-sdk-ip/src/main/java/net/minidev/ovh/api/ApiOvhIp.java
ApiOvhIp.ip_reverse_POST
public OvhReverseIp ip_reverse_POST(String ip, String ipReverse, String reverse) throws IOException { """ Add reverse on an ip REST: POST /ip/{ip}/reverse @param reverse [required] @param ipReverse [required] @param ip [required] """ String qPath = "/ip/{ip}/reverse"; StringBuilder sb = path(qPath, i...
java
public OvhReverseIp ip_reverse_POST(String ip, String ipReverse, String reverse) throws IOException { String qPath = "/ip/{ip}/reverse"; StringBuilder sb = path(qPath, ip); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "ipReverse", ipReverse); addBody(o, "reverse", reverse); String re...
[ "public", "OvhReverseIp", "ip_reverse_POST", "(", "String", "ip", ",", "String", "ipReverse", ",", "String", "reverse", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/ip/{ip}/reverse\"", ";", "StringBuilder", "sb", "=", "path", "(", "qPath", ",",...
Add reverse on an ip REST: POST /ip/{ip}/reverse @param reverse [required] @param ipReverse [required] @param ip [required]
[ "Add", "reverse", "on", "an", "ip" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-ip/src/main/java/net/minidev/ovh/api/ApiOvhIp.java#L473-L481
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/URLUtil.java
URLUtil.decode
public static String decode(String content, Charset charset) { """ 解码application/x-www-form-urlencoded字符 @param content 被解码内容 @param charset 编码 @return 编码后的字符 @since 4.4.1 """ if (null == charset) { charset = CharsetUtil.defaultCharset(); } return decode(content, charset.name()); }
java
public static String decode(String content, Charset charset) { if (null == charset) { charset = CharsetUtil.defaultCharset(); } return decode(content, charset.name()); }
[ "public", "static", "String", "decode", "(", "String", "content", ",", "Charset", "charset", ")", "{", "if", "(", "null", "==", "charset", ")", "{", "charset", "=", "CharsetUtil", ".", "defaultCharset", "(", ")", ";", "}", "return", "decode", "(", "conte...
解码application/x-www-form-urlencoded字符 @param content 被解码内容 @param charset 编码 @return 编码后的字符 @since 4.4.1
[ "解码application", "/", "x", "-", "www", "-", "form", "-", "urlencoded字符" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/URLUtil.java#L357-L362
hibernate/hibernate-ogm
core/src/main/java/org/hibernate/ogm/datastore/document/impl/EmbeddableStateFinder.java
EmbeddableStateFinder.determineAndCacheOuterMostNullEmbeddable
private String determineAndCacheOuterMostNullEmbeddable(String column, String[] path) { """ Walks from the most outer embeddable to the most inner one look for all columns contained in these embeddables and exclude the embeddables that have a non null column because of caching, the algorithm is only run once pe...
java
private String determineAndCacheOuterMostNullEmbeddable(String column, String[] path) { String embeddable = path[0]; // process each embeddable from less specific to most specific // exclude path leaves as it's a column and not an embeddable for ( int index = 0; index < path.length - 1; index++ ) { Set<Strin...
[ "private", "String", "determineAndCacheOuterMostNullEmbeddable", "(", "String", "column", ",", "String", "[", "]", "path", ")", "{", "String", "embeddable", "=", "path", "[", "0", "]", ";", "// process each embeddable from less specific to most specific", "// exclude path...
Walks from the most outer embeddable to the most inner one look for all columns contained in these embeddables and exclude the embeddables that have a non null column because of caching, the algorithm is only run once per column parameter
[ "Walks", "from", "the", "most", "outer", "embeddable", "to", "the", "most", "inner", "one", "look", "for", "all", "columns", "contained", "in", "these", "embeddables", "and", "exclude", "the", "embeddables", "that", "have", "a", "non", "null", "column", "bec...
train
https://github.com/hibernate/hibernate-ogm/blob/9ea971df7c27277029006a6f748d8272fb1d69d2/core/src/main/java/org/hibernate/ogm/datastore/document/impl/EmbeddableStateFinder.java#L66-L87
ehcache/ehcache3
clustered/server/src/main/java/org/ehcache/clustered/server/offheap/OffHeapServerStore.java
OffHeapServerStore.handleOversizeMappingException
private <R> R handleOversizeMappingException(long key, LongFunction<R> operation) throws OversizeMappingException { """ Force eviction from other segments until {@code operation} succeeds or no further eviction is possible. @param key the target key @param operation the previously failed operation @param <R> ...
java
private <R> R handleOversizeMappingException(long key, LongFunction<R> operation) throws OversizeMappingException { if (tryShrinkOthers(key)) { try { return operation.apply(key); } catch (OversizeMappingException ex) { //ignore } } writeLockAll(); try { OversizeM...
[ "private", "<", "R", ">", "R", "handleOversizeMappingException", "(", "long", "key", ",", "LongFunction", "<", "R", ">", "operation", ")", "throws", "OversizeMappingException", "{", "if", "(", "tryShrinkOthers", "(", "key", ")", ")", "{", "try", "{", "return...
Force eviction from other segments until {@code operation} succeeds or no further eviction is possible. @param key the target key @param operation the previously failed operation @param <R> operation result type @return the operation result @throws OversizeMappingException if the operation cannot be made to succeed
[ "Force", "eviction", "from", "other", "segments", "until", "{", "@code", "operation", "}", "succeeds", "or", "no", "further", "eviction", "is", "possible", "." ]
train
https://github.com/ehcache/ehcache3/blob/3cceda57185e522f8d241ddb75146d67ee2af898/clustered/server/src/main/java/org/ehcache/clustered/server/offheap/OffHeapServerStore.java#L184-L207
joniles/mpxj
src/main/java/net/sf/mpxj/ProjectCalendar.java
ProjectCalendar.getRanges
private ProjectCalendarDateRanges getRanges(Date date, Calendar cal, Day day) { """ Retrieves the working hours on the given date. @param date required date @param cal optional calendar instance @param day optional day instance @return working hours """ ProjectCalendarDateRanges ranges = getExcepti...
java
private ProjectCalendarDateRanges getRanges(Date date, Calendar cal, Day day) { ProjectCalendarDateRanges ranges = getException(date); if (ranges == null) { ProjectCalendarWeek week = getWorkWeek(date); if (week == null) { week = this; } if ...
[ "private", "ProjectCalendarDateRanges", "getRanges", "(", "Date", "date", ",", "Calendar", "cal", ",", "Day", "day", ")", "{", "ProjectCalendarDateRanges", "ranges", "=", "getException", "(", "date", ")", ";", "if", "(", "ranges", "==", "null", ")", "{", "Pr...
Retrieves the working hours on the given date. @param date required date @param cal optional calendar instance @param day optional day instance @return working hours
[ "Retrieves", "the", "working", "hours", "on", "the", "given", "date", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/ProjectCalendar.java#L1886-L1910
OpenLiberty/open-liberty
dev/com.ibm.ws.security.csiv2/src/com/ibm/ws/security/csiv2/server/config/tss/ServerConfigHelper.java
ServerConfigHelper.extractSSLTransport
private TSSTransportMechConfig extractSSLTransport(Map<String, Object> transportLayerProperties, Map<String, List<TransportAddress>> addrMap) throws SSLException { """ /* This method extract the fields corresponding to TAG_TLS_SEC_TRANS. Referring to CORBA spec, this corresponds to a TaggedComponent, and have st...
java
private TSSTransportMechConfig extractSSLTransport(Map<String, Object> transportLayerProperties, Map<String, List<TransportAddress>> addrMap) throws SSLException { String sslAliasName = (String) transportLayerProperties.get(KEY_SSL_REF); if (sslAliasName == null) sslAliasName = defaultAlias;...
[ "private", "TSSTransportMechConfig", "extractSSLTransport", "(", "Map", "<", "String", ",", "Object", ">", "transportLayerProperties", ",", "Map", "<", "String", ",", "List", "<", "TransportAddress", ">", ">", "addrMap", ")", "throws", "SSLException", "{", "String...
/* This method extract the fields corresponding to TAG_TLS_SEC_TRANS. Referring to CORBA spec, this corresponds to a TaggedComponent, and have structure as below. struct TLS_SEC_TRANS { ----AssociationOptions target_supports; ----AssociationOptions target_requires; ----TransportAddressList addresses; }; and struct T...
[ "/", "*", "This", "method", "extract", "the", "fields", "corresponding", "to", "TAG_TLS_SEC_TRANS", ".", "Referring", "to", "CORBA", "spec", "this", "corresponds", "to", "a", "TaggedComponent", "and", "have", "structure", "as", "below", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.security.csiv2/src/com/ibm/ws/security/csiv2/server/config/tss/ServerConfigHelper.java#L206-L228
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/VersionsImpl.java
VersionsImpl.updateWithServiceResponseAsync
public Observable<ServiceResponse<OperationStatus>> updateWithServiceResponseAsync(UUID appId, String versionId, UpdateVersionsOptionalParameter updateOptionalParameter) { """ Updates the name or description of the application version. @param appId The application ID. @param versionId The version ID. @param u...
java
public Observable<ServiceResponse<OperationStatus>> updateWithServiceResponseAsync(UUID appId, String versionId, UpdateVersionsOptionalParameter updateOptionalParameter) { if (this.client.endpoint() == null) { throw new IllegalArgumentException("Parameter this.client.endpoint() is required and canno...
[ "public", "Observable", "<", "ServiceResponse", "<", "OperationStatus", ">", ">", "updateWithServiceResponseAsync", "(", "UUID", "appId", ",", "String", "versionId", ",", "UpdateVersionsOptionalParameter", "updateOptionalParameter", ")", "{", "if", "(", "this", ".", "...
Updates the name or description of the application version. @param appId The application ID. @param versionId The version ID. @param updateOptionalParameter the object representing the optional parameters to be set before calling this API @throws IllegalArgumentException thrown if parameters fail the validation @retur...
[ "Updates", "the", "name", "or", "description", "of", "the", "application", "version", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/VersionsImpl.java#L580-L593
javagl/Common
src/main/java/de/javagl/common/xml/XmlUtils.java
XmlUtils.verifyNode
public static void verifyNode(Node node, String expected) { """ Verify that the given node is not <code>null</code>, and that its name matches the expected tag name (ignoring upper/lowercase), and throw an XmlException if this is not the case. @param node The node @param expected The expected tag name @thro...
java
public static void verifyNode(Node node, String expected) { if (node == null) { throw new XmlException( "Did not find <"+expected+"> node"); } if (!node.getNodeName().equalsIgnoreCase(expected)) { throw new XmlException( ...
[ "public", "static", "void", "verifyNode", "(", "Node", "node", ",", "String", "expected", ")", "{", "if", "(", "node", "==", "null", ")", "{", "throw", "new", "XmlException", "(", "\"Did not find <\"", "+", "expected", "+", "\"> node\"", ")", ";", "}", "...
Verify that the given node is not <code>null</code>, and that its name matches the expected tag name (ignoring upper/lowercase), and throw an XmlException if this is not the case. @param node The node @param expected The expected tag name @throws XmlException If the node is <code>null</code>, or the node name does not...
[ "Verify", "that", "the", "given", "node", "is", "not", "<code", ">", "null<", "/", "code", ">", "and", "that", "its", "name", "matches", "the", "expected", "tag", "name", "(", "ignoring", "upper", "/", "lowercase", ")", "and", "throw", "an", "XmlExceptio...
train
https://github.com/javagl/Common/blob/5a4876b48c3a2dc61d21324733cf37512d721c33/src/main/java/de/javagl/common/xml/XmlUtils.java#L438-L451
Azure/azure-sdk-for-java
cosmosdb/resource-manager/v2015_04_08/src/main/java/com/microsoft/azure/management/cosmosdb/v2015_04_08/implementation/DatabaseAccountsInner.java
DatabaseAccountsInner.listKeysAsync
public Observable<DatabaseAccountListKeysResultInner> listKeysAsync(String resourceGroupName, String accountName) { """ Lists the access keys for the specified Azure Cosmos DB database account. @param resourceGroupName Name of an Azure resource group. @param accountName Cosmos DB database account name. @throw...
java
public Observable<DatabaseAccountListKeysResultInner> listKeysAsync(String resourceGroupName, String accountName) { return listKeysWithServiceResponseAsync(resourceGroupName, accountName).map(new Func1<ServiceResponse<DatabaseAccountListKeysResultInner>, DatabaseAccountListKeysResultInner>() { @Over...
[ "public", "Observable", "<", "DatabaseAccountListKeysResultInner", ">", "listKeysAsync", "(", "String", "resourceGroupName", ",", "String", "accountName", ")", "{", "return", "listKeysWithServiceResponseAsync", "(", "resourceGroupName", ",", "accountName", ")", ".", "map"...
Lists the access keys for the specified Azure Cosmos DB database account. @param resourceGroupName Name of an Azure resource group. @param accountName Cosmos DB database account name. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the DatabaseAccountListKeysResultIn...
[ "Lists", "the", "access", "keys", "for", "the", "specified", "Azure", "Cosmos", "DB", "database", "account", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cosmosdb/resource-manager/v2015_04_08/src/main/java/com/microsoft/azure/management/cosmosdb/v2015_04_08/implementation/DatabaseAccountsInner.java#L1137-L1144
WorldwideAntimalarialResistanceNetwork/WWARN-Maps-Surveyor
MapCore/src/main/java/org/wwarn/mapcore/client/components/customwidgets/facet/FacetListBoxWidget.java
FacetListBoxWidget.ifEmptyUseDefault
private String ifEmptyUseDefault(String firstValue, String defaultValue) { """ /*public FacetListBoxWidget(String facetField, String facetTitle, String facetLabel, int visibleIntColumn) { this(facetField,facetTitle,facetLabel); this.listBox.setVisibleItemCount(visibleIntColumn); } """ return StringU...
java
private String ifEmptyUseDefault(String firstValue, String defaultValue) { return StringUtils.ifEmpty(firstValue, defaultValue); }
[ "private", "String", "ifEmptyUseDefault", "(", "String", "firstValue", ",", "String", "defaultValue", ")", "{", "return", "StringUtils", ".", "ifEmpty", "(", "firstValue", ",", "defaultValue", ")", ";", "}" ]
/*public FacetListBoxWidget(String facetField, String facetTitle, String facetLabel, int visibleIntColumn) { this(facetField,facetTitle,facetLabel); this.listBox.setVisibleItemCount(visibleIntColumn); }
[ "/", "*", "public", "FacetListBoxWidget", "(", "String", "facetField", "String", "facetTitle", "String", "facetLabel", "int", "visibleIntColumn", ")", "{", "this", "(", "facetField", "facetTitle", "facetLabel", ")", ";", "this", ".", "listBox", ".", "setVisibleIte...
train
https://github.com/WorldwideAntimalarialResistanceNetwork/WWARN-Maps-Surveyor/blob/224280bcd6e8045bda6b673584caf0aea5e4c841/MapCore/src/main/java/org/wwarn/mapcore/client/components/customwidgets/facet/FacetListBoxWidget.java#L112-L114
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/subordinate/SubordinateControlHelper.java
SubordinateControlHelper.applyRegisteredControls
public static void applyRegisteredControls(final Request request, final boolean useRequestValues) { """ Apply the registered Subordinate Controls. @param request the request being processed. @param useRequestValues the flag to indicate the controls should use values from the request. """ Set<String> con...
java
public static void applyRegisteredControls(final Request request, final boolean useRequestValues) { Set<String> controls = getRegisteredSubordinateControls(); if (controls == null) { return; } // Process Controls for (String controlId : controls) { // Find the Component for this ID ComponentWithCon...
[ "public", "static", "void", "applyRegisteredControls", "(", "final", "Request", "request", ",", "final", "boolean", "useRequestValues", ")", "{", "Set", "<", "String", ">", "controls", "=", "getRegisteredSubordinateControls", "(", ")", ";", "if", "(", "controls", ...
Apply the registered Subordinate Controls. @param request the request being processed. @param useRequestValues the flag to indicate the controls should use values from the request.
[ "Apply", "the", "registered", "Subordinate", "Controls", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/subordinate/SubordinateControlHelper.java#L73-L111
UrielCh/ovh-java-sdk
ovh-java-sdk-deskaas/src/main/java/net/minidev/ovh/api/ApiOvhDeskaas.java
ApiOvhDeskaas.serviceName_upgrade_POST
public OvhTask serviceName_upgrade_POST(String serviceName, String newReference, String planCode) throws IOException { """ Upgrading the Desktop As A Service to another profile. The Virtual Desktop will not be available during upgrade and has to be restarted. You cannot downgrade a Virtual Desktop REST: POST /d...
java
public OvhTask serviceName_upgrade_POST(String serviceName, String newReference, String planCode) throws IOException { String qPath = "/deskaas/{serviceName}/upgrade"; StringBuilder sb = path(qPath, serviceName); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "newReference", newReference);...
[ "public", "OvhTask", "serviceName_upgrade_POST", "(", "String", "serviceName", ",", "String", "newReference", ",", "String", "planCode", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/deskaas/{serviceName}/upgrade\"", ";", "StringBuilder", "sb", "=", "...
Upgrading the Desktop As A Service to another profile. The Virtual Desktop will not be available during upgrade and has to be restarted. You cannot downgrade a Virtual Desktop REST: POST /deskaas/{serviceName}/upgrade @param planCode [required] New plan of Desktop As A Service @param newReference [required] New refere...
[ "Upgrading", "the", "Desktop", "As", "A", "Service", "to", "another", "profile", ".", "The", "Virtual", "Desktop", "will", "not", "be", "available", "during", "upgrade", "and", "has", "to", "be", "restarted", ".", "You", "cannot", "downgrade", "a", "Virtual"...
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-deskaas/src/main/java/net/minidev/ovh/api/ApiOvhDeskaas.java#L124-L132
bbossgroups/bboss-elasticsearch
bboss-elasticsearch-rest/src/main/java/org/frameworkset/elasticsearch/client/RestClientUtil.java
RestClientUtil.updateDocument
public String updateDocument(String index, Object id, Map params, String refreshOption) throws ElasticSearchException { """ 根据路径更新文档 For Elasticsearch 7 and 7+ https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update.html @param index test/_doc/1 test/_update/1 @param id @param params @p...
java
public String updateDocument(String index, Object id, Map params, String refreshOption) throws ElasticSearchException{ return updateDocument( index, (String)null, id, params, refreshOption); }
[ "public", "String", "updateDocument", "(", "String", "index", ",", "Object", "id", ",", "Map", "params", ",", "String", "refreshOption", ")", "throws", "ElasticSearchException", "{", "return", "updateDocument", "(", "index", ",", "(", "String", ")", "null", ",...
根据路径更新文档 For Elasticsearch 7 and 7+ https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update.html @param index test/_doc/1 test/_update/1 @param id @param params @param refreshOption refresh=wait_for refresh=false refresh=true refresh Empty string or true Refresh the relevant primary and replica shar...
[ "根据路径更新文档", "For", "Elasticsearch", "7", "and", "7", "+", "https", ":", "//", "www", ".", "elastic", ".", "co", "/", "guide", "/", "en", "/", "elasticsearch", "/", "reference", "/", "current", "/", "docs", "-", "update", ".", "html", "@param", "index",...
train
https://github.com/bbossgroups/bboss-elasticsearch/blob/31717c8aa2c4c880987be53aeeb8a0cf5183c3a7/bboss-elasticsearch-rest/src/main/java/org/frameworkset/elasticsearch/client/RestClientUtil.java#L4181-L4183
Mozu/mozu-java
mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/CartUrl.java
CartUrl.getCartUrl
public static MozuUrl getCartUrl(String cartId, String responseFields) { """ Get Resource Url for GetCart @param cartId Identifier of the cart to delete. @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should ...
java
public static MozuUrl getCartUrl(String cartId, String responseFields) { UrlFormatter formatter = new UrlFormatter("/api/commerce/carts/{cartId}?responseFields={responseFields}"); formatter.formatUrl("cartId", cartId); formatter.formatUrl("responseFields", responseFields); return new MozuUrl(formatter.get...
[ "public", "static", "MozuUrl", "getCartUrl", "(", "String", "cartId", ",", "String", "responseFields", ")", "{", "UrlFormatter", "formatter", "=", "new", "UrlFormatter", "(", "\"/api/commerce/carts/{cartId}?responseFields={responseFields}\"", ")", ";", "formatter", ".", ...
Get Resource Url for GetCart @param cartId Identifier of the cart to delete. @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may ca...
[ "Get", "Resource", "Url", "for", "GetCart" ]
train
https://github.com/Mozu/mozu-java/blob/5beadde73601a859f845e3e2fc1077b39c8bea83/mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/CartUrl.java#L22-L28
Appendium/flatpack
flatpack/src/main/java/net/sf/flatpack/brparse/BuffReaderDelimParser.java
BuffReaderDelimParser.buildRow
@Override public Row buildRow(final DefaultDataSet ds) { """ Reads in the next record on the file and return a row @param ds @return Row """ /** loop through each line in the file */ while (true) { String line; try { line = fetchNextRecord(b...
java
@Override public Row buildRow(final DefaultDataSet ds) { /** loop through each line in the file */ while (true) { String line; try { line = fetchNextRecord(br, getQualifier(), getDelimiter()); } catch (final IOException e) { ...
[ "@", "Override", "public", "Row", "buildRow", "(", "final", "DefaultDataSet", "ds", ")", "{", "/** loop through each line in the file */", "while", "(", "true", ")", "{", "String", "line", ";", "try", "{", "line", "=", "fetchNextRecord", "(", "br", ",", "getQu...
Reads in the next record on the file and return a row @param ds @return Row
[ "Reads", "in", "the", "next", "record", "on", "the", "file", "and", "return", "a", "row" ]
train
https://github.com/Appendium/flatpack/blob/5e09875d97db7038e3ba6af9468f5313d99b0082/flatpack/src/main/java/net/sf/flatpack/brparse/BuffReaderDelimParser.java#L112-L150