repository_name
stringlengths
7
54
func_path_in_repository
stringlengths
18
196
func_name
stringlengths
7
107
whole_func_string
stringlengths
76
3.82k
language
stringclasses
1 value
func_code_string
stringlengths
76
3.82k
func_code_tokens
listlengths
22
717
func_documentation_string
stringlengths
61
1.98k
func_documentation_tokens
listlengths
1
508
split_name
stringclasses
1 value
func_code_url
stringlengths
111
310
UrielCh/ovh-java-sdk
ovh-java-sdk-router/src/main/java/net/minidev/ovh/api/ApiOvhRouter.java
ApiOvhRouter.serviceName_vpn_POST
public OvhVpn serviceName_vpn_POST(String serviceName, String clientIp, String clientPrivNet, String psk, String serverPrivNet) throws IOException { String qPath = "/router/{serviceName}/vpn"; StringBuilder sb = path(qPath, serviceName); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "clie...
java
public OvhVpn serviceName_vpn_POST(String serviceName, String clientIp, String clientPrivNet, String psk, String serverPrivNet) throws IOException { String qPath = "/router/{serviceName}/vpn"; StringBuilder sb = path(qPath, serviceName); HashMap<String, Object>o = new HashMap<String, Object>(); addBody(o, "clie...
[ "public", "OvhVpn", "serviceName_vpn_POST", "(", "String", "serviceName", ",", "String", "clientIp", ",", "String", "clientPrivNet", ",", "String", "psk", ",", "String", "serverPrivNet", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/router/{serviceN...
Add a VPN to your router REST: POST /router/{serviceName}/vpn @param serverPrivNet [required] Server's private network @param psk [required] Your PSK key @param clientIp [required] IP you will be connecting from / NULL (allow all) @param clientPrivNet [required] Client's private network @param serviceName [required] T...
[ "Add", "a", "VPN", "to", "your", "router" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-router/src/main/java/net/minidev/ovh/api/ApiOvhRouter.java#L151-L161
wildfly/wildfly-core
server/src/main/java/org/jboss/as/server/deployment/Services.java
Services.deploymentUnitName
public static ServiceName deploymentUnitName(String parent, String name, Phase phase) { return JBOSS_DEPLOYMENT_SUB_UNIT.append(parent, name, phase.name()); }
java
public static ServiceName deploymentUnitName(String parent, String name, Phase phase) { return JBOSS_DEPLOYMENT_SUB_UNIT.append(parent, name, phase.name()); }
[ "public", "static", "ServiceName", "deploymentUnitName", "(", "String", "parent", ",", "String", "name", ",", "Phase", "phase", ")", "{", "return", "JBOSS_DEPLOYMENT_SUB_UNIT", ".", "append", "(", "parent", ",", "name", ",", "phase", ".", "name", "(", ")", "...
Get the service name of a subdeployment. @param parent the parent deployment name @param name the subdeployment name @param phase the deployment phase @return the service name
[ "Get", "the", "service", "name", "of", "a", "subdeployment", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/server/src/main/java/org/jboss/as/server/deployment/Services.java#L95-L97
aws/aws-sdk-java
aws-java-sdk-ses/src/main/java/com/amazonaws/services/simpleemail/model/GetIdentityMailFromDomainAttributesResult.java
GetIdentityMailFromDomainAttributesResult.setMailFromDomainAttributes
public void setMailFromDomainAttributes(java.util.Map<String, IdentityMailFromDomainAttributes> mailFromDomainAttributes) { this.mailFromDomainAttributes = mailFromDomainAttributes == null ? null : new com.amazonaws.internal.SdkInternalMap<String, IdentityMailFromDomainAttributes>(mailFromDomain...
java
public void setMailFromDomainAttributes(java.util.Map<String, IdentityMailFromDomainAttributes> mailFromDomainAttributes) { this.mailFromDomainAttributes = mailFromDomainAttributes == null ? null : new com.amazonaws.internal.SdkInternalMap<String, IdentityMailFromDomainAttributes>(mailFromDomain...
[ "public", "void", "setMailFromDomainAttributes", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "IdentityMailFromDomainAttributes", ">", "mailFromDomainAttributes", ")", "{", "this", ".", "mailFromDomainAttributes", "=", "mailFromDomainAttributes", "==", "nul...
<p> A map of identities to custom MAIL FROM attributes. </p> @param mailFromDomainAttributes A map of identities to custom MAIL FROM attributes.
[ "<p", ">", "A", "map", "of", "identities", "to", "custom", "MAIL", "FROM", "attributes", ".", "<", "/", "p", ">" ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-ses/src/main/java/com/amazonaws/services/simpleemail/model/GetIdentityMailFromDomainAttributesResult.java#L61-L64
fabric8io/fabric8-forge
addons/utils/src/main/java/io/fabric8/forge/addon/utils/MavenHelpers.java
MavenHelpers.updatePomProperty
public static boolean updatePomProperty(Properties properties, String name, Object value, boolean updated) { if (value != null) { Object oldValue = properties.get(name); if (!Objects.equal(oldValue, value)) { getLOG().debug("Updating pom.xml property: " + name + " to " + ...
java
public static boolean updatePomProperty(Properties properties, String name, Object value, boolean updated) { if (value != null) { Object oldValue = properties.get(name); if (!Objects.equal(oldValue, value)) { getLOG().debug("Updating pom.xml property: " + name + " to " + ...
[ "public", "static", "boolean", "updatePomProperty", "(", "Properties", "properties", ",", "String", "name", ",", "Object", "value", ",", "boolean", "updated", ")", "{", "if", "(", "value", "!=", "null", ")", "{", "Object", "oldValue", "=", "properties", ".",...
Updates the given maven property value if value is not null and returns true if the pom has been changed @return true if the value changed and was non null or updated was true
[ "Updates", "the", "given", "maven", "property", "value", "if", "value", "is", "not", "null", "and", "returns", "true", "if", "the", "pom", "has", "been", "changed" ]
train
https://github.com/fabric8io/fabric8-forge/blob/a59871bae4d5c5d3ece10f1e8758e73663087f19/addons/utils/src/main/java/io/fabric8/forge/addon/utils/MavenHelpers.java#L261-L272
tvesalainen/bcc
src/main/java/org/vesalainen/bcc/MethodCompiler.java
MethodCompiler.addExceptionHandler
public void addExceptionHandler(Block block, String handler, List<? extends TypeMirror> thrownTypes) { Label label = getLabel(handler); if (!thrownTypes.isEmpty()) { for (TypeMirror thrownType : thrownTypes) { exceptionTableList.add(new Exceptio...
java
public void addExceptionHandler(Block block, String handler, List<? extends TypeMirror> thrownTypes) { Label label = getLabel(handler); if (!thrownTypes.isEmpty()) { for (TypeMirror thrownType : thrownTypes) { exceptionTableList.add(new Exceptio...
[ "public", "void", "addExceptionHandler", "(", "Block", "block", ",", "String", "handler", ",", "List", "<", "?", "extends", "TypeMirror", ">", "thrownTypes", ")", "{", "Label", "label", "=", "getLabel", "(", "handler", ")", ";", "if", "(", "!", "thrownType...
Adds an exception handler. If one of catchTypes is thrown inside block the execution continues at handler address. Thrown object is pushed in stack. @param block @param handler @param thrownTypes Throwable objects which are caught. If none is present then all throwables are caught. Note! This is not the same as finall...
[ "Adds", "an", "exception", "handler", ".", "If", "one", "of", "catchTypes", "is", "thrown", "inside", "block", "the", "execution", "continues", "at", "handler", "address", ".", "Thrown", "object", "is", "pushed", "in", "stack", "." ]
train
https://github.com/tvesalainen/bcc/blob/4e84e313018d487f1a8cca3952d71bc21e77d16b/src/main/java/org/vesalainen/bcc/MethodCompiler.java#L1669-L1683
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/InterfaceEndpointsInner.java
InterfaceEndpointsInner.beginCreateOrUpdate
public InterfaceEndpointInner beginCreateOrUpdate(String resourceGroupName, String interfaceEndpointName, InterfaceEndpointInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, interfaceEndpointName, parameters).toBlocking().single().body(); }
java
public InterfaceEndpointInner beginCreateOrUpdate(String resourceGroupName, String interfaceEndpointName, InterfaceEndpointInner parameters) { return beginCreateOrUpdateWithServiceResponseAsync(resourceGroupName, interfaceEndpointName, parameters).toBlocking().single().body(); }
[ "public", "InterfaceEndpointInner", "beginCreateOrUpdate", "(", "String", "resourceGroupName", ",", "String", "interfaceEndpointName", ",", "InterfaceEndpointInner", "parameters", ")", "{", "return", "beginCreateOrUpdateWithServiceResponseAsync", "(", "resourceGroupName", ",", ...
Creates or updates an interface endpoint in the specified resource group. @param resourceGroupName The name of the resource group. @param interfaceEndpointName The name of the interface endpoint. @param parameters Parameters supplied to the create or update interface endpoint operation @throws IllegalArgumentException...
[ "Creates", "or", "updates", "an", "interface", "endpoint", "in", "the", "specified", "resource", "group", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/InterfaceEndpointsInner.java#L508-L510
coursera/courier
typescript-lite/generator/src/main/java/org/coursera/courier/tslite/TSSyntax.java
TSSyntax.importString
private static String importString(String typeName, String moduleName) { return new StringBuilder() .append("import { ") .append(typeName) .append(" } from \"./") .append(moduleName) .append(".") .append(typeName) .append("\";") .toString(); }
java
private static String importString(String typeName, String moduleName) { return new StringBuilder() .append("import { ") .append(typeName) .append(" } from \"./") .append(moduleName) .append(".") .append(typeName) .append("\";") .toString(); }
[ "private", "static", "String", "importString", "(", "String", "typeName", ",", "String", "moduleName", ")", "{", "return", "new", "StringBuilder", "(", ")", ".", "append", "(", "\"import { \"", ")", ".", "append", "(", "typeName", ")", ".", "append", "(", ...
Creates a valid typescript import string given a type name (e.g. "Fortune") and the module name, which is usually the pegasus object's namespace. @param typeName Name of the type to import (e.g. "Fortune") @param moduleName That same type's namespace (e.g. "org.example") @return A fully formed import statement. e.g: ...
[ "Creates", "a", "valid", "typescript", "import", "string", "given", "a", "type", "name", "(", "e", ".", "g", ".", "Fortune", ")", "and", "the", "module", "name", "which", "is", "usually", "the", "pegasus", "object", "s", "namespace", "." ]
train
https://github.com/coursera/courier/blob/749674fa7ee33804ad11b6c8ecb560f455cb4c22/typescript-lite/generator/src/main/java/org/coursera/courier/tslite/TSSyntax.java#L182-L192
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGPath.java
SVGPath.lineTo
public SVGPath lineTo(double x, double y) { return append(PATH_LINE_TO).append(x).append(y); }
java
public SVGPath lineTo(double x, double y) { return append(PATH_LINE_TO).append(x).append(y); }
[ "public", "SVGPath", "lineTo", "(", "double", "x", ",", "double", "y", ")", "{", "return", "append", "(", "PATH_LINE_TO", ")", ".", "append", "(", "x", ")", ".", "append", "(", "y", ")", ";", "}" ]
Draw a line to the given coordinates. @param x new coordinates @param y new coordinates @return path object, for compact syntax.
[ "Draw", "a", "line", "to", "the", "given", "coordinates", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGPath.java#L229-L231
looly/hutool
hutool-core/src/main/java/cn/hutool/core/util/NumberUtil.java
NumberUtil.roundDown
public static BigDecimal roundDown(BigDecimal value, int scale) { return round(value, scale, RoundingMode.DOWN); }
java
public static BigDecimal roundDown(BigDecimal value, int scale) { return round(value, scale, RoundingMode.DOWN); }
[ "public", "static", "BigDecimal", "roundDown", "(", "BigDecimal", "value", ",", "int", "scale", ")", "{", "return", "round", "(", "value", ",", "scale", ",", "RoundingMode", ".", "DOWN", ")", ";", "}" ]
保留固定小数位数,舍去多余位数 @param value 需要科学计算的数据 @param scale 保留的小数位 @return 结果 @since 4.1.0
[ "保留固定小数位数,舍去多余位数" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/util/NumberUtil.java#L969-L971
EdwardRaff/JSAT
JSAT/src/jsat/distributions/kernels/PukKernel.java
PukKernel.setSigma
public void setSigma(double sigma) { if(sigma <= 0 || Double.isNaN(sigma) || Double.isInfinite(sigma)) throw new ArithmeticException("sigma must be positive, not " + sigma); this.sigma = sigma; }
java
public void setSigma(double sigma) { if(sigma <= 0 || Double.isNaN(sigma) || Double.isInfinite(sigma)) throw new ArithmeticException("sigma must be positive, not " + sigma); this.sigma = sigma; }
[ "public", "void", "setSigma", "(", "double", "sigma", ")", "{", "if", "(", "sigma", "<=", "0", "||", "Double", ".", "isNaN", "(", "sigma", ")", "||", "Double", ".", "isInfinite", "(", "sigma", ")", ")", "throw", "new", "ArithmeticException", "(", "\"si...
Sets the sigma parameter value, which controls the width of the kernel @param sigma the positive parameter value
[ "Sets", "the", "sigma", "parameter", "value", "which", "controls", "the", "width", "of", "the", "kernel" ]
train
https://github.com/EdwardRaff/JSAT/blob/0ff53b7b39684b2379cc1da522f5b3a954b15cfb/JSAT/src/jsat/distributions/kernels/PukKernel.java#L64-L69
JoeKerouac/utils
src/main/java/com/joe/utils/pattern/PatternUtils.java
PatternUtils.check
private static boolean check(String data, Pattern pattern) { if (StringUtils.isEmpty(data)) { return false; } Matcher matcher = pattern.matcher(data); return matcher.matches(); }
java
private static boolean check(String data, Pattern pattern) { if (StringUtils.isEmpty(data)) { return false; } Matcher matcher = pattern.matcher(data); return matcher.matches(); }
[ "private", "static", "boolean", "check", "(", "String", "data", ",", "Pattern", "pattern", ")", "{", "if", "(", "StringUtils", ".", "isEmpty", "(", "data", ")", ")", "{", "return", "false", ";", "}", "Matcher", "matcher", "=", "pattern", ".", "matcher", ...
检查数据是否符合正则 @param data 数据 @param pattern 正则 @return 返回true表示数据符合正则表达式(默认数据为空时返回false)
[ "检查数据是否符合正则" ]
train
https://github.com/JoeKerouac/utils/blob/45e1b2dc4d736956674fc4dcbe6cf84eaee69278/src/main/java/com/joe/utils/pattern/PatternUtils.java#L87-L93
twitter/cloudhopper-commons
ch-commons-util/src/main/java/com/cloudhopper/commons/util/time/DateTimePeriod.java
DateTimePeriod.toDays
public List<DateTimePeriod> toDays() { ArrayList<DateTimePeriod> list = new ArrayList<DateTimePeriod>(); // default "current" day to start datetime DateTime currentStart = getStart(); // calculate "next" day DateTime nextStart = currentStart.plusDays(1); // continue addi...
java
public List<DateTimePeriod> toDays() { ArrayList<DateTimePeriod> list = new ArrayList<DateTimePeriod>(); // default "current" day to start datetime DateTime currentStart = getStart(); // calculate "next" day DateTime nextStart = currentStart.plusDays(1); // continue addi...
[ "public", "List", "<", "DateTimePeriod", ">", "toDays", "(", ")", "{", "ArrayList", "<", "DateTimePeriod", ">", "list", "=", "new", "ArrayList", "<", "DateTimePeriod", ">", "(", ")", ";", "// default \"current\" day to start datetime", "DateTime", "currentStart", ...
Converts this period to a list of day periods. Partial days will not be included. For example, a period of "January 2009" will return a list of 31 days - one for each day in January. On the other hand, a period of "January 20, 2009 13:00-59" would return an empty list since partial days are not included. @return A l...
[ "Converts", "this", "period", "to", "a", "list", "of", "day", "periods", ".", "Partial", "days", "will", "not", "be", "included", ".", "For", "example", "a", "period", "of", "January", "2009", "will", "return", "a", "list", "of", "31", "days", "-", "on...
train
https://github.com/twitter/cloudhopper-commons/blob/b5bc397dbec4537e8149e7ec0733c1d7ed477499/ch-commons-util/src/main/java/com/cloudhopper/commons/util/time/DateTimePeriod.java#L299-L316
pressgang-ccms/PressGangCCMSContentSpecProcessor
src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecProcessor.java
ContentSpecProcessor.doesInfoTopicMatch
protected boolean doesInfoTopicMatch(final InfoTopic infoTopic, final CSInfoNodeWrapper infoNode, final CSNodeWrapper parentNode) { if (infoNode == null && infoTopic != null) return false; // If the unique id is not from the parser, in which case it will start with a number than use the unique id to co...
java
protected boolean doesInfoTopicMatch(final InfoTopic infoTopic, final CSInfoNodeWrapper infoNode, final CSNodeWrapper parentNode) { if (infoNode == null && infoTopic != null) return false; // If the unique id is not from the parser, in which case it will start with a number than use the unique id to co...
[ "protected", "boolean", "doesInfoTopicMatch", "(", "final", "InfoTopic", "infoTopic", ",", "final", "CSInfoNodeWrapper", "infoNode", ",", "final", "CSNodeWrapper", "parentNode", ")", "{", "if", "(", "infoNode", "==", "null", "&&", "infoTopic", "!=", "null", ")", ...
Checks to see if a ContentSpec topic matches a Content Spec Entity topic. @param infoTopic The ContentSpec topic object. @param infoNode The Content Spec Entity topic. @param parentNode @return True if the topic is determined to match otherwise false.
[ "Checks", "to", "see", "if", "a", "ContentSpec", "topic", "matches", "a", "Content", "Spec", "Entity", "topic", "." ]
train
https://github.com/pressgang-ccms/PressGangCCMSContentSpecProcessor/blob/85ffac047c4ede0f972364ab1f03f7d61a4de5f1/src/main/java/org/jboss/pressgang/ccms/contentspec/processor/ContentSpecProcessor.java#L2155-L2165
Whiley/WhileyCompiler
src/main/java/wyil/type/subtyping/SubtypeOperator.java
SubtypeOperator.isContractive
public boolean isContractive(QualifiedName nid, Type type) { HashSet<QualifiedName> visited = new HashSet<>(); return isContractive(nid, type, visited); }
java
public boolean isContractive(QualifiedName nid, Type type) { HashSet<QualifiedName> visited = new HashSet<>(); return isContractive(nid, type, visited); }
[ "public", "boolean", "isContractive", "(", "QualifiedName", "nid", ",", "Type", "type", ")", "{", "HashSet", "<", "QualifiedName", ">", "visited", "=", "new", "HashSet", "<>", "(", ")", ";", "return", "isContractive", "(", "nid", ",", "type", ",", "visited...
<p> Contractive types are types which cannot accept value because they have an <i>unterminated cycle</i>. An unterminated cycle has no leaf nodes terminating it. For example, <code>X<{X field}></code> is contractive, where as <code>X<{null|X field}></code> is not. </p> <p> This method returns true if the type is contr...
[ "<p", ">", "Contractive", "types", "are", "types", "which", "cannot", "accept", "value", "because", "they", "have", "an", "<i", ">", "unterminated", "cycle<", "/", "i", ">", ".", "An", "unterminated", "cycle", "has", "no", "leaf", "nodes", "terminating", "...
train
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/type/subtyping/SubtypeOperator.java#L165-L168
hankcs/HanLP
src/main/java/com/hankcs/hanlp/classification/statistics/ContinuousDistributions.java
ContinuousDistributions.Gser
protected static double Gser(double x, double A) { // Good for X<A+1. double T9 = 1 / A; double G = T9; double I = 1; while (T9 > G * 0.00001) { T9 = T9 * x / (A + I); G = G + T9; ++I; } G = G * Math.exp(A * Math.log...
java
protected static double Gser(double x, double A) { // Good for X<A+1. double T9 = 1 / A; double G = T9; double I = 1; while (T9 > G * 0.00001) { T9 = T9 * x / (A + I); G = G + T9; ++I; } G = G * Math.exp(A * Math.log...
[ "protected", "static", "double", "Gser", "(", "double", "x", ",", "double", "A", ")", "{", "// Good for X<A+1.", "double", "T9", "=", "1", "/", "A", ";", "double", "G", "=", "T9", ";", "double", "I", "=", "1", ";", "while", "(", "T9", ">", "G", "...
Internal function used by GammaCdf @param x @param A @return
[ "Internal", "function", "used", "by", "GammaCdf" ]
train
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/classification/statistics/ContinuousDistributions.java#L159-L174
khuxtable/seaglass
src/main/java/com/seaglasslookandfeel/painter/TitlePaneIconifyButtonPainter.java
TitlePaneIconifyButtonPainter.paintMinimizePressed
private void paintMinimizePressed(Graphics2D g, JComponent c, int width, int height) { iconifyPainter.paintPressed(g, c, width, height); }
java
private void paintMinimizePressed(Graphics2D g, JComponent c, int width, int height) { iconifyPainter.paintPressed(g, c, width, height); }
[ "private", "void", "paintMinimizePressed", "(", "Graphics2D", "g", ",", "JComponent", "c", ",", "int", "width", ",", "int", "height", ")", "{", "iconifyPainter", ".", "paintPressed", "(", "g", ",", "c", ",", "width", ",", "height", ")", ";", "}" ]
Paint the foreground minimize button pressed state. @param g the Graphics2D context to paint with. @param c the component. @param width the width of the component. @param height the height of the component.
[ "Paint", "the", "foreground", "minimize", "button", "pressed", "state", "." ]
train
https://github.com/khuxtable/seaglass/blob/f25ecba622923d7b29b64cb7d6068dd8005989b3/src/main/java/com/seaglasslookandfeel/painter/TitlePaneIconifyButtonPainter.java#L195-L197
tvesalainen/bcc
src/main/java/org/vesalainen/bcc/MethodCompiler.java
MethodCompiler.addNewArray
public void addNewArray(String name, TypeMirror type, int size) throws IOException { if (type.getKind() != TypeKind.ARRAY) { throw new IllegalArgumentException(type+" is not array"); } ArrayType at = (ArrayType) type; addVariable(name, at); newarra...
java
public void addNewArray(String name, TypeMirror type, int size) throws IOException { if (type.getKind() != TypeKind.ARRAY) { throw new IllegalArgumentException(type+" is not array"); } ArrayType at = (ArrayType) type; addVariable(name, at); newarra...
[ "public", "void", "addNewArray", "(", "String", "name", ",", "TypeMirror", "type", ",", "int", "size", ")", "throws", "IOException", "{", "if", "(", "type", ".", "getKind", "(", ")", "!=", "TypeKind", ".", "ARRAY", ")", "{", "throw", "new", "IllegalArgum...
Create new array <p>Stack: ..., count =&gt; ..., arrayref @param name @param type @param size @throws IOException
[ "Create", "new", "array", "<p", ">", "Stack", ":", "...", "count", "=", "&gt", ";", "...", "arrayref" ]
train
https://github.com/tvesalainen/bcc/blob/4e84e313018d487f1a8cca3952d71bc21e77d16b/src/main/java/org/vesalainen/bcc/MethodCompiler.java#L1430-L1444
dnsjava/dnsjava
org/xbill/DNS/TSIG.java
TSIG.applyStream
public void applyStream(Message m, TSIGRecord old, boolean first) { if (first) { apply(m, old); return; } Date timeSigned = new Date(); int fudge; hmac.reset(); fudge = Options.intValue("tsigfudge"); if (fudge < 0 || fudge > 0x7FFF) fudge = FUDGE; DNSOutput out = new DNSOutput(); out.writeU16(old.getSi...
java
public void applyStream(Message m, TSIGRecord old, boolean first) { if (first) { apply(m, old); return; } Date timeSigned = new Date(); int fudge; hmac.reset(); fudge = Options.intValue("tsigfudge"); if (fudge < 0 || fudge > 0x7FFF) fudge = FUDGE; DNSOutput out = new DNSOutput(); out.writeU16(old.getSi...
[ "public", "void", "applyStream", "(", "Message", "m", ",", "TSIGRecord", "old", ",", "boolean", "first", ")", "{", "if", "(", "first", ")", "{", "apply", "(", "m", ",", "old", ")", ";", "return", ";", "}", "Date", "timeSigned", "=", "new", "Date", ...
Generates a TSIG record for a message and adds it to the message @param m The message @param old If this message is a response, the TSIG from the request
[ "Generates", "a", "TSIG", "record", "for", "a", "message", "and", "adds", "it", "to", "the", "message" ]
train
https://github.com/dnsjava/dnsjava/blob/d97b6a0685d59143372bb392ab591dd8dd840b61/org/xbill/DNS/TSIG.java#L372-L412
TheHortonMachine/hortonmachine
hmachine/src/main/java/org/hortonmachine/hmachine/modules/networktools/epanet/OmsEpanetParametersOptions.java
OmsEpanetParametersOptions.createFromMap
public static OmsEpanetParametersOptions createFromMap( HashMap<OptionParameterCodes, String> options ) throws Exception { OmsEpanetParametersOptions epOptions = new OmsEpanetParametersOptions(); String units = options.get(OptionParameterCodes.UNITS); epOptions.units = units; String head...
java
public static OmsEpanetParametersOptions createFromMap( HashMap<OptionParameterCodes, String> options ) throws Exception { OmsEpanetParametersOptions epOptions = new OmsEpanetParametersOptions(); String units = options.get(OptionParameterCodes.UNITS); epOptions.units = units; String head...
[ "public", "static", "OmsEpanetParametersOptions", "createFromMap", "(", "HashMap", "<", "OptionParameterCodes", ",", "String", ">", "options", ")", "throws", "Exception", "{", "OmsEpanetParametersOptions", "epOptions", "=", "new", "OmsEpanetParametersOptions", "(", ")", ...
Create a {@link OmsEpanetParametersOptions} from a {@link HashMap} of values. @param options the {@link HashMap} of values. The keys have to be from {@link OptionParameterCodes}. @return the created {@link OmsEpanetParametersOptions}. @throws Exception
[ "Create", "a", "{", "@link", "OmsEpanetParametersOptions", "}", "from", "a", "{", "@link", "HashMap", "}", "of", "values", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/hmachine/src/main/java/org/hortonmachine/hmachine/modules/networktools/epanet/OmsEpanetParametersOptions.java#L246-L276
forge/core
javaee/impl/src/main/java/org/jboss/forge/addon/javaee/jpa/JPAFieldOperationsImpl.java
JPAFieldOperationsImpl.areTypesSame
private boolean areTypesSame(String from, String to) { String fromCompare = from.endsWith(".java") ? from.substring(0, from.length() - 5) : from; String toCompare = to.endsWith(".java") ? to.substring(0, to.length() - 5) : to; return fromCompare.equals(toCompare); }
java
private boolean areTypesSame(String from, String to) { String fromCompare = from.endsWith(".java") ? from.substring(0, from.length() - 5) : from; String toCompare = to.endsWith(".java") ? to.substring(0, to.length() - 5) : to; return fromCompare.equals(toCompare); }
[ "private", "boolean", "areTypesSame", "(", "String", "from", ",", "String", "to", ")", "{", "String", "fromCompare", "=", "from", ".", "endsWith", "(", "\".java\"", ")", "?", "from", ".", "substring", "(", "0", ",", "from", ".", "length", "(", ")", "-"...
Checks if the types are the same, removing the ".java" in the end of the string in case it exists @param from @param to @return
[ "Checks", "if", "the", "types", "are", "the", "same", "removing", "the", ".", "java", "in", "the", "end", "of", "the", "string", "in", "case", "it", "exists" ]
train
https://github.com/forge/core/blob/e140eb03bbe2b3409478ad70c86c3edbef6d9a0c/javaee/impl/src/main/java/org/jboss/forge/addon/javaee/jpa/JPAFieldOperationsImpl.java#L430-L435
powermock/powermock
powermock-reflect/src/main/java/org/powermock/reflect/internal/WhiteboxImpl.java
WhiteboxImpl.findFieldInHierarchy
private static Field findFieldInHierarchy(Object object, FieldMatcherStrategy strategy) { assertObjectInGetInternalStateIsNotNull(object); return findSingleFieldUsingStrategy(strategy, object, true, getType(object)); }
java
private static Field findFieldInHierarchy(Object object, FieldMatcherStrategy strategy) { assertObjectInGetInternalStateIsNotNull(object); return findSingleFieldUsingStrategy(strategy, object, true, getType(object)); }
[ "private", "static", "Field", "findFieldInHierarchy", "(", "Object", "object", ",", "FieldMatcherStrategy", "strategy", ")", "{", "assertObjectInGetInternalStateIsNotNull", "(", "object", ")", ";", "return", "findSingleFieldUsingStrategy", "(", "strategy", ",", "object", ...
Find field in hierarchy. @param object the object @param strategy the strategy @return the field
[ "Find", "field", "in", "hierarchy", "." ]
train
https://github.com/powermock/powermock/blob/e8cd68026c284c6a7efe66959809eeebd8d1f9ad/powermock-reflect/src/main/java/org/powermock/reflect/internal/WhiteboxImpl.java#L452-L455
jmxtrans/jmxtrans
jmxtrans-core/src/main/java/com/googlecode/jmxtrans/model/output/Settings.java
Settings.getStringSetting
public static String getStringSetting(Map<String, Object> settings, String key, String defaultVal) { final Object value = settings.get(key); return value != null ? value.toString() : defaultVal; }
java
public static String getStringSetting(Map<String, Object> settings, String key, String defaultVal) { final Object value = settings.get(key); return value != null ? value.toString() : defaultVal; }
[ "public", "static", "String", "getStringSetting", "(", "Map", "<", "String", ",", "Object", ">", "settings", ",", "String", "key", ",", "String", "defaultVal", ")", "{", "final", "Object", "value", "=", "settings", ".", "get", "(", "key", ")", ";", "retu...
Gets a String value for the setting, returning the default value if not specified. @param settings @param key the key to get the String setting for @param defaultVal the default value to return if the setting was not specified @return the String value for the setting
[ "Gets", "a", "String", "value", "for", "the", "setting", "returning", "the", "default", "value", "if", "not", "specified", "." ]
train
https://github.com/jmxtrans/jmxtrans/blob/496f342de3bcf2c2226626374b7a16edf8f4ba2a/jmxtrans-core/src/main/java/com/googlecode/jmxtrans/model/output/Settings.java#L117-L120
galan/commons
src/main/java/de/galan/commons/net/flux/Flux.java
Flux.addDefaultHeader
public static void addDefaultHeader(String key, String value) { if (isNotBlank(key) && isNotBlank(value)) { if (defaultHeader == null) { defaultHeader = new HashMap<String, String>(); } defaultHeader.put(key, value); } }
java
public static void addDefaultHeader(String key, String value) { if (isNotBlank(key) && isNotBlank(value)) { if (defaultHeader == null) { defaultHeader = new HashMap<String, String>(); } defaultHeader.put(key, value); } }
[ "public", "static", "void", "addDefaultHeader", "(", "String", "key", ",", "String", "value", ")", "{", "if", "(", "isNotBlank", "(", "key", ")", "&&", "isNotBlank", "(", "value", ")", ")", "{", "if", "(", "defaultHeader", "==", "null", ")", "{", "defa...
Added default headers will always be send, can still be overriden using the builder.
[ "Added", "default", "headers", "will", "always", "be", "send", "can", "still", "be", "overriden", "using", "the", "builder", "." ]
train
https://github.com/galan/commons/blob/45d2f36c69958d3f847e5fed66603ea629471822/src/main/java/de/galan/commons/net/flux/Flux.java#L103-L110
titorenko/quick-csv-streamer
src/main/java/uk/elementarysoftware/quickcsv/api/CSVParserBuilder.java
CSVParserBuilder.usingSeparatorWithQuote
public CSVParserBuilder<T, K> usingSeparatorWithQuote(char separator, char quote) { this.metadata = new CSVFileMetadata(separator, Optional.of(quote)); return this; }
java
public CSVParserBuilder<T, K> usingSeparatorWithQuote(char separator, char quote) { this.metadata = new CSVFileMetadata(separator, Optional.of(quote)); return this; }
[ "public", "CSVParserBuilder", "<", "T", ",", "K", ">", "usingSeparatorWithQuote", "(", "char", "separator", ",", "char", "quote", ")", "{", "this", ".", "metadata", "=", "new", "CSVFileMetadata", "(", "separator", ",", "Optional", ".", "of", "(", "quote", ...
Use specified characters as field separator and quote character. Quote character can be escaped by preceding it with another quote character. @param separator - field separator character @param quote - quote character @return this parser builder
[ "Use", "specified", "characters", "as", "field", "separator", "and", "quote", "character", ".", "Quote", "character", "can", "be", "escaped", "by", "preceding", "it", "with", "another", "quote", "character", "." ]
train
https://github.com/titorenko/quick-csv-streamer/blob/cc11f6e9db6df4f3aac57ca72c4176501667f41d/src/main/java/uk/elementarysoftware/quickcsv/api/CSVParserBuilder.java#L120-L123
eurekaclinical/protempa
protempa-framework/src/main/java/org/protempa/PropositionCopier.java
PropositionCopier.visit
@Override public void visit(PrimitiveParameter primitiveParameter) { assert this.kh != null : "kh wasn't set"; PrimitiveParameter param = new PrimitiveParameter(propId, this.uniqueIdProvider.getInstance()); param.setPosition(primitiveParameter.getPosition()); param.setGranularity(pri...
java
@Override public void visit(PrimitiveParameter primitiveParameter) { assert this.kh != null : "kh wasn't set"; PrimitiveParameter param = new PrimitiveParameter(propId, this.uniqueIdProvider.getInstance()); param.setPosition(primitiveParameter.getPosition()); param.setGranularity(pri...
[ "@", "Override", "public", "void", "visit", "(", "PrimitiveParameter", "primitiveParameter", ")", "{", "assert", "this", ".", "kh", "!=", "null", ":", "\"kh wasn't set\"", ";", "PrimitiveParameter", "param", "=", "new", "PrimitiveParameter", "(", "propId", ",", ...
Creates a derived primitive parameter with the id specified in the constructor and the same characteristics (e.g., data source type, interval, value, etc.). @param primitiveParameter a {@link PrimitiveParameter}. Cannot be <code>null</code>.
[ "Creates", "a", "derived", "primitive", "parameter", "with", "the", "id", "specified", "in", "the", "constructor", "and", "the", "same", "characteristics", "(", "e", ".", "g", ".", "data", "source", "type", "interval", "value", "etc", ".", ")", "." ]
train
https://github.com/eurekaclinical/protempa/blob/5a620d1a407c7a5426d1cf17d47b97717cf71634/protempa-framework/src/main/java/org/protempa/PropositionCopier.java#L156-L168
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/factory/util/PathNormalizer.java
PathNormalizer.getRelativePath
public static final String getRelativePath(String basedir, String filename) { String basedirPath = uppercaseDrive(basedir); String filenamePath = uppercaseDrive(filename); /* * Verify the arguments and make sure the filename is relative to the * base directory. */ if (basedirPath == null || basedirPat...
java
public static final String getRelativePath(String basedir, String filename) { String basedirPath = uppercaseDrive(basedir); String filenamePath = uppercaseDrive(filename); /* * Verify the arguments and make sure the filename is relative to the * base directory. */ if (basedirPath == null || basedirPat...
[ "public", "static", "final", "String", "getRelativePath", "(", "String", "basedir", ",", "String", "filename", ")", "{", "String", "basedirPath", "=", "uppercaseDrive", "(", "basedir", ")", ";", "String", "filenamePath", "=", "uppercaseDrive", "(", "filename", "...
Determines the relative path of a filename from a base directory. This method is useful in building relative links within pages of a web site. It provides similar functionality to Anakia's <code>$relativePath</code> context variable. The arguments to this method may contain either forward or backward slashes as file se...
[ "Determines", "the", "relative", "path", "of", "a", "filename", "from", "a", "base", "directory", ".", "This", "method", "is", "useful", "in", "building", "relative", "links", "within", "pages", "of", "a", "web", "site", ".", "It", "provides", "similar", "...
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/factory/util/PathNormalizer.java#L560-L590
hansenji/pocketknife
pocketknife/src/main/java/pocketknife/PocketKnife.java
PocketKnife.bindArguments
public static <T> void bindArguments(T target, Bundle bundle) { @SuppressWarnings("unchecked") BundleBinding<T> binding = (BundleBinding<T>) getBundleBinding(target.getClass().getClassLoader(), target.getClass()); if (binding != null) { binding.bindArguments(target, bundle); ...
java
public static <T> void bindArguments(T target, Bundle bundle) { @SuppressWarnings("unchecked") BundleBinding<T> binding = (BundleBinding<T>) getBundleBinding(target.getClass().getClassLoader(), target.getClass()); if (binding != null) { binding.bindArguments(target, bundle); ...
[ "public", "static", "<", "T", ">", "void", "bindArguments", "(", "T", "target", ",", "Bundle", "bundle", ")", "{", "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "BundleBinding", "<", "T", ">", "binding", "=", "(", "BundleBinding", "<", "T", ">", ")...
Bind annotated fields in the specified {@code target} from the {@link android.os.Bundle}. @param target Target object for bind arguments @param bundle Bundle containing arguments;
[ "Bind", "annotated", "fields", "in", "the", "specified", "{", "@code", "target", "}", "from", "the", "{", "@link", "android", ".", "os", ".", "Bundle", "}", "." ]
train
https://github.com/hansenji/pocketknife/blob/f225dd66bcafdd702f472a5c99be1fb48202e6ca/pocketknife/src/main/java/pocketknife/PocketKnife.java#L91-L97
podio/podio-java
src/main/java/com/podio/calendar/CalendarAPI.java
CalendarAPI.getApp
public List<Event> getApp(int appId, LocalDate dateFrom, LocalDate dateTo, ReferenceType... types) { return getCalendar("app/" + appId, dateFrom, dateTo, null, types); }
java
public List<Event> getApp(int appId, LocalDate dateFrom, LocalDate dateTo, ReferenceType... types) { return getCalendar("app/" + appId, dateFrom, dateTo, null, types); }
[ "public", "List", "<", "Event", ">", "getApp", "(", "int", "appId", ",", "LocalDate", "dateFrom", ",", "LocalDate", "dateTo", ",", "ReferenceType", "...", "types", ")", "{", "return", "getCalendar", "(", "\"app/\"", "+", "appId", ",", "dateFrom", ",", "dat...
Returns the items and tasks that are related to the given app. @param appId The id of the app @param dateFrom The from date @param dateTo The to date @param types The types of events that should be returned. Leave out to get all types of events. @return The events in the calendar
[ "Returns", "the", "items", "and", "tasks", "that", "are", "related", "to", "the", "given", "app", "." ]
train
https://github.com/podio/podio-java/blob/a520b23bac118c957ce02cdd8ff42a6c7d17b49a/src/main/java/com/podio/calendar/CalendarAPI.java#L63-L66
OpenNTF/JavascriptAggregator
jaggr-core/src/main/java/com/ibm/jaggr/core/util/CompilerUtil.java
CompilerUtil.findField
private static Field findField(String name, MutableObject<Object> valueHolder) { final String sourceMethod = "findField"; //$NON-NLS-1$ final boolean isTraceLogging = log.isLoggable(Level.FINER); if (isTraceLogging) { log.entering(sourceClass, sourceMethod, new Object[]{name, valueHolder}); } Field f...
java
private static Field findField(String name, MutableObject<Object> valueHolder) { final String sourceMethod = "findField"; //$NON-NLS-1$ final boolean isTraceLogging = log.isLoggable(Level.FINER); if (isTraceLogging) { log.entering(sourceClass, sourceMethod, new Object[]{name, valueHolder}); } Field f...
[ "private", "static", "Field", "findField", "(", "String", "name", ",", "MutableObject", "<", "Object", ">", "valueHolder", ")", "{", "final", "String", "sourceMethod", "=", "\"findField\"", ";", "//$NON-NLS-1$\r", "final", "boolean", "isTraceLogging", "=", "log", ...
Returns the field matching the specified name if the type of the value specified in <code>valueHolder</code> can be assigned to the field (with conversion if necessary), or null. @param name the field name @param valueHolder (input/output) On input, the value being assigned. On output, possibly converted value that wi...
[ "Returns", "the", "field", "matching", "the", "specified", "name", "if", "the", "type", "of", "the", "value", "specified", "in", "<code", ">", "valueHolder<", "/", "code", ">", "can", "be", "assigned", "to", "the", "field", "(", "with", "conversion", "if",...
train
https://github.com/OpenNTF/JavascriptAggregator/blob/9f47a96d778251638b1df9a368462176216d5b29/jaggr-core/src/main/java/com/ibm/jaggr/core/util/CompilerUtil.java#L328-L347
mongodb/stitch-android-sdk
core/services/mongodb-remote/src/main/java/com/mongodb/stitch/core/services/mongodb/remote/internal/CoreRemoteMongoCollectionImpl.java
CoreRemoteMongoCollectionImpl.updateMany
public RemoteUpdateResult updateMany( final Bson filter, final Bson update, final RemoteUpdateOptions updateOptions ) { return executeUpdate(filter, update, updateOptions, true); }
java
public RemoteUpdateResult updateMany( final Bson filter, final Bson update, final RemoteUpdateOptions updateOptions ) { return executeUpdate(filter, update, updateOptions, true); }
[ "public", "RemoteUpdateResult", "updateMany", "(", "final", "Bson", "filter", ",", "final", "Bson", "update", ",", "final", "RemoteUpdateOptions", "updateOptions", ")", "{", "return", "executeUpdate", "(", "filter", ",", "update", ",", "updateOptions", ",", "true"...
Update all documents in the collection according to the specified arguments. @param filter a document describing the query filter, which may not be null. @param update a document describing the update, which may not be null. The update to apply must include only update operators. @param updateOptions the...
[ "Update", "all", "documents", "in", "the", "collection", "according", "to", "the", "specified", "arguments", "." ]
train
https://github.com/mongodb/stitch-android-sdk/blob/159b9334b1f1a827285544be5ee20cdf7b04e4cc/core/services/mongodb-remote/src/main/java/com/mongodb/stitch/core/services/mongodb/remote/internal/CoreRemoteMongoCollectionImpl.java#L438-L444
ManfredTremmel/gwt-commons-lang3
src/main/java/org/apache/commons/lang3/math/NumberUtils.java
NumberUtils.toFloat
public static float toFloat(final String str, final float defaultValue) { if (str == null) { return defaultValue; } try { return Float.parseFloat(str); } catch (final NumberFormatException nfe) { return defaultValue; } }
java
public static float toFloat(final String str, final float defaultValue) { if (str == null) { return defaultValue; } try { return Float.parseFloat(str); } catch (final NumberFormatException nfe) { return defaultValue; } }
[ "public", "static", "float", "toFloat", "(", "final", "String", "str", ",", "final", "float", "defaultValue", ")", "{", "if", "(", "str", "==", "null", ")", "{", "return", "defaultValue", ";", "}", "try", "{", "return", "Float", ".", "parseFloat", "(", ...
<p>Convert a <code>String</code> to a <code>float</code>, returning a default value if the conversion fails.</p> <p>If the string <code>str</code> is <code>null</code>, the default value is returned.</p> <pre> NumberUtils.toFloat(null, 1.1f) = 1.0f NumberUtils.toFloat("", 1.1f) = 1.1f NumberUtils.toFloat("1.5",...
[ "<p", ">", "Convert", "a", "<code", ">", "String<", "/", "code", ">", "to", "a", "<code", ">", "float<", "/", "code", ">", "returning", "a", "default", "value", "if", "the", "conversion", "fails", ".", "<", "/", "p", ">" ]
train
https://github.com/ManfredTremmel/gwt-commons-lang3/blob/9e2dfbbda3668cfa5d935fe76479d1426c294504/src/main/java/org/apache/commons/lang3/math/NumberUtils.java#L221-L230
xvik/dropwizard-guicey
src/main/java/ru/vyarus/dropwizard/guice/module/yaml/ConfigTreeBuilder.java
ConfigTreeBuilder.build
public static ConfigurationTree build(final Bootstrap bootstrap, final Configuration configuration, final boolean introspect) { final List<Class> roots = resolveRootTypes(new ArrayList<>(), configuration.getClass()); if ...
java
public static ConfigurationTree build(final Bootstrap bootstrap, final Configuration configuration, final boolean introspect) { final List<Class> roots = resolveRootTypes(new ArrayList<>(), configuration.getClass()); if ...
[ "public", "static", "ConfigurationTree", "build", "(", "final", "Bootstrap", "bootstrap", ",", "final", "Configuration", "configuration", ",", "final", "boolean", "introspect", ")", "{", "final", "List", "<", "Class", ">", "roots", "=", "resolveRootTypes", "(", ...
Analyze configuration object to extract bindable parts. @param bootstrap bootstrap instance @param configuration configuration instance @param introspect true to introspect configuration object and extract values by path and unique sub configurations @return parsed configuration info
[ "Analyze", "configuration", "object", "to", "extract", "bindable", "parts", "." ]
train
https://github.com/xvik/dropwizard-guicey/blob/dd39ad77283555be21f606d5ebf0f11207a733d4/src/main/java/ru/vyarus/dropwizard/guice/module/yaml/ConfigTreeBuilder.java#L98-L115
febit/wit
wit-core/src/main/java/org/febit/wit_shaded/asm/ClassWriter.java
ClassWriter.put122
private void put122(final int b, final int s1, final int s2) { pool.putBS(b, s1).putShort(s2); }
java
private void put122(final int b, final int s1, final int s2) { pool.putBS(b, s1).putShort(s2); }
[ "private", "void", "put122", "(", "final", "int", "b", ",", "final", "int", "s1", ",", "final", "int", "s2", ")", "{", "pool", ".", "putBS", "(", "b", ",", "s1", ")", ".", "putShort", "(", "s2", ")", ";", "}" ]
Puts one byte and two shorts into the constant pool. @param b a byte. @param s1 a short. @param s2 another short.
[ "Puts", "one", "byte", "and", "two", "shorts", "into", "the", "constant", "pool", "." ]
train
https://github.com/febit/wit/blob/89ee29efbc5633b79c30c3c7b953c9f4130575af/wit-core/src/main/java/org/febit/wit_shaded/asm/ClassWriter.java#L741-L743
languagetool-org/languagetool
languagetool-core/src/main/java/org/languagetool/rules/spelling/symspell/implementation/EditDistance.java
EditDistance.compare
public int compare(String string2, int maxDistance) { switch (algorithm) { case Damerau: return DamerauLevenshteinDistance(string2, maxDistance); } throw new IllegalArgumentException("unknown DistanceAlgorithm"); }
java
public int compare(String string2, int maxDistance) { switch (algorithm) { case Damerau: return DamerauLevenshteinDistance(string2, maxDistance); } throw new IllegalArgumentException("unknown DistanceAlgorithm"); }
[ "public", "int", "compare", "(", "String", "string2", ",", "int", "maxDistance", ")", "{", "switch", "(", "algorithm", ")", "{", "case", "Damerau", ":", "return", "DamerauLevenshteinDistance", "(", "string2", ",", "maxDistance", ")", ";", "}", "throw", "new"...
/ <returns>The edit distance (or -1 if maxDistance exceeded).</returns>
[ "/", "<returns", ">", "The", "edit", "distance", "(", "or", "-", "1", "if", "maxDistance", "exceeded", ")", ".", "<", "/", "returns", ">" ]
train
https://github.com/languagetool-org/languagetool/blob/b7a3d63883d242fb2525877c6382681c57a0a142/languagetool-core/src/main/java/org/languagetool/rules/spelling/symspell/implementation/EditDistance.java#L53-L58
OpenLiberty/open-liberty
dev/com.ibm.ws.ssl/src/com/ibm/ws/ssl/provider/AbstractJSSEProvider.java
AbstractJSSEProvider.getKeyManagerFactoryInstance
public KeyManagerFactory getKeyManagerFactoryInstance(String keyMgr, String ctxtProvider) throws NoSuchAlgorithmException, NoSuchProviderException { String mgr = keyMgr; String provider = ctxtProvider; if (mgr.indexOf('|') != -1) { String[] keyManagerArray = mgr.split("\\|"); ...
java
public KeyManagerFactory getKeyManagerFactoryInstance(String keyMgr, String ctxtProvider) throws NoSuchAlgorithmException, NoSuchProviderException { String mgr = keyMgr; String provider = ctxtProvider; if (mgr.indexOf('|') != -1) { String[] keyManagerArray = mgr.split("\\|"); ...
[ "public", "KeyManagerFactory", "getKeyManagerFactoryInstance", "(", "String", "keyMgr", ",", "String", "ctxtProvider", ")", "throws", "NoSuchAlgorithmException", ",", "NoSuchProviderException", "{", "String", "mgr", "=", "keyMgr", ";", "String", "provider", "=", "ctxtPr...
Get the key manager factory instance using the provided information. @see com.ibm.websphere.ssl.JSSEProvider#getKeyManagerFactoryInstance() @param keyMgr @param ctxtProvider @return KeyManagerFactory @throws NoSuchAlgorithmException @throws NoSuchProviderException
[ "Get", "the", "key", "manager", "factory", "instance", "using", "the", "provided", "information", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ssl/src/com/ibm/ws/ssl/provider/AbstractJSSEProvider.java#L717-L732
Syncleus/aparapi
src/main/java/com/aparapi/internal/kernel/KernelRunner.java
KernelRunner.getClassModelFromArg
private ClassModel getClassModelFromArg(KernelArg arg, final Class<?> arrayClass) { ClassModel c = null; if (arg.getObjArrayElementModel() == null) { final String tmp = arrayClass.getName().substring(2).replace('/', '.'); final String arrayClassInDotForm = tmp.substring(0, tmp.length() - 1)...
java
private ClassModel getClassModelFromArg(KernelArg arg, final Class<?> arrayClass) { ClassModel c = null; if (arg.getObjArrayElementModel() == null) { final String tmp = arrayClass.getName().substring(2).replace('/', '.'); final String arrayClassInDotForm = tmp.substring(0, tmp.length() - 1)...
[ "private", "ClassModel", "getClassModelFromArg", "(", "KernelArg", "arg", ",", "final", "Class", "<", "?", ">", "arrayClass", ")", "{", "ClassModel", "c", "=", "null", ";", "if", "(", "arg", ".", "getObjArrayElementModel", "(", ")", "==", "null", ")", "{",...
Helper method to retrieve the class model from a kernel argument. @param arg the kernel argument @param arrayClass the array Java class for the argument @return the Aparapi ClassModel instance.
[ "Helper", "method", "to", "retrieve", "the", "class", "model", "from", "a", "kernel", "argument", "." ]
train
https://github.com/Syncleus/aparapi/blob/6d5892c8e69854b3968c541023de37cf4762bd24/src/main/java/com/aparapi/internal/kernel/KernelRunner.java#L763-L782
nguillaumin/slick2d-maven
slick2d-hiero/src/main/java/org/newdawn/slick/tools/hiero/HieroConfig.java
HieroConfig.listFiles
public static File[] listFiles(final String ext) { init(); return config.listFiles(new FilenameFilter() { public boolean accept(File dir, String name) { return name.endsWith(ext); } }); }
java
public static File[] listFiles(final String ext) { init(); return config.listFiles(new FilenameFilter() { public boolean accept(File dir, String name) { return name.endsWith(ext); } }); }
[ "public", "static", "File", "[", "]", "listFiles", "(", "final", "String", "ext", ")", "{", "init", "(", ")", ";", "return", "config", ".", "listFiles", "(", "new", "FilenameFilter", "(", ")", "{", "public", "boolean", "accept", "(", "File", "dir", ","...
List the files with a given extension in the configuration directory @param ext The extension to search for @return The list of files from the configuration directory
[ "List", "the", "files", "with", "a", "given", "extension", "in", "the", "configuration", "directory" ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-hiero/src/main/java/org/newdawn/slick/tools/hiero/HieroConfig.java#L50-L59
OrienteerBAP/wicket-orientdb
wicket-orientdb/src/main/java/ru/ydn/wicket/wicketorientdb/utils/OSchemaHelper.java
OSchemaHelper.oClass
private OSchemaHelper oClass(String className, boolean abstractClass, String... superClasses) { lastClass = schema.getClass(className); if(lastClass==null) { OClass[] superClassesArray = new OClass[superClasses.length]; for (int i = 0; i < superClasses.length; i++) { String superClassName = superClasse...
java
private OSchemaHelper oClass(String className, boolean abstractClass, String... superClasses) { lastClass = schema.getClass(className); if(lastClass==null) { OClass[] superClassesArray = new OClass[superClasses.length]; for (int i = 0; i < superClasses.length; i++) { String superClassName = superClasse...
[ "private", "OSchemaHelper", "oClass", "(", "String", "className", ",", "boolean", "abstractClass", ",", "String", "...", "superClasses", ")", "{", "lastClass", "=", "schema", ".", "getClass", "(", "className", ")", ";", "if", "(", "lastClass", "==", "null", ...
Create if required {@link OClass} @param className name of a class to create @param abstractClass is this class abstract @param superClasses list of superclasses @return this helper
[ "Create", "if", "required", "{" ]
train
https://github.com/OrienteerBAP/wicket-orientdb/blob/eb1d94f00a6bff9e266c5c032baa6043afc1db92/wicket-orientdb/src/main/java/ru/ydn/wicket/wicketorientdb/utils/OSchemaHelper.java#L88-L107
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/mps/mpssession.java
mpssession.get_nitro_bulk_response
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { mpssession_responses result = (mpssession_responses) service.get_payload_formatter().string_to_resource(mpssession_responses.class, response); if(result.errorcode != 0) { if (result.errorcode == S...
java
protected base_resource[] get_nitro_bulk_response(nitro_service service, String response) throws Exception { mpssession_responses result = (mpssession_responses) service.get_payload_formatter().string_to_resource(mpssession_responses.class, response); if(result.errorcode != 0) { if (result.errorcode == S...
[ "protected", "base_resource", "[", "]", "get_nitro_bulk_response", "(", "nitro_service", "service", ",", "String", "response", ")", "throws", "Exception", "{", "mpssession_responses", "result", "=", "(", "mpssession_responses", ")", "service", ".", "get_payload_formatte...
<pre> Converts API response of bulk operation into object and returns the object array in case of get request. </pre>
[ "<pre", ">", "Converts", "API", "response", "of", "bulk", "operation", "into", "object", "and", "returns", "the", "object", "array", "in", "case", "of", "get", "request", ".", "<", "/", "pre", ">" ]
train
https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/config/mps/mpssession.java#L358-L375
imsweb/naaccr-xml
src/main/java/com/imsweb/naaccrxml/NaaccrXmlDictionaryUtils.java
NaaccrXmlDictionaryUtils.getDefaultUserDictionaryByVersion
@SuppressWarnings("ConstantConditions") public static NaaccrDictionary getDefaultUserDictionaryByVersion(String naaccrVersion) { if (naaccrVersion == null) throw new RuntimeException("Version is required for getting the default user dictionary."); if (!NaaccrFormat.isVersionSupported(naa...
java
@SuppressWarnings("ConstantConditions") public static NaaccrDictionary getDefaultUserDictionaryByVersion(String naaccrVersion) { if (naaccrVersion == null) throw new RuntimeException("Version is required for getting the default user dictionary."); if (!NaaccrFormat.isVersionSupported(naa...
[ "@", "SuppressWarnings", "(", "\"ConstantConditions\"", ")", "public", "static", "NaaccrDictionary", "getDefaultUserDictionaryByVersion", "(", "String", "naaccrVersion", ")", "{", "if", "(", "naaccrVersion", "==", "null", ")", "throw", "new", "RuntimeException", "(", ...
Returns the default user dictionary for the requested NAACCR version. @param naaccrVersion NAACCR version, required (see constants in NaaccrFormat) @return the corresponding default user dictionary, throws a runtime exception if not found
[ "Returns", "the", "default", "user", "dictionary", "for", "the", "requested", "NAACCR", "version", "." ]
train
https://github.com/imsweb/naaccr-xml/blob/a3a501faa2a0c3411dd5248b2c1379f279131696/src/main/java/com/imsweb/naaccrxml/NaaccrXmlDictionaryUtils.java#L215-L233
aws/aws-sdk-java
aws-java-sdk-medialive/src/main/java/com/amazonaws/services/medialive/model/InputSecurityGroup.java
InputSecurityGroup.withTags
public InputSecurityGroup withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
java
public InputSecurityGroup withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
[ "public", "InputSecurityGroup", "withTags", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "setTags", "(", "tags", ")", ";", "return", "this", ";", "}" ]
A collection of key-value pairs. @param tags A collection of key-value pairs. @return Returns a reference to this object so that method calls can be chained together.
[ "A", "collection", "of", "key", "-", "value", "pairs", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-medialive/src/main/java/com/amazonaws/services/medialive/model/InputSecurityGroup.java#L252-L255
Azure/azure-sdk-for-java
applicationinsights/resource-manager/v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/FavoritesInner.java
FavoritesInner.listAsync
public Observable<List<ApplicationInsightsComponentFavoriteInner>> listAsync(String resourceGroupName, String resourceName, FavoriteType favoriteType, FavoriteSourceType sourceType, Boolean canFetchContent, List<String> tags) { return listWithServiceResponseAsync(resourceGroupName, resourceName, favoriteType, s...
java
public Observable<List<ApplicationInsightsComponentFavoriteInner>> listAsync(String resourceGroupName, String resourceName, FavoriteType favoriteType, FavoriteSourceType sourceType, Boolean canFetchContent, List<String> tags) { return listWithServiceResponseAsync(resourceGroupName, resourceName, favoriteType, s...
[ "public", "Observable", "<", "List", "<", "ApplicationInsightsComponentFavoriteInner", ">", ">", "listAsync", "(", "String", "resourceGroupName", ",", "String", "resourceName", ",", "FavoriteType", "favoriteType", ",", "FavoriteSourceType", "sourceType", ",", "Boolean", ...
Gets a list of favorites defined within an Application Insights component. @param resourceGroupName The name of the resource group. @param resourceName The name of the Application Insights component resource. @param favoriteType The type of favorite. Value can be either shared or user. Possible values include: 'shared...
[ "Gets", "a", "list", "of", "favorites", "defined", "within", "an", "Application", "Insights", "component", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/applicationinsights/resource-manager/v2015_05_01/src/main/java/com/microsoft/azure/management/applicationinsights/v2015_05_01/implementation/FavoritesInner.java#L216-L223
database-rider/database-rider
rider-core/src/main/java/com/github/database/rider/core/api/dataset/ScriptableTable.java
ScriptableTable.getScriptResult
private Object getScriptResult(String script, ScriptEngine engine) throws ScriptException { String scriptToExecute = script.substring(script.indexOf(":") + 1); return engine.eval(scriptToExecute); }
java
private Object getScriptResult(String script, ScriptEngine engine) throws ScriptException { String scriptToExecute = script.substring(script.indexOf(":") + 1); return engine.eval(scriptToExecute); }
[ "private", "Object", "getScriptResult", "(", "String", "script", ",", "ScriptEngine", "engine", ")", "throws", "ScriptException", "{", "String", "scriptToExecute", "=", "script", ".", "substring", "(", "script", ".", "indexOf", "(", "\":\"", ")", "+", "1", ")"...
Evaluates the script expression @return script expression result
[ "Evaluates", "the", "script", "expression" ]
train
https://github.com/database-rider/database-rider/blob/7545cc31118df9cfef3f89e27223b433a24fb5dd/rider-core/src/main/java/com/github/database/rider/core/api/dataset/ScriptableTable.java#L94-L97
FlyingHe/UtilsMaven
src/main/java/com/github/flyinghe/tools/ImgCompressUtils.java
ImgCompressUtils.imgCompressByScale
public static void imgCompressByScale(String srcFile, String desFile, double base, int wh, Float quality) { ImgCompressUtils.imgCompressByScale(srcFile, desFile, base, wh, quality, false); }
java
public static void imgCompressByScale(String srcFile, String desFile, double base, int wh, Float quality) { ImgCompressUtils.imgCompressByScale(srcFile, desFile, base, wh, quality, false); }
[ "public", "static", "void", "imgCompressByScale", "(", "String", "srcFile", ",", "String", "desFile", ",", "double", "base", ",", "int", "wh", ",", "Float", "quality", ")", "{", "ImgCompressUtils", ".", "imgCompressByScale", "(", "srcFile", ",", "desFile", ","...
根据宽或者高和指定压缩质量进行等比例压缩,注意如果指定的宽或者高大于源图片的高或者宽, 那么压缩图片将直接使用源图片的宽高 @param srcFile 源图片地址 @param desFile 目标图片地址,包括图片名称 @param base 指定压缩后图片的宽或者高 @param wh 此参数用于指定base参数是宽还是高,该参数应由{@link ImgCompressUtils}里的 静态常量指定 @param quality 指定压缩质量,范围[0.0,1.0],如果指定为null则按照默认值
[ "根据宽或者高和指定压缩质量进行等比例压缩", "注意如果指定的宽或者高大于源图片的高或者宽", "那么压缩图片将直接使用源图片的宽高" ]
train
https://github.com/FlyingHe/UtilsMaven/blob/d9605b7bfe0c28a05289252e12d163e114080b4a/src/main/java/com/github/flyinghe/tools/ImgCompressUtils.java#L230-L232
mozilla/rhino
src/org/mozilla/javascript/UintMap.java
UintMap.put
public void put(int key, Object value) { if (key < 0) Kit.codeBug(); int index = ensureIndex(key, false); if (values == null) { values = new Object[1 << power]; } values[index] = value; }
java
public void put(int key, Object value) { if (key < 0) Kit.codeBug(); int index = ensureIndex(key, false); if (values == null) { values = new Object[1 << power]; } values[index] = value; }
[ "public", "void", "put", "(", "int", "key", ",", "Object", "value", ")", "{", "if", "(", "key", "<", "0", ")", "Kit", ".", "codeBug", "(", ")", ";", "int", "index", "=", "ensureIndex", "(", "key", ",", "false", ")", ";", "if", "(", "values", "=...
Set object value of the key. If key does not exist, also set its int value to 0.
[ "Set", "object", "value", "of", "the", "key", ".", "If", "key", "does", "not", "exist", "also", "set", "its", "int", "value", "to", "0", "." ]
train
https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/javascript/UintMap.java#L113-L120
joniles/mpxj
src/main/java/net/sf/mpxj/common/FieldTypeHelper.java
FieldTypeHelper.valueIsNotDefault
public static final boolean valueIsNotDefault(FieldType type, Object value) { boolean result = true; if (value == null) { result = false; } else { DataType dataType = type.getDataType(); switch (dataType) { case BOOLEAN: ...
java
public static final boolean valueIsNotDefault(FieldType type, Object value) { boolean result = true; if (value == null) { result = false; } else { DataType dataType = type.getDataType(); switch (dataType) { case BOOLEAN: ...
[ "public", "static", "final", "boolean", "valueIsNotDefault", "(", "FieldType", "type", ",", "Object", "value", ")", "{", "boolean", "result", "=", "true", ";", "if", "(", "value", "==", "null", ")", "{", "result", "=", "false", ";", "}", "else", "{", "...
Determines if this value is the default value for the given field type. @param type field type @param value value @return true if the value is not default
[ "Determines", "if", "this", "value", "is", "the", "default", "value", "for", "the", "given", "field", "type", "." ]
train
https://github.com/joniles/mpxj/blob/143ea0e195da59cd108f13b3b06328e9542337e8/src/main/java/net/sf/mpxj/common/FieldTypeHelper.java#L313-L353
carewebframework/carewebframework-core
org.carewebframework.ui-parent/org.carewebframework.ui.core/src/main/java/org/carewebframework/ui/action/ActionUtil.java
ActionUtil.disableAction
public static void disableAction(BaseComponent component, String eventName, boolean disable) { ActionListener listener = getListener(component, eventName); if (listener != null) { listener.setDisabled(disable); } }
java
public static void disableAction(BaseComponent component, String eventName, boolean disable) { ActionListener listener = getListener(component, eventName); if (listener != null) { listener.setDisabled(disable); } }
[ "public", "static", "void", "disableAction", "(", "BaseComponent", "component", ",", "String", "eventName", ",", "boolean", "disable", ")", "{", "ActionListener", "listener", "=", "getListener", "(", "component", ",", "eventName", ")", ";", "if", "(", "listener"...
Enables or disables the deferred event listener associated with the component. @param component The component. @param eventName The name of the event. @param disable Disable state for listener.
[ "Enables", "or", "disables", "the", "deferred", "event", "listener", "associated", "with", "the", "component", "." ]
train
https://github.com/carewebframework/carewebframework-core/blob/fa3252d4f7541dbe151b92c3d4f6f91433cd1673/org.carewebframework.ui-parent/org.carewebframework.ui.core/src/main/java/org/carewebframework/ui/action/ActionUtil.java#L173-L179
citrusframework/citrus
modules/citrus-core/src/main/java/com/consol/citrus/channel/ChannelConsumer.java
ChannelConsumer.resolveChannelName
protected MessageChannel resolveChannelName(String channelName, TestContext context) { if (endpointConfiguration.getChannelResolver() == null) { if (endpointConfiguration.getBeanFactory() != null) { endpointConfiguration.setChannelResolver(new BeanFactoryChannelResolver(endpointConfi...
java
protected MessageChannel resolveChannelName(String channelName, TestContext context) { if (endpointConfiguration.getChannelResolver() == null) { if (endpointConfiguration.getBeanFactory() != null) { endpointConfiguration.setChannelResolver(new BeanFactoryChannelResolver(endpointConfi...
[ "protected", "MessageChannel", "resolveChannelName", "(", "String", "channelName", ",", "TestContext", "context", ")", "{", "if", "(", "endpointConfiguration", ".", "getChannelResolver", "(", ")", "==", "null", ")", "{", "if", "(", "endpointConfiguration", ".", "g...
Resolve the channel by name. @param channelName the name to resolve @param context @return the MessageChannel object
[ "Resolve", "the", "channel", "by", "name", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-core/src/main/java/com/consol/citrus/channel/ChannelConsumer.java#L147-L157
couchbase/couchbase-lite-java
src/main/java/com/couchbase/lite/Parameters.java
Parameters.setInt
@NonNull public Parameters setInt(@NonNull String name, int value) { return setValue(name, value); }
java
@NonNull public Parameters setInt(@NonNull String name, int value) { return setValue(name, value); }
[ "@", "NonNull", "public", "Parameters", "setInt", "(", "@", "NonNull", "String", "name", ",", "int", "value", ")", "{", "return", "setValue", "(", "name", ",", "value", ")", ";", "}" ]
Set an int value to the query parameter referenced by the given name. A query parameter is defined by using the Expression's parameter(String name) function. @param name The parameter name. @param value The int value. @return The self object.
[ "Set", "an", "int", "value", "to", "the", "query", "parameter", "referenced", "by", "the", "given", "name", ".", "A", "query", "parameter", "is", "defined", "by", "using", "the", "Expression", "s", "parameter", "(", "String", "name", ")", "function", "." ]
train
https://github.com/couchbase/couchbase-lite-java/blob/cb72c44186456e6191a9ad0a7feb310011d0b081/src/main/java/com/couchbase/lite/Parameters.java#L105-L108
haraldk/TwelveMonkeys
servlet/src/main/java/com/twelvemonkeys/servlet/ServletUtil.java
ServletUtil.getParameter
public static String getParameter(final ServletRequest pReq, final String pName, final String pDefault) { String str = pReq.getParameter(pName); return str != null ? str : pDefault; }
java
public static String getParameter(final ServletRequest pReq, final String pName, final String pDefault) { String str = pReq.getParameter(pName); return str != null ? str : pDefault; }
[ "public", "static", "String", "getParameter", "(", "final", "ServletRequest", "pReq", ",", "final", "String", "pName", ",", "final", "String", "pDefault", ")", "{", "String", "str", "=", "pReq", ".", "getParameter", "(", "pName", ")", ";", "return", "str", ...
Gets the value of the given parameter from the request, or if the parameter is not set, the default value. @param pReq the servlet request @param pName the parameter name @param pDefault the default value @return the value of the parameter, or the default value, if the parameter is not set.
[ "Gets", "the", "value", "of", "the", "given", "parameter", "from", "the", "request", "or", "if", "the", "parameter", "is", "not", "set", "the", "default", "value", "." ]
train
https://github.com/haraldk/TwelveMonkeys/blob/7fad4d5cd8cb3a6728c7fd3f28a7b84d8ce0101d/servlet/src/main/java/com/twelvemonkeys/servlet/ServletUtil.java#L128-L132
mygreen/xlsmapper
src/main/java/com/gh/mygreen/xlsmapper/validation/fieldvalidation/FieldFormatterRegistry.java
FieldFormatterRegistry.addStrippedPropertyPaths
public void addStrippedPropertyPaths(List<String> strippedPaths, String nestedPath, String propertyPath) { final int startIndex = propertyPath.indexOf('['); if (startIndex != -1) { final int endIndex = propertyPath.indexOf(']'); if (endIndex != -1) { ...
java
public void addStrippedPropertyPaths(List<String> strippedPaths, String nestedPath, String propertyPath) { final int startIndex = propertyPath.indexOf('['); if (startIndex != -1) { final int endIndex = propertyPath.indexOf(']'); if (endIndex != -1) { ...
[ "public", "void", "addStrippedPropertyPaths", "(", "List", "<", "String", ">", "strippedPaths", ",", "String", "nestedPath", ",", "String", "propertyPath", ")", "{", "final", "int", "startIndex", "=", "propertyPath", ".", "indexOf", "(", "'", "'", ")", ";", ...
パスからリストのインデックス([1])やマップのキー([key])を除去したものを構成する。 <p>SpringFrameworkの「PropertyEditorRegistrySupport#addStrippedPropertyPaths(...)」の処理</p> @param strippedPaths 除去したパス @param nestedPath 現在のネストしたパス @param propertyPath 処理対象のパス
[ "パスからリストのインデックス", "(", "[", "1", "]", ")", "やマップのキー", "(", "[", "key", "]", ")", "を除去したものを構成する。", "<p", ">", "SpringFrameworkの「PropertyEditorRegistrySupport#addStrippedPropertyPaths", "(", "...", ")", "」の処理<", "/", "p", ">" ]
train
https://github.com/mygreen/xlsmapper/blob/a0c6b25c622e5f3a50b199ef685d2ee46ad5483c/src/main/java/com/gh/mygreen/xlsmapper/validation/fieldvalidation/FieldFormatterRegistry.java#L137-L157
camunda/camunda-bpm-platform
engine/src/main/java/org/camunda/bpm/engine/impl/bpmn/parser/BpmnParse.java
BpmnParse.parseActivities
public void parseActivities(List<Element> activityElements, Element parentElement, ScopeImpl scopeElement) { for (Element activityElement : activityElements) { parseActivity(activityElement, parentElement, scopeElement); } }
java
public void parseActivities(List<Element> activityElements, Element parentElement, ScopeImpl scopeElement) { for (Element activityElement : activityElements) { parseActivity(activityElement, parentElement, scopeElement); } }
[ "public", "void", "parseActivities", "(", "List", "<", "Element", ">", "activityElements", ",", "Element", "parentElement", ",", "ScopeImpl", "scopeElement", ")", "{", "for", "(", "Element", "activityElement", ":", "activityElements", ")", "{", "parseActivity", "(...
Parses the activities of a certain level in the process (process, subprocess or another scope). @param activityElements The list of activities to be parsed. This list may be filtered before. @param parentElement The 'parent' element that contains the activities (process, subprocess). @param scopeElement The {@link Sco...
[ "Parses", "the", "activities", "of", "a", "certain", "level", "in", "the", "process", "(", "process", "subprocess", "or", "another", "scope", ")", "." ]
train
https://github.com/camunda/camunda-bpm-platform/blob/1a464fc887ef3760e53d6f91b9e5b871a0d77cc0/engine/src/main/java/org/camunda/bpm/engine/impl/bpmn/parser/BpmnParse.java#L1254-L1258
timols/java-gitlab-api
src/main/java/org/gitlab/api/GitlabAPI.java
GitlabAPI.deleteGroupMember
public void deleteGroupMember(Integer groupId, Integer userId) throws IOException { String tailUrl = GitlabGroup.URL + "/" + groupId + "/" + GitlabGroupMember.URL + "/" + userId; retrieve().method(DELETE).to(tailUrl, Void.class); }
java
public void deleteGroupMember(Integer groupId, Integer userId) throws IOException { String tailUrl = GitlabGroup.URL + "/" + groupId + "/" + GitlabGroupMember.URL + "/" + userId; retrieve().method(DELETE).to(tailUrl, Void.class); }
[ "public", "void", "deleteGroupMember", "(", "Integer", "groupId", ",", "Integer", "userId", ")", "throws", "IOException", "{", "String", "tailUrl", "=", "GitlabGroup", ".", "URL", "+", "\"/\"", "+", "groupId", "+", "\"/\"", "+", "GitlabGroupMember", ".", "URL"...
Delete a group member. @param groupId the group id @param userId the user id @throws IOException on gitlab api call error
[ "Delete", "a", "group", "member", "." ]
train
https://github.com/timols/java-gitlab-api/blob/f03eedf952cfbb40306be3bf9234dcf78fab029e/src/main/java/org/gitlab/api/GitlabAPI.java#L759-L762
Whiley/WhileyCompiler
src/main/java/wyil/interpreter/Interpreter.java
Interpreter.executeContinue
private Status executeContinue(Stmt.Continue stmt, CallStack frame, EnclosingScope scope) { return Status.CONTINUE; }
java
private Status executeContinue(Stmt.Continue stmt, CallStack frame, EnclosingScope scope) { return Status.CONTINUE; }
[ "private", "Status", "executeContinue", "(", "Stmt", ".", "Continue", "stmt", ",", "CallStack", "frame", ",", "EnclosingScope", "scope", ")", "{", "return", "Status", ".", "CONTINUE", ";", "}" ]
Execute a continue statement. This transfers to control back to the start the nearest enclosing loop. @param stmt --- Break statement. @param frame --- The current stack frame @return
[ "Execute", "a", "continue", "statement", ".", "This", "transfers", "to", "control", "back", "to", "the", "start", "the", "nearest", "enclosing", "loop", "." ]
train
https://github.com/Whiley/WhileyCompiler/blob/680f8a657d3fc286f8cc422755988b6d74ab3f4c/src/main/java/wyil/interpreter/Interpreter.java#L298-L300
avianey/facebook-api-android-maven
facebook/src/main/java/com/facebook/Request.java
Request.newUpdateOpenGraphObjectRequest
public static Request newUpdateOpenGraphObjectRequest(Session session, OpenGraphObject openGraphObject, Callback callback) { if (openGraphObject == null) { throw new FacebookException("openGraphObject cannot be null"); } String path = openGraphObject.getId(); if ...
java
public static Request newUpdateOpenGraphObjectRequest(Session session, OpenGraphObject openGraphObject, Callback callback) { if (openGraphObject == null) { throw new FacebookException("openGraphObject cannot be null"); } String path = openGraphObject.getId(); if ...
[ "public", "static", "Request", "newUpdateOpenGraphObjectRequest", "(", "Session", "session", ",", "OpenGraphObject", "openGraphObject", ",", "Callback", "callback", ")", "{", "if", "(", "openGraphObject", "==", "null", ")", "{", "throw", "new", "FacebookException", ...
Creates a new Request configured to update a user owned Open Graph object. @param session the Session to use, or null; if non-null, the session must be in an opened state @param openGraphObject the Open Graph object to update, which must have a valid 'id' property @param callback a callback that will be called when th...
[ "Creates", "a", "new", "Request", "configured", "to", "update", "a", "user", "owned", "Open", "Graph", "object", "." ]
train
https://github.com/avianey/facebook-api-android-maven/blob/ae6c7aa7ae45739ee19f18c1983e05f7e35b9ede/facebook/src/main/java/com/facebook/Request.java#L781-L795
j-a-w-r/jawr-main-repo
jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java
ResourceBundlesHandlerImpl.storeJawrBundleMapping
private void storeJawrBundleMapping(boolean mappingFileExists, boolean force) { if (config.getUseBundleMapping() && (!mappingFileExists || force)) { bundleMapping.setProperty(JawrConstant.JAWR_CONFIG_HASHCODE, getJawrConfigHashcode()); resourceBundleHandler.storeJawrBundleMapping(bundleMapping); if (resourc...
java
private void storeJawrBundleMapping(boolean mappingFileExists, boolean force) { if (config.getUseBundleMapping() && (!mappingFileExists || force)) { bundleMapping.setProperty(JawrConstant.JAWR_CONFIG_HASHCODE, getJawrConfigHashcode()); resourceBundleHandler.storeJawrBundleMapping(bundleMapping); if (resourc...
[ "private", "void", "storeJawrBundleMapping", "(", "boolean", "mappingFileExists", ",", "boolean", "force", ")", "{", "if", "(", "config", ".", "getUseBundleMapping", "(", ")", "&&", "(", "!", "mappingFileExists", "||", "force", ")", ")", "{", "bundleMapping", ...
Stores the Jawr bundle mapping @param mappingFileExists the flag indicating if the mapping file exists @param force force the storage of Jawr bundle mapping
[ "Stores", "the", "Jawr", "bundle", "mapping" ]
train
https://github.com/j-a-w-r/jawr-main-repo/blob/5381f6acf461cd2502593c67a77bd6ef9eab848d/jawr/jawr-core/src/main/java/net/jawr/web/resource/bundle/handler/ResourceBundlesHandlerImpl.java#L947-L981
google/closure-templates
java/src/com/google/template/soy/jssrc/restricted/JsExprUtils.java
JsExprUtils.wrapWithFunction
@VisibleForTesting static JsExpr wrapWithFunction(String functionExprText, JsExpr jsExpr) { Preconditions.checkNotNull(functionExprText); return new JsExpr(functionExprText + "(" + jsExpr.getText() + ")", Integer.MAX_VALUE); }
java
@VisibleForTesting static JsExpr wrapWithFunction(String functionExprText, JsExpr jsExpr) { Preconditions.checkNotNull(functionExprText); return new JsExpr(functionExprText + "(" + jsExpr.getText() + ")", Integer.MAX_VALUE); }
[ "@", "VisibleForTesting", "static", "JsExpr", "wrapWithFunction", "(", "String", "functionExprText", ",", "JsExpr", "jsExpr", ")", "{", "Preconditions", ".", "checkNotNull", "(", "functionExprText", ")", ";", "return", "new", "JsExpr", "(", "functionExprText", "+", ...
Wraps an expression in a function call. @param functionExprText expression for the function to invoke, such as a function name or constructor phrase (such as "new SomeClass"). @param jsExpr the expression to compute the argument to the function @return a JS expression consisting of a call to the specified function, ap...
[ "Wraps", "an", "expression", "in", "a", "function", "call", "." ]
train
https://github.com/google/closure-templates/blob/cc61e1dff70ae97f24f417a57410081bc498bd56/java/src/com/google/template/soy/jssrc/restricted/JsExprUtils.java#L135-L139
OpenLiberty/open-liberty
dev/com.ibm.ws.kernel.service/src/com/ibm/wsspi/kernel/service/utils/MetatypeUtils.java
MetatypeUtils.parseDuration
@FFDCIgnore(Exception.class) public static long parseDuration(Object configAlias, String propertyKey, Object obj, long defaultValue, TimeUnit units) { if (obj != null) { try { if (obj instanceof String) return evaluateDuration((String) obj, units); ...
java
@FFDCIgnore(Exception.class) public static long parseDuration(Object configAlias, String propertyKey, Object obj, long defaultValue, TimeUnit units) { if (obj != null) { try { if (obj instanceof String) return evaluateDuration((String) obj, units); ...
[ "@", "FFDCIgnore", "(", "Exception", ".", "class", ")", "public", "static", "long", "parseDuration", "(", "Object", "configAlias", ",", "String", "propertyKey", ",", "Object", "obj", ",", "long", "defaultValue", ",", "TimeUnit", "units", ")", "{", "if", "(",...
Parse a duration from the provided config value: checks for whether or not the object read from the Service/Component configuration is a String or a Metatype converted long duration value <p> If an exception occurs converting the object parameter: A translated warning message will be issued using the provided propertyK...
[ "Parse", "a", "duration", "from", "the", "provided", "config", "value", ":", "checks", "for", "whether", "or", "not", "the", "object", "read", "from", "the", "Service", "/", "Component", "configuration", "is", "a", "String", "or", "a", "Metatype", "converted...
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.service/src/com/ibm/wsspi/kernel/service/utils/MetatypeUtils.java#L465-L484
mapfish/mapfish-print
core/src/main/java/org/mapfish/print/attribute/map/GenericMapAttribute.java
GenericMapAttribute.parseProjection
public static CoordinateReferenceSystem parseProjection( final String projection, final Boolean longitudeFirst) { try { if (longitudeFirst == null) { return CRS.decode(projection); } else { return CRS.decode(projection, longitudeFirst); ...
java
public static CoordinateReferenceSystem parseProjection( final String projection, final Boolean longitudeFirst) { try { if (longitudeFirst == null) { return CRS.decode(projection); } else { return CRS.decode(projection, longitudeFirst); ...
[ "public", "static", "CoordinateReferenceSystem", "parseProjection", "(", "final", "String", "projection", ",", "final", "Boolean", "longitudeFirst", ")", "{", "try", "{", "if", "(", "longitudeFirst", "==", "null", ")", "{", "return", "CRS", ".", "decode", "(", ...
Parse the given projection. @param projection The projection string. @param longitudeFirst longitudeFirst
[ "Parse", "the", "given", "projection", "." ]
train
https://github.com/mapfish/mapfish-print/blob/25a452cb39f592bd8a53b20db1037703898e1e22/core/src/main/java/org/mapfish/print/attribute/map/GenericMapAttribute.java#L84-L97
Jasig/uPortal
uPortal-layout/uPortal-layout-core/src/main/java/org/apereo/portal/layout/profile/ServerProfileMapperImpl.java
ServerProfileMapperImpl.getProfileFname
@Override public String getProfileFname(IPerson person, HttpServletRequest request) { Validate.notNull(person, "Cannot get profile fname for a null person."); Validate.notNull(request, "Cannot get profile fname for a null request."); String userName = person.getUserName(); final St...
java
@Override public String getProfileFname(IPerson person, HttpServletRequest request) { Validate.notNull(person, "Cannot get profile fname for a null person."); Validate.notNull(request, "Cannot get profile fname for a null request."); String userName = person.getUserName(); final St...
[ "@", "Override", "public", "String", "getProfileFname", "(", "IPerson", "person", ",", "HttpServletRequest", "request", ")", "{", "Validate", ".", "notNull", "(", "person", ",", "\"Cannot get profile fname for a null person.\"", ")", ";", "Validate", ".", "notNull", ...
Returns the profile name specified by {@link #setDefaultProfile(String defaultProfile) setDefaultProfile} or "default" if {@link #setDefaultProfile(String defaultProfile) setDefaultProfile} is not called if the user is using a server in the server regular expression specified by {@link #setServerRegex(String serverRege...
[ "Returns", "the", "profile", "name", "specified", "by", "{", "@link", "#setDefaultProfile", "(", "String", "defaultProfile", ")", "setDefaultProfile", "}", "or", "default", "if", "{", "@link", "#setDefaultProfile", "(", "String", "defaultProfile", ")", "setDefaultPr...
train
https://github.com/Jasig/uPortal/blob/c1986542abb9acd214268f2df21c6305ad2f262b/uPortal-layout/uPortal-layout-core/src/main/java/org/apereo/portal/layout/profile/ServerProfileMapperImpl.java#L75-L103
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/sax2dtm/SAX2DTM2.java
SAX2DTM2.endElement
public void endElement(String uri, String localName, String qName) throws SAXException { charactersFlush(); // If no one noticed, startPrefixMapping is a drag. // Pop the context for the last child (the one pushed by startElement) m_contextIndexes.quickPop(1); // Do it again for this o...
java
public void endElement(String uri, String localName, String qName) throws SAXException { charactersFlush(); // If no one noticed, startPrefixMapping is a drag. // Pop the context for the last child (the one pushed by startElement) m_contextIndexes.quickPop(1); // Do it again for this o...
[ "public", "void", "endElement", "(", "String", "uri", ",", "String", "localName", ",", "String", "qName", ")", "throws", "SAXException", "{", "charactersFlush", "(", ")", ";", "// If no one noticed, startPrefixMapping is a drag.", "// Pop the context for the last child (the...
Receive notification of the end of an element. <p>By default, do nothing. Application writers may override this method in a subclass to take specific actions at the end of each element (such as finalising a tree node or writing output to a file).</p> @param uri The Namespace URI, or the empty string if the element h...
[ "Receive", "notification", "of", "the", "end", "of", "an", "element", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/sax2dtm/SAX2DTM2.java#L2226-L2244
infinispan/infinispan
commons/src/main/java/org/infinispan/commons/util/BeanUtils.java
BeanUtils.getterMethod
public static Method getterMethod(Class<?> target, Class<?> componentClass) { try { return target.getMethod(getterName(componentClass)); } catch (NoSuchMethodException e) { //if (log.isTraceEnabled()) log.trace("Unable to find method " + getterName(componentClass) + " in class " + ta...
java
public static Method getterMethod(Class<?> target, Class<?> componentClass) { try { return target.getMethod(getterName(componentClass)); } catch (NoSuchMethodException e) { //if (log.isTraceEnabled()) log.trace("Unable to find method " + getterName(componentClass) + " in class " + ta...
[ "public", "static", "Method", "getterMethod", "(", "Class", "<", "?", ">", "target", ",", "Class", "<", "?", ">", "componentClass", ")", "{", "try", "{", "return", "target", ".", "getMethod", "(", "getterName", "(", "componentClass", ")", ")", ";", "}", ...
Returns a Method object corresponding to a getter that retrieves an instance of componentClass from target. @param target class that the getter should exist on @param componentClass component to get @return Method object, or null of one does not exist
[ "Returns", "a", "Method", "object", "corresponding", "to", "a", "getter", "that", "retrieves", "an", "instance", "of", "componentClass", "from", "target", "." ]
train
https://github.com/infinispan/infinispan/blob/7c62b94886c3febb4774ae8376acf2baa0265ab5/commons/src/main/java/org/infinispan/commons/util/BeanUtils.java#L81-L92
box/box-java-sdk
src/main/java/com/box/sdk/BoxRecents.java
BoxRecents.getRecentItems
public static BoxResourceIterable<BoxRecentItem> getRecentItems(final BoxAPIConnection api, int limit, String... fields) { QueryStringBuilder builder = new QueryStringBuilder(); if (fields.length > 0) { builder.appendParam("...
java
public static BoxResourceIterable<BoxRecentItem> getRecentItems(final BoxAPIConnection api, int limit, String... fields) { QueryStringBuilder builder = new QueryStringBuilder(); if (fields.length > 0) { builder.appendParam("...
[ "public", "static", "BoxResourceIterable", "<", "BoxRecentItem", ">", "getRecentItems", "(", "final", "BoxAPIConnection", "api", ",", "int", "limit", ",", "String", "...", "fields", ")", "{", "QueryStringBuilder", "builder", "=", "new", "QueryStringBuilder", "(", ...
Used to retrieve all collaborations associated with the item. @see <a href="http://google.com">https://developer.box.com/reference#get-recent-items</a> @param api BoxAPIConnection from the associated file. @param limit limit of items to be retrieved. Default is 100. Maximum is 1000 @param fields the optional fiel...
[ "Used", "to", "retrieve", "all", "collaborations", "associated", "with", "the", "item", "." ]
train
https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxRecents.java#L30-L45
jbundle/jbundle
thin/base/thread/src/main/java/org/jbundle/thin/base/thread/AutoTask.java
AutoTask.init
public void init(App application, String strParams, Map<String, Object> properties) { m_application = (App)application; if (m_application != null) m_application.addTask(this, null); // Add this task to the list if (properties != null) { if (...
java
public void init(App application, String strParams, Map<String, Object> properties) { m_application = (App)application; if (m_application != null) m_application.addTask(this, null); // Add this task to the list if (properties != null) { if (...
[ "public", "void", "init", "(", "App", "application", ",", "String", "strParams", ",", "Map", "<", "String", ",", "Object", ">", "properties", ")", "{", "m_application", "=", "(", "App", ")", "application", ";", "if", "(", "m_application", "!=", "null", "...
Constructor. @param application The parent application. @param strParams The task properties.
[ "Constructor", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/thin/base/thread/src/main/java/org/jbundle/thin/base/thread/AutoTask.java#L88-L107
phax/ph-commons
ph-security/src/main/java/com/helger/security/keystore/KeyStoreHelper.java
KeyStoreHelper.loadKeyStoreDirect
@Nonnull public static KeyStore loadKeyStoreDirect (@Nonnull final IKeyStoreType aKeyStoreType, @Nonnull final String sKeyStorePath, @Nullable final char [] aKeyStorePassword) throws GeneralSecurityException, ...
java
@Nonnull public static KeyStore loadKeyStoreDirect (@Nonnull final IKeyStoreType aKeyStoreType, @Nonnull final String sKeyStorePath, @Nullable final char [] aKeyStorePassword) throws GeneralSecurityException, ...
[ "@", "Nonnull", "public", "static", "KeyStore", "loadKeyStoreDirect", "(", "@", "Nonnull", "final", "IKeyStoreType", "aKeyStoreType", ",", "@", "Nonnull", "final", "String", "sKeyStorePath", ",", "@", "Nullable", "final", "char", "[", "]", "aKeyStorePassword", ")"...
Load a key store from a resource. @param aKeyStoreType Type of key store. May not be <code>null</code>. @param sKeyStorePath The path pointing to the key store. May not be <code>null</code>. @param aKeyStorePassword The key store password. May be <code>null</code> to indicate that no password is required. @return The ...
[ "Load", "a", "key", "store", "from", "a", "resource", "." ]
train
https://github.com/phax/ph-commons/blob/d28c03565f44a0b804d96028d0969f9bb38c4313/ph-security/src/main/java/com/helger/security/keystore/KeyStoreHelper.java#L133-L161
rwl/CSparseJ
src/main/java/edu/emory/mathcs/csparsej/tfloat/Scs_scatter.java
Scs_scatter.cs_scatter
public static int cs_scatter(Scs A, int j, float beta, int[] w, float[] x, int mark, Scs C, int nz) { int i, p; int Ap[], Ai[], Ci[]; float[] Ax; if (!Scs_util.CS_CSC(A) || w == null || !Scs_util.CS_CSC(C)) return (-1); /* check inputs */ Ap = A.p; Ai =...
java
public static int cs_scatter(Scs A, int j, float beta, int[] w, float[] x, int mark, Scs C, int nz) { int i, p; int Ap[], Ai[], Ci[]; float[] Ax; if (!Scs_util.CS_CSC(A) || w == null || !Scs_util.CS_CSC(C)) return (-1); /* check inputs */ Ap = A.p; Ai =...
[ "public", "static", "int", "cs_scatter", "(", "Scs", "A", ",", "int", "j", ",", "float", "beta", ",", "int", "[", "]", "w", ",", "float", "[", "]", "x", ",", "int", "mark", ",", "Scs", "C", ",", "int", "nz", ")", "{", "int", "i", ",", "p", ...
Scatters and sums a sparse vector A(:,j) into a dense vector, x = x + beta * A(:,j). @param A the sparse vector is A(:,j) @param j the column of A to use @param beta scalar multiplied by A(:,j) @param w size m, node i is marked if w[i] = mark @param x size m, ignored if null @param mark mark value of w @param C patter...
[ "Scatters", "and", "sums", "a", "sparse", "vector", "A", "(", ":", "j", ")", "into", "a", "dense", "vector", "x", "=", "x", "+", "beta", "*", "A", "(", ":", "j", ")", "." ]
train
https://github.com/rwl/CSparseJ/blob/6a6f66bccce1558156a961494358952603b0ac84/src/main/java/edu/emory/mathcs/csparsej/tfloat/Scs_scatter.java#L59-L80
aws/aws-sdk-java
aws-java-sdk-medialive/src/main/java/com/amazonaws/services/medialive/model/ChannelSummary.java
ChannelSummary.withTags
public ChannelSummary withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
java
public ChannelSummary withTags(java.util.Map<String, String> tags) { setTags(tags); return this; }
[ "public", "ChannelSummary", "withTags", "(", "java", ".", "util", ".", "Map", "<", "String", ",", "String", ">", "tags", ")", "{", "setTags", "(", "tags", ")", ";", "return", "this", ";", "}" ]
A collection of key-value pairs. @param tags A collection of key-value pairs. @return Returns a reference to this object so that method calls can be chained together.
[ "A", "collection", "of", "key", "-", "value", "pairs", "." ]
train
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-medialive/src/main/java/com/amazonaws/services/medialive/model/ChannelSummary.java#L632-L635
Azure/azure-sdk-for-java
network/resource-manager/v2017_10_01/src/main/java/com/microsoft/azure/management/network/v2017_10_01/implementation/NetworkWatchersInner.java
NetworkWatchersInner.createOrUpdateAsync
public Observable<NetworkWatcherInner> createOrUpdateAsync(String resourceGroupName, String networkWatcherName, NetworkWatcherInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1<ServiceResponse<NetworkWatcherInner>, NetworkWatcherInn...
java
public Observable<NetworkWatcherInner> createOrUpdateAsync(String resourceGroupName, String networkWatcherName, NetworkWatcherInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, networkWatcherName, parameters).map(new Func1<ServiceResponse<NetworkWatcherInner>, NetworkWatcherInn...
[ "public", "Observable", "<", "NetworkWatcherInner", ">", "createOrUpdateAsync", "(", "String", "resourceGroupName", ",", "String", "networkWatcherName", ",", "NetworkWatcherInner", "parameters", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "resourceGroup...
Creates or updates a network watcher in the specified resource group. @param resourceGroupName The name of the resource group. @param networkWatcherName The name of the network watcher. @param parameters Parameters that define the network watcher resource. @throws IllegalArgumentException thrown if parameters fail the...
[ "Creates", "or", "updates", "a", "network", "watcher", "in", "the", "specified", "resource", "group", "." ]
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/NetworkWatchersInner.java#L230-L237
graphhopper/graphhopper
core/src/main/java/com/graphhopper/routing/Path.java
Path.processEdge
protected void processEdge(int edgeId, int adjNode, int prevEdgeId) { EdgeIteratorState iter = graph.getEdgeIteratorState(edgeId, adjNode); distance += iter.getDistance(); time += weighting.calcMillis(iter, false, prevEdgeId); addEdge(edgeId); }
java
protected void processEdge(int edgeId, int adjNode, int prevEdgeId) { EdgeIteratorState iter = graph.getEdgeIteratorState(edgeId, adjNode); distance += iter.getDistance(); time += weighting.calcMillis(iter, false, prevEdgeId); addEdge(edgeId); }
[ "protected", "void", "processEdge", "(", "int", "edgeId", ",", "int", "adjNode", ",", "int", "prevEdgeId", ")", "{", "EdgeIteratorState", "iter", "=", "graph", ".", "getEdgeIteratorState", "(", "edgeId", ",", "adjNode", ")", ";", "distance", "+=", "iter", "....
Calculates the distance and time of the specified edgeId. Also it adds the edgeId to the path list. @param prevEdgeId here the edge that comes before edgeId is necessary. I.e. for the reverse search we need the next edge.
[ "Calculates", "the", "distance", "and", "time", "of", "the", "specified", "edgeId", ".", "Also", "it", "adds", "the", "edgeId", "to", "the", "path", "list", "." ]
train
https://github.com/graphhopper/graphhopper/blob/c235e306e6e823043cadcc41ead0e685bdebf737/core/src/main/java/com/graphhopper/routing/Path.java#L240-L245
phax/ph-oton
ph-oton-html/src/main/java/com/helger/html/js/JSEventMap.java
JSEventMap.setHandler
public void setHandler (@Nonnull final EJSEvent eJSEvent, @Nonnull final IHasJSCode aNewHandler) { ValueEnforcer.notNull (eJSEvent, "JSEvent"); ValueEnforcer.notNull (aNewHandler, "NewHandler"); // Set only the new handler and remove any existing handler m_aEvents.put (eJSEvent, new CollectingJSCodeP...
java
public void setHandler (@Nonnull final EJSEvent eJSEvent, @Nonnull final IHasJSCode aNewHandler) { ValueEnforcer.notNull (eJSEvent, "JSEvent"); ValueEnforcer.notNull (aNewHandler, "NewHandler"); // Set only the new handler and remove any existing handler m_aEvents.put (eJSEvent, new CollectingJSCodeP...
[ "public", "void", "setHandler", "(", "@", "Nonnull", "final", "EJSEvent", "eJSEvent", ",", "@", "Nonnull", "final", "IHasJSCode", "aNewHandler", ")", "{", "ValueEnforcer", ".", "notNull", "(", "eJSEvent", ",", "\"JSEvent\"", ")", ";", "ValueEnforcer", ".", "no...
Set a handler for the given JS event. If an existing handler is present, it is automatically overridden. @param eJSEvent The JS event. May not be <code>null</code>. @param aNewHandler The new handler to be added. May not be <code>null</code>.
[ "Set", "a", "handler", "for", "the", "given", "JS", "event", ".", "If", "an", "existing", "handler", "is", "present", "it", "is", "automatically", "overridden", "." ]
train
https://github.com/phax/ph-oton/blob/f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef/ph-oton-html/src/main/java/com/helger/html/js/JSEventMap.java#L99-L106
nyla-solutions/nyla
nyla.solutions.core/src/main/java/nyla/solutions/core/io/SynchronizedIO.java
SynchronizedIO.writeFile
public void writeFile(String aFileName, URL aData) throws Exception { Object lock = retrieveLock(aFileName); synchronized (lock) { IO.writeFile(aFileName, aData); } }
java
public void writeFile(String aFileName, URL aData) throws Exception { Object lock = retrieveLock(aFileName); synchronized (lock) { IO.writeFile(aFileName, aData); } }
[ "public", "void", "writeFile", "(", "String", "aFileName", ",", "URL", "aData", ")", "throws", "Exception", "{", "Object", "lock", "=", "retrieveLock", "(", "aFileName", ")", ";", "synchronized", "(", "lock", ")", "{", "IO", ".", "writeFile", "(", "aFileNa...
Write binary file data @param aFileName @param aData @throws Exception
[ "Write", "binary", "file", "data" ]
train
https://github.com/nyla-solutions/nyla/blob/38d5b843c76eae9762bbca20453ed0f0ad8412a9/nyla.solutions.core/src/main/java/nyla/solutions/core/io/SynchronizedIO.java#L134-L142
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java
DTMDefaultBase.findGTE
protected int findGTE(int[] list, int start, int len, int value) { int low = start; int high = start + (len - 1); int end = high; while (low <= high) { int mid = (low + high) / 2; int c = list[mid]; if (c > value) high = mid - 1; else if (c < value) low =...
java
protected int findGTE(int[] list, int start, int len, int value) { int low = start; int high = start + (len - 1); int end = high; while (low <= high) { int mid = (low + high) / 2; int c = list[mid]; if (c > value) high = mid - 1; else if (c < value) low =...
[ "protected", "int", "findGTE", "(", "int", "[", "]", "list", ",", "int", "start", ",", "int", "len", ",", "int", "value", ")", "{", "int", "low", "=", "start", ";", "int", "high", "=", "start", "+", "(", "len", "-", "1", ")", ";", "int", "end",...
Find the first index that occurs in the list that is greater than or equal to the given value. @param list A list of integers. @param start The start index to begin the search. @param len The number of items to search. @param value Find the slot that has a value that is greater than or identical to this argument. @re...
[ "Find", "the", "first", "index", "that", "occurs", "in", "the", "list", "that", "is", "greater", "than", "or", "equal", "to", "the", "given", "value", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java#L351-L372
couchbase/couchbase-jvm-core
src/main/java/com/couchbase/client/core/config/refresher/HttpRefresher.java
HttpRefresher.isValidConfigNode
private static boolean isValidConfigNode(final boolean sslEnabled, final NodeInfo nodeInfo) { if (sslEnabled && nodeInfo.sslServices().containsKey(ServiceType.CONFIG)) { return true; } else if (nodeInfo.services().containsKey(ServiceType.CONFIG)) { return true; } ...
java
private static boolean isValidConfigNode(final boolean sslEnabled, final NodeInfo nodeInfo) { if (sslEnabled && nodeInfo.sslServices().containsKey(ServiceType.CONFIG)) { return true; } else if (nodeInfo.services().containsKey(ServiceType.CONFIG)) { return true; } ...
[ "private", "static", "boolean", "isValidConfigNode", "(", "final", "boolean", "sslEnabled", ",", "final", "NodeInfo", "nodeInfo", ")", "{", "if", "(", "sslEnabled", "&&", "nodeInfo", ".", "sslServices", "(", ")", ".", "containsKey", "(", "ServiceType", ".", "C...
Helper method to detect if the given node can actually perform http config refresh. @param sslEnabled true if ssl enabled, false otherwise. @param nodeInfo the node info for the given node. @return true if it is a valid config node, false otherwise.
[ "Helper", "method", "to", "detect", "if", "the", "given", "node", "can", "actually", "perform", "http", "config", "refresh", "." ]
train
https://github.com/couchbase/couchbase-jvm-core/blob/97f0427112c2168fee1d6499904f5fa0e24c6797/src/main/java/com/couchbase/client/core/config/refresher/HttpRefresher.java#L367-L374
dbracewell/mango
src/main/java/com/davidbracewell/json/JsonReader.java
JsonReader.endArray
public JsonReader endArray() throws IOException { if (currentValue.getKey() != END_ARRAY) { throw new IOException("Expecting END_ARRAY, but found " + jsonTokenToStructuredElement(null)); } consume(); return this; }
java
public JsonReader endArray() throws IOException { if (currentValue.getKey() != END_ARRAY) { throw new IOException("Expecting END_ARRAY, but found " + jsonTokenToStructuredElement(null)); } consume(); return this; }
[ "public", "JsonReader", "endArray", "(", ")", "throws", "IOException", "{", "if", "(", "currentValue", ".", "getKey", "(", ")", "!=", "END_ARRAY", ")", "{", "throw", "new", "IOException", "(", "\"Expecting END_ARRAY, but found \"", "+", "jsonTokenToStructuredElement...
Ends an Array @return the structured reader @throws IOException Something went wrong reading
[ "Ends", "an", "Array" ]
train
https://github.com/dbracewell/mango/blob/2cec08826f1fccd658694dd03abce10fc97618ec/src/main/java/com/davidbracewell/json/JsonReader.java#L246-L252
dustin/java-memcached-client
src/main/java/net/spy/memcached/MemcachedClient.java
MemcachedClient.asyncIncr
@Override public OperationFuture<Long> asyncIncr(String key, long by, long def) { return asyncMutate(Mutator.incr, key, by, def, 0); }
java
@Override public OperationFuture<Long> asyncIncr(String key, long by, long def) { return asyncMutate(Mutator.incr, key, by, def, 0); }
[ "@", "Override", "public", "OperationFuture", "<", "Long", ">", "asyncIncr", "(", "String", "key", ",", "long", "by", ",", "long", "def", ")", "{", "return", "asyncMutate", "(", "Mutator", ".", "incr", ",", "key", ",", "by", ",", "def", ",", "0", ")"...
Asychronous increment. @param key key to increment @param by the amount to increment the value by @param def the default value (if the counter does not exist) @return a future with the incremented value, or -1 if the increment failed. @throws IllegalStateException in the rare circumstance where queue is too full to ac...
[ "Asychronous", "increment", "." ]
train
https://github.com/dustin/java-memcached-client/blob/c232307ad8e0c7ccc926e495dd7d5aad2d713318/src/main/java/net/spy/memcached/MemcachedClient.java#L2143-L2146
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/SqlBuilderHelper.java
SqlBuilderHelper.generateLogForContentProviderBeginning
static void generateLogForContentProviderBeginning(SQLiteModelMethod method, MethodSpec.Builder methodBuilder) { if (method.getParent().isLogEnabled()) { methodBuilder.addStatement("$T.info($S, uri.toString())", Logger.class, "Execute " + method.jql.operationType + " for URI %s"); } }
java
static void generateLogForContentProviderBeginning(SQLiteModelMethod method, MethodSpec.Builder methodBuilder) { if (method.getParent().isLogEnabled()) { methodBuilder.addStatement("$T.info($S, uri.toString())", Logger.class, "Execute " + method.jql.operationType + " for URI %s"); } }
[ "static", "void", "generateLogForContentProviderBeginning", "(", "SQLiteModelMethod", "method", ",", "MethodSpec", ".", "Builder", "methodBuilder", ")", "{", "if", "(", "method", ".", "getParent", "(", ")", ".", "isLogEnabled", "(", ")", ")", "{", "methodBuilder",...
<p> Generate log info at beginning of method </p> . @param method the method @param methodBuilder the method builder
[ "<p", ">", "Generate", "log", "info", "at", "beginning", "of", "method", "<", "/", "p", ">", "." ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/sqlite/SqlBuilderHelper.java#L332-L337
groupe-sii/ogham
ogham-email-javamail/src/main/java/fr/sii/ogham/email/sender/impl/JavaMailSender.java
JavaMailSender.setRecipients
private void setRecipients(Email email, MimeMessage mimeMsg) throws MessagingException, AddressException, UnsupportedEncodingException { for (Recipient recipient : email.getRecipients()) { mimeMsg.addRecipient(convert(recipient.getType()), toInternetAddress(recipient.getAddress())); } }
java
private void setRecipients(Email email, MimeMessage mimeMsg) throws MessagingException, AddressException, UnsupportedEncodingException { for (Recipient recipient : email.getRecipients()) { mimeMsg.addRecipient(convert(recipient.getType()), toInternetAddress(recipient.getAddress())); } }
[ "private", "void", "setRecipients", "(", "Email", "email", ",", "MimeMessage", "mimeMsg", ")", "throws", "MessagingException", ",", "AddressException", ",", "UnsupportedEncodingException", "{", "for", "(", "Recipient", "recipient", ":", "email", ".", "getRecipients", ...
Set the recipients addresses on the mime message. @param email the source email @param mimeMsg the mime message to fill @throws MessagingException when the email address is not valid @throws AddressException when the email address is not valid @throws UnsupportedEncodingException when the email address is not valid
[ "Set", "the", "recipients", "addresses", "on", "the", "mime", "message", "." ]
train
https://github.com/groupe-sii/ogham/blob/e273b845604add74b5a25dfd931cb3c166b1008f/ogham-email-javamail/src/main/java/fr/sii/ogham/email/sender/impl/JavaMailSender.java#L165-L169
braintree/browser-switch-android
browser-switch/src/main/java/com/braintreepayments/browserswitch/BrowserSwitchFragment.java
BrowserSwitchFragment.browserSwitch
public void browserSwitch(int requestCode, Intent intent) { if (requestCode == Integer.MIN_VALUE) { BrowserSwitchResult result = BrowserSwitchResult.ERROR .setErrorMessage("Request code cannot be Integer.MIN_VALUE"); onBrowserSwitchResult(requestCode, result, null); ...
java
public void browserSwitch(int requestCode, Intent intent) { if (requestCode == Integer.MIN_VALUE) { BrowserSwitchResult result = BrowserSwitchResult.ERROR .setErrorMessage("Request code cannot be Integer.MIN_VALUE"); onBrowserSwitchResult(requestCode, result, null); ...
[ "public", "void", "browserSwitch", "(", "int", "requestCode", ",", "Intent", "intent", ")", "{", "if", "(", "requestCode", "==", "Integer", ".", "MIN_VALUE", ")", "{", "BrowserSwitchResult", "result", "=", "BrowserSwitchResult", ".", "ERROR", ".", "setErrorMessa...
Open a browser or <a href="https://developer.chrome.com/multidevice/android/customtabs">Chrome Custom Tab</a> with the given intent. @param requestCode the request code used to differentiate requests from one another. @param intent an {@link Intent} containing a url to open.
[ "Open", "a", "browser", "or", "<a", "href", "=", "https", ":", "//", "developer", ".", "chrome", ".", "com", "/", "multidevice", "/", "android", "/", "customtabs", ">", "Chrome", "Custom", "Tab<", "/", "a", ">", "with", "the", "given", "intent", "." ]
train
https://github.com/braintree/browser-switch-android/blob/d830de21bc732b51e658e7296aad7b9037842a19/browser-switch/src/main/java/com/braintreepayments/browserswitch/BrowserSwitchFragment.java#L118-L144
smartsheet-platform/smartsheet-java-sdk
src/main/java/com/smartsheet/api/internal/SheetAutomationRuleResourcesImpl.java
SheetAutomationRuleResourcesImpl.updateAutomationRule
public AutomationRule updateAutomationRule(long sheetId, AutomationRule automationRule) throws SmartsheetException { Util.throwIfNull(automationRule); return this.updateResource("sheets/" + sheetId + "/automationrules/" + automationRule.getId(), AutomationRule.class, automationRule); ...
java
public AutomationRule updateAutomationRule(long sheetId, AutomationRule automationRule) throws SmartsheetException { Util.throwIfNull(automationRule); return this.updateResource("sheets/" + sheetId + "/automationrules/" + automationRule.getId(), AutomationRule.class, automationRule); ...
[ "public", "AutomationRule", "updateAutomationRule", "(", "long", "sheetId", ",", "AutomationRule", "automationRule", ")", "throws", "SmartsheetException", "{", "Util", ".", "throwIfNull", "(", "automationRule", ")", ";", "return", "this", ".", "updateResource", "(", ...
Updates an automation rule. It mirrors to the following Smartsheet REST API method: PUT /sheets/{sheetId}/automationrules/{automationRuleId} Exceptions: IllegalArgumentException : if any argument is null InvalidRequestException : if there is any problem with the REST API request AuthorizationException : if there is a...
[ "Updates", "an", "automation", "rule", "." ]
train
https://github.com/smartsheet-platform/smartsheet-java-sdk/blob/f60e264412076271f83b65889ef9b891fad83df8/src/main/java/com/smartsheet/api/internal/SheetAutomationRuleResourcesImpl.java#L114-L118
SvenEwald/xmlbeam
src/main/java/org/xmlbeam/DefaultXPathBinder.java
DefaultXPathBinder.asBoolean
@Override public CloseableValue<Boolean> asBoolean() { final Class<?> callerClass = ReflectionHelper.getDirectCallerClass(); return bindSingeValue(Boolean.TYPE, callerClass); }
java
@Override public CloseableValue<Boolean> asBoolean() { final Class<?> callerClass = ReflectionHelper.getDirectCallerClass(); return bindSingeValue(Boolean.TYPE, callerClass); }
[ "@", "Override", "public", "CloseableValue", "<", "Boolean", ">", "asBoolean", "(", ")", "{", "final", "Class", "<", "?", ">", "callerClass", "=", "ReflectionHelper", ".", "getDirectCallerClass", "(", ")", ";", "return", "bindSingeValue", "(", "Boolean", ".", ...
Evaluates the XPath as a boolean value. This method is just a shortcut for as(Boolean.TYPE); @return true when the selected value equals (ignoring case) 'true'
[ "Evaluates", "the", "XPath", "as", "a", "boolean", "value", ".", "This", "method", "is", "just", "a", "shortcut", "for", "as", "(", "Boolean", ".", "TYPE", ")", ";" ]
train
https://github.com/SvenEwald/xmlbeam/blob/acaac1b8fa28d246f17187f5e3c6696458a0b447/src/main/java/org/xmlbeam/DefaultXPathBinder.java#L76-L80
alipay/sofa-rpc
extension-impl/registry-sofa/src/main/java/com/alipay/sofa/rpc/registry/sofa/SofaRegistryHelper.java
SofaRegistryHelper.getKeyPairs
private static String getKeyPairs(String key, Object value) { if (value != null) { return "&" + key + "=" + value.toString(); } else { return StringUtils.EMPTY; } }
java
private static String getKeyPairs(String key, Object value) { if (value != null) { return "&" + key + "=" + value.toString(); } else { return StringUtils.EMPTY; } }
[ "private", "static", "String", "getKeyPairs", "(", "String", "key", ",", "Object", "value", ")", "{", "if", "(", "value", "!=", "null", ")", "{", "return", "\"&\"", "+", "key", "+", "\"=\"", "+", "value", ".", "toString", "(", ")", ";", "}", "else", ...
Gets key pairs. @param key the key @param value the value @return the key pairs
[ "Gets", "key", "pairs", "." ]
train
https://github.com/alipay/sofa-rpc/blob/a31406410291e56696185a29c3ba4bd1f54488fd/extension-impl/registry-sofa/src/main/java/com/alipay/sofa/rpc/registry/sofa/SofaRegistryHelper.java#L237-L243
CloudBees-community/syslog-java-client
src/main/java/com/cloudbees/syslog/util/InternalLogger.java
InternalLogger.log
public synchronized void log(@Nullable Level level, @Nullable String msg, @Nullable Throwable t) { if (!isLoggable(level)) return; System.err.println(df.format(new Date()) + " [" + Thread.currentThread().getName() + "] " + name + " - " + level.getName() + ": " + msg); if (t != null) ...
java
public synchronized void log(@Nullable Level level, @Nullable String msg, @Nullable Throwable t) { if (!isLoggable(level)) return; System.err.println(df.format(new Date()) + " [" + Thread.currentThread().getName() + "] " + name + " - " + level.getName() + ": " + msg); if (t != null) ...
[ "public", "synchronized", "void", "log", "(", "@", "Nullable", "Level", "level", ",", "@", "Nullable", "String", "msg", ",", "@", "Nullable", "Throwable", "t", ")", "{", "if", "(", "!", "isLoggable", "(", "level", ")", ")", "return", ";", "System", "."...
synchronize for the {@link java.text.SimpleDateFormat}. @param level @param msg @param t
[ "synchronize", "for", "the", "{", "@link", "java", ".", "text", ".", "SimpleDateFormat", "}", "." ]
train
https://github.com/CloudBees-community/syslog-java-client/blob/41e01206e4ce17c6d225ffb443bf19792a3f3c3a/src/main/java/com/cloudbees/syslog/util/InternalLogger.java#L119-L126
Azure/azure-sdk-for-java
labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/EnvironmentsInner.java
EnvironmentsInner.beginResetPasswordAsync
public Observable<Void> beginResetPasswordAsync(String resourceGroupName, String labAccountName, String labName, String environmentSettingName, String environmentName, ResetPasswordPayload resetPasswordPayload) { return beginResetPasswordWithServiceResponseAsync(resourceGroupName, labAccountName, labName, envir...
java
public Observable<Void> beginResetPasswordAsync(String resourceGroupName, String labAccountName, String labName, String environmentSettingName, String environmentName, ResetPasswordPayload resetPasswordPayload) { return beginResetPasswordWithServiceResponseAsync(resourceGroupName, labAccountName, labName, envir...
[ "public", "Observable", "<", "Void", ">", "beginResetPasswordAsync", "(", "String", "resourceGroupName", ",", "String", "labAccountName", ",", "String", "labName", ",", "String", "environmentSettingName", ",", "String", "environmentName", ",", "ResetPasswordPayload", "r...
Resets the user password on an environment This operation can take a while to complete. @param resourceGroupName The name of the resource group. @param labAccountName The name of the lab Account. @param labName The name of the lab. @param environmentSettingName The name of the environment Setting. @param environmentNa...
[ "Resets", "the", "user", "password", "on", "an", "environment", "This", "operation", "can", "take", "a", "while", "to", "complete", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/labservices/resource-manager/v2018_10_15/src/main/java/com/microsoft/azure/management/labservices/v2018_10_15/implementation/EnvironmentsInner.java#L1309-L1316
OpenLiberty/open-liberty
dev/com.ibm.ws.jmx.connector.client.rest/src/com/ibm/ws/jmx/connector/converter/JSONConverter.java
JSONConverter.writeAttributeList
public void writeAttributeList(OutputStream out, AttributeList value) throws IOException { // AttributeList has no known sub-class. writeStartArray(out); if (value != null) { for (Attribute item : value.asList()) { writeArrayItem(out); writeStartObject...
java
public void writeAttributeList(OutputStream out, AttributeList value) throws IOException { // AttributeList has no known sub-class. writeStartArray(out); if (value != null) { for (Attribute item : value.asList()) { writeArrayItem(out); writeStartObject...
[ "public", "void", "writeAttributeList", "(", "OutputStream", "out", ",", "AttributeList", "value", ")", "throws", "IOException", "{", "// AttributeList has no known sub-class.", "writeStartArray", "(", "out", ")", ";", "if", "(", "value", "!=", "null", ")", "{", "...
Encode an AttributeList instance as JSON: [ { "name" : String, "value" : POJO }* ] @param out The stream to write JSON to @param value The AttributeList instance to encode. Can be null, but its Attribute items can't be null. @throws IOException If an I/O error occurs @see #readAttributeList(InputStream)
[ "Encode", "an", "AttributeList", "instance", "as", "JSON", ":", "[", "{", "name", ":", "String", "value", ":", "POJO", "}", "*", "]" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jmx.connector.client.rest/src/com/ibm/ws/jmx/connector/converter/JSONConverter.java#L1350-L1363
lessthanoptimal/BoofCV
main/boofcv-ip/src/main/java/boofcv/alg/transform/wavelet/UtilWavelet.java
UtilWavelet.transformDimension
public static ImageDimension transformDimension( ImageBase orig , int level ) { return transformDimension(orig.width,orig.height,level); }
java
public static ImageDimension transformDimension( ImageBase orig , int level ) { return transformDimension(orig.width,orig.height,level); }
[ "public", "static", "ImageDimension", "transformDimension", "(", "ImageBase", "orig", ",", "int", "level", ")", "{", "return", "transformDimension", "(", "orig", ".", "width", ",", "orig", ".", "height", ",", "level", ")", ";", "}" ]
Returns dimension which is required for the transformed image in a multilevel wavelet transform.
[ "Returns", "dimension", "which", "is", "required", "for", "the", "transformed", "image", "in", "a", "multilevel", "wavelet", "transform", "." ]
train
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-ip/src/main/java/boofcv/alg/transform/wavelet/UtilWavelet.java#L93-L96
UrielCh/ovh-java-sdk
ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java
ApiOvhCloud.project_serviceName_regionAvailable_GET
public ArrayList<OvhAvailableRegion> project_serviceName_regionAvailable_GET(String serviceName) throws IOException { String qPath = "/cloud/project/{serviceName}/regionAvailable"; StringBuilder sb = path(qPath, serviceName); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, t18); }
java
public ArrayList<OvhAvailableRegion> project_serviceName_regionAvailable_GET(String serviceName) throws IOException { String qPath = "/cloud/project/{serviceName}/regionAvailable"; StringBuilder sb = path(qPath, serviceName); String resp = exec(qPath, "GET", sb.toString(), null); return convertTo(resp, t18); }
[ "public", "ArrayList", "<", "OvhAvailableRegion", ">", "project_serviceName_regionAvailable_GET", "(", "String", "serviceName", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/cloud/project/{serviceName}/regionAvailable\"", ";", "StringBuilder", "sb", "=", "p...
List the regions on which you can ask an access to REST: GET /cloud/project/{serviceName}/regionAvailable @param serviceName [required] Public Cloud project
[ "List", "the", "regions", "on", "which", "you", "can", "ask", "an", "access", "to" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java#L1575-L1580
thorntail/thorntail
plugins/gradle/gradle-plugin/src/main/java/org/wildfly/swarm/plugin/gradle/GradleDependencyResolutionHelper.java
GradleDependencyResolutionHelper.determinePluginVersion
public static String determinePluginVersion() { if (pluginVersion == null) { final String fileName = "META-INF/gradle-plugins/thorntail.properties"; ClassLoader loader = Thread.currentThread().getContextClassLoader(); String version; try (InputStream stream = load...
java
public static String determinePluginVersion() { if (pluginVersion == null) { final String fileName = "META-INF/gradle-plugins/thorntail.properties"; ClassLoader loader = Thread.currentThread().getContextClassLoader(); String version; try (InputStream stream = load...
[ "public", "static", "String", "determinePluginVersion", "(", ")", "{", "if", "(", "pluginVersion", "==", "null", ")", "{", "final", "String", "fileName", "=", "\"META-INF/gradle-plugins/thorntail.properties\"", ";", "ClassLoader", "loader", "=", "Thread", ".", "curr...
Parse the plugin definition file and extract the version details from it.
[ "Parse", "the", "plugin", "definition", "file", "and", "extract", "the", "version", "details", "from", "it", "." ]
train
https://github.com/thorntail/thorntail/blob/4a391b68ffae98c6e66d30a3bfb99dadc9509f14/plugins/gradle/gradle-plugin/src/main/java/org/wildfly/swarm/plugin/gradle/GradleDependencyResolutionHelper.java#L67-L82
naver/android-utilset
UtilSet/src/com/navercorp/utilset/system/ProcessorUtils.java
ProcessorUtils.getNumCores
public static int getNumCores() { //Private Class to display only CPU devices in the directory listing class CpuFilter implements FileFilter { @Override public boolean accept(File pathname) { //Check if filename is "cpu", followed by a single digit number if(Pattern.matches("cpu[0-9]", pathname...
java
public static int getNumCores() { //Private Class to display only CPU devices in the directory listing class CpuFilter implements FileFilter { @Override public boolean accept(File pathname) { //Check if filename is "cpu", followed by a single digit number if(Pattern.matches("cpu[0-9]", pathname...
[ "public", "static", "int", "getNumCores", "(", ")", "{", "//Private Class to display only CPU devices in the directory listing", "class", "CpuFilter", "implements", "FileFilter", "{", "@", "Override", "public", "boolean", "accept", "(", "File", "pathname", ")", "{", "//...
http://stackoverflow.com/questions/7962155/how-can-you-detect-a-dual-core-cpu-on-an-android-device-from-code Gets the number of cores available in this device, across all processors. Requires: Ability to peruse the file system at "/sys/devices/system/cpu" @return The number of cores, or Runtime.getRuntime().availablePr...
[ "http", ":", "//", "stackoverflow", ".", "com", "/", "questions", "/", "7962155", "/", "how", "-", "can", "-", "you", "-", "detect", "-", "a", "-", "dual", "-", "core", "-", "cpu", "-", "on", "-", "an", "-", "android", "-", "device", "-", "from",...
train
https://github.com/naver/android-utilset/blob/4af5f821466bc5bec4ea221ca6d87e0ac9b87e0b/UtilSet/src/com/navercorp/utilset/system/ProcessorUtils.java#L16-L47
sebastiangraf/treetank
interfacemodules/filelistener/src/main/java/org/treetank/filelistener/file/Filelistener.java
Filelistener.watchParents
private void watchParents(Path p, String until) throws IOException { if (p.getParent() != null && !until.equals(p.getParent().toString())) { watchDir(p.getParent().toFile()); watchParents(p.getParent(), until); } }
java
private void watchParents(Path p, String until) throws IOException { if (p.getParent() != null && !until.equals(p.getParent().toString())) { watchDir(p.getParent().toFile()); watchParents(p.getParent(), until); } }
[ "private", "void", "watchParents", "(", "Path", "p", ",", "String", "until", ")", "throws", "IOException", "{", "if", "(", "p", ".", "getParent", "(", ")", "!=", "null", "&&", "!", "until", ".", "equals", "(", "p", ".", "getParent", "(", ")", ".", ...
Watch parent folders of this file until the root listener path has been reached. @param p @param until @throws IOException
[ "Watch", "parent", "folders", "of", "this", "file", "until", "the", "root", "listener", "path", "has", "been", "reached", "." ]
train
https://github.com/sebastiangraf/treetank/blob/9b96d631b6c2a8502a0cc958dcb02bd6a6fd8b60/interfacemodules/filelistener/src/main/java/org/treetank/filelistener/file/Filelistener.java#L201-L206
nohana/Amalgam
amalgam/src/main/java/com/amalgam/view/MotionEventUtils.java
MotionEventUtils.getVerticalMotionDirection
public static MotionDirection getVerticalMotionDirection(MotionEvent e1, MotionEvent e2, float threshold) { float delta = getVerticalMotionRawDelta(e1, e2); return getVerticalMotionDirection(delta, threshold); }
java
public static MotionDirection getVerticalMotionDirection(MotionEvent e1, MotionEvent e2, float threshold) { float delta = getVerticalMotionRawDelta(e1, e2); return getVerticalMotionDirection(delta, threshold); }
[ "public", "static", "MotionDirection", "getVerticalMotionDirection", "(", "MotionEvent", "e1", ",", "MotionEvent", "e2", ",", "float", "threshold", ")", "{", "float", "delta", "=", "getVerticalMotionRawDelta", "(", "e1", ",", "e2", ")", ";", "return", "getVertical...
Calculate the vertical move motion direction. @param e1 start point of the motion. @param e2 end point of the motion. @param threshold threshold to detect the motion. @return the motion direction for the vertical axis.
[ "Calculate", "the", "vertical", "move", "motion", "direction", "." ]
train
https://github.com/nohana/Amalgam/blob/57809ddbfe7897e979cf507982ce0b3aa5e0ed8a/amalgam/src/main/java/com/amalgam/view/MotionEventUtils.java#L96-L99
biojava/biojava
biojava-structure/src/main/java/org/biojava/nbio/structure/align/multiple/util/MultipleAlignmentScorer.java
MultipleAlignmentScorer.getAvgTMScore
public static double getAvgTMScore(MultipleAlignment alignment) throws StructureException { List<Atom[]> trans = MultipleAlignmentTools.transformAtoms(alignment); List<Integer> lengths = new ArrayList<Integer>(alignment.size()); for (Atom[] atoms : alignment.getAtomArrays()) { lengths.add(atoms.length); ...
java
public static double getAvgTMScore(MultipleAlignment alignment) throws StructureException { List<Atom[]> trans = MultipleAlignmentTools.transformAtoms(alignment); List<Integer> lengths = new ArrayList<Integer>(alignment.size()); for (Atom[] atoms : alignment.getAtomArrays()) { lengths.add(atoms.length); ...
[ "public", "static", "double", "getAvgTMScore", "(", "MultipleAlignment", "alignment", ")", "throws", "StructureException", "{", "List", "<", "Atom", "[", "]", ">", "trans", "=", "MultipleAlignmentTools", ".", "transformAtoms", "(", "alignment", ")", ";", "List", ...
Calculates the average TMScore of all the possible pairwise structure comparisons of the given alignment. <p> Complexity: T(n,l) = O(l*n^2), if n=number of structures and l=alignment length. @param alignment @return double Average TMscore @throws StructureException
[ "Calculates", "the", "average", "TMScore", "of", "all", "the", "possible", "pairwise", "structure", "comparisons", "of", "the", "given", "alignment", ".", "<p", ">", "Complexity", ":", "T", "(", "n", "l", ")", "=", "O", "(", "l", "*", "n^2", ")", "if",...
train
https://github.com/biojava/biojava/blob/a1c71a8e3d40cc32104b1d387a3d3b560b43356e/biojava-structure/src/main/java/org/biojava/nbio/structure/align/multiple/util/MultipleAlignmentScorer.java#L235-L245
algolia/algoliasearch-client-java
src/main/java/com/algolia/search/saas/Index.java
Index.getApiKey
public JSONObject getApiKey(String key, RequestOptions requestOptions) throws AlgoliaException { return client.getRequest("/1/indexes/" + encodedIndexName + "/keys/" + key, false, requestOptions); }
java
public JSONObject getApiKey(String key, RequestOptions requestOptions) throws AlgoliaException { return client.getRequest("/1/indexes/" + encodedIndexName + "/keys/" + key, false, requestOptions); }
[ "public", "JSONObject", "getApiKey", "(", "String", "key", ",", "RequestOptions", "requestOptions", ")", "throws", "AlgoliaException", "{", "return", "client", ".", "getRequest", "(", "\"/1/indexes/\"", "+", "encodedIndexName", "+", "\"/keys/\"", "+", "key", ",", ...
Get ACL of an api key @param requestOptions Options to pass to this request
[ "Get", "ACL", "of", "an", "api", "key" ]
train
https://github.com/algolia/algoliasearch-client-java/blob/a05da2f66c099fe6f77295c7b6a8a12c24e95f9b/src/main/java/com/algolia/search/saas/Index.java#L997-L999
mapsforge/mapsforge
mapsforge-map-awt/src/main/java/org/mapsforge/map/awt/util/AwtUtil.java
AwtUtil.createTileCache
public static TileCache createTileCache(int tileSize, double overdrawFactor, int capacity, File cacheDirectory) { int cacheSize = getMinimumCacheSize(tileSize, overdrawFactor); TileCache firstLevelTileCache = new InMemoryTileCache(cacheSize); TileCache secondLevelTileCache = new FileSystemTileCa...
java
public static TileCache createTileCache(int tileSize, double overdrawFactor, int capacity, File cacheDirectory) { int cacheSize = getMinimumCacheSize(tileSize, overdrawFactor); TileCache firstLevelTileCache = new InMemoryTileCache(cacheSize); TileCache secondLevelTileCache = new FileSystemTileCa...
[ "public", "static", "TileCache", "createTileCache", "(", "int", "tileSize", ",", "double", "overdrawFactor", ",", "int", "capacity", ",", "File", "cacheDirectory", ")", "{", "int", "cacheSize", "=", "getMinimumCacheSize", "(", "tileSize", ",", "overdrawFactor", ")...
Utility function to create a two-level tile cache with the right size, using the size of the screen. <p> Combine with <code>FrameBufferController.setUseSquareFrameBuffer(false);</code> @param tileSize the tile size @param overdrawFactor the overdraw factor applied to the map view @param capacity the maximu...
[ "Utility", "function", "to", "create", "a", "two", "-", "level", "tile", "cache", "with", "the", "right", "size", "using", "the", "size", "of", "the", "screen", ".", "<p", ">", "Combine", "with", "<code", ">", "FrameBufferController", ".", "setUseSquareFrame...
train
https://github.com/mapsforge/mapsforge/blob/c49c83f7f727552f793dff15cefa532ade030842/mapsforge-map-awt/src/main/java/org/mapsforge/map/awt/util/AwtUtil.java#L40-L45
OpenFeign/feign
core/src/main/java/feign/Request.java
Request.create
public static Request create(HttpMethod httpMethod, String url, Map<String, Collection<String>> headers, byte[] body, Charset charset) { return create(httpMethod, url, headers, Body.encoded(bo...
java
public static Request create(HttpMethod httpMethod, String url, Map<String, Collection<String>> headers, byte[] body, Charset charset) { return create(httpMethod, url, headers, Body.encoded(bo...
[ "public", "static", "Request", "create", "(", "HttpMethod", "httpMethod", ",", "String", "url", ",", "Map", "<", "String", ",", "Collection", "<", "String", ">", ">", "headers", ",", "byte", "[", "]", "body", ",", "Charset", "charset", ")", "{", "return"...
Builds a Request. All parameters must be effectively immutable, via safe copies. @param httpMethod for the request. @param url for the request. @param headers to include. @param body of the request, can be {@literal null} @param charset of the request, can be {@literal null} @return a Request
[ "Builds", "a", "Request", ".", "All", "parameters", "must", "be", "effectively", "immutable", "via", "safe", "copies", "." ]
train
https://github.com/OpenFeign/feign/blob/318fb0e955b8cfcf64f70d6aeea0ba5795f8a7eb/core/src/main/java/feign/Request.java#L117-L123
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp/src/main/java/org/deeplearning4j/models/paragraphvectors/ParagraphVectors.java
ParagraphVectors.inferVector
public INDArray inferVector(String text, double learningRate, double minLearningRate, int iterations) { if (tokenizerFactory == null) throw new IllegalStateException("TokenizerFactory should be defined, prior to predict() call"); if (this.vocab == null || this.vocab.numWords() == 0) ...
java
public INDArray inferVector(String text, double learningRate, double minLearningRate, int iterations) { if (tokenizerFactory == null) throw new IllegalStateException("TokenizerFactory should be defined, prior to predict() call"); if (this.vocab == null || this.vocab.numWords() == 0) ...
[ "public", "INDArray", "inferVector", "(", "String", "text", ",", "double", "learningRate", ",", "double", "minLearningRate", ",", "int", "iterations", ")", "{", "if", "(", "tokenizerFactory", "==", "null", ")", "throw", "new", "IllegalStateException", "(", "\"To...
This method calculates inferred vector for given text @param text @return
[ "This", "method", "calculates", "inferred", "vector", "for", "given", "text" ]
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nlp-parent/deeplearning4j-nlp/src/main/java/org/deeplearning4j/models/paragraphvectors/ParagraphVectors.java#L196-L215
UrielCh/ovh-java-sdk
ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java
ApiOvhCloud.project_serviceName_sshkey_keyId_DELETE
public void project_serviceName_sshkey_keyId_DELETE(String serviceName, String keyId) throws IOException { String qPath = "/cloud/project/{serviceName}/sshkey/{keyId}"; StringBuilder sb = path(qPath, serviceName, keyId); exec(qPath, "DELETE", sb.toString(), null); }
java
public void project_serviceName_sshkey_keyId_DELETE(String serviceName, String keyId) throws IOException { String qPath = "/cloud/project/{serviceName}/sshkey/{keyId}"; StringBuilder sb = path(qPath, serviceName, keyId); exec(qPath, "DELETE", sb.toString(), null); }
[ "public", "void", "project_serviceName_sshkey_keyId_DELETE", "(", "String", "serviceName", ",", "String", "keyId", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/cloud/project/{serviceName}/sshkey/{keyId}\"", ";", "StringBuilder", "sb", "=", "path", "(", ...
Delete SSH key REST: DELETE /cloud/project/{serviceName}/sshkey/{keyId} @param keyId [required] SSH key id @param serviceName [required] Project name
[ "Delete", "SSH", "key" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-cloud/src/main/java/net/minidev/ovh/api/ApiOvhCloud.java#L1513-L1517
flow/caustic
api/src/main/java/com/flowpowered/caustic/api/Material.java
Material.addTexture
public void addTexture(int unit, Texture texture) { if (texture == null) { throw new IllegalStateException("Texture cannot be null"); } texture.checkCreated(); if (textures == null) { textures = new TIntObjectHashMap<>(); } textures.put(unit, textu...
java
public void addTexture(int unit, Texture texture) { if (texture == null) { throw new IllegalStateException("Texture cannot be null"); } texture.checkCreated(); if (textures == null) { textures = new TIntObjectHashMap<>(); } textures.put(unit, textu...
[ "public", "void", "addTexture", "(", "int", "unit", ",", "Texture", "texture", ")", "{", "if", "(", "texture", "==", "null", ")", "{", "throw", "new", "IllegalStateException", "(", "\"Texture cannot be null\"", ")", ";", "}", "texture", ".", "checkCreated", ...
Adds a texture to the material. If a texture is a already present in the same unit as this one, it will be replaced. @param unit The unit to add the texture to @param texture The texture to add
[ "Adds", "a", "texture", "to", "the", "material", ".", "If", "a", "texture", "is", "a", "already", "present", "in", "the", "same", "unit", "as", "this", "one", "it", "will", "be", "replaced", "." ]
train
https://github.com/flow/caustic/blob/88652fcf0621ce158a0e92ce4c570ed6b1f6fca9/api/src/main/java/com/flowpowered/caustic/api/Material.java#L124-L133
onelogin/onelogin-java-sdk
src/main/java/com/onelogin/sdk/conn/Client.java
Client.getUserRoles
public List<Integer> getUserRoles(long id) throws OAuthSystemException, OAuthProblemException, URISyntaxException { cleanError(); prepareToken(); URIBuilder url = new URIBuilder(settings.getURL(Constants.GET_ROLES_FOR_USER_URL, Long.toString(id))); OneloginURLConnectionClient httpClient = new OneloginURLConne...
java
public List<Integer> getUserRoles(long id) throws OAuthSystemException, OAuthProblemException, URISyntaxException { cleanError(); prepareToken(); URIBuilder url = new URIBuilder(settings.getURL(Constants.GET_ROLES_FOR_USER_URL, Long.toString(id))); OneloginURLConnectionClient httpClient = new OneloginURLConne...
[ "public", "List", "<", "Integer", ">", "getUserRoles", "(", "long", "id", ")", "throws", "OAuthSystemException", ",", "OAuthProblemException", ",", "URISyntaxException", "{", "cleanError", "(", ")", ";", "prepareToken", "(", ")", ";", "URIBuilder", "url", "=", ...
Gets a list of role IDs that have been assigned to a user. @param id Id of the user @return List of Role Ids @throws OAuthSystemException - if there is a IOException reading parameters of the httpURLConnection @throws OAuthProblemException - if there are errors validating the OneloginOAuthJSONResourceResponse and th...
[ "Gets", "a", "list", "of", "role", "IDs", "that", "have", "been", "assigned", "to", "a", "user", "." ]
train
https://github.com/onelogin/onelogin-java-sdk/blob/1570b78033dcc1c7387099e77fe41b6b0638df8c/src/main/java/com/onelogin/sdk/conn/Client.java#L595-L618
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/jobgraph/JobGraph.java
JobGraph.addUserArtifact
public void addUserArtifact(String name, DistributedCache.DistributedCacheEntry file) { if (file == null) { throw new IllegalArgumentException(); } userArtifacts.putIfAbsent(name, file); }
java
public void addUserArtifact(String name, DistributedCache.DistributedCacheEntry file) { if (file == null) { throw new IllegalArgumentException(); } userArtifacts.putIfAbsent(name, file); }
[ "public", "void", "addUserArtifact", "(", "String", "name", ",", "DistributedCache", ".", "DistributedCacheEntry", "file", ")", "{", "if", "(", "file", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", ")", ";", "}", "userArtifacts", "."...
Adds the path of a custom file required to run the job on a task manager. @param name a name under which this artifact will be accessible through {@link DistributedCache} @param file path of a custom file required to run the job on a task manager
[ "Adds", "the", "path", "of", "a", "custom", "file", "required", "to", "run", "the", "job", "on", "a", "task", "manager", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/jobgraph/JobGraph.java#L517-L523
duracloud/duracloud
durastore/src/main/java/org/duracloud/durastore/rest/SpaceResource.java
SpaceResource.deleteSpace
public void deleteSpace(String spaceID, String storeID) throws ResourceException { try { StorageProvider storage = storageProviderFactory.getStorageProvider(storeID); storage.deleteSpace(spaceID); } catch (NotFoundException e) { throw new ResourceNotFoundException("de...
java
public void deleteSpace(String spaceID, String storeID) throws ResourceException { try { StorageProvider storage = storageProviderFactory.getStorageProvider(storeID); storage.deleteSpace(spaceID); } catch (NotFoundException e) { throw new ResourceNotFoundException("de...
[ "public", "void", "deleteSpace", "(", "String", "spaceID", ",", "String", "storeID", ")", "throws", "ResourceException", "{", "try", "{", "StorageProvider", "storage", "=", "storageProviderFactory", ".", "getStorageProvider", "(", "storeID", ")", ";", "storage", "...
Deletes a space, removing all included content. @param spaceID @param storeID
[ "Deletes", "a", "space", "removing", "all", "included", "content", "." ]
train
https://github.com/duracloud/duracloud/blob/dc4f3a1716d43543cc3b2e1880605f9389849b66/durastore/src/main/java/org/duracloud/durastore/rest/SpaceResource.java#L245-L255