repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
18
194
func_name
stringlengths
6
111
whole_func_string
stringlengths
80
3.8k
language
stringclasses
1 value
func_code_string
stringlengths
80
3.8k
func_code_tokens
listlengths
20
697
func_documentation_string
stringlengths
61
2k
func_documentation_tokens
listlengths
1
434
split_name
stringclasses
1 value
func_code_url
stringlengths
111
308
Azure/azure-sdk-for-java
network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworkPeeringsInner.java
VirtualNetworkPeeringsInner.listAsync
public Observable<Page<VirtualNetworkPeeringInner>> listAsync(final String resourceGroupName, final String virtualNetworkName) { return listWithServiceResponseAsync(resourceGroupName, virtualNetworkName) .map(new Func1<ServiceResponse<Page<VirtualNetworkPeeringInner>>, Page<VirtualNetworkPeeringInne...
java
public Observable<Page<VirtualNetworkPeeringInner>> listAsync(final String resourceGroupName, final String virtualNetworkName) { return listWithServiceResponseAsync(resourceGroupName, virtualNetworkName) .map(new Func1<ServiceResponse<Page<VirtualNetworkPeeringInner>>, Page<VirtualNetworkPeeringInne...
[ "public", "Observable", "<", "Page", "<", "VirtualNetworkPeeringInner", ">", ">", "listAsync", "(", "final", "String", "resourceGroupName", ",", "final", "String", "virtualNetworkName", ")", "{", "return", "listWithServiceResponseAsync", "(", "resourceGroupName", ",", ...
Gets all virtual network peerings in a virtual network. @param resourceGroupName The name of the resource group. @param virtualNetworkName The name of the virtual network. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the PagedList&lt;VirtualNetworkPeeringInner&gt;...
[ "Gets", "all", "virtual", "network", "peerings", "in", "a", "virtual", "network", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/VirtualNetworkPeeringsInner.java#L581-L589
mgormley/prim
src/main/java/edu/jhu/prim/sample/PairSampler.java
PairSampler.sampleOrderedPairs
public static Collection<OrderedPair> sampleOrderedPairs(int minI, int maxI, int minJ, int maxJ, double prop) { int numI = maxI - minI; int numJ = maxJ - minJ; // Count the max number possible: long maxPairs = numI * numJ; Collection<OrderedPair> sample...
java
public static Collection<OrderedPair> sampleOrderedPairs(int minI, int maxI, int minJ, int maxJ, double prop) { int numI = maxI - minI; int numJ = maxJ - minJ; // Count the max number possible: long maxPairs = numI * numJ; Collection<OrderedPair> sample...
[ "public", "static", "Collection", "<", "OrderedPair", ">", "sampleOrderedPairs", "(", "int", "minI", ",", "int", "maxI", ",", "int", "minJ", ",", "int", "maxJ", ",", "double", "prop", ")", "{", "int", "numI", "=", "maxI", "-", "minI", ";", "int", "numJ...
Sample with replacement ordered pairs of integers. @param minI The minimum value for i (inclusive). @param maxI The maximum value for i (exclusive). @param minJ The minimum value for j (inclusive). @param maxJ The maximum value for j (exclusive). @param prop The proportion of possible pairs to return. @return A collec...
[ "Sample", "with", "replacement", "ordered", "pairs", "of", "integers", "." ]
train
https://github.com/mgormley/prim/blob/5dce5e1ae94a9ae558a6262fc246e1a24f56686c/src/main/java/edu/jhu/prim/sample/PairSampler.java#L27-L57
JOML-CI/JOML
src/org/joml/Matrix4f.java
Matrix4f.translationRotate
public Matrix4f translationRotate(float tx, float ty, float tz, Quaternionfc quat) { return translationRotate(tx, ty, tz, quat.x(), quat.y(), quat.z(), quat.w()); }
java
public Matrix4f translationRotate(float tx, float ty, float tz, Quaternionfc quat) { return translationRotate(tx, ty, tz, quat.x(), quat.y(), quat.z(), quat.w()); }
[ "public", "Matrix4f", "translationRotate", "(", "float", "tx", ",", "float", "ty", ",", "float", "tz", ",", "Quaternionfc", "quat", ")", "{", "return", "translationRotate", "(", "tx", ",", "ty", ",", "tz", ",", "quat", ".", "x", "(", ")", ",", "quat", ...
Set <code>this</code> matrix to <code>T * R</code>, where <code>T</code> is a translation by the given <code>(tx, ty, tz)</code> and <code>R</code> is a rotation - and possibly scaling - transformation specified by the given quaternion. <p> When transforming a vector by the resulting matrix the rotation - and possibly ...
[ "Set", "<code", ">", "this<", "/", "code", ">", "matrix", "to", "<code", ">", "T", "*", "R<", "/", "code", ">", "where", "<code", ">", "T<", "/", "code", ">", "is", "a", "translation", "by", "the", "given", "<code", ">", "(", "tx", "ty", "tz", ...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix4f.java#L4479-L4481
alkacon/opencms-core
src/org/opencms/ui/apps/A_CmsWorkplaceApp.java
A_CmsWorkplaceApp.openSubView
public void openSubView(String state, boolean updateState) { if (updateState) { CmsAppWorkplaceUi.get().changeCurrentAppState(state); } Component comp = getComponentForState(state); if (comp != null) { comp.setSizeFull(); m_rootLayout.setMainContent(c...
java
public void openSubView(String state, boolean updateState) { if (updateState) { CmsAppWorkplaceUi.get().changeCurrentAppState(state); } Component comp = getComponentForState(state); if (comp != null) { comp.setSizeFull(); m_rootLayout.setMainContent(c...
[ "public", "void", "openSubView", "(", "String", "state", ",", "boolean", "updateState", ")", "{", "if", "(", "updateState", ")", "{", "CmsAppWorkplaceUi", ".", "get", "(", ")", ".", "changeCurrentAppState", "(", "state", ")", ";", "}", "Component", "comp", ...
Opens the requested sub view.<p> @param state the state @param updateState <code>true</code> to update the state URL token
[ "Opens", "the", "requested", "sub", "view", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/A_CmsWorkplaceApp.java#L292-L306
UrielCh/ovh-java-sdk
ovh-java-sdk-emaildomain/src/main/java/net/minidev/ovh/api/ApiOvhEmaildomain.java
ApiOvhEmaildomain.delegatedAccount_email_filter_name_DELETE
public ArrayList<OvhTaskFilter> delegatedAccount_email_filter_name_DELETE(String email, String name) throws IOException { String qPath = "/email/domain/delegatedAccount/{email}/filter/{name}"; StringBuilder sb = path(qPath, email, name); String resp = exec(qPath, "DELETE", sb.toString(), null); return convertTo...
java
public ArrayList<OvhTaskFilter> delegatedAccount_email_filter_name_DELETE(String email, String name) throws IOException { String qPath = "/email/domain/delegatedAccount/{email}/filter/{name}"; StringBuilder sb = path(qPath, email, name); String resp = exec(qPath, "DELETE", sb.toString(), null); return convertTo...
[ "public", "ArrayList", "<", "OvhTaskFilter", ">", "delegatedAccount_email_filter_name_DELETE", "(", "String", "email", ",", "String", "name", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/email/domain/delegatedAccount/{email}/filter/{name}\"", ";", "StringB...
Delete an existing filter REST: DELETE /email/domain/delegatedAccount/{email}/filter/{name} @param email [required] Email @param name [required] Filter name
[ "Delete", "an", "existing", "filter" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-emaildomain/src/main/java/net/minidev/ovh/api/ApiOvhEmaildomain.java#L258-L263
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/graph/vertex/impl/rnn/ReverseTimeSeriesVertex.java
ReverseTimeSeriesVertex.revertTimeSeries
private static INDArray revertTimeSeries(INDArray input, INDArray mask, LayerWorkspaceMgr workspaceMgr, ArrayType type) { // Get number of samples val n = input.size(0); // Get maximal length of a time series val m = input.size(2); // Create empty output INDArray out = ...
java
private static INDArray revertTimeSeries(INDArray input, INDArray mask, LayerWorkspaceMgr workspaceMgr, ArrayType type) { // Get number of samples val n = input.size(0); // Get maximal length of a time series val m = input.size(2); // Create empty output INDArray out = ...
[ "private", "static", "INDArray", "revertTimeSeries", "(", "INDArray", "input", ",", "INDArray", "mask", ",", "LayerWorkspaceMgr", "workspaceMgr", ",", "ArrayType", "type", ")", "{", "// Get number of samples", "val", "n", "=", "input", ".", "size", "(", "0", ")"...
Reverts the element order of a tensor along the 3rd axis (time series axis). A masking tensor is used to restrict the revert to meaningful elements and keep the padding in place. This method is self-inverse in the following sense: {@code revertTensor( revertTensor (input, mask), mask )} equals {@code input} @param inp...
[ "Reverts", "the", "element", "order", "of", "a", "tensor", "along", "the", "3rd", "axis", "(", "time", "series", "axis", ")", ".", "A", "masking", "tensor", "is", "used", "to", "restrict", "the", "revert", "to", "meaningful", "elements", "and", "keep", "...
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/graph/vertex/impl/rnn/ReverseTimeSeriesVertex.java#L132-L187
alipay/sofa-rpc
core/api/src/main/java/com/alipay/sofa/rpc/filter/FilterInvoker.java
FilterInvoker.getMethodParam
protected Object getMethodParam(String methodName, String paramKey) { if (CommonUtils.isEmpty(configContext)) { return null; } Object o = configContext.get(buildMethodKey(methodName, paramKey)); return o == null ? configContext.get(paramKey) : o; }
java
protected Object getMethodParam(String methodName, String paramKey) { if (CommonUtils.isEmpty(configContext)) { return null; } Object o = configContext.get(buildMethodKey(methodName, paramKey)); return o == null ? configContext.get(paramKey) : o; }
[ "protected", "Object", "getMethodParam", "(", "String", "methodName", ",", "String", "paramKey", ")", "{", "if", "(", "CommonUtils", ".", "isEmpty", "(", "configContext", ")", ")", "{", "return", "null", ";", "}", "Object", "o", "=", "configContext", ".", ...
取得方法的特殊参数配置 @param methodName 方法名 @param paramKey 参数关键字 @return 都找不到为null method param
[ "取得方法的特殊参数配置" ]
train
https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/core/api/src/main/java/com/alipay/sofa/rpc/filter/FilterInvoker.java#L202-L208
oaqa/uima-ecd
src/main/java/edu/cmu/lti/oaqa/ecd/driver/SimplePipelineRev803.java
SimplePipelineRev803.runPipeline
public static void runPipeline(final CAS cas, final AnalysisEngine... engines) throws UIMAException, IOException { if (engines.length == 0) { return; } CasIterator casIter = engines[0].processAndOutputNewCASes(cas); AnalysisEngine[] enginesRemains = Arrays.copyOfRange(engines, 1, engines.len...
java
public static void runPipeline(final CAS cas, final AnalysisEngine... engines) throws UIMAException, IOException { if (engines.length == 0) { return; } CasIterator casIter = engines[0].processAndOutputNewCASes(cas); AnalysisEngine[] enginesRemains = Arrays.copyOfRange(engines, 1, engines.len...
[ "public", "static", "void", "runPipeline", "(", "final", "CAS", "cas", ",", "final", "AnalysisEngine", "...", "engines", ")", "throws", "UIMAException", ",", "IOException", "{", "if", "(", "engines", ".", "length", "==", "0", ")", "{", "return", ";", "}", ...
Run a sequence of {@link AnalysisEngine analysis engines} over a {@link CAS}. This method does not {@link AnalysisEngine#destroy() destroy} the engines or send them other events like {@link AnalysisEngine#collectionProcessComplete()}. This is left to the caller. @param cas the CAS to process @param engines a sequence ...
[ "Run", "a", "sequence", "of", "{", "@link", "AnalysisEngine", "analysis", "engines", "}", "over", "a", "{", "@link", "CAS", "}", ".", "This", "method", "does", "not", "{", "@link", "AnalysisEngine#destroy", "()", "destroy", "}", "the", "engines", "or", "se...
train
https://github.com/oaqa/uima-ecd/blob/09a0ae26647490b43affc36ab3a01100702b989f/src/main/java/edu/cmu/lti/oaqa/ecd/driver/SimplePipelineRev803.java#L251-L263
Azure/azure-sdk-for-java
cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/FeaturesImpl.java
FeaturesImpl.deletePhraseList
public OperationStatus deletePhraseList(UUID appId, String versionId, int phraselistId) { return deletePhraseListWithServiceResponseAsync(appId, versionId, phraselistId).toBlocking().single().body(); }
java
public OperationStatus deletePhraseList(UUID appId, String versionId, int phraselistId) { return deletePhraseListWithServiceResponseAsync(appId, versionId, phraselistId).toBlocking().single().body(); }
[ "public", "OperationStatus", "deletePhraseList", "(", "UUID", "appId", ",", "String", "versionId", ",", "int", "phraselistId", ")", "{", "return", "deletePhraseListWithServiceResponseAsync", "(", "appId", ",", "versionId", ",", "phraselistId", ")", ".", "toBlocking", ...
Deletes a phraselist feature. @param appId The application ID. @param versionId The version ID. @param phraselistId The ID of the feature to be deleted. @throws IllegalArgumentException thrown if parameters fail the validation @throws ErrorResponseException thrown if the request is rejected by server @throws RuntimeEx...
[ "Deletes", "a", "phraselist", "feature", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/language/luis/authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/implementation/FeaturesImpl.java#L826-L828
xetorthio/jedis
src/main/java/redis/clients/jedis/BinaryJedis.java
BinaryJedis.hincrByFloat
@Override public Double hincrByFloat(final byte[] key, final byte[] field, final double value) { checkIsInMultiOrPipeline(); client.hincrByFloat(key, field, value); final String dval = client.getBulkReply(); return (dval != null ? new Double(dval) : null); }
java
@Override public Double hincrByFloat(final byte[] key, final byte[] field, final double value) { checkIsInMultiOrPipeline(); client.hincrByFloat(key, field, value); final String dval = client.getBulkReply(); return (dval != null ? new Double(dval) : null); }
[ "@", "Override", "public", "Double", "hincrByFloat", "(", "final", "byte", "[", "]", "key", ",", "final", "byte", "[", "]", "field", ",", "final", "double", "value", ")", "{", "checkIsInMultiOrPipeline", "(", ")", ";", "client", ".", "hincrByFloat", "(", ...
Increment the number stored at field in the hash at key by a double precision floating point value. If key does not exist, a new key holding a hash is created. If field does not exist or holds a string, the value is set to 0 before applying the operation. Since the value argument is signed you can use this command to p...
[ "Increment", "the", "number", "stored", "at", "field", "in", "the", "hash", "at", "key", "by", "a", "double", "precision", "floating", "point", "value", ".", "If", "key", "does", "not", "exist", "a", "new", "key", "holding", "a", "hash", "is", "created",...
train
https://github.com/xetorthio/jedis/blob/ef4ab403f9d8fd88bd05092fea96de2e9db0bede/src/main/java/redis/clients/jedis/BinaryJedis.java#L1013-L1019
liferay/com-liferay-commerce
commerce-discount-service/src/main/java/com/liferay/commerce/discount/service/persistence/impl/CommerceDiscountUserSegmentRelPersistenceImpl.java
CommerceDiscountUserSegmentRelPersistenceImpl.findAll
@Override public List<CommerceDiscountUserSegmentRel> findAll() { return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
java
@Override public List<CommerceDiscountUserSegmentRel> findAll() { return findAll(QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
[ "@", "Override", "public", "List", "<", "CommerceDiscountUserSegmentRel", ">", "findAll", "(", ")", "{", "return", "findAll", "(", "QueryUtil", ".", "ALL_POS", ",", "QueryUtil", ".", "ALL_POS", ",", "null", ")", ";", "}" ]
Returns all the commerce discount user segment rels. @return the commerce discount user segment rels
[ "Returns", "all", "the", "commerce", "discount", "user", "segment", "rels", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-discount-service/src/main/java/com/liferay/commerce/discount/service/persistence/impl/CommerceDiscountUserSegmentRelPersistenceImpl.java#L1729-L1732
pip-services3-java/pip-services3-commons-java
src/org/pipservices3/commons/reflect/MethodReflector.java
MethodReflector.invokeMethod
public static Object invokeMethod(Object obj, String name, Object... args) { if (obj == null) throw new NullPointerException("Object cannot be null"); if (name == null) throw new NullPointerException("Method name cannot be null"); Class<?> objClass = obj.getClass(); for (Method method : objClass.getMeth...
java
public static Object invokeMethod(Object obj, String name, Object... args) { if (obj == null) throw new NullPointerException("Object cannot be null"); if (name == null) throw new NullPointerException("Method name cannot be null"); Class<?> objClass = obj.getClass(); for (Method method : objClass.getMeth...
[ "public", "static", "Object", "invokeMethod", "(", "Object", "obj", ",", "String", "name", ",", "Object", "...", "args", ")", "{", "if", "(", "obj", "==", "null", ")", "throw", "new", "NullPointerException", "(", "\"Object cannot be null\"", ")", ";", "if", ...
Invokes an object method by its name with specified parameters. @param obj an object to invoke. @param name a name of the method to invoke. @param args a list of method arguments. @return the result of the method invocation or null if method returns void.
[ "Invokes", "an", "object", "method", "by", "its", "name", "with", "specified", "parameters", "." ]
train
https://github.com/pip-services3-java/pip-services3-commons-java/blob/a8a0c3e5ec58f0663c295aa855c6b3afad2af86a/src/org/pipservices3/commons/reflect/MethodReflector.java#L65-L83
MariaDB/mariadb-connector-j
src/main/java/org/mariadb/jdbc/MariaDbConnection.java
MariaDbConnection.setClientInfo
public void setClientInfo(final Properties properties) throws SQLClientInfoException { Map<String, ClientInfoStatus> propertiesExceptions = new HashMap<>(); for (String name : new String[]{"ApplicationName", "ClientUser", "ClientHostname"}) { try { setClientInfo(name, properties.getProperty(name))...
java
public void setClientInfo(final Properties properties) throws SQLClientInfoException { Map<String, ClientInfoStatus> propertiesExceptions = new HashMap<>(); for (String name : new String[]{"ApplicationName", "ClientUser", "ClientHostname"}) { try { setClientInfo(name, properties.getProperty(name))...
[ "public", "void", "setClientInfo", "(", "final", "Properties", "properties", ")", "throws", "SQLClientInfoException", "{", "Map", "<", "String", ",", "ClientInfoStatus", ">", "propertiesExceptions", "=", "new", "HashMap", "<>", "(", ")", ";", "for", "(", "String...
<p>Sets the value of the connection's client info properties. The <code>Properties</code> object contains the names and values of the client info properties to be set. The set of client info properties contained in the properties list replaces the current set of client info properties on the connection. If a propert...
[ "<p", ">", "Sets", "the", "value", "of", "the", "connection", "s", "client", "info", "properties", ".", "The", "<code", ">", "Properties<", "/", "code", ">", "object", "contains", "the", "names", "and", "values", "of", "the", "client", "info", "properties"...
train
https://github.com/MariaDB/mariadb-connector-j/blob/d148c7cd347c4680617be65d9e511b289d38a30b/src/main/java/org/mariadb/jdbc/MariaDbConnection.java#L1404-L1420
chen0040/java-genetic-programming
src/main/java/com/github/chen0040/gp/lgp/gp/PopulationInitialization.java
PopulationInitialization.initializeWithConstantLength
private static void initializeWithConstantLength(List<Program> programs, LGP manager, RandEngine randEngine) { int popSize = manager.getPopulationSize(); for(int i=0; i<popSize; ++i) { Program lgp= new Program(); initialize(lgp, manager, randEngine, manager.getPopInitConstantProgram...
java
private static void initializeWithConstantLength(List<Program> programs, LGP manager, RandEngine randEngine) { int popSize = manager.getPopulationSize(); for(int i=0; i<popSize; ++i) { Program lgp= new Program(); initialize(lgp, manager, randEngine, manager.getPopInitConstantProgram...
[ "private", "static", "void", "initializeWithConstantLength", "(", "List", "<", "Program", ">", "programs", ",", "LGP", "manager", ",", "RandEngine", "randEngine", ")", "{", "int", "popSize", "=", "manager", ".", "getPopulationSize", "(", ")", ";", "for", "(", ...
the program length is distributed uniformly between iMinProgLength and iMaxProgLength
[ "the", "program", "length", "is", "distributed", "uniformly", "between", "iMinProgLength", "and", "iMaxProgLength" ]
train
https://github.com/chen0040/java-genetic-programming/blob/498fc8f4407ea9d45f2e0ac797a8948da337c74f/src/main/java/com/github/chen0040/gp/lgp/gp/PopulationInitialization.java#L51-L60
elki-project/elki
elki-core-util/src/main/java/de/lmu/ifi/dbs/elki/utilities/datastructures/BitsUtil.java
BitsUtil.unionSize
public static int unionSize(long[] x, long[] y) { final int lx = x.length, ly = y.length; final int min = (lx < ly) ? lx : ly; int i = 0, res = 0; for(; i < min; i++) { res += Long.bitCount(x[i] | y[i]); } for(; i < lx; i++) { res += Long.bitCount(x[i]); } for(; i < ly; i++) ...
java
public static int unionSize(long[] x, long[] y) { final int lx = x.length, ly = y.length; final int min = (lx < ly) ? lx : ly; int i = 0, res = 0; for(; i < min; i++) { res += Long.bitCount(x[i] | y[i]); } for(; i < lx; i++) { res += Long.bitCount(x[i]); } for(; i < ly; i++) ...
[ "public", "static", "int", "unionSize", "(", "long", "[", "]", "x", ",", "long", "[", "]", "y", ")", "{", "final", "int", "lx", "=", "x", ".", "length", ",", "ly", "=", "y", ".", "length", ";", "final", "int", "min", "=", "(", "lx", "<", "ly"...
Compute the union size of two Bitsets. @param x First bitset @param y Second bitset @return Union size
[ "Compute", "the", "union", "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#L1490-L1504
trellis-ldp/trellis
core/http/src/main/java/org/trellisldp/http/impl/MementoResource.java
MementoResource.filterLinkParams
public static Link filterLinkParams(final Link link, final boolean filter) { // from and until parameters can cause problems with downstream applications because they contain commas. This // method makes it possible to filter out those params, if desired. By default, they are not filtered out. i...
java
public static Link filterLinkParams(final Link link, final boolean filter) { // from and until parameters can cause problems with downstream applications because they contain commas. This // method makes it possible to filter out those params, if desired. By default, they are not filtered out. i...
[ "public", "static", "Link", "filterLinkParams", "(", "final", "Link", "link", ",", "final", "boolean", "filter", ")", "{", "// from and until parameters can cause problems with downstream applications because they contain commas. This", "// method makes it possible to filter out those ...
Filter link parameters from a provided Link object, if configured to do so. @param link the link @param filter whether to filter the memento parameters @return a Link without Memento parameters, if desired; otherwise, the original link
[ "Filter", "link", "parameters", "from", "a", "provided", "Link", "object", "if", "configured", "to", "do", "so", "." ]
train
https://github.com/trellis-ldp/trellis/blob/789fd7a3df86cab7ebba63e72bf4e58397e5f42d/core/http/src/main/java/org/trellisldp/http/impl/MementoResource.java#L184-L195
vdurmont/semver4j
src/main/java/com/vdurmont/semver4j/Requirement.java
Requirement.buildLoose
public static Requirement buildLoose(String requirement) { return build(new Semver(requirement, Semver.SemverType.LOOSE)); }
java
public static Requirement buildLoose(String requirement) { return build(new Semver(requirement, Semver.SemverType.LOOSE)); }
[ "public", "static", "Requirement", "buildLoose", "(", "String", "requirement", ")", "{", "return", "build", "(", "new", "Semver", "(", "requirement", ",", "Semver", ".", "SemverType", ".", "LOOSE", ")", ")", ";", "}" ]
Builds a loose requirement (will test that the version is equivalent to the requirement) @param requirement the version of the requirement @return the generated requirement
[ "Builds", "a", "loose", "requirement", "(", "will", "test", "that", "the", "version", "is", "equivalent", "to", "the", "requirement", ")" ]
train
https://github.com/vdurmont/semver4j/blob/3f0266e4985ac29e9da482e04001ed15fad6c3e2/src/main/java/com/vdurmont/semver4j/Requirement.java#L85-L87
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceShipmentItemPersistenceImpl.java
CommerceShipmentItemPersistenceImpl.findByGroupId
@Override public List<CommerceShipmentItem> findByGroupId(long groupId) { return findByGroupId(groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
java
@Override public List<CommerceShipmentItem> findByGroupId(long groupId) { return findByGroupId(groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
[ "@", "Override", "public", "List", "<", "CommerceShipmentItem", ">", "findByGroupId", "(", "long", "groupId", ")", "{", "return", "findByGroupId", "(", "groupId", ",", "QueryUtil", ".", "ALL_POS", ",", "QueryUtil", ".", "ALL_POS", ",", "null", ")", ";", "}" ...
Returns all the commerce shipment items where groupId = &#63;. @param groupId the group ID @return the matching commerce shipment items
[ "Returns", "all", "the", "commerce", "shipment", "items", "where", "groupId", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceShipmentItemPersistenceImpl.java#L122-L125
netheosgithub/pcs_api
java/src/main/java/net/netheos/pcsapi/credentials/UserCredentialsFileRepository.java
UserCredentialsFileRepository.getUserKey
private String getUserKey( AppInfo appInfo, String userId ) { if ( userId == null ) { throw new IllegalArgumentException( "userId should not be null" ); } return String.format( "%s%s", getAppPrefix( appInfo ), userId ); }
java
private String getUserKey( AppInfo appInfo, String userId ) { if ( userId == null ) { throw new IllegalArgumentException( "userId should not be null" ); } return String.format( "%s%s", getAppPrefix( appInfo ), userId ); }
[ "private", "String", "getUserKey", "(", "AppInfo", "appInfo", ",", "String", "userId", ")", "{", "if", "(", "userId", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"userId should not be null\"", ")", ";", "}", "return", "String", "...
Builds the key of a credentials according to a given appInfo and userId @param appInfo The application informations @param userId The user identifier @return The user key
[ "Builds", "the", "key", "of", "a", "credentials", "according", "to", "a", "given", "appInfo", "and", "userId" ]
train
https://github.com/netheosgithub/pcs_api/blob/20691e52e144014f99ca75cb7dedc7ba0c18586c/java/src/main/java/net/netheos/pcsapi/credentials/UserCredentialsFileRepository.java#L189-L196
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/comms/common/CommsLightTrace.java
CommsLightTrace.traceTransaction
public static void traceTransaction(TraceComponent callersTrace, String action, Object transaction, int commsId, int commsFlags) { if (light_tc.isDebugEnabled() || callersTrace.isDebugEnabled()) { // Build the trace string String traceText = action + ": " + transaction + " CommsId:" + co...
java
public static void traceTransaction(TraceComponent callersTrace, String action, Object transaction, int commsId, int commsFlags) { if (light_tc.isDebugEnabled() || callersTrace.isDebugEnabled()) { // Build the trace string String traceText = action + ": " + transaction + " CommsId:" + co...
[ "public", "static", "void", "traceTransaction", "(", "TraceComponent", "callersTrace", ",", "String", "action", ",", "Object", "transaction", ",", "int", "commsId", ",", "int", "commsFlags", ")", "{", "if", "(", "light_tc", ".", "isDebugEnabled", "(", ")", "||...
Trace a transaction associated with an action. @param callersTrace The trace component of the caller @param action A string (no spaces) provided by the caller to prefix the keyword included in the trace line @param transaction An optional transaction associated with the action being performed on the message @param comm...
[ "Trace", "a", "transaction", "associated", "with", "an", "action", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.comms.client/src/com/ibm/ws/sib/comms/common/CommsLightTrace.java#L135-L150
trellis-ldp-archive/trellis-http
src/main/java/org/trellisldp/http/impl/RdfUtils.java
RdfUtils.getProfile
public static IRI getProfile(final List<MediaType> acceptableTypes, final RDFSyntax syntax) { for (final MediaType type : acceptableTypes) { if (RDFSyntax.byMediaType(type.toString()).filter(syntax::equals).isPresent() && type.getParameters().containsKey("profile")) { ...
java
public static IRI getProfile(final List<MediaType> acceptableTypes, final RDFSyntax syntax) { for (final MediaType type : acceptableTypes) { if (RDFSyntax.byMediaType(type.toString()).filter(syntax::equals).isPresent() && type.getParameters().containsKey("profile")) { ...
[ "public", "static", "IRI", "getProfile", "(", "final", "List", "<", "MediaType", ">", "acceptableTypes", ",", "final", "RDFSyntax", "syntax", ")", "{", "for", "(", "final", "MediaType", "type", ":", "acceptableTypes", ")", "{", "if", "(", "RDFSyntax", ".", ...
Given a list of acceptable media types and an RDF syntax, get the relevant profile data, if relevant @param acceptableTypes the types from HTTP headers @param syntax an RDF syntax @return a profile IRI if relevant
[ "Given", "a", "list", "of", "acceptable", "media", "types", "and", "an", "RDF", "syntax", "get", "the", "relevant", "profile", "data", "if", "relevant" ]
train
https://github.com/trellis-ldp-archive/trellis-http/blob/bc762f88602c49c2b137a7adf68d576666e55fff/src/main/java/org/trellisldp/http/impl/RdfUtils.java#L214-L222
jenkinsci/artifactory-plugin
src/main/java/org/jfrog/hudson/pipeline/common/docker/utils/DockerAgentUtils.java
DockerAgentUtils.pushImage
public static boolean pushImage(Launcher launcher, final JenkinsBuildInfoLog log, final String imageTag, final String username, final String password, final String host) throws IOException, InterruptedException { return launcher.getChannel().call(new MasterToSlaveCallable<Boolean, IOException>() {...
java
public static boolean pushImage(Launcher launcher, final JenkinsBuildInfoLog log, final String imageTag, final String username, final String password, final String host) throws IOException, InterruptedException { return launcher.getChannel().call(new MasterToSlaveCallable<Boolean, IOException>() {...
[ "public", "static", "boolean", "pushImage", "(", "Launcher", "launcher", ",", "final", "JenkinsBuildInfoLog", "log", ",", "final", "String", "imageTag", ",", "final", "String", "username", ",", "final", "String", "password", ",", "final", "String", "host", ")", ...
Execute push docker image on agent @param launcher @param log @param imageTag @param username @param password @param host @return @throws IOException @throws InterruptedException
[ "Execute", "push", "docker", "image", "on", "agent" ]
train
https://github.com/jenkinsci/artifactory-plugin/blob/f5fcfff6a5a50be5374813e49d1fe3aaf6422333/src/main/java/org/jfrog/hudson/pipeline/common/docker/utils/DockerAgentUtils.java#L176-L191
killbilling/recurly-java-library
src/main/java/com/ning/billing/recurly/RecurlyClient.java
RecurlyClient.terminateSubscription
public void terminateSubscription(final Subscription subscription, final RefundOption refund) { doPUT(Subscription.SUBSCRIPTION_RESOURCE + "/" + subscription.getUuid() + "/terminate?refund=" + refund, subscription, Subscription.class); }
java
public void terminateSubscription(final Subscription subscription, final RefundOption refund) { doPUT(Subscription.SUBSCRIPTION_RESOURCE + "/" + subscription.getUuid() + "/terminate?refund=" + refund, subscription, Subscription.class); }
[ "public", "void", "terminateSubscription", "(", "final", "Subscription", "subscription", ",", "final", "RefundOption", "refund", ")", "{", "doPUT", "(", "Subscription", ".", "SUBSCRIPTION_RESOURCE", "+", "\"/\"", "+", "subscription", ".", "getUuid", "(", ")", "+",...
Terminate a particular {@link Subscription} by it's UUID @param subscription Subscription to terminate
[ "Terminate", "a", "particular", "{", "@link", "Subscription", "}", "by", "it", "s", "UUID" ]
train
https://github.com/killbilling/recurly-java-library/blob/5e05eedd91885a51e1aa8293bd41139d082cf7f4/src/main/java/com/ning/billing/recurly/RecurlyClient.java#L561-L564
Stratio/deep-spark
deep-commons/src/main/java/com/stratio/deep/commons/entity/Cells.java
Cells.getBoolean
public Boolean getBoolean(String nameSpace, String cellName) { return getValue(nameSpace, cellName, Boolean.class); }
java
public Boolean getBoolean(String nameSpace, String cellName) { return getValue(nameSpace, cellName, Boolean.class); }
[ "public", "Boolean", "getBoolean", "(", "String", "nameSpace", ",", "String", "cellName", ")", "{", "return", "getValue", "(", "nameSpace", ",", "cellName", ",", "Boolean", ".", "class", ")", ";", "}" ]
Returns the {@code Boolean} value of the {@link Cell} (associated to {@code table}) whose name iscellName, or null if this Cells object contains no cell whose name is cellName. @param nameSpace the name of the owning table @param cellName the name of the Cell we want to retrieve from this Cells object. @return the {@...
[ "Returns", "the", "{", "@code", "Boolean", "}", "value", "of", "the", "{", "@link", "Cell", "}", "(", "associated", "to", "{", "@code", "table", "}", ")", "whose", "name", "iscellName", "or", "null", "if", "this", "Cells", "object", "contains", "no", "...
train
https://github.com/Stratio/deep-spark/blob/b9621c9b7a6d996f80fce1d073d696a157bed095/deep-commons/src/main/java/com/stratio/deep/commons/entity/Cells.java#L931-L933
anotheria/moskito
moskito-aop/src/main/java/net/anotheria/moskito/aop/aspect/AbstractMoskitoAspect.java
AbstractMoskitoAspect.getProducerId
private String getProducerId(final ProceedingJoinPoint pjp, final String aPId, final boolean withMethod) { if (!StringUtils.isEmpty(aPId)) return aPId; String res = pjp.getSignature().getDeclaringTypeName(); try { res = MoskitoUtils.producerName(res); } catch (final RuntimeException e) { if (logger.is...
java
private String getProducerId(final ProceedingJoinPoint pjp, final String aPId, final boolean withMethod) { if (!StringUtils.isEmpty(aPId)) return aPId; String res = pjp.getSignature().getDeclaringTypeName(); try { res = MoskitoUtils.producerName(res); } catch (final RuntimeException e) { if (logger.is...
[ "private", "String", "getProducerId", "(", "final", "ProceedingJoinPoint", "pjp", ",", "final", "String", "aPId", ",", "final", "boolean", "withMethod", ")", "{", "if", "(", "!", "StringUtils", ".", "isEmpty", "(", "aPId", ")", ")", "return", "aPId", ";", ...
Fetch producer id - for further usage. @param pjp {@link ProceedingJoinPoint} @param aPId provided producer id @param withMethod {@code true} in case if methodName should be used in produce id, {@code false} otheriwse @return producer identifier
[ "Fetch", "producer", "id", "-", "for", "further", "usage", "." ]
train
https://github.com/anotheria/moskito/blob/0fdb79053b98a6ece610fa159f59bc3331e4cf05/moskito-aop/src/main/java/net/anotheria/moskito/aop/aspect/AbstractMoskitoAspect.java#L188-L203
snowflakedb/snowflake-jdbc
src/main/java/net/snowflake/client/core/SFTrustManager.java
SFTrustManager.isCached
private boolean isCached(List<SFPair<Certificate, Certificate>> pairIssuerSubjectList) { long currentTimeSecond = new Date().getTime() / 1000L; boolean isCached = true; try { for (SFPair<Certificate, Certificate> pairIssuerSubject : pairIssuerSubjectList) { OCSPReq req = createRequ...
java
private boolean isCached(List<SFPair<Certificate, Certificate>> pairIssuerSubjectList) { long currentTimeSecond = new Date().getTime() / 1000L; boolean isCached = true; try { for (SFPair<Certificate, Certificate> pairIssuerSubject : pairIssuerSubjectList) { OCSPReq req = createRequ...
[ "private", "boolean", "isCached", "(", "List", "<", "SFPair", "<", "Certificate", ",", "Certificate", ">", ">", "pairIssuerSubjectList", ")", "{", "long", "currentTimeSecond", "=", "new", "Date", "(", ")", ".", "getTime", "(", ")", "/", "1000L", ";", "bool...
Is OCSP Response cached? @param pairIssuerSubjectList a list of pair of issuer and subject certificates @return true if all of OCSP response are cached else false
[ "Is", "OCSP", "Response", "cached?" ]
train
https://github.com/snowflakedb/snowflake-jdbc/blob/98567b5a57753f29d51446809640b969a099658f/src/main/java/net/snowflake/client/core/SFTrustManager.java#L844-L894
census-instrumentation/opencensus-java
api/src/main/java/io/opencensus/trace/TraceId.java
TraceId.generateRandomId
public static TraceId generateRandomId(Random random) { long idHi; long idLo; do { idHi = random.nextLong(); idLo = random.nextLong(); } while (idHi == INVALID_ID && idLo == INVALID_ID); return new TraceId(idHi, idLo); }
java
public static TraceId generateRandomId(Random random) { long idHi; long idLo; do { idHi = random.nextLong(); idLo = random.nextLong(); } while (idHi == INVALID_ID && idLo == INVALID_ID); return new TraceId(idHi, idLo); }
[ "public", "static", "TraceId", "generateRandomId", "(", "Random", "random", ")", "{", "long", "idHi", ";", "long", "idLo", ";", "do", "{", "idHi", "=", "random", ".", "nextLong", "(", ")", ";", "idLo", "=", "random", ".", "nextLong", "(", ")", ";", "...
Generates a new random {@code TraceId}. @param random the random number generator. @return a new valid {@code TraceId}. @since 0.5
[ "Generates", "a", "new", "random", "{", "@code", "TraceId", "}", "." ]
train
https://github.com/census-instrumentation/opencensus-java/blob/deefac9bed77e40a2297bff1ca5ec5aa48a5f755/api/src/main/java/io/opencensus/trace/TraceId.java#L140-L148
DV8FromTheWorld/JDA
src/main/java/net/dv8tion/jda/core/managers/GuildController.java
GuildController.createEmote
@CheckReturnValue public AuditableRestAction<Emote> createEmote(String name, Icon icon, Role... roles) { checkPermission(Permission.MANAGE_EMOTES); Checks.notBlank(name, "Emote name"); Checks.notNull(icon, "Emote icon"); Checks.notNull(roles, "Roles"); JSONObject body = ...
java
@CheckReturnValue public AuditableRestAction<Emote> createEmote(String name, Icon icon, Role... roles) { checkPermission(Permission.MANAGE_EMOTES); Checks.notBlank(name, "Emote name"); Checks.notNull(icon, "Emote icon"); Checks.notNull(roles, "Roles"); JSONObject body = ...
[ "@", "CheckReturnValue", "public", "AuditableRestAction", "<", "Emote", ">", "createEmote", "(", "String", "name", ",", "Icon", "icon", ",", "Role", "...", "roles", ")", "{", "checkPermission", "(", "Permission", ".", "MANAGE_EMOTES", ")", ";", "Checks", ".", ...
Creates a new {@link net.dv8tion.jda.core.entities.Emote Emote} in this Guild. <br>If one or more Roles are specified the new Emote will only be available to Members with any of the specified Roles (see {@link Member#canInteract(Emote)}) <br>For this to be successful, the logged in account has to have the {@link net.dv...
[ "Creates", "a", "new", "{", "@link", "net", ".", "dv8tion", ".", "jda", ".", "core", ".", "entities", ".", "Emote", "Emote", "}", "in", "this", "Guild", ".", "<br", ">", "If", "one", "or", "more", "Roles", "are", "specified", "the", "new", "Emote", ...
train
https://github.com/DV8FromTheWorld/JDA/blob/8ecbbe354d03f6bf448411bba573d0d4c268b560/src/main/java/net/dv8tion/jda/core/managers/GuildController.java#L2004-L2035
lucee/Lucee
core/src/main/java/lucee/runtime/converter/ScriptConverter.java
ScriptConverter._serializeDate
private void _serializeDate(Date date, StringBuilder sb) throws ConverterException { _serializeDateTime(new DateTimeImpl(date), sb); }
java
private void _serializeDate(Date date, StringBuilder sb) throws ConverterException { _serializeDateTime(new DateTimeImpl(date), sb); }
[ "private", "void", "_serializeDate", "(", "Date", "date", ",", "StringBuilder", "sb", ")", "throws", "ConverterException", "{", "_serializeDateTime", "(", "new", "DateTimeImpl", "(", "date", ")", ",", "sb", ")", ";", "}" ]
serialize a Date @param date Date to serialize @param sb @throws ConverterException
[ "serialize", "a", "Date" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/converter/ScriptConverter.java#L115-L117
JosePaumard/streams-utils
src/main/java/org/paumard/streams/StreamsUtils.java
StreamsUtils.shiftingWindowAveragingLong
public static <E> DoubleStream shiftingWindowAveragingLong(Stream<E> stream, int rollingFactor, ToLongFunction<? super E> mapper) { Objects.requireNonNull(stream); Objects.requireNonNull(mapper); LongStream longStream = stream.mapToLong(mapper); return shiftingWindowAveragingLong(longSt...
java
public static <E> DoubleStream shiftingWindowAveragingLong(Stream<E> stream, int rollingFactor, ToLongFunction<? super E> mapper) { Objects.requireNonNull(stream); Objects.requireNonNull(mapper); LongStream longStream = stream.mapToLong(mapper); return shiftingWindowAveragingLong(longSt...
[ "public", "static", "<", "E", ">", "DoubleStream", "shiftingWindowAveragingLong", "(", "Stream", "<", "E", ">", "stream", ",", "int", "rollingFactor", ",", "ToLongFunction", "<", "?", "super", "E", ">", "mapper", ")", "{", "Objects", ".", "requireNonNull", "...
<p>Generates a stream that is computed from a provided stream following two steps.</p> <p>The first steps maps this stream to an <code>LongStream</code> that is then rolled following the same principle as the <code>roll()</code> method. This steps builds a <code>Stream&lt;LongStream&gt;</code>. </p> <p>Then the <code>a...
[ "<p", ">", "Generates", "a", "stream", "that", "is", "computed", "from", "a", "provided", "stream", "following", "two", "steps", ".", "<", "/", "p", ">", "<p", ">", "The", "first", "steps", "maps", "this", "stream", "to", "an", "<code", ">", "LongStrea...
train
https://github.com/JosePaumard/streams-utils/blob/56152574af0aca44c5f679761202a8f90984ab73/src/main/java/org/paumard/streams/StreamsUtils.java#L606-L612
geomajas/geomajas-project-server
plugin/layer-hibernate/hibernate/src/main/java/org/geomajas/layer/hibernate/filter/ExtendedLikeFilterImpl.java
ExtendedLikeFilterImpl.setPattern
@Deprecated public final void setPattern(Expression p, String wildcardMultiChar, String wildcardOneChar, String escapeString) { setPattern(p.toString(), wildcardMultiChar, wildcardOneChar, escapeString); }
java
@Deprecated public final void setPattern(Expression p, String wildcardMultiChar, String wildcardOneChar, String escapeString) { setPattern(p.toString(), wildcardMultiChar, wildcardOneChar, escapeString); }
[ "@", "Deprecated", "public", "final", "void", "setPattern", "(", "Expression", "p", ",", "String", "wildcardMultiChar", ",", "String", "wildcardOneChar", ",", "String", "escapeString", ")", "{", "setPattern", "(", "p", ".", "toString", "(", ")", ",", "wildcard...
Set the match pattern for this FilterLike. @param p the expression which evaluates to the match pattern for this filter @param wildcardMultiChar the string that represents a multiple character (1->n) wildcard @param wildcardOneChar the string that represents a single character (1) wildcard @param escapeString the stri...
[ "Set", "the", "match", "pattern", "for", "this", "FilterLike", "." ]
train
https://github.com/geomajas/geomajas-project-server/blob/904b7d7deed1350d28955589098dd1e0a786d76e/plugin/layer-hibernate/hibernate/src/main/java/org/geomajas/layer/hibernate/filter/ExtendedLikeFilterImpl.java#L307-L310
Coreoz/Wisp
src/main/java/com/coreoz/wisp/LongRunningJobMonitor.java
LongRunningJobMonitor.cleanUpLongJobIfItHasFinishedExecuting
Long cleanUpLongJobIfItHasFinishedExecuting(long currentTime, Job job) { if(longRunningJobs.containsKey(job) && longRunningJobs.get(job).executionsCount != job.executionsCount()) { Long jobLastExecutionTimeInMillis = job.lastExecutionEndedTimeInMillis(); int jobExecutionsCount = job.executionsCount(); Lon...
java
Long cleanUpLongJobIfItHasFinishedExecuting(long currentTime, Job job) { if(longRunningJobs.containsKey(job) && longRunningJobs.get(job).executionsCount != job.executionsCount()) { Long jobLastExecutionTimeInMillis = job.lastExecutionEndedTimeInMillis(); int jobExecutionsCount = job.executionsCount(); Lon...
[ "Long", "cleanUpLongJobIfItHasFinishedExecuting", "(", "long", "currentTime", ",", "Job", "job", ")", "{", "if", "(", "longRunningJobs", ".", "containsKey", "(", "job", ")", "&&", "longRunningJobs", ".", "get", "(", "job", ")", ".", "executionsCount", "!=", "j...
cleanup jobs that have finished executing after {@link #thresholdDetectionInMillis}
[ "cleanup", "jobs", "that", "have", "finished", "executing", "after", "{" ]
train
https://github.com/Coreoz/Wisp/blob/6d5de3b88fbe259e327296eea167b18cf41c7641/src/main/java/com/coreoz/wisp/LongRunningJobMonitor.java#L115-L144
aws/aws-sdk-java
aws-java-sdk-stepfunctions/src/main/java/com/amazonaws/services/stepfunctions/builder/internal/validation/ValidationContext.java
ValidationContext.assertIsValidReferencePath
public void assertIsValidReferencePath(String path, String propertyName) { if (path == null) { return; } if (path.isEmpty()) { problemReporter.report(new Problem(this, String.format("%s cannot be empty", propertyName))); return; } }
java
public void assertIsValidReferencePath(String path, String propertyName) { if (path == null) { return; } if (path.isEmpty()) { problemReporter.report(new Problem(this, String.format("%s cannot be empty", propertyName))); return; } }
[ "public", "void", "assertIsValidReferencePath", "(", "String", "path", ",", "String", "propertyName", ")", "{", "if", "(", "path", "==", "null", ")", "{", "return", ";", "}", "if", "(", "path", ".", "isEmpty", "(", ")", ")", "{", "problemReporter", ".", ...
Asserts that the string represents a valid reference path expression. @param path Path expression to validate. @param propertyName Name of property.
[ "Asserts", "that", "the", "string", "represents", "a", "valid", "reference", "path", "expression", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-stepfunctions/src/main/java/com/amazonaws/services/stepfunctions/builder/internal/validation/ValidationContext.java#L181-L189
jbundle/jbundle
base/screen/model/src/main/java/org/jbundle/base/screen/model/BaseGridScreen.java
BaseGridScreen.getNextRecord
public Record getNextRecord(PrintWriter out, int iPrintOptions, boolean bFirstTime, boolean bHeadingFootingExists) throws DBException { Object[] rgobjEnabled = null; boolean bAfterRequery = !this.getMainRecord().isOpen(); if (!this.getMainRecord().isOpen()) this.getMainRe...
java
public Record getNextRecord(PrintWriter out, int iPrintOptions, boolean bFirstTime, boolean bHeadingFootingExists) throws DBException { Object[] rgobjEnabled = null; boolean bAfterRequery = !this.getMainRecord().isOpen(); if (!this.getMainRecord().isOpen()) this.getMainRe...
[ "public", "Record", "getNextRecord", "(", "PrintWriter", "out", ",", "int", "iPrintOptions", ",", "boolean", "bFirstTime", ",", "boolean", "bHeadingFootingExists", ")", "throws", "DBException", "{", "Object", "[", "]", "rgobjEnabled", "=", "null", ";", "boolean", ...
Get the next record. This is the special method for a report. It handles breaks by disabling all listeners except filter listeners, then reenabling and calling the listeners after the footing has been printed, so totals, etc will be in the next break. @param out The out stream. @param iPrintOptions Print options. @para...
[ "Get", "the", "next", "record", ".", "This", "is", "the", "special", "method", "for", "a", "report", ".", "It", "handles", "breaks", "by", "disabling", "all", "listeners", "except", "filter", "listeners", "then", "reenabling", "and", "calling", "the", "liste...
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/model/src/main/java/org/jbundle/base/screen/model/BaseGridScreen.java#L302-L321
sarl/sarl
main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/labeling/SARLLabelProvider.java
SARLLabelProvider.handleImageDescriptorError
protected ImageDescriptor handleImageDescriptorError(Object[] params, Throwable exception) { if (exception instanceof NullPointerException) { final Object defaultImage = getDefaultImage(); if (defaultImage instanceof ImageDescriptor) { return (ImageDescriptor) defaultImage; } if (defaultImage instance...
java
protected ImageDescriptor handleImageDescriptorError(Object[] params, Throwable exception) { if (exception instanceof NullPointerException) { final Object defaultImage = getDefaultImage(); if (defaultImage instanceof ImageDescriptor) { return (ImageDescriptor) defaultImage; } if (defaultImage instance...
[ "protected", "ImageDescriptor", "handleImageDescriptorError", "(", "Object", "[", "]", "params", ",", "Throwable", "exception", ")", "{", "if", "(", "exception", "instanceof", "NullPointerException", ")", "{", "final", "Object", "defaultImage", "=", "getDefaultImage",...
Invoked when an image descriptor cannot be found. @param params the parameters given to the method polymorphic dispatcher. @param exception the cause of the error. @return the image descriptor for the error.
[ "Invoked", "when", "an", "image", "descriptor", "cannot", "be", "found", "." ]
train
https://github.com/sarl/sarl/blob/ca00ff994598c730339972def4e19a60e0b8cace/main/coreplugins/io.sarl.lang.ui/src/io/sarl/lang/ui/labeling/SARLLabelProvider.java#L162-L174
haifengl/smile
math/src/main/java/smile/math/matrix/PageRank.java
PageRank.pagerank
public static double[] pagerank(Matrix A) { int n = A.nrows(); double[] v = new double[n]; Arrays.fill(v, 1.0 / n); return pagerank(A, v); }
java
public static double[] pagerank(Matrix A) { int n = A.nrows(); double[] v = new double[n]; Arrays.fill(v, 1.0 / n); return pagerank(A, v); }
[ "public", "static", "double", "[", "]", "pagerank", "(", "Matrix", "A", ")", "{", "int", "n", "=", "A", ".", "nrows", "(", ")", ";", "double", "[", "]", "v", "=", "new", "double", "[", "n", "]", ";", "Arrays", ".", "fill", "(", "v", ",", "1.0...
Calculate the page rank vector. @param A the matrix supporting matrix vector multiplication operation. @return the page rank vector.
[ "Calculate", "the", "page", "rank", "vector", "." ]
train
https://github.com/haifengl/smile/blob/e27e43e90fbaacce3f99d30120cf9dd6a764c33d/math/src/main/java/smile/math/matrix/PageRank.java#L42-L47
BioPAX/Paxtools
pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java
PatternBox.relatedProteinRefOfInter
public static Pattern relatedProteinRefOfInter(Class<? extends Interaction>... seedType) { Pattern p = new Pattern(Interaction.class, "Interaction"); if (seedType.length == 1) { p.add(new Type(seedType[0]), "Interaction"); } else if (seedType.length > 1) { MappedConst[] mc = new MappedConst[seedType...
java
public static Pattern relatedProteinRefOfInter(Class<? extends Interaction>... seedType) { Pattern p = new Pattern(Interaction.class, "Interaction"); if (seedType.length == 1) { p.add(new Type(seedType[0]), "Interaction"); } else if (seedType.length > 1) { MappedConst[] mc = new MappedConst[seedType...
[ "public", "static", "Pattern", "relatedProteinRefOfInter", "(", "Class", "<", "?", "extends", "Interaction", ">", "...", "seedType", ")", "{", "Pattern", "p", "=", "new", "Pattern", "(", "Interaction", ".", "class", ",", "\"Interaction\"", ")", ";", "if", "(...
Finds ProteinsReference related to an interaction. If specific types of interactions are desired, they should be sent as parameter, otherwise leave the parameter empty. @param seedType specific BioPAX interaction sub-types (interface classes) @return pattern
[ "Finds", "ProteinsReference", "related", "to", "an", "interaction", ".", "If", "specific", "types", "of", "interactions", "are", "desired", "they", "should", "be", "sent", "as", "parameter", "otherwise", "leave", "the", "parameter", "empty", "." ]
train
https://github.com/BioPAX/Paxtools/blob/2f93afa94426bf8b5afc2e0e61cd4b269a83288d/pattern/src/main/java/org/biopax/paxtools/pattern/PatternBox.java#L680-L709
OpenLiberty/open-liberty
dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/CookieHelper.java
CookieHelper.getCookieValue
@Sensitive public static String getCookieValue(Cookie[] cookies, String cookieName) { if (cookies == null) { return null; } String retVal = null; for (int i = 0; i < cookies.length; ++i) { if (cookieName.equalsIgnoreCase(cookies[i].getName())) { ...
java
@Sensitive public static String getCookieValue(Cookie[] cookies, String cookieName) { if (cookies == null) { return null; } String retVal = null; for (int i = 0; i < cookies.length; ++i) { if (cookieName.equalsIgnoreCase(cookies[i].getName())) { ...
[ "@", "Sensitive", "public", "static", "String", "getCookieValue", "(", "Cookie", "[", "]", "cookies", ",", "String", "cookieName", ")", "{", "if", "(", "cookies", "==", "null", ")", "{", "return", "null", ";", "}", "String", "retVal", "=", "null", ";", ...
Retrieve the value of the first instance of the specified Cookie name from the array of Cookies. Note name matching ignores case. @param cookies array of Cookie objects, may be {@code null}. @param cookieName the name of the cookie @return String value associated with the specified cookieName, {@code null} if no match...
[ "Retrieve", "the", "value", "of", "the", "first", "instance", "of", "the", "specified", "Cookie", "name", "from", "the", "array", "of", "Cookies", ".", "Note", "name", "matching", "ignores", "case", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.webcontainer.security/src/com/ibm/ws/webcontainer/security/CookieHelper.java#L39-L54
apache/spark
sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/UnsafeRow.java
UnsafeRow.createFromByteArray
public static UnsafeRow createFromByteArray(int numBytes, int numFields) { final UnsafeRow row = new UnsafeRow(numFields); row.pointTo(new byte[numBytes], numBytes); return row; }
java
public static UnsafeRow createFromByteArray(int numBytes, int numFields) { final UnsafeRow row = new UnsafeRow(numFields); row.pointTo(new byte[numBytes], numBytes); return row; }
[ "public", "static", "UnsafeRow", "createFromByteArray", "(", "int", "numBytes", ",", "int", "numFields", ")", "{", "final", "UnsafeRow", "row", "=", "new", "UnsafeRow", "(", "numFields", ")", ";", "row", ".", "pointTo", "(", "new", "byte", "[", "numBytes", ...
Creates an empty UnsafeRow from a byte array with specified numBytes and numFields. The returned row is invalid until we call copyFrom on it.
[ "Creates", "an", "empty", "UnsafeRow", "from", "a", "byte", "array", "with", "specified", "numBytes", "and", "numFields", ".", "The", "returned", "row", "is", "invalid", "until", "we", "call", "copyFrom", "on", "it", "." ]
train
https://github.com/apache/spark/blob/25ee0474f47d9c30d6f553a7892d9549f91071cf/sql/catalyst/src/main/java/org/apache/spark/sql/catalyst/expressions/UnsafeRow.java#L475-L479
phax/ph-css
ph-css/src/main/java/com/helger/css/reader/CSSReader.java
CSSReader.isValidCSS
public static boolean isValidCSS (@Nonnull @WillClose final Reader aReader, @Nonnull final ECSSVersion eVersion) { ValueEnforcer.notNull (aReader, "Reader"); ValueEnforcer.notNull (eVersion, "Version"); try { final CSSCharStream aCharStream = new CSSCharStream (aReader); final CSSNode aNo...
java
public static boolean isValidCSS (@Nonnull @WillClose final Reader aReader, @Nonnull final ECSSVersion eVersion) { ValueEnforcer.notNull (aReader, "Reader"); ValueEnforcer.notNull (eVersion, "Version"); try { final CSSCharStream aCharStream = new CSSCharStream (aReader); final CSSNode aNo...
[ "public", "static", "boolean", "isValidCSS", "(", "@", "Nonnull", "@", "WillClose", "final", "Reader", "aReader", ",", "@", "Nonnull", "final", "ECSSVersion", "eVersion", ")", "{", "ValueEnforcer", ".", "notNull", "(", "aReader", ",", "\"Reader\"", ")", ";", ...
Check if the passed reader can be resembled to valid CSS content. This is accomplished by fully parsing the CSS each time the method is called. This is similar to calling {@link #readFromStream(IHasInputStream, Charset, ECSSVersion)} and checking for a non-<code>null</code> result. @param aReader The reader to use. Ma...
[ "Check", "if", "the", "passed", "reader", "can", "be", "resembled", "to", "valid", "CSS", "content", ".", "This", "is", "accomplished", "by", "fully", "parsing", "the", "CSS", "each", "time", "the", "method", "is", "called", ".", "This", "is", "similar", ...
train
https://github.com/phax/ph-css/blob/c9da5bb4decc681de6e27ce31712aad4c00adafa/ph-css/src/main/java/com/helger/css/reader/CSSReader.java#L352-L371
codeprimate-software/cp-elements
src/main/java/org/cp/elements/lang/RuntimeExceptionsFactory.java
RuntimeExceptionsFactory.newIllegalArgumentException
public static IllegalArgumentException newIllegalArgumentException(Throwable cause, String message, Object... args) { return new IllegalArgumentException(format(message, args), cause); }
java
public static IllegalArgumentException newIllegalArgumentException(Throwable cause, String message, Object... args) { return new IllegalArgumentException(format(message, args), cause); }
[ "public", "static", "IllegalArgumentException", "newIllegalArgumentException", "(", "Throwable", "cause", ",", "String", "message", ",", "Object", "...", "args", ")", "{", "return", "new", "IllegalArgumentException", "(", "format", "(", "message", ",", "args", ")", ...
Constructs and initializes a new {@link IllegalArgumentException} with the given {@link Throwable cause} and {@link String message} formatted with the given {@link Object[] arguments}. @param cause {@link Throwable} identified as the reason this {@link IllegalArgumentException} was thrown. @param message {@link String...
[ "Constructs", "and", "initializes", "a", "new", "{", "@link", "IllegalArgumentException", "}", "with", "the", "given", "{", "@link", "Throwable", "cause", "}", "and", "{", "@link", "String", "message", "}", "formatted", "with", "the", "given", "{", "@link", ...
train
https://github.com/codeprimate-software/cp-elements/blob/f2163c149fbbef05015e688132064ebcac7c49ab/src/main/java/org/cp/elements/lang/RuntimeExceptionsFactory.java#L62-L64
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/alg/filter/binary/ThresholdSauvola_MT.java
ThresholdSauvola_MT.process
@Override public void process(GrayF32 input , GrayU8 output ) { inputPow2.reshape(input.width,input.height); inputMean.reshape(input.width,input.height); inputMeanPow2.reshape(input.width,input.height); inputPow2Mean.reshape(input.width,input.height); stdev.reshape(input.width,input.height); tmp.reshape(in...
java
@Override public void process(GrayF32 input , GrayU8 output ) { inputPow2.reshape(input.width,input.height); inputMean.reshape(input.width,input.height); inputMeanPow2.reshape(input.width,input.height); inputPow2Mean.reshape(input.width,input.height); stdev.reshape(input.width,input.height); tmp.reshape(in...
[ "@", "Override", "public", "void", "process", "(", "GrayF32", "input", ",", "GrayU8", "output", ")", "{", "inputPow2", ".", "reshape", "(", "input", ".", "width", ",", "input", ".", "height", ")", ";", "inputMean", ".", "reshape", "(", "input", ".", "w...
Converts the input image into a binary image. @param input Input image. Not modified. @param output Output binary image. Modified.
[ "Converts", "the", "input", "image", "into", "a", "binary", "image", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/filter/binary/ThresholdSauvola_MT.java#L86-L135
YahooArchive/samoa
samoa-samza/src/main/java/com/yahoo/labs/samoa/utils/SamzaConfigFactory.java
SamzaConfigFactory.setJobName
private static void setJobName(Map<String,String> map, String jobName) { map.put(JOB_NAME_KEY, jobName); }
java
private static void setJobName(Map<String,String> map, String jobName) { map.put(JOB_NAME_KEY, jobName); }
[ "private", "static", "void", "setJobName", "(", "Map", "<", "String", ",", "String", ">", "map", ",", "String", "jobName", ")", "{", "map", ".", "put", "(", "JOB_NAME_KEY", ",", "jobName", ")", ";", "}" ]
/* Helper methods to set different properties in the input map
[ "/", "*", "Helper", "methods", "to", "set", "different", "properties", "in", "the", "input", "map" ]
train
https://github.com/YahooArchive/samoa/blob/540a2c30167ac85c432b593baabd5ca97e7e8a0f/samoa-samza/src/main/java/com/yahoo/labs/samoa/utils/SamzaConfigFactory.java#L428-L430
Netflix/blitz4j
src/main/java/com/netflix/logging/messaging/BatcherFactory.java
BatcherFactory.createBatcher
public static MessageBatcher createBatcher(String name, MessageProcessor processor) { MessageBatcher batcher = batcherMap.get(name); if (batcher == null) { synchronized (BatcherFactory.class) { batcher = batcherMap.get(name); if (batcher == null) { batcher = new MessageBatcher(name, processor); ...
java
public static MessageBatcher createBatcher(String name, MessageProcessor processor) { MessageBatcher batcher = batcherMap.get(name); if (batcher == null) { synchronized (BatcherFactory.class) { batcher = batcherMap.get(name); if (batcher == null) { batcher = new MessageBatcher(name, processor); ...
[ "public", "static", "MessageBatcher", "createBatcher", "(", "String", "name", ",", "MessageProcessor", "processor", ")", "{", "MessageBatcher", "batcher", "=", "batcherMap", ".", "get", "(", "name", ")", ";", "if", "(", "batcher", "==", "null", ")", "{", "sy...
Creates the batcher. The user needs to make sure another batcher already exists before they create one. @param name - The name of the batcher to be created @param processor - The user override for actions to be performed on the batched messages. @return
[ "Creates", "the", "batcher", ".", "The", "user", "needs", "to", "make", "sure", "another", "batcher", "already", "exists", "before", "they", "create", "one", "." ]
train
https://github.com/Netflix/blitz4j/blob/d03aaf4ede238dc204a4420c8d333565f86fc6f2/src/main/java/com/netflix/logging/messaging/BatcherFactory.java#L63-L76
Erudika/para
para-client/src/main/java/com/erudika/para/client/ParaClient.java
ParaClient.findWildcard
public <P extends ParaObject> List<P> findWildcard(String type, String field, String wildcard, Pager... pager) { MultivaluedMap<String, String> params = new MultivaluedHashMap<>(); params.putSingle("field", field); params.putSingle("q", wildcard); params.putSingle(Config._TYPE, type); params.putAll(pagerToPar...
java
public <P extends ParaObject> List<P> findWildcard(String type, String field, String wildcard, Pager... pager) { MultivaluedMap<String, String> params = new MultivaluedHashMap<>(); params.putSingle("field", field); params.putSingle("q", wildcard); params.putSingle(Config._TYPE, type); params.putAll(pagerToPar...
[ "public", "<", "P", "extends", "ParaObject", ">", "List", "<", "P", ">", "findWildcard", "(", "String", "type", ",", "String", "field", ",", "String", "wildcard", ",", "Pager", "...", "pager", ")", "{", "MultivaluedMap", "<", "String", ",", "String", ">"...
Searches for objects that have a property with a value matching a wildcard query. @param <P> type of the object @param type the type of object to search for. See {@link com.erudika.para.core.ParaObject#getType()} @param field the property name of an object @param wildcard wildcard query string. For example "cat*". @par...
[ "Searches", "for", "objects", "that", "have", "a", "property", "with", "a", "value", "matching", "a", "wildcard", "query", "." ]
train
https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-client/src/main/java/com/erudika/para/client/ParaClient.java#L860-L867
andrehertwig/admintool
admin-tools-core/src/main/java/de/chandre/admintool/core/utils/AdminToolMenuUtils.java
AdminToolMenuUtils.hasMenuEntry
public boolean hasMenuEntry(AdminComponent component, MenuEntry activeMenue) { if (null != component && null != component.getMainMenu()) { Optional<MenuEntry> result = component.getMainMenu().flattened() .filter(menu -> checkForNull(menu, activeMenue) ? menu.getName().equals(activeMenue.getName()): false) ...
java
public boolean hasMenuEntry(AdminComponent component, MenuEntry activeMenue) { if (null != component && null != component.getMainMenu()) { Optional<MenuEntry> result = component.getMainMenu().flattened() .filter(menu -> checkForNull(menu, activeMenue) ? menu.getName().equals(activeMenue.getName()): false) ...
[ "public", "boolean", "hasMenuEntry", "(", "AdminComponent", "component", ",", "MenuEntry", "activeMenue", ")", "{", "if", "(", "null", "!=", "component", "&&", "null", "!=", "component", ".", "getMainMenu", "(", ")", ")", "{", "Optional", "<", "MenuEntry", "...
checks if the activeMenue is part of given component @param component the AdminComponent which should contain the activeMenue @param activeMenue the menue to check @return
[ "checks", "if", "the", "activeMenue", "is", "part", "of", "given", "component" ]
train
https://github.com/andrehertwig/admintool/blob/6d391e2d26969b70e3ccabfc34202abe8d915080/admin-tools-core/src/main/java/de/chandre/admintool/core/utils/AdminToolMenuUtils.java#L182-L190
nguillaumin/slick2d-maven
slick2d-hiero/src/main/java/org/newdawn/slick/tools/hiero/truetype/TTFSubSetFile.java
TTFSubSetFile.createMaxp
private void createMaxp(FontFileReader in, int size) throws IOException { TTFDirTabEntry entry = (TTFDirTabEntry)dirTabs.get("maxp"); if (entry != null) { pad4(); seekTab(in, "maxp", 0); System.arraycopy(in.getBytes((int)entry.getOffset(), (int)entry.getLength()), ...
java
private void createMaxp(FontFileReader in, int size) throws IOException { TTFDirTabEntry entry = (TTFDirTabEntry)dirTabs.get("maxp"); if (entry != null) { pad4(); seekTab(in, "maxp", 0); System.arraycopy(in.getBytes((int)entry.getOffset(), (int)entry.getLength()), ...
[ "private", "void", "createMaxp", "(", "FontFileReader", "in", ",", "int", "size", ")", "throws", "IOException", "{", "TTFDirTabEntry", "entry", "=", "(", "TTFDirTabEntry", ")", "dirTabs", ".", "get", "(", "\"maxp\"", ")", ";", "if", "(", "entry", "!=", "nu...
Copy the maxp table as is from original font to subset font and set num glyphs to size @param in The reader from which to obtain the info @param size The size of the MAXP table to write @throws IOException Indicates a failure to write
[ "Copy", "the", "maxp", "table", "as", "is", "from", "original", "font", "to", "subset", "font", "and", "set", "num", "glyphs", "to", "size" ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-hiero/src/main/java/org/newdawn/slick/tools/hiero/truetype/TTFSubSetFile.java#L273-L291
pravega/pravega
common/src/main/java/io/pravega/common/util/btree/BTreeIndex.java
BTreeIndex.fetchPage
private CompletableFuture<PageWrapper> fetchPage(PagePointer pagePointer, PageWrapper parentPage, PageCollection pageCollection, Duration timeout) { PageWrapper fromCache = pageCollection.get(pagePointer.getOffset()); if (fromCache != null) { return CompletableFuture.completedFuture(fromCach...
java
private CompletableFuture<PageWrapper> fetchPage(PagePointer pagePointer, PageWrapper parentPage, PageCollection pageCollection, Duration timeout) { PageWrapper fromCache = pageCollection.get(pagePointer.getOffset()); if (fromCache != null) { return CompletableFuture.completedFuture(fromCach...
[ "private", "CompletableFuture", "<", "PageWrapper", ">", "fetchPage", "(", "PagePointer", "pagePointer", ",", "PageWrapper", "parentPage", ",", "PageCollection", "pageCollection", ",", "Duration", "timeout", ")", "{", "PageWrapper", "fromCache", "=", "pageCollection", ...
Loads up a single Page. @param pagePointer A PagePointer indicating the Page to load. @param parentPage The sought page's Parent Page. May be null for root pages only. @param pageCollection A PageCollection that contains already looked up pages. If the sought page is already loaded it will be served from here; ...
[ "Loads", "up", "a", "single", "Page", "." ]
train
https://github.com/pravega/pravega/blob/6e24df7470669b3956a07018f52b2c6b3c2a3503/common/src/main/java/io/pravega/common/util/btree/BTreeIndex.java#L651-L667
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/ui/SeaGlassButtonUI.java
SeaGlassButtonUI.getSelectedIcon
private Icon getSelectedIcon(AbstractButton b, Icon defaultIcon) { return getIcon(b, b.getSelectedIcon(), defaultIcon, SynthConstants.SELECTED); }
java
private Icon getSelectedIcon(AbstractButton b, Icon defaultIcon) { return getIcon(b, b.getSelectedIcon(), defaultIcon, SynthConstants.SELECTED); }
[ "private", "Icon", "getSelectedIcon", "(", "AbstractButton", "b", ",", "Icon", "defaultIcon", ")", "{", "return", "getIcon", "(", "b", ",", "b", ".", "getSelectedIcon", "(", ")", ",", "defaultIcon", ",", "SynthConstants", ".", "SELECTED", ")", ";", "}" ]
DOCUMENT ME! @param b DOCUMENT ME! @param defaultIcon DOCUMENT ME! @return DOCUMENT ME!
[ "DOCUMENT", "ME!" ]
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/ui/SeaGlassButtonUI.java#L467-L469
signalapp/curve25519-java
common/src/main/java/org/whispersystems/curve25519/java/fe_neg.java
fe_neg.fe_neg
public static void fe_neg(int[] h,int[] f) { int f0 = f[0]; int f1 = f[1]; int f2 = f[2]; int f3 = f[3]; int f4 = f[4]; int f5 = f[5]; int f6 = f[6]; int f7 = f[7]; int f8 = f[8]; int f9 = f[9]; int h0 = -f0; int h1 = -f1; int h2 = -f2; int h3 = -f3; int h4 = -f4; int h5 = -f5; int h6 ...
java
public static void fe_neg(int[] h,int[] f) { int f0 = f[0]; int f1 = f[1]; int f2 = f[2]; int f3 = f[3]; int f4 = f[4]; int f5 = f[5]; int f6 = f[6]; int f7 = f[7]; int f8 = f[8]; int f9 = f[9]; int h0 = -f0; int h1 = -f1; int h2 = -f2; int h3 = -f3; int h4 = -f4; int h5 = -f5; int h6 ...
[ "public", "static", "void", "fe_neg", "(", "int", "[", "]", "h", ",", "int", "[", "]", "f", ")", "{", "int", "f0", "=", "f", "[", "0", "]", ";", "int", "f1", "=", "f", "[", "1", "]", ";", "int", "f2", "=", "f", "[", "2", "]", ";", "int"...
/* h = -f Preconditions: |f| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc. Postconditions: |h| bounded by 1.1*2^25,1.1*2^24,1.1*2^25,1.1*2^24,etc.
[ "/", "*", "h", "=", "-", "f" ]
train
https://github.com/signalapp/curve25519-java/blob/70fae57d6dccff7e78a46203c534314b07dfdd98/common/src/main/java/org/whispersystems/curve25519/java/fe_neg.java#L17-L49
alkacon/opencms-core
src-gwt/org/opencms/ade/sitemap/client/control/CmsSitemapController.java
CmsSitemapController.safeLookup
public static <A, B> B safeLookup(Map<A, B> map, A key) { if (map == null) { return null; } return map.get(key); }
java
public static <A, B> B safeLookup(Map<A, B> map, A key) { if (map == null) { return null; } return map.get(key); }
[ "public", "static", "<", "A", ",", "B", ">", "B", "safeLookup", "(", "Map", "<", "A", ",", "B", ">", "map", ",", "A", "key", ")", "{", "if", "(", "map", "==", "null", ")", "{", "return", "null", ";", "}", "return", "map", ".", "get", "(", "...
Helper method for looking up a value in a map which may be null.<p> @param <A> the key type @param <B> the value type @param map the map (which may be null) @param key the map key @return the value of the map at the given key, or null if the map is null
[ "Helper", "method", "for", "looking", "up", "a", "value", "in", "a", "map", "which", "may", "be", "null", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/ade/sitemap/client/control/CmsSitemapController.java#L283-L289
JDBDT/jdbdt
src/main/java/org/jdbdt/Log.java
Log.write
void write(CallInfo callInfo, SimpleAssertion assertion) { Element rootNode = root(callInfo); if (assertion.getSource() != null) { write(rootNode, assertion.getSource()); } Element saNode = createNode(rootNode, SIMPLE_ASSERTION_TAG); if (! assertion.passed()) { Element errorsNode = creat...
java
void write(CallInfo callInfo, SimpleAssertion assertion) { Element rootNode = root(callInfo); if (assertion.getSource() != null) { write(rootNode, assertion.getSource()); } Element saNode = createNode(rootNode, SIMPLE_ASSERTION_TAG); if (! assertion.passed()) { Element errorsNode = creat...
[ "void", "write", "(", "CallInfo", "callInfo", ",", "SimpleAssertion", "assertion", ")", "{", "Element", "rootNode", "=", "root", "(", "callInfo", ")", ";", "if", "(", "assertion", ".", "getSource", "(", ")", "!=", "null", ")", "{", "write", "(", "rootNod...
Log simple assertion. @param callInfo Call info. @param assertion Delta assertion.
[ "Log", "simple", "assertion", "." ]
train
https://github.com/JDBDT/jdbdt/blob/7e32845ad41dfbc5d6fd0fd561e3613697186df4/src/main/java/org/jdbdt/Log.java#L298-L312
Azure/azure-sdk-for-java
sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabasesInner.java
DatabasesInner.getByRecommendedElasticPool
public DatabaseInner getByRecommendedElasticPool(String resourceGroupName, String serverName, String recommendedElasticPoolName, String databaseName) { return getByRecommendedElasticPoolWithServiceResponseAsync(resourceGroupName, serverName, recommendedElasticPoolName, databaseName).toBlocking().single().body()...
java
public DatabaseInner getByRecommendedElasticPool(String resourceGroupName, String serverName, String recommendedElasticPoolName, String databaseName) { return getByRecommendedElasticPoolWithServiceResponseAsync(resourceGroupName, serverName, recommendedElasticPoolName, databaseName).toBlocking().single().body()...
[ "public", "DatabaseInner", "getByRecommendedElasticPool", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "recommendedElasticPoolName", ",", "String", "databaseName", ")", "{", "return", "getByRecommendedElasticPoolWithServiceResponseAsync", "(",...
Gets a database inside of a recommented elastic pool. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param recommendedElasticPoolName The name of the elastic pool...
[ "Gets", "a", "database", "inside", "of", "a", "recommented", "elastic", "pool", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/DatabasesInner.java#L1540-L1542
JoeKerouac/utils
src/main/java/com/joe/utils/reflect/asm/AsmInvokeDistributeFactory.java
AsmInvokeDistributeFactory.createIf
private static void createIf(MethodVisitor mv, Method method, Label next, Label start, String className, Class<?> parentClass) { // 标记分支开始位置 mv.visitLabel(start); mv.visitFrame(F_SAME, 0, null, 0, null); // 比较方法声明类 stringEquals(mv, () -> mv.visitV...
java
private static void createIf(MethodVisitor mv, Method method, Label next, Label start, String className, Class<?> parentClass) { // 标记分支开始位置 mv.visitLabel(start); mv.visitFrame(F_SAME, 0, null, 0, null); // 比较方法声明类 stringEquals(mv, () -> mv.visitV...
[ "private", "static", "void", "createIf", "(", "MethodVisitor", "mv", ",", "Method", "method", ",", "Label", "next", ",", "Label", "start", ",", "String", "className", ",", "Class", "<", "?", ">", "parentClass", ")", "{", "// 标记分支开始位置", "mv", ".", "visitLab...
创建if分支的byte code @param mv MethodVisitor @param method Method @param next 下一个分支的起始位置 @param start 该分支的结束位置
[ "创建if分支的byte", "code" ]
train
https://github.com/JoeKerouac/utils/blob/45e1b2dc4d736956674fc4dcbe6cf84eaee69278/src/main/java/com/joe/utils/reflect/asm/AsmInvokeDistributeFactory.java#L236-L277
svenkubiak/mangooio
mangooio-core/src/main/java/io/mangoo/routing/bindings/Validator.java
Validator.expectMatch
public void expectMatch(String name, String message, List<String> values) { String value = Optional.ofNullable(get(name)).orElse(""); if (!(values).contains(value)) { addError(name, Optional.ofNullable(message).orElse(messages.get(Validation.MATCH_VALUES_KEY.name(), name))); } }
java
public void expectMatch(String name, String message, List<String> values) { String value = Optional.ofNullable(get(name)).orElse(""); if (!(values).contains(value)) { addError(name, Optional.ofNullable(message).orElse(messages.get(Validation.MATCH_VALUES_KEY.name(), name))); } }
[ "public", "void", "expectMatch", "(", "String", "name", ",", "String", "message", ",", "List", "<", "String", ">", "values", ")", "{", "String", "value", "=", "Optional", ".", "ofNullable", "(", "get", "(", "name", ")", ")", ".", "orElse", "(", "\"\"",...
Validates to fields to (case-sensitive) match @param name The field to check @param message A custom error message instead of the default one @param values A list of given values to check against
[ "Validates", "to", "fields", "to", "(", "case", "-", "sensitive", ")", "match" ]
train
https://github.com/svenkubiak/mangooio/blob/b3beb6d09510dbbab0ed947d5069c463e1fda6e7/mangooio-core/src/main/java/io/mangoo/routing/bindings/Validator.java#L234-L240
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/particles/ParticleSystem.java
ParticleSystem.getNewParticle
public Particle getNewParticle(ParticleEmitter emitter, float life) { ParticlePool pool = (ParticlePool) particlesByEmitter.get(emitter); ArrayList available = pool.available; if (available.size() > 0) { Particle p = (Particle) available.remove(available.size()-1); p.init(emitter, life); p.set...
java
public Particle getNewParticle(ParticleEmitter emitter, float life) { ParticlePool pool = (ParticlePool) particlesByEmitter.get(emitter); ArrayList available = pool.available; if (available.size() > 0) { Particle p = (Particle) available.remove(available.size()-1); p.init(emitter, life); p.set...
[ "public", "Particle", "getNewParticle", "(", "ParticleEmitter", "emitter", ",", "float", "life", ")", "{", "ParticlePool", "pool", "=", "(", "ParticlePool", ")", "particlesByEmitter", ".", "get", "(", "emitter", ")", ";", "ArrayList", "available", "=", "pool", ...
Get a new particle from the system. This should be used by emitters to request particles @param emitter The emitter requesting the particle @param life The time the new particle should live for @return A particle from the system
[ "Get", "a", "new", "particle", "from", "the", "system", ".", "This", "should", "be", "used", "by", "emitters", "to", "request", "particles" ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/particles/ParticleSystem.java#L546-L561
apiman/apiman
manager/api/war/wildfly8/src/main/java/io/apiman/manager/api/war/wildfly8/Wildfly8PluginRegistry.java
Wildfly8PluginRegistry.getPluginDir
private static File getPluginDir() { String dataDirPath = System.getProperty("jboss.server.data.dir"); //$NON-NLS-1$ File dataDir = new File(dataDirPath); if (!dataDir.isDirectory()) { throw new RuntimeException("Failed to find WildFly data directory at: " + dataDirPath); //$NON-NLS-...
java
private static File getPluginDir() { String dataDirPath = System.getProperty("jboss.server.data.dir"); //$NON-NLS-1$ File dataDir = new File(dataDirPath); if (!dataDir.isDirectory()) { throw new RuntimeException("Failed to find WildFly data directory at: " + dataDirPath); //$NON-NLS-...
[ "private", "static", "File", "getPluginDir", "(", ")", "{", "String", "dataDirPath", "=", "System", ".", "getProperty", "(", "\"jboss.server.data.dir\"", ")", ";", "//$NON-NLS-1$", "File", "dataDir", "=", "new", "File", "(", "dataDirPath", ")", ";", "if", "(",...
Creates the directory to use for the plugin registry. The location of the plugin registry is in the Wildfly data directory.
[ "Creates", "the", "directory", "to", "use", "for", "the", "plugin", "registry", ".", "The", "location", "of", "the", "plugin", "registry", "is", "in", "the", "Wildfly", "data", "directory", "." ]
train
https://github.com/apiman/apiman/blob/8c049c2a2f2e4a69bbb6125686a15edd26f29c21/manager/api/war/wildfly8/src/main/java/io/apiman/manager/api/war/wildfly8/Wildfly8PluginRegistry.java#L48-L56
baidubce/bce-sdk-java
src/main/java/com/baidubce/services/vpc/VpcClient.java
VpcClient.listVpcs
public ListVpcsResponse listVpcs(ListVpcsRequest request) { checkNotNull(request, "request should not be null."); InternalRequest internalRequest = this.createRequest(request, HttpMethodName.GET, VPC_PREFIX); if (request.getMarker() != null) { internalRequest.addParameter("marker", r...
java
public ListVpcsResponse listVpcs(ListVpcsRequest request) { checkNotNull(request, "request should not be null."); InternalRequest internalRequest = this.createRequest(request, HttpMethodName.GET, VPC_PREFIX); if (request.getMarker() != null) { internalRequest.addParameter("marker", r...
[ "public", "ListVpcsResponse", "listVpcs", "(", "ListVpcsRequest", "request", ")", "{", "checkNotNull", "(", "request", ",", "\"request should not be null.\"", ")", ";", "InternalRequest", "internalRequest", "=", "this", ".", "createRequest", "(", "request", ",", "Http...
Return a list of vpcs owned by the authenticated user. @param request The request containing all options for listing own's vpc. @return The response containing a list of vpcs owned by the authenticated user.
[ "Return", "a", "list", "of", "vpcs", "owned", "by", "the", "authenticated", "user", "." ]
train
https://github.com/baidubce/bce-sdk-java/blob/f7140f28dd82121515c88ded7bfe769a37d0ec4a/src/main/java/com/baidubce/services/vpc/VpcClient.java#L200-L213
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/NodeSet.java
NodeSet.addNodesInDocOrder
public void addNodesInDocOrder(NodeList nodelist, XPathContext support) { if (!m_mutable) throw new RuntimeException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_NODESET_NOT_MUTABLE, null)); //"This NodeSet is not mutable!"); int nChildren = nodelist.getLength(); for (int i = 0; i < nChi...
java
public void addNodesInDocOrder(NodeList nodelist, XPathContext support) { if (!m_mutable) throw new RuntimeException(XSLMessages.createXPATHMessage(XPATHErrorResources.ER_NODESET_NOT_MUTABLE, null)); //"This NodeSet is not mutable!"); int nChildren = nodelist.getLength(); for (int i = 0; i < nChi...
[ "public", "void", "addNodesInDocOrder", "(", "NodeList", "nodelist", ",", "XPathContext", "support", ")", "{", "if", "(", "!", "m_mutable", ")", "throw", "new", "RuntimeException", "(", "XSLMessages", ".", "createXPATHMessage", "(", "XPATHErrorResources", ".", "ER...
Copy NodeList members into this nodelist, adding in document order. If a node is null, don't add it. @param nodelist List of nodes to be added @param support The XPath runtime context. @throws RuntimeException thrown if this NodeSet is not of a mutable type.
[ "Copy", "NodeList", "members", "into", "this", "nodelist", "adding", "in", "document", "order", ".", "If", "a", "node", "is", "null", "don", "t", "add", "it", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xpath/NodeSet.java#L516-L533
iipc/webarchive-commons
src/main/java/org/archive/io/ReplayInputStream.java
ReplayInputStream.readContentTo
public void readContentTo(OutputStream os, long maxSize) throws IOException { setToResponseBodyStart(); byte[] buf = new byte[4096]; int c = read(buf); long tot = 0; while (c != -1 && tot < maxSize) { os.write(buf,0,c); c = read(buf); tot += c;...
java
public void readContentTo(OutputStream os, long maxSize) throws IOException { setToResponseBodyStart(); byte[] buf = new byte[4096]; int c = read(buf); long tot = 0; while (c != -1 && tot < maxSize) { os.write(buf,0,c); c = read(buf); tot += c;...
[ "public", "void", "readContentTo", "(", "OutputStream", "os", ",", "long", "maxSize", ")", "throws", "IOException", "{", "setToResponseBodyStart", "(", ")", ";", "byte", "[", "]", "buf", "=", "new", "byte", "[", "4096", "]", ";", "int", "c", "=", "read",...
Convenience method to copy content out to target stream. @param os stream to write content to @param maxSize maximum count of bytes to copy @throws IOException
[ "Convenience", "method", "to", "copy", "content", "out", "to", "target", "stream", "." ]
train
https://github.com/iipc/webarchive-commons/blob/988bec707c27a01333becfc3bd502af4441ea1e1/src/main/java/org/archive/io/ReplayInputStream.java#L234-L244
sagiegurari/fax4j
src/main/java/org/fax4j/common/AbstractLogger.java
AbstractLogger.logDebug
public void logDebug(Object[] message,Throwable throwable) { this.log(LogLevel.DEBUG,message,throwable); }
java
public void logDebug(Object[] message,Throwable throwable) { this.log(LogLevel.DEBUG,message,throwable); }
[ "public", "void", "logDebug", "(", "Object", "[", "]", "message", ",", "Throwable", "throwable", ")", "{", "this", ".", "log", "(", "LogLevel", ".", "DEBUG", ",", "message", ",", "throwable", ")", ";", "}" ]
Logs the provided data at the debug level. @param message The message parts (may be null) @param throwable The error (may be null)
[ "Logs", "the", "provided", "data", "at", "the", "debug", "level", "." ]
train
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/common/AbstractLogger.java#L170-L173
google/j2objc
jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/StringSearch.java
StringSearch.setCollator
public void setCollator(RuleBasedCollator collator) { if (collator == null) { throw new IllegalArgumentException("Collator can not be null"); } collator_ = collator; ceMask_ = getMask(collator_.getStrength()); ULocale collLocale = collator.getLocale(ULocale.VALID_LOC...
java
public void setCollator(RuleBasedCollator collator) { if (collator == null) { throw new IllegalArgumentException("Collator can not be null"); } collator_ = collator; ceMask_ = getMask(collator_.getStrength()); ULocale collLocale = collator.getLocale(ULocale.VALID_LOC...
[ "public", "void", "setCollator", "(", "RuleBasedCollator", "collator", ")", "{", "if", "(", "collator", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Collator can not be null\"", ")", ";", "}", "collator_", "=", "collator", ";", "ce...
Sets the {@link RuleBasedCollator} to be used for language-specific searching. <p> The iterator's position will not be changed by this method. @param collator to use for this <tt>StringSearch</tt> @throws IllegalArgumentException thrown when collator is null @see #getCollator
[ "Sets", "the", "{" ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/StringSearch.java#L309-L327
zsoltk/overpasser
library/src/main/java/hu/supercluster/overpasser/library/query/OverpassFilterQuery.java
OverpassFilterQuery.tagNot
public OverpassFilterQuery tagNot(String name, String value) { builder.notEquals(name, value); return this; }
java
public OverpassFilterQuery tagNot(String name, String value) { builder.notEquals(name, value); return this; }
[ "public", "OverpassFilterQuery", "tagNot", "(", "String", "name", ",", "String", "value", ")", "{", "builder", ".", "notEquals", "(", "name", ",", "value", ")", ";", "return", "this", ";", "}" ]
Adds a <i>["name"!=value]</i> filter tag to the current query. @param name the filter name @param value the filter value @return the current query object
[ "Adds", "a", "<i", ">", "[", "name", "!", "=", "value", "]", "<", "/", "i", ">", "filter", "tag", "to", "the", "current", "query", "." ]
train
https://github.com/zsoltk/overpasser/blob/0464d3844e75c5f9393d2458d3a3aedf3e40f30d/library/src/main/java/hu/supercluster/overpasser/library/query/OverpassFilterQuery.java#L177-L181
Netflix/dyno
dyno-core/src/main/java/com/netflix/dyno/connectionpool/impl/HostStatusTracker.java
HostStatusTracker.verifyMutuallyExclusive
private void verifyMutuallyExclusive(Collection<Host> A, Collection<Host> B) { Set<Host> left = new HashSet<Host>(A); Set<Host> right = new HashSet<Host>(B); boolean modified = left.removeAll(right); if (modified) { throw new RuntimeException("Host up and down sets are not mutually exclusive!"); } }
java
private void verifyMutuallyExclusive(Collection<Host> A, Collection<Host> B) { Set<Host> left = new HashSet<Host>(A); Set<Host> right = new HashSet<Host>(B); boolean modified = left.removeAll(right); if (modified) { throw new RuntimeException("Host up and down sets are not mutually exclusive!"); } }
[ "private", "void", "verifyMutuallyExclusive", "(", "Collection", "<", "Host", ">", "A", ",", "Collection", "<", "Host", ">", "B", ")", "{", "Set", "<", "Host", ">", "left", "=", "new", "HashSet", "<", "Host", ">", "(", "A", ")", ";", "Set", "<", "H...
Helper method to check that there is no overlap b/w hosts up and down. @param A @param B
[ "Helper", "method", "to", "check", "that", "there", "is", "no", "overlap", "b", "/", "w", "hosts", "up", "and", "down", "." ]
train
https://github.com/Netflix/dyno/blob/158f807083ea8e9b09c8089cb07f98e954ad5b23/dyno-core/src/main/java/com/netflix/dyno/connectionpool/impl/HostStatusTracker.java#L68-L77
SeaCloudsEU/SeaCloudsPlatform
planner/optimizer/optimizer-core/src/main/java/eu/seaclouds/platform/planner/optimizer/nfp/QualityAnalyzer.java
QualityAnalyzer.computeAvailability
public double computeAvailability(Solution bestSol, Topology topology, SuitableOptions cloudCharacteristics) { visited = new HashSet<String>(); TopologyElement initialElement = topology.getInitialElement(); visited.add(initialElement.getName()); String cloudUsedInitialElement = bestSol.getCl...
java
public double computeAvailability(Solution bestSol, Topology topology, SuitableOptions cloudCharacteristics) { visited = new HashSet<String>(); TopologyElement initialElement = topology.getInitialElement(); visited.add(initialElement.getName()); String cloudUsedInitialElement = bestSol.getCl...
[ "public", "double", "computeAvailability", "(", "Solution", "bestSol", ",", "Topology", "topology", ",", "SuitableOptions", "cloudCharacteristics", ")", "{", "visited", "=", "new", "HashSet", "<", "String", ">", "(", ")", ";", "TopologyElement", "initialElement", ...
@param bestSol @param topology @param cloudCharacteristics @return The calculated availability of the system. This method will be recursive. The availablity of the system will be the product of the availability of its first module and the modules it requests. It will not work if there are cycles in the topology
[ "@param", "bestSol", "@param", "topology", "@param", "cloudCharacteristics", "@return", "The", "calculated", "availability", "of", "the", "system", "." ]
train
https://github.com/SeaCloudsEU/SeaCloudsPlatform/blob/b199fe6de2c63b808cb248d3aca947d802375df8/planner/optimizer/optimizer-core/src/main/java/eu/seaclouds/platform/planner/optimizer/nfp/QualityAnalyzer.java#L416-L451
UrielCh/ovh-java-sdk
ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java
ApiOvhMe.ipOrganisation_POST
public void ipOrganisation_POST(String abuse_mailbox, String address, String city, OvhCountryEnum country, String firstname, String lastname, String phone, OvhIpRegistryEnum registry, String state, String zip) throws IOException { String qPath = "/me/ipOrganisation"; StringBuilder sb = path(qPath); HashMap<String...
java
public void ipOrganisation_POST(String abuse_mailbox, String address, String city, OvhCountryEnum country, String firstname, String lastname, String phone, OvhIpRegistryEnum registry, String state, String zip) throws IOException { String qPath = "/me/ipOrganisation"; StringBuilder sb = path(qPath); HashMap<String...
[ "public", "void", "ipOrganisation_POST", "(", "String", "abuse_mailbox", ",", "String", "address", ",", "String", "city", ",", "OvhCountryEnum", "country", ",", "String", "firstname", ",", "String", "lastname", ",", "String", "phone", ",", "OvhIpRegistryEnum", "re...
Add an organisation REST: POST /me/ipOrganisation @param zip [required] @param state [required] @param country [required] @param city [required] @param registry [required] @param address [required] @param firstname [required] @param lastname [required] @param phone [required] @param abuse_mailbox [required]
[ "Add", "an", "organisation" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-me/src/main/java/net/minidev/ovh/api/ApiOvhMe.java#L2255-L2270
kohsuke/args4j
args4j/src/org/kohsuke/args4j/CmdLineParser.java
CmdLineParser.printOption
protected void printOption(PrintWriter out, OptionHandler handler, int len, ResourceBundle rb, OptionHandlerFilter filter) { // Hiding options without usage information if (handler.option.usage() == null || handler.option.usage().length() == 0 || !filter.select(handler)) { return...
java
protected void printOption(PrintWriter out, OptionHandler handler, int len, ResourceBundle rb, OptionHandlerFilter filter) { // Hiding options without usage information if (handler.option.usage() == null || handler.option.usage().length() == 0 || !filter.select(handler)) { return...
[ "protected", "void", "printOption", "(", "PrintWriter", "out", ",", "OptionHandler", "handler", ",", "int", "len", ",", "ResourceBundle", "rb", ",", "OptionHandlerFilter", "filter", ")", "{", "// Hiding options without usage information", "if", "(", "handler", ".", ...
Prints usage information for a given option. <p> Subtypes may override this method and determine which options get printed (or other things), based on {@link OptionHandler} (perhaps by using {@code handler.setter.asAnnotatedElement()}). @param out Writer to write into @param handler handler where to receive the...
[ "Prints", "usage", "information", "for", "a", "given", "option", "." ]
train
https://github.com/kohsuke/args4j/blob/dc2e7e265caf15a1a146e3389c1f16a8781f06cf/args4j/src/org/kohsuke/args4j/CmdLineParser.java#L322-L354
box/box-android-sdk
box-content-sdk/src/main/java/com/box/androidsdk/content/models/BoxRepresentation.java
BoxRepresentation.getRepresentationHintString
public static String getRepresentationHintString(String repType, String repSize) { StringBuffer sb = new StringBuffer(repType); if(TYPE_JPG.equals(repType) || TYPE_PNG.equals(repType)) { if(TextUtils.isEmpty(repSize)) { throw new InvalidParameterException("Size is not optiona...
java
public static String getRepresentationHintString(String repType, String repSize) { StringBuffer sb = new StringBuffer(repType); if(TYPE_JPG.equals(repType) || TYPE_PNG.equals(repType)) { if(TextUtils.isEmpty(repSize)) { throw new InvalidParameterException("Size is not optiona...
[ "public", "static", "String", "getRepresentationHintString", "(", "String", "repType", ",", "String", "repSize", ")", "{", "StringBuffer", "sb", "=", "new", "StringBuffer", "(", "repType", ")", ";", "if", "(", "TYPE_JPG", ".", "equals", "(", "repType", ")", ...
Helper method to generate representation hint string @param repType the type of representation @param repSize the size of representation, used for image types. (please refer to dimension string @return string that can be used on server requests hinting the type of representation to return
[ "Helper", "method", "to", "generate", "representation", "hint", "string" ]
train
https://github.com/box/box-android-sdk/blob/a621ad5ddebf23067fec27529130d72718fc0e88/box-content-sdk/src/main/java/com/box/androidsdk/content/models/BoxRepresentation.java#L165-L174
OpenBEL/openbel-framework
org.openbel.framework.core/src/main/java/org/openbel/framework/core/namespace/DefaultNamespaceService.java
DefaultNamespaceService.doVerify
private void doVerify(Parameter p) throws NamespaceSyntaxWarning { if (p.getValue() == null) { throw new InvalidArgument("parameter value is null"); } Namespace ns = p.getNamespace(); String resourceLocation = ns.getResourceLocation(); if (resourceLocation == null) ...
java
private void doVerify(Parameter p) throws NamespaceSyntaxWarning { if (p.getValue() == null) { throw new InvalidArgument("parameter value is null"); } Namespace ns = p.getNamespace(); String resourceLocation = ns.getResourceLocation(); if (resourceLocation == null) ...
[ "private", "void", "doVerify", "(", "Parameter", "p", ")", "throws", "NamespaceSyntaxWarning", "{", "if", "(", "p", ".", "getValue", "(", ")", "==", "null", ")", "{", "throw", "new", "InvalidArgument", "(", "\"parameter value is null\"", ")", ";", "}", "Name...
Do namespace value verification against a resource location. This implementation assumes the namespace has been open prior to execution. @param p {@link Parameter}, the parameter to verify namespace value for which cannot be null and must have a non-null namespace and value @throws NamespaceSyntaxWarning Thrown if par...
[ "Do", "namespace", "value", "verification", "against", "a", "resource", "location", ".", "This", "implementation", "assumes", "the", "namespace", "has", "been", "open", "prior", "to", "execution", "." ]
train
https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.core/src/main/java/org/openbel/framework/core/namespace/DefaultNamespaceService.java#L409-L433
OpenLiberty/open-liberty
dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/cdi/util/BeanProvider.java
BeanProvider.getContextualReference
private static <T> T getContextualReference(Class<T> type, BeanManager beanManager, Bean<?> bean) { //noinspection unchecked return getContextualReference(type, beanManager, new HashSet<Bean<?>>((Collection) Arrays.asList(bean))); }
java
private static <T> T getContextualReference(Class<T> type, BeanManager beanManager, Bean<?> bean) { //noinspection unchecked return getContextualReference(type, beanManager, new HashSet<Bean<?>>((Collection) Arrays.asList(bean))); }
[ "private", "static", "<", "T", ">", "T", "getContextualReference", "(", "Class", "<", "T", ">", "type", ",", "BeanManager", "beanManager", ",", "Bean", "<", "?", ">", "bean", ")", "{", "//noinspection unchecked", "return", "getContextualReference", "(", "type"...
/* public static <T> T getContextualReference(Class<T> type, Bean<T> bean) { return getContextualReference(type, getBeanManager(), bean); }
[ "/", "*", "public", "static", "<T", ">", "T", "getContextualReference", "(", "Class<T", ">", "type", "Bean<T", ">", "bean", ")", "{", "return", "getContextualReference", "(", "type", "getBeanManager", "()", "bean", ")", ";", "}" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsf.2.2/src/org/apache/myfaces/cdi/util/BeanProvider.java#L233-L237
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/command/support/AbstractCommand.java
AbstractCommand.createMenuItem
public final JMenuItem createMenuItem(String faceDescriptorId, MenuFactory menuFactory) { return createMenuItem(faceDescriptorId, menuFactory, getMenuItemButtonConfigurer()); }
java
public final JMenuItem createMenuItem(String faceDescriptorId, MenuFactory menuFactory) { return createMenuItem(faceDescriptorId, menuFactory, getMenuItemButtonConfigurer()); }
[ "public", "final", "JMenuItem", "createMenuItem", "(", "String", "faceDescriptorId", ",", "MenuFactory", "menuFactory", ")", "{", "return", "createMenuItem", "(", "faceDescriptorId", ",", "menuFactory", ",", "getMenuItemButtonConfigurer", "(", ")", ")", ";", "}" ]
Create a menuItem using the default and menuItemButtonConfigurer. @see #createMenuItem(String, MenuFactory, CommandButtonConfigurer)
[ "Create", "a", "menuItem", "using", "the", "default", "and", "menuItemButtonConfigurer", "." ]
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/command/support/AbstractCommand.java#L822-L824
FINRAOS/JTAF-ExtWebDriver
src/main/java/org/finra/jtaf/ewd/widget/element/Element.java
Element.isElementPresentJavaXPath
private boolean isElementPresentJavaXPath() throws Exception { String xpath = ((StringLocatorAwareBy)getByLocator()).getLocator(); try { xpath = formatXPathForJavaXPath(xpath); NodeList nodes = getNodeListUsingJavaXPath(xpath); if (nodes.getLength() > 0) { return true; } else { return false; ...
java
private boolean isElementPresentJavaXPath() throws Exception { String xpath = ((StringLocatorAwareBy)getByLocator()).getLocator(); try { xpath = formatXPathForJavaXPath(xpath); NodeList nodes = getNodeListUsingJavaXPath(xpath); if (nodes.getLength() > 0) { return true; } else { return false; ...
[ "private", "boolean", "isElementPresentJavaXPath", "(", ")", "throws", "Exception", "{", "String", "xpath", "=", "(", "(", "StringLocatorAwareBy", ")", "getByLocator", "(", ")", ")", ".", "getLocator", "(", ")", ";", "try", "{", "xpath", "=", "formatXPathForJa...
Use the Java Xpath API to determine if the element is present or not @return boolean true or false as the case is @throws Exception
[ "Use", "the", "Java", "Xpath", "API", "to", "determine", "if", "the", "element", "is", "present", "or", "not" ]
train
https://github.com/FINRAOS/JTAF-ExtWebDriver/blob/78d646def1bf0904f79b19a81df0241e07f2c73a/src/main/java/org/finra/jtaf/ewd/widget/element/Element.java#L808-L821
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/spider/SpiderService.java
SpiderService.addAutoTable
private TableDefinition addAutoTable(ApplicationDefinition appDef, String tableName) { m_logger.debug("Adding implicit table '{}' to application '{}'", tableName, appDef.getAppName()); Tenant tenant = Tenant.getTenant(appDef); TableDefinition tableDef = new TableDefinition(appDef); t...
java
private TableDefinition addAutoTable(ApplicationDefinition appDef, String tableName) { m_logger.debug("Adding implicit table '{}' to application '{}'", tableName, appDef.getAppName()); Tenant tenant = Tenant.getTenant(appDef); TableDefinition tableDef = new TableDefinition(appDef); t...
[ "private", "TableDefinition", "addAutoTable", "(", "ApplicationDefinition", "appDef", ",", "String", "tableName", ")", "{", "m_logger", ".", "debug", "(", "\"Adding implicit table '{}' to application '{}'\"", ",", "tableName", ",", "appDef", ".", "getAppName", "(", ")",...
Add an implicit table to the given application and return its new TableDefinition.
[ "Add", "an", "implicit", "table", "to", "the", "given", "application", "and", "return", "its", "new", "TableDefinition", "." ]
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/spider/SpiderService.java#L515-L524
ironjacamar/ironjacamar
core/src/main/java/org/ironjacamar/core/recovery/SecurityActions.java
SecurityActions.setAccessible
static void setAccessible(final Method m, final boolean value) { AccessController.doPrivileged(new PrivilegedAction<Object>() { public Object run() { m.setAccessible(value); return null; } }); }
java
static void setAccessible(final Method m, final boolean value) { AccessController.doPrivileged(new PrivilegedAction<Object>() { public Object run() { m.setAccessible(value); return null; } }); }
[ "static", "void", "setAccessible", "(", "final", "Method", "m", ",", "final", "boolean", "value", ")", "{", "AccessController", ".", "doPrivileged", "(", "new", "PrivilegedAction", "<", "Object", ">", "(", ")", "{", "public", "Object", "run", "(", ")", "{"...
Invoke setAccessible on a method @param m The method @param value The value
[ "Invoke", "setAccessible", "on", "a", "method" ]
train
https://github.com/ironjacamar/ironjacamar/blob/f0389ee7e62aa8b40ba09b251edad76d220ea796/core/src/main/java/org/ironjacamar/core/recovery/SecurityActions.java#L46-L56
liferay/com-liferay-commerce
commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceCountryPersistenceImpl.java
CommerceCountryPersistenceImpl.findByGroupId
@Override public List<CommerceCountry> findByGroupId(long groupId) { return findByGroupId(groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
java
@Override public List<CommerceCountry> findByGroupId(long groupId) { return findByGroupId(groupId, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null); }
[ "@", "Override", "public", "List", "<", "CommerceCountry", ">", "findByGroupId", "(", "long", "groupId", ")", "{", "return", "findByGroupId", "(", "groupId", ",", "QueryUtil", ".", "ALL_POS", ",", "QueryUtil", ".", "ALL_POS", ",", "null", ")", ";", "}" ]
Returns all the commerce countries where groupId = &#63;. @param groupId the group ID @return the matching commerce countries
[ "Returns", "all", "the", "commerce", "countries", "where", "groupId", "=", "&#63", ";", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-service/src/main/java/com/liferay/commerce/service/persistence/impl/CommerceCountryPersistenceImpl.java#L1513-L1516
Azure/azure-sdk-for-java
logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/PartnersInner.java
PartnersInner.createOrUpdate
public IntegrationAccountPartnerInner createOrUpdate(String resourceGroupName, String integrationAccountName, String partnerName, IntegrationAccountPartnerInner partner) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, integrationAccountName, partnerName, partner).toBlocking().single().body();...
java
public IntegrationAccountPartnerInner createOrUpdate(String resourceGroupName, String integrationAccountName, String partnerName, IntegrationAccountPartnerInner partner) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, integrationAccountName, partnerName, partner).toBlocking().single().body();...
[ "public", "IntegrationAccountPartnerInner", "createOrUpdate", "(", "String", "resourceGroupName", ",", "String", "integrationAccountName", ",", "String", "partnerName", ",", "IntegrationAccountPartnerInner", "partner", ")", "{", "return", "createOrUpdateWithServiceResponseAsync",...
Creates or updates an integration account partner. @param resourceGroupName The resource group name. @param integrationAccountName The integration account name. @param partnerName The integration account partner name. @param partner The integration account partner. @throws IllegalArgumentException thrown if parameters...
[ "Creates", "or", "updates", "an", "integration", "account", "partner", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/logic/resource-manager/v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/PartnersInner.java#L448-L450
ontop/ontop
engine/reformulation/sql/src/main/java/it/unibz/inf/ontop/answering/reformulation/generation/impl/OneShotSQLGeneratorEngine.java
OneShotSQLGeneratorEngine.generateSourceQuery
SQLExecutableQuery generateSourceQuery(IntermediateQuery intermediateQuery) throws OntopReformulationException { IQ normalizedQuery = normalizeIQ(intermediateQuery); DatalogProgram queryProgram = iq2DatalogTranslator.translate(normalizedQuery); for (CQIE cq : queryProgram.getRules()) { datalogNormalizer....
java
SQLExecutableQuery generateSourceQuery(IntermediateQuery intermediateQuery) throws OntopReformulationException { IQ normalizedQuery = normalizeIQ(intermediateQuery); DatalogProgram queryProgram = iq2DatalogTranslator.translate(normalizedQuery); for (CQIE cq : queryProgram.getRules()) { datalogNormalizer....
[ "SQLExecutableQuery", "generateSourceQuery", "(", "IntermediateQuery", "intermediateQuery", ")", "throws", "OntopReformulationException", "{", "IQ", "normalizedQuery", "=", "normalizeIQ", "(", "intermediateQuery", ")", ";", "DatalogProgram", "queryProgram", "=", "iq2DatalogTr...
Generates and SQL query ready to be executed by Quest. Each query is a SELECT FROM WHERE query. To know more about each of these see the inner method descriptions. Observe that the SQL is produced by {@link #generateQuery} @param intermediateQuery
[ "Generates", "and", "SQL", "query", "ready", "to", "be", "executed", "by", "Quest", ".", "Each", "query", "is", "a", "SELECT", "FROM", "WHERE", "query", ".", "To", "know", "more", "about", "each", "of", "these", "see", "the", "inner", "method", "descript...
train
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/engine/reformulation/sql/src/main/java/it/unibz/inf/ontop/answering/reformulation/generation/impl/OneShotSQLGeneratorEngine.java#L288-L347
OpenLiberty/open-liberty
dev/com.ibm.websphere.javaee.jsf.2.2/src/javax/faces/component/UIViewRoot.java
UIViewRoot._getEvents
private Events _getEvents(PhaseId phaseId) { // Gather the events and purge the event list to prevent concurrent modification during broadcasting int size = _events.size(); List<FacesEvent> anyPhase = new ArrayList<FacesEvent>(size); List<FacesEvent> onPhase = new ArrayList<FacesEven...
java
private Events _getEvents(PhaseId phaseId) { // Gather the events and purge the event list to prevent concurrent modification during broadcasting int size = _events.size(); List<FacesEvent> anyPhase = new ArrayList<FacesEvent>(size); List<FacesEvent> onPhase = new ArrayList<FacesEven...
[ "private", "Events", "_getEvents", "(", "PhaseId", "phaseId", ")", "{", "// Gather the events and purge the event list to prevent concurrent modification during broadcasting", "int", "size", "=", "_events", ".", "size", "(", ")", ";", "List", "<", "FacesEvent", ">", "anyP...
Gathers all event for current and ANY phase @param phaseId current phase id
[ "Gathers", "all", "event", "for", "current", "and", "ANY", "phase" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.websphere.javaee.jsf.2.2/src/javax/faces/component/UIViewRoot.java#L1706-L1733
micronaut-projects/micronaut-core
core/src/main/java/io/micronaut/core/version/SemanticVersion.java
SemanticVersion.isAtLeastMajorMinor
public static boolean isAtLeastMajorMinor(String version, int majorVersion, int minorVersion) { SemanticVersion semanticVersion = new SemanticVersion(version); return isAtLeastMajorMinorImpl(semanticVersion, majorVersion, minorVersion); }
java
public static boolean isAtLeastMajorMinor(String version, int majorVersion, int minorVersion) { SemanticVersion semanticVersion = new SemanticVersion(version); return isAtLeastMajorMinorImpl(semanticVersion, majorVersion, minorVersion); }
[ "public", "static", "boolean", "isAtLeastMajorMinor", "(", "String", "version", ",", "int", "majorVersion", ",", "int", "minorVersion", ")", "{", "SemanticVersion", "semanticVersion", "=", "new", "SemanticVersion", "(", "version", ")", ";", "return", "isAtLeastMajor...
Check whether the current version is at least the given major and minor version. @param version The version to check @param majorVersion The major version @param minorVersion The minor version @return True if it is
[ "Check", "whether", "the", "current", "version", "is", "at", "least", "the", "given", "major", "and", "minor", "version", "." ]
train
https://github.com/micronaut-projects/micronaut-core/blob/c31f5b03ce0eb88c2f6470710987db03b8967d5c/core/src/main/java/io/micronaut/core/version/SemanticVersion.java#L99-L102
DDTH/ddth-dao
ddth-dao-core/src/main/java/com/github/ddth/dao/jdbc/GenericBoJdbcDao.java
GenericBoJdbcDao.updateOrCreate
protected DaoResult updateOrCreate(Connection conn, T bo) { if (bo == null) { return new DaoResult(DaoOperationStatus.NOT_FOUND); } DaoResult result = update(conn, bo); DaoOperationStatus status = result.getStatus(); if (status == DaoOperationStatus.NOT_FOUND) { ...
java
protected DaoResult updateOrCreate(Connection conn, T bo) { if (bo == null) { return new DaoResult(DaoOperationStatus.NOT_FOUND); } DaoResult result = update(conn, bo); DaoOperationStatus status = result.getStatus(); if (status == DaoOperationStatus.NOT_FOUND) { ...
[ "protected", "DaoResult", "updateOrCreate", "(", "Connection", "conn", ",", "T", "bo", ")", "{", "if", "(", "bo", "==", "null", ")", "{", "return", "new", "DaoResult", "(", "DaoOperationStatus", ".", "NOT_FOUND", ")", ";", "}", "DaoResult", "result", "=", ...
Update an existing BO or create a new one. @param conn @param bo @return @since 0.8.1
[ "Update", "an", "existing", "BO", "or", "create", "a", "new", "one", "." ]
train
https://github.com/DDTH/ddth-dao/blob/8d059ddf641a1629aa53851f9d1b41abf175a180/ddth-dao-core/src/main/java/com/github/ddth/dao/jdbc/GenericBoJdbcDao.java#L730-L740
BorderTech/wcomponents
wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WDateField.java
WDateField.handleRequestValue
protected void handleRequestValue(final Date value, final boolean valid, final String text) { // As setData() clears the text value (if valid), this must be called first so it can be set after setData(value); DateFieldModel model = getOrCreateComponentModel(); model.validDate = valid; model.text = text; }
java
protected void handleRequestValue(final Date value, final boolean valid, final String text) { // As setData() clears the text value (if valid), this must be called first so it can be set after setData(value); DateFieldModel model = getOrCreateComponentModel(); model.validDate = valid; model.text = text; }
[ "protected", "void", "handleRequestValue", "(", "final", "Date", "value", ",", "final", "boolean", "valid", ",", "final", "String", "text", ")", "{", "// As setData() clears the text value (if valid), this must be called first so it can be set after", "setData", "(", "value",...
Set the request value. @param value the date value @param valid true if valid value @param text the user text
[ "Set", "the", "request", "value", "." ]
train
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-core/src/main/java/com/github/bordertech/wcomponents/WDateField.java#L209-L215
lucee/Lucee
core/src/main/java/lucee/commons/io/SystemUtil.java
SystemUtil.getTempFile
public static Resource getTempFile(String extension, boolean touch) throws IOException { String filename = CreateUniqueId.invoke(); if (!StringUtil.isEmpty(extension, true)) { if (extension.startsWith(".")) filename += extension; else filename += "." + extension; } Resource file = getTempDirectory().getRe...
java
public static Resource getTempFile(String extension, boolean touch) throws IOException { String filename = CreateUniqueId.invoke(); if (!StringUtil.isEmpty(extension, true)) { if (extension.startsWith(".")) filename += extension; else filename += "." + extension; } Resource file = getTempDirectory().getRe...
[ "public", "static", "Resource", "getTempFile", "(", "String", "extension", ",", "boolean", "touch", ")", "throws", "IOException", "{", "String", "filename", "=", "CreateUniqueId", ".", "invoke", "(", ")", ";", "if", "(", "!", "StringUtil", ".", "isEmpty", "(...
returns the a unique temp file (with no auto delete) @param extension @return temp directory @throws IOException
[ "returns", "the", "a", "unique", "temp", "file", "(", "with", "no", "auto", "delete", ")" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/commons/io/SystemUtil.java#L369-L378
Dempsy/dempsy
dempsy-framework.impl/src/main/java/net/dempsy/output/OutputQuartzHelper.java
OutputQuartzHelper.getSimpleTrigger
public Trigger getSimpleTrigger(TimeUnit timeUnit, int timeInterval) { SimpleScheduleBuilder simpleScheduleBuilder = null; simpleScheduleBuilder = SimpleScheduleBuilder.simpleSchedule(); switch (timeUnit) { case MILLISECONDS: simpleScheduleBuilder.withIntervalInMilliseconds(timeInterval).repeatFo...
java
public Trigger getSimpleTrigger(TimeUnit timeUnit, int timeInterval) { SimpleScheduleBuilder simpleScheduleBuilder = null; simpleScheduleBuilder = SimpleScheduleBuilder.simpleSchedule(); switch (timeUnit) { case MILLISECONDS: simpleScheduleBuilder.withIntervalInMilliseconds(timeInterval).repeatFo...
[ "public", "Trigger", "getSimpleTrigger", "(", "TimeUnit", "timeUnit", ",", "int", "timeInterval", ")", "{", "SimpleScheduleBuilder", "simpleScheduleBuilder", "=", "null", ";", "simpleScheduleBuilder", "=", "SimpleScheduleBuilder", ".", "simpleSchedule", "(", ")", ";", ...
Gets the simple trigger. @param timeUnit the time unit @param timeInterval the time interval @return the simple trigger
[ "Gets", "the", "simple", "trigger", "." ]
train
https://github.com/Dempsy/dempsy/blob/cd3415b51b6787a6a9d9589b15f00ce674b6f113/dempsy-framework.impl/src/main/java/net/dempsy/output/OutputQuartzHelper.java#L62-L87
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.msgstore/src/com/ibm/ws/objectManager/AbstractTreeMap.java
AbstractTreeMap.put
public Object put(Object key, Token value) throws ObjectManagerException { AbstractMapEntry entry = rbInsert(key); Object result = entry.value; entry.value = value; return result; }
java
public Object put(Object key, Token value) throws ObjectManagerException { AbstractMapEntry entry = rbInsert(key); Object result = entry.value; entry.value = value; return result; }
[ "public", "Object", "put", "(", "Object", "key", ",", "Token", "value", ")", "throws", "ObjectManagerException", "{", "AbstractMapEntry", "entry", "=", "rbInsert", "(", "key", ")", ";", "Object", "result", "=", "entry", ".", "value", ";", "entry", ".", "va...
Maps the specified key to the specified value. @param key the key @param value the value @return the value of any previous mapping with the specified key or null if there was no mapping @exception ClassCastException when the key cannot be compared with the keys in this TreeMap @exception NullPointerException when th...
[ "Maps", "the", "specified", "key", "to", "the", "specified", "value", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.msgstore/src/com/ibm/ws/objectManager/AbstractTreeMap.java#L951-L956
spring-cloud/spring-cloud-stream-app-starters
app-starters-common/app-starters-file-common/src/main/java/org/springframework/cloud/stream/app/file/FileUtils.java
FileUtils.enhanceFlowForReadingMode
public static IntegrationFlowBuilder enhanceFlowForReadingMode(IntegrationFlowBuilder flowBuilder, FileConsumerProperties fileConsumerProperties) { switch (fileConsumerProperties.getMode()) { case contents: flowBuilder.enrichHeaders(Collections.<String, Object>singletonMap(MessageHeaders.CONTENT_TYPE, "a...
java
public static IntegrationFlowBuilder enhanceFlowForReadingMode(IntegrationFlowBuilder flowBuilder, FileConsumerProperties fileConsumerProperties) { switch (fileConsumerProperties.getMode()) { case contents: flowBuilder.enrichHeaders(Collections.<String, Object>singletonMap(MessageHeaders.CONTENT_TYPE, "a...
[ "public", "static", "IntegrationFlowBuilder", "enhanceFlowForReadingMode", "(", "IntegrationFlowBuilder", "flowBuilder", ",", "FileConsumerProperties", "fileConsumerProperties", ")", "{", "switch", "(", "fileConsumerProperties", ".", "getMode", "(", ")", ")", "{", "case", ...
Enhance an {@link IntegrationFlowBuilder} to add flow snippets, depending on {@link FileConsumerProperties}. @param flowBuilder the flow builder. @param fileConsumerProperties the properties. @return the updated flow builder.
[ "Enhance", "an", "{" ]
train
https://github.com/spring-cloud/spring-cloud-stream-app-starters/blob/c82827a9b5a6eab78fe6a2d56a946b5f9fb0ead9/app-starters-common/app-starters-file-common/src/main/java/org/springframework/cloud/stream/app/file/FileUtils.java#L40-L63
Impetus/Kundera
src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/schemamanager/CassandraSchemaManager.java
CassandraSchemaManager.onSetComparatorType
private void onSetComparatorType(CfDef cfDef, Properties cfProperties, StringBuilder builder) { String comparatorType = cfProperties.getProperty(CassandraConstants.COMPARATOR_TYPE); if (comparatorType != null) { if (builder != null) { // TODO:::nothing...
java
private void onSetComparatorType(CfDef cfDef, Properties cfProperties, StringBuilder builder) { String comparatorType = cfProperties.getProperty(CassandraConstants.COMPARATOR_TYPE); if (comparatorType != null) { if (builder != null) { // TODO:::nothing...
[ "private", "void", "onSetComparatorType", "(", "CfDef", "cfDef", ",", "Properties", "cfProperties", ",", "StringBuilder", "builder", ")", "{", "String", "comparatorType", "=", "cfProperties", ".", "getProperty", "(", "CassandraConstants", ".", "COMPARATOR_TYPE", ")", ...
On set comparator type. @param cfDef the cf def @param cfProperties the cf properties @param builder the builder
[ "On", "set", "comparator", "type", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/kundera-cassandra/cassandra-core/src/main/java/com/impetus/client/cassandra/schemamanager/CassandraSchemaManager.java#L2713-L2727
SeleniumHQ/selenium
java/client/src/org/openqa/selenium/support/pagefactory/AjaxElementLocator.java
AjaxElementLocator.findElement
@Override public WebElement findElement() { SlowLoadingElement loadingElement = new SlowLoadingElement(clock, timeOutInSeconds); try { return loadingElement.get().getElement(); } catch (NoSuchElementError e) { throw new NoSuchElementException( String.format("Timed out after %d second...
java
@Override public WebElement findElement() { SlowLoadingElement loadingElement = new SlowLoadingElement(clock, timeOutInSeconds); try { return loadingElement.get().getElement(); } catch (NoSuchElementError e) { throw new NoSuchElementException( String.format("Timed out after %d second...
[ "@", "Override", "public", "WebElement", "findElement", "(", ")", "{", "SlowLoadingElement", "loadingElement", "=", "new", "SlowLoadingElement", "(", "clock", ",", "timeOutInSeconds", ")", ";", "try", "{", "return", "loadingElement", ".", "get", "(", ")", ".", ...
{@inheritDoc} Will poll the interface on a regular basis until the element is present.
[ "{", "@inheritDoc", "}" ]
train
https://github.com/SeleniumHQ/selenium/blob/7af172729f17b20269c8ca4ea6f788db48616535/java/client/src/org/openqa/selenium/support/pagefactory/AjaxElementLocator.java#L91-L101
mebigfatguy/fb-contrib
src/main/java/com/mebigfatguy/fbcontrib/detect/JPAIssues.java
JPAIssues.reportExceptionMismatch
private void reportExceptionMismatch(Method method, Set<JavaClass> expectedExceptions, Set<JavaClass> actualExceptions, boolean checkByDirectionally, BugType bugType) { try { for (JavaClass declEx : actualExceptions) { boolean handled = false; for (JavaCla...
java
private void reportExceptionMismatch(Method method, Set<JavaClass> expectedExceptions, Set<JavaClass> actualExceptions, boolean checkByDirectionally, BugType bugType) { try { for (JavaClass declEx : actualExceptions) { boolean handled = false; for (JavaCla...
[ "private", "void", "reportExceptionMismatch", "(", "Method", "method", ",", "Set", "<", "JavaClass", ">", "expectedExceptions", ",", "Set", "<", "JavaClass", ">", "actualExceptions", ",", "boolean", "checkByDirectionally", ",", "BugType", "bugType", ")", "{", "try...
compares the current methods exceptions to those declared in the spring-tx's @Transactional method, both rollbackFor and noRollbackFor. It looks both ways, exceptions thrown that aren't handled by rollbacks/norollbacks, and Spring declarations that aren't actually thrown. @param method the currently parsed method @par...
[ "compares", "the", "current", "methods", "exceptions", "to", "those", "declared", "in", "the", "spring", "-", "tx", "s", "@Transactional", "method", "both", "rollbackFor", "and", "noRollbackFor", ".", "It", "looks", "both", "ways", "exceptions", "thrown", "that"...
train
https://github.com/mebigfatguy/fb-contrib/blob/3b5203196f627b399fbcea3c2ab2b1f4e56cc7b8/src/main/java/com/mebigfatguy/fbcontrib/detect/JPAIssues.java#L372-L392
Carbonado/Carbonado
src/main/java/com/amazon/carbonado/info/StorableIndex.java
StorableIndex.nextSep
private static int nextSep(String desc, int pos) { int pos2 = desc.length(); // assume we'll find none int candidate = desc.indexOf('+', pos); if (candidate > 0) { pos2=candidate; } candidate = desc.indexOf('-', pos); if (candidate>0) { ...
java
private static int nextSep(String desc, int pos) { int pos2 = desc.length(); // assume we'll find none int candidate = desc.indexOf('+', pos); if (candidate > 0) { pos2=candidate; } candidate = desc.indexOf('-', pos); if (candidate>0) { ...
[ "private", "static", "int", "nextSep", "(", "String", "desc", ",", "int", "pos", ")", "{", "int", "pos2", "=", "desc", ".", "length", "(", ")", ";", "// assume we'll find none\r", "int", "candidate", "=", "desc", ".", "indexOf", "(", "'", "'", ",", "po...
Find the first subsequent occurrance of '+', '-', or '~' in the string or the end of line if none are there @param desc string to search @param pos starting position in string @return position of next separator, or end of string if none present
[ "Find", "the", "first", "subsequent", "occurrance", "of", "+", "-", "or", "~", "in", "the", "string", "or", "the", "end", "of", "line", "if", "none", "are", "there" ]
train
https://github.com/Carbonado/Carbonado/blob/eee29b365a61c8f03e1a1dc6bed0692e6b04b1db/src/main/java/com/amazon/carbonado/info/StorableIndex.java#L135-L152
JRebirth/JRebirth
org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/resource/parameter/ParameterBuilder.java
ParameterBuilder.define
public void define(final ParameterItem<?> key, final Object forcedValue) { this.overriddenParametersMap.put(key, forcedValue); set(getParamKey(key), forcedValue); }
java
public void define(final ParameterItem<?> key, final Object forcedValue) { this.overriddenParametersMap.put(key, forcedValue); set(getParamKey(key), forcedValue); }
[ "public", "void", "define", "(", "final", "ParameterItem", "<", "?", ">", "key", ",", "final", "Object", "forcedValue", ")", "{", "this", ".", "overriddenParametersMap", ".", "put", "(", "key", ",", "forcedValue", ")", ";", "set", "(", "getParamKey", "(", ...
Override a parameter value. @param key the parameter item key @param forcedValue the overridden value
[ "Override", "a", "parameter", "value", "." ]
train
https://github.com/JRebirth/JRebirth/blob/93f4fc087b83c73db540333b9686e97b4cec694d/org.jrebirth.af/core/src/main/java/org/jrebirth/af/core/resource/parameter/ParameterBuilder.java#L256-L259
RestComm/jdiameter
core/jdiameter/impl/src/main/java/org/jdiameter/client/impl/MessageUtility.java
MessageUtility.addOriginAvps
public static void addOriginAvps(Message m, MetaData md) { // FIXME: check for "userFqnAsUri" ? AvpSet set = m.getAvps(); if (set.getAvp(Avp.ORIGIN_HOST) == null) { m.getAvps().addAvp(Avp.ORIGIN_HOST, md.getLocalPeer().getUri().getFQDN(), true, false, true); } if (set.getAvp(Avp.ORIGIN_REALM) ...
java
public static void addOriginAvps(Message m, MetaData md) { // FIXME: check for "userFqnAsUri" ? AvpSet set = m.getAvps(); if (set.getAvp(Avp.ORIGIN_HOST) == null) { m.getAvps().addAvp(Avp.ORIGIN_HOST, md.getLocalPeer().getUri().getFQDN(), true, false, true); } if (set.getAvp(Avp.ORIGIN_REALM) ...
[ "public", "static", "void", "addOriginAvps", "(", "Message", "m", ",", "MetaData", "md", ")", "{", "// FIXME: check for \"userFqnAsUri\" ?", "AvpSet", "set", "=", "m", ".", "getAvps", "(", ")", ";", "if", "(", "set", ".", "getAvp", "(", "Avp", ".", "ORIGIN...
Used to set origin, previously done in MessageParser. @param m @param md
[ "Used", "to", "set", "origin", "previously", "done", "in", "MessageParser", "." ]
train
https://github.com/RestComm/jdiameter/blob/672134c378ea9704bf06dbe1985872ad4ebf4640/core/jdiameter/impl/src/main/java/org/jdiameter/client/impl/MessageUtility.java#L66-L75
jcuda/jcusolver
JCusolverJava/src/main/java/jcuda/jcusolver/JCusolverSp.java
JCusolverSp.cusolverSpScsrlsvqrHost
public static int cusolverSpScsrlsvqrHost( cusolverSpHandle handle, int m, int nnz, cusparseMatDescr descrA, Pointer csrValA, Pointer csrRowPtrA, Pointer csrColIndA, Pointer b, float tol, int reorder, Pointer x,...
java
public static int cusolverSpScsrlsvqrHost( cusolverSpHandle handle, int m, int nnz, cusparseMatDescr descrA, Pointer csrValA, Pointer csrRowPtrA, Pointer csrColIndA, Pointer b, float tol, int reorder, Pointer x,...
[ "public", "static", "int", "cusolverSpScsrlsvqrHost", "(", "cusolverSpHandle", "handle", ",", "int", "m", ",", "int", "nnz", ",", "cusparseMatDescr", "descrA", ",", "Pointer", "csrValA", ",", "Pointer", "csrRowPtrA", ",", "Pointer", "csrColIndA", ",", "Pointer", ...
<pre> -------- CPU linear solver by QR factorization solve A*x = b, A can be singular [ls] stands for linear solve [v] stands for vector [qr] stands for QR factorization </pre>
[ "<pre", ">", "--------", "CPU", "linear", "solver", "by", "QR", "factorization", "solve", "A", "*", "x", "=", "b", "A", "can", "be", "singular", "[", "ls", "]", "stands", "for", "linear", "solve", "[", "v", "]", "stands", "for", "vector", "[", "qr", ...
train
https://github.com/jcuda/jcusolver/blob/2600c7eca36a92a60ebcc78cae6e028e0c1d00b9/JCusolverJava/src/main/java/jcuda/jcusolver/JCusolverSp.java#L403-L418
liferay/com-liferay-commerce
commerce-price-list-service/src/main/java/com/liferay/commerce/price/list/service/persistence/impl/CommercePriceListPersistenceImpl.java
CommercePriceListPersistenceImpl.removeByG_S
@Override public void removeByG_S(long groupId, int status) { for (CommercePriceList commercePriceList : findByG_S(groupId, status, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(commercePriceList); } }
java
@Override public void removeByG_S(long groupId, int status) { for (CommercePriceList commercePriceList : findByG_S(groupId, status, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(commercePriceList); } }
[ "@", "Override", "public", "void", "removeByG_S", "(", "long", "groupId", ",", "int", "status", ")", "{", "for", "(", "CommercePriceList", "commercePriceList", ":", "findByG_S", "(", "groupId", ",", "status", ",", "QueryUtil", ".", "ALL_POS", ",", "QueryUtil",...
Removes all the commerce price lists where groupId = &#63; and status = &#63; from the database. @param groupId the group ID @param status the status
[ "Removes", "all", "the", "commerce", "price", "lists", "where", "groupId", "=", "&#63", ";", "and", "status", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-price-list-service/src/main/java/com/liferay/commerce/price/list/service/persistence/impl/CommercePriceListPersistenceImpl.java#L3741-L3747
virgo47/javasimon
core/src/main/java/org/javasimon/utils/bean/SimonBeanUtils.java
SimonBeanUtils.setProperty
public void setProperty(Object target, String property, Object value) { NestedResolver resolver = new NestedResolver(target, property); if (value instanceof String) { convertStringValue(resolver.getNestedTarget(), resolver.getProperty(), (String) value); } else { setObjectValue(resolver.getNestedTarget(), ...
java
public void setProperty(Object target, String property, Object value) { NestedResolver resolver = new NestedResolver(target, property); if (value instanceof String) { convertStringValue(resolver.getNestedTarget(), resolver.getProperty(), (String) value); } else { setObjectValue(resolver.getNestedTarget(), ...
[ "public", "void", "setProperty", "(", "Object", "target", ",", "String", "property", ",", "Object", "value", ")", "{", "NestedResolver", "resolver", "=", "new", "NestedResolver", "(", "target", ",", "property", ")", ";", "if", "(", "value", "instanceof", "St...
Set property in object target. If values has type other than String setter method or field with specified type will be used to set value. If value has String type value will be converted using available converters. If conversion to all of the types accepted by setters fails, field with corresponding name will be used ...
[ "Set", "property", "in", "object", "target", ".", "If", "values", "has", "type", "other", "than", "String", "setter", "method", "or", "field", "with", "specified", "type", "will", "be", "used", "to", "set", "value", ".", "If", "value", "has", "String", "...
train
https://github.com/virgo47/javasimon/blob/17dfaa93cded9ce8ef64a134b28ccbf4d0284d2f/core/src/main/java/org/javasimon/utils/bean/SimonBeanUtils.java#L69-L77
j256/ormlite-jdbc
src/main/java/com/j256/ormlite/jdbc/TypeValMapper.java
TypeValMapper.getSqlTypeForTypeVal
public static SqlType getSqlTypeForTypeVal(int typeVal) { // iterate through to save on the extra HashMap since only for errors for (Map.Entry<SqlType, int[]> entry : typeToValMap.entrySet()) { for (int val : entry.getValue()) { if (val == typeVal) { return entry.getKey(); } } } return SqlTyp...
java
public static SqlType getSqlTypeForTypeVal(int typeVal) { // iterate through to save on the extra HashMap since only for errors for (Map.Entry<SqlType, int[]> entry : typeToValMap.entrySet()) { for (int val : entry.getValue()) { if (val == typeVal) { return entry.getKey(); } } } return SqlTyp...
[ "public", "static", "SqlType", "getSqlTypeForTypeVal", "(", "int", "typeVal", ")", "{", "// iterate through to save on the extra HashMap since only for errors", "for", "(", "Map", ".", "Entry", "<", "SqlType", ",", "int", "[", "]", ">", "entry", ":", "typeToValMap", ...
Returns the SqlType value associated with the typeVal argument. Can be slow-er.
[ "Returns", "the", "SqlType", "value", "associated", "with", "the", "typeVal", "argument", ".", "Can", "be", "slow", "-", "er", "." ]
train
https://github.com/j256/ormlite-jdbc/blob/a5ce794ce34bce7000730ebe8e15f3fb3a8a5381/src/main/java/com/j256/ormlite/jdbc/TypeValMapper.java#L103-L113
alkacon/opencms-core
src/org/opencms/db/CmsSecurityManager.java
CmsSecurityManager.readGroup
public CmsGroup readGroup(CmsRequestContext context, CmsProject project) { CmsDbContext dbc = m_dbContextFactory.getDbContext(context); CmsGroup result = null; try { result = m_driverManager.readGroup(dbc, project); } finally { dbc.clear(); } retu...
java
public CmsGroup readGroup(CmsRequestContext context, CmsProject project) { CmsDbContext dbc = m_dbContextFactory.getDbContext(context); CmsGroup result = null; try { result = m_driverManager.readGroup(dbc, project); } finally { dbc.clear(); } retu...
[ "public", "CmsGroup", "readGroup", "(", "CmsRequestContext", "context", ",", "CmsProject", "project", ")", "{", "CmsDbContext", "dbc", "=", "m_dbContextFactory", ".", "getDbContext", "(", "context", ")", ";", "CmsGroup", "result", "=", "null", ";", "try", "{", ...
Reads the group of a project.<p> @param context the current request context @param project the project to read from @return the group of a resource
[ "Reads", "the", "group", "of", "a", "project", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/CmsSecurityManager.java#L4328-L4338
ops4j/org.ops4j.pax.web
pax-web-jsp/src/main/java/org/ops4j/pax/web/jsp/InstanceManager.java
InstanceManager.preDestroy
protected void preDestroy(Object instance, final Class<?> clazz) throws IllegalAccessException, InvocationTargetException { Class<?> superClass = clazz.getSuperclass(); if (superClass != Object.class) { preDestroy(instance, superClass); } // At the end the postconstruct annotated // method is invoked ...
java
protected void preDestroy(Object instance, final Class<?> clazz) throws IllegalAccessException, InvocationTargetException { Class<?> superClass = clazz.getSuperclass(); if (superClass != Object.class) { preDestroy(instance, superClass); } // At the end the postconstruct annotated // method is invoked ...
[ "protected", "void", "preDestroy", "(", "Object", "instance", ",", "final", "Class", "<", "?", ">", "clazz", ")", "throws", "IllegalAccessException", ",", "InvocationTargetException", "{", "Class", "<", "?", ">", "superClass", "=", "clazz", ".", "getSuperclass",...
Call preDestroy method on the specified instance recursively from deepest superclass to actual class. @param instance object to call preDestroy methods on @param clazz (super) class to examine for preDestroy annotation. @throws IllegalAccessException if preDestroy method is inaccessible. @throw...
[ "Call", "preDestroy", "method", "on", "the", "specified", "instance", "recursively", "from", "deepest", "superclass", "to", "actual", "class", "." ]
train
https://github.com/ops4j/org.ops4j.pax.web/blob/9ecf3676c1d316be0d43ea7fcfdc8f0defffc2a2/pax-web-jsp/src/main/java/org/ops4j/pax/web/jsp/InstanceManager.java#L108-L136
SonarSource/sonarqube
server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/def/Validations.java
Validations.checkDbIdentifier
static String checkDbIdentifier(@Nullable String identifier, String identifierDesc, int maxSize) { String res = checkNotNull(identifier, "%s can't be null", identifierDesc); checkArgument(!res.isEmpty(), "%s, can't be empty", identifierDesc); checkArgument( identifier.length() <= maxSize, "%s le...
java
static String checkDbIdentifier(@Nullable String identifier, String identifierDesc, int maxSize) { String res = checkNotNull(identifier, "%s can't be null", identifierDesc); checkArgument(!res.isEmpty(), "%s, can't be empty", identifierDesc); checkArgument( identifier.length() <= maxSize, "%s le...
[ "static", "String", "checkDbIdentifier", "(", "@", "Nullable", "String", "identifier", ",", "String", "identifierDesc", ",", "int", "maxSize", ")", "{", "String", "res", "=", "checkNotNull", "(", "identifier", ",", "\"%s can't be null\"", ",", "identifierDesc", ")...
Ensure {@code identifier} is a valid DB identifier. @throws NullPointerException if {@code identifier} is {@code null} @throws IllegalArgumentException if {@code identifier} is empty @throws IllegalArgumentException if {@code identifier} is longer than {@code maxSize} @throws IllegalArgumentException if {@code identif...
[ "Ensure", "{", "@code", "identifier", "}", "is", "a", "valid", "DB", "identifier", "." ]
train
https://github.com/SonarSource/sonarqube/blob/2fffa4c2f79ae3714844d7742796e82822b6a98a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/def/Validations.java#L107-L115
febit/wit
wit-core/src/main/java/org/febit/wit/InternalContext.java
InternalContext.createPeerContext
public InternalContext createPeerContext(Template template, VariantIndexer[] indexers, int varSize, Vars rootParams) { InternalContext newContext = new InternalContext(template, this.out, rootParams, indexers, varSize, null); newContext.localContext = this; return newContext; ...
java
public InternalContext createPeerContext(Template template, VariantIndexer[] indexers, int varSize, Vars rootParams) { InternalContext newContext = new InternalContext(template, this.out, rootParams, indexers, varSize, null); newContext.localContext = this; return newContext; ...
[ "public", "InternalContext", "createPeerContext", "(", "Template", "template", ",", "VariantIndexer", "[", "]", "indexers", ",", "int", "varSize", ",", "Vars", "rootParams", ")", "{", "InternalContext", "newContext", "=", "new", "InternalContext", "(", "template", ...
Create a peer-context used by include/import. <p> Only share locals and out @param template template @param indexers indexers @param varSize var size @param rootParams root params @return a new peer context
[ "Create", "a", "peer", "-", "context", "used", "by", "include", "/", "import", ".", "<p", ">", "Only", "share", "locals", "and", "out" ]
train
https://github.com/febit/wit/blob/89ee29efbc5633b79c30c3c7b953c9f4130575af/wit-core/src/main/java/org/febit/wit/InternalContext.java#L158-L163
3redronin/mu-server
src/main/java/io/muserver/rest/RestHandlerBuilder.java
RestHandlerBuilder.addCustomParamConverter
public <P> RestHandlerBuilder addCustomParamConverter(Class<P> paramClass, ParamConverter<P> converter) { return addCustomParamConverterProvider(new ParamConverterProvider() { @Override public <T> ParamConverter<T> getConverter(Class<T> rawType, Type genericType, Annotation[] annotations...
java
public <P> RestHandlerBuilder addCustomParamConverter(Class<P> paramClass, ParamConverter<P> converter) { return addCustomParamConverterProvider(new ParamConverterProvider() { @Override public <T> ParamConverter<T> getConverter(Class<T> rawType, Type genericType, Annotation[] annotations...
[ "public", "<", "P", ">", "RestHandlerBuilder", "addCustomParamConverter", "(", "Class", "<", "P", ">", "paramClass", ",", "ParamConverter", "<", "P", ">", "converter", ")", "{", "return", "addCustomParamConverterProvider", "(", "new", "ParamConverterProvider", "(", ...
<p>Registers a parameter converter class that convert strings to and from a custom class.</p> <p>This allows you to specify query string parameters, form values, header params and path params as custom classes.</p> <p>For more functionality, {@link #addCustomParamConverterProvider(ParamConverterProvider)} is also avail...
[ "<p", ">", "Registers", "a", "parameter", "converter", "class", "that", "convert", "strings", "to", "and", "from", "a", "custom", "class", ".", "<", "/", "p", ">", "<p", ">", "This", "allows", "you", "to", "specify", "query", "string", "parameters", "for...
train
https://github.com/3redronin/mu-server/blob/51598606a3082a121fbd785348ee9770b40308e6/src/main/java/io/muserver/rest/RestHandlerBuilder.java#L109-L119