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
aws/aws-sdk-java
aws-java-sdk-connect/src/main/java/com/amazonaws/services/connect/model/GetContactAttributesResult.java
GetContactAttributesResult.withAttributes
public GetContactAttributesResult withAttributes(java.util.Map<String, String> attributes) { """ <p> The attributes to update. </p> @param attributes The attributes to update. @return Returns a reference to this object so that method calls can be chained together. """ setAttributes(attributes); ...
java
public GetContactAttributesResult withAttributes(java.util.Map<String, String> attributes) { setAttributes(attributes); return this; }
[ "public", "GetContactAttributesResult", "withAttributes", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "attributes", ")", "{", "setAttributes", "(", "attributes", ")", ";", "return", "this", ";", "}" ]
<p> The attributes to update. </p> @param attributes The attributes to update. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "The", "attributes", "to", "update", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-connect/src/main/java/com/amazonaws/services/connect/model/GetContactAttributesResult.java#L68-L71
GoogleCloudPlatform/bigdata-interop
util/src/main/java/com/google/cloud/hadoop/util/ApiErrorExtractor.java
ApiErrorExtractor.recursiveCheckForCode
protected boolean recursiveCheckForCode(Throwable e, int code) { """ Recursively checks getCause() if outer exception isn't an instance of the correct class. """ GoogleJsonResponseException jsonException = getJsonResponseExceptionOrNull(e); if (jsonException != null) { return getHttpStatusCode(j...
java
protected boolean recursiveCheckForCode(Throwable e, int code) { GoogleJsonResponseException jsonException = getJsonResponseExceptionOrNull(e); if (jsonException != null) { return getHttpStatusCode(jsonException) == code; } return false; }
[ "protected", "boolean", "recursiveCheckForCode", "(", "Throwable", "e", ",", "int", "code", ")", "{", "GoogleJsonResponseException", "jsonException", "=", "getJsonResponseExceptionOrNull", "(", "e", ")", ";", "if", "(", "jsonException", "!=", "null", ")", "{", "re...
Recursively checks getCause() if outer exception isn't an instance of the correct class.
[ "Recursively", "checks", "getCause", "()", "if", "outer", "exception", "isn", "t", "an", "instance", "of", "the", "correct", "class", "." ]
train
https://github.com/GoogleCloudPlatform/bigdata-interop/blob/918d91c80a63e36046edb28972a5c65d3326a858/util/src/main/java/com/google/cloud/hadoop/util/ApiErrorExtractor.java#L463-L469
bbossgroups/bboss-elasticsearch
bboss-elasticsearch-rest/src/main/java/org/frameworkset/elasticsearch/client/ConfigRestClientUtil.java
ConfigRestClientUtil.executeHttp
public String executeHttp(String path, String templateName,Map params, String action) throws ElasticSearchException { """ 发送es restful请求,获取String类型json报文 @param path @param templateName 请求报文 @param action get,post,put,delete @return @throws ElasticSearchException """ return super.executeHttp( path, EST...
java
public String executeHttp(String path, String templateName,Map params, String action) throws ElasticSearchException{ return super.executeHttp( path, ESTemplateHelper.evalTemplate(esUtil,templateName, params), action); }
[ "public", "String", "executeHttp", "(", "String", "path", ",", "String", "templateName", ",", "Map", "params", ",", "String", "action", ")", "throws", "ElasticSearchException", "{", "return", "super", ".", "executeHttp", "(", "path", ",", "ESTemplateHelper", "."...
发送es restful请求,获取String类型json报文 @param path @param templateName 请求报文 @param action get,post,put,delete @return @throws ElasticSearchException
[ "发送es", "restful请求,获取String类型json报文" ]
train
https://github.com/bbossgroups/bboss-elasticsearch/blob/31717c8aa2c4c880987be53aeeb8a0cf5183c3a7/bboss-elasticsearch-rest/src/main/java/org/frameworkset/elasticsearch/client/ConfigRestClientUtil.java#L367-L369
xhsun/gw2wrapper
src/main/java/me/xhsun/guildwars2wrapper/SynchronousRequest.java
SynchronousRequest.getQuagganInfo
public List<Map<String, String>> getQuagganInfo(String[] ids) throws GuildWars2Exception { """ For more info on quaggans API go <a href="https://wiki.guildwars2.com/wiki/API:2/quaggans">here</a><br/> @param ids list of quaggan id(s) @return list of map of id and url @throws GuildWars2Exception see {@link Erro...
java
public List<Map<String, String>> getQuagganInfo(String[] ids) throws GuildWars2Exception { isParamValid(new ParamChecker(ids)); try { Response<List<Map<String, String>>> response = gw2API.getQuagganInfo(processIds(ids)).execute(); if (!response.isSuccessful()) throwError(response.code(), response.errorBody())...
[ "public", "List", "<", "Map", "<", "String", ",", "String", ">", ">", "getQuagganInfo", "(", "String", "[", "]", "ids", ")", "throws", "GuildWars2Exception", "{", "isParamValid", "(", "new", "ParamChecker", "(", "ids", ")", ")", ";", "try", "{", "Respons...
For more info on quaggans API go <a href="https://wiki.guildwars2.com/wiki/API:2/quaggans">here</a><br/> @param ids list of quaggan id(s) @return list of map of id and url @throws GuildWars2Exception see {@link ErrorCode} for detail
[ "For", "more", "info", "on", "quaggans", "API", "go", "<a", "href", "=", "https", ":", "//", "wiki", ".", "guildwars2", ".", "com", "/", "wiki", "/", "API", ":", "2", "/", "quaggans", ">", "here<", "/", "a", ">", "<br", "/", ">" ]
train
https://github.com/xhsun/gw2wrapper/blob/c8a43b51f363b032074fb152ee6efe657e33e525/src/main/java/me/xhsun/guildwars2wrapper/SynchronousRequest.java#L2993-L3002
drewnoakes/metadata-extractor
Source/com/drew/metadata/eps/EpsReader.java
EpsReader.extractIccData
private static void extractIccData(@NotNull final Metadata metadata, @NotNull SequentialReader reader) throws IOException { """ Decodes a commented hex section, and uses {@link IccReader} to decode the resulting data. """ byte[] buffer = decodeHexCommentBlock(reader); if (buffer != null) ...
java
private static void extractIccData(@NotNull final Metadata metadata, @NotNull SequentialReader reader) throws IOException { byte[] buffer = decodeHexCommentBlock(reader); if (buffer != null) new IccReader().extract(new ByteArrayReader(buffer), metadata); }
[ "private", "static", "void", "extractIccData", "(", "@", "NotNull", "final", "Metadata", "metadata", ",", "@", "NotNull", "SequentialReader", "reader", ")", "throws", "IOException", "{", "byte", "[", "]", "buffer", "=", "decodeHexCommentBlock", "(", "reader", ")...
Decodes a commented hex section, and uses {@link IccReader} to decode the resulting data.
[ "Decodes", "a", "commented", "hex", "section", "and", "uses", "{" ]
train
https://github.com/drewnoakes/metadata-extractor/blob/a958e0b61b50e590731b3be1dca8df8e21ebd43c/Source/com/drew/metadata/eps/EpsReader.java#L243-L249
devnied/Bit-lib4j
src/main/java/fr/devnied/bitlib/BytesUtils.java
BytesUtils.matchBitByBitIndex
public static boolean matchBitByBitIndex(final int pVal, final int pBitIndex) { """ Test if bit at given index of given value is = 1. @param pVal value to test @param pBitIndex bit index between 0 and 31 @return true bit at given index of give value is = 1 """ if (pBitIndex < 0 || pBitIndex > MAX_BIT...
java
public static boolean matchBitByBitIndex(final int pVal, final int pBitIndex) { if (pBitIndex < 0 || pBitIndex > MAX_BIT_INTEGER) { throw new IllegalArgumentException( "parameter 'pBitIndex' must be between 0 and 31. pBitIndex=" + pBitIndex); } return (pVal & 1 << pBitIndex) != 0; }
[ "public", "static", "boolean", "matchBitByBitIndex", "(", "final", "int", "pVal", ",", "final", "int", "pBitIndex", ")", "{", "if", "(", "pBitIndex", "<", "0", "||", "pBitIndex", ">", "MAX_BIT_INTEGER", ")", "{", "throw", "new", "IllegalArgumentException", "("...
Test if bit at given index of given value is = 1. @param pVal value to test @param pBitIndex bit index between 0 and 31 @return true bit at given index of give value is = 1
[ "Test", "if", "bit", "at", "given", "index", "of", "given", "value", "is", "=", "1", "." ]
train
https://github.com/devnied/Bit-lib4j/blob/bdfa79fd12e7e3d5cf1196291825ef1bb12a1ee0/src/main/java/fr/devnied/bitlib/BytesUtils.java#L246-L252
jqm4gwt/jqm4gwt
library/src/main/java/com/sksamuel/jqm4gwt/html/CustomFlowPanel.java
CustomFlowPanel.adoptExternal
public static CustomFlowPanel adoptExternal(ComplexPanel parentPanel, Element externalChild) { """ The same as ComplexPanel.add(child, container), but without physical DOM.appendChild() attach. @param parentPanel - depends on externalChild placement in DOM, in most of the cases it should be RootPanel.get() ...
java
public static CustomFlowPanel adoptExternal(ComplexPanel parentPanel, Element externalChild) { if (parentPanel == null || externalChild == null) return null; CustomFlowPanel rslt = new CustomFlowPanel(externalChild); WidgetCollection children = getChildren(parentPanel); children.add(rslt...
[ "public", "static", "CustomFlowPanel", "adoptExternal", "(", "ComplexPanel", "parentPanel", ",", "Element", "externalChild", ")", "{", "if", "(", "parentPanel", "==", "null", "||", "externalChild", "==", "null", ")", "return", "null", ";", "CustomFlowPanel", "rslt...
The same as ComplexPanel.add(child, container), but without physical DOM.appendChild() attach. @param parentPanel - depends on externalChild placement in DOM, in most of the cases it should be RootPanel.get()
[ "The", "same", "as", "ComplexPanel", ".", "add", "(", "child", "container", ")", "but", "without", "physical", "DOM", ".", "appendChild", "()", "attach", "." ]
train
https://github.com/jqm4gwt/jqm4gwt/blob/cf59958e9ba6d4b70f42507b2c77f10c2465085b/library/src/main/java/com/sksamuel/jqm4gwt/html/CustomFlowPanel.java#L101-L108
amilcar-sr/JustifiedTextView
library/src/main/java/com/codesgood/views/JustifiedTextView.java
JustifiedTextView.getSentenceFromList
private String getSentenceFromList(List<String> strings, boolean addSpaces) { """ Creates a string using the words in the list and adds spaces between words if required. @param strings Strings to be merged into one @param addSpaces Specifies if the method should add spaces between words. @return Returns a s...
java
private String getSentenceFromList(List<String> strings, boolean addSpaces) { StringBuilder stringBuilder = new StringBuilder(); for (String string : strings) { stringBuilder.append(string); if (addSpaces) { stringBuilder.append(NORMAL_SPACE); } ...
[ "private", "String", "getSentenceFromList", "(", "List", "<", "String", ">", "strings", ",", "boolean", "addSpaces", ")", "{", "StringBuilder", "stringBuilder", "=", "new", "StringBuilder", "(", ")", ";", "for", "(", "String", "string", ":", "strings", ")", ...
Creates a string using the words in the list and adds spaces between words if required. @param strings Strings to be merged into one @param addSpaces Specifies if the method should add spaces between words. @return Returns a sentence using the words in the list.
[ "Creates", "a", "string", "using", "the", "words", "in", "the", "list", "and", "adds", "spaces", "between", "words", "if", "required", "." ]
train
https://github.com/amilcar-sr/JustifiedTextView/blob/8fd91b4cfb225f973096519eae8295c3d7e8d49f/library/src/main/java/com/codesgood/views/JustifiedTextView.java#L151-L163
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/SignatureFileVerifier.java
SignatureFileVerifier.getSigners
private CodeSigner[] getSigners(SignerInfo infos[], PKCS7 block) throws IOException, NoSuchAlgorithmException, SignatureException, CertificateException { """ Given the PKCS7 block and SignerInfo[], create an array of CodeSigner objects. We do this only *once* for a given signature block file....
java
private CodeSigner[] getSigners(SignerInfo infos[], PKCS7 block) throws IOException, NoSuchAlgorithmException, SignatureException, CertificateException { ArrayList<CodeSigner> signers = null; for (int i = 0; i < infos.length; i++) { SignerInfo info = infos[i]; ...
[ "private", "CodeSigner", "[", "]", "getSigners", "(", "SignerInfo", "infos", "[", "]", ",", "PKCS7", "block", ")", "throws", "IOException", ",", "NoSuchAlgorithmException", ",", "SignatureException", ",", "CertificateException", "{", "ArrayList", "<", "CodeSigner", ...
Given the PKCS7 block and SignerInfo[], create an array of CodeSigner objects. We do this only *once* for a given signature block file.
[ "Given", "the", "PKCS7", "block", "and", "SignerInfo", "[]", "create", "an", "array", "of", "CodeSigner", "objects", ".", "We", "do", "this", "only", "*", "once", "*", "for", "a", "given", "signature", "block", "file", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/sun/security/util/SignatureFileVerifier.java#L473-L501
Kickflip/kickflip-android-sdk
sdk/src/main/java/io/kickflip/sdk/Util.java
Util.create420pSessionConfig
public static SessionConfig create420pSessionConfig(Context context, String targer) { """ Create a {@link io.kickflip.sdk.av.SessionConfig} corresponding to a 420p video stream @param context the host application Context. Used to access Internal Storage @return the resulting SessionConfig """ Stri...
java
public static SessionConfig create420pSessionConfig(Context context, String targer) { String outputPath = new File(context.getFilesDir(), "index.m3u8").getAbsolutePath(); SessionConfig config = new SessionConfig.Builder(outputPath) .withTitle(Util.getHumanDateString()) .w...
[ "public", "static", "SessionConfig", "create420pSessionConfig", "(", "Context", "context", ",", "String", "targer", ")", "{", "String", "outputPath", "=", "new", "File", "(", "context", ".", "getFilesDir", "(", ")", ",", "\"index.m3u8\"", ")", ".", "getAbsoluteP...
Create a {@link io.kickflip.sdk.av.SessionConfig} corresponding to a 420p video stream @param context the host application Context. Used to access Internal Storage @return the resulting SessionConfig
[ "Create", "a", "{", "@link", "io", ".", "kickflip", ".", "sdk", ".", "av", ".", "SessionConfig", "}", "corresponding", "to", "a", "420p", "video", "stream" ]
train
https://github.com/Kickflip/kickflip-android-sdk/blob/af3aae5f1128d7376e67aefe11a3a1a3844be734/sdk/src/main/java/io/kickflip/sdk/Util.java#L80-L90
lessthanoptimal/BoofCV
main/boofcv-sfm/src/main/java/boofcv/alg/sfm/structure/ThreeViewEstimateMetricScene.java
ThreeViewEstimateMetricScene.robustFitTrifocal
private boolean robustFitTrifocal(List<AssociatedTriple> associated) { """ Fits a trifocal tensor to the list of matches features using a robust method """ // Fit a trifocal tensor to the observations robustly ransac.process(associated); inliers = ransac.getMatchSet(); TrifocalTensor model = ransac.ge...
java
private boolean robustFitTrifocal(List<AssociatedTriple> associated) { // Fit a trifocal tensor to the observations robustly ransac.process(associated); inliers = ransac.getMatchSet(); TrifocalTensor model = ransac.getModelParameters(); if( verbose != null ) verbose.println("Remaining after RANSAC "+inlie...
[ "private", "boolean", "robustFitTrifocal", "(", "List", "<", "AssociatedTriple", ">", "associated", ")", "{", "// Fit a trifocal tensor to the observations robustly", "ransac", ".", "process", "(", "associated", ")", ";", "inliers", "=", "ransac", ".", "getMatchSet", ...
Fits a trifocal tensor to the list of matches features using a robust method
[ "Fits", "a", "trifocal", "tensor", "to", "the", "list", "of", "matches", "features", "using", "a", "robust", "method" ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-sfm/src/main/java/boofcv/alg/sfm/structure/ThreeViewEstimateMetricScene.java#L195-L213
alkacon/opencms-core
src/org/opencms/workplace/tools/CmsToolMacroResolver.java
CmsToolMacroResolver.resolveMacros
public static String resolveMacros(String input, CmsWorkplace wp) { """ Resolves the macros in the given input using the provided parameters.<p> A macro in the form <code>${key}</code> in the content is replaced with it's assigned value returned by the <code>{@link I_CmsMacroResolver#getMacroValue(String)}</co...
java
public static String resolveMacros(String input, CmsWorkplace wp) { return new CmsToolMacroResolver(wp).resolveMacros(input); }
[ "public", "static", "String", "resolveMacros", "(", "String", "input", ",", "CmsWorkplace", "wp", ")", "{", "return", "new", "CmsToolMacroResolver", "(", "wp", ")", ".", "resolveMacros", "(", "input", ")", ";", "}" ]
Resolves the macros in the given input using the provided parameters.<p> A macro in the form <code>${key}</code> in the content is replaced with it's assigned value returned by the <code>{@link I_CmsMacroResolver#getMacroValue(String)}</code> method of the given <code>{@link I_CmsMacroResolver}</code> instance.<p> If...
[ "Resolves", "the", "macros", "in", "the", "given", "input", "using", "the", "provided", "parameters", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/workplace/tools/CmsToolMacroResolver.java#L124-L127
aws/aws-sdk-java
src/samples/AmazonEC2SpotInstances-Advanced/GettingStartedApp.java
GettingStartedApp.main
public static void main(String[] args) throws Exception { """ /* Before running the code: Fill in your AWS access credentials in the provided credentials file template, and be sure to move the file to the default location (~/.aws/credentials) where the sample code will load the credentials from. https://cons...
java
public static void main(String[] args) throws Exception { System.out.println("==========================================="); System.out.println("Welcome to the AWS Java SDK!"); System.out.println("==========================================="); /* * Amazon EC2 ...
[ "public", "static", "void", "main", "(", "String", "[", "]", "args", ")", "throws", "Exception", "{", "System", ".", "out", ".", "println", "(", "\"===========================================\"", ")", ";", "System", ".", "out", ".", "println", "(", "\"Welcome ...
/* Before running the code: Fill in your AWS access credentials in the provided credentials file template, and be sure to move the file to the default location (~/.aws/credentials) where the sample code will load the credentials from. https://console.aws.amazon.com/iam/home?#security_credential WARNING: To avoid accid...
[ "/", "*", "Before", "running", "the", "code", ":", "Fill", "in", "your", "AWS", "access", "credentials", "in", "the", "provided", "credentials", "file", "template", "and", "be", "sure", "to", "move", "the", "file", "to", "the", "default", "location", "(", ...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/src/samples/AmazonEC2SpotInstances-Advanced/GettingStartedApp.java#L57-L125
carrotsearch/hppc
hppc/src/main/templates/com/carrotsearch/hppc/KTypeVTypeHashMap.java
KTypeVTypeHashMap.putOrAdd
@Override public VType putOrAdd(KType key, VType putValue, VType incrementValue) { """ If <code>key</code> exists, <code>putValue</code> is inserted into the map, otherwise any existing value is incremented by <code>additionValue</code>. @param key The key of the value to adjust. @param putValue The value...
java
@Override public VType putOrAdd(KType key, VType putValue, VType incrementValue) { assert assigned < mask + 1; int keyIndex = indexOf(key); if (indexExists(keyIndex)) { putValue = Intrinsics.<VType> add(Intrinsics.<VType> cast(values[keyIndex]), incrementValue); indexReplace(keyIndex, putValu...
[ "@", "Override", "public", "VType", "putOrAdd", "(", "KType", "key", ",", "VType", "putValue", ",", "VType", "incrementValue", ")", "{", "assert", "assigned", "<", "mask", "+", "1", ";", "int", "keyIndex", "=", "indexOf", "(", "key", ")", ";", "if", "(...
If <code>key</code> exists, <code>putValue</code> is inserted into the map, otherwise any existing value is incremented by <code>additionValue</code>. @param key The key of the value to adjust. @param putValue The value to put if <code>key</code> does not exist. @param incrementValue The value to add to the existing v...
[ "If", "<code", ">", "key<", "/", "code", ">", "exists", "<code", ">", "putValue<", "/", "code", ">", "is", "inserted", "into", "the", "map", "otherwise", "any", "existing", "value", "is", "incremented", "by", "<code", ">", "additionValue<", "/", "code", ...
train
https://github.com/carrotsearch/hppc/blob/e359e9da358e846fcbffc64a765611df954ba3f6/hppc/src/main/templates/com/carrotsearch/hppc/KTypeVTypeHashMap.java#L251-L263
elki-project/elki
elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/hierarchical/SLINKHDBSCANLinearMemory.java
SLINKHDBSCANLinearMemory.step3
private void step3(DBIDRef id, WritableDBIDDataStore pi, WritableDoubleDataStore lambda, DBIDs processedIDs, WritableDoubleDataStore m) { """ Third step: Determine the values for P and L @param id the id of the object to be inserted into the pointer representation @param pi Pi data store @param lambda Lambda...
java
private void step3(DBIDRef id, WritableDBIDDataStore pi, WritableDoubleDataStore lambda, DBIDs processedIDs, WritableDoubleDataStore m) { DBIDVar p_i = DBIDUtil.newVar(); // for i = 1..n for(DBIDIter it = processedIDs.iter(); it.valid(); it.advance()) { double l_i = lambda.doubleValue(it); doubl...
[ "private", "void", "step3", "(", "DBIDRef", "id", ",", "WritableDBIDDataStore", "pi", ",", "WritableDoubleDataStore", "lambda", ",", "DBIDs", "processedIDs", ",", "WritableDoubleDataStore", "m", ")", "{", "DBIDVar", "p_i", "=", "DBIDUtil", ".", "newVar", "(", ")...
Third step: Determine the values for P and L @param id the id of the object to be inserted into the pointer representation @param pi Pi data store @param lambda Lambda data store @param processedIDs the already processed ids @param m Data store
[ "Third", "step", ":", "Determine", "the", "values", "for", "P", "and", "L" ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/hierarchical/SLINKHDBSCANLinearMemory.java#L176-L205
lessthanoptimal/BoofCV
integration/boofcv-android/examples/video/app/src/main/java/org/boofcv/video/GradientActivity.java
GradientActivity.configureCamera
@Override protected void configureCamera(CameraDevice device, CameraCharacteristics characteristics, CaptureRequest.Builder captureRequestBuilder) { """ This is where you specify custom camera settings. See {@link boofcv.android.camera2.SimpleCamera2Activity}'s JavaDoc for more funcitons which you can override. ...
java
@Override protected void configureCamera(CameraDevice device, CameraCharacteristics characteristics, CaptureRequest.Builder captureRequestBuilder) { captureRequestBuilder.set(CaptureRequest.CONTROL_AF_MODE, CaptureRequest.CONTROL_AF_MODE_CONTINUOUS_VIDEO); captureRequestBuilder.set(CaptureRequest.CONTROL_AE_MODE, ...
[ "@", "Override", "protected", "void", "configureCamera", "(", "CameraDevice", "device", ",", "CameraCharacteristics", "characteristics", ",", "CaptureRequest", ".", "Builder", "captureRequestBuilder", ")", "{", "captureRequestBuilder", ".", "set", "(", "CaptureRequest", ...
This is where you specify custom camera settings. See {@link boofcv.android.camera2.SimpleCamera2Activity}'s JavaDoc for more funcitons which you can override. @param captureRequestBuilder Used to configure the camera.
[ "This", "is", "where", "you", "specify", "custom", "camera", "settings", ".", "See", "{", "@link", "boofcv", ".", "android", ".", "camera2", ".", "SimpleCamera2Activity", "}", "s", "JavaDoc", "for", "more", "funcitons", "which", "you", "can", "override", "."...
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/integration/boofcv-android/examples/video/app/src/main/java/org/boofcv/video/GradientActivity.java#L110-L114
jpush/jmessage-api-java-client
src/main/java/cn/jmessage/api/JMessageClient.java
JMessageClient.addOrRemoveMembers
public void addOrRemoveMembers(long gid, String[] addList, String[] removeList) throws APIConnectionException, APIRequestException { """ Add or remove members from a group @param gid The group id @param addList If this parameter is null then send remove request @param removeList If this parameter is...
java
public void addOrRemoveMembers(long gid, String[] addList, String[] removeList) throws APIConnectionException, APIRequestException { Members add = Members.newBuilder() .addMember(addList) .build(); Members remove = Members.newBuilder() .addMem...
[ "public", "void", "addOrRemoveMembers", "(", "long", "gid", ",", "String", "[", "]", "addList", ",", "String", "[", "]", "removeList", ")", "throws", "APIConnectionException", ",", "APIRequestException", "{", "Members", "add", "=", "Members", ".", "newBuilder", ...
Add or remove members from a group @param gid The group id @param addList If this parameter is null then send remove request @param removeList If this parameter is null then send add request @throws APIConnectionException connect exception @throws APIRequestException request exception
[ "Add", "or", "remove", "members", "from", "a", "group" ]
train
https://github.com/jpush/jmessage-api-java-client/blob/767f5fb15e9fe5a546c00f6e68b64f6dd53c617c/src/main/java/cn/jmessage/api/JMessageClient.java#L400-L411
Azure/azure-sdk-for-java
hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ConfigurationsInner.java
ConfigurationsInner.getAsync
public Observable<Map<String, String>> getAsync(String resourceGroupName, String clusterName, String configurationName) { """ The configuration object for the specified cluster. This API is not recommended and might be removed in the future. Please consider using List configurations API instead. @param resource...
java
public Observable<Map<String, String>> getAsync(String resourceGroupName, String clusterName, String configurationName) { return getWithServiceResponseAsync(resourceGroupName, clusterName, configurationName).map(new Func1<ServiceResponse<Map<String, String>>, Map<String, String>>() { @Override ...
[ "public", "Observable", "<", "Map", "<", "String", ",", "String", ">", ">", "getAsync", "(", "String", "resourceGroupName", ",", "String", "clusterName", ",", "String", "configurationName", ")", "{", "return", "getWithServiceResponseAsync", "(", "resourceGroupName",...
The configuration object for the specified cluster. This API is not recommended and might be removed in the future. Please consider using List configurations API instead. @param resourceGroupName The name of the resource group. @param clusterName The name of the cluster. @param configurationName The name of the cluste...
[ "The", "configuration", "object", "for", "the", "specified", "cluster", ".", "This", "API", "is", "not", "recommended", "and", "might", "be", "removed", "in", "the", "future", ".", "Please", "consider", "using", "List", "configurations", "API", "instead", "." ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ConfigurationsInner.java#L385-L392
alkacon/opencms-core
src/org/opencms/ade/sitemap/CmsVfsSitemapService.java
CmsVfsSitemapService.prefetch
public static CmsSitemapData prefetch(HttpServletRequest request, String sitemapUri) throws CmsRpcException { """ Fetches the sitemap data.<p> @param request the current request @param sitemapUri the site relative path @return the sitemap data @throws CmsRpcException if something goes wrong """ ...
java
public static CmsSitemapData prefetch(HttpServletRequest request, String sitemapUri) throws CmsRpcException { CmsVfsSitemapService service = new CmsVfsSitemapService(); service.setCms(CmsFlexController.getCmsObject(request)); service.setRequest(request); CmsSitemapData result = null; ...
[ "public", "static", "CmsSitemapData", "prefetch", "(", "HttpServletRequest", "request", ",", "String", "sitemapUri", ")", "throws", "CmsRpcException", "{", "CmsVfsSitemapService", "service", "=", "new", "CmsVfsSitemapService", "(", ")", ";", "service", ".", "setCms", ...
Fetches the sitemap data.<p> @param request the current request @param sitemapUri the site relative path @return the sitemap data @throws CmsRpcException if something goes wrong
[ "Fetches", "the", "sitemap", "data", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/sitemap/CmsVfsSitemapService.java#L314-L326
biojava/biojava
biojava-ws/src/main/java/org/biojava/nbio/ws/alignment/qblast/NCBIQBlastOutputProperties.java
NCBIQBlastOutputProperties.setOutputFormat
public void setOutputFormat(BlastOutputFormatEnum formatType) { """ Sets the stream output format to get from the QBlast service <p/> If {@code HTML} format is selected, also adds the following parameters (which are removed if another output format is chosen): <pre> NOHEADER = true; SHOW_OVERVIEW = false; ...
java
public void setOutputFormat(BlastOutputFormatEnum formatType) { setOutputOption(FORMAT_TYPE, formatType.name()); if (BlastOutputFormatEnum.HTML.equals(formatType)) { // add default parameters associated with HTML setOutputOption(NOHEADER, "true"); setOutputOption(SHOW_OVERVIEW, "false"); setOutputOption...
[ "public", "void", "setOutputFormat", "(", "BlastOutputFormatEnum", "formatType", ")", "{", "setOutputOption", "(", "FORMAT_TYPE", ",", "formatType", ".", "name", "(", ")", ")", ";", "if", "(", "BlastOutputFormatEnum", ".", "HTML", ".", "equals", "(", "formatType...
Sets the stream output format to get from the QBlast service <p/> If {@code HTML} format is selected, also adds the following parameters (which are removed if another output format is chosen): <pre> NOHEADER = true; SHOW_OVERVIEW = false; SHOW_LINKOUT = false; </pre> @param formatType : one of the output format types...
[ "Sets", "the", "stream", "output", "format", "to", "get", "from", "the", "QBlast", "service", "<p", "/", ">", "If", "{", "@code", "HTML", "}", "format", "is", "selected", "also", "adds", "the", "following", "parameters", "(", "which", "are", "removed", "...
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-ws/src/main/java/org/biojava/nbio/ws/alignment/qblast/NCBIQBlastOutputProperties.java#L134-L147
kuali/ojb-1.0.4
src/xdoclet/java/src/xdoclet/modules/ojb/constraints/ClassDescriptorConstraints.java
ClassDescriptorConstraints.checkObjectCache
private void checkObjectCache(ClassDescriptorDef classDef, String checkLevel) throws ConstraintException { """ Checks the given class descriptor for correct object cache setting. @param classDef The class descriptor @param checkLevel The current check level (this constraint is only checked in strict) @excep...
java
private void checkObjectCache(ClassDescriptorDef classDef, String checkLevel) throws ConstraintException { if (!CHECKLEVEL_STRICT.equals(checkLevel)) { return; } ObjectCacheDef objCacheDef = classDef.getObjectCache(); if (objCacheDef == null) ...
[ "private", "void", "checkObjectCache", "(", "ClassDescriptorDef", "classDef", ",", "String", "checkLevel", ")", "throws", "ConstraintException", "{", "if", "(", "!", "CHECKLEVEL_STRICT", ".", "equals", "(", "checkLevel", ")", ")", "{", "return", ";", "}", "Objec...
Checks the given class descriptor for correct object cache setting. @param classDef The class descriptor @param checkLevel The current check level (this constraint is only checked in strict) @exception ConstraintException If the constraint has been violated
[ "Checks", "the", "given", "class", "descriptor", "for", "correct", "object", "cache", "setting", "." ]
train
https://github.com/kuali/ojb-1.0.4/blob/9a544372f67ce965f662cdc71609dd03683c8f04/src/xdoclet/java/src/xdoclet/modules/ojb/constraints/ClassDescriptorConstraints.java#L450-L484
exoplatform/jcr
exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/LocationFactory.java
LocationFactory.createJCRPath
public JCRPath createJCRPath(JCRPath parentLoc, String relPath) throws RepositoryException { """ Creates JCRPath from parent path and relPath @param parentLoc parent path @param relPath related path @return @throws RepositoryException """ JCRPath addPath = parseNames(relPath, false); return p...
java
public JCRPath createJCRPath(JCRPath parentLoc, String relPath) throws RepositoryException { JCRPath addPath = parseNames(relPath, false); return parentLoc.add(addPath); }
[ "public", "JCRPath", "createJCRPath", "(", "JCRPath", "parentLoc", ",", "String", "relPath", ")", "throws", "RepositoryException", "{", "JCRPath", "addPath", "=", "parseNames", "(", "relPath", ",", "false", ")", ";", "return", "parentLoc", ".", "add", "(", "ad...
Creates JCRPath from parent path and relPath @param parentLoc parent path @param relPath related path @return @throws RepositoryException
[ "Creates", "JCRPath", "from", "parent", "path", "and", "relPath" ]
train
https://github.com/exoplatform/jcr/blob/3e7f9ee1b5683640d73a4316fb4b0ad5eac5b8a2/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/LocationFactory.java#L90-L94
TheHortonMachine/hortonmachine
gears/src/main/java/oms3/util/Annotations.java
Annotations.playsAll
public static boolean playsAll(Role role, String... r) { """ Checks if all roles are played. @param role the role to check. @param r the roles that all have to be played @return true or false. """ if (role == null) { return false; } for (String s : r) { if (...
java
public static boolean playsAll(Role role, String... r) { if (role == null) { return false; } for (String s : r) { if (!role.value().contains(s)) { return false; } } return true; }
[ "public", "static", "boolean", "playsAll", "(", "Role", "role", ",", "String", "...", "r", ")", "{", "if", "(", "role", "==", "null", ")", "{", "return", "false", ";", "}", "for", "(", "String", "s", ":", "r", ")", "{", "if", "(", "!", "role", ...
Checks if all roles are played. @param role the role to check. @param r the roles that all have to be played @return true or false.
[ "Checks", "if", "all", "roles", "are", "played", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/oms3/util/Annotations.java#L25-L35
threerings/narya
core/src/main/java/com/threerings/presents/server/net/PresentsConnectionManager.java
PresentsConnectionManager.startOutgoingConnection
protected void startOutgoingConnection (final Connection conn, InetSocketAddress addr) { """ Starts the connection process for an outgoing connection. This is called as part of the conmgr tick for any pending outgoing connections. """ final SocketChannel sockchan = conn.getChannel(); try { ...
java
protected void startOutgoingConnection (final Connection conn, InetSocketAddress addr) { final SocketChannel sockchan = conn.getChannel(); try { // register our channel with the selector (if this fails, we abandon ship immediately) conn.selkey = sockchan.register(_selector, S...
[ "protected", "void", "startOutgoingConnection", "(", "final", "Connection", "conn", ",", "InetSocketAddress", "addr", ")", "{", "final", "SocketChannel", "sockchan", "=", "conn", ".", "getChannel", "(", ")", ";", "try", "{", "// register our channel with the selector ...
Starts the connection process for an outgoing connection. This is called as part of the conmgr tick for any pending outgoing connections.
[ "Starts", "the", "connection", "process", "for", "an", "outgoing", "connection", ".", "This", "is", "called", "as", "part", "of", "the", "conmgr", "tick", "for", "any", "pending", "outgoing", "connections", "." ]
train
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/presents/server/net/PresentsConnectionManager.java#L384-L410
threerings/narya
core/src/main/java/com/threerings/crowd/chat/client/ChatDirector.java
ChatDirector.displayInfo
public void displayInfo (String bundle, String message, String localtype) { """ Display a system INFO message as if it had come from the server. Info messages are sent when something happens that was neither directly triggered by the user, nor requires direct action. """ displaySystem(bundle, messa...
java
public void displayInfo (String bundle, String message, String localtype) { displaySystem(bundle, message, SystemMessage.INFO, localtype); }
[ "public", "void", "displayInfo", "(", "String", "bundle", ",", "String", "message", ",", "String", "localtype", ")", "{", "displaySystem", "(", "bundle", ",", "message", ",", "SystemMessage", ".", "INFO", ",", "localtype", ")", ";", "}" ]
Display a system INFO message as if it had come from the server. Info messages are sent when something happens that was neither directly triggered by the user, nor requires direct action.
[ "Display", "a", "system", "INFO", "message", "as", "if", "it", "had", "come", "from", "the", "server", "." ]
train
https://github.com/threerings/narya/blob/5b01edc8850ed0c32d004b4049e1ac4a02027ede/core/src/main/java/com/threerings/crowd/chat/client/ChatDirector.java#L332-L335
apache/incubator-heron
heron/api/src/java/org/apache/heron/streamlet/impl/StreamletImpl.java
StreamletImpl.applyOperator
@Override public <T> Streamlet<T> applyOperator(IStreamletOperator<R, T> operator) { """ Returns a new Streamlet by applying the operator on each element of this streamlet. @param operator The operator to be applied @param <T> The return type of the transform @return Streamlet containing the output of the ope...
java
@Override public <T> Streamlet<T> applyOperator(IStreamletOperator<R, T> operator) { checkNotNull(operator, "operator cannot be null"); // By default, NoneStreamGrouping stategy is used. In this stategy, tuples are forwarded // from parent component to a ramdon one of all the instances of the child compo...
[ "@", "Override", "public", "<", "T", ">", "Streamlet", "<", "T", ">", "applyOperator", "(", "IStreamletOperator", "<", "R", ",", "T", ">", "operator", ")", "{", "checkNotNull", "(", "operator", ",", "\"operator cannot be null\"", ")", ";", "// By default, None...
Returns a new Streamlet by applying the operator on each element of this streamlet. @param operator The operator to be applied @param <T> The return type of the transform @return Streamlet containing the output of the operation
[ "Returns", "a", "new", "Streamlet", "by", "applying", "the", "operator", "on", "each", "element", "of", "this", "streamlet", "." ]
train
https://github.com/apache/incubator-heron/blob/776abe2b5a45b93a0eb957fd65cbc149d901a92a/heron/api/src/java/org/apache/heron/streamlet/impl/StreamletImpl.java#L628-L636
jcuda/jcusparse
JCusparseJava/src/main/java/jcuda/jcusparse/JCusparse.java
JCusparse.cusparseSgtsvStridedBatch
public static int cusparseSgtsvStridedBatch( cusparseHandle handle, int m, Pointer dl, Pointer d, Pointer du, Pointer x, int batchCount, int batchStride) { """ <pre> Description: Solution of a set of tridiagonal linear systems A_{i} *...
java
public static int cusparseSgtsvStridedBatch( cusparseHandle handle, int m, Pointer dl, Pointer d, Pointer du, Pointer x, int batchCount, int batchStride) { return checkResult(cusparseSgtsvStridedBatchNative(handle, m, dl, d, du...
[ "public", "static", "int", "cusparseSgtsvStridedBatch", "(", "cusparseHandle", "handle", ",", "int", "m", ",", "Pointer", "dl", ",", "Pointer", "d", ",", "Pointer", "du", ",", "Pointer", "x", ",", "int", "batchCount", ",", "int", "batchStride", ")", "{", "...
<pre> Description: Solution of a set of tridiagonal linear systems A_{i} * x_{i} = f_{i} for i=1,...,batchCount. The coefficient matrices A_{i} are composed of lower (dl), main (d) and upper (du) diagonals and stored separated by a batchStride. Also, the right-hand-sides/solutions f_{i}/x_{i} are separated by a batchSt...
[ "<pre", ">", "Description", ":", "Solution", "of", "a", "set", "of", "tridiagonal", "linear", "systems", "A_", "{", "i", "}", "*", "x_", "{", "i", "}", "=", "f_", "{", "i", "}", "for", "i", "=", "1", "...", "batchCount", ".", "The", "coefficient", ...
train
https://github.com/jcuda/jcusparse/blob/7687a62a4ef6b76cb91cf7da93d4cf5ade96a791/JCusparseJava/src/main/java/jcuda/jcusparse/JCusparse.java#L8619-L8630
line/armeria
core/src/main/java/com/linecorp/armeria/server/docs/TypeSignature.java
TypeSignature.ofNamed
public static TypeSignature ofNamed(String name, Object namedTypeDescriptor) { """ Creates a new named type signature for the provided name and arbitrary descriptor. """ return new TypeSignature(requireNonNull(name, "name"), requireNonNull(namedTypeDescriptor, "namedTyp...
java
public static TypeSignature ofNamed(String name, Object namedTypeDescriptor) { return new TypeSignature(requireNonNull(name, "name"), requireNonNull(namedTypeDescriptor, "namedTypeDescriptor")); }
[ "public", "static", "TypeSignature", "ofNamed", "(", "String", "name", ",", "Object", "namedTypeDescriptor", ")", "{", "return", "new", "TypeSignature", "(", "requireNonNull", "(", "name", ",", "\"name\"", ")", ",", "requireNonNull", "(", "namedTypeDescriptor", ",...
Creates a new named type signature for the provided name and arbitrary descriptor.
[ "Creates", "a", "new", "named", "type", "signature", "for", "the", "provided", "name", "and", "arbitrary", "descriptor", "." ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/core/src/main/java/com/linecorp/armeria/server/docs/TypeSignature.java#L185-L188
rometools/rome
rome-modules/src/main/java/com/rometools/modules/opensearch/impl/OpenSearchModuleParser.java
OpenSearchModuleParser.resolveURI
private static String resolveURI(final URL baseURI, final Parent parent, String url) { """ Use xml:base attributes at feed and entry level to resolve relative links """ url = url.equals(".") || url.equals("./") ? "" : url; if (isRelativeURI(url) && parent != null && parent instanceof Element) {...
java
private static String resolveURI(final URL baseURI, final Parent parent, String url) { url = url.equals(".") || url.equals("./") ? "" : url; if (isRelativeURI(url) && parent != null && parent instanceof Element) { final Attribute baseAtt = ((Element) parent).getAttribute("base", Namespace.XM...
[ "private", "static", "String", "resolveURI", "(", "final", "URL", "baseURI", ",", "final", "Parent", "parent", ",", "String", "url", ")", "{", "url", "=", "url", ".", "equals", "(", "\".\"", ")", "||", "url", ".", "equals", "(", "\"./\"", ")", "?", "...
Use xml:base attributes at feed and entry level to resolve relative links
[ "Use", "xml", ":", "base", "attributes", "at", "feed", "and", "entry", "level", "to", "resolve", "relative", "links" ]
train
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-modules/src/main/java/com/rometools/modules/opensearch/impl/OpenSearchModuleParser.java#L202-L221
demidenko05/beigesoft-orm
src/main/java/org/beigesoft/orm/holder/HldCnvFromRsNames.java
HldCnvFromRsNames.getFor
@Override public final String getFor(final Class<?> pClass, final String pThingName) { """ <p>Get thing for given class and thing name.</p> @param pClass a Class @param pThingName Thing Name @return a thing """ Field field = this.fieldsRapiHolder.getFor(pClass, pThingName); Class<?> classKey = fie...
java
@Override public final String getFor(final Class<?> pClass, final String pThingName) { Field field = this.fieldsRapiHolder.getFor(pClass, pThingName); Class<?> classKey = field.getType(); if (IHasId.class.isAssignableFrom(classKey)) { classKey = IHasId.class; } else if (Enum.class.isAssignableFr...
[ "@", "Override", "public", "final", "String", "getFor", "(", "final", "Class", "<", "?", ">", "pClass", ",", "final", "String", "pThingName", ")", "{", "Field", "field", "=", "this", ".", "fieldsRapiHolder", ".", "getFor", "(", "pClass", ",", "pThingName",...
<p>Get thing for given class and thing name.</p> @param pClass a Class @param pThingName Thing Name @return a thing
[ "<p", ">", "Get", "thing", "for", "given", "class", "and", "thing", "name", ".", "<", "/", "p", ">" ]
train
https://github.com/demidenko05/beigesoft-orm/blob/f1b2c70701a111741a436911ca24ef9d38eba0b9/src/main/java/org/beigesoft/orm/holder/HldCnvFromRsNames.java#L87-L97
ThreeTen/threetenbp
src/main/java/org/threeten/bp/ZoneId.java
ZoneId.ofOffset
public static ZoneId ofOffset(String prefix, ZoneOffset offset) { """ Obtains an instance of {@code ZoneId} wrapping an offset. <p> If the prefix is "GMT", "UTC", or "UT" a {@code ZoneId} with the prefix and the non-zero offset is returned. If the prefix is empty {@code ""} the {@code ZoneOffset} is returned. ...
java
public static ZoneId ofOffset(String prefix, ZoneOffset offset) { Jdk8Methods.requireNonNull(prefix, "prefix"); Jdk8Methods.requireNonNull(offset, "offset"); if (prefix.length() == 0) { return offset; } if (prefix.equals("GMT") || prefix.equals("UTC") || prefix.equals...
[ "public", "static", "ZoneId", "ofOffset", "(", "String", "prefix", ",", "ZoneOffset", "offset", ")", "{", "Jdk8Methods", ".", "requireNonNull", "(", "prefix", ",", "\"prefix\"", ")", ";", "Jdk8Methods", ".", "requireNonNull", "(", "offset", ",", "\"offset\"", ...
Obtains an instance of {@code ZoneId} wrapping an offset. <p> If the prefix is "GMT", "UTC", or "UT" a {@code ZoneId} with the prefix and the non-zero offset is returned. If the prefix is empty {@code ""} the {@code ZoneOffset} is returned. @param prefix the time-zone ID, not null @param offset the offset, not null ...
[ "Obtains", "an", "instance", "of", "{", "@code", "ZoneId", "}", "wrapping", "an", "offset", ".", "<p", ">", "If", "the", "prefix", "is", "GMT", "UTC", "or", "UT", "a", "{", "@code", "ZoneId", "}", "with", "the", "prefix", "and", "the", "non", "-", ...
train
https://github.com/ThreeTen/threetenbp/blob/5f05b649f89f205aabd96b2f83c36796ec616fe6/src/main/java/org/threeten/bp/ZoneId.java#L374-L387
gallandarakhneorg/afc
advanced/bootique/bootique-printconfig/src/main/java/org/arakhne/afc/bootique/printconfig/modules/PrintConfigCommandModule.java
PrintConfigCommandModule.providePrintConfigCommand
@SuppressWarnings("static-method") @Provides @Singleton public PrintConfigCommand providePrintConfigCommand( Provider<BootLogger> bootLogger, Provider<ModulesMetadata> modulesMetadata, Injector injector) { """ Provide the command for running the command for printing out the configuration values. @pa...
java
@SuppressWarnings("static-method") @Provides @Singleton public PrintConfigCommand providePrintConfigCommand( Provider<BootLogger> bootLogger, Provider<ModulesMetadata> modulesMetadata, Injector injector) { return new PrintConfigCommand(bootLogger, modulesMetadata, injector); }
[ "@", "SuppressWarnings", "(", "\"static-method\"", ")", "@", "Provides", "@", "Singleton", "public", "PrintConfigCommand", "providePrintConfigCommand", "(", "Provider", "<", "BootLogger", ">", "bootLogger", ",", "Provider", "<", "ModulesMetadata", ">", "modulesMetadata"...
Provide the command for running the command for printing out the configuration values. @param bootLogger the boot logger. @param modulesMetadata the modules' metadata. @param injector the current injector. @return the command.
[ "Provide", "the", "command", "for", "running", "the", "command", "for", "printing", "out", "the", "configuration", "values", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/bootique/bootique-printconfig/src/main/java/org/arakhne/afc/bootique/printconfig/modules/PrintConfigCommandModule.java#L57-L65
aws/aws-sdk-java
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/AmazonS3URI.java
AmazonS3URI.preprocessUrlStr
private static String preprocessUrlStr(final String str, final boolean encode) { """ URL encodes the given string. This allows us to pass special characters that would otherwise be rejected when building a URI instance. Because we need to retain the URI's path structure we subsequently need to replace percent...
java
private static String preprocessUrlStr(final String str, final boolean encode) { if (encode) { try { return (URLEncoder.encode(str, "UTF-8") .replace("%3A", ":") .replace("%2F", "/") .replace("+", "%20")); ...
[ "private", "static", "String", "preprocessUrlStr", "(", "final", "String", "str", ",", "final", "boolean", "encode", ")", "{", "if", "(", "encode", ")", "{", "try", "{", "return", "(", "URLEncoder", ".", "encode", "(", "str", ",", "\"UTF-8\"", ")", ".", ...
URL encodes the given string. This allows us to pass special characters that would otherwise be rejected when building a URI instance. Because we need to retain the URI's path structure we subsequently need to replace percent encoded path delimiters back to their decoded counterparts. @param str the string to encode...
[ "URL", "encodes", "the", "given", "string", ".", "This", "allows", "us", "to", "pass", "special", "characters", "that", "would", "otherwise", "be", "rejected", "when", "building", "a", "URI", "instance", ".", "Because", "we", "need", "to", "retain", "the", ...
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/AmazonS3URI.java#L258-L272
pressgang-ccms/PressGangCCMSBuilder
src/main/java/org/jboss/pressgang/ccms/contentspec/builder/utils/DocBookBuildUtilities.java
DocBookBuildUtilities.processTopicID
public static void processTopicID(final BuildData buildData, final ITopicNode topicNode, final Document doc) { """ Sets the topic xref id to the topic database id. @param buildData Information and data structures for the build. @param topicNode The topic to be used to set the id attribute. @param doc ...
java
public static void processTopicID(final BuildData buildData, final ITopicNode topicNode, final Document doc) { final BaseTopicWrapper<?> topic = topicNode.getTopic(); // Ignore info topics if (!topic.hasTag(buildData.getServerEntities().getInfoTagId())) { // Get the id value ...
[ "public", "static", "void", "processTopicID", "(", "final", "BuildData", "buildData", ",", "final", "ITopicNode", "topicNode", ",", "final", "Document", "doc", ")", "{", "final", "BaseTopicWrapper", "<", "?", ">", "topic", "=", "topicNode", ".", "getTopic", "(...
Sets the topic xref id to the topic database id. @param buildData Information and data structures for the build. @param topicNode The topic to be used to set the id attribute. @param doc The document object for the topics XML.
[ "Sets", "the", "topic", "xref", "id", "to", "the", "topic", "database", "id", "." ]
train
https://github.com/pressgang-ccms/PressGangCCMSBuilder/blob/5436d36ba1b3c5baa246b270e5fc350e6778bce8/src/main/java/org/jboss/pressgang/ccms/contentspec/builder/utils/DocBookBuildUtilities.java#L541-L556
JOML-CI/JOML
src/org/joml/Vector3d.java
Vector3d.rotateAxis
public Vector3d rotateAxis(double angle, double x, double y, double z) { """ Rotate this vector the specified radians around the given rotation axis. @param angle the angle in radians @param x the x component of the rotation axis @param y the y component of the rotation axis @param z the z component of t...
java
public Vector3d rotateAxis(double angle, double x, double y, double z) { return rotateAxis(angle, x, y, z, thisOrNew()); }
[ "public", "Vector3d", "rotateAxis", "(", "double", "angle", ",", "double", "x", ",", "double", "y", ",", "double", "z", ")", "{", "return", "rotateAxis", "(", "angle", ",", "x", ",", "y", ",", "z", ",", "thisOrNew", "(", ")", ")", ";", "}" ]
Rotate this vector the specified radians around the given rotation axis. @param angle the angle in radians @param x the x component of the rotation axis @param y the y component of the rotation axis @param z the z component of the rotation axis @return a vector holding the result
[ "Rotate", "this", "vector", "the", "specified", "radians", "around", "the", "given", "rotation", "axis", "." ]
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Vector3d.java#L1517-L1519
MenoData/Time4J
base/src/main/java/net/time4j/tz/model/GregorianTimezoneRule.java
GregorianTimezoneRule.ofLastWeekday
public static GregorianTimezoneRule ofLastWeekday( Month month, Weekday dayOfWeek, int timeOfDay, OffsetIndicator indicator, int savings ) { """ /*[deutsch] <p>Konstruiert ein Muster f&uuml;r den letzten Wochentag im angegebenen Monat. </p> @param month cale...
java
public static GregorianTimezoneRule ofLastWeekday( Month month, Weekday dayOfWeek, int timeOfDay, OffsetIndicator indicator, int savings ) { return new LastWeekdayPattern(month, dayOfWeek, timeOfDay, indicator, savings); }
[ "public", "static", "GregorianTimezoneRule", "ofLastWeekday", "(", "Month", "month", ",", "Weekday", "dayOfWeek", ",", "int", "timeOfDay", ",", "OffsetIndicator", "indicator", ",", "int", "savings", ")", "{", "return", "new", "LastWeekdayPattern", "(", "month", ",...
/*[deutsch] <p>Konstruiert ein Muster f&uuml;r den letzten Wochentag im angegebenen Monat. </p> @param month calendar month @param dayOfWeek last day of week @param timeOfDay clock time in seconds after midnight when time switch happens @param indicator offset indicator @param savings fixed D...
[ "/", "*", "[", "deutsch", "]", "<p", ">", "Konstruiert", "ein", "Muster", "f&uuml", ";", "r", "den", "letzten", "Wochentag", "im", "angegebenen", "Monat", ".", "<", "/", "p", ">" ]
train
https://github.com/MenoData/Time4J/blob/08b2eda6b2dbb140b92011cf7071bb087edd46a5/base/src/main/java/net/time4j/tz/model/GregorianTimezoneRule.java#L240-L250
alkacon/opencms-core
src/org/opencms/ui/apps/cacheadmin/CmsCacheViewApp.java
CmsCacheViewApp.getImageViewComponent
private Component getImageViewComponent() { """ Creates the view for the image cache.<p> @return a vaadin vertical layout with the information about the image cache """ m_siteTableFilter = new TextField(); HorizontalSplitPanel sp = new HorizontalSplitPanel(); sp.setSizeFull(); ...
java
private Component getImageViewComponent() { m_siteTableFilter = new TextField(); HorizontalSplitPanel sp = new HorizontalSplitPanel(); sp.setSizeFull(); VerticalLayout intro = CmsVaadinUtils.getInfoLayout(Messages.GUI_CACHE_IMAGE_INTRODUCTION_0); VerticalLayout nullResult = Cms...
[ "private", "Component", "getImageViewComponent", "(", ")", "{", "m_siteTableFilter", "=", "new", "TextField", "(", ")", ";", "HorizontalSplitPanel", "sp", "=", "new", "HorizontalSplitPanel", "(", ")", ";", "sp", ".", "setSizeFull", "(", ")", ";", "VerticalLayout...
Creates the view for the image cache.<p> @return a vaadin vertical layout with the information about the image cache
[ "Creates", "the", "view", "for", "the", "image", "cache", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/cacheadmin/CmsCacheViewApp.java#L331-L376
lopspower/CircularProgressBar
circularprogressbar-example/src/main/java/com/mikhaellopez/circularprogressbarsample/MainActivity.java
MainActivity.adjustAlpha
private int adjustAlpha(int color, float factor) { """ Transparent the given color by the factor The more the factor closer to zero the more the color gets transparent @param color The color to transparent @param factor 1.0f to 0.0f @return int - A transplanted color """ int alpha = Math.round(C...
java
private int adjustAlpha(int color, float factor) { int alpha = Math.round(Color.alpha(color) * factor); int red = Color.red(color); int green = Color.green(color); int blue = Color.blue(color); return Color.argb(alpha, red, green, blue); }
[ "private", "int", "adjustAlpha", "(", "int", "color", ",", "float", "factor", ")", "{", "int", "alpha", "=", "Math", ".", "round", "(", "Color", ".", "alpha", "(", "color", ")", "*", "factor", ")", ";", "int", "red", "=", "Color", ".", "red", "(", ...
Transparent the given color by the factor The more the factor closer to zero the more the color gets transparent @param color The color to transparent @param factor 1.0f to 0.0f @return int - A transplanted color
[ "Transparent", "the", "given", "color", "by", "the", "factor", "The", "more", "the", "factor", "closer", "to", "zero", "the", "more", "the", "color", "gets", "transparent" ]
train
https://github.com/lopspower/CircularProgressBar/blob/a805979677f76f6a441dfca2f85f3b01ae6a3e18/circularprogressbar-example/src/main/java/com/mikhaellopez/circularprogressbarsample/MainActivity.java#L119-L125
BBN-E/bue-common-open
common-core-open/src/main/java/com/bbn/bue/common/collections/CollectionUtils.java
CollectionUtils.maxOr
public static <T extends Comparable<T>> T maxOr(Collection<T> values, T defaultVal) { """ Like {@link Collections#max(java.util.Collection)} except with a default value returned in the case of an empty collection. """ if (values.isEmpty()) { return defaultVal; } else { return Collections.m...
java
public static <T extends Comparable<T>> T maxOr(Collection<T> values, T defaultVal) { if (values.isEmpty()) { return defaultVal; } else { return Collections.max(values); } }
[ "public", "static", "<", "T", "extends", "Comparable", "<", "T", ">", ">", "T", "maxOr", "(", "Collection", "<", "T", ">", "values", ",", "T", "defaultVal", ")", "{", "if", "(", "values", ".", "isEmpty", "(", ")", ")", "{", "return", "defaultVal", ...
Like {@link Collections#max(java.util.Collection)} except with a default value returned in the case of an empty collection.
[ "Like", "{" ]
train
https://github.com/BBN-E/bue-common-open/blob/d618652674d647867306e2e4b987a21b7c29c015/common-core-open/src/main/java/com/bbn/bue/common/collections/CollectionUtils.java#L185-L191
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/io/dxfdwg/libs/dwg/utils/ByteUtils.java
ByteUtils.stringToBytes
public static final void stringToBytes( String s, byte[] data, int[] offset ) { """ Write the bytes representing <code>s</code> into the byte array <code>data</code>, starting at index <code>offset [0]</code>, and increment <code>offset [0]</code> by the number of bytes written; if <code>data == null</code>, in...
java
public static final void stringToBytes( String s, byte[] data, int[] offset ) { byte[] s_bytes = s.getBytes(); if (data != null) { intToBytes(s_bytes.length, data, offset); memcpy(data, offset[0], s_bytes, 0, s_bytes.length); } else { offset[0] += SIZE_INT; ...
[ "public", "static", "final", "void", "stringToBytes", "(", "String", "s", ",", "byte", "[", "]", "data", ",", "int", "[", "]", "offset", ")", "{", "byte", "[", "]", "s_bytes", "=", "s", ".", "getBytes", "(", ")", ";", "if", "(", "data", "!=", "nu...
Write the bytes representing <code>s</code> into the byte array <code>data</code>, starting at index <code>offset [0]</code>, and increment <code>offset [0]</code> by the number of bytes written; if <code>data == null</code>, increment <code>offset [0]</code> by the number of bytes that would have been written otherwis...
[ "Write", "the", "bytes", "representing", "<code", ">", "s<", "/", "code", ">", "into", "the", "byte", "array", "<code", ">", "data<", "/", "code", ">", "starting", "at", "index", "<code", ">", "offset", "[", "0", "]", "<", "/", "code", ">", "and", ...
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/io/dxfdwg/libs/dwg/utils/ByteUtils.java#L287-L298
Azure/azure-sdk-for-java
authorization/resource-manager/v2018_09_01_preview/src/main/java/com/microsoft/azure/management/authorization/v2018_09_01_preview/implementation/RoleAssignmentsInner.java
RoleAssignmentsInner.createByIdAsync
public Observable<RoleAssignmentInner> createByIdAsync(String roleId, RoleAssignmentCreateParameters parameters) { """ Creates a role assignment by ID. @param roleId The ID of the role assignment to create. @param parameters Parameters for the role assignment. @throws IllegalArgumentException thrown if parame...
java
public Observable<RoleAssignmentInner> createByIdAsync(String roleId, RoleAssignmentCreateParameters parameters) { return createByIdWithServiceResponseAsync(roleId, parameters).map(new Func1<ServiceResponse<RoleAssignmentInner>, RoleAssignmentInner>() { @Override public RoleAssignmentInn...
[ "public", "Observable", "<", "RoleAssignmentInner", ">", "createByIdAsync", "(", "String", "roleId", ",", "RoleAssignmentCreateParameters", "parameters", ")", "{", "return", "createByIdWithServiceResponseAsync", "(", "roleId", ",", "parameters", ")", ".", "map", "(", ...
Creates a role assignment by ID. @param roleId The ID of the role assignment to create. @param parameters Parameters for the role assignment. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the RoleAssignmentInner object
[ "Creates", "a", "role", "assignment", "by", "ID", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/authorization/resource-manager/v2018_09_01_preview/src/main/java/com/microsoft/azure/management/authorization/v2018_09_01_preview/implementation/RoleAssignmentsInner.java#L999-L1006
ops4j/org.ops4j.base
ops4j-base-util-xml/src/main/java/org/ops4j/util/xml/ElementHelper.java
ElementHelper.getAttribute
public static String getAttribute( Element node, String key ) { """ Return the value of an element attribute. @param node the DOM node @param key the attribute key @return the attribute value or null if the attribute is undefined """ return getAttribute( node, key, null ); }
java
public static String getAttribute( Element node, String key ) { return getAttribute( node, key, null ); }
[ "public", "static", "String", "getAttribute", "(", "Element", "node", ",", "String", "key", ")", "{", "return", "getAttribute", "(", "node", ",", "key", ",", "null", ")", ";", "}" ]
Return the value of an element attribute. @param node the DOM node @param key the attribute key @return the attribute value or null if the attribute is undefined
[ "Return", "the", "value", "of", "an", "element", "attribute", "." ]
train
https://github.com/ops4j/org.ops4j.base/blob/b0e742c0d9511f6b19ca64da2ebaf30b7a47256a/ops4j-base-util-xml/src/main/java/org/ops4j/util/xml/ElementHelper.java#L227-L230
whitesource/agents
wss-agent-api/src/main/java/org/whitesource/agent/api/dispatch/RequestFactory.java
RequestFactory.newUpdateInventoryRequest
@Deprecated public UpdateInventoryRequest newUpdateInventoryRequest(String orgToken, UpdateType updateType, String requesterEmail, Strin...
java
@Deprecated public UpdateInventoryRequest newUpdateInventoryRequest(String orgToken, UpdateType updateType, String requesterEmail, Strin...
[ "@", "Deprecated", "public", "UpdateInventoryRequest", "newUpdateInventoryRequest", "(", "String", "orgToken", ",", "UpdateType", "updateType", ",", "String", "requesterEmail", ",", "String", "product", ",", "String", "productVersion", ",", "Collection", "<", "AgentProj...
Create new Inventory Update request. @param orgToken WhiteSource organization token. @param updateType Request UpdateType @param requesterEmail Email of the WhiteSource user that requests to update WhiteSource. @param product Name or WhiteSource service token of the product to update. @param productVe...
[ "Create", "new", "Inventory", "Update", "request", "." ]
train
https://github.com/whitesource/agents/blob/8a947a3dbad257aff70f23f79fb3a55ca90b765f/wss-agent-api/src/main/java/org/whitesource/agent/api/dispatch/RequestFactory.java#L100-L112
jboss/jboss-jstl-api_spec
src/main/java/org/apache/taglibs/standard/tag/common/core/ForTokensSupport.java
ForTokensSupport.prepare
@Override protected void prepare() throws JspTagException { """ /* These just create and use a StringTokenizer. We inherit semantics and Javadoc from LoopTagSupport. """ if (items instanceof ValueExpression) { deferredExpression = (ValueExpression) items; itemsValueIterate...
java
@Override protected void prepare() throws JspTagException { if (items instanceof ValueExpression) { deferredExpression = (ValueExpression) items; itemsValueIteratedExpression = new IteratedExpression(deferredExpression, getDelims()); currentIndex = 0; Object ...
[ "@", "Override", "protected", "void", "prepare", "(", ")", "throws", "JspTagException", "{", "if", "(", "items", "instanceof", "ValueExpression", ")", "{", "deferredExpression", "=", "(", "ValueExpression", ")", "items", ";", "itemsValueIteratedExpression", "=", "...
/* These just create and use a StringTokenizer. We inherit semantics and Javadoc from LoopTagSupport.
[ "/", "*", "These", "just", "create", "and", "use", "a", "StringTokenizer", ".", "We", "inherit", "semantics", "and", "Javadoc", "from", "LoopTagSupport", "." ]
train
https://github.com/jboss/jboss-jstl-api_spec/blob/4ad412ae5be1ae606b8d33c188cb3d98bfcbe84c/src/main/java/org/apache/taglibs/standard/tag/common/core/ForTokensSupport.java#L71-L87
line/armeria
core/src/main/java/com/linecorp/armeria/client/retry/RetryingClient.java
RetryingClient.getNextDelay
@SuppressWarnings("MethodMayBeStatic") // Intentionally left non-static for better user experience. protected final long getNextDelay(ClientRequestContext ctx, Backoff backoff, long millisAfterFromServer) { """ Returns the next delay which retry will be made after. The delay will be: <p>{@code Math.min(resp...
java
@SuppressWarnings("MethodMayBeStatic") // Intentionally left non-static for better user experience. protected final long getNextDelay(ClientRequestContext ctx, Backoff backoff, long millisAfterFromServer) { requireNonNull(ctx, "ctx"); requireNonNull(backoff, "backoff"); final State state = c...
[ "@", "SuppressWarnings", "(", "\"MethodMayBeStatic\"", ")", "// Intentionally left non-static for better user experience.", "protected", "final", "long", "getNextDelay", "(", "ClientRequestContext", "ctx", ",", "Backoff", "backoff", ",", "long", "millisAfterFromServer", ")", ...
Returns the next delay which retry will be made after. The delay will be: <p>{@code Math.min(responseTimeoutMillis, Math.max(Backoff.nextDelayMillis(int), millisAfterFromServer))} @return the number of milliseconds to wait for before attempting a retry. -1 if the {@code currentAttemptNo} exceeds the {@code maxAttempt...
[ "Returns", "the", "next", "delay", "which", "retry", "will", "be", "made", "after", ".", "The", "delay", "will", "be", ":" ]
train
https://github.com/line/armeria/blob/67d29e019fd35a35f89c45cc8f9119ff9b12b44d/core/src/main/java/com/linecorp/armeria/client/retry/RetryingClient.java#L214-L239
sdl/Testy
src/main/java/com/sdl/selenium/web/WebLocatorAbstractBuilder.java
WebLocatorAbstractBuilder.setLabel
@SuppressWarnings("unchecked") public <T extends WebLocatorAbstractBuilder> T setLabel(String label, final SearchType... searchTypes) { """ <p><b>Used for finding element process (to generate xpath address)</b></p> @param label text label element @param searchTypes type search text element: see more ...
java
@SuppressWarnings("unchecked") public <T extends WebLocatorAbstractBuilder> T setLabel(String label, final SearchType... searchTypes) { pathBuilder.setLabel(label, searchTypes); return (T) this; }
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "public", "<", "T", "extends", "WebLocatorAbstractBuilder", ">", "T", "setLabel", "(", "String", "label", ",", "final", "SearchType", "...", "searchTypes", ")", "{", "pathBuilder", ".", "setLabel", "(", "label"...
<p><b>Used for finding element process (to generate xpath address)</b></p> @param label text label element @param searchTypes type search text element: see more details see {@link SearchType} @param <T> the element which calls this method @return this element
[ "<p", ">", "<b", ">", "Used", "for", "finding", "element", "process", "(", "to", "generate", "xpath", "address", ")", "<", "/", "b", ">", "<", "/", "p", ">" ]
train
https://github.com/sdl/Testy/blob/b3ae061554016f926f04694a39ff00dab7576609/src/main/java/com/sdl/selenium/web/WebLocatorAbstractBuilder.java#L403-L407
apereo/cas
support/cas-server-support-saml-idp-metadata/src/main/java/org/apereo/cas/support/saml/services/idp/metadata/cache/resolver/BaseSamlRegisteredServiceMetadataResolver.java
BaseSamlRegisteredServiceMetadataResolver.buildRequiredValidUntilFilterIfNeeded
protected void buildRequiredValidUntilFilterIfNeeded(final SamlRegisteredService service, final List<MetadataFilter> metadataFilterList) { """ Build required valid until filter if needed. See {@link RequiredValidUntilFilter}. @param service the service @param metadataFilterList the metadata filter l...
java
protected void buildRequiredValidUntilFilterIfNeeded(final SamlRegisteredService service, final List<MetadataFilter> metadataFilterList) { if (service.getMetadataMaxValidity() > 0) { val requiredValidUntilFilter = new RequiredValidUntilFilter(service.getMetadataMaxValidity()); metadataFi...
[ "protected", "void", "buildRequiredValidUntilFilterIfNeeded", "(", "final", "SamlRegisteredService", "service", ",", "final", "List", "<", "MetadataFilter", ">", "metadataFilterList", ")", "{", "if", "(", "service", ".", "getMetadataMaxValidity", "(", ")", ">", "0", ...
Build required valid until filter if needed. See {@link RequiredValidUntilFilter}. @param service the service @param metadataFilterList the metadata filter list
[ "Build", "required", "valid", "until", "filter", "if", "needed", ".", "See", "{", "@link", "RequiredValidUntilFilter", "}", "." ]
train
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-saml-idp-metadata/src/main/java/org/apereo/cas/support/saml/services/idp/metadata/cache/resolver/BaseSamlRegisteredServiceMetadataResolver.java#L264-L273
aws/aws-sdk-java
aws-java-sdk-appsync/src/main/java/com/amazonaws/services/appsync/model/GraphqlApi.java
GraphqlApi.withUris
public GraphqlApi withUris(java.util.Map<String, String> uris) { """ <p> The URIs. </p> @param uris The URIs. @return Returns a reference to this object so that method calls can be chained together. """ setUris(uris); return this; }
java
public GraphqlApi withUris(java.util.Map<String, String> uris) { setUris(uris); return this; }
[ "public", "GraphqlApi", "withUris", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "uris", ")", "{", "setUris", "(", "uris", ")", ";", "return", "this", ";", "}" ]
<p> The URIs. </p> @param uris The URIs. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "The", "URIs", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-appsync/src/main/java/com/amazonaws/services/appsync/model/GraphqlApi.java#L414-L417
geomajas/geomajas-project-client-gwt2
plugin/tilebasedlayer/impl/src/main/java/org/geomajas/gwt2/plugin/tilebasedlayer/client/layer/DefaultTileRenderer.java
DefaultTileRenderer.fillPlaceHolders
protected String fillPlaceHolders(String url, int x, int y, int z) { """ Fill in the {x}, {y} and {z} placeholders in the URL. @param url The URL with placeholders. @param x The x-coordinate to the tile. @param y The y-coordinate to the tile. @param z The tile level. @return The URL with filled placeh...
java
protected String fillPlaceHolders(String url, int x, int y, int z) { url = url.replace("{x}", Integer.toString(x)); url = url.replace("{y}", Integer.toString(y)); url = url.replace("{-y}", Integer.toString(y)); return url.replace("{z}", Integer.toString(z)); }
[ "protected", "String", "fillPlaceHolders", "(", "String", "url", ",", "int", "x", ",", "int", "y", ",", "int", "z", ")", "{", "url", "=", "url", ".", "replace", "(", "\"{x}\"", ",", "Integer", ".", "toString", "(", "x", ")", ")", ";", "url", "=", ...
Fill in the {x}, {y} and {z} placeholders in the URL. @param url The URL with placeholders. @param x The x-coordinate to the tile. @param y The y-coordinate to the tile. @param z The tile level. @return The URL with filled placeholders.
[ "Fill", "in", "the", "{", "x", "}", "{", "y", "}", "and", "{", "z", "}", "placeholders", "in", "the", "URL", "." ]
train
https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/plugin/tilebasedlayer/impl/src/main/java/org/geomajas/gwt2/plugin/tilebasedlayer/client/layer/DefaultTileRenderer.java#L116-L121
joniles/mpxj
src/main/java/net/sf/mpxj/primavera/common/Table.java
Table.addRow
public void addRow(String primaryKeyColumnName, Map<String, Object> map) { """ Add a row to the table. We have a limited understanding of the way Btrieve handles outdated rows, so we use what we think is a version number to try to ensure that we only have the latest rows. @param primaryKeyColumnName primary k...
java
public void addRow(String primaryKeyColumnName, Map<String, Object> map) { Integer rowNumber = Integer.valueOf(m_rowNumber++); map.put("ROW_NUMBER", rowNumber); Object primaryKey = null; if (primaryKeyColumnName != null) { primaryKey = map.get(primaryKeyColumnName); } ...
[ "public", "void", "addRow", "(", "String", "primaryKeyColumnName", ",", "Map", "<", "String", ",", "Object", ">", "map", ")", "{", "Integer", "rowNumber", "=", "Integer", ".", "valueOf", "(", "m_rowNumber", "++", ")", ";", "map", ".", "put", "(", "\"ROW_...
Add a row to the table. We have a limited understanding of the way Btrieve handles outdated rows, so we use what we think is a version number to try to ensure that we only have the latest rows. @param primaryKeyColumnName primary key column name @param map Map containing row data
[ "Add", "a", "row", "to", "the", "table", ".", "We", "have", "a", "limited", "understanding", "of", "the", "way", "Btrieve", "handles", "outdated", "rows", "so", "we", "use", "what", "we", "think", "is", "a", "version", "number", "to", "try", "to", "ens...
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/primavera/common/Table.java#L63-L93
albfernandez/itext2
src/main/java/com/lowagie/text/pdf/PdfDocument.java
PdfDocument.fitsPage
boolean fitsPage(PdfPTable table, float margin) { """ Checks if a <CODE>PdfPTable</CODE> fits the current page of the <CODE>PdfDocument</CODE>. @param table the table that has to be checked @param margin a certain margin @return <CODE>true</CODE> if the <CODE>PdfPTable</CODE> fits the page, <CODE>false</CODE>...
java
boolean fitsPage(PdfPTable table, float margin) { if (!table.isLockedWidth()) { float totalWidth = (indentRight() - indentLeft()) * table.getWidthPercentage() / 100; table.setTotalWidth(totalWidth); } // ensuring that a new line has been started. ensureNewLine(); return tab...
[ "boolean", "fitsPage", "(", "PdfPTable", "table", ",", "float", "margin", ")", "{", "if", "(", "!", "table", ".", "isLockedWidth", "(", ")", ")", "{", "float", "totalWidth", "=", "(", "indentRight", "(", ")", "-", "indentLeft", "(", ")", ")", "*", "t...
Checks if a <CODE>PdfPTable</CODE> fits the current page of the <CODE>PdfDocument</CODE>. @param table the table that has to be checked @param margin a certain margin @return <CODE>true</CODE> if the <CODE>PdfPTable</CODE> fits the page, <CODE>false</CODE> otherwise.
[ "Checks", "if", "a", "<CODE", ">", "PdfPTable<", "/", "CODE", ">", "fits", "the", "current", "page", "of", "the", "<CODE", ">", "PdfDocument<", "/", "CODE", ">", "." ]
train
https://github.com/albfernandez/itext2/blob/438fc1899367fd13dfdfa8dfdca9a3c1a7783b84/src/main/java/com/lowagie/text/pdf/PdfDocument.java#L2518-L2527
deeplearning4j/deeplearning4j
nd4j/nd4j-common/src/main/java/org/nd4j/linalg/primitives/CounterMap.java
CounterMap.incrementAll
public void incrementAll(CounterMap<F, S> other) { """ This method will increment values of this counter, by counts of other counter @param other """ for (Map.Entry<F, Counter<S>> entry : other.maps.entrySet()) { F key = entry.getKey(); Counter<S> innerCounter = entry.getValu...
java
public void incrementAll(CounterMap<F, S> other) { for (Map.Entry<F, Counter<S>> entry : other.maps.entrySet()) { F key = entry.getKey(); Counter<S> innerCounter = entry.getValue(); for (Map.Entry<S, AtomicDouble> innerEntry : innerCounter.entrySet()) { S valu...
[ "public", "void", "incrementAll", "(", "CounterMap", "<", "F", ",", "S", ">", "other", ")", "{", "for", "(", "Map", ".", "Entry", "<", "F", ",", "Counter", "<", "S", ">", ">", "entry", ":", "other", ".", "maps", ".", "entrySet", "(", ")", ")", ...
This method will increment values of this counter, by counts of other counter @param other
[ "This", "method", "will", "increment", "values", "of", "this", "counter", "by", "counts", "of", "other", "counter" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-common/src/main/java/org/nd4j/linalg/primitives/CounterMap.java#L72-L81
geomajas/geomajas-project-client-gwt2
plugin/corewidget/corewidget/src/main/java/org/geomajas/gwt2/plugin/corewidget/client/feature/featureinfo/builder/AttributeWidgetFactory.java
AttributeWidgetFactory.addAttributeBuilder
public void addAttributeBuilder(Class<? extends Attribute> clazz, AttributeWidgetBuilder builder) { """ Add an attribute builder to the collection. Attributes with the given class will have their widgets build by this builder. <p/> If there is already a builder for the given class it will be overwritten. @pa...
java
public void addAttributeBuilder(Class<? extends Attribute> clazz, AttributeWidgetBuilder builder) { builders.put(clazz, builder); }
[ "public", "void", "addAttributeBuilder", "(", "Class", "<", "?", "extends", "Attribute", ">", "clazz", ",", "AttributeWidgetBuilder", "builder", ")", "{", "builders", ".", "put", "(", "clazz", ",", "builder", ")", ";", "}" ]
Add an attribute builder to the collection. Attributes with the given class will have their widgets build by this builder. <p/> If there is already a builder for the given class it will be overwritten. @param clazz the class of the attribute that is handled by the builder. @param builder the builder.
[ "Add", "an", "attribute", "builder", "to", "the", "collection", ".", "Attributes", "with", "the", "given", "class", "will", "have", "their", "widgets", "build", "by", "this", "builder", ".", "<p", "/", ">", "If", "there", "is", "already", "a", "builder", ...
train
https://github.com/geomajas/geomajas-project-client-gwt2/blob/bd8d7904e861fa80522eed7b83c4ea99844180c7/plugin/corewidget/corewidget/src/main/java/org/geomajas/gwt2/plugin/corewidget/client/feature/featureinfo/builder/AttributeWidgetFactory.java#L79-L81
citrusframework/citrus
modules/citrus-core/src/main/java/com/consol/citrus/validation/xml/DomXmlMessageValidator.java
DomXmlMessageValidator.doText
private void doText(Element received, Element source) { """ Handle text node during validation. @param received @param source """ if (log.isDebugEnabled()) { log.debug("Validating node value for element: " + received.getLocalName()); } String receivedText = DomUtils.get...
java
private void doText(Element received, Element source) { if (log.isDebugEnabled()) { log.debug("Validating node value for element: " + received.getLocalName()); } String receivedText = DomUtils.getTextValue(received); String sourceText = DomUtils.getTextValue(source); ...
[ "private", "void", "doText", "(", "Element", "received", ",", "Element", "source", ")", "{", "if", "(", "log", ".", "isDebugEnabled", "(", ")", ")", "{", "log", ".", "debug", "(", "\"Validating node value for element: \"", "+", "received", ".", "getLocalName",...
Handle text node during validation. @param received @param source
[ "Handle", "text", "node", "during", "validation", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/validation/xml/DomXmlMessageValidator.java#L548-L574
codelibs/fess
src/main/java/org/codelibs/fess/mylasta/action/FessMessages.java
FessMessages.addErrorsFailedToDeleteFile
public FessMessages addErrorsFailedToDeleteFile(String property, String arg0) { """ Add the created action message for the key 'errors.failed_to_delete_file' with parameters. <pre> message: Failed to delete {0} file. </pre> @param property The property name for the message. (NotNull) @param arg0 The parameter...
java
public FessMessages addErrorsFailedToDeleteFile(String property, String arg0) { assertPropertyNotNull(property); add(property, new UserMessage(ERRORS_failed_to_delete_file, arg0)); return this; }
[ "public", "FessMessages", "addErrorsFailedToDeleteFile", "(", "String", "property", ",", "String", "arg0", ")", "{", "assertPropertyNotNull", "(", "property", ")", ";", "add", "(", "property", ",", "new", "UserMessage", "(", "ERRORS_failed_to_delete_file", ",", "arg...
Add the created action message for the key 'errors.failed_to_delete_file' with parameters. <pre> message: Failed to delete {0} file. </pre> @param property The property name for the message. (NotNull) @param arg0 The parameter arg0 for message. (NotNull) @return this. (NotNull)
[ "Add", "the", "created", "action", "message", "for", "the", "key", "errors", ".", "failed_to_delete_file", "with", "parameters", ".", "<pre", ">", "message", ":", "Failed", "to", "delete", "{", "0", "}", "file", ".", "<", "/", "pre", ">" ]
train
https://github.com/codelibs/fess/blob/e5e4b722549d32a4958dfd94965b21937bfe64cf/src/main/java/org/codelibs/fess/mylasta/action/FessMessages.java#L1462-L1466
samskivert/samskivert
src/main/java/com/samskivert/util/Lifecycle.java
Lifecycle.addInitConstraint
public void addInitConstraint (InitComponent lhs, Constraint constraint, InitComponent rhs) { """ Adds a constraint that a certain component must be initialized before another. """ if (lhs == null || rhs == null) { throw new IllegalArgumentException("Cannot add constraint about null compone...
java
public void addInitConstraint (InitComponent lhs, Constraint constraint, InitComponent rhs) { if (lhs == null || rhs == null) { throw new IllegalArgumentException("Cannot add constraint about null component."); } InitComponent before = (constraint == Constraint.RUNS_BEFORE) ? lhs...
[ "public", "void", "addInitConstraint", "(", "InitComponent", "lhs", ",", "Constraint", "constraint", ",", "InitComponent", "rhs", ")", "{", "if", "(", "lhs", "==", "null", "||", "rhs", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ...
Adds a constraint that a certain component must be initialized before another.
[ "Adds", "a", "constraint", "that", "a", "certain", "component", "must", "be", "initialized", "before", "another", "." ]
train
https://github.com/samskivert/samskivert/blob/a64d9ef42b69819bdb2c66bddac6a64caef928b6/src/main/java/com/samskivert/util/Lifecycle.java#L78-L86
intendia-oss/rxjava-gwt
src/main/modified/io/reactivex/super/io/reactivex/Completable.java
Completable.toSingle
@CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final <T> Single<T> toSingle(final Callable<? extends T> completionValueSupplier) { """ Converts this Completable into a Single which when this Completable completes normally, calls the given supplier and emits its returned value through on...
java
@CheckReturnValue @SchedulerSupport(SchedulerSupport.NONE) public final <T> Single<T> toSingle(final Callable<? extends T> completionValueSupplier) { ObjectHelper.requireNonNull(completionValueSupplier, "completionValueSupplier is null"); return RxJavaPlugins.onAssembly(new CompletableToSingle<T...
[ "@", "CheckReturnValue", "@", "SchedulerSupport", "(", "SchedulerSupport", ".", "NONE", ")", "public", "final", "<", "T", ">", "Single", "<", "T", ">", "toSingle", "(", "final", "Callable", "<", "?", "extends", "T", ">", "completionValueSupplier", ")", "{", ...
Converts this Completable into a Single which when this Completable completes normally, calls the given supplier and emits its returned value through onSuccess. <p> <img width="640" height="583" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Completable.toSingle.png" alt=""> <dl> <dt><b>Scheduler...
[ "Converts", "this", "Completable", "into", "a", "Single", "which", "when", "this", "Completable", "completes", "normally", "calls", "the", "given", "supplier", "and", "emits", "its", "returned", "value", "through", "onSuccess", ".", "<p", ">", "<img", "width", ...
train
https://github.com/intendia-oss/rxjava-gwt/blob/8d5635b12ce40da99e76b59dc6bfe6fc2fffc1fa/src/main/modified/io/reactivex/super/io/reactivex/Completable.java#L2557-L2562
casmi/casmi
src/main/java/casmi/graphics/element/Lines.java
Lines.setStartCornerColor
public void setStartCornerColor(Color color) { """ Sets the start point's color for gradation. @param color The color of the start point. """ if (startColor == null) { startColor = new RGBColor(0.0, 0.0, 0.0); } setGradation(true); this.startColor = color; }
java
public void setStartCornerColor(Color color) { if (startColor == null) { startColor = new RGBColor(0.0, 0.0, 0.0); } setGradation(true); this.startColor = color; }
[ "public", "void", "setStartCornerColor", "(", "Color", "color", ")", "{", "if", "(", "startColor", "==", "null", ")", "{", "startColor", "=", "new", "RGBColor", "(", "0.0", ",", "0.0", ",", "0.0", ")", ";", "}", "setGradation", "(", "true", ")", ";", ...
Sets the start point's color for gradation. @param color The color of the start point.
[ "Sets", "the", "start", "point", "s", "color", "for", "gradation", "." ]
train
https://github.com/casmi/casmi/blob/90f6514a9cbce0685186e7a92beb69e22a3b11c4/src/main/java/casmi/graphics/element/Lines.java#L264-L270
salesforce/Argus
ArgusCore/src/main/java/com/salesforce/dva/argus/service/metric/transform/AnomalyDetectionGaussianTransform.java
AnomalyDetectionGaussianTransform.predictAnomalies
private Metric predictAnomalies(Map<Long, Double> metricData) { """ Assigns an anomaly score to each data point, indicating how likely it is to be an anomaly relative to other points. """ Metric predictions = new Metric(getResultScopeName(), getResultMetricName()); Map<Long, Double> prediction...
java
private Metric predictAnomalies(Map<Long, Double> metricData) { Metric predictions = new Metric(getResultScopeName(), getResultMetricName()); Map<Long, Double> predictionDatapoints = new HashMap<>(); if (variance == 0.0) { /** * If variance is 0, there are no anomalies....
[ "private", "Metric", "predictAnomalies", "(", "Map", "<", "Long", ",", "Double", ">", "metricData", ")", "{", "Metric", "predictions", "=", "new", "Metric", "(", "getResultScopeName", "(", ")", ",", "getResultMetricName", "(", ")", ")", ";", "Map", "<", "L...
Assigns an anomaly score to each data point, indicating how likely it is to be an anomaly relative to other points.
[ "Assigns", "an", "anomaly", "score", "to", "each", "data", "point", "indicating", "how", "likely", "it", "is", "to", "be", "an", "anomaly", "relative", "to", "other", "points", "." ]
train
https://github.com/salesforce/Argus/blob/121b59a268da264316cded6a3e9271366a23cd86/ArgusCore/src/main/java/com/salesforce/dva/argus/service/metric/transform/AnomalyDetectionGaussianTransform.java#L92-L121
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java
BitsUtil.intersectionSize
public static int intersectionSize(long[] x, long[] y) { """ Compute the intersection size of two Bitsets. @param x First bitset @param y Second bitset @return Intersection size """ final int lx = x.length, ly = y.length; final int min = (lx < ly) ? lx : ly; int res = 0; for(int i = 0; i <...
java
public static int intersectionSize(long[] x, long[] y) { final int lx = x.length, ly = y.length; final int min = (lx < ly) ? lx : ly; int res = 0; for(int i = 0; i < min; i++) { res += Long.bitCount(x[i] & y[i]); } return res; }
[ "public", "static", "int", "intersectionSize", "(", "long", "[", "]", "x", ",", "long", "[", "]", "y", ")", "{", "final", "int", "lx", "=", "x", ".", "length", ",", "ly", "=", "y", ".", "length", ";", "final", "int", "min", "=", "(", "lx", "<",...
Compute the intersection size of two Bitsets. @param x First bitset @param y Second bitset @return Intersection size
[ "Compute", "the", "intersection", "size", "of", "two", "Bitsets", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java#L1462-L1470
nulab/backlog4j
src/main/java/com/nulabinc/backlog4j/api/option/AddPullRequestCommentParams.java
AddPullRequestCommentParams.notifiedUserIds
public AddPullRequestCommentParams notifiedUserIds(List<Long> notifiedUserIds) { """ Sets the notified users. @param notifiedUserIds the notified user identifiers @return AddPullRequestCommentParams instance """ for (Long notifiedUserId : notifiedUserIds) { parameters.add(new NameValueP...
java
public AddPullRequestCommentParams notifiedUserIds(List<Long> notifiedUserIds) { for (Long notifiedUserId : notifiedUserIds) { parameters.add(new NameValuePair("notifiedUserId[]", String.valueOf(notifiedUserId))); } return this; }
[ "public", "AddPullRequestCommentParams", "notifiedUserIds", "(", "List", "<", "Long", ">", "notifiedUserIds", ")", "{", "for", "(", "Long", "notifiedUserId", ":", "notifiedUserIds", ")", "{", "parameters", ".", "add", "(", "new", "NameValuePair", "(", "\"notifiedU...
Sets the notified users. @param notifiedUserIds the notified user identifiers @return AddPullRequestCommentParams instance
[ "Sets", "the", "notified", "users", "." ]
train
https://github.com/nulab/backlog4j/blob/862ae0586ad808b2ec413f665b8dfc0c9a107b4e/src/main/java/com/nulabinc/backlog4j/api/option/AddPullRequestCommentParams.java#L52-L57
opencb/biodata
biodata-tools/src/main/java/org/opencb/biodata/tools/variant/VariantNormalizer.java
VariantNormalizer.requireLeftAlignment
static boolean requireLeftAlignment(String reference, String alternate) { """ Reference and alternate are either empty or last base from each is equal @param reference @param alternate @return """ return StringUtils.isEmpty(reference) || StringUtils.isEmpty(alternate) || ...
java
static boolean requireLeftAlignment(String reference, String alternate) { return StringUtils.isEmpty(reference) || StringUtils.isEmpty(alternate) || reference.charAt(reference.length() - 1) == alternate.charAt(alternate.length() - 1); }
[ "static", "boolean", "requireLeftAlignment", "(", "String", "reference", ",", "String", "alternate", ")", "{", "return", "StringUtils", ".", "isEmpty", "(", "reference", ")", "||", "StringUtils", ".", "isEmpty", "(", "alternate", ")", "||", "reference", ".", "...
Reference and alternate are either empty or last base from each is equal @param reference @param alternate @return
[ "Reference", "and", "alternate", "are", "either", "empty", "or", "last", "base", "from", "each", "is", "equal" ]
train
https://github.com/opencb/biodata/blob/21b3d51d71f578efab908422aca4bab7a73097b1/biodata-tools/src/main/java/org/opencb/biodata/tools/variant/VariantNormalizer.java#L766-L771
NoraUi/NoraUi
src/main/java/com/github/noraui/browser/DriverFactory.java
DriverFactory.generateGoogleChromeDriver
private WebDriver generateGoogleChromeDriver() throws TechnicalException { """ Generates a chrome webdriver. @return A chrome webdriver @throws TechnicalException if an error occured when Webdriver setExecutable to true. """ final String pathWebdriver = DriverFactory.getPath(Driver.CHROME); ...
java
private WebDriver generateGoogleChromeDriver() throws TechnicalException { final String pathWebdriver = DriverFactory.getPath(Driver.CHROME); if (!new File(pathWebdriver).setExecutable(true)) { throw new TechnicalException(Messages.getMessage(TechnicalException.TECHNICAL_ERROR_MESSAGE_WEB...
[ "private", "WebDriver", "generateGoogleChromeDriver", "(", ")", "throws", "TechnicalException", "{", "final", "String", "pathWebdriver", "=", "DriverFactory", ".", "getPath", "(", "Driver", ".", "CHROME", ")", ";", "if", "(", "!", "new", "File", "(", "pathWebdri...
Generates a chrome webdriver. @return A chrome webdriver @throws TechnicalException if an error occured when Webdriver setExecutable to true.
[ "Generates", "a", "chrome", "webdriver", "." ]
train
https://github.com/NoraUi/NoraUi/blob/5f491a3339c7d3c20d7207760bdaf2acdb8f260c/src/main/java/com/github/noraui/browser/DriverFactory.java#L142-L176
headius/invokebinder
src/main/java/com/headius/invokebinder/Binder.java
Binder.from
public static Binder from(MethodHandles.Lookup lookup, Class<?> returnType, Class<?> argType0, Class<?>... argTypes) { """ Construct a new Binder using a return type and argument types. @param lookup the Lookup context to use for direct handles @param returnType the return type of the incoming signature @...
java
public static Binder from(MethodHandles.Lookup lookup, Class<?> returnType, Class<?> argType0, Class<?>... argTypes) { return from(lookup, MethodType.methodType(returnType, argType0, argTypes)); }
[ "public", "static", "Binder", "from", "(", "MethodHandles", ".", "Lookup", "lookup", ",", "Class", "<", "?", ">", "returnType", ",", "Class", "<", "?", ">", "argType0", ",", "Class", "<", "?", ">", "...", "argTypes", ")", "{", "return", "from", "(", ...
Construct a new Binder using a return type and argument types. @param lookup the Lookup context to use for direct handles @param returnType the return type of the incoming signature @param argType0 the first argument type of the incoming signature @param argTypes the remaining argument types of the incoming si...
[ "Construct", "a", "new", "Binder", "using", "a", "return", "type", "and", "argument", "types", "." ]
train
https://github.com/headius/invokebinder/blob/ce6bfeb8e33265480daa7b797989dd915d51238d/src/main/java/com/headius/invokebinder/Binder.java#L241-L243
statefulj/statefulj
statefulj-persistence/statefulj-persistence-mongo/src/main/java/org/statefulj/persistence/mongo/MongoCascadeSupport.java
MongoCascadeSupport.onAfterSave
@Override public void onAfterSave(Object source, DBObject dbo) { """ Pass the Save event to the MongoPersister to cascade to the StateDocument (non-Javadoc) @see org.springframework.data.mongodb.core.mapping.event.AbstractMongoEventListener#onBeforeConvert(java.lang.Object) """ this.persister.onAfterSav...
java
@Override public void onAfterSave(Object source, DBObject dbo) { this.persister.onAfterSave(source, dbo); }
[ "@", "Override", "public", "void", "onAfterSave", "(", "Object", "source", ",", "DBObject", "dbo", ")", "{", "this", ".", "persister", ".", "onAfterSave", "(", "source", ",", "dbo", ")", ";", "}" ]
Pass the Save event to the MongoPersister to cascade to the StateDocument (non-Javadoc) @see org.springframework.data.mongodb.core.mapping.event.AbstractMongoEventListener#onBeforeConvert(java.lang.Object)
[ "Pass", "the", "Save", "event", "to", "the", "MongoPersister", "to", "cascade", "to", "the", "StateDocument" ]
train
https://github.com/statefulj/statefulj/blob/d3459b3cb12bd508643027743401484a231e5fa1/statefulj-persistence/statefulj-persistence-mongo/src/main/java/org/statefulj/persistence/mongo/MongoCascadeSupport.java#L40-L43
aws/aws-sdk-java
aws-java-sdk-robomaker/src/main/java/com/amazonaws/services/robomaker/model/DescribeSimulationJobResult.java
DescribeSimulationJobResult.withTags
public DescribeSimulationJobResult withTags(java.util.Map<String, String> tags) { """ <p> The list of all tags added to the specified simulation job. </p> @param tags The list of all tags added to the specified simulation job. @return Returns a reference to this object so that method calls can be chained to...
java
public DescribeSimulationJobResult withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
[ "public", "DescribeSimulationJobResult", "withTags", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "setTags", "(", "tags", ")", ";", "return", "this", ";", "}" ]
<p> The list of all tags added to the specified simulation job. </p> @param tags The list of all tags added to the specified simulation job. @return Returns a reference to this object so that method calls can be chained together.
[ "<p", ">", "The", "list", "of", "all", "tags", "added", "to", "the", "specified", "simulation", "job", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-robomaker/src/main/java/com/amazonaws/services/robomaker/model/DescribeSimulationJobResult.java#L1619-L1622
OpenLiberty/open-liberty
dev/com.ibm.ws.kernel.service.location/src/com/ibm/ws/kernel/service/location/internal/SymbolRegistry.java
SymbolRegistry.resolveRawSymbolicString
String resolveRawSymbolicString(String string) { """ Resolves the given string, evaluating all symbols, but does NOT path-normalize the value. @param string @return The resolved value, not path-normalized. """ if (string == null) throw new NullPointerException("String must be non-nul...
java
String resolveRawSymbolicString(String string) { if (string == null) throw new NullPointerException("String must be non-null"); return resolveStringSymbols(string, string, true, 0, false); }
[ "String", "resolveRawSymbolicString", "(", "String", "string", ")", "{", "if", "(", "string", "==", "null", ")", "throw", "new", "NullPointerException", "(", "\"String must be non-null\"", ")", ";", "return", "resolveStringSymbols", "(", "string", ",", "string", "...
Resolves the given string, evaluating all symbols, but does NOT path-normalize the value. @param string @return The resolved value, not path-normalized.
[ "Resolves", "the", "given", "string", "evaluating", "all", "symbols", "but", "does", "NOT", "path", "-", "normalize", "the", "value", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.service.location/src/com/ibm/ws/kernel/service/location/internal/SymbolRegistry.java#L215-L220
cloudinary/cloudinary_java
cloudinary-core/src/main/java/com/cloudinary/Api.java
Api.deleteStreamingProfile
public ApiResponse deleteStreamingProfile(String name, Map options) throws Exception { """ Delete a streaming profile information. Predefined profiles are restored to the default setting. @param name the name of the profile to delete @param options additional options @return a streaming profile @throws Excepti...
java
public ApiResponse deleteStreamingProfile(String name, Map options) throws Exception { if (options == null) options = ObjectUtils.emptyMap(); List<String> uri = Arrays.asList("streaming_profiles", name); return callApi(HttpMethod.DELETE, uri, ObjectUtils.emptyMap(), options); }
[ "public", "ApiResponse", "deleteStreamingProfile", "(", "String", "name", ",", "Map", "options", ")", "throws", "Exception", "{", "if", "(", "options", "==", "null", ")", "options", "=", "ObjectUtils", ".", "emptyMap", "(", ")", ";", "List", "<", "String", ...
Delete a streaming profile information. Predefined profiles are restored to the default setting. @param name the name of the profile to delete @param options additional options @return a streaming profile @throws Exception an exception
[ "Delete", "a", "streaming", "profile", "information", ".", "Predefined", "profiles", "are", "restored", "to", "the", "default", "setting", "." ]
train
https://github.com/cloudinary/cloudinary_java/blob/58ee1823180da2dea6a2eb7e5cf00d5a760f8aef/cloudinary-core/src/main/java/com/cloudinary/Api.java#L424-L431
zaproxy/zaproxy
src/org/zaproxy/zap/view/StandardFieldsDialog.java
StandardFieldsDialog.setTabsVisible
public void setTabsVisible(String[] tabLabels, boolean visible) { """ Set the visibility of the specified tabs. The labels must have been used to create the tabs in the constructor @param tabLabels the names of the tabs @param visible {@code true} if the tabs should be visible, {@code false} otherwise """ ...
java
public void setTabsVisible(String[] tabLabels, boolean visible) { if (visible) { for (String label : tabLabels) { String name = Constant.messages.getString(label); JPanel tabPanel = this.tabNameMap.get(label); tabbedPane.addTab(name, getTabComponent(tabPanel)); } } else { for (String labe...
[ "public", "void", "setTabsVisible", "(", "String", "[", "]", "tabLabels", ",", "boolean", "visible", ")", "{", "if", "(", "visible", ")", "{", "for", "(", "String", "label", ":", "tabLabels", ")", "{", "String", "name", "=", "Constant", ".", "messages", ...
Set the visibility of the specified tabs. The labels must have been used to create the tabs in the constructor @param tabLabels the names of the tabs @param visible {@code true} if the tabs should be visible, {@code false} otherwise
[ "Set", "the", "visibility", "of", "the", "specified", "tabs", ".", "The", "labels", "must", "have", "been", "used", "to", "create", "the", "tabs", "in", "the", "constructor" ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/view/StandardFieldsDialog.java#L1824-L1837
lamydev/Android-Notification
core/src/zemin/notification/NotificationEntry.java
NotificationEntry.setCancelAction
public void setCancelAction(Action.OnActionListener listener, ComponentName activity, ComponentName service, String broadcast, Bundle extra) { """ Set a action to be fired when this notification gets canceled. @param listener @param activity The activity to be started. @param s...
java
public void setCancelAction(Action.OnActionListener listener, ComponentName activity, ComponentName service, String broadcast, Bundle extra) { setCancelAction(new Action(listener, activity, service, broadcast, extra)); }
[ "public", "void", "setCancelAction", "(", "Action", ".", "OnActionListener", "listener", ",", "ComponentName", "activity", ",", "ComponentName", "service", ",", "String", "broadcast", ",", "Bundle", "extra", ")", "{", "setCancelAction", "(", "new", "Action", "(", ...
Set a action to be fired when this notification gets canceled. @param listener @param activity The activity to be started. @param service The service to be started. @param broadcast The broadcast to be sent. @param extra Intent extra.
[ "Set", "a", "action", "to", "be", "fired", "when", "this", "notification", "gets", "canceled", "." ]
train
https://github.com/lamydev/Android-Notification/blob/6d6571d2862cb6edbacf9a78125418f7d621c3f8/core/src/zemin/notification/NotificationEntry.java#L493-L496
apache/flink
flink-optimizer/src/main/java/org/apache/flink/optimizer/dag/OptimizerNode.java
OptimizerNode.areBranchCompatible
protected boolean areBranchCompatible(PlanNode plan1, PlanNode plan2) { """ Checks whether to candidate plans for the sub-plan of this node are comparable. The two alternative plans are comparable, if a) There is no branch in the sub-plan of this node b) Both candidates have the same candidate as the child at...
java
protected boolean areBranchCompatible(PlanNode plan1, PlanNode plan2) { if (plan1 == null || plan2 == null) { throw new NullPointerException(); } // if there is no open branch, the children are always compatible. // in most plans, that will be the dominant case if (this.hereJoinedBranches == null || thi...
[ "protected", "boolean", "areBranchCompatible", "(", "PlanNode", "plan1", ",", "PlanNode", "plan2", ")", "{", "if", "(", "plan1", "==", "null", "||", "plan2", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", ")", ";", "}", "// if there is ...
Checks whether to candidate plans for the sub-plan of this node are comparable. The two alternative plans are comparable, if a) There is no branch in the sub-plan of this node b) Both candidates have the same candidate as the child at the last open branch. @param plan1 The root node of the first candidate plan. @para...
[ "Checks", "whether", "to", "candidate", "plans", "for", "the", "sub", "-", "plan", "of", "this", "node", "are", "comparable", ".", "The", "two", "alternative", "plans", "are", "comparable", "if" ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-optimizer/src/main/java/org/apache/flink/optimizer/dag/OptimizerNode.java#L970-L990
JM-Lab/utils-java8
src/main/java/kr/jm/utils/helper/JMStream.java
JMStream.buildTokenStream
public static Stream<String> buildTokenStream(String text, String delimiter) { """ Build token stream stream. @param text the text @param delimiter the delimiter @return the stream """ return JMStream.buildStream(delimiter == null ? new StringTokenizer( text) : new...
java
public static Stream<String> buildTokenStream(String text, String delimiter) { return JMStream.buildStream(delimiter == null ? new StringTokenizer( text) : new StringTokenizer(text, delimiter)) .map(o -> (String) o); }
[ "public", "static", "Stream", "<", "String", ">", "buildTokenStream", "(", "String", "text", ",", "String", "delimiter", ")", "{", "return", "JMStream", ".", "buildStream", "(", "delimiter", "==", "null", "?", "new", "StringTokenizer", "(", "text", ")", ":",...
Build token stream stream. @param text the text @param delimiter the delimiter @return the stream
[ "Build", "token", "stream", "stream", "." ]
train
https://github.com/JM-Lab/utils-java8/blob/9e407b3f28a7990418a1e877229fa8344f4d78a5/src/main/java/kr/jm/utils/helper/JMStream.java#L192-L197
LearnLib/automatalib
commons/util/src/main/java/net/automatalib/commons/util/ReflectUtil.java
ReflectUtil.findMatchingMethod
public static Method findMatchingMethod(Class<?> clazz, String name, Object... args) { """ See {@link #findMethod(Class, String, Class...)}. This variation does not required the types of input parameters, but can handle the actual objects, which should be passed to the method. @param clazz the class which sho...
java
public static Method findMatchingMethod(Class<?> clazz, String name, Object... args) { for (Method m : clazz.getMethods()) { if (!m.getName().equals(name)) { continue; } if (isMatch(m.getParameterTypes(), args)) { return m; } ...
[ "public", "static", "Method", "findMatchingMethod", "(", "Class", "<", "?", ">", "clazz", ",", "String", "name", ",", "Object", "...", "args", ")", "{", "for", "(", "Method", "m", ":", "clazz", ".", "getMethods", "(", ")", ")", "{", "if", "(", "!", ...
See {@link #findMethod(Class, String, Class...)}. This variation does not required the types of input parameters, but can handle the actual objects, which should be passed to the method. @param clazz the class which should be scanned for methods @param name the name of the method @param args the objects that should be...
[ "See", "{", "@link", "#findMethod", "(", "Class", "String", "Class", "...", ")", "}", ".", "This", "variation", "does", "not", "required", "the", "types", "of", "input", "parameters", "but", "can", "handle", "the", "actual", "objects", "which", "should", "...
train
https://github.com/LearnLib/automatalib/blob/8a462ec52f6eaab9f8996e344f2163a72cb8aa6e/commons/util/src/main/java/net/automatalib/commons/util/ReflectUtil.java#L117-L129
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/ComparableTimSort.java
ComparableTimSort.reverseRange
private static void reverseRange(Object[] a, int lo, int hi) { """ Reverse the specified range of the specified array. @param a the array in which a range is to be reversed @param lo the index of the first element in the range to be reversed @param hi the index after the last element in the range to be revers...
java
private static void reverseRange(Object[] a, int lo, int hi) { hi--; while (lo < hi) { Object t = a[lo]; a[lo++] = a[hi]; a[hi--] = t; } }
[ "private", "static", "void", "reverseRange", "(", "Object", "[", "]", "a", ",", "int", "lo", ",", "int", "hi", ")", "{", "hi", "--", ";", "while", "(", "lo", "<", "hi", ")", "{", "Object", "t", "=", "a", "[", "lo", "]", ";", "a", "[", "lo", ...
Reverse the specified range of the specified array. @param a the array in which a range is to be reversed @param lo the index of the first element in the range to be reversed @param hi the index after the last element in the range to be reversed
[ "Reverse", "the", "specified", "range", "of", "the", "specified", "array", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/ComparableTimSort.java#L339-L346
mapsforge/mapsforge
mapsforge-map-writer/src/main/java/org/mapsforge/map/writer/model/OSMTag.java
OSMTag.fromOSMTag
public static OSMTag fromOSMTag(OSMTag otherTag, short newID) { """ Convenience method that constructs a new OSMTag with a new id from another OSMTag. @param otherTag the OSMTag to copy @param newID the new id @return a newly constructed OSMTag with the attributes of otherTag """ return new OSM...
java
public static OSMTag fromOSMTag(OSMTag otherTag, short newID) { return new OSMTag(newID, otherTag.getKey(), otherTag.getValue(), otherTag.getZoomAppear(), otherTag.isRenderable(), otherTag.isForcePolygonLine(), otherTag.isLabelPosition()); }
[ "public", "static", "OSMTag", "fromOSMTag", "(", "OSMTag", "otherTag", ",", "short", "newID", ")", "{", "return", "new", "OSMTag", "(", "newID", ",", "otherTag", ".", "getKey", "(", ")", ",", "otherTag", ".", "getValue", "(", ")", ",", "otherTag", ".", ...
Convenience method that constructs a new OSMTag with a new id from another OSMTag. @param otherTag the OSMTag to copy @param newID the new id @return a newly constructed OSMTag with the attributes of otherTag
[ "Convenience", "method", "that", "constructs", "a", "new", "OSMTag", "with", "a", "new", "id", "from", "another", "OSMTag", "." ]
train
https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/mapsforge-map-writer/src/main/java/org/mapsforge/map/writer/model/OSMTag.java#L33-L36
sagiegurari/fax4j
src/main/java/org/fax4j/util/SpiUtil.java
SpiUtil.formatTemplate
public static String formatTemplate(String template,FaxJob faxJob,TemplateParameterEncoder encoder,boolean getFileContent,boolean fullFilePath) { """ This function formats the provided template. @param template The template @param faxJob The fax job object @param encoder The encoder that encodes the ...
java
public static String formatTemplate(String template,FaxJob faxJob,TemplateParameterEncoder encoder,boolean getFileContent,boolean fullFilePath) { //get logger LoggerManager loggerManager=LoggerManager.getInstance(); Logger logger=loggerManager.getLogger(); //log logger.logDe...
[ "public", "static", "String", "formatTemplate", "(", "String", "template", ",", "FaxJob", "faxJob", ",", "TemplateParameterEncoder", "encoder", ",", "boolean", "getFileContent", ",", "boolean", "fullFilePath", ")", "{", "//get logger", "LoggerManager", "loggerManager", ...
This function formats the provided template. @param template The template @param faxJob The fax job object @param encoder The encoder that encodes the template values (may be null) @param getFileContent True to get the file content, false to get the file path for the file template parameter @param fullFilePa...
[ "This", "function", "formats", "the", "provided", "template", "." ]
train
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/util/SpiUtil.java#L120-L168
jbundle/jbundle
main/screen/src/main/java/org/jbundle/main/user/screen/UserPreferenceScreen.java
UserPreferenceScreen.doCommand
public boolean doCommand(String strCommand, ScreenField sourceSField, int iCommandOptions) { """ Process the command. <br />Step 1 - Process the command if possible and return true if processed. <br />Step 2 - If I can't process, pass to all children (with me as the source). <br />Step 3 - If children didn't pr...
java
public boolean doCommand(String strCommand, ScreenField sourceSField, int iCommandOptions) { if (UserPasswordChange.CHANGE_PASSWORD.equalsIgnoreCase(strCommand)) { ScreenLocation itsLocation = null; BasePanel parentScreen = this.getParentScreen(); if ((iCommandOpt...
[ "public", "boolean", "doCommand", "(", "String", "strCommand", ",", "ScreenField", "sourceSField", ",", "int", "iCommandOptions", ")", "{", "if", "(", "UserPasswordChange", ".", "CHANGE_PASSWORD", ".", "equalsIgnoreCase", "(", "strCommand", ")", ")", "{", "ScreenL...
Process the command. <br />Step 1 - Process the command if possible and return true if processed. <br />Step 2 - If I can't process, pass to all children (with me as the source). <br />Step 3 - If children didn't process, pass to parent (with me as the source). <br />Note: Never pass to a parent or child that matches t...
[ "Process", "the", "command", ".", "<br", "/", ">", "Step", "1", "-", "Process", "the", "command", "if", "possible", "and", "return", "true", "if", "processed", ".", "<br", "/", ">", "Step", "2", "-", "If", "I", "can", "t", "process", "pass", "to", ...
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/main/screen/src/main/java/org/jbundle/main/user/screen/UserPreferenceScreen.java#L166-L192
buschmais/jqa-javaee6-plugin
src/main/java/com/buschmais/jqassistant/plugin/javaee6/impl/scanner/XmlDescriptorHelper.java
XmlDescriptorHelper.createDescription
public static DescriptionDescriptor createDescription(DescriptionType descriptionType, Store store) { """ Create a description descriptor. @param descriptionType The XML description type. @param store The store. @return The description descriptor. """ DescriptionDescriptor descriptionDescriptor ...
java
public static DescriptionDescriptor createDescription(DescriptionType descriptionType, Store store) { DescriptionDescriptor descriptionDescriptor = store.create(DescriptionDescriptor.class); descriptionDescriptor.setLang(descriptionType.getLang()); descriptionDescriptor.setValue(descriptionType....
[ "public", "static", "DescriptionDescriptor", "createDescription", "(", "DescriptionType", "descriptionType", ",", "Store", "store", ")", "{", "DescriptionDescriptor", "descriptionDescriptor", "=", "store", ".", "create", "(", "DescriptionDescriptor", ".", "class", ")", ...
Create a description descriptor. @param descriptionType The XML description type. @param store The store. @return The description descriptor.
[ "Create", "a", "description", "descriptor", "." ]
train
https://github.com/buschmais/jqa-javaee6-plugin/blob/f5776604d9255206807e5aca90b8767bde494e14/src/main/java/com/buschmais/jqassistant/plugin/javaee6/impl/scanner/XmlDescriptorHelper.java#L22-L27
basho/riak-java-client
src/main/java/com/basho/riak/client/api/RiakClient.java
RiakClient.newClient
public static RiakClient newClient(RiakNode.Builder nodeBuilder, List<String> addresses) throws UnknownHostException { """ NB: IntelliJ will see the above @see statement as invalid, but it's correct: https://bugs.openjdk.java.net/browse/JDK-8031625 """ final RiakCluster cluster = new RiakCluster.Build...
java
public static RiakClient newClient(RiakNode.Builder nodeBuilder, List<String> addresses) throws UnknownHostException { final RiakCluster cluster = new RiakCluster.Builder(nodeBuilder, addresses).build(); cluster.start(); return new RiakClient(cluster); }
[ "public", "static", "RiakClient", "newClient", "(", "RiakNode", ".", "Builder", "nodeBuilder", ",", "List", "<", "String", ">", "addresses", ")", "throws", "UnknownHostException", "{", "final", "RiakCluster", "cluster", "=", "new", "RiakCluster", ".", "Builder", ...
NB: IntelliJ will see the above @see statement as invalid, but it's correct: https://bugs.openjdk.java.net/browse/JDK-8031625
[ "NB", ":", "IntelliJ", "will", "see", "the", "above" ]
train
https://github.com/basho/riak-java-client/blob/bed6cd60f360bacf1b873ab92dd74f2526651e71/src/main/java/com/basho/riak/client/api/RiakClient.java#L284-L290
s1-platform/s1
s1-core/src/java/org/s1/ws/SOAPHelper.java
SOAPHelper.writeDataHandler
public static void writeDataHandler(boolean mtom, SOAPMessage msg, Element el, DataHandler dh) { """ Write binary data to message as base64 or xop:Include depending on mtom parameter. @param mtom @param msg @param el @param dh """ LOG.debug("Writing DataHandler, mtom: "+mtom+", contentType: "+dh....
java
public static void writeDataHandler(boolean mtom, SOAPMessage msg, Element el, DataHandler dh){ LOG.debug("Writing DataHandler, mtom: "+mtom+", contentType: "+dh.getContentType()); if(mtom){ Element inc = el.getOwnerDocument().createElementNS("http://www.w3.org/2004/08/xop/include","Include"...
[ "public", "static", "void", "writeDataHandler", "(", "boolean", "mtom", ",", "SOAPMessage", "msg", ",", "Element", "el", ",", "DataHandler", "dh", ")", "{", "LOG", ".", "debug", "(", "\"Writing DataHandler, mtom: \"", "+", "mtom", "+", "\", contentType: \"", "+"...
Write binary data to message as base64 or xop:Include depending on mtom parameter. @param mtom @param msg @param el @param dh
[ "Write", "binary", "data", "to", "message", "as", "base64", "or", "xop", ":", "Include", "depending", "on", "mtom", "parameter", "." ]
train
https://github.com/s1-platform/s1/blob/370101c13fef01af524bc171bcc1a97e5acc76e8/s1-core/src/java/org/s1/ws/SOAPHelper.java#L324-L343
eurekaclinical/eurekaclinical-common
src/main/java/org/eurekaclinical/common/comm/clients/EurekaClinicalClient.java
EurekaClinicalClient.doPostCreateMultipart
protected URI doPostCreateMultipart(String path, FormDataMultiPart formDataMultiPart) throws ClientException { """ Creates a resource specified as a multi-part form. Adds appropriate Accepts and Content Type headers. @param path the the API to call. @param formDataMultiPart the form content. @return the URI ...
java
protected URI doPostCreateMultipart(String path, FormDataMultiPart formDataMultiPart) throws ClientException { this.readLock.lock(); try { ClientResponse response = getResourceWrapper() .rewritten(path, HttpMethod.POST) .type(Boundary.addBoundary(Media...
[ "protected", "URI", "doPostCreateMultipart", "(", "String", "path", ",", "FormDataMultiPart", "formDataMultiPart", ")", "throws", "ClientException", "{", "this", ".", "readLock", ".", "lock", "(", ")", ";", "try", "{", "ClientResponse", "response", "=", "getResour...
Creates a resource specified as a multi-part form. Adds appropriate Accepts and Content Type headers. @param path the the API to call. @param formDataMultiPart the form content. @return the URI representing the created resource, for use in subsequent operations on the resource. @throws ClientException if a status code...
[ "Creates", "a", "resource", "specified", "as", "a", "multi", "-", "part", "form", ".", "Adds", "appropriate", "Accepts", "and", "Content", "Type", "headers", "." ]
train
https://github.com/eurekaclinical/eurekaclinical-common/blob/1867102ff43fe94e519f76a074d5f5923e9be61c/src/main/java/org/eurekaclinical/common/comm/clients/EurekaClinicalClient.java#L832-L851
apache/reef
lang/java/reef-runtime-yarn/src/main/java/org/apache/reef/runtime/yarn/client/YarnSubmissionHelper.java
YarnSubmissionHelper.setJobSubmissionEnvVariable
public YarnSubmissionHelper setJobSubmissionEnvVariable(final String key, final String value) { """ Adds a job submission environment variable. @param key @param value @return """ environmentVariablesMap.put(key, value); return this; }
java
public YarnSubmissionHelper setJobSubmissionEnvVariable(final String key, final String value) { environmentVariablesMap.put(key, value); return this; }
[ "public", "YarnSubmissionHelper", "setJobSubmissionEnvVariable", "(", "final", "String", "key", ",", "final", "String", "value", ")", "{", "environmentVariablesMap", ".", "put", "(", "key", ",", "value", ")", ";", "return", "this", ";", "}" ]
Adds a job submission environment variable. @param key @param value @return
[ "Adds", "a", "job", "submission", "environment", "variable", "." ]
train
https://github.com/apache/reef/blob/e2c47121cde21108a602c560cf76565a40d0e916/lang/java/reef-runtime-yarn/src/main/java/org/apache/reef/runtime/yarn/client/YarnSubmissionHelper.java#L268-L271
jingwei/krati
krati-main/src/main/java/krati/core/array/entry/EntryValueShortFactory.java
EntryValueShortFactory.reinitValue
@Override public void reinitValue(DataReader in, EntryValueShort value) throws IOException { """ Read data from stream to populate an EntryValueShort. @param in data reader for EntryValueShort. @param value an EntryValue to populate. @throws IOException """ value.reinit(in.readInt(), /* ar...
java
@Override public void reinitValue(DataReader in, EntryValueShort value) throws IOException { value.reinit(in.readInt(), /* array position */ in.readShort(), /* data value */ in.readLong() /* SCN value */); }
[ "@", "Override", "public", "void", "reinitValue", "(", "DataReader", "in", ",", "EntryValueShort", "value", ")", "throws", "IOException", "{", "value", ".", "reinit", "(", "in", ".", "readInt", "(", ")", ",", "/* array position */", "in", ".", "readShort", "...
Read data from stream to populate an EntryValueShort. @param in data reader for EntryValueShort. @param value an EntryValue to populate. @throws IOException
[ "Read", "data", "from", "stream", "to", "populate", "an", "EntryValueShort", "." ]
train
https://github.com/jingwei/krati/blob/1ca0f994a7b0c8215b827eac9aaf95789ec08d21/krati-main/src/main/java/krati/core/array/entry/EntryValueShortFactory.java#L67-L72
apache/reef
lang/java/reef-bridge-client/src/main/java/org/apache/reef/bridge/client/LocalRuntimeDriverConfigurationGenerator.java
LocalRuntimeDriverConfigurationGenerator.writeConfiguration
public Configuration writeConfiguration(final File jobFolder, final String jobId, final String clientRemoteId) throws IOException { """ Writes driver configuration to disk. @param jobFolder The folder in which the job is staged. ...
java
public Configuration writeConfiguration(final File jobFolder, final String jobId, final String clientRemoteId) throws IOException { final File driverFolder = new File(jobFolder, PreparedDriverFolderLauncher.DRIVER_FOLDER_NAME); ...
[ "public", "Configuration", "writeConfiguration", "(", "final", "File", "jobFolder", ",", "final", "String", "jobId", ",", "final", "String", "clientRemoteId", ")", "throws", "IOException", "{", "final", "File", "driverFolder", "=", "new", "File", "(", "jobFolder",...
Writes driver configuration to disk. @param jobFolder The folder in which the job is staged. @param jobId id of the job to be submitted @param clientRemoteId The client remote id @return the configuration @throws IOException
[ "Writes", "driver", "configuration", "to", "disk", "." ]
train
https://github.com/apache/reef/blob/e2c47121cde21108a602c560cf76565a40d0e916/lang/java/reef-bridge-client/src/main/java/org/apache/reef/bridge/client/LocalRuntimeDriverConfigurationGenerator.java#L69-L92
JM-Lab/utils-java8
src/main/java/kr/jm/utils/helper/JMLambda.java
JMLambda.runAndReturn
public static <R> R runAndReturn(Runnable runnable, R returnObject) { """ Run and return r. @param <R> the type parameter @param runnable the runnable @param returnObject the return object @return the r """ return runAndReturn(runnable, () -> returnObject); }
java
public static <R> R runAndReturn(Runnable runnable, R returnObject) { return runAndReturn(runnable, () -> returnObject); }
[ "public", "static", "<", "R", ">", "R", "runAndReturn", "(", "Runnable", "runnable", ",", "R", "returnObject", ")", "{", "return", "runAndReturn", "(", "runnable", ",", "(", ")", "->", "returnObject", ")", ";", "}" ]
Run and return r. @param <R> the type parameter @param runnable the runnable @param returnObject the return object @return the r
[ "Run", "and", "return", "r", "." ]
train
https://github.com/JM-Lab/utils-java8/blob/9e407b3f28a7990418a1e877229fa8344f4d78a5/src/main/java/kr/jm/utils/helper/JMLambda.java#L463-L465
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Punycode.java
Punycode.digitToBasic
private static char digitToBasic(int digit, boolean uppercase) { """ digitToBasic() returns the basic code point whose value (when used for representing integers) is d, which must be in the range 0 to BASE-1. The lowercase form is used unless the uppercase flag is nonzero, in which case the uppercase form is us...
java
private static char digitToBasic(int digit, boolean uppercase) { /* 0..25 map to ASCII a..z or A..Z */ /* 26..35 map to ASCII 0..9 */ if(digit<26) { if(uppercase) { return (char)(CAPITAL_A+digit); } else { return (char)(SMALL_A+dig...
[ "private", "static", "char", "digitToBasic", "(", "int", "digit", ",", "boolean", "uppercase", ")", "{", "/* 0..25 map to ASCII a..z or A..Z */", "/* 26..35 map to ASCII 0..9 */", "if", "(", "digit", "<", "26", ")", "{", "if", "(", "uppercase", ")", "{", ...
digitToBasic() returns the basic code point whose value (when used for representing integers) is d, which must be in the range 0 to BASE-1. The lowercase form is used unless the uppercase flag is nonzero, in which case the uppercase form is used.
[ "digitToBasic", "()", "returns", "the", "basic", "code", "point", "whose", "value", "(", "when", "used", "for", "representing", "integers", ")", "is", "d", "which", "must", "be", "in", "the", "range", "0", "to", "BASE", "-", "1", ".", "The", "lowercase",...
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/impl/Punycode.java#L112-L124
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/evaluation/classification/Evaluation.java
Evaluation.eval
public void eval(INDArray realOutcomes, INDArray guesses) { """ Collects statistics on the real outcomes vs the guesses. This is for logistic outcome matrices. <p> Note that an IllegalArgumentException is thrown if the two passed in matrices aren't the same length. @param realOutcomes the real outcomes (lab...
java
public void eval(INDArray realOutcomes, INDArray guesses) { eval(realOutcomes, guesses, (List<Serializable>) null); }
[ "public", "void", "eval", "(", "INDArray", "realOutcomes", ",", "INDArray", "guesses", ")", "{", "eval", "(", "realOutcomes", ",", "guesses", ",", "(", "List", "<", "Serializable", ">", ")", "null", ")", ";", "}" ]
Collects statistics on the real outcomes vs the guesses. This is for logistic outcome matrices. <p> Note that an IllegalArgumentException is thrown if the two passed in matrices aren't the same length. @param realOutcomes the real outcomes (labels - usually binary) @param guesses the guesses/prediction (usually a...
[ "Collects", "statistics", "on", "the", "real", "outcomes", "vs", "the", "guesses", ".", "This", "is", "for", "logistic", "outcome", "matrices", ".", "<p", ">", "Note", "that", "an", "IllegalArgumentException", "is", "thrown", "if", "the", "two", "passed", "i...
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/evaluation/classification/Evaluation.java#L351-L353
casmi/casmi
src/main/java/casmi/graphics/element/Polygon.java
Polygon.setVertex
public void setVertex(int i, double x, double y, double z) { """ Sets the coordinates of the corner. @param i The index number of the point. @param x The x-coordinate of the point. @param y The y-coordinate of the point. @param z The z-coordinate of the point. """ this.cornerX.set(i, x); ...
java
public void setVertex(int i, double x, double y, double z) { this.cornerX.set(i, x); this.cornerY.set(i, y); this.cornerZ.set(i, z); calcG(); }
[ "public", "void", "setVertex", "(", "int", "i", ",", "double", "x", ",", "double", "y", ",", "double", "z", ")", "{", "this", ".", "cornerX", ".", "set", "(", "i", ",", "x", ")", ";", "this", ".", "cornerY", ".", "set", "(", "i", ",", "y", ")...
Sets the coordinates of the corner. @param i The index number of the point. @param x The x-coordinate of the point. @param y The y-coordinate of the point. @param z The z-coordinate of the point.
[ "Sets", "the", "coordinates", "of", "the", "corner", "." ]
train
https://github.com/casmi/casmi/blob/90f6514a9cbce0685186e7a92beb69e22a3b11c4/src/main/java/casmi/graphics/element/Polygon.java#L160-L165
lucee/Lucee
core/src/main/java/lucee/runtime/crypt/BinConverter.java
BinConverter.byteArrayToLong
public static long byteArrayToLong(byte[] buffer, int nStartIndex) { """ gets bytes from an array into a long @param buffer where to get the bytes @param nStartIndex index from where to read the data @return the 64bit integer """ return (((long) buffer[nStartIndex]) << 56) | ((buffer[nStartIndex + 1] & ...
java
public static long byteArrayToLong(byte[] buffer, int nStartIndex) { return (((long) buffer[nStartIndex]) << 56) | ((buffer[nStartIndex + 1] & 0x0ffL) << 48) | ((buffer[nStartIndex + 2] & 0x0ffL) << 40) | ((buffer[nStartIndex + 3] & 0x0ffL) << 32) | ((buffer[nStartIndex + 4] & 0x0ffL) << 24) | ((buffer[nStartIndex ...
[ "public", "static", "long", "byteArrayToLong", "(", "byte", "[", "]", "buffer", ",", "int", "nStartIndex", ")", "{", "return", "(", "(", "(", "long", ")", "buffer", "[", "nStartIndex", "]", ")", "<<", "56", ")", "|", "(", "(", "buffer", "[", "nStartI...
gets bytes from an array into a long @param buffer where to get the bytes @param nStartIndex index from where to read the data @return the 64bit integer
[ "gets", "bytes", "from", "an", "array", "into", "a", "long" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/crypt/BinConverter.java#L30-L36
apache/flink
flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/plan/nodes/exec/NodeResourceConfig.java
NodeResourceConfig.calOperatorParallelism
public static int calOperatorParallelism(double rowCount, Configuration tableConf) { """ Calculates operator parallelism based on rowcount of the operator. @param rowCount rowCount of the operator @param tableConf Configuration. @return the result of operator parallelism. """ int maxParallelism = getOpe...
java
public static int calOperatorParallelism(double rowCount, Configuration tableConf) { int maxParallelism = getOperatorMaxParallelism(tableConf); int minParallelism = getOperatorMinParallelism(tableConf); int resultParallelism = (int) (rowCount / getRowCountPerPartition(tableConf)); return Math.max(Math.min(resul...
[ "public", "static", "int", "calOperatorParallelism", "(", "double", "rowCount", ",", "Configuration", "tableConf", ")", "{", "int", "maxParallelism", "=", "getOperatorMaxParallelism", "(", "tableConf", ")", ";", "int", "minParallelism", "=", "getOperatorMinParallelism",...
Calculates operator parallelism based on rowcount of the operator. @param rowCount rowCount of the operator @param tableConf Configuration. @return the result of operator parallelism.
[ "Calculates", "operator", "parallelism", "based", "on", "rowcount", "of", "the", "operator", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-table/flink-table-planner-blink/src/main/java/org/apache/flink/table/plan/nodes/exec/NodeResourceConfig.java#L74-L79
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.jms.2.0/src/com/ibm/ws/sib/api/jms/impl/JmsMsgProducerImpl.java
JmsMsgProducerImpl.sendUsingProducerSession
private void sendUsingProducerSession(Message message, int deliveryMode, int priority, long timeToLive) throws JMSException { """ This method is internal method which would send message to ME on top of producer session. This is called from Sync send and Async Send. In case of Sync send it would have guarded with...
java
private void sendUsingProducerSession(Message message, int deliveryMode, int priority, long timeToLive) throws JMSException { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(this, tc, "sendUsingProducerSession", new Object[] { message, deliveryMode, priority, timeToLive ...
[ "private", "void", "sendUsingProducerSession", "(", "Message", "message", ",", "int", "deliveryMode", ",", "int", "priority", ",", "long", "timeToLive", ")", "throws", "JMSException", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", ...
This method is internal method which would send message to ME on top of producer session. This is called from Sync send and Async Send. In case of Sync send it would have guarded with monitor sessionSyncLock. @param message @param deliveryMode @param priority @param timeToLive @throws JMSException
[ "This", "method", "is", "internal", "method", "which", "would", "send", "message", "to", "ME", "on", "top", "of", "producer", "session", ".", "This", "is", "called", "from", "Sync", "send", "and", "Async", "Send", ".", "In", "case", "of", "Sync", "send",...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.jms.2.0/src/com/ibm/ws/sib/api/jms/impl/JmsMsgProducerImpl.java#L823-L858
jbundle/jbundle
base/screen/model/src/main/java/org/jbundle/base/screen/model/BasePanel.java
BasePanel.handleCommand
public boolean handleCommand(String strCommand, ScreenField sourceSField, int iUseSameWindow) { """ Process the command. Step 1 - Process the command if possible and return true if processed. Step 2 - If I can't process, pass to all children (with me as the source). Step 3 - If children didn't process, pass to ...
java
public boolean handleCommand(String strCommand, ScreenField sourceSField, int iUseSameWindow) { boolean bHandled = this.doCommand(strCommand, sourceSField, iUseSameWindow); // Do I handle it? if (bHandled == false) { // Not handled by this screen, try child windows for (int ...
[ "public", "boolean", "handleCommand", "(", "String", "strCommand", ",", "ScreenField", "sourceSField", ",", "int", "iUseSameWindow", ")", "{", "boolean", "bHandled", "=", "this", ".", "doCommand", "(", "strCommand", ",", "sourceSField", ",", "iUseSameWindow", ")",...
Process the command. Step 1 - Process the command if possible and return true if processed. Step 2 - If I can't process, pass to all children (with me as the source). Step 3 - If children didn't process, pass to parent (with me as the source). Note: Never pass to a parent or child that matches the source (to avoid an e...
[ "Process", "the", "command", ".", "Step", "1", "-", "Process", "the", "command", "if", "possible", "and", "return", "true", "if", "processed", ".", "Step", "2", "-", "If", "I", "can", "t", "process", "pass", "to", "all", "children", "(", "with", "me", ...
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/model/src/main/java/org/jbundle/base/screen/model/BasePanel.java#L389-L409
zxing/zxing
core/src/main/java/com/google/zxing/qrcode/detector/AlignmentPatternFinder.java
AlignmentPatternFinder.handlePossibleCenter
private AlignmentPattern handlePossibleCenter(int[] stateCount, int i, int j) { """ <p>This is called when a horizontal scan finds a possible alignment pattern. It will cross check with a vertical scan, and if successful, will see if this pattern had been found on a previous horizontal scan. If so, we consider i...
java
private AlignmentPattern handlePossibleCenter(int[] stateCount, int i, int j) { int stateCountTotal = stateCount[0] + stateCount[1] + stateCount[2]; float centerJ = centerFromEnd(stateCount, j); float centerI = crossCheckVertical(i, (int) centerJ, 2 * stateCount[1], stateCountTotal); if (!Float.isNaN(ce...
[ "private", "AlignmentPattern", "handlePossibleCenter", "(", "int", "[", "]", "stateCount", ",", "int", "i", ",", "int", "j", ")", "{", "int", "stateCountTotal", "=", "stateCount", "[", "0", "]", "+", "stateCount", "[", "1", "]", "+", "stateCount", "[", "...
<p>This is called when a horizontal scan finds a possible alignment pattern. It will cross check with a vertical scan, and if successful, will see if this pattern had been found on a previous horizontal scan. If so, we consider it confirmed and conclude we have found the alignment pattern.</p> @param stateCount readin...
[ "<p", ">", "This", "is", "called", "when", "a", "horizontal", "scan", "finds", "a", "possible", "alignment", "pattern", ".", "It", "will", "cross", "check", "with", "a", "vertical", "scan", "and", "if", "successful", "will", "see", "if", "this", "pattern",...
train
https://github.com/zxing/zxing/blob/653ac2a3beb11481eff82e7d5f2bab8a745f7fac/core/src/main/java/com/google/zxing/qrcode/detector/AlignmentPatternFinder.java#L255-L275
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/factory/geo/FactoryMultiViewRobust.java
FactoryMultiViewRobust.baselineRansac
public static ModelMatcherMultiview<Se3_F64, AssociatedPair> baselineRansac(@Nullable ConfigEssential essential, @Nonnull ConfigRansac ransac ) { """ Robust solution for estimating the stereo baseline {@link Se3_F64} using epipolar geometry from two views with {@link RansacMultiView}. Input o...
java
public static ModelMatcherMultiview<Se3_F64, AssociatedPair> baselineRansac(@Nullable ConfigEssential essential, @Nonnull ConfigRansac ransac ) { if( essential == null ) essential = new ConfigEssential(); else essential.checkValidity(); ransac.checkValidity(); if( essential.errorMode...
[ "public", "static", "ModelMatcherMultiview", "<", "Se3_F64", ",", "AssociatedPair", ">", "baselineRansac", "(", "@", "Nullable", "ConfigEssential", "essential", ",", "@", "Nonnull", "ConfigRansac", "ransac", ")", "{", "if", "(", "essential", "==", "null", ")", "...
Robust solution for estimating the stereo baseline {@link Se3_F64} using epipolar geometry from two views with {@link RansacMultiView}. Input observations are in normalized image coordinates. <p>See code for all the details.</p> @param essential Essential matrix estimation parameters. @param ransac Parameters for RA...
[ "Robust", "solution", "for", "estimating", "the", "stereo", "baseline", "{", "@link", "Se3_F64", "}", "using", "epipolar", "geometry", "from", "two", "views", "with", "{", "@link", "RansacMultiView", "}", ".", "Input", "observations", "are", "in", "normalized", ...
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/factory/geo/FactoryMultiViewRobust.java#L212-L241
cdk/cdk
tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/AtomTetrahedralLigandPlacer3D.java
AtomTetrahedralLigandPlacer3D.calculate3DCoordinates3
public Point3d calculate3DCoordinates3(Point3d aPoint, Point3d bPoint, Point3d cPoint, Point3d dPoint, double length) { """ Calculate new point X in a B-A(-D)-C system. It forms a B-A(-D)(-C)-X system. (3) 3 ligands(B, C, D) of refAtom A (i) 1 points required; if A, B, C, D coplanar, no points. else vector is re...
java
public Point3d calculate3DCoordinates3(Point3d aPoint, Point3d bPoint, Point3d cPoint, Point3d dPoint, double length) { //logger.debug("3DCoordinates3"); Vector3d bc = new Vector3d(bPoint); bc.sub(cPoint); Vector3d dc = new Vector3d(dPoint); dc.sub(cPoint); Vector3d ca = ...
[ "public", "Point3d", "calculate3DCoordinates3", "(", "Point3d", "aPoint", ",", "Point3d", "bPoint", ",", "Point3d", "cPoint", ",", "Point3d", "dPoint", ",", "double", "length", ")", "{", "//logger.debug(\"3DCoordinates3\");", "Vector3d", "bc", "=", "new", "Vector3d"...
Calculate new point X in a B-A(-D)-C system. It forms a B-A(-D)(-C)-X system. (3) 3 ligands(B, C, D) of refAtom A (i) 1 points required; if A, B, C, D coplanar, no points. else vector is resultant of BA, CA, DA @param aPoint to which substituents are added @param bPoint first ligand of A @param cPoint second lig...
[ "Calculate", "new", "point", "X", "in", "a", "B", "-", "A", "(", "-", "D", ")", "-", "C", "system", ".", "It", "forms", "a", "B", "-", "A", "(", "-", "D", ")", "(", "-", "C", ")", "-", "X", "system", ".", "(", "3", ")", "3", "ligands", ...
train
https://github.com/cdk/cdk/blob/c3d0f16502bf08df50365fee392e11d7c9856657/tool/builder3d/src/main/java/org/openscience/cdk/modeling/builder3d/AtomTetrahedralLigandPlacer3D.java#L507-L551
mozilla/rhino
src/org/mozilla/javascript/NativeGlobal.java
NativeGlobal.oneUcs4ToUtf8Char
private static int oneUcs4ToUtf8Char(byte[] utf8Buffer, int ucs4Char) { """ /* Convert one UCS-4 char and write it into a UTF-8 buffer, which must be at least 6 bytes long. Return the number of UTF-8 bytes of data written. """ int utf8Length = 1; //JS_ASSERT(ucs4Char <= 0x7FFFFFFF); ...
java
private static int oneUcs4ToUtf8Char(byte[] utf8Buffer, int ucs4Char) { int utf8Length = 1; //JS_ASSERT(ucs4Char <= 0x7FFFFFFF); if ((ucs4Char & ~0x7F) == 0) utf8Buffer[0] = (byte)ucs4Char; else { int i; int a = ucs4Char >>> 11; utf8Length...
[ "private", "static", "int", "oneUcs4ToUtf8Char", "(", "byte", "[", "]", "utf8Buffer", ",", "int", "ucs4Char", ")", "{", "int", "utf8Length", "=", "1", ";", "//JS_ASSERT(ucs4Char <= 0x7FFFFFFF);", "if", "(", "(", "ucs4Char", "&", "~", "0x7F", ")", "==", "0", ...
/* Convert one UCS-4 char and write it into a UTF-8 buffer, which must be at least 6 bytes long. Return the number of UTF-8 bytes of data written.
[ "/", "*", "Convert", "one", "UCS", "-", "4", "char", "and", "write", "it", "into", "a", "UTF", "-", "8", "buffer", "which", "must", "be", "at", "least", "6", "bytes", "long", ".", "Return", "the", "number", "of", "UTF", "-", "8", "bytes", "of", "...
train
https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/javascript/NativeGlobal.java#L731-L753
datasalt/pangool
core/src/main/java/com/datasalt/pangool/tuplemr/mapred/lib/input/PangoolMultipleInputs.java
PangoolMultipleInputs.setSpecificInputContext
public static void setSpecificInputContext(Configuration conf, String inputName, int inputId) { """ Iterates over the Configuration and sets the specific context found for the input in the Job instance. Package-access so it can be unit tested. The specific context is configured in method this. {@link #addInputC...
java
public static void setSpecificInputContext(Configuration conf, String inputName, int inputId) { for (Map.Entry<String, String> entries : conf) { String confKey = entries.getKey(); String confValue = entries.getValue(); if (confKey.startsWith(MI_PREFIX + inputName + "." + inputId + CONF)) { ...
[ "public", "static", "void", "setSpecificInputContext", "(", "Configuration", "conf", ",", "String", "inputName", ",", "int", "inputId", ")", "{", "for", "(", "Map", ".", "Entry", "<", "String", ",", "String", ">", "entries", ":", "conf", ")", "{", "String"...
Iterates over the Configuration and sets the specific context found for the input in the Job instance. Package-access so it can be unit tested. The specific context is configured in method this. {@link #addInputContext(Job, String, String, String)}
[ "Iterates", "over", "the", "Configuration", "and", "sets", "the", "specific", "context", "found", "for", "the", "input", "in", "the", "Job", "instance", ".", "Package", "-", "access", "so", "it", "can", "be", "unit", "tested", ".", "The", "specific", "cont...
train
https://github.com/datasalt/pangool/blob/bfd312dd78cba03febaf7988ae96a3d4bc585408/core/src/main/java/com/datasalt/pangool/tuplemr/mapred/lib/input/PangoolMultipleInputs.java#L183-L194
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDefinitionLinkPersistenceImpl.java
CPDefinitionLinkPersistenceImpl.findByCP_T
@Override public List<CPDefinitionLink> findByCP_T(long CProductId, String type, int start, int end, OrderByComparator<CPDefinitionLink> orderByComparator) { """ Returns an ordered range of all the cp definition links where CProductId = &#63; and type = &#63;. <p> Useful when paginating results. Returns a...
java
@Override public List<CPDefinitionLink> findByCP_T(long CProductId, String type, int start, int end, OrderByComparator<CPDefinitionLink> orderByComparator) { return findByCP_T(CProductId, type, start, end, orderByComparator, true); }
[ "@", "Override", "public", "List", "<", "CPDefinitionLink", ">", "findByCP_T", "(", "long", "CProductId", ",", "String", "type", ",", "int", "start", ",", "int", "end", ",", "OrderByComparator", "<", "CPDefinitionLink", ">", "orderByComparator", ")", "{", "ret...
Returns an ordered range of all the cp definition links where CProductId = &#63; and type = &#63;. <p> Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers t...
[ "Returns", "an", "ordered", "range", "of", "all", "the", "cp", "definition", "links", "where", "CProductId", "=", "&#63", ";", "and", "type", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPDefinitionLinkPersistenceImpl.java#L3173-L3178
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/Table.java
Table.deleteNoRefCheck
void deleteNoRefCheck(Session session, Row row) { """ Mid level row delete method. Fires triggers but no integrity constraint checks. """ Object[] data = row.getData(); fireBeforeTriggers(session, Trigger.DELETE_BEFORE, data, null, null); if (isView) { return; } ...
java
void deleteNoRefCheck(Session session, Row row) { Object[] data = row.getData(); fireBeforeTriggers(session, Trigger.DELETE_BEFORE, data, null, null); if (isView) { return; } deleteNoCheck(session, row); }
[ "void", "deleteNoRefCheck", "(", "Session", "session", ",", "Row", "row", ")", "{", "Object", "[", "]", "data", "=", "row", ".", "getData", "(", ")", ";", "fireBeforeTriggers", "(", "session", ",", "Trigger", ".", "DELETE_BEFORE", ",", "data", ",", "null...
Mid level row delete method. Fires triggers but no integrity constraint checks.
[ "Mid", "level", "row", "delete", "method", ".", "Fires", "triggers", "but", "no", "integrity", "constraint", "checks", "." ]
train
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L2434-L2445
OpenNTF/JavascriptAggregator
jaggr-core/src/main/java/com/ibm/jaggr/core/impl/AbstractAggregatorImpl.java
AbstractAggregatorImpl.logException
void logException(HttpServletRequest req, Level level, String sourceMethod, Throwable t) { """ Formats and logs an exception log message including the request url, query args, the exception class name and exception message. @param req the http servlet request @param level the logging level @param sourceMet...
java
void logException(HttpServletRequest req, Level level, String sourceMethod, Throwable t) { if (log.isLoggable(level)) { StringBuffer sb = new StringBuffer(); // add the request URI and query args String uri = req.getRequestURI(); if (uri != null) { sb.append(uri); String queryArgs = req.get...
[ "void", "logException", "(", "HttpServletRequest", "req", ",", "Level", "level", ",", "String", "sourceMethod", ",", "Throwable", "t", ")", "{", "if", "(", "log", ".", "isLoggable", "(", "level", ")", ")", "{", "StringBuffer", "sb", "=", "new", "StringBuff...
Formats and logs an exception log message including the request url, query args, the exception class name and exception message. @param req the http servlet request @param level the logging level @param sourceMethod the calling method name @param t the exception
[ "Formats", "and", "logs", "an", "exception", "log", "message", "including", "the", "request", "url", "query", "args", "the", "exception", "class", "name", "and", "exception", "message", "." ]
train
https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/impl/AbstractAggregatorImpl.java#L963-L981