repo
stringlengths
7
59
path
stringlengths
3
222
func_name
stringlengths
3
127
original_string
stringlengths
0
466k
language
stringclasses
1 value
code
stringlengths
0
466k
code_tokens
listlengths
0
68.3k
docstring
stringlengths
0
21.3k
docstring_tokens
listlengths
0
1.93k
sha
stringlengths
0
40
url
stringlengths
0
339
partition
stringclasses
3 values
summary
stringlengths
0
250
instruction
stringlengths
38
3.13k
input
stringclasses
1 value
output
stringlengths
146
466k
ttddyy/datasource-proxy
src/main/java/net/ttddyy/dsproxy/proxy/ParameterSetOperation.java
ParameterSetOperation.isRegisterOutParameterOperation
public static boolean isRegisterOutParameterOperation(ParameterSetOperation operation) { String methodName = operation.getMethod().getName(); return StatementMethodNames.PARAMETER_METHOD_REGISTER_OUT_PARAMETER.equals(methodName); }
java
public static boolean isRegisterOutParameterOperation(ParameterSetOperation operation) { String methodName = operation.getMethod().getName(); return StatementMethodNames.PARAMETER_METHOD_REGISTER_OUT_PARAMETER.equals(methodName); }
[ "public", "static", "boolean", "isRegisterOutParameterOperation", "(", "ParameterSetOperation", "operation", ")", "{", "String", "methodName", "=", "operation", ".", "getMethod", "(", ")", ".", "getName", "(", ")", ";", "return", "StatementMethodNames", ".", "PARAME...
Check the given operation is {@link java.sql.CallableStatement#registerOutParameter} method by method name. @param operation a parameter set operation @return true if it is a {@code registerOutParameter} operation @since 1.4
[ "Check", "the", "given", "operation", "is", "{", "@link", "java", ".", "sql", ".", "CallableStatement#registerOutParameter", "}", "method", "by", "method", "name", "." ]
62163ccf9a569a99aa3ad9f9151a32567447a62e
https://github.com/ttddyy/datasource-proxy/blob/62163ccf9a569a99aa3ad9f9151a32567447a62e/src/main/java/net/ttddyy/dsproxy/proxy/ParameterSetOperation.java#L21-L24
train
Checks if the given parameter set operation is a register out parameter operation.
Create a Java method that does the following: "Checks if the given parameter set operation is a register out parameter operation.".
Of course, here is the Java code you requested: ```java public static boolean isRegisterOutParameterOperation(ParameterSetOperation operation) { String methodName = operation.getMethod().getName(); return StatementMethodNames.PARAMETER_METHOD_REGISTER_OUT_PARAMETER.equals(methodName); } ``` Hope t...
voldemort/voldemort
src/java/voldemort/tools/ReadOnlyReplicationHelperCLI.java
ReadOnlyReplicationHelperCLI.parseAndCompare
private static List<String> parseAndCompare(List<String> fileNames, int masterPartitionId) { List<String> sourceFileNames = new ArrayList<String>(); for(String fileName: fileNames) { String[] partitionIdReplicaChunk = fileName.split(SPLIT_LITERAL); if(Integer.parseInt(partitionId...
java
private static List<String> parseAndCompare(List<String> fileNames, int masterPartitionId) { List<String> sourceFileNames = new ArrayList<String>(); for(String fileName: fileNames) { String[] partitionIdReplicaChunk = fileName.split(SPLIT_LITERAL); if(Integer.parseInt(partitionId...
[ "private", "static", "List", "<", "String", ">", "parseAndCompare", "(", "List", "<", "String", ">", "fileNames", ",", "int", "masterPartitionId", ")", "{", "List", "<", "String", ">", "sourceFileNames", "=", "new", "ArrayList", "<", "String", ">", "(", ")...
This method take a list of fileName of the type partitionId_Replica_Chunk and returns file names that match the regular expression masterPartitionId_
[ "This", "method", "take", "a", "list", "of", "fileName", "of", "the", "type", "partitionId_Replica_Chunk", "and", "returns", "file", "names", "that", "match", "the", "regular", "expression", "masterPartitionId_" ]
a7dbdea58032021361680faacf2782cf981c5332
https://github.com/voldemort/voldemort/blob/a7dbdea58032021361680faacf2782cf981c5332/src/java/voldemort/tools/ReadOnlyReplicationHelperCLI.java#L151-L160
train
Parse and compare file names.
Create a Java method that does the following: "Parse and compare file names.".
Of course, here is the Java code you requested: ```java private static List<String> parseAndCompare(List<String> fileNames, int masterPartitionId) { List<String> sourceFileNames = new ArrayList<String>(); for(String fileName: fileNames) { String[] partitionIdReplicaChunk = fileName.split(SP...
treelogic-swe/aws-mock
src/main/java/com/tlswe/awsmock/ec2/control/MockEC2QueryHandler.java
MockEC2QueryHandler.describeVpcs
private DescribeVpcsResponseType describeVpcs() { DescribeVpcsResponseType ret = new DescribeVpcsResponseType(); ret.setRequestId(UUID.randomUUID().toString()); VpcSetType vpcSet = new VpcSetType(); for (Iterator<MockVpc> mockVpc = mockVpcController.describeVpcs().iterator(); mockVpc ...
java
private DescribeVpcsResponseType describeVpcs() { DescribeVpcsResponseType ret = new DescribeVpcsResponseType(); ret.setRequestId(UUID.randomUUID().toString()); VpcSetType vpcSet = new VpcSetType(); for (Iterator<MockVpc> mockVpc = mockVpcController.describeVpcs().iterator(); mockVpc ...
[ "private", "DescribeVpcsResponseType", "describeVpcs", "(", ")", "{", "DescribeVpcsResponseType", "ret", "=", "new", "DescribeVpcsResponseType", "(", ")", ";", "ret", ".", "setRequestId", "(", "UUID", ".", "randomUUID", "(", ")", ".", "toString", "(", ")", ")", ...
Handles "describeVpcs" request and returns response with a vpc. @return a DescribeVpcsResponseType with our predefined vpc in aws-mock.properties (or if not overridden, as defined in aws-mock-default.properties)
[ "Handles", "describeVpcs", "request", "and", "returns", "response", "with", "a", "vpc", "." ]
1d1058c0ebbd0615efa28695481e36ae3ffc58a0
https://github.com/treelogic-swe/aws-mock/blob/1d1058c0ebbd0615efa28695481e36ae3ffc58a0/src/main/java/com/tlswe/awsmock/ec2/control/MockEC2QueryHandler.java#L1888-L1912
train
Method to describe Vpcs.
Create a Java method that does the following: "Method to describe Vpcs.".
Of course, here is the Java code you requested: ```java private DescribeVpcsResponseType describeVpcs() { DescribeVpcsResponseType ret = new DescribeVpcsResponseType(); ret.setRequestId(UUID.randomUUID().toString()); VpcSetType vpcSet = new VpcSetType(); for (Iterator<MockVpc> mockVpc =...
DreaminginCodeZH/MaterialProgressBar
library/src/main/java/me/zhanghai/android/materialprogressbar/internal/ObjectAnimatorCompat.java
ObjectAnimatorCompat.ofArgb
@NonNull public static <T> ObjectAnimator ofArgb(@Nullable T target, @NonNull Property<T, Integer> property, int... values) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { return ObjectAnimatorCompatLollipop.ofArgb(target, property, valu...
java
@NonNull public static <T> ObjectAnimator ofArgb(@Nullable T target, @NonNull Property<T, Integer> property, int... values) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { return ObjectAnimatorCompatLollipop.ofArgb(target, property, valu...
[ "@", "NonNull", "public", "static", "<", "T", ">", "ObjectAnimator", "ofArgb", "(", "@", "Nullable", "T", "target", ",", "@", "NonNull", "Property", "<", "T", ",", "Integer", ">", "property", ",", "int", "...", "values", ")", "{", "if", "(", "Build", ...
Constructs and returns an ObjectAnimator that animates between color values. A single value implies that that value is the one being animated to. Two values imply starting and ending values. More than two values imply a starting value, values to animate through along the way, and an ending value (these values will be d...
[ "Constructs", "and", "returns", "an", "ObjectAnimator", "that", "animates", "between", "color", "values", ".", "A", "single", "value", "implies", "that", "that", "value", "is", "the", "one", "being", "animated", "to", ".", "Two", "values", "imply", "starting",...
7450ac880c8c9edf5d836cc0470fca01592d093e
https://github.com/DreaminginCodeZH/MaterialProgressBar/blob/7450ac880c8c9edf5d836cc0470fca01592d093e/library/src/main/java/me/zhanghai/android/materialprogressbar/internal/ObjectAnimatorCompat.java#L60-L68
train
Create an ObjectAnimator for an argument sequence of an object.
Create a Java method that does the following: "Create an ObjectAnimator for an argument sequence of an object.".
Of course, here is the Java code you requested: ```java @NonNull public static <T> ObjectAnimator ofArgb(@Nullable T target, @NonNull Property<T, Integer> property, int... values) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { return O...
hankcs/HanLP
src/main/java/com/hankcs/hanlp/utility/ByteUtil.java
ByteUtil.bytesToInt
public static int bytesToInt(byte[] b) { int i = (b[0] << 24) & 0xFF000000; i |= (b[1] << 16) & 0xFF0000; i |= (b[2] << 8) & 0xFF00; i |= b[3] & 0xFF; return i; }
java
public static int bytesToInt(byte[] b) { int i = (b[0] << 24) & 0xFF000000; i |= (b[1] << 16) & 0xFF0000; i |= (b[2] << 8) & 0xFF00; i |= b[3] & 0xFF; return i; }
[ "public", "static", "int", "bytesToInt", "(", "byte", "[", "]", "b", ")", "{", "int", "i", "=", "(", "b", "[", "0", "]", "<<", "24", ")", "&", "0xFF000000", ";", "i", "|=", "(", "b", "[", "1", "]", "<<", "16", ")", "&", "0xFF0000", ";", "i"...
将一个4位字节数组转换为4整数。<br> 注意,函数中不会对字节数组长度进行判断,请自行保证传入参数的正确性。 @param b 字节数组 @return 整数
[ "将一个4位字节数组转换为4整数。<br", ">", "注意,函数中不会对字节数组长度进行判断,请自行保证传入参数的正确性。" ]
a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce
https://github.com/hankcs/HanLP/blob/a538d0722ab2e4980a9dcd9ea40324fc3ddba7ce/src/main/java/com/hankcs/hanlp/utility/ByteUtil.java#L100-L107
train
Convert a byte array to an int.
Create a Java method that does the following: "Convert a byte array to an int.".
Of course, here is the Java code you requested: ```java public static int bytesToInt(byte[] b) { int i = (b[0] << 24) & 0xFF000000; i |= (b[1] << 16) & 0xFF0000; i |= (b[2] << 8) & 0xFF00; i |= b[3] & 0xFF; return i; } ``` Hope this helps!
Azure/azure-sdk-for-java
hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ExtensionsInner.java
ExtensionsInner.beginEnableMonitoring
public void beginEnableMonitoring(String resourceGroupName, String clusterName, ClusterMonitoringRequest parameters) { beginEnableMonitoringWithServiceResponseAsync(resourceGroupName, clusterName, parameters).toBlocking().single().body(); }
java
public void beginEnableMonitoring(String resourceGroupName, String clusterName, ClusterMonitoringRequest parameters) { beginEnableMonitoringWithServiceResponseAsync(resourceGroupName, clusterName, parameters).toBlocking().single().body(); }
[ "public", "void", "beginEnableMonitoring", "(", "String", "resourceGroupName", ",", "String", "clusterName", ",", "ClusterMonitoringRequest", "parameters", ")", "{", "beginEnableMonitoringWithServiceResponseAsync", "(", "resourceGroupName", ",", "clusterName", ",", "parameter...
Enables the Operations Management Suite (OMS) on the HDInsight cluster. @param resourceGroupName The name of the resource group. @param clusterName The name of the cluster. @param parameters The Operations Management Suite (OMS) workspace parameters. @throws IllegalArgumentException thrown if parameters fail the valid...
[ "Enables", "the", "Operations", "Management", "Suite", "(", "OMS", ")", "on", "the", "HDInsight", "cluster", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/hdinsight/resource-manager/v2018_06_01_preview/src/main/java/com/microsoft/azure/management/hdinsight/v2018_06_01_preview/implementation/ExtensionsInner.java#L187-L189
train
Enables monitoring of the cluster.
Create a Java method that does the following: "Enables monitoring of the cluster.".
Of course, here is the Java code you requested: ```java public void beginEnableMonitoring(String resourceGroupName, String clusterName, ClusterMonitoringRequest parameters) { beginEnableMonitoringWithServiceResponseAsync(resourceGroupName, clusterName, parameters).toBlocking().single().body(); } ``` Hope ...
OpenLiberty/open-liberty
dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/DestinationManager.java
DeletePubSubMsgsThread.stopThread
@Override public void stopThread(StoppableThreadCache cache) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "stopThread"); this.hasToStop = true; //Remove this thread from the thread cache cache.deregisterThread(this); if (Tr...
java
@Override public void stopThread(StoppableThreadCache cache) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "stopThread"); this.hasToStop = true; //Remove this thread from the thread cache cache.deregisterThread(this); if (Tr...
[ "@", "Override", "public", "void", "stopThread", "(", "StoppableThreadCache", "cache", ")", "{", "if", "(", "TraceComponent", ".", "isAnyTracingEnabled", "(", ")", "&&", "tc", ".", "isEntryEnabled", "(", ")", ")", "SibTr", ".", "entry", "(", "tc", ",", "\"...
This get called from MessageProcessor on ME getting stopped.
[ "This", "get", "called", "from", "MessageProcessor", "on", "ME", "getting", "stopped", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.messaging.runtime/src/com/ibm/ws/sib/processor/impl/DestinationManager.java#L7520-L7532
train
Stop this thread.
Create a Java method that does the following: "Stop this thread.".
Of course, here is the Java code you requested: ```java @Override public void stopThread(StoppableThreadCache cache) { if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) SibTr.entry(tc, "stopThread"); this.hasToStop = true; //Remove this thread from the thread ca...
sharneng/gm4java
src/main/java/org/gm4java/im4java/GMOperation.java
GMOperation.quality
public GMOperation quality(double quality) { final List<String> args = getCmdArgs(); args.add("-quality"); args.add(Double.toString(quality)); return this; }
java
public GMOperation quality(double quality) { final List<String> args = getCmdArgs(); args.add("-quality"); args.add(Double.toString(quality)); return this; }
[ "public", "GMOperation", "quality", "(", "double", "quality", ")", "{", "final", "List", "<", "String", ">", "args", "=", "getCmdArgs", "(", ")", ";", "args", ".", "add", "(", "\"-quality\"", ")", ";", "args", ".", "add", "(", "Double", ".", "toString"...
Add option -quality to the GraphicsMagick commandline (see the documentation of GraphicsMagick for details). @param quality the quality of the image from 0 - 100 @return Builder object for chained options setup
[ "Add", "option", "-", "quality", "to", "the", "GraphicsMagick", "commandline", "(", "see", "the", "documentation", "of", "GraphicsMagick", "for", "details", ")", "." ]
92f3f3b64a45f312ef6978f2367263ec64ff0c04
https://github.com/sharneng/gm4java/blob/92f3f3b64a45f312ef6978f2367263ec64ff0c04/src/main/java/org/gm4java/im4java/GMOperation.java#L380-L385
test
Sets the quality attribute for the resultset.
Create a Java method that does the following: "Sets the quality attribute for the resultset.".
Of course, here is the Java code you requested: ```java public GMOperation quality(double quality) { final List<String> args = getCmdArgs(); args.add("-quality"); args.add(Double.toString(quality)); return this; } ``` Hope this helps!
DependencyWatcher/agent
src/main/java/com/dependencywatcher/collector/DataArchiver.java
DataArchiver.collect
public void collect(Path file) throws IOException { Path targetPath = tempDir.resolve(projectRoot.relativize(file)); Files.createDirectories(targetPath.getParent()); Files.copy(file, targetPath); }
java
public void collect(Path file) throws IOException { Path targetPath = tempDir.resolve(projectRoot.relativize(file)); Files.createDirectories(targetPath.getParent()); Files.copy(file, targetPath); }
[ "public", "void", "collect", "(", "Path", "file", ")", "throws", "IOException", "{", "Path", "targetPath", "=", "tempDir", ".", "resolve", "(", "projectRoot", ".", "relativize", "(", "file", ")", ")", ";", "Files", ".", "createDirectories", "(", "targetPath"...
Add the given file to the data archive @param file File to add @throws IOException
[ "Add", "the", "given", "file", "to", "the", "data", "archive" ]
6a082650275f9555993f5607d1f0bbe7aceceee1
https://github.com/DependencyWatcher/agent/blob/6a082650275f9555993f5607d1f0bbe7aceceee1/src/main/java/com/dependencywatcher/collector/DataArchiver.java#L42-L46
train
Collect the contents of a file into the temp directory.
Create a Java method that does the following: "Collect the contents of a file into the temp directory.".
Of course, here is the Java code you requested: ```java public void collect(Path file) throws IOException { Path targetPath = tempDir.resolve(projectRoot.relativize(file)); Files.createDirectories(targetPath.getParent()); Files.copy(file, targetPath); } ``` Hope this helps!
aws/aws-sdk-java
aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/utils/ValueMap.java
ValueMap.with
public ValueMap with(String key, Object val) { if (val == this) throw new IllegalArgumentException("Self reference is not allowed"); // TODO: fail fast if val is not a supported type super.put(key, val); return this; }
java
public ValueMap with(String key, Object val) { if (val == this) throw new IllegalArgumentException("Self reference is not allowed"); // TODO: fail fast if val is not a supported type super.put(key, val); return this; }
[ "public", "ValueMap", "with", "(", "String", "key", ",", "Object", "val", ")", "{", "if", "(", "val", "==", "this", ")", "throw", "new", "IllegalArgumentException", "(", "\"Self reference is not allowed\"", ")", ";", "// TODO: fail fast if val is not a supported type"...
Sets the value of the specified key to the given value. A value can be a <ul> <li>Number</li> <li>String</li> <li>binary (ie byte array or byte buffer)</li> <li>boolean</li> <li>null</li> <li>list (of any of the types on this list)</li> <li>map (with string key to value of any of the types on this list)</li> <li>set (o...
[ "Sets", "the", "value", "of", "the", "specified", "key", "to", "the", "given", "value", ".", "A", "value", "can", "be", "a", "<ul", ">", "<li", ">", "Number<", "/", "li", ">", "<li", ">", "String<", "/", "li", ">", "<li", ">", "binary", "(", "ie"...
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-dynamodb/src/main/java/com/amazonaws/services/dynamodbv2/document/utils/ValueMap.java#L222-L228
train
Add a value to the value map.
Create a Java method that does the following: "Add a value to the value map.".
Of course, here is the Java code you requested: ```java public ValueMap with(String key, Object val) { if (val == this) throw new IllegalArgumentException("Self reference is not allowed"); // TODO: fail fast if val is not a supported type super.put(key, val); return this; ...
fuinorg/utils4j
src/main/java/org/fuin/utils4j/Utils4J.java
Utils4J.createHash
public static String createHash(final InputStream inputStream, final String algorithm) { checkNotNull("inputStream", inputStream); checkNotNull("algorithm", algorithm); try { final MessageDigest messageDigest = MessageDigest.getInstance(algorithm); try (final Buffere...
java
public static String createHash(final InputStream inputStream, final String algorithm) { checkNotNull("inputStream", inputStream); checkNotNull("algorithm", algorithm); try { final MessageDigest messageDigest = MessageDigest.getInstance(algorithm); try (final Buffere...
[ "public", "static", "String", "createHash", "(", "final", "InputStream", "inputStream", ",", "final", "String", "algorithm", ")", "{", "checkNotNull", "(", "\"inputStream\"", ",", "inputStream", ")", ";", "checkNotNull", "(", "\"algorithm\"", ",", "algorithm", ")"...
Creates a HEX encoded hash from a stream. @param inputStream Stream to create a hash for - Cannot be <code>null</code>. @param algorithm Hash algorithm like "MD5" or "SHA" - Cannot be <code>null</code>. @return HEX encoded hash.
[ "Creates", "a", "HEX", "encoded", "hash", "from", "a", "stream", "." ]
71cf88e0a8d8ed67bbac513bf3cab165cd7e3280
https://github.com/fuinorg/utils4j/blob/71cf88e0a8d8ed67bbac513bf3cab165cd7e3280/src/main/java/org/fuin/utils4j/Utils4J.java#L346-L362
train
Creates a hash from an input stream and an algorithm.
Create a Java method that does the following: "Creates a hash from an input stream and an algorithm.".
Of course, here is the Java code you requested: ```java public static String createHash(final InputStream inputStream, final String algorithm) { checkNotNull("inputStream", inputStream); checkNotNull("algorithm", algorithm); try { final MessageDigest messageDigest = MessageDiges...
guardtime/ksi-java-sdk
ksi-common/src/main/java/com/guardtime/ksi/tlv/TLVElement.java
TLVElement.getContent
public byte[] getContent() throws TLVParserException { byte[] content = this.content; if (!children.isEmpty()) { for (TLVElement child : children) { content = Util.join(content, child.encodeHeader()); content = Util.join(content, child.getContent()); ...
java
public byte[] getContent() throws TLVParserException { byte[] content = this.content; if (!children.isEmpty()) { for (TLVElement child : children) { content = Util.join(content, child.encodeHeader()); content = Util.join(content, child.getContent()); ...
[ "public", "byte", "[", "]", "getContent", "(", ")", "throws", "TLVParserException", "{", "byte", "[", "]", "content", "=", "this", ".", "content", ";", "if", "(", "!", "children", ".", "isEmpty", "(", ")", ")", "{", "for", "(", "TLVElement", "child", ...
Returns the TLV content. If TLV does not include content then empty array is returned. @return Byte array including TLV element content. @throws TLVParserException
[ "Returns", "the", "TLV", "content", ".", "If", "TLV", "does", "not", "include", "content", "then", "empty", "array", "is", "returned", "." ]
b2cd877050f0f392657c724452318d10a1002171
https://github.com/guardtime/ksi-java-sdk/blob/b2cd877050f0f392657c724452318d10a1002171/ksi-common/src/main/java/com/guardtime/ksi/tlv/TLVElement.java#L319-L328
train
Get the content of this tag.
Create a Java method that does the following: "Get the content of this tag.".
Of course, here is the Java code you requested: ```java public byte[] getContent() throws TLVParserException { byte[] content = this.content; if (!children.isEmpty()) { for (TLVElement child : children) { content = Util.join(content, child.encodeHeader()); co...
yan74/afplib
org.afplib/src/main/java/org/afplib/afplib/impl/TilePositionImpl.java
TilePositionImpl.eGet
@Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case AfplibPackage.TILE_POSITION__XOFFSET: return getXOFFSET(); case AfplibPackage.TILE_POSITION__YOFFSET: return getYOFFSET(); } return super.eGet(featureID, resolve, coreType); }
java
@Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case AfplibPackage.TILE_POSITION__XOFFSET: return getXOFFSET(); case AfplibPackage.TILE_POSITION__YOFFSET: return getYOFFSET(); } return super.eGet(featureID, resolve, coreType); }
[ "@", "Override", "public", "Object", "eGet", "(", "int", "featureID", ",", "boolean", "resolve", ",", "boolean", "coreType", ")", "{", "switch", "(", "featureID", ")", "{", "case", "AfplibPackage", ".", "TILE_POSITION__XOFFSET", ":", "return", "getXOFFSET", "(...
<!-- begin-user-doc --> <!-- end-user-doc --> @generated
[ "<!", "--", "begin", "-", "user", "-", "doc", "--", ">", "<!", "--", "end", "-", "user", "-", "doc", "--", ">" ]
9ff0513f9448bdf8c0b0e31dc4910c094c48fb2f
https://github.com/yan74/afplib/blob/9ff0513f9448bdf8c0b0e31dc4910c094c48fb2f/org.afplib/src/main/java/org/afplib/afplib/impl/TilePositionImpl.java#L137-L146
train
Override eGet to return the value of the featureID.
Create a Java method that does the following: "Override eGet to return the value of the featureID.".
Of course, here is the Java code you requested: ```java @Override public Object eGet(int featureID, boolean resolve, boolean coreType) { switch (featureID) { case AfplibPackage.TILE_POSITION__XOFFSET: return getXOFFSET(); case AfplibPackage.TILE_POSITION__YOFFSET: return getYOFFSET(); } return sup...
strator-dev/greenpepper
greenpepper/greenpepper-server/src/main/java/com/greenpepper/server/domain/dao/hibernate/HibernateDocumentDao.java
HibernateDocumentDao.removeRequirement
public void removeRequirement(Requirement requirement) throws GreenPepperServerException { requirement = getRequirementByName(requirement.getRepository().getUid(), requirement.getName()); if(requirement != null) { requirement.getRepository().removeRequirement(requirement); ...
java
public void removeRequirement(Requirement requirement) throws GreenPepperServerException { requirement = getRequirementByName(requirement.getRepository().getUid(), requirement.getName()); if(requirement != null) { requirement.getRepository().removeRequirement(requirement); ...
[ "public", "void", "removeRequirement", "(", "Requirement", "requirement", ")", "throws", "GreenPepperServerException", "{", "requirement", "=", "getRequirementByName", "(", "requirement", ".", "getRepository", "(", ")", ".", "getUid", "(", ")", ",", "requirement", "...
{@inheritDoc}
[ "{" ]
2a61e6c179b74085babcc559d677490b0cad2d30
https://github.com/strator-dev/greenpepper/blob/2a61e6c179b74085babcc559d677490b0cad2d30/greenpepper/greenpepper-server/src/main/java/com/greenpepper/server/domain/dao/hibernate/HibernateDocumentDao.java#L105-L113
train
Remove a requirement from the repository.
Create a Java method that does the following: "Remove a requirement from the repository.".
Of course, here is the Java code you requested: ```java public void removeRequirement(Requirement requirement) throws GreenPepperServerException { requirement = getRequirementByName(requirement.getRepository().getUid(), requirement.getName()); if(requirement != null) { requirem...
kiegroup/drools
drools-compiler/src/main/java/org/drools/compiler/lang/DRL5Expressions.java
DRL5Expressions.synpred36_DRL5Expressions_fragment
public final void synpred36_DRL5Expressions_fragment() throws RecognitionException { // src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:652:9: ( DOT super_key ) // src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:652:10: DOT super_key { match(input,DOT,FOLLOW_DOT_in_synpred36_DRL5Expr...
java
public final void synpred36_DRL5Expressions_fragment() throws RecognitionException { // src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:652:9: ( DOT super_key ) // src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:652:10: DOT super_key { match(input,DOT,FOLLOW_DOT_in_synpred36_DRL5Expr...
[ "public", "final", "void", "synpred36_DRL5Expressions_fragment", "(", ")", "throws", "RecognitionException", "{", "// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:652:9: ( DOT super_key )", "// src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:652:10: DOT super_key",...
$ANTLR start synpred36_DRL5Expressions
[ "$ANTLR", "start", "synpred36_DRL5Expressions" ]
22b0275d6dbe93070b8090948502cf46eda543c4
https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-compiler/src/main/java/org/drools/compiler/lang/DRL5Expressions.java#L7090-L7101
train
start synpred36_DRL5Expressions
Create a Java method that does the following: "start synpred36_DRL5Expressions".
Of course, here is the Java code you requested: ```java public final void synpred36_DRL5Expressions_fragment() throws RecognitionException { // src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:652:9: ( DOT super_key ) // src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:652:10: DOT super_k...
BorderTech/wcomponents
wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/WAbbrTextExample.java
WAbbrTextExample.preparePaintComponent
@Override protected void preparePaintComponent(final Request request) { super.preparePaintComponent(request); if (!isInitialised()) { LookupTable lookup = Factory.newInstance(LookupTable.class); for (Object entry : lookup.getTable("sex")) { WAbbrText abbr = new WAbbrText(); abbr.setTextWithDesc(ent...
java
@Override protected void preparePaintComponent(final Request request) { super.preparePaintComponent(request); if (!isInitialised()) { LookupTable lookup = Factory.newInstance(LookupTable.class); for (Object entry : lookup.getTable("sex")) { WAbbrText abbr = new WAbbrText(); abbr.setTextWithDesc(ent...
[ "@", "Override", "protected", "void", "preparePaintComponent", "(", "final", "Request", "request", ")", "{", "super", ".", "preparePaintComponent", "(", "request", ")", ";", "if", "(", "!", "isInitialised", "(", ")", ")", "{", "LookupTable", "lookup", "=", "...
{@inheritDoc}
[ "{" ]
d1a2b2243270067db030feb36ca74255aaa94436
https://github.com/BorderTech/wcomponents/blob/d1a2b2243270067db030feb36ca74255aaa94436/wcomponents-examples/src/main/java/com/github/bordertech/wcomponents/examples/WAbbrTextExample.java#L68-L89
train
Override preparePaintComponent to add the appropriate WAbbrText objects to the appropriate panel.
Create a Java method that does the following: "Override preparePaintComponent to add the appropriate WAbbrText objects to the appropriate panel.".
Of course, here is the Java code you requested: ```java @Override protected void preparePaintComponent(final Request request) { super.preparePaintComponent(request); if (!isInitialised()) { LookupTable lookup = Factory.newInstance(LookupTable.class); for (Object entry : lookup.getTable("sex")) { WAbbr...
Azure/azure-sdk-for-java
network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/BgpServiceCommunitiesInner.java
BgpServiceCommunitiesInner.listAsync
public Observable<Page<BgpServiceCommunityInner>> listAsync() { return listWithServiceResponseAsync() .map(new Func1<ServiceResponse<Page<BgpServiceCommunityInner>>, Page<BgpServiceCommunityInner>>() { @Override public Page<BgpServiceCommunityInner> call(ServiceRespon...
java
public Observable<Page<BgpServiceCommunityInner>> listAsync() { return listWithServiceResponseAsync() .map(new Func1<ServiceResponse<Page<BgpServiceCommunityInner>>, Page<BgpServiceCommunityInner>>() { @Override public Page<BgpServiceCommunityInner> call(ServiceRespon...
[ "public", "Observable", "<", "Page", "<", "BgpServiceCommunityInner", ">", ">", "listAsync", "(", ")", "{", "return", "listWithServiceResponseAsync", "(", ")", ".", "map", "(", "new", "Func1", "<", "ServiceResponse", "<", "Page", "<", "BgpServiceCommunityInner", ...
Gets all the available bgp service communities. @throws IllegalArgumentException thrown if parameters fail the validation @return the observable to the PagedList&lt;BgpServiceCommunityInner&gt; object
[ "Gets", "all", "the", "available", "bgp", "service", "communities", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_07_01/src/main/java/com/microsoft/azure/management/network/v2018_07_01/implementation/BgpServiceCommunitiesInner.java#L112-L120
train
List all the RAID Communities.
Create a Java method that does the following: "List all the RAID Communities.".
Of course, here is the Java code you requested: ```java public Observable<Page<BgpServiceCommunityInner>> listAsync() { return listWithServiceResponseAsync() .map(new Func1<ServiceResponse<Page<BgpServiceCommunityInner>>, Page<BgpServiceCommunityInner>>() { @Override ...
apache/incubator-druid
extendedset/src/main/java/org/apache/druid/extendedset/intset/ConciseSet.java
ConciseSet.replaceWith
private boolean replaceWith(ConciseSet other) { if (this == other) { return false; } boolean isSimilar = (this.lastWordIndex == other.lastWordIndex) && (this.last == other.last); for (int i = 0; isSimilar && (i <= lastWordIndex); i++) { isSimilar = this.wo...
java
private boolean replaceWith(ConciseSet other) { if (this == other) { return false; } boolean isSimilar = (this.lastWordIndex == other.lastWordIndex) && (this.last == other.last); for (int i = 0; isSimilar && (i <= lastWordIndex); i++) { isSimilar = this.wo...
[ "private", "boolean", "replaceWith", "(", "ConciseSet", "other", ")", "{", "if", "(", "this", "==", "other", ")", "{", "return", "false", ";", "}", "boolean", "isSimilar", "=", "(", "this", ".", "lastWordIndex", "==", "other", ".", "lastWordIndex", ")", ...
Replace the current instance with another {@link ConciseSet} instance. It also returns <code>true</code> if the given set is actually different from the current one @param other {@link ConciseSet} instance to use to replace the current one @return <code>true</code> if the given set is different from the current set
[ "Replace", "the", "current", "instance", "with", "another", "{", "@link", "ConciseSet", "}", "instance", ".", "It", "also", "returns", "<code", ">", "true<", "/", "code", ">", "if", "the", "given", "set", "is", "actually", "different", "from", "the", "curr...
f776b9408962b9006cfcfe4d6c1794751972cc8e
https://github.com/apache/incubator-druid/blob/f776b9408962b9006cfcfe4d6c1794751972cc8e/extendedset/src/main/java/org/apache/druid/extendedset/intset/ConciseSet.java#L872-L896
train
Replaces the contents of this ConciseSet with the contents of the other ConciseSet.
Create a Java method that does the following: "Replaces the contents of this ConciseSet with the contents of the other ConciseSet.".
Of course, here is the Java code you requested: ```java private boolean replaceWith(ConciseSet other) { if (this == other) { return false; } boolean isSimilar = (this.lastWordIndex == other.lastWordIndex) && (this.last == other.last); for (int i = 0; isSimilar &...
aws/aws-sdk-java
aws-java-sdk-glacier/src/main/java/com/amazonaws/services/glacier/model/DataRetrievalPolicy.java
DataRetrievalPolicy.withRules
public DataRetrievalPolicy withRules(DataRetrievalRule... rules) { if (this.rules == null) { setRules(new java.util.ArrayList<DataRetrievalRule>(rules.length)); } for (DataRetrievalRule ele : rules) { this.rules.add(ele); } return this; }
java
public DataRetrievalPolicy withRules(DataRetrievalRule... rules) { if (this.rules == null) { setRules(new java.util.ArrayList<DataRetrievalRule>(rules.length)); } for (DataRetrievalRule ele : rules) { this.rules.add(ele); } return this; }
[ "public", "DataRetrievalPolicy", "withRules", "(", "DataRetrievalRule", "...", "rules", ")", "{", "if", "(", "this", ".", "rules", "==", "null", ")", "{", "setRules", "(", "new", "java", ".", "util", ".", "ArrayList", "<", "DataRetrievalRule", ">", "(", "r...
<p> The policy rule. Although this is a list type, currently there must be only one rule, which contains a Strategy field and optionally a BytesPerHour field. </p> <p> <b>NOTE:</b> This method appends the values to the existing list (if any). Use {@link #setRules(java.util.Collection)} or {@link #withRules(java.util.Co...
[ "<p", ">", "The", "policy", "rule", ".", "Although", "this", "is", "a", "list", "type", "currently", "there", "must", "be", "only", "one", "rule", "which", "contains", "a", "Strategy", "field", "and", "optionally", "a", "BytesPerHour", "field", ".", "<", ...
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-glacier/src/main/java/com/amazonaws/services/glacier/model/DataRetrievalPolicy.java#L87-L95
train
A list of data retrieval rules.
Create a Java method that does the following: "A list of data retrieval rules.".
Of course, here is the Java code you requested: ```java public DataRetrievalPolicy withRules(DataRetrievalRule... rules) { if (this.rules == null) { setRules(new java.util.ArrayList<DataRetrievalRule>(rules.length)); } for (DataRetrievalRule ele : rules) { this.rules.add...
nextreports/nextreports-engine
src/ro/nextreports/engine/chart/JFreeChartExporter.java
JFreeChartExporter.addValue
private void addValue(Object chartSerie, Number x, String lastXValue, Number y, HashMap<String, String> formatValues, int chartsNo) { if (chart.getType().isLine()) { ((XYSeries)chartSerie).add(x, y); } else if (isLineCombo) { lineBarDataset.addValue(y, (String)chartSerie, lastXValue); } else if...
java
private void addValue(Object chartSerie, Number x, String lastXValue, Number y, HashMap<String, String> formatValues, int chartsNo) { if (chart.getType().isLine()) { ((XYSeries)chartSerie).add(x, y); } else if (isLineCombo) { lineBarDataset.addValue(y, (String)chartSerie, lastXValue); } else if...
[ "private", "void", "addValue", "(", "Object", "chartSerie", ",", "Number", "x", ",", "String", "lastXValue", ",", "Number", "y", ",", "HashMap", "<", "String", ",", "String", ">", "formatValues", ",", "int", "chartsNo", ")", "{", "if", "(", "chart", ".",...
take care if no function is set : every value is in a differnet category (we use an incremental integer : serie)
[ "take", "care", "if", "no", "function", "is", "set", ":", "every", "value", "is", "in", "a", "differnet", "category", "(", "we", "use", "an", "incremental", "integer", ":", "serie", ")" ]
a847575a9298b5fce63b88961190c5b83ddccc44
https://github.com/nextreports/nextreports-engine/blob/a847575a9298b5fce63b88961190c5b83ddccc44/src/ro/nextreports/engine/chart/JFreeChartExporter.java#L1231-L1271
train
Add a value to the data set
Create a Java method that does the following: "Add a value to the data set".
Of course, here is the Java code you requested: ```java private void addValue(Object chartSerie, Number x, String lastXValue, Number y, HashMap<String, String> formatValues, int chartsNo) { if (chart.getType().isLine()) { ((XYSeries)chartSerie).add(x, y); } else if (isLineCombo) { lineBarDataset...
aws/aws-sdk-java
aws-java-sdk-cloudfront/src/main/java/com/amazonaws/services/cloudfront/AmazonCloudFrontClient.java
AmazonCloudFrontClient.deletePublicKey
@Override public DeletePublicKeyResult deletePublicKey(DeletePublicKeyRequest request) { request = beforeClientExecution(request); return executeDeletePublicKey(request); }
java
@Override public DeletePublicKeyResult deletePublicKey(DeletePublicKeyRequest request) { request = beforeClientExecution(request); return executeDeletePublicKey(request); }
[ "@", "Override", "public", "DeletePublicKeyResult", "deletePublicKey", "(", "DeletePublicKeyRequest", "request", ")", "{", "request", "=", "beforeClientExecution", "(", "request", ")", ";", "return", "executeDeletePublicKey", "(", "request", ")", ";", "}" ]
<p> Remove a public key you previously added to CloudFront. </p> @param deletePublicKeyRequest @return Result of the DeletePublicKey operation returned by the service. @throws AccessDeniedException Access denied. @throws PublicKeyInUseException The specified public key is in use. @throws InvalidIfMatchVersionException...
[ "<p", ">", "Remove", "a", "public", "key", "you", "previously", "added", "to", "CloudFront", ".", "<", "/", "p", ">" ]
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-cloudfront/src/main/java/com/amazonaws/services/cloudfront/AmazonCloudFrontClient.java#L1505-L1509
train
Deletes an existing public key.
Create a Java method that does the following: "Deletes an existing public key.".
Of course, here is the Java code you requested: ```java @Override public DeletePublicKeyResult deletePublicKey(DeletePublicKeyRequest request) { request = beforeClientExecution(request); return executeDeletePublicKey(request); } ``` Hope this helps!
kiegroup/drools
kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/assembler/DMNAssemblerService.java
DMNAssemblerService.compilerConfigWithKModulePrefs
public static DMNCompilerConfigurationImpl compilerConfigWithKModulePrefs(ClassLoader classLoader, ChainedProperties chainedProperties, List<DMNProfile> dmnProfiles, DMNCompilerConfigurationImpl config) { config.setRootClassLoader(classLoader); Map<String, String> dmnPrefs = new HashMap<>(); c...
java
public static DMNCompilerConfigurationImpl compilerConfigWithKModulePrefs(ClassLoader classLoader, ChainedProperties chainedProperties, List<DMNProfile> dmnProfiles, DMNCompilerConfigurationImpl config) { config.setRootClassLoader(classLoader); Map<String, String> dmnPrefs = new HashMap<>(); c...
[ "public", "static", "DMNCompilerConfigurationImpl", "compilerConfigWithKModulePrefs", "(", "ClassLoader", "classLoader", ",", "ChainedProperties", "chainedProperties", ",", "List", "<", "DMNProfile", ">", "dmnProfiles", ",", "DMNCompilerConfigurationImpl", "config", ")", "{",...
Returns a DMNCompilerConfiguration with the specified properties set, and applying the explicited dmnProfiles. @param classLoader @param chainedProperties applies properties --it does not do any classloading nor profile loading based on these properites, just passes the values. @param dmnProfiles applies these DMNProfi...
[ "Returns", "a", "DMNCompilerConfiguration", "with", "the", "specified", "properties", "set", "and", "applying", "the", "explicited", "dmnProfiles", "." ]
22b0275d6dbe93070b8090948502cf46eda543c4
https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/assembler/DMNAssemblerService.java#L248-L263
train
This method is used to create a DMNCompilerConfiguration object with the given properties and the list of DMNProfiles.
Create a Java method that does the following: "This method is used to create a DMNCompilerConfiguration object with the given properties and the list of DMNProfiles.".
Of course, here is the Java code you requested: ```java public static DMNCompilerConfigurationImpl compilerConfigWithKModulePrefs(ClassLoader classLoader, ChainedProperties chainedProperties, List<DMNProfile> dmnProfiles, DMNCompilerConfigurationImpl config) { config.setRootClassLoader(classLoader); ...
CloudSlang/cs-actions
cs-amazon/src/main/java/io/cloudslang/content/amazon/services/helpers/AwsSignatureHelper.java
AwsSignatureHelper.getAmazonRegion
public String getAmazonRegion(String endpoint) { if (isBlank(endpoint)) { return DEFAULT_AMAZON_REGION; } final Pattern pattern = Pattern.compile("(https://)?(.+)?\\.(.+)\\."+AMAZON_HOSTNAME+"(\\.cn)?"); final Matcher matcher = pattern.matcher(endpoint); if (matcher.f...
java
public String getAmazonRegion(String endpoint) { if (isBlank(endpoint)) { return DEFAULT_AMAZON_REGION; } final Pattern pattern = Pattern.compile("(https://)?(.+)?\\.(.+)\\."+AMAZON_HOSTNAME+"(\\.cn)?"); final Matcher matcher = pattern.matcher(endpoint); if (matcher.f...
[ "public", "String", "getAmazonRegion", "(", "String", "endpoint", ")", "{", "if", "(", "isBlank", "(", "endpoint", ")", ")", "{", "return", "DEFAULT_AMAZON_REGION", ";", "}", "final", "Pattern", "pattern", "=", "Pattern", ".", "compile", "(", "\"(https://)?(.+...
todo does not recognize properly us-east-2.quicksight.amazonaws.com, us-west-1.queue.amazonaws.com types of hostname
[ "todo", "does", "not", "recognize", "properly", "us", "-", "east", "-", "2", ".", "quicksight", ".", "amazonaws", ".", "com", "us", "-", "west", "-", "1", ".", "queue", ".", "amazonaws", ".", "com", "types", "of", "hostname" ]
9a1be1e99ad88286a6c153d5f2275df6ae1a57a1
https://github.com/CloudSlang/cs-actions/blob/9a1be1e99ad88286a6c153d5f2275df6ae1a57a1/cs-amazon/src/main/java/io/cloudslang/content/amazon/services/helpers/AwsSignatureHelper.java#L158-L168
train
Gets the Amazon region.
Create a Java method that does the following: "Gets the Amazon region.".
Of course, here is the Java code you requested: ```java public String getAmazonRegion(String endpoint) { if (isBlank(endpoint)) { return DEFAULT_AMAZON_REGION; } final Pattern pattern = Pattern.compile("(https://)?(.+)?\\.(.+)\\."+AMAZON_HOSTNAME+"(\\.cn)?"); final Matcher m...
alkacon/opencms-core
src/org/opencms/i18n/CmsLocaleManager.java
CmsLocaleManager.getDefaultLocale
public Locale getDefaultLocale(CmsObject cms, CmsResource resource) { List<Locale> defaultLocales = getDefaultLocales(cms, resource); Locale result; if (defaultLocales.size() > 0) { result = defaultLocales.get(0); } else { result = getDefaultLocale(); } ...
java
public Locale getDefaultLocale(CmsObject cms, CmsResource resource) { List<Locale> defaultLocales = getDefaultLocales(cms, resource); Locale result; if (defaultLocales.size() > 0) { result = defaultLocales.get(0); } else { result = getDefaultLocale(); } ...
[ "public", "Locale", "getDefaultLocale", "(", "CmsObject", "cms", ",", "CmsResource", "resource", ")", "{", "List", "<", "Locale", ">", "defaultLocales", "=", "getDefaultLocales", "(", "cms", ",", "resource", ")", ";", "Locale", "result", ";", "if", "(", "def...
Returns the "the" default locale for the given resource.<p> It's possible to override the system default (see {@link #getDefaultLocale()}) by setting the property <code>{@link CmsPropertyDefinition#PROPERTY_LOCALE}</code> to a comma separated list of locale names. This property is inherited from the parent folders. Th...
[ "Returns", "the", "the", "default", "locale", "for", "the", "given", "resource", ".", "<p", ">" ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/i18n/CmsLocaleManager.java#L728-L738
train
Returns the default locale for the given resource.
Create a Java method that does the following: "Returns the default locale for the given resource.".
Of course, here is the Java code you requested: ```java public Locale getDefaultLocale(CmsObject cms, CmsResource resource) { List<Locale> defaultLocales = getDefaultLocales(cms, resource); Locale result; if (defaultLocales.size() > 0) { result = defaultLocales.get(0); } el...
marklogic/marklogic-sesame
marklogic-sesame/src/main/java/com/marklogic/semantics/sesame/query/MarkLogicQuery.java
MarkLogicQuery.setBinding
public void setBinding(String name, String stringValue) { bindingSet.addBinding(name, ValueFactoryImpl.getInstance().createURI(stringValue)); }
java
public void setBinding(String name, String stringValue) { bindingSet.addBinding(name, ValueFactoryImpl.getInstance().createURI(stringValue)); }
[ "public", "void", "setBinding", "(", "String", "name", ",", "String", "stringValue", ")", "{", "bindingSet", ".", "addBinding", "(", "name", ",", "ValueFactoryImpl", ".", "getInstance", "(", ")", ".", "createURI", "(", "stringValue", ")", ")", ";", "}" ]
set individual binding @param name @param stringValue
[ "set", "individual", "binding" ]
d5b668ed2b3d5e90c9f1d5096012813c272062a2
https://github.com/marklogic/marklogic-sesame/blob/d5b668ed2b3d5e90c9f1d5096012813c272062a2/marklogic-sesame/src/main/java/com/marklogic/semantics/sesame/query/MarkLogicQuery.java#L140-L142
train
Set a binding to a URI.
Create a Java method that does the following: "Set a binding to a URI.".
Of course, here is the Java code you requested: ```java public void setBinding(String name, String stringValue) { bindingSet.addBinding(name, ValueFactoryImpl.getInstance().createURI(stringValue)); } ``` Hope this helps!
wildfly/wildfly-core
cli/src/main/java/org/jboss/as/cli/handlers/batch/BatchRemoveLineHandler.java
BatchRemoveLineHandler.doHandle
@Override protected void doHandle(CommandContext ctx) throws CommandFormatException { BatchManager batchManager = ctx.getBatchManager(); if(!batchManager.isBatchActive()) { throw new CommandFormatException("No active batch."); } Batch batch = batchManager.getActiveBatch...
java
@Override protected void doHandle(CommandContext ctx) throws CommandFormatException { BatchManager batchManager = ctx.getBatchManager(); if(!batchManager.isBatchActive()) { throw new CommandFormatException("No active batch."); } Batch batch = batchManager.getActiveBatch...
[ "@", "Override", "protected", "void", "doHandle", "(", "CommandContext", "ctx", ")", "throws", "CommandFormatException", "{", "BatchManager", "batchManager", "=", "ctx", ".", "getBatchManager", "(", ")", ";", "if", "(", "!", "batchManager", ".", "isBatchActive", ...
/* (non-Javadoc) @see org.jboss.as.cli.handlers.CommandHandlerWithHelp#doHandle(org.jboss.as.cli.CommandContext)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
cfaf0479dcbb2d320a44c5374b93b944ec39fade
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/cli/src/main/java/org/jboss/as/cli/handlers/batch/BatchRemoveLineHandler.java#L56-L92
train
Handle the BASIC CRUD action.
Create a Java method that does the following: "Handle the BASIC CRUD action.".
Of course, here is the Java code you requested: ```java @Override protected void doHandle(CommandContext ctx) throws CommandFormatException { BatchManager batchManager = ctx.getBatchManager(); if(!batchManager.isBatchActive()) { throw new CommandFormatException("No active batch."); ...
smartsheet-platform/smartsheet-java-sdk
src/main/java/com/smartsheet/api/internal/RowColumnResourcesImpl.java
RowColumnResourcesImpl.getCellHistory
public PagedResult<CellHistory> getCellHistory(long sheetId, long rowId, long columnId, PaginationParameters pagination, EnumSet<CellHistoryInclusion> includes, Integer level) throws SmartsheetException { String path = "sheets/" + sheetId + "/rows/" + rowId + "...
java
public PagedResult<CellHistory> getCellHistory(long sheetId, long rowId, long columnId, PaginationParameters pagination, EnumSet<CellHistoryInclusion> includes, Integer level) throws SmartsheetException { String path = "sheets/" + sheetId + "/rows/" + rowId + "...
[ "public", "PagedResult", "<", "CellHistory", ">", "getCellHistory", "(", "long", "sheetId", ",", "long", "rowId", ",", "long", "columnId", ",", "PaginationParameters", "pagination", ",", "EnumSet", "<", "CellHistoryInclusion", ">", "includes", ",", "Integer", "lev...
Get the cell modification history. It mirrors to the following Smartsheet REST API method: GET /sheets/{sheetId}/rows/{rowId}/columns/{columnId}/history Exceptions: InvalidRequestException : if there is any problem with the REST API request AuthorizationException : if there is any problem with the REST API authorizat...
[ "Get", "the", "cell", "modification", "history", "." ]
f60e264412076271f83b65889ef9b891fad83df8
https://github.com/smartsheet-platform/smartsheet-java-sdk/blob/f60e264412076271f83b65889ef9b891fad83df8/src/main/java/com/smartsheet/api/internal/RowColumnResourcesImpl.java#L112-L128
train
Get a list of cell history.
Create a Java method that does the following: "Get a list of cell history.".
Of course, here is the Java code you requested: ```java public PagedResult<CellHistory> getCellHistory(long sheetId, long rowId, long columnId, PaginationParameters pagination, EnumSet<CellHistoryInclusion> includes, Integer level) throws SmartsheetException { ...
demidenko05/beigesoft-accounting
src/main/java/org/beigesoft/accounting/processor/PrcPaymentToGfr.java
PrcPaymentToGfr.process
@Override public final PaymentTo process( final Map<String, Object> pAddParam, final PaymentTo pEntity, final IRequestData pRequestData) throws Exception { PaymentTo entity = this.prcAccDocGetForReverse .process(pAddParam, pEntity, pRequestData); entity.setForeignTotal(entity.getForeig...
java
@Override public final PaymentTo process( final Map<String, Object> pAddParam, final PaymentTo pEntity, final IRequestData pRequestData) throws Exception { PaymentTo entity = this.prcAccDocGetForReverse .process(pAddParam, pEntity, pRequestData); entity.setForeignTotal(entity.getForeig...
[ "@", "Override", "public", "final", "PaymentTo", "process", "(", "final", "Map", "<", "String", ",", "Object", ">", "pAddParam", ",", "final", "PaymentTo", "pEntity", ",", "final", "IRequestData", "pRequestData", ")", "throws", "Exception", "{", "PaymentTo", "...
<p>Process entity request.</p> @param pAddParam additional param, e.g. return this line's document in "nextEntity" for farther process @param pRequestData Request Data @param pEntity Entity to process @return Entity processed for farther process or null @throws Exception - an exception
[ "<p", ">", "Process", "entity", "request", ".", "<", "/", "p", ">" ]
e6f423949008218ddd05953b078f1ea8805095c1
https://github.com/demidenko05/beigesoft-accounting/blob/e6f423949008218ddd05953b078f1ea8805095c1/src/main/java/org/beigesoft/accounting/processor/PrcPaymentToGfr.java#L50-L61
train
Process a reverse order PaymentTo object.
Create a Java method that does the following: "Process a reverse order PaymentTo object.".
Of course, here is the Java code you requested: ```java @Override public final PaymentTo process( final Map<String, Object> pAddParam, final PaymentTo pEntity, final IRequestData pRequestData) throws Exception { PaymentTo entity = this.prcAccDocGetForReverse .process(pAddParam, pEntity, p...
OpenBEL/openbel-framework
org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/PhaseOneApplication.java
PhaseOneApplication.stage6
public boolean stage6(final Document doc, final ProtoNetwork pn) { beginStage(PHASE1_STAGE6_HDR, "6", NUM_PHASES); final StringBuilder bldr = new StringBuilder(); boolean stmtSuccess = false, termSuccess = false; bldr.append("Expanding statements and terms"); stageOutput(bldr.to...
java
public boolean stage6(final Document doc, final ProtoNetwork pn) { beginStage(PHASE1_STAGE6_HDR, "6", NUM_PHASES); final StringBuilder bldr = new StringBuilder(); boolean stmtSuccess = false, termSuccess = false; bldr.append("Expanding statements and terms"); stageOutput(bldr.to...
[ "public", "boolean", "stage6", "(", "final", "Document", "doc", ",", "final", "ProtoNetwork", "pn", ")", "{", "beginStage", "(", "PHASE1_STAGE6_HDR", ",", "\"6\"", ",", "NUM_PHASES", ")", ";", "final", "StringBuilder", "bldr", "=", "new", "StringBuilder", "(",...
Stage six expansion of the document. @param doc the original {@link Document document} needed as a dependency when using {@link ProtoNetworkBuilder proto network builder} @param pn the {@link ProtoNetwork proto network} to expand into
[ "Stage", "six", "expansion", "of", "the", "document", "." ]
149f80b1d6eabb15ab15815b6f745b0afa9fd2d3
https://github.com/OpenBEL/openbel-framework/blob/149f80b1d6eabb15ab15815b6f745b0afa9fd2d3/org.openbel.framework.tools/src/main/java/org/openbel/framework/tools/PhaseOneApplication.java#L569-L591
train
Stage 6 expansion of a document.
Create a Java method that does the following: "Stage 6 expansion of a document.".
Of course, here is the Java code you requested: ```java public boolean stage6(final Document doc, final ProtoNetwork pn) { beginStage(PHASE1_STAGE6_HDR, "6", NUM_PHASES); final StringBuilder bldr = new StringBuilder(); boolean stmtSuccess = false, termSuccess = false; bldr.append("Expa...
mygreen/xlsmapper
src/main/java/com/gh/mygreen/xlsmapper/util/IsEmptyBuilder.java
IsEmptyBuilder.reflectionIsEmpty
public static boolean reflectionIsEmpty(final Object obj, final IsEmptyConfig config, final Collection<String> excludedFields) { if(obj == null) { return true; } final IsEmptyBuilder builder = new IsEmptyBuilder(config); final Field[] fields = obj.getClass().getDecla...
java
public static boolean reflectionIsEmpty(final Object obj, final IsEmptyConfig config, final Collection<String> excludedFields) { if(obj == null) { return true; } final IsEmptyBuilder builder = new IsEmptyBuilder(config); final Field[] fields = obj.getClass().getDecla...
[ "public", "static", "boolean", "reflectionIsEmpty", "(", "final", "Object", "obj", ",", "final", "IsEmptyConfig", "config", ",", "final", "Collection", "<", "String", ">", "excludedFields", ")", "{", "if", "(", "obj", "==", "null", ")", "{", "return", "true"...
リフレクションを使用しフィールドの値を取得し判定する。 @since 1.0 @param obj 判定対象のオブジェクト。 @param config 判定用の設定クラス。 @param excludedFields 除外対処のフィールド名。 @return 引数で指定したobjがnullの場合、trueを返す。
[ "リフレクションを使用しフィールドの値を取得し判定する。" ]
a0c6b25c622e5f3a50b199ef685d2ee46ad5483c
https://github.com/mygreen/xlsmapper/blob/a0c6b25c622e5f3a50b199ef685d2ee46ad5483c/src/main/java/com/gh/mygreen/xlsmapper/util/IsEmptyBuilder.java#L146-L184
train
Returns true if the object is null and has no fields.
Create a Java method that does the following: "Returns true if the object is null and has no fields.".
Of course, here is the Java code you requested: ```java public static boolean reflectionIsEmpty(final Object obj, final IsEmptyConfig config, final Collection<String> excludedFields) { if(obj == null) { return true; } final IsEmptyBuilder builder = new IsEmptyBuilder(config)...
j256/ormlite-core
src/main/java/com/j256/ormlite/dao/RuntimeExceptionDao.java
RuntimeExceptionDao.createDao
public static <T, ID> RuntimeExceptionDao<T, ID> createDao(ConnectionSource connectionSource, Class<T> clazz) throws SQLException { @SuppressWarnings("unchecked") Dao<T, ID> castDao = (Dao<T, ID>) DaoManager.createDao(connectionSource, clazz); return new RuntimeExceptionDao<T, ID>(castDao); }
java
public static <T, ID> RuntimeExceptionDao<T, ID> createDao(ConnectionSource connectionSource, Class<T> clazz) throws SQLException { @SuppressWarnings("unchecked") Dao<T, ID> castDao = (Dao<T, ID>) DaoManager.createDao(connectionSource, clazz); return new RuntimeExceptionDao<T, ID>(castDao); }
[ "public", "static", "<", "T", ",", "ID", ">", "RuntimeExceptionDao", "<", "T", ",", "ID", ">", "createDao", "(", "ConnectionSource", "connectionSource", ",", "Class", "<", "T", ">", "clazz", ")", "throws", "SQLException", "{", "@", "SuppressWarnings", "(", ...
Call through to {@link DaoManager#createDao(ConnectionSource, Class)} with the returned DAO wrapped in a RuntimeExceptionDao.
[ "Call", "through", "to", "{" ]
154d85bbb9614a0ea65a012251257831fb4fba21
https://github.com/j256/ormlite-core/blob/154d85bbb9614a0ea65a012251257831fb4fba21/src/main/java/com/j256/ormlite/dao/RuntimeExceptionDao.java#L58-L63
train
Create a DAO with the specified connection source and class.
Create a Java method that does the following: "Create a DAO with the specified connection source and class.".
Of course, here is the Java code you requested: ```java public static <T, ID> RuntimeExceptionDao<T, ID> createDao(ConnectionSource connectionSource, Class<T> clazz) throws SQLException { @SuppressWarnings("unchecked") Dao<T, ID> castDao = (Dao<T, ID>) DaoManager.createDao(connectionSource, clazz); return new...
leancloud/java-sdk-all
core/src/main/java/cn/leancloud/AVPush.java
AVPush.sendMessageInBackground
public static void sendMessageInBackground(String message, AVQuery<? extends AVInstallation> query, final SendCallback callback) { AVPush push = new AVPush(); push.setMessage(message); push.setQuery(query); push.sendInBackground(callback); }
java
public static void sendMessageInBackground(String message, AVQuery<? extends AVInstallation> query, final SendCallback callback) { AVPush push = new AVPush(); push.setMessage(message); push.setQuery(query); push.sendInBackground(callback); }
[ "public", "static", "void", "sendMessageInBackground", "(", "String", "message", ",", "AVQuery", "<", "?", "extends", "AVInstallation", ">", "query", ",", "final", "SendCallback", "callback", ")", "{", "AVPush", "push", "=", "new", "AVPush", "(", ")", ";", "...
A helper method to concisely send a push message to a query. This method is equivalent to <pre> AVPush push = new AVPush(); push.setMessage(message); push.setQuery(query); push.sendInBackground(callback); </pre> @param message The message that will be shown in the notification. @param query A AVInstallation query whi...
[ "A", "helper", "method", "to", "concisely", "send", "a", "push", "message", "to", "a", "query", ".", "This", "method", "is", "equivalent", "to" ]
323f8e7ee38051b1350790e5192304768c5c9f5f
https://github.com/leancloud/java-sdk-all/blob/323f8e7ee38051b1350790e5192304768c5c9f5f/core/src/main/java/cn/leancloud/AVPush.java#L417-L423
train
Send a message in background.
Create a Java method that does the following: "Send a message in background.".
Of course, here is the Java code you requested: ```java public static void sendMessageInBackground(String message, AVQuery<? extends AVInstallation> query, final SendCallback callback) { AVPush push = new AVPush(); push.setMessage(message); push.setQuery(query);...
dkpro/dkpro-jwpl
de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/consumer/dump/codec/TimedSQLEncoder.java
TimedSQLEncoder.encodeTask
public SQLEncoding[] encodeTask(final Task<Diff> task) throws ConfigurationException, UnsupportedEncodingException, DecodingException, EncodingException, SQLConsumerException { SQLEncoding[] encoding = super.encodeTask(task); for (SQLEncoding sql : encoding) { this.encodedSQLSize += sql.byteSize(); } ...
java
public SQLEncoding[] encodeTask(final Task<Diff> task) throws ConfigurationException, UnsupportedEncodingException, DecodingException, EncodingException, SQLConsumerException { SQLEncoding[] encoding = super.encodeTask(task); for (SQLEncoding sql : encoding) { this.encodedSQLSize += sql.byteSize(); } ...
[ "public", "SQLEncoding", "[", "]", "encodeTask", "(", "final", "Task", "<", "Diff", ">", "task", ")", "throws", "ConfigurationException", ",", "UnsupportedEncodingException", ",", "DecodingException", ",", "EncodingException", ",", "SQLConsumerException", "{", "SQLEnc...
/* (non-Javadoc) @see de.tudarmstadt.ukp.kulessa.delta.consumers.sql.codec.SQLEncodrInterface #encodeTask(de.tudarmstadt.ukp.kulessa.delta.data.tasks.Task)
[ "/", "*", "(", "non", "-", "Javadoc", ")" ]
0a0304b6a0aa13acc18838957994e06dd4613a58
https://github.com/dkpro/dkpro-jwpl/blob/0a0304b6a0aa13acc18838957994e06dd4613a58/de.tudarmstadt.ukp.wikipedia.revisionmachine/src/main/java/de/tudarmstadt/ukp/wikipedia/revisionmachine/difftool/consumer/dump/codec/TimedSQLEncoder.java#L159-L171
train
Encode a Task to SQL.
Create a Java method that does the following: "Encode a Task to SQL.".
Of course, here is the Java code you requested: ```java public SQLEncoding[] encodeTask(final Task<Diff> task) throws ConfigurationException, UnsupportedEncodingException, DecodingException, EncodingException, SQLConsumerException { SQLEncoding[] encoding = super.encodeTask(task); for (SQLEncoding sql : enc...
ktoso/janbanery
janbanery-core/src/main/java/pl/project13/janbanery/config/PropertiesConfiguration.java
PropertiesConfiguration.setupAuthMode
private void setupAuthMode() { String apiKey = getStringProperty(P_APIKEY); if (Strings.isNullOrEmpty(apiKey)) { // try to use the user/pass mode instead forceUserPassAuthMode(getStringProperty(P_USERNAME), getStringProperty(P_PASSWORD)); } else { // ok the key is present, let's use it ...
java
private void setupAuthMode() { String apiKey = getStringProperty(P_APIKEY); if (Strings.isNullOrEmpty(apiKey)) { // try to use the user/pass mode instead forceUserPassAuthMode(getStringProperty(P_USERNAME), getStringProperty(P_PASSWORD)); } else { // ok the key is present, let's use it ...
[ "private", "void", "setupAuthMode", "(", ")", "{", "String", "apiKey", "=", "getStringProperty", "(", "P_APIKEY", ")", ";", "if", "(", "Strings", ".", "isNullOrEmpty", "(", "apiKey", ")", ")", "{", "// try to use the user/pass mode instead", "forceUserPassAuthMode",...
Setup the auth mode using the properties file. If the "apikey" key is present and not empty it will be used, otherwise the fallback to user/pass mode is triggered. Please note that {@link PropertiesConfiguration} is NOT smart, it will not try to fetch apiKey when configuring the app from a properties file and finding o...
[ "Setup", "the", "auth", "mode", "using", "the", "properties", "file", ".", "If", "the", "apikey", "key", "is", "present", "and", "not", "empty", "it", "will", "be", "used", "otherwise", "the", "fallback", "to", "user", "/", "pass", "mode", "is", "trigger...
cd77b774814c7fbb2a0c9c55d4c3f7e76affa636
https://github.com/ktoso/janbanery/blob/cd77b774814c7fbb2a0c9c55d4c3f7e76affa636/janbanery-core/src/main/java/pl/project13/janbanery/config/PropertiesConfiguration.java#L74-L83
train
Setup the authentication mode.
Create a Java method that does the following: "Setup the authentication mode.".
Of course, here is the Java code you requested: ```java private void setupAuthMode() { String apiKey = getStringProperty(P_APIKEY); if (Strings.isNullOrEmpty(apiKey)) { // try to use the user/pass mode instead forceUserPassAuthMode(getStringProperty(P_USERNAME), getStringProperty(P_PASSWORD)); ...
BlueBrain/bluima
modules/bluima_abbreviations/src/main/java/com/wcohen/ss/PrintfFormat.java
PrintfFormat.sprintf
public String sprintf(Object[] o) { Enumeration e = vFmt.elements(); ConversionSpecification cs = null; char c = 0; int i=0; StringBuffer sb=new StringBuffer(); while (e.hasMoreElements()) { cs = (ConversionSpecification) e.nextElement(); c = cs.getConversionCharacter(); ...
java
public String sprintf(Object[] o) { Enumeration e = vFmt.elements(); ConversionSpecification cs = null; char c = 0; int i=0; StringBuffer sb=new StringBuffer(); while (e.hasMoreElements()) { cs = (ConversionSpecification) e.nextElement(); c = cs.getConversionCharacter(); ...
[ "public", "String", "sprintf", "(", "Object", "[", "]", "o", ")", "{", "Enumeration", "e", "=", "vFmt", ".", "elements", "(", ")", ";", "ConversionSpecification", "cs", "=", "null", ";", "char", "c", "=", "0", ";", "int", "i", "=", "0", ";", "Strin...
Format an array of objects. Byte, Short, Integer, Long, Float, Double, and Character arguments are treated as wrappers for primitive types. @param o The array of objects to format. @return The formatted String.
[ "Format", "an", "array", "of", "objects", ".", "Byte", "Short", "Integer", "Long", "Float", "Double", "and", "Character", "arguments", "are", "treated", "as", "wrappers", "for", "primitive", "types", "." ]
793ea3f46761dce72094e057a56cddfa677156ae
https://github.com/BlueBrain/bluima/blob/793ea3f46761dce72094e057a56cddfa677156ae/modules/bluima_abbreviations/src/main/java/com/wcohen/ss/PrintfFormat.java#L542-L608
train
Sprintf Method.
Create a Java method that does the following: "Sprintf Method.".
Of course, here is the Java code you requested: ```java public String sprintf(Object[] o) { Enumeration e = vFmt.elements(); ConversionSpecification cs = null; char c = 0; int i=0; StringBuffer sb=new StringBuffer(); while (e.hasMoreElements()) { cs = (ConversionSpecification) e.n...
molgenis/molgenis
molgenis-ontology/src/main/java/org/molgenis/ontology/sorta/service/impl/SortaServiceImpl.java
SortaServiceImpl.stemQuery
private String stemQuery(String queryString) { StringBuilder stringBuilder = new StringBuilder(); Set<String> uniqueTerms = Sets.newHashSet(queryString.toLowerCase().trim().split(NON_WORD_SEPARATOR)); uniqueTerms.removeAll(NGramDistanceAlgorithm.STOPWORDSLIST); for (String word : uniqueTerms) { ...
java
private String stemQuery(String queryString) { StringBuilder stringBuilder = new StringBuilder(); Set<String> uniqueTerms = Sets.newHashSet(queryString.toLowerCase().trim().split(NON_WORD_SEPARATOR)); uniqueTerms.removeAll(NGramDistanceAlgorithm.STOPWORDSLIST); for (String word : uniqueTerms) { ...
[ "private", "String", "stemQuery", "(", "String", "queryString", ")", "{", "StringBuilder", "stringBuilder", "=", "new", "StringBuilder", "(", ")", ";", "Set", "<", "String", ">", "uniqueTerms", "=", "Sets", ".", "newHashSet", "(", "queryString", ".", "toLowerC...
A helper function to produce fuzzy match query with 80% similarity in elasticsearch because PorterStem does not work in some cases, e.g. the stemming results for placenta and placental are different, therefore would be missed by elasticsearch
[ "A", "helper", "function", "to", "produce", "fuzzy", "match", "query", "with", "80%", "similarity", "in", "elasticsearch", "because", "PorterStem", "does", "not", "work", "in", "some", "cases", "e", ".", "g", ".", "the", "stemming", "results", "for", "placen...
b4d0d6b27e6f6c8d7505a3863dc03b589601f987
https://github.com/molgenis/molgenis/blob/b4d0d6b27e6f6c8d7505a3863dc03b589601f987/molgenis-ontology/src/main/java/org/molgenis/ontology/sorta/service/impl/SortaServiceImpl.java#L442-L456
train
stem query string
Create a Java method that does the following: "stem query string".
Of course, here is the Java code you requested: ```java private String stemQuery(String queryString) { StringBuilder stringBuilder = new StringBuilder(); Set<String> uniqueTerms = Sets.newHashSet(queryString.toLowerCase().trim().split(NON_WORD_SEPARATOR)); uniqueTerms.removeAll(NGramDistanceAlgorit...
metamx/extendedset
src/main/java/it/uniroma3/mat/extendedset/intset/ConciseSet.java
ConciseSet.clear
@Override public void clear(int from, int to) { ConciseSet toRemove = empty(); toRemove.fill(from, to); this.removeAll(toRemove); }
java
@Override public void clear(int from, int to) { ConciseSet toRemove = empty(); toRemove.fill(from, to); this.removeAll(toRemove); }
[ "@", "Override", "public", "void", "clear", "(", "int", "from", ",", "int", "to", ")", "{", "ConciseSet", "toRemove", "=", "empty", "(", ")", ";", "toRemove", ".", "fill", "(", "from", ",", "to", ")", ";", "this", ".", "removeAll", "(", "toRemove", ...
{@inheritDoc}
[ "{" ]
0f77c28057fac9c1bd6d79fbe5425b8efe5742a8
https://github.com/metamx/extendedset/blob/0f77c28057fac9c1bd6d79fbe5425b8efe5742a8/src/main/java/it/uniroma3/mat/extendedset/intset/ConciseSet.java#L2983-L2989
train
Removes all the elements in the specified range from the specified range to the specified range.
Create a Java method that does the following: "Removes all the elements in the specified range from the specified range to the specified range.".
Of course, here is the Java code you requested: ```java @Override public void clear(int from, int to) { ConciseSet toRemove = empty(); toRemove.fill(from, to); this.removeAll(toRemove); } ``` Hope this helps!
OpenLiberty/open-liberty
dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/internal/HttpResponseMessageImpl.java
HttpResponseMessageImpl.init
public void init(HttpInboundServiceContext sc, BNFHeaders hdrs) { setOwner(sc); setBinaryParseState(HttpInternalConstants.PARSING_BINARY_VERSION); if (null != hdrs) { hdrs.duplicate(this); } initVersion(); }
java
public void init(HttpInboundServiceContext sc, BNFHeaders hdrs) { setOwner(sc); setBinaryParseState(HttpInternalConstants.PARSING_BINARY_VERSION); if (null != hdrs) { hdrs.duplicate(this); } initVersion(); }
[ "public", "void", "init", "(", "HttpInboundServiceContext", "sc", ",", "BNFHeaders", "hdrs", ")", "{", "setOwner", "(", "sc", ")", ";", "setBinaryParseState", "(", "HttpInternalConstants", ".", "PARSING_BINARY_VERSION", ")", ";", "if", "(", "null", "!=", "hdrs",...
Initialize this outgoing response message with specific headers, ie. ones stored in a cache perhaps. @param sc @param hdrs
[ "Initialize", "this", "outgoing", "response", "message", "with", "specific", "headers", "ie", ".", "ones", "stored", "in", "a", "cache", "perhaps", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.transport.http/src/com/ibm/ws/http/channel/internal/HttpResponseMessageImpl.java#L137-L144
train
Initialize the class.
Create a Java method that does the following: "Initialize the class.".
Of course, here is the Java code you requested: ```java public void init(HttpInboundServiceContext sc, BNFHeaders hdrs) { setOwner(sc); setBinaryParseState(HttpInternalConstants.PARSING_BINARY_VERSION); if (null != hdrs) { hdrs.duplicate(this); } initVersion(); }...
google/closure-compiler
src/com/google/javascript/jscomp/TypeInference.java
TypeInference.traverseDestructuringPattern
private FlowScope traverseDestructuringPattern( Node pattern, FlowScope scope, JSType patternType, AssignmentType assignmentType) { return traverseDestructuringPatternHelper( pattern, scope, patternType, (FlowScope flowScope, Node targetNode, JSType targetType) -> { t...
java
private FlowScope traverseDestructuringPattern( Node pattern, FlowScope scope, JSType patternType, AssignmentType assignmentType) { return traverseDestructuringPatternHelper( pattern, scope, patternType, (FlowScope flowScope, Node targetNode, JSType targetType) -> { t...
[ "private", "FlowScope", "traverseDestructuringPattern", "(", "Node", "pattern", ",", "FlowScope", "scope", ",", "JSType", "patternType", ",", "AssignmentType", "assignmentType", ")", "{", "return", "traverseDestructuringPatternHelper", "(", "pattern", ",", "scope", ",",...
Traverses a destructuring pattern in an assignment or declaration
[ "Traverses", "a", "destructuring", "pattern", "in", "an", "assignment", "or", "declaration" ]
d81e36740f6a9e8ac31a825ee8758182e1dc5aae
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/TypeInference.java#L1206-L1216
train
Traverse a destructuring pattern.
Create a Java method that does the following: "Traverse a destructuring pattern.".
Of course, here is the Java code you requested: ```java private FlowScope traverseDestructuringPattern( Node pattern, FlowScope scope, JSType patternType, AssignmentType assignmentType) { return traverseDestructuringPatternHelper( pattern, scope, patternType, (FlowScope flowSc...
iig-uni-freiburg/SEWOL
ext/org/deckfour/xes/extension/std/XCostExtension.java
XCostExtension.extractTotalPrivate
private Double extractTotalPrivate(XAttributable element) { XAttribute attribute = element.getAttributes().get(KEY_TOTAL); if (attribute == null) { return null; } else { return ((XAttributeContinuous) attribute).getValue(); } }
java
private Double extractTotalPrivate(XAttributable element) { XAttribute attribute = element.getAttributes().get(KEY_TOTAL); if (attribute == null) { return null; } else { return ((XAttributeContinuous) attribute).getValue(); } }
[ "private", "Double", "extractTotalPrivate", "(", "XAttributable", "element", ")", "{", "XAttribute", "attribute", "=", "element", ".", "getAttributes", "(", ")", ".", "get", "(", "KEY_TOTAL", ")", ";", "if", "(", "attribute", "==", "null", ")", "{", "return"...
/* Retrieves the total costs of an element, if set by this extension's total attribute. @param element Event to retrieve total costs for. @return The requested total costs.
[ "/", "*", "Retrieves", "the", "total", "costs", "of", "an", "element", "if", "set", "by", "this", "extension", "s", "total", "attribute", "." ]
e791cb07a6e62ecf837d760d58a25f32fbf6bbca
https://github.com/iig-uni-freiburg/SEWOL/blob/e791cb07a6e62ecf837d760d58a25f32fbf6bbca/ext/org/deckfour/xes/extension/std/XCostExtension.java#L198-L205
train
Extract the total private attribute value from an element.
Create a Java method that does the following: "Extract the total private attribute value from an element.".
Of course, here is the Java code you requested: ```java private Double extractTotalPrivate(XAttributable element) { XAttribute attribute = element.getAttributes().get(KEY_TOTAL); if (attribute == null) { return null; } else { return ((XAttributeContinuous) attribute).getValue(); } } ``` Hope thi...
google/closure-compiler
src/com/google/javascript/jscomp/parsing/parser/Parser.java
Parser.createLookaheadParser
@Deprecated private Parser createLookaheadParser() { return new Parser( config, new LookaheadErrorReporter(), this.scanner.getFile(), this.scanner.getOffset(), inGeneratorContext()); }
java
@Deprecated private Parser createLookaheadParser() { return new Parser( config, new LookaheadErrorReporter(), this.scanner.getFile(), this.scanner.getOffset(), inGeneratorContext()); }
[ "@", "Deprecated", "private", "Parser", "createLookaheadParser", "(", ")", "{", "return", "new", "Parser", "(", "config", ",", "new", "LookaheadErrorReporter", "(", ")", ",", "this", ".", "scanner", ".", "getFile", "(", ")", ",", "this", ".", "scanner", "....
Forks the parser at the current point and returns a new parser for speculative parsing. @deprecated Creating a lookahead parser often leads to exponential parse times (see issues #1049, #1115, and #1148 on github) so avoid using this if possible.
[ "Forks", "the", "parser", "at", "the", "current", "point", "and", "returns", "a", "new", "parser", "for", "speculative", "parsing", "." ]
d81e36740f6a9e8ac31a825ee8758182e1dc5aae
https://github.com/google/closure-compiler/blob/d81e36740f6a9e8ac31a825ee8758182e1dc5aae/src/com/google/javascript/jscomp/parsing/parser/Parser.java#L4211-L4219
train
Create a lexer for the tokens in the current language.
Create a Java method that does the following: "Create a lexer for the tokens in the current language.".
Of course, here is the Java code you requested: ```java @Deprecated private Parser createLookaheadParser() { return new Parser( config, new LookaheadErrorReporter(), this.scanner.getFile(), this.scanner.getOffset(), inGeneratorContext()); } ``` Hope this helps!
opensourceBIM/BIMserver
PluginBase/generated/org/bimserver/models/ifc2x3tc1/impl/Ifc2x3tc1PackageImpl.java
Ifc2x3tc1PackageImpl.getIfcProductDefinitionShape
public EClass getIfcProductDefinitionShape() { if (ifcProductDefinitionShapeEClass == null) { ifcProductDefinitionShapeEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI) .getEClassifiers().get(387); } return ifcProductDefinitionShapeEClass; }
java
public EClass getIfcProductDefinitionShape() { if (ifcProductDefinitionShapeEClass == null) { ifcProductDefinitionShapeEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI) .getEClassifiers().get(387); } return ifcProductDefinitionShapeEClass; }
[ "public", "EClass", "getIfcProductDefinitionShape", "(", ")", "{", "if", "(", "ifcProductDefinitionShapeEClass", "==", "null", ")", "{", "ifcProductDefinitionShapeEClass", "=", "(", "EClass", ")", "EPackage", ".", "Registry", ".", "INSTANCE", ".", "getEPackage", "("...
<!-- begin-user-doc --> <!-- end-user-doc --> @generated
[ "<!", "--", "begin", "-", "user", "-", "doc", "--", ">", "<!", "--", "end", "-", "user", "-", "doc", "--", ">" ]
116803c3047d1b32217366757cee1bb3880fda63
https://github.com/opensourceBIM/BIMserver/blob/116803c3047d1b32217366757cee1bb3880fda63/PluginBase/generated/org/bimserver/models/ifc2x3tc1/impl/Ifc2x3tc1PackageImpl.java#L21167-L21173
train
Get the IfcProductDefinitionShapeEClass for the ifcProductDefinitionShape feature.
Create a Java method that does the following: "Get the IfcProductDefinitionShapeEClass for the ifcProductDefinitionShape feature.".
Of course, here is the Java code you requested: ```java public EClass getIfcProductDefinitionShape() { if (ifcProductDefinitionShapeEClass == null) { ifcProductDefinitionShapeEClass = (EClass) EPackage.Registry.INSTANCE.getEPackage(Ifc2x3tc1Package.eNS_URI) .getEClassifiers().get(387); } return ifcP...
linkedin/parseq
subprojects/parseq/src/main/java/com/linkedin/parseq/Engine.java
Engine.tryAcquirePermit
private boolean tryAcquirePermit(String planClass) { return _concurrentPlans.tryAcquire() && (_planBasedRateLimiter == null || _planBasedRateLimiter.tryAcquire(planClass)); }
java
private boolean tryAcquirePermit(String planClass) { return _concurrentPlans.tryAcquire() && (_planBasedRateLimiter == null || _planBasedRateLimiter.tryAcquire(planClass)); }
[ "private", "boolean", "tryAcquirePermit", "(", "String", "planClass", ")", "{", "return", "_concurrentPlans", ".", "tryAcquire", "(", ")", "&&", "(", "_planBasedRateLimiter", "==", "null", "||", "_planBasedRateLimiter", ".", "tryAcquire", "(", "planClass", ")", ")...
rate limiter and then from plan class level rate limit if specified.
[ "rate", "limiter", "and", "then", "from", "plan", "class", "level", "rate", "limit", "if", "specified", "." ]
35b194c2837ad45c36e80c2333c5feeb561ca24e
https://github.com/linkedin/parseq/blob/35b194c2837ad45c36e80c2333c5feeb561ca24e/subprojects/parseq/src/main/java/com/linkedin/parseq/Engine.java#L471-L474
valid
Try to acquire permit for a given plan class.
Create a Java method that does the following: "Try to acquire permit for a given plan class.".
Of course, here is the Java code you requested: ```java private boolean tryAcquirePermit(String planClass) { return _concurrentPlans.tryAcquire() && (_planBasedRateLimiter == null || _planBasedRateLimiter.tryAcquire(planClass)); } ``` Hope this helps!
demidenko05/beigesoft-webcrud-jar
src/main/java/org/beigesoft/web/service/UtlJsp.java
UtlJsp.htmlEscape
public final String htmlEscape(final char pChar) { if (pChar == ' ') { return "%20"; } else if (pChar == '!') { return "%21"; } else if (pChar == '"') { return "%22"; } else if (pChar == '#') { return "%23"; } else if (pChar == '$') { return "%24"; } else if (pChar ...
java
public final String htmlEscape(final char pChar) { if (pChar == ' ') { return "%20"; } else if (pChar == '!') { return "%21"; } else if (pChar == '"') { return "%22"; } else if (pChar == '#') { return "%23"; } else if (pChar == '$') { return "%24"; } else if (pChar ...
[ "public", "final", "String", "htmlEscape", "(", "final", "char", "pChar", ")", "{", "if", "(", "pChar", "==", "'", "'", ")", "{", "return", "\"%20\"", ";", "}", "else", "if", "(", "pChar", "==", "'", "'", ")", "{", "return", "\"%21\"", ";", "}", ...
<p>Escape HTML character to UTF-8 for given character.</p> @param pChar character e.g. ''' @return String escaped
[ "<p", ">", "Escape", "HTML", "character", "to", "UTF", "-", "8", "for", "given", "character", ".", "<", "/", "p", ">" ]
e973170f8fc1f164f0b67af9bb6a52b04579b64a
https://github.com/demidenko05/beigesoft-webcrud-jar/blob/e973170f8fc1f164f0b67af9bb6a52b04579b64a/src/main/java/org/beigesoft/web/service/UtlJsp.java#L242-L291
train
Escape a single character.
Create a Java method that does the following: "Escape a single character.".
Of course, here is the Java code you requested: ```java public final String htmlEscape(final char pChar) { if (pChar == ' ') { return "%20"; } else if (pChar == '!') { return "%21"; } else if (pChar == '"') { return "%22"; } else if (pChar == '#') { return "%23"; } else if (...
Evol-Instruct
N/A
N/A
java
[]
[]
train
Write a Java program that takes input from the user for two numbers, adds them together, and checks whether the sum is greater than 5 or not. The program should continue to prompt the user for input until the sum is greater than 5. Here is the code to get you started: ```java import java.util.Scanner; public class M...
Here is the modified code that includes a condition to exit the program if the user enters "quit" instead of a number: ```java import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); int sum = 0; while (sum <= 5) { ...
osglworks/java-tool
src/main/java/org/osgl/util/IO.java
IO.write
public static void write(char c, Writer writer) { try { writer.write(c); } catch (IOException e) { throw E.ioException(e); } }
java
public static void write(char c, Writer writer) { try { writer.write(c); } catch (IOException e) { throw E.ioException(e); } }
[ "public", "static", "void", "write", "(", "char", "c", ",", "Writer", "writer", ")", "{", "try", "{", "writer", ".", "write", "(", "c", ")", ";", "}", "catch", "(", "IOException", "e", ")", "{", "throw", "E", ".", "ioException", "(", "e", ")", ";...
Write a character to a {@link Writer}. The writer is leave open after the character after writing. @param c the character to be written @param writer the writer to which the character is written
[ "Write", "a", "character", "to", "a", "{", "@link", "Writer", "}", "." ]
8b6eee2bccb067eb32e6a7bc4a4dfef7a7d9008b
https://github.com/osglworks/java-tool/blob/8b6eee2bccb067eb32e6a7bc4a4dfef7a7d9008b/src/main/java/org/osgl/util/IO.java#L1764-L1770
train
Write a char to a Writer.
Create a Java method that does the following: "Write a char to a Writer.".
Of course, here is the Java code you requested: ```java public static void write(char c, Writer writer) { try { writer.write(c); } catch (IOException e) { throw E.ioException(e); } } ``` Hope this helps!
OpenLiberty/open-liberty
dev/com.ibm.ws.kernel.filemonitor/src/com/ibm/ws/kernel/filemonitor/internal/CoreServiceImpl.java
CoreServiceImpl.getScheduler
@Override public ScheduledExecutorService getScheduler() { ScheduledExecutorService sRef = executorService.get(); if (sRef == null) { throw new IllegalStateException("ScheduledExecutorService service is unavailable"); } return sRef; }
java
@Override public ScheduledExecutorService getScheduler() { ScheduledExecutorService sRef = executorService.get(); if (sRef == null) { throw new IllegalStateException("ScheduledExecutorService service is unavailable"); } return sRef; }
[ "@", "Override", "public", "ScheduledExecutorService", "getScheduler", "(", ")", "{", "ScheduledExecutorService", "sRef", "=", "executorService", ".", "get", "(", ")", ";", "if", "(", "sRef", "==", "null", ")", "{", "throw", "new", "IllegalStateException", "(", ...
Retrieve the scheduler @return bound ScheduledExecutorService @throws IllegalStateException if the ScheduledExecutorService is not found
[ "Retrieve", "the", "scheduler" ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.kernel.filemonitor/src/com/ibm/ws/kernel/filemonitor/internal/CoreServiceImpl.java#L159-L166
train
Get the ScheduledExecutorService service.
Create a Java method that does the following: "Get the ScheduledExecutorService service.".
Of course, here is the Java code you requested: ```java @Override public ScheduledExecutorService getScheduler() { ScheduledExecutorService sRef = executorService.get(); if (sRef == null) { throw new IllegalStateException("ScheduledExecutorService service is unavailable"); } ...
citygml4j/citygml4j
src-gen/main/java/net/opengis/citygml/tunnel/_2/IntTunnelInstallationType.java
IntTunnelInstallationType.get_GenericApplicationPropertyOfIntTunnelInstallation
public List<JAXBElement<Object>> get_GenericApplicationPropertyOfIntTunnelInstallation() { if (_GenericApplicationPropertyOfIntTunnelInstallation == null) { _GenericApplicationPropertyOfIntTunnelInstallation = new ArrayList<JAXBElement<Object>>(); } return this._GenericApplicationPro...
java
public List<JAXBElement<Object>> get_GenericApplicationPropertyOfIntTunnelInstallation() { if (_GenericApplicationPropertyOfIntTunnelInstallation == null) { _GenericApplicationPropertyOfIntTunnelInstallation = new ArrayList<JAXBElement<Object>>(); } return this._GenericApplicationPro...
[ "public", "List", "<", "JAXBElement", "<", "Object", ">", ">", "get_GenericApplicationPropertyOfIntTunnelInstallation", "(", ")", "{", "if", "(", "_GenericApplicationPropertyOfIntTunnelInstallation", "==", "null", ")", "{", "_GenericApplicationPropertyOfIntTunnelInstallation", ...
Gets the value of the genericApplicationPropertyOfIntTunnelInstallation property. <p> This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a <CODE>set</CODE> method for the ge...
[ "Gets", "the", "value", "of", "the", "genericApplicationPropertyOfIntTunnelInstallation", "property", "." ]
9155997d5ecf7e8f19411a02ba047f13375b97b9
https://github.com/citygml4j/citygml4j/blob/9155997d5ecf7e8f19411a02ba047f13375b97b9/src-gen/main/java/net/opengis/citygml/tunnel/_2/IntTunnelInstallationType.java#L297-L302
train
Gets the value of the genericApplicationPropertyOfIntTunnelInstallation property.
Create a Java method that does the following: "Gets the value of the genericApplicationPropertyOfIntTunnelInstallation property.".
Of course, here is the Java code you requested: ```java public List<JAXBElement<Object>> get_GenericApplicationPropertyOfIntTunnelInstallation() { if (_GenericApplicationPropertyOfIntTunnelInstallation == null) { _GenericApplicationPropertyOfIntTunnelInstallation = new ArrayList<JAXBElement<Object>...
baratine/baratine
core/src/main/java/com/caucho/v5/amp/stub/StubClass.java
StubClass.createPin
private MethodAmp createPin(MethodAmp delegate, Parameter result) { Class<?> api = TypeRef.of(result.getParameterizedType()) .to(ResultChain.class) .param(0) .rawClass(); return new MethodStubResul...
java
private MethodAmp createPin(MethodAmp delegate, Parameter result) { Class<?> api = TypeRef.of(result.getParameterizedType()) .to(ResultChain.class) .param(0) .rawClass(); return new MethodStubResul...
[ "private", "MethodAmp", "createPin", "(", "MethodAmp", "delegate", ",", "Parameter", "result", ")", "{", "Class", "<", "?", ">", "api", "=", "TypeRef", ".", "of", "(", "result", ".", "getParameterizedType", "(", ")", ")", ".", "to", "(", "ResultChain", "...
/* private MethodAmp createCopyShim(MethodAmp delegate, Parameter result) { TypeRef resultRef = TypeRef.of(result.getParameterizedType()); TypeRef transferRef = resultRef.to(Result.class).param(0); ShimConverter<?,?> shim = new ShimConverter(_type, transferRef.rawClass()); return new MethodStubResultCopy(delegate, sh...
[ "/", "*", "private", "MethodAmp", "createCopyShim", "(", "MethodAmp", "delegate", "Parameter", "result", ")", "{", "TypeRef", "resultRef", "=", "TypeRef", ".", "of", "(", "result", ".", "getParameterizedType", "()", ")", ";", "TypeRef", "transferRef", "=", "re...
db34b45c03c5a5e930d8142acc72319125569fcf
https://github.com/baratine/baratine/blob/db34b45c03c5a5e930d8142acc72319125569fcf/core/src/main/java/com/caucho/v5/amp/stub/StubClass.java#L650-L659
train
Create a method stub result pin.
Create a Java method that does the following: "Create a method stub result pin.".
Of course, here is the Java code you requested: ```java private MethodAmp createPin(MethodAmp delegate, Parameter result) { Class<?> api = TypeRef.of(result.getParameterizedType()) .to(ResultChain.class) .param(0) ...
smartsheet-platform/smartsheet-java-sdk
src/main/java/com/smartsheet/api/internal/SmartsheetImpl.java
SmartsheetImpl.workspaceResources
public WorkspaceResources workspaceResources() { if (workspaces.get() == null) { workspaces.compareAndSet(null, new WorkspaceResourcesImpl(this)); } return workspaces.get(); }
java
public WorkspaceResources workspaceResources() { if (workspaces.get() == null) { workspaces.compareAndSet(null, new WorkspaceResourcesImpl(this)); } return workspaces.get(); }
[ "public", "WorkspaceResources", "workspaceResources", "(", ")", "{", "if", "(", "workspaces", ".", "get", "(", ")", "==", "null", ")", "{", "workspaces", ".", "compareAndSet", "(", "null", ",", "new", "WorkspaceResourcesImpl", "(", "this", ")", ")", ";", "...
Returns the WorkspaceResources instance that provides access to Workspace resources. @return the workspace resources
[ "Returns", "the", "WorkspaceResources", "instance", "that", "provides", "access", "to", "Workspace", "resources", "." ]
f60e264412076271f83b65889ef9b891fad83df8
https://github.com/smartsheet-platform/smartsheet-java-sdk/blob/f60e264412076271f83b65889ef9b891fad83df8/src/main/java/com/smartsheet/api/internal/SmartsheetImpl.java#L469-L474
train
Gets the workspace resources.
Create a Java method that does the following: "Gets the workspace resources.".
Of course, here is the Java code you requested: ```java public WorkspaceResources workspaceResources() { if (workspaces.get() == null) { workspaces.compareAndSet(null, new WorkspaceResourcesImpl(this)); } return workspaces.get(); } ``` Hope this helps!
dschulten/hydra-java
spring-hateoas-ext/src/main/java/de/escalon/hypermedia/spring/xhtml/XhtmlWriter.java
XhtmlWriter.appendForm
private void appendForm(Affordance affordance, ActionDescriptor actionDescriptor) throws IOException { String formName = actionDescriptor.getActionName(); RequestMethod httpMethod = RequestMethod.valueOf(actionDescriptor.getHttpMethod()); // Link's expand method removes non-required variables f...
java
private void appendForm(Affordance affordance, ActionDescriptor actionDescriptor) throws IOException { String formName = actionDescriptor.getActionName(); RequestMethod httpMethod = RequestMethod.valueOf(actionDescriptor.getHttpMethod()); // Link's expand method removes non-required variables f...
[ "private", "void", "appendForm", "(", "Affordance", "affordance", ",", "ActionDescriptor", "actionDescriptor", ")", "throws", "IOException", "{", "String", "formName", "=", "actionDescriptor", ".", "getActionName", "(", ")", ";", "RequestMethod", "httpMethod", "=", ...
Appends form and squashes non-GET or POST to POST. If required, adds _method field for handling by an appropriate filter such as Spring's HiddenHttpMethodFilter. @param affordance to make into a form @param actionDescriptor describing the form action @throws IOException @see <a href="http://docs.spring.io/spring/docs...
[ "Appends", "form", "and", "squashes", "non", "-", "GET", "or", "POST", "to", "POST", ".", "If", "required", "adds", "_method", "field", "for", "handling", "by", "an", "appropriate", "filter", "such", "as", "Spring", "s", "HiddenHttpMethodFilter", "." ]
21f2ec64ed8f8294dcd7705a55477a4f85ed9d0a
https://github.com/dschulten/hydra-java/blob/21f2ec64ed8f8294dcd7705a55477a4f85ed9d0a/spring-hateoas-ext/src/main/java/de/escalon/hypermedia/spring/xhtml/XhtmlWriter.java#L311-L371
test
Append the form.
Create a Java method that does the following: "Append the form.".
Of course, here is the Java code you requested: ```java private void appendForm(Affordance affordance, ActionDescriptor actionDescriptor) throws IOException { String formName = actionDescriptor.getActionName(); RequestMethod httpMethod = RequestMethod.valueOf(actionDescriptor.getHttpMethod()); ...
netscaler/nitro
src/main/java/com/citrix/netscaler/nitro/resource/config/co/coparameter.java
coparameter.unset
public static base_response unset(nitro_service client, coparameter resource, String[] args) throws Exception{ coparameter unsetresource = new coparameter(); return unsetresource.unset_resource(client,args); }
java
public static base_response unset(nitro_service client, coparameter resource, String[] args) throws Exception{ coparameter unsetresource = new coparameter(); return unsetresource.unset_resource(client,args); }
[ "public", "static", "base_response", "unset", "(", "nitro_service", "client", ",", "coparameter", "resource", ",", "String", "[", "]", "args", ")", "throws", "Exception", "{", "coparameter", "unsetresource", "=", "new", "coparameter", "(", ")", ";", "return", ...
Use this API to unset the properties of coparameter resource. Properties that need to be unset are specified in args array.
[ "Use", "this", "API", "to", "unset", "the", "properties", "of", "coparameter", "resource", ".", "Properties", "that", "need", "to", "be", "unset", "are", "specified", "in", "args", "array", "." ]
2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4
https://github.com/netscaler/nitro/blob/2a98692dcf4e4ec430c7d7baab8382e4ba5a35e4/src/main/java/com/citrix/netscaler/nitro/resource/config/co/coparameter.java#L244-L247
train
Use this API to unset the properties of coparameter resource. Properties that need to be unset are specified in args array.
Create a Java method that does the following: "Use this API to unset the properties of coparameter resource. Properties that need to be unset are specified in args array.".
Of course, here is the Java code you requested: ```java public static base_response unset(nitro_service client, coparameter resource, String[] args) throws Exception{ coparameter unsetresource = new coparameter(); return unsetresource.unset_resource(client,args); } ``` Hope this helps!
HubSpot/Singularity
SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java
SingularityClient.getTaskState
public Optional<SingularityTaskState> getTaskState(String requestId, String runId) { final Function<String, String> requestUri = (host) -> String.format(TRACK_BY_RUN_ID_FORMAT, getApiBase(host), requestId, runId); return getSingle(requestUri, "track by task id", String.format("%s-%s", requestId, runId), Singula...
java
public Optional<SingularityTaskState> getTaskState(String requestId, String runId) { final Function<String, String> requestUri = (host) -> String.format(TRACK_BY_RUN_ID_FORMAT, getApiBase(host), requestId, runId); return getSingle(requestUri, "track by task id", String.format("%s-%s", requestId, runId), Singula...
[ "public", "Optional", "<", "SingularityTaskState", ">", "getTaskState", "(", "String", "requestId", ",", "String", "runId", ")", "{", "final", "Function", "<", "String", ",", "String", ">", "requestUri", "=", "(", "host", ")", "-", ">", "String", ".", "for...
Get the current state of a task by its run IDg @param requestId The request ID to search for the specified runId @param runId The run ID to search for @return A {@link SingularityTaskState} if the task was found among pending, active or inactive tasks
[ "Get", "the", "current", "state", "of", "a", "task", "by", "its", "run", "IDg" ]
384a8c16a10aa076af5ca45c8dfcedab9e5122c8
https://github.com/HubSpot/Singularity/blob/384a8c16a10aa076af5ca45c8dfcedab9e5122c8/SingularityClient/src/main/java/com/hubspot/singularity/client/SingularityClient.java#L1577-L1580
train
Get the state of a task by run id
Create a Java method that does the following: "Get the state of a task by run id".
Of course, here is the Java code you requested: ```java public Optional<SingularityTaskState> getTaskState(String requestId, String runId) { final Function<String, String> requestUri = (host) -> String.format(TRACK_BY_RUN_ID_FORMAT, getApiBase(host), requestId, runId); return getSingle(requestUri, "track by ta...
Evol-Instruct
N/A
N/A
java
[]
[]
train
Create a Java program to print all prime numbers between 1 and 50, both inclusive, in ascending order.
Here is a Java program that prints all prime numbers between 1 and 50, inclusive, in ascending order: ```java public class PrimeNumbers { public static void main(String[] args) { System.out.println("Prime numbers between 1 and 50:"); for (int i = 2; i <= 50; i++) { if (isPrime(...
aws/aws-sdk-java
aws-java-sdk-elasticbeanstalk/src/main/java/com/amazonaws/services/elasticbeanstalk/model/ListTagsForResourceResult.java
ListTagsForResourceResult.withResourceTags
public ListTagsForResourceResult withResourceTags(Tag... resourceTags) { if (this.resourceTags == null) { setResourceTags(new com.amazonaws.internal.SdkInternalList<Tag>(resourceTags.length)); } for (Tag ele : resourceTags) { this.resourceTags.add(ele); } ...
java
public ListTagsForResourceResult withResourceTags(Tag... resourceTags) { if (this.resourceTags == null) { setResourceTags(new com.amazonaws.internal.SdkInternalList<Tag>(resourceTags.length)); } for (Tag ele : resourceTags) { this.resourceTags.add(ele); } ...
[ "public", "ListTagsForResourceResult", "withResourceTags", "(", "Tag", "...", "resourceTags", ")", "{", "if", "(", "this", ".", "resourceTags", "==", "null", ")", "{", "setResourceTags", "(", "new", "com", ".", "amazonaws", ".", "internal", ".", "SdkInternalList...
<p> A list of tag key-value pairs. </p> <p> <b>NOTE:</b> This method appends the values to the existing list (if any). Use {@link #setResourceTags(java.util.Collection)} or {@link #withResourceTags(java.util.Collection)} if you want to override the existing values. </p> @param resourceTags A list of tag key-value pair...
[ "<p", ">", "A", "list", "of", "tag", "key", "-", "value", "pairs", ".", "<", "/", "p", ">", "<p", ">", "<b", ">", "NOTE", ":", "<", "/", "b", ">", "This", "method", "appends", "the", "values", "to", "the", "existing", "list", "(", "if", "any", ...
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-elasticbeanstalk/src/main/java/com/amazonaws/services/elasticbeanstalk/model/ListTagsForResourceResult.java#L127-L135
train
Adds the value of the resourceTags property.
Create a Java method that does the following: "Adds the value of the resourceTags property.".
Of course, here is the Java code you requested: ```java public ListTagsForResourceResult withResourceTags(Tag... resourceTags) { if (this.resourceTags == null) { setResourceTags(new com.amazonaws.internal.SdkInternalList<Tag>(resourceTags.length)); } for (Tag ele : resourceTags) { ...
overturetool/overture
core/pog/src/main/java/org/overture/pog/obligation/ProofObligation.java
ProofObligation.getMultipleTypeBindList
protected List<PMultipleBind> getMultipleTypeBindList(PType patternType, ILexNameToken... patternNames) { List<PMultipleBind> typeBindList = new Vector<PMultipleBind>(); typeBindList.add(getMultipleTypeBind(patternType, patternNames)); return typeBindList; }
java
protected List<PMultipleBind> getMultipleTypeBindList(PType patternType, ILexNameToken... patternNames) { List<PMultipleBind> typeBindList = new Vector<PMultipleBind>(); typeBindList.add(getMultipleTypeBind(patternType, patternNames)); return typeBindList; }
[ "protected", "List", "<", "PMultipleBind", ">", "getMultipleTypeBindList", "(", "PType", "patternType", ",", "ILexNameToken", "...", "patternNames", ")", "{", "List", "<", "PMultipleBind", ">", "typeBindList", "=", "new", "Vector", "<", "PMultipleBind", ">", "(", ...
As above, but create a List of PMultipleBind with one element, for convenience.
[ "As", "above", "but", "create", "a", "List", "of", "PMultipleBind", "with", "one", "element", "for", "convenience", "." ]
83175dc6c24fa171cde4fcf61ecb648eba3bdbc1
https://github.com/overturetool/overture/blob/83175dc6c24fa171cde4fcf61ecb648eba3bdbc1/core/pog/src/main/java/org/overture/pog/obligation/ProofObligation.java#L305-L311
train
Gets the multiple type bind list.
Create a Java method that does the following: "Gets the multiple type bind list.".
Of course, here is the Java code you requested: ```java protected List<PMultipleBind> getMultipleTypeBindList(PType patternType, ILexNameToken... patternNames) { List<PMultipleBind> typeBindList = new Vector<PMultipleBind>(); typeBindList.add(getMultipleTypeBind(patternType, patternNames)); return typeBindLi...
languagetool-org/languagetool
languagetool-language-modules/en/src/main/java/org/languagetool/chunking/EnglishChunkFilter.java
EnglishChunkFilter.getChunkType
private ChunkType getChunkType(List<ChunkTaggedToken> tokens, int chunkStartPos) { boolean isPlural = false; for (int i = chunkStartPos; i < tokens.size(); i++) { ChunkTaggedToken token = tokens.get(i); if (!isBeginningOfNounPhrase(token) && !isContinuationOfNounPhrase(token)) { break; ...
java
private ChunkType getChunkType(List<ChunkTaggedToken> tokens, int chunkStartPos) { boolean isPlural = false; for (int i = chunkStartPos; i < tokens.size(); i++) { ChunkTaggedToken token = tokens.get(i); if (!isBeginningOfNounPhrase(token) && !isContinuationOfNounPhrase(token)) { break; ...
[ "private", "ChunkType", "getChunkType", "(", "List", "<", "ChunkTaggedToken", ">", "tokens", ",", "int", "chunkStartPos", ")", "{", "boolean", "isPlural", "=", "false", ";", "for", "(", "int", "i", "=", "chunkStartPos", ";", "i", "<", "tokens", ".", "size"...
Get the type of the chunk that starts at the given position.
[ "Get", "the", "type", "of", "the", "chunk", "that", "starts", "at", "the", "given", "position", "." ]
b7a3d63883d242fb2525877c6382681c57a0a142
https://github.com/languagetool-org/languagetool/blob/b7a3d63883d242fb2525877c6382681c57a0a142/languagetool-language-modules/en/src/main/java/org/languagetool/chunking/EnglishChunkFilter.java#L94-L109
train
Get the type of the chunk from the list of tokens.
Create a Java method that does the following: "Get the type of the chunk from the list of tokens.".
Of course, here is the Java code you requested: ```java private ChunkType getChunkType(List<ChunkTaggedToken> tokens, int chunkStartPos) { boolean isPlural = false; for (int i = chunkStartPos; i < tokens.size(); i++) { ChunkTaggedToken token = tokens.get(i); if (!isBeginningOfNounPhrase(token) && !...
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/ui/input/colorpicker/CmsSliderMap.java
CmsSliderMap.onBrowserEvent
@Override public void onBrowserEvent(Event event) { super.onBrowserEvent(event); switch (DOM.eventGetType(event)) { case Event.ONMOUSEUP: Event.releaseCapture(m_slider.getElement()); m_capturedMouse = false; break; c...
java
@Override public void onBrowserEvent(Event event) { super.onBrowserEvent(event); switch (DOM.eventGetType(event)) { case Event.ONMOUSEUP: Event.releaseCapture(m_slider.getElement()); m_capturedMouse = false; break; c...
[ "@", "Override", "public", "void", "onBrowserEvent", "(", "Event", "event", ")", "{", "super", ".", "onBrowserEvent", "(", "event", ")", ";", "switch", "(", "DOM", ".", "eventGetType", "(", "event", ")", ")", "{", "case", "Event", ".", "ONMOUSEUP", ":", ...
Fired whenever a browser event is received. @param event Event to process
[ "Fired", "whenever", "a", "browser", "event", "is", "received", "." ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/ui/input/colorpicker/CmsSliderMap.java#L108-L138
train
Override this method to handle keyboard events.
Create a Java method that does the following: "Override this method to handle keyboard events.".
Of course, here is the Java code you requested: ```java @Override public void onBrowserEvent(Event event) { super.onBrowserEvent(event); switch (DOM.eventGetType(event)) { case Event.ONMOUSEUP: Event.releaseCapture(m_slider.getElement()); m_capt...
katharsis-project/katharsis-framework
katharsis-core/src/main/java/io/katharsis/core/internal/resource/IncludeLookupSetter.java
IncludeLookupSetter.lookupRelationshipField
@SuppressWarnings("unchecked") private Set<Resource> lookupRelationshipField(Collection<Resource> sourceResources, ResourceField relationshipField, QueryAdapter queryAdapter, RepositoryMethodParameterProvider parameterProvider, Map<ResourceIdentifier, Resource> resourceMap, Map<ResourceIdentifier, Object> entityMap...
java
@SuppressWarnings("unchecked") private Set<Resource> lookupRelationshipField(Collection<Resource> sourceResources, ResourceField relationshipField, QueryAdapter queryAdapter, RepositoryMethodParameterProvider parameterProvider, Map<ResourceIdentifier, Resource> resourceMap, Map<ResourceIdentifier, Object> entityMap...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "private", "Set", "<", "Resource", ">", "lookupRelationshipField", "(", "Collection", "<", "Resource", ">", "sourceResources", ",", "ResourceField", "relationshipField", ",", "QueryAdapter", "queryAdapter", ",", "Rep...
Loads all related resources for the given resources and relationship field. It updates the relationship data of the source resources accordingly and returns the loaded resources for potential inclusion in the result document.
[ "Loads", "all", "related", "resources", "for", "the", "given", "resources", "and", "relationship", "field", ".", "It", "updates", "the", "relationship", "data", "of", "the", "source", "resources", "accordingly", "and", "returns", "the", "loaded", "resources", "f...
73d1a8763c49c5cf4643d43e2dbfedb647630c46
https://github.com/katharsis-project/katharsis-framework/blob/73d1a8763c49c5cf4643d43e2dbfedb647630c46/katharsis-core/src/main/java/io/katharsis/core/internal/resource/IncludeLookupSetter.java#L216-L260
train
Lookup a list of resources that are related to a given relationship field.
Create a Java method that does the following: "Lookup a list of resources that are related to a given relationship field.".
Of course, here is the Java code you requested: ```java @SuppressWarnings("unchecked") private Set<Resource> lookupRelationshipField(Collection<Resource> sourceResources, ResourceField relationshipField, QueryAdapter queryAdapter, RepositoryMethodParameterProvider parameterProvider, Map<ResourceIdentifier, Resourc...
VoltDB/voltdb
src/hsqldb19b3/org/hsqldb_voltpatches/persist/Cache.java
Cache.get
public synchronized CachedObject get(int pos) { if (accessCount == Integer.MAX_VALUE) { resetAccessCount(); } int lookup = getLookup(pos); if (lookup == -1) { return null; } accessTable[lookup] = accessCount++; return (CachedObject) ob...
java
public synchronized CachedObject get(int pos) { if (accessCount == Integer.MAX_VALUE) { resetAccessCount(); } int lookup = getLookup(pos); if (lookup == -1) { return null; } accessTable[lookup] = accessCount++; return (CachedObject) ob...
[ "public", "synchronized", "CachedObject", "get", "(", "int", "pos", ")", "{", "if", "(", "accessCount", "==", "Integer", ".", "MAX_VALUE", ")", "{", "resetAccessCount", "(", ")", ";", "}", "int", "lookup", "=", "getLookup", "(", "pos", ")", ";", "if", ...
Returns a row if in memory cache.
[ "Returns", "a", "row", "if", "in", "memory", "cache", "." ]
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/Cache.java#L97-L112
train
Gets the value of the specified attribute.
Create a Java method that does the following: "Gets the value of the specified attribute.".
Of course, here is the Java code you requested: ```java public synchronized CachedObject get(int pos) { if (accessCount == Integer.MAX_VALUE) { resetAccessCount(); } int lookup = getLookup(pos); if (lookup == -1) { return null; } accessTable[l...
Azure/azure-sdk-for-java
eventhubs/data-plane/azure-eventhubs-eph/src/main/java/com/microsoft/azure/eventprocessorhost/EventProcessorHost.java
EventProcessorHost.unregisterEventProcessor
public CompletableFuture<Void> unregisterEventProcessor() { TRACE_LOGGER.info(this.hostContext.withHost("Stopping event processing")); if (this.unregistered == null) { // PartitionManager is created in constructor. If this object exists, then // this.partitionManager is not null...
java
public CompletableFuture<Void> unregisterEventProcessor() { TRACE_LOGGER.info(this.hostContext.withHost("Stopping event processing")); if (this.unregistered == null) { // PartitionManager is created in constructor. If this object exists, then // this.partitionManager is not null...
[ "public", "CompletableFuture", "<", "Void", ">", "unregisterEventProcessor", "(", ")", "{", "TRACE_LOGGER", ".", "info", "(", "this", ".", "hostContext", ".", "withHost", "(", "\"Stopping event processing\"", ")", ")", ";", "if", "(", "this", ".", "unregistered"...
Stop processing events and shut down this host instance. @return A CompletableFuture that completes when shutdown is finished.
[ "Stop", "processing", "events", "and", "shut", "down", "this", "host", "instance", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/eventhubs/data-plane/azure-eventhubs-eph/src/main/java/com/microsoft/azure/eventprocessorhost/EventProcessorHost.java#L499-L530
train
Unregister event processor.
Create a Java method that does the following: "Unregister event processor.".
Of course, here is the Java code you requested: ```java public CompletableFuture<Void> unregisterEventProcessor() { TRACE_LOGGER.info(this.hostContext.withHost("Stopping event processing")); if (this.unregistered == null) { // PartitionManager is created in constructor. If this object exis...
kiegroup/jbpm
jbpm-bpmn2-emfextmodel/src/main/java/bpsim/impl/ControlParametersImpl.java
ControlParametersImpl.setTriggerCount
public void setTriggerCount(Parameter newTriggerCount) { if (newTriggerCount != triggerCount) { NotificationChain msgs = null; if (triggerCount != null) msgs = ((InternalEObject)triggerCount).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - BpsimPackage.CONTROL_PARAMETERS__TRIGGER_COUNT, null, msgs); if (ne...
java
public void setTriggerCount(Parameter newTriggerCount) { if (newTriggerCount != triggerCount) { NotificationChain msgs = null; if (triggerCount != null) msgs = ((InternalEObject)triggerCount).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - BpsimPackage.CONTROL_PARAMETERS__TRIGGER_COUNT, null, msgs); if (ne...
[ "public", "void", "setTriggerCount", "(", "Parameter", "newTriggerCount", ")", "{", "if", "(", "newTriggerCount", "!=", "triggerCount", ")", "{", "NotificationChain", "msgs", "=", "null", ";", "if", "(", "triggerCount", "!=", "null", ")", "msgs", "=", "(", "...
<!-- begin-user-doc --> <!-- end-user-doc --> @generated
[ "<!", "--", "begin", "-", "user", "-", "doc", "--", ">", "<!", "--", "end", "-", "user", "-", "doc", "--", ">" ]
c3473c728aa382ebbea01e380c5e754a96647b82
https://github.com/kiegroup/jbpm/blob/c3473c728aa382ebbea01e380c5e754a96647b82/jbpm-bpmn2-emfextmodel/src/main/java/bpsim/impl/ControlParametersImpl.java#L268-L280
train
Sets the trigger count of the ControlParameters.
Create a Java method that does the following: "Sets the trigger count of the ControlParameters.".
Of course, here is the Java code you requested: ```java public void setTriggerCount(Parameter newTriggerCount) { if (newTriggerCount != triggerCount) { NotificationChain msgs = null; if (triggerCount != null) msgs = ((InternalEObject)triggerCount).eInverseRemove(this, EOPPOSITE_FEATURE_BASE - BpsimPackage....
caspervg/SC4D-LEX4J
lex4j/src/main/java/net/caspervg/lex4j/route/LotRoute.java
LotRoute.putLotDownloadList
public void putLotDownloadList(int id) { ClientResource resource = new ClientResource(Route.DOWNLOADLIST_LOT.url(id)); resource.setChallengeResponse(this.auth.toChallenge()); resource.get(); }
java
public void putLotDownloadList(int id) { ClientResource resource = new ClientResource(Route.DOWNLOADLIST_LOT.url(id)); resource.setChallengeResponse(this.auth.toChallenge()); resource.get(); }
[ "public", "void", "putLotDownloadList", "(", "int", "id", ")", "{", "ClientResource", "resource", "=", "new", "ClientResource", "(", "Route", ".", "DOWNLOADLIST_LOT", ".", "url", "(", "id", ")", ")", ";", "resource", ".", "setChallengeResponse", "(", "this", ...
Adds a file to the user's download list @param id : ID of the lot/file @custom.require Authentication
[ "Adds", "a", "file", "to", "the", "user", "s", "download", "list" ]
3d086ec70c817119a88573c2e23af27276cdb1d6
https://github.com/caspervg/SC4D-LEX4J/blob/3d086ec70c817119a88573c2e23af27276cdb1d6/lex4j/src/main/java/net/caspervg/lex4j/route/LotRoute.java#L133-L138
train
Put a download list to the server.
Create a Java method that does the following: "Put a download list to the server.".
Of course, here is the Java code you requested: ```java public void putLotDownloadList(int id) { ClientResource resource = new ClientResource(Route.DOWNLOADLIST_LOT.url(id)); resource.setChallengeResponse(this.auth.toChallenge()); resource.get(); } ``` Hope this helps!
elki-project/elki
elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/COPAC.java
COPAC.run
public Clustering<DimensionModel> run(Database database, Relation<V> relation) { COPACNeighborPredicate.Instance npred = new COPACNeighborPredicate<V>(settings).instantiate(database, relation); CorePredicate.Instance<DBIDs> cpred = new MinPtsCorePredicate(settings.minpts).instantiate(database); Clustering<M...
java
public Clustering<DimensionModel> run(Database database, Relation<V> relation) { COPACNeighborPredicate.Instance npred = new COPACNeighborPredicate<V>(settings).instantiate(database, relation); CorePredicate.Instance<DBIDs> cpred = new MinPtsCorePredicate(settings.minpts).instantiate(database); Clustering<M...
[ "public", "Clustering", "<", "DimensionModel", ">", "run", "(", "Database", "database", ",", "Relation", "<", "V", ">", "relation", ")", "{", "COPACNeighborPredicate", ".", "Instance", "npred", "=", "new", "COPACNeighborPredicate", "<", "V", ">", "(", "setting...
Run the COPAC algorithm. @param database Database @param relation Vector field relation @return COPAC clustering
[ "Run", "the", "COPAC", "algorithm", "." ]
b54673327e76198ecd4c8a2a901021f1a9174498
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-clustering/src/main/java/de/lmu/ifi/dbs/elki/algorithm/clustering/correlation/COPAC.java#L112-L128
train
Run the COPAC algorithm on the given database and relation.
Create a Java method that does the following: "Run the COPAC algorithm on the given database and relation.".
Of course, here is the Java code you requested: ```java public Clustering<DimensionModel> run(Database database, Relation<V> relation) { COPACNeighborPredicate.Instance npred = new COPACNeighborPredicate<V>(settings).instantiate(database, relation); CorePredicate.Instance<DBIDs> cpred = new MinPtsCorePredicate...
Stratio/stratio-cassandra
src/java/org/apache/cassandra/streaming/SessionInfo.java
SessionInfo.updateProgress
public void updateProgress(ProgressInfo newProgress) { assert peer.equals(newProgress.peer); Map<String, ProgressInfo> currentFiles = newProgress.direction == ProgressInfo.Direction.IN ? receivingFiles : sendingFiles; currentFiles.put(newP...
java
public void updateProgress(ProgressInfo newProgress) { assert peer.equals(newProgress.peer); Map<String, ProgressInfo> currentFiles = newProgress.direction == ProgressInfo.Direction.IN ? receivingFiles : sendingFiles; currentFiles.put(newP...
[ "public", "void", "updateProgress", "(", "ProgressInfo", "newProgress", ")", "{", "assert", "peer", ".", "equals", "(", "newProgress", ".", "peer", ")", ";", "Map", "<", "String", ",", "ProgressInfo", ">", "currentFiles", "=", "newProgress", ".", "direction", ...
Update progress of receiving/sending file. @param newProgress new progress info
[ "Update", "progress", "of", "receiving", "/", "sending", "file", "." ]
f6416b43ad5309083349ad56266450fa8c6a2106
https://github.com/Stratio/stratio-cassandra/blob/f6416b43ad5309083349ad56266450fa8c6a2106/src/java/org/apache/cassandra/streaming/SessionInfo.java#L75-L82
train
Update the progress information for a single resource.
Create a Java method that does the following: "Update the progress information for a single resource.".
Of course, here is the Java code you requested: ```java public void updateProgress(ProgressInfo newProgress) { assert peer.equals(newProgress.peer); Map<String, ProgressInfo> currentFiles = newProgress.direction == ProgressInfo.Direction.IN ? rec...
VoltDB/voltdb
third_party/java/src/org/json_voltpatches/JSONObject.java
JSONObject.write
public Writer write(Writer writer) throws JSONException { try { if (m_map.isEmpty()) { writer.write("{}"); return writer; } // This prefix value applies to the first key only String keyprefix = "{\""; for (Entry<String, ...
java
public Writer write(Writer writer) throws JSONException { try { if (m_map.isEmpty()) { writer.write("{}"); return writer; } // This prefix value applies to the first key only String keyprefix = "{\""; for (Entry<String, ...
[ "public", "Writer", "write", "(", "Writer", "writer", ")", "throws", "JSONException", "{", "try", "{", "if", "(", "m_map", ".", "isEmpty", "(", ")", ")", "{", "writer", ".", "write", "(", "\"{}\"", ")", ";", "return", "writer", ";", "}", "// This prefi...
Write the contents of the JSONObject as JSON text to a writer. For compactness, no whitespace is added. <p> Warning: This method assumes that the data structure is acyclical. @return The writer. @throws JSONException
[ "Write", "the", "contents", "of", "the", "JSONObject", "as", "JSON", "text", "to", "a", "writer", ".", "For", "compactness", "no", "whitespace", "is", "added", ".", "<p", ">", "Warning", ":", "This", "method", "assumes", "that", "the", "data", "structure",...
8afc1031e475835344b5497ea9e7203bc95475ac
https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/json_voltpatches/JSONObject.java#L1625-L1656
train
Write the content of this JSONObject to a Writer.
Create a Java method that does the following: "Write the content of this JSONObject to a Writer.".
Of course, here is the Java code you requested: ```java public Writer write(Writer writer) throws JSONException { try { if (m_map.isEmpty()) { writer.write("{}"); return writer; } // This prefix value applies to the first key only ...
ops4j/org.ops4j.pax.exam1
pax-exam-container-default/src/main/java/org/ops4j/pax/exam/container/def/internal/ArgumentsBuilder.java
ArgumentsBuilder.extractArguments
private Collection<String> extractArguments( final ProvisionOption[] bundles ) { final List<String> arguments = new ArrayList<String>(); for( ProvisionOption bundle : bundles ) { arguments.add( bundle.getURL() ); } return arguments; }
java
private Collection<String> extractArguments( final ProvisionOption[] bundles ) { final List<String> arguments = new ArrayList<String>(); for( ProvisionOption bundle : bundles ) { arguments.add( bundle.getURL() ); } return arguments; }
[ "private", "Collection", "<", "String", ">", "extractArguments", "(", "final", "ProvisionOption", "[", "]", "bundles", ")", "{", "final", "List", "<", "String", ">", "arguments", "=", "new", "ArrayList", "<", "String", ">", "(", ")", ";", "for", "(", "Pr...
Converts provision options into corresponding arguments (provision urls). @param bundles provision options @return converted Pax Runner collection of arguments
[ "Converts", "provision", "options", "into", "corresponding", "arguments", "(", "provision", "urls", ")", "." ]
7c8742208117ff91bd24bcd3a185d2d019f7000f
https://github.com/ops4j/org.ops4j.pax.exam1/blob/7c8742208117ff91bd24bcd3a185d2d019f7000f/pax-exam-container-default/src/main/java/org/ops4j/pax/exam/container/def/internal/ArgumentsBuilder.java#L248-L256
train
Extract the arguments from the bundles.
Create a Java method that does the following: "Extract the arguments from the bundles.".
Of course, here is the Java code you requested: ```java private Collection<String> extractArguments( final ProvisionOption[] bundles ) { final List<String> arguments = new ArrayList<String>(); for( ProvisionOption bundle : bundles ) { arguments.add( bundle.getURL() ); } ...
evant/binding-collection-adapter
bindingcollectionadapter/src/main/java/me/tatarka/bindingcollectionadapter2/ItemBinding.java
ItemBinding.of
@NonNull public static <T> ItemBinding<T> of(@NonNull OnItemBind<T> onItemBind) { //noinspection ConstantConditions if (onItemBind == null) { throw new NullPointerException("onItemBind == null"); } return new ItemBinding<>(onItemBind); }
java
@NonNull public static <T> ItemBinding<T> of(@NonNull OnItemBind<T> onItemBind) { //noinspection ConstantConditions if (onItemBind == null) { throw new NullPointerException("onItemBind == null"); } return new ItemBinding<>(onItemBind); }
[ "@", "NonNull", "public", "static", "<", "T", ">", "ItemBinding", "<", "T", ">", "of", "(", "@", "NonNull", "OnItemBind", "<", "T", ">", "onItemBind", ")", "{", "//noinspection ConstantConditions", "if", "(", "onItemBind", "==", "null", ")", "{", "throw", ...
Constructs an instance with the given callback. It will be called for each item in the collection to set the binding info. @see OnItemBind
[ "Constructs", "an", "instance", "with", "the", "given", "callback", ".", "It", "will", "be", "called", "for", "each", "item", "in", "the", "collection", "to", "set", "the", "binding", "info", "." ]
f669eda0a7002128bb504dcba012c51531f1bedd
https://github.com/evant/binding-collection-adapter/blob/f669eda0a7002128bb504dcba012c51531f1bedd/bindingcollectionadapter/src/main/java/me/tatarka/bindingcollectionadapter2/ItemBinding.java#L40-L47
train
Create an instance of an ItemBinding.
Create a Java method that does the following: "Create an instance of an ItemBinding.".
Of course, here is the Java code you requested: ```java @NonNull public static <T> ItemBinding<T> of(@NonNull OnItemBind<T> onItemBind) { //noinspection ConstantConditions if (onItemBind == null) { throw new NullPointerException("onItemBind == null"); } return new ItemBi...
OpenLiberty/open-liberty
dev/com.ibm.ws.junit.extensions/src/org/apache/tools/ant/taskdefs/StreamPumper.java
StreamPumper.run
public void run() { synchronized (this) { started = true; } finished = false; finish = false; try { while (true) { waitForInput(is); if (finish || Thread.interrupted()) { break; } ...
java
public void run() { synchronized (this) { started = true; } finished = false; finish = false; try { while (true) { waitForInput(is); if (finish || Thread.interrupted()) { break; } ...
[ "public", "void", "run", "(", ")", "{", "synchronized", "(", "this", ")", "{", "started", "=", "true", ";", "}", "finished", "=", "false", ";", "finish", "=", "false", ";", "try", "{", "while", "(", "true", ")", "{", "waitForInput", "(", "is", ")",...
Copies data from the input stream to the output stream. Terminates as soon as the input stream is closed or an error occurs.
[ "Copies", "data", "from", "the", "input", "stream", "to", "the", "output", "stream", "." ]
ca725d9903e63645018f9fa8cbda25f60af83a5d
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.junit.extensions/src/org/apache/tools/ant/taskdefs/StreamPumper.java#L115-L158
train
Run the main thread of the application.
Create a Java method that does the following: "Run the main thread of the application.".
Of course, here is the Java code you requested: ```java public void run() { synchronized (this) { started = true; } finished = false; finish = false; try { while (true) { waitForInput(is); if (finish || Thread.interrupted...
knowm/Sundial
src/main/java/org/quartz/classloading/CascadingClassLoadHelper.java
CascadingClassLoadHelper.getJobClasses
public Set<Class<? extends Job>> getJobClasses(String pkgname) { Set<Class<? extends Job>> classes = new HashSet<Class<? extends Job>>(); String[] packages = pkgname.split("[\\:,]"); if (packages.length > 1) { for (String pkg : packages) { classes.addAll(getJobClasses(pkg)); } } el...
java
public Set<Class<? extends Job>> getJobClasses(String pkgname) { Set<Class<? extends Job>> classes = new HashSet<Class<? extends Job>>(); String[] packages = pkgname.split("[\\:,]"); if (packages.length > 1) { for (String pkg : packages) { classes.addAll(getJobClasses(pkg)); } } el...
[ "public", "Set", "<", "Class", "<", "?", "extends", "Job", ">", ">", "getJobClasses", "(", "String", "pkgname", ")", "{", "Set", "<", "Class", "<", "?", "extends", "Job", ">", ">", "classes", "=", "new", "HashSet", "<", "Class", "<", "?", "extends", ...
Given a package name(s), search the classpath for all classes that extend sundial.job . <p>A comma(,) or colon(:) can be used to specify multiple packages to scan for Jobs. @param pkgname @return
[ "Given", "a", "package", "name", "(", "s", ")", "search", "the", "classpath", "for", "all", "classes", "that", "extend", "sundial", ".", "job", "." ]
0d61549fdfb8d6f884a1f2eed7e32ad39e2f4c62
https://github.com/knowm/Sundial/blob/0d61549fdfb8d6f884a1f2eed7e32ad39e2f4c62/src/main/java/org/quartz/classloading/CascadingClassLoadHelper.java#L198-L232
train
Get the set of classes that are contained in the specified package.
Create a Java method that does the following: "Get the set of classes that are contained in the specified package.".
Of course, here is the Java code you requested: ```java public Set<Class<? extends Job>> getJobClasses(String pkgname) { Set<Class<? extends Job>> classes = new HashSet<Class<? extends Job>>(); String[] packages = pkgname.split("[\\:,]"); if (packages.length > 1) { for (String pkg : packages) { ...
threerings/gwt-utils
src/main/java/com/threerings/gwt/ui/Widgets.java
Widgets.newActionImage
public static Image newActionImage (String path, String tip, ClickHandler onClick) { return makeActionImage(new Image(path), tip, onClick); }
java
public static Image newActionImage (String path, String tip, ClickHandler onClick) { return makeActionImage(new Image(path), tip, onClick); }
[ "public", "static", "Image", "newActionImage", "(", "String", "path", ",", "String", "tip", ",", "ClickHandler", "onClick", ")", "{", "return", "makeActionImage", "(", "new", "Image", "(", "path", ")", ",", "tip", ",", "onClick", ")", ";", "}" ]
Creates an image that responds to clicking.
[ "Creates", "an", "image", "that", "responds", "to", "clicking", "." ]
31b31a23b667f2a9c683160d77646db259f2aae5
https://github.com/threerings/gwt-utils/blob/31b31a23b667f2a9c683160d77646db259f2aae5/src/main/java/com/threerings/gwt/ui/Widgets.java#L295-L298
train
Create an image with the specified path tip and click handler.
Create a Java method that does the following: "Create an image with the specified path tip and click handler.".
Of course, here is the Java code you requested: ```java public static Image newActionImage (String path, String tip, ClickHandler onClick) { return makeActionImage(new Image(path), tip, onClick); } ``` Hope this helps!
fozziethebeat/S-Space
src/main/java/edu/ucla/sspace/matrix/RowScaledMatrix.java
RowScaledMatrix.get
public double get(int row, int col) { return m.get(row, col) * scales.get(row); }
java
public double get(int row, int col) { return m.get(row, col) * scales.get(row); }
[ "public", "double", "get", "(", "int", "row", ",", "int", "col", ")", "{", "return", "m", ".", "get", "(", "row", ",", "col", ")", "*", "scales", ".", "get", "(", "row", ")", ";", "}" ]
{@inheritDoc}
[ "{" ]
a608102737dfd3d59038a9ead33fe60356bc6029
https://github.com/fozziethebeat/S-Space/blob/a608102737dfd3d59038a9ead33fe60356bc6029/src/main/java/edu/ucla/sspace/matrix/RowScaledMatrix.java#L70-L72
train
Gets the value of the specified row and column.
Create a Java method that does the following: "Gets the value of the specified row and column.".
Of course, here is the Java code you requested: ```java public double get(int row, int col) { return m.get(row, col) * scales.get(row); } ``` Hope this helps!
kiegroup/drools
drools-compiler/src/main/java/org/drools/compiler/lang/DRL5Expressions.java
DRL5Expressions.conditionalAndExpression
public final BaseDescr conditionalAndExpression() throws RecognitionException { BaseDescr result = null; BaseDescr left =null; AnnotationDescr args =null; BaseDescr right =null; try { // src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:231:3: (left= inclusiveOrExpression ( DOUBLE_AMPER (arg...
java
public final BaseDescr conditionalAndExpression() throws RecognitionException { BaseDescr result = null; BaseDescr left =null; AnnotationDescr args =null; BaseDescr right =null; try { // src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:231:3: (left= inclusiveOrExpression ( DOUBLE_AMPER (arg...
[ "public", "final", "BaseDescr", "conditionalAndExpression", "(", ")", "throws", "RecognitionException", "{", "BaseDescr", "result", "=", "null", ";", "BaseDescr", "left", "=", "null", ";", "AnnotationDescr", "args", "=", "null", ";", "BaseDescr", "right", "=", "...
src/main/resources/org/drools/compiler/lang/DRL5Expressions.g:230:1: conditionalAndExpression returns [BaseDescr result] : left= inclusiveOrExpression ( DOUBLE_AMPER (args= fullAnnotation[null] )? right= inclusiveOrExpression )* ;
[ "src", "/", "main", "/", "resources", "/", "org", "/", "drools", "/", "compiler", "/", "lang", "/", "DRL5Expressions", ".", "g", ":", "230", ":", "1", ":", "conditionalAndExpression", "returns", "[", "BaseDescr", "result", "]", ":", "left", "=", "inclusi...
22b0275d6dbe93070b8090948502cf46eda543c4
https://github.com/kiegroup/drools/blob/22b0275d6dbe93070b8090948502cf46eda543c4/drools-compiler/src/main/java/org/drools/compiler/lang/DRL5Expressions.java#L1805-L1888
train
Try to match a conditional and expression
Create a Java method that does the following: "Try to match a conditional and expression".
Of course, here is the Java code you requested: ```java public final BaseDescr conditionalAndExpression() throws RecognitionException { BaseDescr result = null; BaseDescr left =null; AnnotationDescr args =null; BaseDescr right =null; try { // src/main/resources/org/drools/compiler/lang/DRL5Expressions....
HiddenStage/divide
Shared/src/main/java/io/divide/shared/transitory/TransientObject.java
TransientObject.put
public void put(String key, Object object) { // canWrite() TODO disabled for now; updateModifiedDate(); user_data.put(key,object); // if(isCollection(object)){ // Object[] array = ((Collection) object).toArray(new Object[0]); // user_data.put(key, array); // ...
java
public void put(String key, Object object) { // canWrite() TODO disabled for now; updateModifiedDate(); user_data.put(key,object); // if(isCollection(object)){ // Object[] array = ((Collection) object).toArray(new Object[0]); // user_data.put(key, array); // ...
[ "public", "void", "put", "(", "String", "key", ",", "Object", "object", ")", "{", "// canWrite() TODO disabled for now;", "updateModifiedDate", "(", ")", ";", "user_data", ".", "put", "(", "key", ",", "object", ")", ";", "// if(isCollection(object)){",...
Add a specific key value pair to this object. @param key key to identify this element by. @param object object to be added.
[ "Add", "a", "specific", "key", "value", "pair", "to", "this", "object", "." ]
14e36598c50d92b4393e6649915e32b86141c598
https://github.com/HiddenStage/divide/blob/14e36598c50d92b4393e6649915e32b86141c598/Shared/src/main/java/io/divide/shared/transitory/TransientObject.java#L179-L195
train
Put a value into the user_data map.
Create a Java method that does the following: "Put a value into the user_data map.".
Of course, here is the Java code you requested: ```java public void put(String key, Object object) { // canWrite() TODO disabled for now; updateModifiedDate(); user_data.put(key,object); // if(isCollection(object)){ // Object[] array = ((Collection) object).toArray(new Object...
JodaOrg/joda-time
src/main/java/org/joda/time/format/DateTimeParserBucket.java
DateTimeParserBucket.reset
public void reset() { iZone = iDefaultZone; iOffset = null; iPivotYear = iDefaultPivotYear; iSavedFieldsCount = 0; iSavedFieldsShared = false; iSavedState = null; }
java
public void reset() { iZone = iDefaultZone; iOffset = null; iPivotYear = iDefaultPivotYear; iSavedFieldsCount = 0; iSavedFieldsShared = false; iSavedState = null; }
[ "public", "void", "reset", "(", ")", "{", "iZone", "=", "iDefaultZone", ";", "iOffset", "=", "null", ";", "iPivotYear", "=", "iDefaultPivotYear", ";", "iSavedFieldsCount", "=", "0", ";", "iSavedFieldsShared", "=", "false", ";", "iSavedState", "=", "null", ";...
Resets the state back to that when the object was constructed. <p> This resets the state of the bucket, allowing a single bucket to be re-used for many parses. The bucket must not be shared between threads. @since 2.4
[ "Resets", "the", "state", "back", "to", "that", "when", "the", "object", "was", "constructed", ".", "<p", ">", "This", "resets", "the", "state", "of", "the", "bucket", "allowing", "a", "single", "bucket", "to", "be", "re", "-", "used", "for", "many", "...
bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42
https://github.com/JodaOrg/joda-time/blob/bd79f1c4245e79b3c2c56d7b04fde2a6e191fa42/src/main/java/org/joda/time/format/DateTimeParserBucket.java#L149-L156
train
Resets the internal state of this object.
Create a Java method that does the following: "Resets the internal state of this object.".
Of course, here is the Java code you requested: ```java public void reset() { iZone = iDefaultZone; iOffset = null; iPivotYear = iDefaultPivotYear; iSavedFieldsCount = 0; iSavedFieldsShared = false; iSavedState = null; } ``` Hope this helps!
apereo/cas
support/cas-server-support-cloud-directory-authentication/src/main/java/org/apereo/cas/clouddirectory/CloudDirectoryUtils.java
CloudDirectoryUtils.getObjectAttributeRanges
public static ObjectAttributeRange getObjectAttributeRanges(final String schemaArn, final String facetName, final String attributeName, final String attributeValue) { val attributeKey = getAttributeKey(schemaArn, facetName, attributeName); ...
java
public static ObjectAttributeRange getObjectAttributeRanges(final String schemaArn, final String facetName, final String attributeName, final String attributeValue) { val attributeKey = getAttributeKey(schemaArn, facetName, attributeName); ...
[ "public", "static", "ObjectAttributeRange", "getObjectAttributeRanges", "(", "final", "String", "schemaArn", ",", "final", "String", "facetName", ",", "final", "String", "attributeName", ",", "final", "String", "attributeValue", ")", "{", "val", "attributeKey", "=", ...
Gets object attribute ranges. @param schemaArn the schema arn @param facetName the facet name @param attributeName the attribute name @param attributeValue the attribute value @return the object attribute ranges
[ "Gets", "object", "attribute", "ranges", "." ]
b4b306433a8782cef803a39bea5b1f96740e0e9b
https://github.com/apereo/cas/blob/b4b306433a8782cef803a39bea5b1f96740e0e9b/support/cas-server-support-cloud-directory-authentication/src/main/java/org/apereo/cas/clouddirectory/CloudDirectoryUtils.java#L110-L120
train
Gets object attribute ranges.
Create a Java method that does the following: "Gets object attribute ranges.".
Of course, here is the Java code you requested: ```java public static ObjectAttributeRange getObjectAttributeRanges(final String schemaArn, final String facetName, final String attributeName, final String attributeValue) { val attributeKey = getA...
alkacon/opencms-core
src-gwt/org/opencms/gwt/client/ui/input/upload/CmsUploadButton.java
CmsUploadButton.updateState
private void updateState(String styleDependent) { if (CmsStringUtil.isEmptyOrWhitespaceOnly(styleDependent)) { // reseting to cmsState-up styleDependent = "up"; } if (!styleDependent.equals(m_styleDependent)) { m_main.removeStyleDependentName(m_styleDependent...
java
private void updateState(String styleDependent) { if (CmsStringUtil.isEmptyOrWhitespaceOnly(styleDependent)) { // reseting to cmsState-up styleDependent = "up"; } if (!styleDependent.equals(m_styleDependent)) { m_main.removeStyleDependentName(m_styleDependent...
[ "private", "void", "updateState", "(", "String", "styleDependent", ")", "{", "if", "(", "CmsStringUtil", ".", "isEmptyOrWhitespaceOnly", "(", "styleDependent", ")", ")", "{", "// reseting to cmsState-up", "styleDependent", "=", "\"up\"", ";", "}", "if", "(", "!", ...
Updates the CSS classes according to the button state.<p> @param styleDependent the dependent style name
[ "Updates", "the", "CSS", "classes", "according", "to", "the", "button", "state", ".", "<p", ">" ]
bc104acc75d2277df5864da939a1f2de5fdee504
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-gwt/org/opencms/gwt/client/ui/input/upload/CmsUploadButton.java#L474-L485
train
Update the style dependent name.
Create a Java method that does the following: "Update the style dependent name.".
Of course, here is the Java code you requested: ```java private void updateState(String styleDependent) { if (CmsStringUtil.isEmptyOrWhitespaceOnly(styleDependent)) { // reseting to cmsState-up styleDependent = "up"; } if (!styleDependent.equals(m_styleDependent)) { ...
netscaler/sdx_nitro
src/main/java/com/citrix/sdx/nitro/resource/config/xen/xen_bluecatvpx_image.java
xen_bluecatvpx_image.get
public static xen_bluecatvpx_image[] get(nitro_service client) throws Exception { xen_bluecatvpx_image resource = new xen_bluecatvpx_image(); resource.validate("get"); return (xen_bluecatvpx_image[]) resource.get_resources(client); }
java
public static xen_bluecatvpx_image[] get(nitro_service client) throws Exception { xen_bluecatvpx_image resource = new xen_bluecatvpx_image(); resource.validate("get"); return (xen_bluecatvpx_image[]) resource.get_resources(client); }
[ "public", "static", "xen_bluecatvpx_image", "[", "]", "get", "(", "nitro_service", "client", ")", "throws", "Exception", "{", "xen_bluecatvpx_image", "resource", "=", "new", "xen_bluecatvpx_image", "(", ")", ";", "resource", ".", "validate", "(", "\"get\"", ")", ...
<pre> Use this operation to get bluecat XVA file. </pre>
[ "<pre", ">", "Use", "this", "operation", "to", "get", "bluecat", "XVA", "file", ".", "<", "/", "pre", ">" ]
c840919f1a8f7c0a5634c0f23d34fa14d1765ff1
https://github.com/netscaler/sdx_nitro/blob/c840919f1a8f7c0a5634c0f23d34fa14d1765ff1/src/main/java/com/citrix/sdx/nitro/resource/config/xen/xen_bluecatvpx_image.java#L140-L145
train
Use this API to fetch all the xen_bluecatvpx_image resources that are configured on netscaler.
Create a Java method that does the following: "Use this API to fetch all the xen_bluecatvpx_image resources that are configured on netscaler.".
Of course, here is the Java code you requested: ```java public static xen_bluecatvpx_image[] get(nitro_service client) throws Exception { xen_bluecatvpx_image resource = new xen_bluecatvpx_image(); resource.validate("get"); return (xen_bluecatvpx_image[]) resource.get_resources(client); } ``` Hope this h...
zaproxy/zaproxy
src/org/zaproxy/zap/extension/script/ExtensionScript.java
ExtensionScript.getInterface
public <T> T getInterface(ScriptWrapper script, Class<T> class1) throws ScriptException, IOException { ClassLoader previousContextClassLoader = Thread.currentThread().getContextClassLoader(); Thread.currentThread().setContextClassLoader(ExtensionFactory.getAddOnLoader()); try { T iface = script.getInter...
java
public <T> T getInterface(ScriptWrapper script, Class<T> class1) throws ScriptException, IOException { ClassLoader previousContextClassLoader = Thread.currentThread().getContextClassLoader(); Thread.currentThread().setContextClassLoader(ExtensionFactory.getAddOnLoader()); try { T iface = script.getInter...
[ "public", "<", "T", ">", "T", "getInterface", "(", "ScriptWrapper", "script", ",", "Class", "<", "T", ">", "class1", ")", "throws", "ScriptException", ",", "IOException", "{", "ClassLoader", "previousContextClassLoader", "=", "Thread", ".", "currentThread", "(",...
Gets the interface {@code class1} from the given {@code script}. Might return {@code null} if the {@code script} does not implement the interface. <p> First tries to get the interface directly from the {@code script} by calling the method {@code ScriptWrapper.getInterface(Class)}, if it returns {@code null} the interfa...
[ "Gets", "the", "interface", "{", "@code", "class1", "}", "from", "the", "given", "{", "@code", "script", "}", ".", "Might", "return", "{", "@code", "null", "}", "if", "the", "{", "@code", "script", "}", "does", "not", "implement", "the", "interface", "...
0cbe5121f2ae1ecca222513d182759210c569bec
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/zaproxy/zap/extension/script/ExtensionScript.java#L1706-L1731
train
Returns the first implementation of the specified interface.
Create a Java method that does the following: "Returns the first implementation of the specified interface.".
Of course, here is the Java code you requested: ```java public <T> T getInterface(ScriptWrapper script, Class<T> class1) throws ScriptException, IOException { ClassLoader previousContextClassLoader = Thread.currentThread().getContextClassLoader(); Thread.currentThread().setContextClassLoader(ExtensionFactory....
jbundle/jbundle
base/screen/model/src/main/java/org/jbundle/base/screen/model/report/parser/HelpParser.java
HelpParser.printHtmlOptional
public void printHtmlOptional(PrintWriter out, String strTag, String strParams, String strData) { String strField = ((BasePanel)this.getRecordOwner()).getProperty("field"); if ((strField != null) && (strField.length() > 0) && (m_recDetail.getField(strField) != null)) { String str...
java
public void printHtmlOptional(PrintWriter out, String strTag, String strParams, String strData) { String strField = ((BasePanel)this.getRecordOwner()).getProperty("field"); if ((strField != null) && (strField.length() > 0) && (m_recDetail.getField(strField) != null)) { String str...
[ "public", "void", "printHtmlOptional", "(", "PrintWriter", "out", ",", "String", "strTag", ",", "String", "strParams", ",", "String", "strData", ")", "{", "String", "strField", "=", "(", "(", "BasePanel", ")", "this", ".", "getRecordOwner", "(", ")", ")", ...
Output this screen using HTML.
[ "Output", "this", "screen", "using", "HTML", "." ]
4037fcfa85f60c7d0096c453c1a3cd573c2b0abc
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/screen/model/src/main/java/org/jbundle/base/screen/model/report/parser/HelpParser.java#L202-L218
train
PrintHtmlOptional Method.
Create a Java method that does the following: "PrintHtmlOptional Method.".
Of course, here is the Java code you requested: ```java public void printHtmlOptional(PrintWriter out, String strTag, String strParams, String strData) { String strField = ((BasePanel)this.getRecordOwner()).getProperty("field"); if ((strField != null) && (strField.length() > 0) && (m_recDetail.getF...
pressgang-ccms/PressGangCCMSContentSpec
src/main/java/org/jboss/pressgang/ccms/contentspec/utils/CSTransformer.java
CSTransformer.transformSpecTopicWithoutTypeCheck
private static SpecTopic transformSpecTopicWithoutTypeCheck(final CSNodeWrapper node, final Map<Integer, Node> nodes, final Map<String, SpecTopic> targetTopics, final List<CSNodeWrapper> relationshipFromNodes) { final SpecTopic specTopic = new SpecTopic(node.getEntityId(), node.getTitle()); ...
java
private static SpecTopic transformSpecTopicWithoutTypeCheck(final CSNodeWrapper node, final Map<Integer, Node> nodes, final Map<String, SpecTopic> targetTopics, final List<CSNodeWrapper> relationshipFromNodes) { final SpecTopic specTopic = new SpecTopic(node.getEntityId(), node.getTitle()); ...
[ "private", "static", "SpecTopic", "transformSpecTopicWithoutTypeCheck", "(", "final", "CSNodeWrapper", "node", ",", "final", "Map", "<", "Integer", ",", "Node", ">", "nodes", ",", "final", "Map", "<", "String", ",", "SpecTopic", ">", "targetTopics", ",", "final"...
Transform a Topic CSNode entity object into a SpecTopic Object that can be added to a Content Specification. @param node The CSNode entity object to be transformed. @param nodes A mapping of node entity ids to their transformed counterparts. @param targetTopics A mapping of ta...
[ "Transform", "a", "Topic", "CSNode", "entity", "object", "into", "a", "SpecTopic", "Object", "that", "can", "be", "added", "to", "a", "Content", "Specification", "." ]
2bc02e2971e4522b47a130fb7ae5a0f5ad377df1
https://github.com/pressgang-ccms/PressGangCCMSContentSpec/blob/2bc02e2971e4522b47a130fb7ae5a0f5ad377df1/src/main/java/org/jboss/pressgang/ccms/contentspec/utils/CSTransformer.java#L482-L510
train
Transform a SpecTopic without type check.
Create a Java method that does the following: "Transform a SpecTopic without type check.".
Of course, here is the Java code you requested: ```java private static SpecTopic transformSpecTopicWithoutTypeCheck(final CSNodeWrapper node, final Map<Integer, Node> nodes, final Map<String, SpecTopic> targetTopics, final List<CSNodeWrapper> relationshipFromNodes) { final SpecTopic specTopic = new...
webmetrics/browsermob-proxy
src/main/java/org/browsermob/proxy/jetty/http/HttpFields.java
HttpFields.getFieldNames
public Enumeration getFieldNames() { return new Enumeration() { int i=0; Field field=null; public boolean hasMoreElements() { if (field!=null) return true; while (i<_f...
java
public Enumeration getFieldNames() { return new Enumeration() { int i=0; Field field=null; public boolean hasMoreElements() { if (field!=null) return true; while (i<_f...
[ "public", "Enumeration", "getFieldNames", "(", ")", "{", "return", "new", "Enumeration", "(", ")", "{", "int", "i", "=", "0", ";", "Field", "field", "=", "null", ";", "public", "boolean", "hasMoreElements", "(", ")", "{", "if", "(", "field", "!=", "nul...
Get enumeration of header _names. Returns an enumeration of strings representing the header _names for this request.
[ "Get", "enumeration", "of", "header", "_names", ".", "Returns", "an", "enumeration", "of", "strings", "representing", "the", "header", "_names", "for", "this", "request", "." ]
a9252e62246ac33d55d51b993ba1159404e7d389
https://github.com/webmetrics/browsermob-proxy/blob/a9252e62246ac33d55d51b993ba1159404e7d389/src/main/java/org/browsermob/proxy/jetty/http/HttpFields.java#L637-L672
train
Get an enumeration of all the field names.
Create a Java method that does the following: "Get an enumeration of all the field names.".
Of course, here is the Java code you requested: ```java public Enumeration getFieldNames() { return new Enumeration() { int i=0; Field field=null; public boolean hasMoreElements() { if (field!=null) ...
michael-rapp/AndroidMaterialValidation
library/src/main/java/de/mrapp/android/validation/Validators.java
Validators.equal
public static Validator<CharSequence> equal(@NonNull final Context context, @NonNull final EditText editText) { return new EqualValidator(context, R.string.default_error_message, editText); }
java
public static Validator<CharSequence> equal(@NonNull final Context context, @NonNull final EditText editText) { return new EqualValidator(context, R.string.default_error_message, editText); }
[ "public", "static", "Validator", "<", "CharSequence", ">", "equal", "(", "@", "NonNull", "final", "Context", "context", ",", "@", "NonNull", "final", "EditText", "editText", ")", "{", "return", "new", "EqualValidator", "(", "context", ",", "R", ".", "string"...
Creates and returns a validator, which allows to validate texts to ensure, that they are equal to the text, which is contained by an {@link EditText} widget. @param context The context, which should be used to retrieve the error message, as an instance of the class {@link Context}. The context may not be null @param e...
[ "Creates", "and", "returns", "a", "validator", "which", "allows", "to", "validate", "texts", "to", "ensure", "that", "they", "are", "equal", "to", "the", "text", "which", "is", "contained", "by", "an", "{", "@link", "EditText", "}", "widget", "." ]
ac8693baeac7abddf2e38a47da4c1849d4661a8b
https://github.com/michael-rapp/AndroidMaterialValidation/blob/ac8693baeac7abddf2e38a47da4c1849d4661a8b/library/src/main/java/de/mrapp/android/validation/Validators.java#L879-L882
train
Create a validator which allows to validate a sequence of tokens in a resource file.
Create a Java method that does the following: "Create a validator which allows to validate a sequence of tokens in a resource file.".
Of course, here is the Java code you requested: ```java public static Validator<CharSequence> equal(@NonNull final Context context, @NonNull final EditText editText) { return new EqualValidator(context, R.string.default_error_message, editText); } ``` Hope t...
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/util/collection/IntHashSet.java
IntHashSet.remove
public boolean remove(final int value) { int index = intHash(value, mask); while (values[index] != missingValue) { if (values[index] == value) { values[index] = missingValue; compactChain(index); return true; } index =...
java
public boolean remove(final int value) { int index = intHash(value, mask); while (values[index] != missingValue) { if (values[index] == value) { values[index] = missingValue; compactChain(index); return true; } index =...
[ "public", "boolean", "remove", "(", "final", "int", "value", ")", "{", "int", "index", "=", "intHash", "(", "value", ",", "mask", ")", ";", "while", "(", "values", "[", "index", "]", "!=", "missingValue", ")", "{", "if", "(", "values", "[", "index", ...
An int specialised version of {this#remove(Object)}. @param value the value to remove @return true if the value was present, false otherwise
[ "An", "int", "specialised", "version", "of", "{", "this#remove", "(", "Object", ")", "}", "." ]
8c4bc10515dbbfb41a33e0302c0caedf3cda1baf
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/util/collection/IntHashSet.java#L103-L117
train
Removes the value from the set.
Create a Java method that does the following: "Removes the value from the set.".
Of course, here is the Java code you requested: ```java public boolean remove(final int value) { int index = intHash(value, mask); while (values[index] != missingValue) { if (values[index] == value) { values[index] = missingValue; compactChain(index); ...
CenturyLinkCloud/mdw
mdw-common/src/com/centurylink/mdw/cache/impl/PackageCache.java
PackageCache.getProcessPackage
public static Package getProcessPackage(Long processId) { try { if (processId != null) { for (Package pkg : getPackageList()) { if (pkg.containsProcess(processId)) return pkg; } } return Package.getDefaul...
java
public static Package getProcessPackage(Long processId) { try { if (processId != null) { for (Package pkg : getPackageList()) { if (pkg.containsProcess(processId)) return pkg; } } return Package.getDefaul...
[ "public", "static", "Package", "getProcessPackage", "(", "Long", "processId", ")", "{", "try", "{", "if", "(", "processId", "!=", "null", ")", "{", "for", "(", "Package", "pkg", ":", "getPackageList", "(", ")", ")", "{", "if", "(", "pkg", ".", "contain...
Returns the design-time package for a specified process ID. Returns the first match so does not support the same process in multiple packages. Also, assumes the processId is not for an embedded subprocess.
[ "Returns", "the", "design", "-", "time", "package", "for", "a", "specified", "process", "ID", ".", "Returns", "the", "first", "match", "so", "does", "not", "support", "the", "same", "process", "in", "multiple", "packages", ".", "Also", "assumes", "the", "p...
91167fe65a25a5d7022cdcf8b0fae8506f5b87ce
https://github.com/CenturyLinkCloud/mdw/blob/91167fe65a25a5d7022cdcf8b0fae8506f5b87ce/mdw-common/src/com/centurylink/mdw/cache/impl/PackageCache.java#L151-L165
train
Gets the Package object for a given process id.
Create a Java method that does the following: "Gets the Package object for a given process id.".
Of course, here is the Java code you requested: ```java public static Package getProcessPackage(Long processId) { try { if (processId != null) { for (Package pkg : getPackageList()) { if (pkg.containsProcess(processId)) return pkg; ...
headius/invokebinder
src/main/java/com/headius/invokebinder/Signature.java
Signature.permuteWith
public SmartHandle permuteWith(SmartHandle target) { String[] argNames = target.signature().argNames(); return new SmartHandle(this, permuteWith(target.handle(), argNames)); }
java
public SmartHandle permuteWith(SmartHandle target) { String[] argNames = target.signature().argNames(); return new SmartHandle(this, permuteWith(target.handle(), argNames)); }
[ "public", "SmartHandle", "permuteWith", "(", "SmartHandle", "target", ")", "{", "String", "[", "]", "argNames", "=", "target", ".", "signature", "(", ")", ".", "argNames", "(", ")", ";", "return", "new", "SmartHandle", "(", "this", ",", "permuteWith", "(",...
Produce a new SmartHandle by permuting this Signature's arguments to the Signature of a target SmartHandle. The new SmartHandle's signature will match this one, permuting those arguments and invoking the target handle. @param target the SmartHandle to use as a permutation target @return a new SmartHandle that permutes...
[ "Produce", "a", "new", "SmartHandle", "by", "permuting", "this", "Signature", "s", "arguments", "to", "the", "Signature", "of", "a", "target", "SmartHandle", ".", "The", "new", "SmartHandle", "s", "signature", "will", "match", "this", "one", "permuting", "thos...
ce6bfeb8e33265480daa7b797989dd915d51238d
https://github.com/headius/invokebinder/blob/ce6bfeb8e33265480daa7b797989dd915d51238d/src/main/java/com/headius/invokebinder/Signature.java#L744-L747
train
Permutes this SmartHandle with the target SmartHandle.
Create a Java method that does the following: "Permutes this SmartHandle with the target SmartHandle.".
Of course, here is the Java code you requested: ```java public SmartHandle permuteWith(SmartHandle target) { String[] argNames = target.signature().argNames(); return new SmartHandle(this, permuteWith(target.handle(), argNames)); } ``` Hope this helps!
blackfizz/EazeGraph
EazeGraphLibrary/src/main/java/org/eazegraph/lib/charts/ValueLineChart.java
ValueLineChart.clearChart
@Override public void clearChart() { mSeries.clear(); mStandardValues.clear(); mFocusedPoint = null; mLastPoint = null; }
java
@Override public void clearChart() { mSeries.clear(); mStandardValues.clear(); mFocusedPoint = null; mLastPoint = null; }
[ "@", "Override", "public", "void", "clearChart", "(", ")", "{", "mSeries", ".", "clear", "(", ")", ";", "mStandardValues", ".", "clear", "(", ")", ";", "mFocusedPoint", "=", "null", ";", "mLastPoint", "=", "null", ";", "}" ]
Resets and clears the data object.
[ "Resets", "and", "clears", "the", "data", "object", "." ]
ce5e68ecc70e154f83bbb2fcce1a970db125c1e6
https://github.com/blackfizz/EazeGraph/blob/ce5e68ecc70e154f83bbb2fcce1a970db125c1e6/EazeGraphLibrary/src/main/java/org/eazegraph/lib/charts/ValueLineChart.java#L170-L176
train
Clear the chart.
Create a Java method that does the following: "Clear the chart.".
Of course, here is the Java code you requested: ```java @Override public void clearChart() { mSeries.clear(); mStandardValues.clear(); mFocusedPoint = null; mLastPoint = null; } ``` Hope this helps!
lessthanoptimal/BoofCV
main/boofcv-geo/src/main/java/boofcv/alg/geo/structure/DecomposeAbsoluteDualQuadratic.java
DecomposeAbsoluteDualQuadratic.decompose
public boolean decompose( DMatrix4x4 Q ) { // scale Q so that Q(3,3) = 1 to provide a uniform scaling CommonOps_DDF4.scale(1.0/Q.a33,Q); // TODO consider using eigen decomposition like it was suggested // Directly extract from the definition of Q // Q = [w -w*p;-p'*w p'*w*p] // w = k*k' k.a11 = Q.a11;k...
java
public boolean decompose( DMatrix4x4 Q ) { // scale Q so that Q(3,3) = 1 to provide a uniform scaling CommonOps_DDF4.scale(1.0/Q.a33,Q); // TODO consider using eigen decomposition like it was suggested // Directly extract from the definition of Q // Q = [w -w*p;-p'*w p'*w*p] // w = k*k' k.a11 = Q.a11;k...
[ "public", "boolean", "decompose", "(", "DMatrix4x4", "Q", ")", "{", "// scale Q so that Q(3,3) = 1 to provide a uniform scaling", "CommonOps_DDF4", ".", "scale", "(", "1.0", "/", "Q", ".", "a33", ",", "Q", ")", ";", "// TODO consider using eigen decomposition like it was ...
Decomposes the passed in absolute quadratic @param Q Absolute quadratic @return true if successful or false if it failed
[ "Decomposes", "the", "passed", "in", "absolute", "quadratic" ]
f01c0243da0ec086285ee722183804d5923bc3ac
https://github.com/lessthanoptimal/BoofCV/blob/f01c0243da0ec086285ee722183804d5923bc3ac/main/boofcv-geo/src/main/java/boofcv/alg/geo/structure/DecomposeAbsoluteDualQuadratic.java#L54-L92
train
Decomposes the input matrix.
Create a Java method that does the following: "Decomposes the input matrix.".
Of course, here is the Java code you requested: ```java public boolean decompose( DMatrix4x4 Q ) { // scale Q so that Q(3,3) = 1 to provide a uniform scaling CommonOps_DDF4.scale(1.0/Q.a33,Q); // TODO consider using eigen decomposition like it was suggested // Directly extract from the definition of Q // ...
copper-engine/copper-engine
projects/copper-coreengine/src/main/java/org/copperengine/core/Workflow.java
Workflow.wait
protected final void wait(final WaitMode mode, final long timeout, final TimeUnit timeUnit, final String... correlationIds) throws Interrupt { if (correlationIds.length == 0) throw new IllegalArgumentException(); updateLastWaitStackTrace(); for (int i = 0; i < correlationIds.leng...
java
protected final void wait(final WaitMode mode, final long timeout, final TimeUnit timeUnit, final String... correlationIds) throws Interrupt { if (correlationIds.length == 0) throw new IllegalArgumentException(); updateLastWaitStackTrace(); for (int i = 0; i < correlationIds.leng...
[ "protected", "final", "void", "wait", "(", "final", "WaitMode", "mode", ",", "final", "long", "timeout", ",", "final", "TimeUnit", "timeUnit", ",", "final", "String", "...", "correlationIds", ")", "throws", "Interrupt", "{", "if", "(", "correlationIds", ".", ...
Generic wait/sleep. In case of WaitMode FIRST, it waits until at least one response for the specified correlation ids occurs. In case of WaitMode ALL, it waits until a response for every specified correlation id occurs. @param mode WaitMode @param timeout timeout or {@link Workflow#NO_TIMEOUT} (or any value &le; 0) to...
[ "Generic", "wait", "/", "sleep", ".", "In", "case", "of", "WaitMode", "FIRST", "it", "waits", "until", "at", "least", "one", "response", "for", "the", "specified", "correlation", "ids", "occurs", ".", "In", "case", "of", "WaitMode", "ALL", "it", "waits", ...
92acf748a1be3d2d49e86b04e180bd19b1745c15
https://github.com/copper-engine/copper-engine/blob/92acf748a1be3d2d49e86b04e180bd19b1745c15/projects/copper-coreengine/src/main/java/org/copperengine/core/Workflow.java#L244-L253
train
Wait for a timeout of a single instance of a CTYPE.
Create a Java method that does the following: "Wait for a timeout of a single instance of a CTYPE.".
Of course, here is the Java code you requested: ```java protected final void wait(final WaitMode mode, final long timeout, final TimeUnit timeUnit, final String... correlationIds) throws Interrupt { if (correlationIds.length == 0) throw new IllegalArgumentException(); updateLastWaitStack...
iipc/webarchive-commons
src/main/java/org/archive/io/warc/WARCReader.java
WARCReader.main
public static void main(String [] args) throws ParseException, IOException, java.text.ParseException { Options options = getOptions(); PosixParser parser = new PosixParser(); CommandLine cmdline = parser.parse(options, args, false); @SuppressWarnings("unchecked") List<String>...
java
public static void main(String [] args) throws ParseException, IOException, java.text.ParseException { Options options = getOptions(); PosixParser parser = new PosixParser(); CommandLine cmdline = parser.parse(options, args, false); @SuppressWarnings("unchecked") List<String>...
[ "public", "static", "void", "main", "(", "String", "[", "]", "args", ")", "throws", "ParseException", ",", "IOException", ",", "java", ".", "text", ".", "ParseException", "{", "Options", "options", "=", "getOptions", "(", ")", ";", "PosixParser", "parser", ...
Command-line interface to WARCReader. Here is the command-line interface: <pre> usage: java org.archive.io.arc.WARCReader [--offset=#] ARCFILE -h,--help Prints this message and exits. -o,--offset Outputs record at this offset into arc file.</pre> <p>Outputs using a pseudo-CDX format as described here: <a href...
[ "Command", "-", "line", "interface", "to", "WARCReader", "." ]
988bec707c27a01333becfc3bd502af4441ea1e1
https://github.com/iipc/webarchive-commons/blob/988bec707c27a01333becfc3bd502af4441ea1e1/src/main/java/org/archive/io/warc/WARCReader.java#L194-L286
train
Main method for the CSI Entry Class.
Create a Java method that does the following: "Main method for the CSI Entry Class.".
Of course, here is the Java code you requested: ```java public static void main(String [] args) throws ParseException, IOException, java.text.ParseException { Options options = getOptions(); PosixParser parser = new PosixParser(); CommandLine cmdline = parser.parse(options, args, false); ...
davidmarquis/fluent-interface-proxy
src/main/java/com/fluentinterface/beans/ObjectWrapper.java
ObjectWrapper.getValue
private static Object getValue(Object obj, String propertyPattern, ObjectWrapper options) { if (propertyPattern == null) { throw new IllegalArgumentException("Cannot get the value from a property with a 'null' propertyPattern."); } if (obj == null) { // NullPointerExcept...
java
private static Object getValue(Object obj, String propertyPattern, ObjectWrapper options) { if (propertyPattern == null) { throw new IllegalArgumentException("Cannot get the value from a property with a 'null' propertyPattern."); } if (obj == null) { // NullPointerExcept...
[ "private", "static", "Object", "getValue", "(", "Object", "obj", ",", "String", "propertyPattern", ",", "ObjectWrapper", "options", ")", "{", "if", "(", "propertyPattern", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Cannot get the v...
/* Internal static version of {@link ObjectWrapper#getValue(String)}.
[ "/", "*", "Internal", "static", "version", "of", "{" ]
8e72fff6cd1f496c76a01773269caead994fea65
https://github.com/davidmarquis/fluent-interface-proxy/blob/8e72fff6cd1f496c76a01773269caead994fea65/src/main/java/com/fluentinterface/beans/ObjectWrapper.java#L517-L558
train
Gets the value of a property in an object.
Create a Java method that does the following: "Gets the value of a property in an object.".
Of course, here is the Java code you requested: ```java private static Object getValue(Object obj, String propertyPattern, ObjectWrapper options) { if (propertyPattern == null) { throw new IllegalArgumentException("Cannot get the value from a property with a 'null' propertyPattern."); } ...
mozilla/rhino
src/org/mozilla/javascript/Context.java
Context.reportWarning
public static void reportWarning(String message, String sourceName, int lineno, String lineSource, int lineOffset) { Context cx = Context.getContext(); if (cx.hasFeature(FEATURE_WARNING_AS_ERROR)) reportError(messa...
java
public static void reportWarning(String message, String sourceName, int lineno, String lineSource, int lineOffset) { Context cx = Context.getContext(); if (cx.hasFeature(FEATURE_WARNING_AS_ERROR)) reportError(messa...
[ "public", "static", "void", "reportWarning", "(", "String", "message", ",", "String", "sourceName", ",", "int", "lineno", ",", "String", "lineSource", ",", "int", "lineOffset", ")", "{", "Context", "cx", "=", "Context", ".", "getContext", "(", ")", ";", "i...
Report a warning using the error reporter for the current thread. @param message the warning message to report @param sourceName a string describing the source, such as a filename @param lineno the starting line number @param lineSource the text of the line (may be null) @param lineOffset the offset into lineSource wh...
[ "Report", "a", "warning", "using", "the", "error", "reporter", "for", "the", "current", "thread", "." ]
fa8a86df11d37623f5faa8d445a5876612bc47b0
https://github.com/mozilla/rhino/blob/fa8a86df11d37623f5faa8d445a5876612bc47b0/src/org/mozilla/javascript/Context.java#L911-L921
train
Report a warning.
Create a Java method that does the following: "Report a warning.".
Of course, here is the Java code you requested: ```java public static void reportWarning(String message, String sourceName, int lineno, String lineSource, int lineOffset) { Context cx = Context.getContext(); if (cx.hasFeature...
neoremind/navi
navi-demo-client/src/main/java/com/baidu/beidou/sample/util/RandomUtils.java
RandomUtils.generateZeroString
public static String generateZeroString(int length) { StringBuffer sb = new StringBuffer(); for (int i = 0; i < length; i++) { sb.append('0'); } return sb.toString(); }
java
public static String generateZeroString(int length) { StringBuffer sb = new StringBuffer(); for (int i = 0; i < length; i++) { sb.append('0'); } return sb.toString(); }
[ "public", "static", "String", "generateZeroString", "(", "int", "length", ")", "{", "StringBuffer", "sb", "=", "new", "StringBuffer", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "length", ";", "i", "++", ")", "{", "sb", ".", "ap...
生成一个定长的纯0字符串 @param length 字符串长度 @return 纯0字符串
[ "生成一个定长的纯0字符串" ]
d37e4b46ef07d124be2740ad3d85d87e939acc84
https://github.com/neoremind/navi/blob/d37e4b46ef07d124be2740ad3d85d87e939acc84/navi-demo-client/src/main/java/com/baidu/beidou/sample/util/RandomUtils.java#L67-L73
train
Generate a zero - terminated string of the specified length.
Create a Java method that does the following: "Generate a zero - terminated string of the specified length.".
Of course, here is the Java code you requested: ```java public static String generateZeroString(int length) { StringBuffer sb = new StringBuffer(); for (int i = 0; i < length; i++) { sb.append('0'); } return sb.toString(); } ``` Hope this helps!
raydac/java-comment-preprocessor
jcp/src/main/java/com/igormaznitsa/jcp/expression/ExpressionTreeElement.java
ExpressionTreeElement.fillArguments
public void fillArguments(@Nonnull @MustNotContainNull final List<ExpressionTree> arguments) { assertNotEmptySlot(); if (arguments == null) { throw new PreprocessorException("[Expression]Argument list is null", this.sourceString, this.includeStack, null); } if (childElements.length != arguments....
java
public void fillArguments(@Nonnull @MustNotContainNull final List<ExpressionTree> arguments) { assertNotEmptySlot(); if (arguments == null) { throw new PreprocessorException("[Expression]Argument list is null", this.sourceString, this.includeStack, null); } if (childElements.length != arguments....
[ "public", "void", "fillArguments", "(", "@", "Nonnull", "@", "MustNotContainNull", "final", "List", "<", "ExpressionTree", ">", "arguments", ")", "{", "assertNotEmptySlot", "(", ")", ";", "if", "(", "arguments", "==", "null", ")", "{", "throw", "new", "Prepr...
It fills children slots from a list containing expression trees @param arguments the list containing trees to be used as children
[ "It", "fills", "children", "slots", "from", "a", "list", "containing", "expression", "trees" ]
83ac87b575ac084914d77695a8c8673de3b8300c
https://github.com/raydac/java-comment-preprocessor/blob/83ac87b575ac084914d77695a8c8673de3b8300c/jcp/src/main/java/com/igormaznitsa/jcp/expression/ExpressionTreeElement.java#L310-L340
train
Fill the arguments list.
Create a Java method that does the following: "Fill the arguments list.".
Of course, here is the Java code you requested: ```java public void fillArguments(@Nonnull @MustNotContainNull final List<ExpressionTree> arguments) { assertNotEmptySlot(); if (arguments == null) { throw new PreprocessorException("[Expression]Argument list is null", this.sourceString, this.includeStack,...
Netflix/hollow
hollow/src/main/java/com/netflix/hollow/api/client/HollowUpdatePlanner.java
HollowUpdatePlanner.snapshotPlan
private HollowUpdatePlan snapshotPlan(long desiredVersion) { HollowUpdatePlan plan = new HollowUpdatePlan(); long nearestPreviousSnapshotVersion = includeNearestSnapshot(plan, desiredVersion); // The includeNearestSnapshot function returns a snapshot version that is less than or equal to the de...
java
private HollowUpdatePlan snapshotPlan(long desiredVersion) { HollowUpdatePlan plan = new HollowUpdatePlan(); long nearestPreviousSnapshotVersion = includeNearestSnapshot(plan, desiredVersion); // The includeNearestSnapshot function returns a snapshot version that is less than or equal to the de...
[ "private", "HollowUpdatePlan", "snapshotPlan", "(", "long", "desiredVersion", ")", "{", "HollowUpdatePlan", "plan", "=", "new", "HollowUpdatePlan", "(", ")", ";", "long", "nearestPreviousSnapshotVersion", "=", "includeNearestSnapshot", "(", "plan", ",", "desiredVersion"...
Returns an update plan that if executed will update the client to a version that is either equal to or as close to but less than the desired version as possible. This plan normally contains one snapshot transition and zero or more delta transitions but if no previous versions were found then an empty plan, {@code Hollo...
[ "Returns", "an", "update", "plan", "that", "if", "executed", "will", "update", "the", "client", "to", "a", "version", "that", "is", "either", "equal", "to", "or", "as", "close", "to", "but", "less", "than", "the", "desired", "version", "as", "possible", ...
43ca100034a01050fb764170bd32b085ac9a3c22
https://github.com/Netflix/hollow/blob/43ca100034a01050fb764170bd32b085ac9a3c22/hollow/src/main/java/com/netflix/hollow/api/client/HollowUpdatePlanner.java#L105-L121
test
Create a plan for the snapshot of the current Hollow instance.
Create a Java method that does the following: "Create a plan for the snapshot of the current Hollow instance.".
Of course, here is the Java code you requested: ```java private HollowUpdatePlan snapshotPlan(long desiredVersion) { HollowUpdatePlan plan = new HollowUpdatePlan(); long nearestPreviousSnapshotVersion = includeNearestSnapshot(plan, desiredVersion); // The includeNearestSnapshot function return...
aws/aws-sdk-java
aws-java-sdk-route53/src/main/java/com/amazonaws/services/route53domains/model/UpdateTagsForDomainRequest.java
UpdateTagsForDomainRequest.getTagsToUpdate
public java.util.List<Tag> getTagsToUpdate() { if (tagsToUpdate == null) { tagsToUpdate = new com.amazonaws.internal.SdkInternalList<Tag>(); } return tagsToUpdate; }
java
public java.util.List<Tag> getTagsToUpdate() { if (tagsToUpdate == null) { tagsToUpdate = new com.amazonaws.internal.SdkInternalList<Tag>(); } return tagsToUpdate; }
[ "public", "java", ".", "util", ".", "List", "<", "Tag", ">", "getTagsToUpdate", "(", ")", "{", "if", "(", "tagsToUpdate", "==", "null", ")", "{", "tagsToUpdate", "=", "new", "com", ".", "amazonaws", ".", "internal", ".", "SdkInternalList", "<", "Tag", ...
<p> A list of the tag keys and values that you want to add or update. If you specify a key that already exists, the corresponding value will be replaced. </p> @return A list of the tag keys and values that you want to add or update. If you specify a key that already exists, the corresponding value will be replaced.
[ "<p", ">", "A", "list", "of", "the", "tag", "keys", "and", "values", "that", "you", "want", "to", "add", "or", "update", ".", "If", "you", "specify", "a", "key", "that", "already", "exists", "the", "corresponding", "value", "will", "be", "replaced", "....
aa38502458969b2d13a1c3665a56aba600e4dbd0
https://github.com/aws/aws-sdk-java/blob/aa38502458969b2d13a1c3665a56aba600e4dbd0/aws-java-sdk-route53/src/main/java/com/amazonaws/services/route53domains/model/UpdateTagsForDomainRequest.java#L95-L100
train
Gets the value of the tagsToUpdate property.
Create a Java method that does the following: "Gets the value of the tagsToUpdate property.".
Of course, here is the Java code you requested: ```java public java.util.List<Tag> getTagsToUpdate() { if (tagsToUpdate == null) { tagsToUpdate = new com.amazonaws.internal.SdkInternalList<Tag>(); } return tagsToUpdate; } ``` Hope this helps!
seedstack/jms-addon
src/main/java/org/seedstack/jms/internal/JmsPlugin.java
JmsPlugin.registerConnection
public void registerConnection(Connection connection, ConnectionDefinition connectionDefinition) { checkNotNull(connection); checkNotNull(connectionDefinition); if (this.connectionDefinitions.putIfAbsent(connectionDefinition.getName(), connectionDefinition) != null) { throw SeedExce...
java
public void registerConnection(Connection connection, ConnectionDefinition connectionDefinition) { checkNotNull(connection); checkNotNull(connectionDefinition); if (this.connectionDefinitions.putIfAbsent(connectionDefinition.getName(), connectionDefinition) != null) { throw SeedExce...
[ "public", "void", "registerConnection", "(", "Connection", "connection", ",", "ConnectionDefinition", "connectionDefinition", ")", "{", "checkNotNull", "(", "connection", ")", ";", "checkNotNull", "(", "connectionDefinition", ")", ";", "if", "(", "this", ".", "conne...
Register an existing JMS connection to be managed by the JMS plugin. @param connection the connection. @param connectionDefinition the connection definition.
[ "Register", "an", "existing", "JMS", "connection", "to", "be", "managed", "by", "the", "JMS", "plugin", "." ]
d6014811daaac29f591b32bfd2358500fb25d804
https://github.com/seedstack/jms-addon/blob/d6014811daaac29f591b32bfd2358500fb25d804/src/main/java/org/seedstack/jms/internal/JmsPlugin.java#L299-L318
train
Registers a connection with the application.
Create a Java method that does the following: "Registers a connection with the application.".
Of course, here is the Java code you requested: ```java public void registerConnection(Connection connection, ConnectionDefinition connectionDefinition) { checkNotNull(connection); checkNotNull(connectionDefinition); if (this.connectionDefinitions.putIfAbsent(connectionDefinition.getName(), co...
box/box-java-sdk
src/main/java/com/box/sdk/BoxTrash.java
BoxTrash.deleteFile
public void deleteFile(String fileID) { URL url = FILE_INFO_URL_TEMPLATE.build(this.api.getBaseURL(), fileID); BoxAPIRequest request = new BoxAPIRequest(this.api, url, "DELETE"); BoxAPIResponse response = request.send(); response.disconnect(); }
java
public void deleteFile(String fileID) { URL url = FILE_INFO_URL_TEMPLATE.build(this.api.getBaseURL(), fileID); BoxAPIRequest request = new BoxAPIRequest(this.api, url, "DELETE"); BoxAPIResponse response = request.send(); response.disconnect(); }
[ "public", "void", "deleteFile", "(", "String", "fileID", ")", "{", "URL", "url", "=", "FILE_INFO_URL_TEMPLATE", ".", "build", "(", "this", ".", "api", ".", "getBaseURL", "(", ")", ",", "fileID", ")", ";", "BoxAPIRequest", "request", "=", "new", "BoxAPIRequ...
Permanently deletes a trashed file. @param fileID the ID of the trashed folder to permanently delete.
[ "Permanently", "deletes", "a", "trashed", "file", "." ]
35b4ba69417f9d6a002c19dfaab57527750ef349
https://github.com/box/box-java-sdk/blob/35b4ba69417f9d6a002c19dfaab57527750ef349/src/main/java/com/box/sdk/BoxTrash.java#L145-L150
train
Deletes a file from the file system.
Create a Java method that does the following: "Deletes a file from the file system.".
Of course, here is the Java code you requested: ```java public void deleteFile(String fileID) { URL url = FILE_INFO_URL_TEMPLATE.build(this.api.getBaseURL(), fileID); BoxAPIRequest request = new BoxAPIRequest(this.api, url, "DELETE"); BoxAPIResponse response = request.send(); response.d...
Azure/azure-sdk-for-java
datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/TrustedIdProvidersInner.java
TrustedIdProvidersInner.updateAsync
public ServiceFuture<TrustedIdProviderInner> updateAsync(String resourceGroupName, String accountName, String trustedIdProviderName, final ServiceCallback<TrustedIdProviderInner> serviceCallback) { return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, accountName, trustedIdProvider...
java
public ServiceFuture<TrustedIdProviderInner> updateAsync(String resourceGroupName, String accountName, String trustedIdProviderName, final ServiceCallback<TrustedIdProviderInner> serviceCallback) { return ServiceFuture.fromResponse(updateWithServiceResponseAsync(resourceGroupName, accountName, trustedIdProvider...
[ "public", "ServiceFuture", "<", "TrustedIdProviderInner", ">", "updateAsync", "(", "String", "resourceGroupName", ",", "String", "accountName", ",", "String", "trustedIdProviderName", ",", "final", "ServiceCallback", "<", "TrustedIdProviderInner", ">", "serviceCallback", ...
Updates the specified trusted identity provider. @param resourceGroupName The name of the Azure resource group. @param accountName The name of the Data Lake Store account. @param trustedIdProviderName The name of the trusted identity provider. This is used for differentiation of providers in the account. @param servic...
[ "Updates", "the", "specified", "trusted", "identity", "provider", "." ]
aab183ddc6686c82ec10386d5a683d2691039626
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/datalakestore/resource-manager/v2016_11_01/src/main/java/com/microsoft/azure/management/datalakestore/v2016_11_01/implementation/TrustedIdProvidersInner.java#L435-L437
train
Updates an existing CDN certificate.
Create a Java method that does the following: "Updates an existing CDN certificate.".
Of course, here is the Java code you requested: ```java public ServiceFuture<TrustedIdProviderInner> updateAsync(String resourceGroupName, String accountName, String trustedIdProviderName, final ServiceCallback<TrustedIdProviderInner> serviceCallback) { return ServiceFuture.fromResponse(updateWithServiceRespon...
nabedge/mixer2
src/main/java/org/mixer2/xhtml/AbstractJaxb.java
AbstractJaxb.removeCssClass
public <T extends AbstractJaxb> void removeCssClass(String clazz) { List<String> classList = this.getCssClass(); if (classList != null) { for (ListIterator<String> i = classList.listIterator(); i.hasNext();) { if (i.next().equals(clazz)) { i.remove(); ...
java
public <T extends AbstractJaxb> void removeCssClass(String clazz) { List<String> classList = this.getCssClass(); if (classList != null) { for (ListIterator<String> i = classList.listIterator(); i.hasNext();) { if (i.next().equals(clazz)) { i.remove(); ...
[ "public", "<", "T", "extends", "AbstractJaxb", ">", "void", "removeCssClass", "(", "String", "clazz", ")", "{", "List", "<", "String", ">", "classList", "=", "this", ".", "getCssClass", "(", ")", ";", "if", "(", "classList", "!=", "null", ")", "{", "fo...
<p> remove specified class attribute if having it. </p>
[ "<p", ">", "remove", "specified", "class", "attribute", "if", "having", "it", ".", "<", "/", "p", ">" ]
8c2db27cfcd65bf0b1e0242ef9362ebd8033777c
https://github.com/nabedge/mixer2/blob/8c2db27cfcd65bf0b1e0242ef9362ebd8033777c/src/main/java/org/mixer2/xhtml/AbstractJaxb.java#L850-L859
train
Remove the class name from the class list.
Create a Java method that does the following: "Remove the class name from the class list.".
Of course, here is the Java code you requested: ```java public <T extends AbstractJaxb> void removeCssClass(String clazz) { List<String> classList = this.getCssClass(); if (classList != null) { for (ListIterator<String> i = classList.listIterator(); i.hasNext();) { if (i.nex...