repository_name
stringlengths
7
54
func_path_in_repository
stringlengths
18
196
func_name
stringlengths
7
107
whole_func_string
stringlengths
76
3.82k
language
stringclasses
1 value
func_code_string
stringlengths
76
3.82k
func_code_tokens
listlengths
22
717
func_documentation_string
stringlengths
61
1.98k
func_documentation_tokens
listlengths
1
508
split_name
stringclasses
1 value
func_code_url
stringlengths
111
310
matthewhorridge/owlapi-gwt
owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLAnnotationPropertyImpl_CustomFieldSerializer.java
OWLAnnotationPropertyImpl_CustomFieldSerializer.deserializeInstance
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLAnnotationPropertyImpl instance) throws SerializationException { deserialize(streamReader, instance); }
java
@Override public void deserializeInstance(SerializationStreamReader streamReader, OWLAnnotationPropertyImpl instance) throws SerializationException { deserialize(streamReader, instance); }
[ "@", "Override", "public", "void", "deserializeInstance", "(", "SerializationStreamReader", "streamReader", ",", "OWLAnnotationPropertyImpl", "instance", ")", "throws", "SerializationException", "{", "deserialize", "(", "streamReader", ",", "instance", ")", ";", "}" ]
Deserializes the content of the object from the {@link com.google.gwt.user.client.rpc.SerializationStreamReader}. @param streamReader the {@link com.google.gwt.user.client.rpc.SerializationStreamReader} to read the object's content from @param instance the object instance to deserialize @throws com.google.gwt.user.clie...
[ "Deserializes", "the", "content", "of", "the", "object", "from", "the", "{" ]
train
https://github.com/matthewhorridge/owlapi-gwt/blob/7ab975fb6cef3c8947099983551672a3b5d4e2fd/owlapi-gwt-serialization/src/main/java/uk/ac/manchester/cs/owl/owlapi/OWLAnnotationPropertyImpl_CustomFieldSerializer.java#L83-L86
OpenLiberty/open-liberty
dev/com.ibm.ws.app.manager.wab/src/com/ibm/ws/app/manager/wab/internal/WAB.java
WAB.setState
private boolean setState(State newState) { switch (newState) { case DEPLOYED: return changeState(State.DEPLOYING, State.DEPLOYED); case DEPLOYING: //can move from either UNDEPLOYED or FAILED into DEPLOYING state return (changeState(State.UN...
java
private boolean setState(State newState) { switch (newState) { case DEPLOYED: return changeState(State.DEPLOYING, State.DEPLOYED); case DEPLOYING: //can move from either UNDEPLOYED or FAILED into DEPLOYING state return (changeState(State.UN...
[ "private", "boolean", "setState", "(", "State", "newState", ")", "{", "switch", "(", "newState", ")", "{", "case", "DEPLOYED", ":", "return", "changeState", "(", "State", ".", "DEPLOYING", ",", "State", ".", "DEPLOYED", ")", ";", "case", "DEPLOYING", ":", ...
state should only transition while the terminated lock is held. @param newState @return
[ "state", "should", "only", "transition", "while", "the", "terminated", "lock", "is", "held", "." ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.app.manager.wab/src/com/ibm/ws/app/manager/wab/internal/WAB.java#L262-L278
facebookarchive/hadoop-20
src/contrib/highavailability/src/java/org/apache/hadoop/hdfs/server/namenode/bookkeeper/metadata/BookKeeperJournalMetadataManager.java
BookKeeperJournalMetadataManager.deleteLedgerMetadata
public boolean deleteLedgerMetadata(EditLogLedgerMetadata ledger, int version) throws IOException { String ledgerPath = fullyQualifiedPathForLedger(ledger); try { zooKeeper.delete(ledgerPath, version); return true; } catch (KeeperException.NoNodeException e) { LOG.warn(ledgerPath + "...
java
public boolean deleteLedgerMetadata(EditLogLedgerMetadata ledger, int version) throws IOException { String ledgerPath = fullyQualifiedPathForLedger(ledger); try { zooKeeper.delete(ledgerPath, version); return true; } catch (KeeperException.NoNodeException e) { LOG.warn(ledgerPath + "...
[ "public", "boolean", "deleteLedgerMetadata", "(", "EditLogLedgerMetadata", "ledger", ",", "int", "version", ")", "throws", "IOException", "{", "String", "ledgerPath", "=", "fullyQualifiedPathForLedger", "(", "ledger", ")", ";", "try", "{", "zooKeeper", ".", "delete"...
Removes ledger-related Metadata from BookKeeper. Does not delete the ledger itself. @param ledger The object for the ledger metadata that we want to delete from BookKeeper @param version The version of the ledger metadata (or -1 to delete any version). Used as a way to guard against deleting a ledger metadata that is b...
[ "Removes", "ledger", "-", "related", "Metadata", "from", "BookKeeper", ".", "Does", "not", "delete", "the", "ledger", "itself", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/contrib/highavailability/src/java/org/apache/hadoop/hdfs/server/namenode/bookkeeper/metadata/BookKeeperJournalMetadataManager.java#L218-L237
rhuss/jolokia
agent/jmx/src/main/java/org/jolokia/jmx/JolokiaMBeanServerUtil.java
JolokiaMBeanServerUtil.getJolokiaMBeanServer
public static MBeanServer getJolokiaMBeanServer() { MBeanServer server = ManagementFactory.getPlatformMBeanServer(); MBeanServer jolokiaMBeanServer; try { jolokiaMBeanServer = (MBeanServer) server.getAttribute(createObjectName(JolokiaMBeanServerHolderMBean.OBJECT_...
java
public static MBeanServer getJolokiaMBeanServer() { MBeanServer server = ManagementFactory.getPlatformMBeanServer(); MBeanServer jolokiaMBeanServer; try { jolokiaMBeanServer = (MBeanServer) server.getAttribute(createObjectName(JolokiaMBeanServerHolderMBean.OBJECT_...
[ "public", "static", "MBeanServer", "getJolokiaMBeanServer", "(", ")", "{", "MBeanServer", "server", "=", "ManagementFactory", ".", "getPlatformMBeanServer", "(", ")", ";", "MBeanServer", "jolokiaMBeanServer", ";", "try", "{", "jolokiaMBeanServer", "=", "(", "MBeanServ...
Lookup the JolokiaMBean server via a JMX lookup to the Jolokia-internal MBean exposing this MBeanServer @return the Jolokia MBeanServer or null if not yet available present
[ "Lookup", "the", "JolokiaMBean", "server", "via", "a", "JMX", "lookup", "to", "the", "Jolokia", "-", "internal", "MBean", "exposing", "this", "MBeanServer" ]
train
https://github.com/rhuss/jolokia/blob/dc95e7bef859b1829776c5a84c8f7738f5d7d9c3/agent/jmx/src/main/java/org/jolokia/jmx/JolokiaMBeanServerUtil.java#L42-L58
haifengl/smile
core/src/main/java/smile/association/FPGrowth.java
FPGrowth.grow
private long grow(PrintStream out, List<ItemSet> list, TotalSupportTree ttree, HeaderTableItem header, int[] itemset, int[] localItemSupport, int[] prefixItemset) { long n = 1; int support = header.count; int item = header.id; itemset = insert(itemset, item); collect(out, list, ...
java
private long grow(PrintStream out, List<ItemSet> list, TotalSupportTree ttree, HeaderTableItem header, int[] itemset, int[] localItemSupport, int[] prefixItemset) { long n = 1; int support = header.count; int item = header.id; itemset = insert(itemset, item); collect(out, list, ...
[ "private", "long", "grow", "(", "PrintStream", "out", ",", "List", "<", "ItemSet", ">", "list", ",", "TotalSupportTree", "ttree", ",", "HeaderTableItem", "header", ",", "int", "[", "]", "itemset", ",", "int", "[", "]", "localItemSupport", ",", "int", "[", ...
Mines FP-tree with respect to a single element in the header table. @param header the header table item of interest. @param itemset the item set represented by the current FP-tree.
[ "Mines", "FP", "-", "tree", "with", "respect", "to", "a", "single", "element", "in", "the", "header", "table", "." ]
train
https://github.com/haifengl/smile/blob/e27e43e90fbaacce3f99d30120cf9dd6a764c33d/core/src/main/java/smile/association/FPGrowth.java#L393-L415
atomix/atomix
protocols/raft/src/main/java/io/atomix/protocols/raft/session/impl/MemberSelectorManager.java
MemberSelectorManager.resetAll
public void resetAll(MemberId leader, Collection<MemberId> members) { MemberId oldLeader = this.leader; this.leader = leader; this.members = Lists.newLinkedList(members); selectors.forEach(s -> s.reset(leader, this.members)); if (!Objects.equals(oldLeader, leader)) { leaderChangeListeners.forE...
java
public void resetAll(MemberId leader, Collection<MemberId> members) { MemberId oldLeader = this.leader; this.leader = leader; this.members = Lists.newLinkedList(members); selectors.forEach(s -> s.reset(leader, this.members)); if (!Objects.equals(oldLeader, leader)) { leaderChangeListeners.forE...
[ "public", "void", "resetAll", "(", "MemberId", "leader", ",", "Collection", "<", "MemberId", ">", "members", ")", "{", "MemberId", "oldLeader", "=", "this", ".", "leader", ";", "this", ".", "leader", "=", "leader", ";", "this", ".", "members", "=", "List...
Resets all child selectors. @param leader The current cluster leader. @param members The collection of all active members.
[ "Resets", "all", "child", "selectors", "." ]
train
https://github.com/atomix/atomix/blob/3a94b7c80576d762dd0d396d4645df07a0b37c31/protocols/raft/src/main/java/io/atomix/protocols/raft/session/impl/MemberSelectorManager.java#L99-L107
bazaarvoice/emodb
event/src/main/java/com/bazaarvoice/emodb/event/dedup/DefaultDedupEventStore.java
DefaultDedupEventStore.getQueueReadWrite
@Nullable private DedupQueue getQueueReadWrite(String queue, Duration waitDuration) { return _ownerGroup.startIfOwner(queue, waitDuration); }
java
@Nullable private DedupQueue getQueueReadWrite(String queue, Duration waitDuration) { return _ownerGroup.startIfOwner(queue, waitDuration); }
[ "@", "Nullable", "private", "DedupQueue", "getQueueReadWrite", "(", "String", "queue", ",", "Duration", "waitDuration", ")", "{", "return", "_ownerGroup", ".", "startIfOwner", "(", "queue", ",", "waitDuration", ")", ";", "}" ]
Returns the mutable persistent sorted queue if managed by this JVM, {@code null} otherwise.
[ "Returns", "the", "mutable", "persistent", "sorted", "queue", "if", "managed", "by", "this", "JVM", "{" ]
train
https://github.com/bazaarvoice/emodb/blob/97ec7671bc78b47fc2a1c11298c0c872bd5ec7fb/event/src/main/java/com/bazaarvoice/emodb/event/dedup/DefaultDedupEventStore.java#L162-L165
wildfly/wildfly-core
protocol/src/main/java/org/jboss/as/protocol/mgmt/FutureManagementChannel.java
FutureManagementChannel.openChannel
final Channel openChannel(final Connection connection, final String serviceType, final OptionMap options, final Long deadline) throws IOException { final IoFuture<Channel> futureChannel = connection.openChannel(serviceType, options); long waitTime = deadline == null ? 10000 : Math.max(10000, deadline - ...
java
final Channel openChannel(final Connection connection, final String serviceType, final OptionMap options, final Long deadline) throws IOException { final IoFuture<Channel> futureChannel = connection.openChannel(serviceType, options); long waitTime = deadline == null ? 10000 : Math.max(10000, deadline - ...
[ "final", "Channel", "openChannel", "(", "final", "Connection", "connection", ",", "final", "String", "serviceType", ",", "final", "OptionMap", "options", ",", "final", "Long", "deadline", ")", "throws", "IOException", "{", "final", "IoFuture", "<", "Channel", ">...
Open a channel. @param connection the connection @param serviceType the service type @param options the channel options @param deadline time, in ms since the epoch, by which the channel must be created, or {@code null} if the caller is not imposing a specific deadline. Ignored if less than 10s from the current time, w...
[ "Open", "a", "channel", "." ]
train
https://github.com/wildfly/wildfly-core/blob/cfaf0479dcbb2d320a44c5374b93b944ec39fade/protocol/src/main/java/org/jboss/as/protocol/mgmt/FutureManagementChannel.java#L169-L178
xcesco/kripton
kripton/src/main/java/com/abubusoft/kripton/xml/XMLParser.java
XMLParser.readComment
private String readComment(boolean returnText) throws IOException, KriptonRuntimeException { read(START_COMMENT); if (relaxed) { return readUntil(END_COMMENT, returnText); } String commentText = readUntil(COMMENT_DOUBLE_DASH, returnText); if (peekCharacter() != '>') { throw new KriptonRuntimeException...
java
private String readComment(boolean returnText) throws IOException, KriptonRuntimeException { read(START_COMMENT); if (relaxed) { return readUntil(END_COMMENT, returnText); } String commentText = readUntil(COMMENT_DOUBLE_DASH, returnText); if (peekCharacter() != '>') { throw new KriptonRuntimeException...
[ "private", "String", "readComment", "(", "boolean", "returnText", ")", "throws", "IOException", ",", "KriptonRuntimeException", "{", "read", "(", "START_COMMENT", ")", ";", "if", "(", "relaxed", ")", "{", "return", "readUntil", "(", "END_COMMENT", ",", "returnTe...
Read comment. @param returnText the return text @return the string @throws IOException Signals that an I/O exception has occurred. @throws KriptonRuntimeException the kripton runtime exception
[ "Read", "comment", "." ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton/src/main/java/com/abubusoft/kripton/xml/XMLParser.java#L717-L730
ReactiveX/RxJavaAsyncUtil
src/main/java/rx/util/async/Async.java
Async.toAsync
public static <R> FuncN<Observable<R>> toAsync(FuncN<? extends R> func) { return toAsync(func, Schedulers.computation()); }
java
public static <R> FuncN<Observable<R>> toAsync(FuncN<? extends R> func) { return toAsync(func, Schedulers.computation()); }
[ "public", "static", "<", "R", ">", "FuncN", "<", "Observable", "<", "R", ">", ">", "toAsync", "(", "FuncN", "<", "?", "extends", "R", ">", "func", ")", "{", "return", "toAsync", "(", "func", ",", "Schedulers", ".", "computation", "(", ")", ")", ";"...
Convert a synchronous function call into an asynchronous function call through an Observable. <p> <img width="640" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/toAsync.png" alt=""> @param <R> the result type @param func the function to convert @return a function that returns an Observable that...
[ "Convert", "a", "synchronous", "function", "call", "into", "an", "asynchronous", "function", "call", "through", "an", "Observable", ".", "<p", ">", "<img", "width", "=", "640", "src", "=", "https", ":", "//", "raw", ".", "github", ".", "com", "/", "wiki"...
train
https://github.com/ReactiveX/RxJavaAsyncUtil/blob/6294e1da30e639df79f76399906229314c14e74d/src/main/java/rx/util/async/Async.java#L734-L736
looly/hutool
hutool-poi/src/main/java/cn/hutool/poi/excel/ExcelUtil.java
ExcelUtil.readBySax
public static void readBySax(String path, int sheetIndex, RowHandler rowHandler) { BufferedInputStream in = null; try { in = FileUtil.getInputStream(path); readBySax(in, sheetIndex, rowHandler); } finally { IoUtil.close(in); } }
java
public static void readBySax(String path, int sheetIndex, RowHandler rowHandler) { BufferedInputStream in = null; try { in = FileUtil.getInputStream(path); readBySax(in, sheetIndex, rowHandler); } finally { IoUtil.close(in); } }
[ "public", "static", "void", "readBySax", "(", "String", "path", ",", "int", "sheetIndex", ",", "RowHandler", "rowHandler", ")", "{", "BufferedInputStream", "in", "=", "null", ";", "try", "{", "in", "=", "FileUtil", ".", "getInputStream", "(", "path", ")", ...
通过Sax方式读取Excel,同时支持03和07格式 @param path Excel文件路径 @param sheetIndex sheet序号 @param rowHandler 行处理器 @since 3.2.0
[ "通过Sax方式读取Excel,同时支持03和07格式" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-poi/src/main/java/cn/hutool/poi/excel/ExcelUtil.java#L35-L43
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/tools/offlineImageViewer/ImageLoaderCurrent.java
ImageLoaderCurrent.processINodesUC
private void processINodesUC(DataInputStream in, ImageVisitor v, boolean skipBlocks) throws IOException { int numINUC = in.readInt(); v.visitEnclosingElement(ImageElement.INODES_UNDER_CONSTRUCTION, ImageElement.NUM_INODES_UNDER_CONSTRUCTION, numINUC); for(int i = 0; i < nu...
java
private void processINodesUC(DataInputStream in, ImageVisitor v, boolean skipBlocks) throws IOException { int numINUC = in.readInt(); v.visitEnclosingElement(ImageElement.INODES_UNDER_CONSTRUCTION, ImageElement.NUM_INODES_UNDER_CONSTRUCTION, numINUC); for(int i = 0; i < nu...
[ "private", "void", "processINodesUC", "(", "DataInputStream", "in", ",", "ImageVisitor", "v", ",", "boolean", "skipBlocks", ")", "throws", "IOException", "{", "int", "numINUC", "=", "in", ".", "readInt", "(", ")", ";", "v", ".", "visitEnclosingElement", "(", ...
Process the INodes under construction section of the fsimage. @param in DataInputStream to process @param v Visitor to walk over inodes @param skipBlocks Walk over each block?
[ "Process", "the", "INodes", "under", "construction", "section", "of", "the", "fsimage", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/tools/offlineImageViewer/ImageLoaderCurrent.java#L202-L250
zaproxy/zaproxy
src/org/parosproxy/paros/view/WorkbenchPanel.java
WorkbenchPanel.removePanels
private static void removePanels(TabbedPanel2 tabbedPanel, List<AbstractPanel> panels) { for (AbstractPanel panel : panels) { removeTabPanel(tabbedPanel, panel); } tabbedPanel.revalidate(); }
java
private static void removePanels(TabbedPanel2 tabbedPanel, List<AbstractPanel> panels) { for (AbstractPanel panel : panels) { removeTabPanel(tabbedPanel, panel); } tabbedPanel.revalidate(); }
[ "private", "static", "void", "removePanels", "(", "TabbedPanel2", "tabbedPanel", ",", "List", "<", "AbstractPanel", ">", "panels", ")", "{", "for", "(", "AbstractPanel", "panel", ":", "panels", ")", "{", "removeTabPanel", "(", "tabbedPanel", ",", "panel", ")",...
Removes the given {@code panels} from the given {@code tabbedPanel}. <p> After removing all the panels the tabbed panel is revalidated. @param tabbedPanel the tabbed panel to remove the panels @param panels the panels to remove @see #addPanel(TabbedPanel2, AbstractPanel, boolean) @see javax.swing.JComponent#revalidate...
[ "Removes", "the", "given", "{", "@code", "panels", "}", "from", "the", "given", "{", "@code", "tabbedPanel", "}", ".", "<p", ">", "After", "removing", "all", "the", "panels", "the", "tabbed", "panel", "is", "revalidated", "." ]
train
https://github.com/zaproxy/zaproxy/blob/0cbe5121f2ae1ecca222513d182759210c569bec/src/org/parosproxy/paros/view/WorkbenchPanel.java#L978-L983
UrielCh/ovh-java-sdk
ovh-java-sdk-dbaaslogs/src/main/java/net/minidev/ovh/api/ApiOvhDbaaslogs.java
ApiOvhDbaaslogs.serviceName_role_roleId_member_username_GET
public OvhMember serviceName_role_roleId_member_username_GET(String serviceName, String roleId, String username) throws IOException { String qPath = "/dbaas/logs/{serviceName}/role/{roleId}/member/{username}"; StringBuilder sb = path(qPath, serviceName, roleId, username); String resp = exec(qPath, "GET", sb.toStr...
java
public OvhMember serviceName_role_roleId_member_username_GET(String serviceName, String roleId, String username) throws IOException { String qPath = "/dbaas/logs/{serviceName}/role/{roleId}/member/{username}"; StringBuilder sb = path(qPath, serviceName, roleId, username); String resp = exec(qPath, "GET", sb.toStr...
[ "public", "OvhMember", "serviceName_role_roleId_member_username_GET", "(", "String", "serviceName", ",", "String", "roleId", ",", "String", "username", ")", "throws", "IOException", "{", "String", "qPath", "=", "\"/dbaas/logs/{serviceName}/role/{roleId}/member/{username}\"", ...
Returns the member metadata REST: GET /dbaas/logs/{serviceName}/role/{roleId}/member/{username} @param serviceName [required] Service name @param roleId [required] Role ID @param username [required] Username
[ "Returns", "the", "member", "metadata" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-dbaaslogs/src/main/java/net/minidev/ovh/api/ApiOvhDbaaslogs.java#L930-L935
nguillaumin/slick2d-maven
slick2d-core/src/main/java/org/newdawn/slick/Image.java
Image.drawSheared
public void drawSheared(float x,float y, float hshear, float vshear, Color filter) { if (alpha != 1) { if (filter == null) { filter = Color.white; } filter = new Color(filter); filter.a *= alpha; } if (filter != null) { filter.bind(); ...
java
public void drawSheared(float x,float y, float hshear, float vshear, Color filter) { if (alpha != 1) { if (filter == null) { filter = Color.white; } filter = new Color(filter); filter.a *= alpha; } if (filter != null) { filter.bind(); ...
[ "public", "void", "drawSheared", "(", "float", "x", ",", "float", "y", ",", "float", "hshear", ",", "float", "vshear", ",", "Color", "filter", ")", "{", "if", "(", "alpha", "!=", "1", ")", "{", "if", "(", "filter", "==", "null", ")", "{", "filter",...
Draw this image at a specified location and size @param x The x location to draw the image at @param y The y location to draw the image at @param hshear The amount to shear the bottom points by horizontally @param vshear The amount to shear the right points by vertically @param filter The colour filter to apply
[ "Draw", "this", "image", "at", "a", "specified", "location", "and", "size" ]
train
https://github.com/nguillaumin/slick2d-maven/blob/8251f88a0ed6a70e726d2468842455cd1f80893f/slick2d-core/src/main/java/org/newdawn/slick/Image.java#L709-L751
santhosh-tekuri/jlibs
core/src/main/java/jlibs/core/lang/ArrayUtil.java
ArrayUtil.startsWith
public static boolean startsWith(Object array1[], Object array2[]){ return equals(array1, 0, array2, 0, array2.length); }
java
public static boolean startsWith(Object array1[], Object array2[]){ return equals(array1, 0, array2, 0, array2.length); }
[ "public", "static", "boolean", "startsWith", "(", "Object", "array1", "[", "]", ",", "Object", "array2", "[", "]", ")", "{", "return", "equals", "(", "array1", ",", "0", ",", "array2", ",", "0", ",", "array2", ".", "length", ")", ";", "}" ]
Returns true if <code>array1</code> starts with <code>array2</code>
[ "Returns", "true", "if", "<code", ">", "array1<", "/", "code", ">", "starts", "with", "<code", ">", "array2<", "/", "code", ">" ]
train
https://github.com/santhosh-tekuri/jlibs/blob/59c28719f054123cf778278154e1b92e943ad232/core/src/main/java/jlibs/core/lang/ArrayUtil.java#L119-L121
pavlospt/RxFile
rxfile/src/main/java/com/pavlospt/rxfile/RxFile.java
RxFile.createFilesFromClipData
public static Observable<List<File>> createFilesFromClipData(final Context context, final ClipData clipData) { return createFilesFromClipData(context, clipData, MimeMap.UrlConnection); }
java
public static Observable<List<File>> createFilesFromClipData(final Context context, final ClipData clipData) { return createFilesFromClipData(context, clipData, MimeMap.UrlConnection); }
[ "public", "static", "Observable", "<", "List", "<", "File", ">", ">", "createFilesFromClipData", "(", "final", "Context", "context", ",", "final", "ClipData", "clipData", ")", "{", "return", "createFilesFromClipData", "(", "context", ",", "clipData", ",", "MimeM...
/* Create a copy of the files found under the ClipData item passed from MultiSelection, in the Library's cache folder. The mime type of the resource will be determined by URLConnection.guessContentTypeFromName() method.
[ "/", "*", "Create", "a", "copy", "of", "the", "files", "found", "under", "the", "ClipData", "item", "passed", "from", "MultiSelection", "in", "the", "Library", "s", "cache", "folder", "." ]
train
https://github.com/pavlospt/RxFile/blob/54210b02631f4b27d31bea040eca86183136cf46/rxfile/src/main/java/com/pavlospt/rxfile/RxFile.java#L136-L140
alibaba/jstorm
jstorm-core/src/main/java/backtype/storm/utils/disruptor/RingBuffer.java
RingBuffer.tryPublishEvents
public boolean tryPublishEvents(EventTranslatorVararg<E> translator, Object[]... args) { return tryPublishEvents(translator, 0, args.length, args); }
java
public boolean tryPublishEvents(EventTranslatorVararg<E> translator, Object[]... args) { return tryPublishEvents(translator, 0, args.length, args); }
[ "public", "boolean", "tryPublishEvents", "(", "EventTranslatorVararg", "<", "E", ">", "translator", ",", "Object", "[", "]", "...", "args", ")", "{", "return", "tryPublishEvents", "(", "translator", ",", "0", ",", "args", ".", "length", ",", "args", ")", "...
Allows a variable number of user supplied arguments per event. @param translator The user specified translation for the event @param args User supplied arguments, one Object[] per event. @return true if the value was published, false if there was insufficient capacity. @see #publishEvents(com.lmax.disruptor.EventTrans...
[ "Allows", "a", "variable", "number", "of", "user", "supplied", "arguments", "per", "event", "." ]
train
https://github.com/alibaba/jstorm/blob/5d6cde22dbca7df3d6e6830bf94f98a6639ab559/jstorm-core/src/main/java/backtype/storm/utils/disruptor/RingBuffer.java#L787-L789
fuinorg/utils4j
src/main/java/org/fuin/utils4j/Utils4J.java
Utils4J.zipFile
private static void zipFile(final File srcFile, final String destPath, final ZipOutputStream out) throws IOException { final byte[] buf = new byte[1024]; try (final InputStream in = new BufferedInputStream(new FileInputStream(srcFile))) { final ZipEntry zipEntry = new ZipEntry(concatPat...
java
private static void zipFile(final File srcFile, final String destPath, final ZipOutputStream out) throws IOException { final byte[] buf = new byte[1024]; try (final InputStream in = new BufferedInputStream(new FileInputStream(srcFile))) { final ZipEntry zipEntry = new ZipEntry(concatPat...
[ "private", "static", "void", "zipFile", "(", "final", "File", "srcFile", ",", "final", "String", "destPath", ",", "final", "ZipOutputStream", "out", ")", "throws", "IOException", "{", "final", "byte", "[", "]", "buf", "=", "new", "byte", "[", "1024", "]", ...
Adds a file to a ZIP output stream. @param srcFile File to add - Cannot be <code>null</code>. @param destPath Path to use for the file - May be <code>null</code> or empty. @param out Destination stream - Cannot be <code>null</code>. @throws IOException Error writing to the output stream.
[ "Adds", "a", "file", "to", "a", "ZIP", "output", "stream", "." ]
train
https://github.com/fuinorg/utils4j/blob/71cf88e0a8d8ed67bbac513bf3cab165cd7e3280/src/main/java/org/fuin/utils4j/Utils4J.java#L1297-L1310
Azure/azure-sdk-for-java
compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachineScaleSetsInner.java
VirtualMachineScaleSetsInner.beginPowerOffAsync
public Observable<OperationStatusResponseInner> beginPowerOffAsync(String resourceGroupName, String vmScaleSetName) { return beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1<ServiceResponse<OperationStatusResponseInner>, OperationStatusResponseInner>() { @Overri...
java
public Observable<OperationStatusResponseInner> beginPowerOffAsync(String resourceGroupName, String vmScaleSetName) { return beginPowerOffWithServiceResponseAsync(resourceGroupName, vmScaleSetName).map(new Func1<ServiceResponse<OperationStatusResponseInner>, OperationStatusResponseInner>() { @Overri...
[ "public", "Observable", "<", "OperationStatusResponseInner", ">", "beginPowerOffAsync", "(", "String", "resourceGroupName", ",", "String", "vmScaleSetName", ")", "{", "return", "beginPowerOffWithServiceResponseAsync", "(", "resourceGroupName", ",", "vmScaleSetName", ")", "....
Power off (stop) one or more virtual machines in a VM scale set. Note that resources are still attached and you are getting charged for the resources. Instead, use deallocate to release resources and avoid charges. @param resourceGroupName The name of the resource group. @param vmScaleSetName The name of the VM scale ...
[ "Power", "off", "(", "stop", ")", "one", "or", "more", "virtual", "machines", "in", "a", "VM", "scale", "set", ".", "Note", "that", "resources", "are", "still", "attached", "and", "you", "are", "getting", "charged", "for", "the", "resources", ".", "Inste...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/compute/resource-manager/v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachineScaleSetsInner.java#L1901-L1908
elki-project/elki
elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/geometry/XYCurve.java
XYCurve.addAndSimplify
public void addAndSimplify(double x, double y) { // simplify curve when possible: final int len = data.size(); if (len >= 4) { // Look at the previous 2 points final double l1x = data.get(len - 4); final double l1y = data.get(len - 3); final double l2x = data.get(len - 2); fina...
java
public void addAndSimplify(double x, double y) { // simplify curve when possible: final int len = data.size(); if (len >= 4) { // Look at the previous 2 points final double l1x = data.get(len - 4); final double l1y = data.get(len - 3); final double l2x = data.get(len - 2); fina...
[ "public", "void", "addAndSimplify", "(", "double", "x", ",", "double", "y", ")", "{", "// simplify curve when possible:", "final", "int", "len", "=", "data", ".", "size", "(", ")", ";", "if", "(", "len", ">=", "4", ")", "{", "// Look at the previous 2 points...
Add a coordinate pair, performing curve simplification if possible. @param x X coordinate @param y Y coordinate
[ "Add", "a", "coordinate", "pair", "performing", "curve", "simplification", "if", "possible", "." ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/elki-core-math/src/main/java/de/lmu/ifi/dbs/elki/math/geometry/XYCurve.java#L149-L179
openbase/jul
exception/src/main/java/org/openbase/jul/exception/printer/ExceptionPrinter.java
ExceptionPrinter.printHistory
public static <T extends Throwable> void printHistory(final String message, final T th, final PrintStream stream) { printHistory(new CouldNotPerformException(message, th), new SystemPrinter(stream)); }
java
public static <T extends Throwable> void printHistory(final String message, final T th, final PrintStream stream) { printHistory(new CouldNotPerformException(message, th), new SystemPrinter(stream)); }
[ "public", "static", "<", "T", "extends", "Throwable", ">", "void", "printHistory", "(", "final", "String", "message", ",", "final", "T", "th", ",", "final", "PrintStream", "stream", ")", "{", "printHistory", "(", "new", "CouldNotPerformException", "(", "messag...
Print Exception messages without stack trace in non debug mode. Method prints recursive all messages of the given exception stack to get a history overview of the causes. In verbose mode (app -v) the stacktrace is printed in the end of history. The given message and the exception are bundled as new CouldNotPerformExcep...
[ "Print", "Exception", "messages", "without", "stack", "trace", "in", "non", "debug", "mode", ".", "Method", "prints", "recursive", "all", "messages", "of", "the", "given", "exception", "stack", "to", "get", "a", "history", "overview", "of", "the", "causes", ...
train
https://github.com/openbase/jul/blob/662e98c3a853085e475be54c3be3deb72193c72d/exception/src/main/java/org/openbase/jul/exception/printer/ExceptionPrinter.java#L237-L239
Azure/azure-sdk-for-java
sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ElasticPoolsInner.java
ElasticPoolsInner.beginUpdate
public ElasticPoolInner beginUpdate(String resourceGroupName, String serverName, String elasticPoolName, ElasticPoolUpdate parameters) { return beginUpdateWithServiceResponseAsync(resourceGroupName, serverName, elasticPoolName, parameters).toBlocking().single().body(); }
java
public ElasticPoolInner beginUpdate(String resourceGroupName, String serverName, String elasticPoolName, ElasticPoolUpdate parameters) { return beginUpdateWithServiceResponseAsync(resourceGroupName, serverName, elasticPoolName, parameters).toBlocking().single().body(); }
[ "public", "ElasticPoolInner", "beginUpdate", "(", "String", "resourceGroupName", ",", "String", "serverName", ",", "String", "elasticPoolName", ",", "ElasticPoolUpdate", "parameters", ")", "{", "return", "beginUpdateWithServiceResponseAsync", "(", "resourceGroupName", ",", ...
Updates an existing elastic pool. @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value from the Azure Resource Manager API or the portal. @param serverName The name of the server. @param elasticPoolName The name of the elastic pool to be updated. @param paramete...
[ "Updates", "an", "existing", "elastic", "pool", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/sql/resource-manager/v2014_04_01/src/main/java/com/microsoft/azure/management/sql/v2014_04_01/implementation/ElasticPoolsInner.java#L382-L384
lievendoclo/Valkyrie-RCP
valkyrie-rcp-core/src/main/java/org/valkyriercp/layout/GridBagLayoutBuilder.java
GridBagLayoutBuilder.appendLeftLabel
public GridBagLayoutBuilder appendLeftLabel(String labelKey, int colSpan) { final JLabel label = createLabel(labelKey); label.setHorizontalAlignment(SwingConstants.LEFT); return appendLabel(label, colSpan); }
java
public GridBagLayoutBuilder appendLeftLabel(String labelKey, int colSpan) { final JLabel label = createLabel(labelKey); label.setHorizontalAlignment(SwingConstants.LEFT); return appendLabel(label, colSpan); }
[ "public", "GridBagLayoutBuilder", "appendLeftLabel", "(", "String", "labelKey", ",", "int", "colSpan", ")", "{", "final", "JLabel", "label", "=", "createLabel", "(", "labelKey", ")", ";", "label", ".", "setHorizontalAlignment", "(", "SwingConstants", ".", "LEFT", ...
Appends a left-justified label to the end of the given line, using the provided string as the key to look in the {@link #setComponentFactory(ComponentFactory) ComponentFactory's}message bundle for the text to use. @param labelKey the key into the message bundle; if not found the key is used as the text to display @par...
[ "Appends", "a", "left", "-", "justified", "label", "to", "the", "end", "of", "the", "given", "line", "using", "the", "provided", "string", "as", "the", "key", "to", "look", "in", "the", "{", "@link", "#setComponentFactory", "(", "ComponentFactory", ")", "C...
train
https://github.com/lievendoclo/Valkyrie-RCP/blob/6aad6e640b348cda8f3b0841f6e42025233f1eb8/valkyrie-rcp-core/src/main/java/org/valkyriercp/layout/GridBagLayoutBuilder.java#L535-L539
Erudika/para
para-server/src/main/java/com/erudika/para/rest/RestUtils.java
RestUtils.readResourcePath
public static ParaObject readResourcePath(String appid, String path) { if (StringUtils.isBlank(appid) || StringUtils.isBlank(path) || !path.contains("/")) { return null; } try { URI uri = new URI(path); if (path.length() > 1) { path = path.startsWith("/") ? uri.getPath().substring(1) : uri.getPath();...
java
public static ParaObject readResourcePath(String appid, String path) { if (StringUtils.isBlank(appid) || StringUtils.isBlank(path) || !path.contains("/")) { return null; } try { URI uri = new URI(path); if (path.length() > 1) { path = path.startsWith("/") ? uri.getPath().substring(1) : uri.getPath();...
[ "public", "static", "ParaObject", "readResourcePath", "(", "String", "appid", ",", "String", "path", ")", "{", "if", "(", "StringUtils", ".", "isBlank", "(", "appid", ")", "||", "StringUtils", ".", "isBlank", "(", "path", ")", "||", "!", "path", ".", "co...
Reads an object from a given resource path. Assumes that the "id" is located after the first slash "/" like this: {type}/{id}/... @param appid app id @param path resource path @return the object found at this path or null
[ "Reads", "an", "object", "from", "a", "given", "resource", "path", ".", "Assumes", "that", "the", "id", "is", "located", "after", "the", "first", "slash", "/", "like", "this", ":", "{", "type", "}", "/", "{", "id", "}", "/", "..." ]
train
https://github.com/Erudika/para/blob/5ba096c477042ea7b18e9a0e8b5b1ee0f5bd6ce9/para-server/src/main/java/com/erudika/para/rest/RestUtils.java#L168-L191
FINRAOS/JTAF-ExtWebDriver
src/main/java/org/finra/jtaf/ewd/widget/element/Element.java
Element.waitForNotVisible
public void waitForNotVisible(final long time) throws WidgetException { try { waitForCommand(new ITimerCallback() { @Override public boolean execute() throws WidgetException { return !isVisible(); } @Override public String toString() { return "Waiting for element with locator: " + l...
java
public void waitForNotVisible(final long time) throws WidgetException { try { waitForCommand(new ITimerCallback() { @Override public boolean execute() throws WidgetException { return !isVisible(); } @Override public String toString() { return "Waiting for element with locator: " + l...
[ "public", "void", "waitForNotVisible", "(", "final", "long", "time", ")", "throws", "WidgetException", "{", "try", "{", "waitForCommand", "(", "new", "ITimerCallback", "(", ")", "{", "@", "Override", "public", "boolean", "execute", "(", ")", "throws", "WidgetE...
Waits for specific element at locator to be not visible within period of specified time @param time Milliseconds @throws WidgetException
[ "Waits", "for", "specific", "element", "at", "locator", "to", "be", "not", "visible", "within", "period", "of", "specified", "time" ]
train
https://github.com/FINRAOS/JTAF-ExtWebDriver/blob/78d646def1bf0904f79b19a81df0241e07f2c73a/src/main/java/org/finra/jtaf/ewd/widget/element/Element.java#L417-L434
intellimate/Izou
src/main/java/org/intellimate/izou/security/SocketPermissionModule.java
SocketPermissionModule.checkPermission
@Override public void checkPermission(Permission permission, AddOnModel addon) throws IzouPermissionException { for (String socket : allowedSocketConnections) { if (permission.getName().contains(socket)) { return; } } if (isRegistered(addon)) ...
java
@Override public void checkPermission(Permission permission, AddOnModel addon) throws IzouPermissionException { for (String socket : allowedSocketConnections) { if (permission.getName().contains(socket)) { return; } } if (isRegistered(addon)) ...
[ "@", "Override", "public", "void", "checkPermission", "(", "Permission", "permission", ",", "AddOnModel", "addon", ")", "throws", "IzouPermissionException", "{", "for", "(", "String", "socket", ":", "allowedSocketConnections", ")", "{", "if", "(", "permission", "....
Checks if the given addOn is allowed to access the requested service and registers them if not yet registered. @param permission the Permission to check @param addon the identifiable to check @throws IzouPermissionException thrown if the addOn is not allowed to access its requested service
[ "Checks", "if", "the", "given", "addOn", "is", "allowed", "to", "access", "the", "requested", "service", "and", "registers", "them", "if", "not", "yet", "registered", "." ]
train
https://github.com/intellimate/Izou/blob/40a808b97998e17655c4a78e30ce7326148aed27/src/main/java/org/intellimate/izou/security/SocketPermissionModule.java#L54-L83
Deep-Symmetry/beat-link
src/main/java/org/deepsymmetry/beatlink/VirtualCdj.java
VirtualCdj.findMatchingAddress
private InterfaceAddress findMatchingAddress(DeviceAnnouncement aDevice, NetworkInterface networkInterface) { for (InterfaceAddress address : networkInterface.getInterfaceAddresses()) { if ((address.getBroadcast() != null) && Util.sameNetwork(address.getNetworkPrefixLength(), aDe...
java
private InterfaceAddress findMatchingAddress(DeviceAnnouncement aDevice, NetworkInterface networkInterface) { for (InterfaceAddress address : networkInterface.getInterfaceAddresses()) { if ((address.getBroadcast() != null) && Util.sameNetwork(address.getNetworkPrefixLength(), aDe...
[ "private", "InterfaceAddress", "findMatchingAddress", "(", "DeviceAnnouncement", "aDevice", ",", "NetworkInterface", "networkInterface", ")", "{", "for", "(", "InterfaceAddress", "address", ":", "networkInterface", ".", "getInterfaceAddresses", "(", ")", ")", "{", "if",...
Scan a network interface to find if it has an address space which matches the device we are trying to reach. If so, return the address specification. @param aDevice the DJ Link device we are trying to communicate with @param networkInterface the network interface we are testing @return the address which can be used to...
[ "Scan", "a", "network", "interface", "to", "find", "if", "it", "has", "an", "address", "space", "which", "matches", "the", "device", "we", "are", "trying", "to", "reach", ".", "If", "so", "return", "the", "address", "specification", "." ]
train
https://github.com/Deep-Symmetry/beat-link/blob/f958a2a70e8a87a31a75326d7b4db77c2f0b4212/src/main/java/org/deepsymmetry/beatlink/VirtualCdj.java#L477-L485
ontop/ontop
mapping/sql/core/src/main/java/it/unibz/inf/ontop/spec/mapping/serializer/TurtleWriter.java
TurtleWriter.put
void put(String subject, String predicate, String object) { // Subject to Predicates map ArrayList<String> predicateList = subjectToPredicates.get(subject); if (predicateList == null) { predicateList = new ArrayList<String>(); } insert(predicateList, predicate); subjectToPredicates.put(subject, predicate...
java
void put(String subject, String predicate, String object) { // Subject to Predicates map ArrayList<String> predicateList = subjectToPredicates.get(subject); if (predicateList == null) { predicateList = new ArrayList<String>(); } insert(predicateList, predicate); subjectToPredicates.put(subject, predicate...
[ "void", "put", "(", "String", "subject", ",", "String", "predicate", ",", "String", "object", ")", "{", "// Subject to Predicates map", "ArrayList", "<", "String", ">", "predicateList", "=", "subjectToPredicates", ".", "get", "(", "subject", ")", ";", "if", "(...
Adding the subject, predicate and object components to this container. @param subject The subject term of the Function. @param predicate The Function predicate. @param object The object term of the Function.
[ "Adding", "the", "subject", "predicate", "and", "object", "components", "to", "this", "container", "." ]
train
https://github.com/ontop/ontop/blob/ddf78b26981b6129ee9a1a59310016830f5352e4/mapping/sql/core/src/main/java/it/unibz/inf/ontop/spec/mapping/serializer/TurtleWriter.java#L72-L88
ksclarke/vertx-pairtree
src/main/java/info/freelibrary/pairtree/PairtreeUtils.java
PairtreeUtils.getEncapsulatingDir
public static String getEncapsulatingDir(final String aBasePath, final String aPtPath) throws InvalidPathException { return getEncapsulatingDir(removeBasePath(aBasePath, aPtPath)); }
java
public static String getEncapsulatingDir(final String aBasePath, final String aPtPath) throws InvalidPathException { return getEncapsulatingDir(removeBasePath(aBasePath, aPtPath)); }
[ "public", "static", "String", "getEncapsulatingDir", "(", "final", "String", "aBasePath", ",", "final", "String", "aPtPath", ")", "throws", "InvalidPathException", "{", "return", "getEncapsulatingDir", "(", "removeBasePath", "(", "aBasePath", ",", "aPtPath", ")", ")...
Extracts the encapsulating directory from the supplied Pairtree path, using the supplied base path. @param aBasePath A base path for the Pairtree path @param aPtPath The Pairtree path @return The name of the encapsulating directory @throws InvalidPathException If there is a problem extracting the encapsulating directo...
[ "Extracts", "the", "encapsulating", "directory", "from", "the", "supplied", "Pairtree", "path", "using", "the", "supplied", "base", "path", "." ]
train
https://github.com/ksclarke/vertx-pairtree/blob/b2ea1e32057e5df262e9265540d346a732b718df/src/main/java/info/freelibrary/pairtree/PairtreeUtils.java#L236-L239
virgo47/javasimon
core/src/main/java/org/javasimon/callback/quantiles/FixedQuantilesCallback.java
FixedQuantilesCallback.createBuckets
@Override protected Buckets createBuckets(Stopwatch stopwatch) { return createBuckets(stopwatch, min * SimonClock.NANOS_IN_MILLIS, max * SimonClock.NANOS_IN_MILLIS, bucketNb); }
java
@Override protected Buckets createBuckets(Stopwatch stopwatch) { return createBuckets(stopwatch, min * SimonClock.NANOS_IN_MILLIS, max * SimonClock.NANOS_IN_MILLIS, bucketNb); }
[ "@", "Override", "protected", "Buckets", "createBuckets", "(", "Stopwatch", "stopwatch", ")", "{", "return", "createBuckets", "(", "stopwatch", ",", "min", "*", "SimonClock", ".", "NANOS_IN_MILLIS", ",", "max", "*", "SimonClock", ".", "NANOS_IN_MILLIS", ",", "bu...
Create buckets using callback attributes @param stopwatch Target stopwatch @return Created buckets
[ "Create", "buckets", "using", "callback", "attributes" ]
train
https://github.com/virgo47/javasimon/blob/17dfaa93cded9ce8ef64a134b28ccbf4d0284d2f/core/src/main/java/org/javasimon/callback/quantiles/FixedQuantilesCallback.java#L49-L52
DDTH/ddth-tsc
ddth-tsc-core/src/main/java/com/github/ddth/tsc/redis/ShardedRedisCounterFactory.java
ShardedRedisCounterFactory.newJedisPool
public static ShardedJedisPool newJedisPool(String hostsAndPorts, String password, long timeoutMs) { final int maxTotal = Runtime.getRuntime().availableProcessors(); final int maxIdle = maxTotal / 2; JedisPoolConfig poolConfig = new JedisPoolConfig(); poolConfig.setMaxTotal(...
java
public static ShardedJedisPool newJedisPool(String hostsAndPorts, String password, long timeoutMs) { final int maxTotal = Runtime.getRuntime().availableProcessors(); final int maxIdle = maxTotal / 2; JedisPoolConfig poolConfig = new JedisPoolConfig(); poolConfig.setMaxTotal(...
[ "public", "static", "ShardedJedisPool", "newJedisPool", "(", "String", "hostsAndPorts", ",", "String", "password", ",", "long", "timeoutMs", ")", "{", "final", "int", "maxTotal", "=", "Runtime", ".", "getRuntime", "(", ")", ".", "availableProcessors", "(", ")", ...
Creates a new {@link ShardedJedisPool}. @param hostsAndPorts format {@code host1:port1,host2:port2...} @param password @param timeoutMs @return
[ "Creates", "a", "new", "{", "@link", "ShardedJedisPool", "}", "." ]
train
https://github.com/DDTH/ddth-tsc/blob/d233c304c8fed2f3c069de42a36b7bbd5c8be01b/ddth-tsc-core/src/main/java/com/github/ddth/tsc/redis/ShardedRedisCounterFactory.java#L52-L78
wcm-io/wcm-io-handler
media/src/main/java/io/wcm/handler/media/format/impl/MediaFormatHandlerImpl.java
MediaFormatHandlerImpl.detectMediaFormat
@Override public MediaFormat detectMediaFormat(@Nullable String extension, long fileSize, long width, long height) { SortedSet<MediaFormat> matchingFormats = detectMediaFormats(extension, fileSize, width, height); return !matchingFormats.isEmpty() ? matchingFormats.first() : null; }
java
@Override public MediaFormat detectMediaFormat(@Nullable String extension, long fileSize, long width, long height) { SortedSet<MediaFormat> matchingFormats = detectMediaFormats(extension, fileSize, width, height); return !matchingFormats.isEmpty() ? matchingFormats.first() : null; }
[ "@", "Override", "public", "MediaFormat", "detectMediaFormat", "(", "@", "Nullable", "String", "extension", ",", "long", "fileSize", ",", "long", "width", ",", "long", "height", ")", "{", "SortedSet", "<", "MediaFormat", ">", "matchingFormats", "=", "detectMedia...
Detect matching media format. @param extension File extension @param fileSize File size @param width Image width (or 0 if not image) @param height Image height (or 0 if not image) @return Media format or null if no matching media format found
[ "Detect", "matching", "media", "format", "." ]
train
https://github.com/wcm-io/wcm-io-handler/blob/b0fc1c11a3ceb89efb73826dcfd480d6a00c19af/media/src/main/java/io/wcm/handler/media/format/impl/MediaFormatHandlerImpl.java#L260-L264
alkacon/opencms-core
src-modules/org/opencms/workplace/commons/CmsUndoChanges.java
CmsUndoChanges.resourceOriginalPath
public static String resourceOriginalPath(CmsObject cms, String resourceName) { CmsProject proj = cms.getRequestContext().getCurrentProject(); try { CmsResource resource = cms.readResource(resourceName, CmsResourceFilter.ALL); String result = cms.getSitePath(resource); ...
java
public static String resourceOriginalPath(CmsObject cms, String resourceName) { CmsProject proj = cms.getRequestContext().getCurrentProject(); try { CmsResource resource = cms.readResource(resourceName, CmsResourceFilter.ALL); String result = cms.getSitePath(resource); ...
[ "public", "static", "String", "resourceOriginalPath", "(", "CmsObject", "cms", ",", "String", "resourceName", ")", "{", "CmsProject", "proj", "=", "cms", ".", "getRequestContext", "(", ")", ".", "getCurrentProject", "(", ")", ";", "try", "{", "CmsResource", "r...
Returns the original path of given resource, that is the online path for the resource. If it differs from the offline path, the resource has been moved.<p> @param cms the cms context @param resourceName a site relative resource name @return the online path, or <code>null</code> if resource has not been published
[ "Returns", "the", "original", "path", "of", "given", "resource", "that", "is", "the", "online", "path", "for", "the", "resource", ".", "If", "it", "differs", "from", "the", "offline", "path", "the", "resource", "has", "been", "moved", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src-modules/org/opencms/workplace/commons/CmsUndoChanges.java#L128-L148
hazelcast/hazelcast
hazelcast/src/main/java/com/hazelcast/map/impl/query/PartitionScanRunner.java
PartitionScanRunner.run
public QueryableEntriesSegment run(String mapName, Predicate predicate, int partitionId, int tableIndex, int fetchSize) { int lastIndex = tableIndex; final List<QueryableEntry> resultList = new LinkedList<>(); final PartitionContainer partitionContainer = mapServiceContext.getPartitionContainer(...
java
public QueryableEntriesSegment run(String mapName, Predicate predicate, int partitionId, int tableIndex, int fetchSize) { int lastIndex = tableIndex; final List<QueryableEntry> resultList = new LinkedList<>(); final PartitionContainer partitionContainer = mapServiceContext.getPartitionContainer(...
[ "public", "QueryableEntriesSegment", "run", "(", "String", "mapName", ",", "Predicate", "predicate", ",", "int", "partitionId", ",", "int", "tableIndex", ",", "int", "fetchSize", ")", "{", "int", "lastIndex", "=", "tableIndex", ";", "final", "List", "<", "Quer...
Executes the predicate on a partition chunk. The offset in the partition is defined by the {@code tableIndex} and the soft limit is defined by the {@code fetchSize}. The method returns the matched entries and an index from which new entries can be fetched which allows for efficient iteration of query results. <p> <b>NO...
[ "Executes", "the", "predicate", "on", "a", "partition", "chunk", ".", "The", "offset", "in", "the", "partition", "is", "defined", "by", "the", "{", "@code", "tableIndex", "}", "and", "the", "soft", "limit", "is", "defined", "by", "the", "{", "@code", "fe...
train
https://github.com/hazelcast/hazelcast/blob/8c4bc10515dbbfb41a33e0302c0caedf3cda1baf/hazelcast/src/main/java/com/hazelcast/map/impl/query/PartitionScanRunner.java#L135-L157
ozimov/cirneco
hamcrest/hamcrest-matchers/src/main/java/it/ozimov/cirneco/hamcrest/base/IsBetweenLowerBoundInclusive.java
IsBetweenLowerBoundInclusive.betweenLowerBoundInclusive
public static <T extends Comparable<T>> Matcher<T> betweenLowerBoundInclusive(final T from, final T to) { return new IsBetweenLowerBoundInclusive(from, to); }
java
public static <T extends Comparable<T>> Matcher<T> betweenLowerBoundInclusive(final T from, final T to) { return new IsBetweenLowerBoundInclusive(from, to); }
[ "public", "static", "<", "T", "extends", "Comparable", "<", "T", ">", ">", "Matcher", "<", "T", ">", "betweenLowerBoundInclusive", "(", "final", "T", "from", ",", "final", "T", "to", ")", "{", "return", "new", "IsBetweenLowerBoundInclusive", "(", "from", "...
Creates a matcher for {@code T}s that matches when the <code>compareTo()</code> method returns a value between <code>from</code> and <code>to</code>, both included. <p> <p> <p> <p> <p>For example: <p> <p> <p> <p> <pre>assertThat(10, betweenLowerBoundInclusive(10, 11))</pre> will return true. while: <pre>assertThat(11...
[ "Creates", "a", "matcher", "for", "{", "@code", "T", "}", "s", "that", "matches", "when", "the", "<code", ">", "compareTo", "()", "<", "/", "code", ">", "method", "returns", "a", "value", "between", "<code", ">", "from<", "/", "code", ">", "and", "<c...
train
https://github.com/ozimov/cirneco/blob/78ad782da0a2256634cfbebb2f97ed78c993b999/hamcrest/hamcrest-matchers/src/main/java/it/ozimov/cirneco/hamcrest/base/IsBetweenLowerBoundInclusive.java#L53-L55
Impetus/Kundera
src/jpa-engine/core/src/main/java/com/impetus/kundera/query/KunderaQuery.java
KunderaQuery.parseOrdering
private void parseOrdering(String ordering) { final String comma = ","; final String space = " "; StringTokenizer tokenizer = new StringTokenizer(ordering, comma); sortOrders = new ArrayList<KunderaQuery.SortOrdering>(); while (tokenizer.hasMoreTokens()) { String or...
java
private void parseOrdering(String ordering) { final String comma = ","; final String space = " "; StringTokenizer tokenizer = new StringTokenizer(ordering, comma); sortOrders = new ArrayList<KunderaQuery.SortOrdering>(); while (tokenizer.hasMoreTokens()) { String or...
[ "private", "void", "parseOrdering", "(", "String", "ordering", ")", "{", "final", "String", "comma", "=", "\",\"", ";", "final", "String", "space", "=", "\" \"", ";", "StringTokenizer", "tokenizer", "=", "new", "StringTokenizer", "(", "ordering", ",", "comma",...
Parses the ordering @See Order By Clause. @param ordering the ordering
[ "Parses", "the", "ordering", "@See", "Order", "By", "Clause", "." ]
train
https://github.com/Impetus/Kundera/blob/268958ab1ec09d14ec4d9184f0c8ded7a9158908/src/jpa-engine/core/src/main/java/com/impetus/kundera/query/KunderaQuery.java#L1195-L1223
elki-project/elki
addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGUtil.java
SVGUtil.setAtt
public static void setAtt(Element el, String name, double d) { el.setAttribute(name, fmt(d)); }
java
public static void setAtt(Element el, String name, double d) { el.setAttribute(name, fmt(d)); }
[ "public", "static", "void", "setAtt", "(", "Element", "el", ",", "String", "name", ",", "double", "d", ")", "{", "el", ".", "setAttribute", "(", "name", ",", "fmt", "(", "d", ")", ")", ";", "}" ]
Set a SVG attribute @param el element @param name attribute name @param d double value
[ "Set", "a", "SVG", "attribute" ]
train
https://github.com/elki-project/elki/blob/b54673327e76198ecd4c8a2a901021f1a9174498/addons/batikvis/src/main/java/de/lmu/ifi/dbs/elki/visualization/svg/SVGUtil.java#L294-L296
alkacon/opencms-core
src/org/opencms/ade/sitemap/CmsVfsSitemapService.java
CmsVfsSitemapService.createNewResourceInfo
private CmsNewResourceInfo createNewResourceInfo(CmsObject cms, CmsResource modelResource, Locale locale) throws CmsException { // if model page got overwritten by another resource, reread from site path if (!cms.existsResource(modelResource.getStructureId(), CmsResourceFilter.ONLY_VISIBLE_NO_DELET...
java
private CmsNewResourceInfo createNewResourceInfo(CmsObject cms, CmsResource modelResource, Locale locale) throws CmsException { // if model page got overwritten by another resource, reread from site path if (!cms.existsResource(modelResource.getStructureId(), CmsResourceFilter.ONLY_VISIBLE_NO_DELET...
[ "private", "CmsNewResourceInfo", "createNewResourceInfo", "(", "CmsObject", "cms", ",", "CmsResource", "modelResource", ",", "Locale", "locale", ")", "throws", "CmsException", "{", "// if model page got overwritten by another resource, reread from site path", "if", "(", "!", ...
Creates a new resource info to a given model page resource.<p> @param cms the current CMS context @param modelResource the model page resource @param locale the locale used for retrieving descriptions/titles @return the new resource info @throws CmsException if something goes wrong
[ "Creates", "a", "new", "resource", "info", "to", "a", "given", "model", "page", "resource", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ade/sitemap/CmsVfsSitemapService.java#L1914-L1976
netty/netty
handler/src/main/java/io/netty/handler/ssl/SslContextBuilder.java
SslContextBuilder.trustManager
public SslContextBuilder trustManager(InputStream trustCertCollectionInputStream) { try { return trustManager(SslContext.toX509Certificates(trustCertCollectionInputStream)); } catch (Exception e) { throw new IllegalArgumentException("Input stream does not contain valid certificat...
java
public SslContextBuilder trustManager(InputStream trustCertCollectionInputStream) { try { return trustManager(SslContext.toX509Certificates(trustCertCollectionInputStream)); } catch (Exception e) { throw new IllegalArgumentException("Input stream does not contain valid certificat...
[ "public", "SslContextBuilder", "trustManager", "(", "InputStream", "trustCertCollectionInputStream", ")", "{", "try", "{", "return", "trustManager", "(", "SslContext", ".", "toX509Certificates", "(", "trustCertCollectionInputStream", ")", ")", ";", "}", "catch", "(", ...
Trusted certificates for verifying the remote endpoint's certificate. The input stream should contain an X.509 certificate collection in PEM format. {@code null} uses the system default.
[ "Trusted", "certificates", "for", "verifying", "the", "remote", "endpoint", "s", "certificate", ".", "The", "input", "stream", "should", "contain", "an", "X", ".", "509", "certificate", "collection", "in", "PEM", "format", ".", "{" ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/handler/src/main/java/io/netty/handler/ssl/SslContextBuilder.java#L191-L197
deeplearning4j/deeplearning4j
nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/evaluation/curves/PrecisionRecallCurve.java
PrecisionRecallCurve.getConfusionMatrixAtThreshold
public Confusion getConfusionMatrixAtThreshold(double threshold) { Point p = getPointAtThreshold(threshold); int idx = p.idx; int tn = totalCount - (tpCount[idx] + fpCount[idx] + fnCount[idx]); return new Confusion(p, tpCount[idx], fpCount[idx], fnCount[idx], tn); }
java
public Confusion getConfusionMatrixAtThreshold(double threshold) { Point p = getPointAtThreshold(threshold); int idx = p.idx; int tn = totalCount - (tpCount[idx] + fpCount[idx] + fnCount[idx]); return new Confusion(p, tpCount[idx], fpCount[idx], fnCount[idx], tn); }
[ "public", "Confusion", "getConfusionMatrixAtThreshold", "(", "double", "threshold", ")", "{", "Point", "p", "=", "getPointAtThreshold", "(", "threshold", ")", ";", "int", "idx", "=", "p", ".", "idx", ";", "int", "tn", "=", "totalCount", "-", "(", "tpCount", ...
Get the binary confusion matrix for the given threshold. As per {@link #getPointAtThreshold(double)}, if the threshold is not found exactly, the next highest threshold exceeding the requested threshold is returned @param threshold Threshold at which to get the confusion matrix @return Binary confusion matrix
[ "Get", "the", "binary", "confusion", "matrix", "for", "the", "given", "threshold", ".", "As", "per", "{", "@link", "#getPointAtThreshold", "(", "double", ")", "}", "if", "the", "threshold", "is", "not", "found", "exactly", "the", "next", "highest", "threshol...
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/evaluation/curves/PrecisionRecallCurve.java#L209-L214
buschmais/jqa-maven3-plugin
src/main/java/com/buschmais/jqassistant/plugin/maven3/impl/scanner/MavenModelScannerPlugin.java
MavenModelScannerPlugin.addProfiles
private void addProfiles(MavenPomDescriptor pomDescriptor, Model model, ScannerContext scannerContext) { List<Profile> profiles = model.getProfiles(); Store store = scannerContext.getStore(); for (Profile profile : profiles) { MavenProfileDescriptor mavenProfileDescriptor = store.cre...
java
private void addProfiles(MavenPomDescriptor pomDescriptor, Model model, ScannerContext scannerContext) { List<Profile> profiles = model.getProfiles(); Store store = scannerContext.getStore(); for (Profile profile : profiles) { MavenProfileDescriptor mavenProfileDescriptor = store.cre...
[ "private", "void", "addProfiles", "(", "MavenPomDescriptor", "pomDescriptor", ",", "Model", "model", ",", "ScannerContext", "scannerContext", ")", "{", "List", "<", "Profile", ">", "profiles", "=", "model", ".", "getProfiles", "(", ")", ";", "Store", "store", ...
Adds information about defined profile. @param pomDescriptor The descriptor for the current POM. @param model The Maven Model. @param scannerContext The scanner context.
[ "Adds", "information", "about", "defined", "profile", "." ]
train
https://github.com/buschmais/jqa-maven3-plugin/blob/6c6e2dca56de6d5b8ceeb2f28982fb6d7c98778f/src/main/java/com/buschmais/jqassistant/plugin/maven3/impl/scanner/MavenModelScannerPlugin.java#L564-L579
xcesco/kripton
kripton-processor/src/main/java/com/abubusoft/kripton/processor/bind/JavaWriterHelper.java
JavaWriterHelper.writeJava2File
public static void writeJava2File(Filer filer, String packageName, TypeSpec typeSpec) throws IOException { JavaFile target = JavaFile.builder(packageName, typeSpec).skipJavaLangImports(true).build(); target.writeTo(filer); }
java
public static void writeJava2File(Filer filer, String packageName, TypeSpec typeSpec) throws IOException { JavaFile target = JavaFile.builder(packageName, typeSpec).skipJavaLangImports(true).build(); target.writeTo(filer); }
[ "public", "static", "void", "writeJava2File", "(", "Filer", "filer", ",", "String", "packageName", ",", "TypeSpec", "typeSpec", ")", "throws", "IOException", "{", "JavaFile", "target", "=", "JavaFile", ".", "builder", "(", "packageName", ",", "typeSpec", ")", ...
Write java 2 file. @param filer the filer @param packageName the package name @param typeSpec the type spec @throws IOException Signals that an I/O exception has occurred.
[ "Write", "java", "2", "file", "." ]
train
https://github.com/xcesco/kripton/blob/90de2c0523d39b99e81b8d38aa996898762f594a/kripton-processor/src/main/java/com/abubusoft/kripton/processor/bind/JavaWriterHelper.java#L28-L31
Ordinastie/MalisisCore
src/main/java/net/malisis/core/inventory/message/InventoryActionMessage.java
InventoryActionMessage.sendAction
@SideOnly(Side.CLIENT) public static void sendAction(ActionType action, int inventoryId, int slotNumber, int code) { int windowId = Utils.getClientPlayer().openContainer.windowId; Packet packet = new Packet(action, inventoryId, slotNumber, code, windowId); MalisisCore.network.sendToServer(packet); }
java
@SideOnly(Side.CLIENT) public static void sendAction(ActionType action, int inventoryId, int slotNumber, int code) { int windowId = Utils.getClientPlayer().openContainer.windowId; Packet packet = new Packet(action, inventoryId, slotNumber, code, windowId); MalisisCore.network.sendToServer(packet); }
[ "@", "SideOnly", "(", "Side", ".", "CLIENT", ")", "public", "static", "void", "sendAction", "(", "ActionType", "action", ",", "int", "inventoryId", ",", "int", "slotNumber", ",", "int", "code", ")", "{", "int", "windowId", "=", "Utils", ".", "getClientPlay...
Sends GUI action to the server {@link MalisisInventoryContainer}. @param action the action @param inventoryId the inventory id @param slotNumber the slot number @param code the code
[ "Sends", "GUI", "action", "to", "the", "server", "{", "@link", "MalisisInventoryContainer", "}", "." ]
train
https://github.com/Ordinastie/MalisisCore/blob/4f8e1fa462d5c372fc23414482ba9f429881cc54/src/main/java/net/malisis/core/inventory/message/InventoryActionMessage.java#L81-L87
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ThreadLocalRandom.java
ThreadLocalRandom.doubles
public DoubleStream doubles(long streamSize) { if (streamSize < 0L) throw new IllegalArgumentException(BAD_SIZE); return StreamSupport.doubleStream (new RandomDoublesSpliterator (0L, streamSize, Double.MAX_VALUE, 0.0), false); }
java
public DoubleStream doubles(long streamSize) { if (streamSize < 0L) throw new IllegalArgumentException(BAD_SIZE); return StreamSupport.doubleStream (new RandomDoublesSpliterator (0L, streamSize, Double.MAX_VALUE, 0.0), false); }
[ "public", "DoubleStream", "doubles", "(", "long", "streamSize", ")", "{", "if", "(", "streamSize", "<", "0L", ")", "throw", "new", "IllegalArgumentException", "(", "BAD_SIZE", ")", ";", "return", "StreamSupport", ".", "doubleStream", "(", "new", "RandomDoublesSp...
Returns a stream producing the given {@code streamSize} number of pseudorandom {@code double} values, each between zero (inclusive) and one (exclusive). @param streamSize the number of values to generate @return a stream of {@code double} values @throws IllegalArgumentException if {@code streamSize} is less than zero ...
[ "Returns", "a", "stream", "producing", "the", "given", "{", "@code", "streamSize", "}", "number", "of", "pseudorandom", "{", "@code", "double", "}", "values", "each", "between", "zero", "(", "inclusive", ")", "and", "one", "(", "exclusive", ")", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/concurrent/ThreadLocalRandom.java#L651-L658
google/j2objc
jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/jar/JarOutputStream.java
JarOutputStream.get16
private static int get16(byte[] b, int off) { return Byte.toUnsignedInt(b[off]) | ( Byte.toUnsignedInt(b[off+1]) << 8); }
java
private static int get16(byte[] b, int off) { return Byte.toUnsignedInt(b[off]) | ( Byte.toUnsignedInt(b[off+1]) << 8); }
[ "private", "static", "int", "get16", "(", "byte", "[", "]", "b", ",", "int", "off", ")", "{", "return", "Byte", ".", "toUnsignedInt", "(", "b", "[", "off", "]", ")", "|", "(", "Byte", ".", "toUnsignedInt", "(", "b", "[", "off", "+", "1", "]", "...
/* Fetches unsigned 16-bit value from byte array at specified offset. The bytes are assumed to be in Intel (little-endian) byte order.
[ "/", "*", "Fetches", "unsigned", "16", "-", "bit", "value", "from", "byte", "array", "at", "specified", "offset", ".", "The", "bytes", "are", "assumed", "to", "be", "in", "Intel", "(", "little", "-", "endian", ")", "byte", "order", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/util/jar/JarOutputStream.java#L137-L139
Sciss/abc4j
abc/src/main/java/abc/ui/swing/ScoreTemplate.java
ScoreTemplate.setPosition
public void setPosition(byte[] fields, byte vert, byte horiz) { for (byte field : fields) { setVisible(field, true); Position p = new Position(vert, horiz); byte[] p1f = getPosition(field); Position p1 = p1f == null ? null : new Position(p1f[0], p1f[1]); /...
java
public void setPosition(byte[] fields, byte vert, byte horiz) { for (byte field : fields) { setVisible(field, true); Position p = new Position(vert, horiz); byte[] p1f = getPosition(field); Position p1 = p1f == null ? null : new Position(p1f[0], p1f[1]); /...
[ "public", "void", "setPosition", "(", "byte", "[", "]", "fields", ",", "byte", "vert", ",", "byte", "horiz", ")", "{", "for", "(", "byte", "field", ":", "fields", ")", "{", "setVisible", "(", "field", ",", "true", ")", ";", "Position", "p", "=", "n...
Sets the position of several fields @param fields array of {@link ScoreElements} constants @param vert one of {@link VerticalPosition} constants @param horiz one of {@link HorizontalPosition} constants
[ "Sets", "the", "position", "of", "several", "fields" ]
train
https://github.com/Sciss/abc4j/blob/117b405642c84a7bfca4e3e13668838258b90ca7/abc/src/main/java/abc/ui/swing/ScoreTemplate.java#L834-L856
enasequence/sequencetools
src/main/java/uk/ac/ebi/embl/api/translation/CdsTranslator.java
CdsTranslator.checkLocations
private boolean checkLocations(long length, CompoundLocation<Location> locations) { for(Location location : locations.getLocations()){ if(location instanceof RemoteLocation) continue; if(location.getIntBeginPosition() == null || location.getIntBeginPosition() ...
java
private boolean checkLocations(long length, CompoundLocation<Location> locations) { for(Location location : locations.getLocations()){ if(location instanceof RemoteLocation) continue; if(location.getIntBeginPosition() == null || location.getIntBeginPosition() ...
[ "private", "boolean", "checkLocations", "(", "long", "length", ",", "CompoundLocation", "<", "Location", ">", "locations", ")", "{", "for", "(", "Location", "location", ":", "locations", ".", "getLocations", "(", ")", ")", "{", "if", "(", "location", "instan...
Checks that the locations are within the sequence length @param length @param locations @return
[ "Checks", "that", "the", "locations", "are", "within", "the", "sequence", "length" ]
train
https://github.com/enasequence/sequencetools/blob/4127f5e1a17540239f5810136153fbd6737fa262/src/main/java/uk/ac/ebi/embl/api/translation/CdsTranslator.java#L248-L262
alkacon/opencms-core
src/org/opencms/db/generic/CmsSqlManager.java
CmsSqlManager.getPreparedStatementForSql
public PreparedStatement getPreparedStatementForSql(Connection con, String query) throws SQLException { // unfortunately, this wrapper is essential, because some JDBC driver // implementations don't accept the delegated objects of DBCP's connection pool. return con.prepareStatement(query); ...
java
public PreparedStatement getPreparedStatementForSql(Connection con, String query) throws SQLException { // unfortunately, this wrapper is essential, because some JDBC driver // implementations don't accept the delegated objects of DBCP's connection pool. return con.prepareStatement(query); ...
[ "public", "PreparedStatement", "getPreparedStatementForSql", "(", "Connection", "con", ",", "String", "query", ")", "throws", "SQLException", "{", "// unfortunately, this wrapper is essential, because some JDBC driver", "// implementations don't accept the delegated objects of DBCP's con...
Returns a PreparedStatement for a JDBC connection specified by the SQL query.<p> @param con the JDBC connection @param query the SQL query @return PreparedStatement a new PreparedStatement containing the pre-compiled SQL statement @throws SQLException if a database access error occurs
[ "Returns", "a", "PreparedStatement", "for", "a", "JDBC", "connection", "specified", "by", "the", "SQL", "query", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/db/generic/CmsSqlManager.java#L286-L291
phax/ph-oton
ph-oton-core/src/main/java/com/helger/photon/core/servlet/AbstractObjectDeliveryHttpHandler.java
AbstractObjectDeliveryHttpHandler._initialFillSet
private static void _initialFillSet (@Nonnull final ICommonsOrderedSet <String> aSet, @Nullable final String sItemList, final boolean bUnify) { ValueEnforcer.notNull (aSet, "Set"); if (!aSet.isEmpty ()) throw new IllegalArgume...
java
private static void _initialFillSet (@Nonnull final ICommonsOrderedSet <String> aSet, @Nullable final String sItemList, final boolean bUnify) { ValueEnforcer.notNull (aSet, "Set"); if (!aSet.isEmpty ()) throw new IllegalArgume...
[ "private", "static", "void", "_initialFillSet", "(", "@", "Nonnull", "final", "ICommonsOrderedSet", "<", "String", ">", "aSet", ",", "@", "Nullable", "final", "String", "sItemList", ",", "final", "boolean", "bUnify", ")", "{", "ValueEnforcer", ".", "notNull", ...
Helper function to convert the configuration string to a collection. @param aSet The set to be filled. May not be <code>null</code>. @param sItemList The string to be separated to a list. Each item is separated by a ",". @param bUnify To unify the found item by converting them all to lowercase. This makes only sense f...
[ "Helper", "function", "to", "convert", "the", "configuration", "string", "to", "a", "collection", "." ]
train
https://github.com/phax/ph-oton/blob/f3aaacbbc02a9f3e4f32fe8db8e4adf7b9c1d3ef/ph-oton-core/src/main/java/com/helger/photon/core/servlet/AbstractObjectDeliveryHttpHandler.java#L122-L149
loldevs/riotapi
spectator/src/main/java/net/boreeas/riotapi/spectator/GameEncryptionData.java
GameEncryptionData.getCipher
public Cipher getCipher() throws GeneralSecurityException { Cipher cipher = Cipher.getInstance("Blowfish/ECB/PKCS5Padding"); cipher.init(Cipher.DECRYPT_MODE, new SecretKeySpec(key, "Blowfish")); return cipher; }
java
public Cipher getCipher() throws GeneralSecurityException { Cipher cipher = Cipher.getInstance("Blowfish/ECB/PKCS5Padding"); cipher.init(Cipher.DECRYPT_MODE, new SecretKeySpec(key, "Blowfish")); return cipher; }
[ "public", "Cipher", "getCipher", "(", ")", "throws", "GeneralSecurityException", "{", "Cipher", "cipher", "=", "Cipher", ".", "getInstance", "(", "\"Blowfish/ECB/PKCS5Padding\"", ")", ";", "cipher", ".", "init", "(", "Cipher", ".", "DECRYPT_MODE", ",", "new", "S...
Creates a cipher for decrypting data with the specified key. @return A Blowfish/ECB/PKCS5Padding cipher in decryption mode. @throws GeneralSecurityException
[ "Creates", "a", "cipher", "for", "decrypting", "data", "with", "the", "specified", "key", "." ]
train
https://github.com/loldevs/riotapi/blob/0b8aac407aa5289845f249024f9732332855544f/spectator/src/main/java/net/boreeas/riotapi/spectator/GameEncryptionData.java#L41-L46
overview/mime-types
src/main/java/org/overviewproject/mime_types/MimeTypeDetector.java
MimeTypeDetector.detectMimeTypeAsync
public CompletionStage<String> detectMimeTypeAsync(final Path path) { String filename = path.getFileName().toString(); Supplier<CompletionStage<byte[]>> supplier = () -> { final CompletableFuture<byte[]> futureBytes = new CompletableFuture<byte[]>(); AsynchronousFileChannel channel; ...
java
public CompletionStage<String> detectMimeTypeAsync(final Path path) { String filename = path.getFileName().toString(); Supplier<CompletionStage<byte[]>> supplier = () -> { final CompletableFuture<byte[]> futureBytes = new CompletableFuture<byte[]>(); AsynchronousFileChannel channel; ...
[ "public", "CompletionStage", "<", "String", ">", "detectMimeTypeAsync", "(", "final", "Path", "path", ")", "{", "String", "filename", "=", "path", ".", "getFileName", "(", ")", ".", "toString", "(", ")", ";", "Supplier", "<", "CompletionStage", "<", "byte", ...
Determines the MIME type of a file. <p> The file must exist and be readable. </p> <p> The CompletionStage may return a {@link ExecutionException} which is caused by a {@link GetBytesException}. (That, in turn, will wrap a {@link IOException} or other exception that prevented getBytesAsync() from working. </p> @param...
[ "Determines", "the", "MIME", "type", "of", "a", "file", "." ]
train
https://github.com/overview/mime-types/blob/d5c45302049c0cd5e634a50954304d8ddeb9abb4/src/main/java/org/overviewproject/mime_types/MimeTypeDetector.java#L279-L312
jcuda/jcuda
JCudaJava/src/main/java/jcuda/runtime/JCuda.java
JCuda.cudaMemset2D
public static int cudaMemset2D(Pointer mem, long pitch, int c, long width, long height) { return checkResult(cudaMemset2DNative(mem, pitch, c, width, height)); }
java
public static int cudaMemset2D(Pointer mem, long pitch, int c, long width, long height) { return checkResult(cudaMemset2DNative(mem, pitch, c, width, height)); }
[ "public", "static", "int", "cudaMemset2D", "(", "Pointer", "mem", ",", "long", "pitch", ",", "int", "c", ",", "long", "width", ",", "long", "height", ")", "{", "return", "checkResult", "(", "cudaMemset2DNative", "(", "mem", ",", "pitch", ",", "c", ",", ...
Initializes or sets device memory to a value. <pre> cudaError_t cudaMemset2D ( void* devPtr, size_t pitch, int value, size_t width, size_t height ) </pre> <div> <p>Initializes or sets device memory to a value. Sets to the specified value <tt>value</tt> a matrix (<tt>height</tt> rows of <tt>width</tt> bytes each) poi...
[ "Initializes", "or", "sets", "device", "memory", "to", "a", "value", "." ]
train
https://github.com/jcuda/jcuda/blob/468528b5b9b37dfceb6ed83fcfd889e9b359f984/JCudaJava/src/main/java/jcuda/runtime/JCuda.java#L6264-L6267
blackducksoftware/blackduck-common
src/main/java/com/synopsys/integration/blackduck/codelocation/signaturescanner/command/ScannerZipInstaller.java
ScannerZipInstaller.installOrUpdateScanner
public void installOrUpdateScanner(File installDirectory) throws BlackDuckIntegrationException { File scannerExpansionDirectory = new File(installDirectory, ScannerZipInstaller.BLACK_DUCK_SIGNATURE_SCANNER_INSTALL_DIRECTORY); scannerExpansionDirectory.mkdirs(); File versionFile = null; ...
java
public void installOrUpdateScanner(File installDirectory) throws BlackDuckIntegrationException { File scannerExpansionDirectory = new File(installDirectory, ScannerZipInstaller.BLACK_DUCK_SIGNATURE_SCANNER_INSTALL_DIRECTORY); scannerExpansionDirectory.mkdirs(); File versionFile = null; ...
[ "public", "void", "installOrUpdateScanner", "(", "File", "installDirectory", ")", "throws", "BlackDuckIntegrationException", "{", "File", "scannerExpansionDirectory", "=", "new", "File", "(", "installDirectory", ",", "ScannerZipInstaller", ".", "BLACK_DUCK_SIGNATURE_SCANNER_I...
The Black Duck Signature Scanner will be download if it has not previously been downloaded or if it has been updated on the server. The absolute path to the install location will be returned if it was downloaded or found successfully, otherwise an Optional.empty will be returned and the log will contain details concern...
[ "The", "Black", "Duck", "Signature", "Scanner", "will", "be", "download", "if", "it", "has", "not", "previously", "been", "downloaded", "or", "if", "it", "has", "been", "updated", "on", "the", "server", ".", "The", "absolute", "path", "to", "the", "install...
train
https://github.com/blackducksoftware/blackduck-common/blob/4ea4e90b52b75470b71c597b65cf4e2d73887bcc/src/main/java/com/synopsys/integration/blackduck/codelocation/signaturescanner/command/ScannerZipInstaller.java#L100-L119
OpenLiberty/open-liberty
dev/com.ibm.ws.jsp/src/com/ibm/ws/jsp/translator/visitor/generator/GeneratorUtils.java
GeneratorUtils.generateLocalVariables
public static void generateLocalVariables(JavaCodeWriter out, Element jspElement, String pageContextVar) throws JspCoreException { if (hasUseBean(jspElement)) { out.println("HttpSession session = "+pageContextVar+".getSession();"); out.println("ServletContext application = "+pageContextV...
java
public static void generateLocalVariables(JavaCodeWriter out, Element jspElement, String pageContextVar) throws JspCoreException { if (hasUseBean(jspElement)) { out.println("HttpSession session = "+pageContextVar+".getSession();"); out.println("ServletContext application = "+pageContextV...
[ "public", "static", "void", "generateLocalVariables", "(", "JavaCodeWriter", "out", ",", "Element", "jspElement", ",", "String", "pageContextVar", ")", "throws", "JspCoreException", "{", "if", "(", "hasUseBean", "(", "jspElement", ")", ")", "{", "out", ".", "pri...
PK65013 - already know if this isTagFile or not and pageContextVar is set accordingly
[ "PK65013", "-", "already", "know", "if", "this", "isTagFile", "or", "not", "and", "pageContextVar", "is", "set", "accordingly" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.jsp/src/com/ibm/ws/jsp/translator/visitor/generator/GeneratorUtils.java#L161-L172
kaazing/java.client
amqp-0-9-1/amqp/src/main/java/org/kaazing/net/ws/amqp/AmqpChannel.java
AmqpChannel.bindQueue
public AmqpChannel bindQueue(String queue, String exchange, String routingKey, boolean noWait, AmqpArguments arguments) { Object[] args = {0, queue, exchange, routingKey, noWait, arguments}; WrappedByteBuffer bodyArg = null; HashMap<String, Object> headersArg = null; String methodName =...
java
public AmqpChannel bindQueue(String queue, String exchange, String routingKey, boolean noWait, AmqpArguments arguments) { Object[] args = {0, queue, exchange, routingKey, noWait, arguments}; WrappedByteBuffer bodyArg = null; HashMap<String, Object> headersArg = null; String methodName =...
[ "public", "AmqpChannel", "bindQueue", "(", "String", "queue", ",", "String", "exchange", ",", "String", "routingKey", ",", "boolean", "noWait", ",", "AmqpArguments", "arguments", ")", "{", "Object", "[", "]", "args", "=", "{", "0", ",", "queue", ",", "exch...
* This method binds a queue to an exchange. Until a queue is bound it will not receive any messages. In a classic messaging model, store-and-forward queues are bound to a direct exchange and subscription queues are bound to a topic exchange.
[ "*", "This", "method", "binds", "a", "queue", "to", "an", "exchange", ".", "Until", "a", "queue", "is", "bound", "it", "will", "not", "receive", "any", "messages", ".", "In", "a", "classic", "messaging", "model", "store", "-", "and", "-", "forward", "q...
train
https://github.com/kaazing/java.client/blob/25ad2ae5bb24aa9d6b79400fce649b518dcfbe26/amqp-0-9-1/amqp/src/main/java/org/kaazing/net/ws/amqp/AmqpChannel.java#L600-L627
jbundle/jbundle
base/base/src/main/java/org/jbundle/base/field/PropertiesField.java
PropertiesField.addPropertiesFieldBehavior
public void addPropertiesFieldBehavior(BaseField fldDisplay, String strProperty) { FieldListener listener = new CopyConvertersHandler(new PropertiesConverter(this, strProperty)); listener.setRespondsToMode(DBConstants.INIT_MOVE, false); listener.setRespondsToMode(DBConstants.READ_MOVE, false...
java
public void addPropertiesFieldBehavior(BaseField fldDisplay, String strProperty) { FieldListener listener = new CopyConvertersHandler(new PropertiesConverter(this, strProperty)); listener.setRespondsToMode(DBConstants.INIT_MOVE, false); listener.setRespondsToMode(DBConstants.READ_MOVE, false...
[ "public", "void", "addPropertiesFieldBehavior", "(", "BaseField", "fldDisplay", ",", "String", "strProperty", ")", "{", "FieldListener", "listener", "=", "new", "CopyConvertersHandler", "(", "new", "PropertiesConverter", "(", "this", ",", "strProperty", ")", ")", ";...
Add the behaviors to sync this property to this virtual field.
[ "Add", "the", "behaviors", "to", "sync", "this", "property", "to", "this", "virtual", "field", "." ]
train
https://github.com/jbundle/jbundle/blob/4037fcfa85f60c7d0096c453c1a3cd573c2b0abc/base/base/src/main/java/org/jbundle/base/field/PropertiesField.java#L616-L624
moparisthebest/beehive
beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/internal/InternalUtils.java
InternalUtils.lookupField
public static Field lookupField( Class parentClass, String fieldName ) { try { return parentClass.getDeclaredField( fieldName ); } catch ( NoSuchFieldException e ) { Class superClass = parentClass.getSuperclass(); return superClass != null ? lookupField( s...
java
public static Field lookupField( Class parentClass, String fieldName ) { try { return parentClass.getDeclaredField( fieldName ); } catch ( NoSuchFieldException e ) { Class superClass = parentClass.getSuperclass(); return superClass != null ? lookupField( s...
[ "public", "static", "Field", "lookupField", "(", "Class", "parentClass", ",", "String", "fieldName", ")", "{", "try", "{", "return", "parentClass", ".", "getDeclaredField", "(", "fieldName", ")", ";", "}", "catch", "(", "NoSuchFieldException", "e", ")", "{", ...
Get a Field in a Class. @param parentClass the Class in which to find the Field. @param fieldName the name of the Field. @return the Field with the given name, or <code>null</code> if the field does not exist.
[ "Get", "a", "Field", "in", "a", "Class", "." ]
train
https://github.com/moparisthebest/beehive/blob/4246a0cc40ce3c05f1a02c2da2653ac622703d77/beehive-netui-core/src/main/java/org/apache/beehive/netui/pageflow/internal/InternalUtils.java#L285-L294
jmapper-framework/jmapper-core
JMapper Framework/src/main/java/com/googlecode/jmapper/RelationalJMapper.java
RelationalJMapper.oneToManyWithoutControl
public <D> D oneToManyWithoutControl(Class<D> destinationClass, final T source) { try{ return this.<D,T>getJMapper(relationalOneToManyMapper,destinationClass).getDestinationWithoutControl(source); } catch (Exception e) { return (D) this.destinationClassControl(e,destinationClass); } }
java
public <D> D oneToManyWithoutControl(Class<D> destinationClass, final T source) { try{ return this.<D,T>getJMapper(relationalOneToManyMapper,destinationClass).getDestinationWithoutControl(source); } catch (Exception e) { return (D) this.destinationClassControl(e,destinationClass); } }
[ "public", "<", "D", ">", "D", "oneToManyWithoutControl", "(", "Class", "<", "D", ">", "destinationClass", ",", "final", "T", "source", ")", "{", "try", "{", "return", "this", ".", "<", "D", ",", "T", ">", "getJMapper", "(", "relationalOneToManyMapper", "...
This method returns a new instance of Target Class with this setting: <table summary =""> <tr> <td><code>NullPointerControl</code></td><td><code>NOT_ANY</code></td> </tr><tr> <td><code>MappingType</code> of Destination</td><td><code>ALL_FIELDS</code></td> </tr><tr> <td><code>MappingType</code> of Source</td><td><code>A...
[ "This", "method", "returns", "a", "new", "instance", "of", "Target", "Class", "with", "this", "setting", ":", "<table", "summary", "=", ">", "<tr", ">", "<td", ">", "<code", ">", "NullPointerControl<", "/", "code", ">", "<", "/", "td", ">", "<td", ">",...
train
https://github.com/jmapper-framework/jmapper-core/blob/b48fd3527f35055b8b4a30f53a51136f183acc90/JMapper Framework/src/main/java/com/googlecode/jmapper/RelationalJMapper.java#L557-L560
apache/flink
flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/restart/FixedDelayRestartStrategy.java
FixedDelayRestartStrategy.createFactory
public static FixedDelayRestartStrategyFactory createFactory(Configuration configuration) throws Exception { int maxAttempts = configuration.getInteger(ConfigConstants.RESTART_STRATEGY_FIXED_DELAY_ATTEMPTS, 1); String delayString = configuration.getString(ConfigConstants.RESTART_STRATEGY_FIXED_DELAY_DELAY); lon...
java
public static FixedDelayRestartStrategyFactory createFactory(Configuration configuration) throws Exception { int maxAttempts = configuration.getInteger(ConfigConstants.RESTART_STRATEGY_FIXED_DELAY_ATTEMPTS, 1); String delayString = configuration.getString(ConfigConstants.RESTART_STRATEGY_FIXED_DELAY_DELAY); lon...
[ "public", "static", "FixedDelayRestartStrategyFactory", "createFactory", "(", "Configuration", "configuration", ")", "throws", "Exception", "{", "int", "maxAttempts", "=", "configuration", ".", "getInteger", "(", "ConfigConstants", ".", "RESTART_STRATEGY_FIXED_DELAY_ATTEMPTS"...
Creates a FixedDelayRestartStrategy from the given Configuration. @param configuration Configuration containing the parameter values for the restart strategy @return Initialized instance of FixedDelayRestartStrategy @throws Exception
[ "Creates", "a", "FixedDelayRestartStrategy", "from", "the", "given", "Configuration", "." ]
train
https://github.com/apache/flink/blob/b62db93bf63cb3bb34dd03d611a779d9e3fc61ac/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/restart/FixedDelayRestartStrategy.java#L75-L91
UrielCh/ovh-java-sdk
ovh-java-sdk-price/src/main/java/net/minidev/ovh/api/ApiOvhPrice.java
ApiOvhPrice.dedicatedCloud_2018v2_rbx2a_infrastructure_filer_hourly_filerProfile_GET
public OvhPrice dedicatedCloud_2018v2_rbx2a_infrastructure_filer_hourly_filerProfile_GET(net.minidev.ovh.api.price.dedicatedcloud._2018v2.rbx2a.infrastructure.filer.OvhHourlyEnum filerProfile) throws IOException { String qPath = "/price/dedicatedCloud/2018v2/rbx2a/infrastructure/filer/hourly/{filerProfile}"; String...
java
public OvhPrice dedicatedCloud_2018v2_rbx2a_infrastructure_filer_hourly_filerProfile_GET(net.minidev.ovh.api.price.dedicatedcloud._2018v2.rbx2a.infrastructure.filer.OvhHourlyEnum filerProfile) throws IOException { String qPath = "/price/dedicatedCloud/2018v2/rbx2a/infrastructure/filer/hourly/{filerProfile}"; String...
[ "public", "OvhPrice", "dedicatedCloud_2018v2_rbx2a_infrastructure_filer_hourly_filerProfile_GET", "(", "net", ".", "minidev", ".", "ovh", ".", "api", ".", "price", ".", "dedicatedcloud", ".", "_2018v2", ".", "rbx2a", ".", "infrastructure", ".", "filer", ".", "OvhHourl...
Get price of dedicated Cloud hourly filer ressources REST: GET /price/dedicatedCloud/2018v2/rbx2a/infrastructure/filer/hourly/{filerProfile} @param filerProfile [required] type of the hourly ressources you want to order
[ "Get", "price", "of", "dedicated", "Cloud", "hourly", "filer", "ressources" ]
train
https://github.com/UrielCh/ovh-java-sdk/blob/6d531a40e56e09701943e334c25f90f640c55701/ovh-java-sdk-price/src/main/java/net/minidev/ovh/api/ApiOvhPrice.java#L4327-L4332
google/j2objc
xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/EncodingInfo.java
EncodingInfo.isInEncoding
public boolean isInEncoding(char high, char low) { if (m_encoding == null) { m_encoding = new EncodingImpl(); // One could put alternate logic in here to // instantiate another object that implements the // InEncoding interface. For example if the JRE...
java
public boolean isInEncoding(char high, char low) { if (m_encoding == null) { m_encoding = new EncodingImpl(); // One could put alternate logic in here to // instantiate another object that implements the // InEncoding interface. For example if the JRE...
[ "public", "boolean", "isInEncoding", "(", "char", "high", ",", "char", "low", ")", "{", "if", "(", "m_encoding", "==", "null", ")", "{", "m_encoding", "=", "new", "EncodingImpl", "(", ")", ";", "// One could put alternate logic in here to", "// instantiate another...
This is not a public API. It returns true if the character formed by the high/low pair is in the encoding. @param high a char that the a high char of a high/low surrogate pair. @param low a char that is the low char of a high/low surrogate pair. <p> This method is not a public API. @xsl.usage internal
[ "This", "is", "not", "a", "public", "API", ".", "It", "returns", "true", "if", "the", "character", "formed", "by", "the", "high", "/", "low", "pair", "is", "in", "the", "encoding", "." ]
train
https://github.com/google/j2objc/blob/471504a735b48d5d4ace51afa1542cc4790a921a/xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xml/serializer/EncodingInfo.java#L125-L135
Netflix/spectator
spectator-ext-ipc/src/jmh/java/com/netflix/spectator/ipc/SeqServerGroup.java
SeqServerGroup.parse
public static SeqServerGroup parse(String asg) { int d1 = asg.indexOf('-'); int d2 = asg.indexOf('-', d1 + 1); int dN = asg.lastIndexOf('-'); if (dN < 0 || !isSequence(asg, dN)) { dN = asg.length(); } return new SeqServerGroup(asg, d1, d2, dN); }
java
public static SeqServerGroup parse(String asg) { int d1 = asg.indexOf('-'); int d2 = asg.indexOf('-', d1 + 1); int dN = asg.lastIndexOf('-'); if (dN < 0 || !isSequence(asg, dN)) { dN = asg.length(); } return new SeqServerGroup(asg, d1, d2, dN); }
[ "public", "static", "SeqServerGroup", "parse", "(", "String", "asg", ")", "{", "int", "d1", "=", "asg", ".", "indexOf", "(", "'", "'", ")", ";", "int", "d2", "=", "asg", ".", "indexOf", "(", "'", "'", ",", "d1", "+", "1", ")", ";", "int", "dN",...
Create a new instance of a server group object by parsing the group name.
[ "Create", "a", "new", "instance", "of", "a", "server", "group", "object", "by", "parsing", "the", "group", "name", "." ]
train
https://github.com/Netflix/spectator/blob/259318252770de3bad581b85adff187d8f2c6537/spectator-ext-ipc/src/jmh/java/com/netflix/spectator/ipc/SeqServerGroup.java#L34-L42
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/io/grasslegacy/utils/Window.java
Window.writeDefaultWindowToLocation
public static void writeDefaultWindowToLocation( String locationPath, Window window ) throws IOException { writeWindowFile(locationPath + File.separator + GrassLegacyConstans.PERMANENT_MAPSET + File.separator + GrassLegacyConstans.DEFAULT_WIND, window); }
java
public static void writeDefaultWindowToLocation( String locationPath, Window window ) throws IOException { writeWindowFile(locationPath + File.separator + GrassLegacyConstans.PERMANENT_MAPSET + File.separator + GrassLegacyConstans.DEFAULT_WIND, window); }
[ "public", "static", "void", "writeDefaultWindowToLocation", "(", "String", "locationPath", ",", "Window", "window", ")", "throws", "IOException", "{", "writeWindowFile", "(", "locationPath", "+", "File", ".", "separator", "+", "GrassLegacyConstans", ".", "PERMANENT_MA...
Write default region window to the PERMANENT mapset @param locationPath the path to the location folder @param the active Window object @throws IOException
[ "Write", "default", "region", "window", "to", "the", "PERMANENT", "mapset" ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/io/grasslegacy/utils/Window.java#L491-L494
liferay/com-liferay-commerce
commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPInstancePersistenceImpl.java
CPInstancePersistenceImpl.removeByLtD_S
@Override public void removeByLtD_S(Date displayDate, int status) { for (CPInstance cpInstance : findByLtD_S(displayDate, status, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(cpInstance); } }
java
@Override public void removeByLtD_S(Date displayDate, int status) { for (CPInstance cpInstance : findByLtD_S(displayDate, status, QueryUtil.ALL_POS, QueryUtil.ALL_POS, null)) { remove(cpInstance); } }
[ "@", "Override", "public", "void", "removeByLtD_S", "(", "Date", "displayDate", ",", "int", "status", ")", "{", "for", "(", "CPInstance", "cpInstance", ":", "findByLtD_S", "(", "displayDate", ",", "status", ",", "QueryUtil", ".", "ALL_POS", ",", "QueryUtil", ...
Removes all the cp instances where displayDate &lt; &#63; and status = &#63; from the database. @param displayDate the display date @param status the status
[ "Removes", "all", "the", "cp", "instances", "where", "displayDate", "&lt", ";", "&#63", ";", "and", "status", "=", "&#63", ";", "from", "the", "database", "." ]
train
https://github.com/liferay/com-liferay-commerce/blob/9e54362d7f59531fc684016ba49ee7cdc3a2f22b/commerce-product-service/src/main/java/com/liferay/commerce/product/service/persistence/impl/CPInstancePersistenceImpl.java#L6119-L6125
citrusframework/citrus
modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/ExecuteSQLQueryBuilder.java
ExecuteSQLQueryBuilder.validateScript
public ExecuteSQLQueryBuilder validateScript(Resource scriptResource, String type) { return validateScript(scriptResource, type, FileUtils.getDefaultCharset()); }
java
public ExecuteSQLQueryBuilder validateScript(Resource scriptResource, String type) { return validateScript(scriptResource, type, FileUtils.getDefaultCharset()); }
[ "public", "ExecuteSQLQueryBuilder", "validateScript", "(", "Resource", "scriptResource", ",", "String", "type", ")", "{", "return", "validateScript", "(", "scriptResource", ",", "type", ",", "FileUtils", ".", "getDefaultCharset", "(", ")", ")", ";", "}" ]
Validate SQL result set via validation script, for instance Groovy. @param scriptResource @param type
[ "Validate", "SQL", "result", "set", "via", "validation", "script", "for", "instance", "Groovy", "." ]
train
https://github.com/citrusframework/citrus/blob/55c58ef74c01d511615e43646ca25c1b2301c56d/modules/citrus-java-dsl/src/main/java/com/consol/citrus/dsl/builder/ExecuteSQLQueryBuilder.java#L187-L189
OpenLiberty/open-liberty
dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/util/NameUtil.java
NameUtil.getHomeRemoteImplClassName
public static String getHomeRemoteImplClassName(EnterpriseBean enterpriseBean, boolean isPost11DD) // d114199 { String homeInterfaceName = getHomeInterfaceName(enterpriseBean); if (homeInterfaceName == null) { return null; } String remoteInterfaceName = getRemoteInterfac...
java
public static String getHomeRemoteImplClassName(EnterpriseBean enterpriseBean, boolean isPost11DD) // d114199 { String homeInterfaceName = getHomeInterfaceName(enterpriseBean); if (homeInterfaceName == null) { return null; } String remoteInterfaceName = getRemoteInterfac...
[ "public", "static", "String", "getHomeRemoteImplClassName", "(", "EnterpriseBean", "enterpriseBean", ",", "boolean", "isPost11DD", ")", "// d114199", "{", "String", "homeInterfaceName", "=", "getHomeInterfaceName", "(", "enterpriseBean", ")", ";", "if", "(", "homeInterf...
Return the name of the deployed class that implements the home interface of the bean. <p> @param enterpriseBean bean impl class @param isPost11DD true if bean is defined using later than 1.1 deployment description.
[ "Return", "the", "name", "of", "the", "deployed", "class", "that", "implements", "the", "home", "interface", "of", "the", "bean", ".", "<p", ">" ]
train
https://github.com/OpenLiberty/open-liberty/blob/ca725d9903e63645018f9fa8cbda25f60af83a5d/dev/com.ibm.ws.ejbcontainer.core/src/com/ibm/ejs/container/util/NameUtil.java#L267-L288
taskadapter/redmine-java-api
src/main/java/com/taskadapter/redmineapi/ProjectManager.java
ProjectManager.getProjectByKey
public Project getProjectByKey(String projectKey) throws RedmineException { return transport.getObject(Project.class, projectKey, new BasicNameValuePair("include", "trackers")); }
java
public Project getProjectByKey(String projectKey) throws RedmineException { return transport.getObject(Project.class, projectKey, new BasicNameValuePair("include", "trackers")); }
[ "public", "Project", "getProjectByKey", "(", "String", "projectKey", ")", "throws", "RedmineException", "{", "return", "transport", ".", "getObject", "(", "Project", ".", "class", ",", "projectKey", ",", "new", "BasicNameValuePair", "(", "\"include\"", ",", "\"tra...
@param projectKey string key like "project-ABC", NOT a database numeric ID @return Redmine's project @throws RedmineAuthenticationException invalid or no API access key is used with the server, which requires authorization. Check the constructor arguments. @throws NotFoundException the project with the given key...
[ "@param", "projectKey", "string", "key", "like", "project", "-", "ABC", "NOT", "a", "database", "numeric", "ID" ]
train
https://github.com/taskadapter/redmine-java-api/blob/0bb65f27ee806ec3bd4007e1641f3e996261a04e/src/main/java/com/taskadapter/redmineapi/ProjectManager.java#L82-L85
TheHortonMachine/hortonmachine
gears/src/main/java/org/hortonmachine/gears/utils/features/FilterUtilities.java
FilterUtilities.getBboxFilter
public static Filter getBboxFilter( String attribute, double west, double east, double south, double north ) throws CQLException { if (attribute == null) { attribute = "the_geom"; } StringBuilder sB = new StringBuilder(); sB.append("BBOX("); sB.append(at...
java
public static Filter getBboxFilter( String attribute, double west, double east, double south, double north ) throws CQLException { if (attribute == null) { attribute = "the_geom"; } StringBuilder sB = new StringBuilder(); sB.append("BBOX("); sB.append(at...
[ "public", "static", "Filter", "getBboxFilter", "(", "String", "attribute", ",", "double", "west", ",", "double", "east", ",", "double", "south", ",", "double", "north", ")", "throws", "CQLException", "{", "if", "(", "attribute", "==", "null", ")", "{", "at...
Create a bounding box filter from the bounds coordinates. @param attribute the geometry attribute or null in the case of default "the_geom". @param west western bound coordinate. @param east eastern bound coordinate. @param south southern bound coordinate. @param north northern bound coordinate. @return the filter. @t...
[ "Create", "a", "bounding", "box", "filter", "from", "the", "bounds", "coordinates", "." ]
train
https://github.com/TheHortonMachine/hortonmachine/blob/d2b436bbdf951dc1fda56096a42dbc0eae4d35a5/gears/src/main/java/org/hortonmachine/gears/utils/features/FilterUtilities.java#L64-L87
lucee/Lucee
core/src/main/java/lucee/runtime/config/XMLConfigFactory.java
XMLConfigFactory.createFileFromResource
static void createFileFromResource(String resource, Resource file, String password) throws IOException { SystemOut.printDate(SystemUtil.getPrintWriter(SystemUtil.OUT), "write file:" + file); file.delete(); InputStream is = InfoImpl.class.getResourceAsStream(resource); if (is == null) throw new IOException("file ["...
java
static void createFileFromResource(String resource, Resource file, String password) throws IOException { SystemOut.printDate(SystemUtil.getPrintWriter(SystemUtil.OUT), "write file:" + file); file.delete(); InputStream is = InfoImpl.class.getResourceAsStream(resource); if (is == null) throw new IOException("file ["...
[ "static", "void", "createFileFromResource", "(", "String", "resource", ",", "Resource", "file", ",", "String", "password", ")", "throws", "IOException", "{", "SystemOut", ".", "printDate", "(", "SystemUtil", ".", "getPrintWriter", "(", "SystemUtil", ".", "OUT", ...
creates a File and his content froma a resurce @param resource @param file @param password @throws IOException
[ "creates", "a", "File", "and", "his", "content", "froma", "a", "resurce" ]
train
https://github.com/lucee/Lucee/blob/29b153fc4e126e5edb97da937f2ee2e231b87593/core/src/main/java/lucee/runtime/config/XMLConfigFactory.java#L270-L278
gmessner/gitlab4j-api
src/main/java/org/gitlab4j/api/ProjectApi.java
ProjectApi.getVariable
public Variable getVariable(Object projectIdOrPath, String key) throws GitLabApiException { Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "variables", key); return (response.readEntity(Variable.class)); }
java
public Variable getVariable(Object projectIdOrPath, String key) throws GitLabApiException { Response response = get(Response.Status.OK, null, "projects", getProjectIdOrPath(projectIdOrPath), "variables", key); return (response.readEntity(Variable.class)); }
[ "public", "Variable", "getVariable", "(", "Object", "projectIdOrPath", ",", "String", "key", ")", "throws", "GitLabApiException", "{", "Response", "response", "=", "get", "(", "Response", ".", "Status", ".", "OK", ",", "null", ",", "\"projects\"", ",", "getPro...
Get the details of a project variable. <pre><code>GitLab Endpoint: GET /projects/:id/variables/:key</code></pre> @param projectIdOrPath projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance, required @param key the key of an existing variable, required @return the Variable insta...
[ "Get", "the", "details", "of", "a", "project", "variable", "." ]
train
https://github.com/gmessner/gitlab4j-api/blob/ab045070abac0a8f4ccbf17b5ed9bfdef5723eed/src/main/java/org/gitlab4j/api/ProjectApi.java#L2466-L2469
openengsb/openengsb
api/ekb/src/main/java/org/openengsb/core/ekb/api/transformation/TransformationDescription.java
TransformationDescription.splitField
public void splitField(String sourceField, String targetField, String splitString, String index) { TransformationStep step = new TransformationStep(); step.setTargetField(targetField); step.setSourceFields(sourceField); step.setOperationParameter(TransformationConstants.SPLIT_PARAM, spli...
java
public void splitField(String sourceField, String targetField, String splitString, String index) { TransformationStep step = new TransformationStep(); step.setTargetField(targetField); step.setSourceFields(sourceField); step.setOperationParameter(TransformationConstants.SPLIT_PARAM, spli...
[ "public", "void", "splitField", "(", "String", "sourceField", ",", "String", "targetField", ",", "String", "splitString", ",", "String", "index", ")", "{", "TransformationStep", "step", "=", "new", "TransformationStep", "(", ")", ";", "step", ".", "setTargetFiel...
Adds a split transformation step to the transformation description. The value of the source field is split based on the split string into parts. Based on the given index, the result will be set to the target field. The index needs to be an integer value. All fields need to be of the type String.
[ "Adds", "a", "split", "transformation", "step", "to", "the", "transformation", "description", ".", "The", "value", "of", "the", "source", "field", "is", "split", "based", "on", "the", "split", "string", "into", "parts", ".", "Based", "on", "the", "given", ...
train
https://github.com/openengsb/openengsb/blob/d39058000707f617cd405629f9bc7f17da7b414a/api/ekb/src/main/java/org/openengsb/core/ekb/api/transformation/TransformationDescription.java#L95-L103
JOML-CI/JOML
src/org/joml/Matrix3f.java
Matrix3f.obliqueZ
public Matrix3f obliqueZ(float a, float b, Matrix3f dest) { dest.m00 = m00; dest.m01 = m01; dest.m02 = m02; dest.m10 = m10; dest.m11 = m11; dest.m12 = m12; dest.m20 = m00 * a + m10 * b + m20; dest.m21 = m01 * a + m11 * b + m21; dest.m22 = m02 * a +...
java
public Matrix3f obliqueZ(float a, float b, Matrix3f dest) { dest.m00 = m00; dest.m01 = m01; dest.m02 = m02; dest.m10 = m10; dest.m11 = m11; dest.m12 = m12; dest.m20 = m00 * a + m10 * b + m20; dest.m21 = m01 * a + m11 * b + m21; dest.m22 = m02 * a +...
[ "public", "Matrix3f", "obliqueZ", "(", "float", "a", ",", "float", "b", ",", "Matrix3f", "dest", ")", "{", "dest", ".", "m00", "=", "m00", ";", "dest", ".", "m01", "=", "m01", ";", "dest", ".", "m02", "=", "m02", ";", "dest", ".", "m10", "=", "...
Apply an oblique projection transformation to this matrix with the given values for <code>a</code> and <code>b</code> and store the result in <code>dest</code>. <p> If <code>M</code> is <code>this</code> matrix and <code>O</code> the oblique transformation matrix, then the new matrix will be <code>M * O</code>. So when...
[ "Apply", "an", "oblique", "projection", "transformation", "to", "this", "matrix", "with", "the", "given", "values", "for", "<code", ">", "a<", "/", "code", ">", "and", "<code", ">", "b<", "/", "code", ">", "and", "store", "the", "result", "in", "<code", ...
train
https://github.com/JOML-CI/JOML/blob/ce2652fc236b42bda3875c591f8e6645048a678f/src/org/joml/Matrix3f.java#L4180-L4191
intive-FDV/DynamicJasper
src/main/java/ar/com/fdvs/dj/core/DynamicJasperHelper.java
DynamicJasperHelper.visitSubreports
@SuppressWarnings("unchecked") protected static void visitSubreports(DynamicReport dr, Map _parameters) { for (DJGroup group : dr.getColumnsGroups()) { //Header Subreports for (Subreport subreport : group.getHeaderSubreports()) { if (subreport.getDynamicReport() != nu...
java
@SuppressWarnings("unchecked") protected static void visitSubreports(DynamicReport dr, Map _parameters) { for (DJGroup group : dr.getColumnsGroups()) { //Header Subreports for (Subreport subreport : group.getHeaderSubreports()) { if (subreport.getDynamicReport() != nu...
[ "@", "SuppressWarnings", "(", "\"unchecked\"", ")", "protected", "static", "void", "visitSubreports", "(", "DynamicReport", "dr", ",", "Map", "_parameters", ")", "{", "for", "(", "DJGroup", "group", ":", "dr", ".", "getColumnsGroups", "(", ")", ")", "{", "//...
Performs any needed operation on subreports after they are built like ensuring proper subreport with if "fitToParentPrintableArea" flag is set to true @param dr @param _parameters @throws JRException
[ "Performs", "any", "needed", "operation", "on", "subreports", "after", "they", "are", "built", "like", "ensuring", "proper", "subreport", "with", "if", "fitToParentPrintableArea", "flag", "is", "set", "to", "true" ]
train
https://github.com/intive-FDV/DynamicJasper/blob/63919574cc401ae40574d13129f628e66d1682a3/src/main/java/ar/com/fdvs/dj/core/DynamicJasperHelper.java#L553-L573
carewebframework/carewebframework-vista
org.carewebframework.vista.api-parent/org.carewebframework.vista.api.notification/src/main/java/org/carewebframework/vista/api/notification/NotificationService.java
NotificationService.getUsers
public void getUsers(String startFrom, boolean forward, Collection<Recipient> result) { List<String> lst = broker.callRPCList("RGCWFUSR LOOKUP", null, startFrom, forward ? 1 : -1, null, null, "A"); toRecipients(lst, false, startFrom, result); }
java
public void getUsers(String startFrom, boolean forward, Collection<Recipient> result) { List<String> lst = broker.callRPCList("RGCWFUSR LOOKUP", null, startFrom, forward ? 1 : -1, null, null, "A"); toRecipients(lst, false, startFrom, result); }
[ "public", "void", "getUsers", "(", "String", "startFrom", ",", "boolean", "forward", ",", "Collection", "<", "Recipient", ">", "result", ")", "{", "List", "<", "String", ">", "lst", "=", "broker", ".", "callRPCList", "(", "\"RGCWFUSR LOOKUP\"", ",", "null", ...
Returns a bolus of users. @param startFrom Starting entry. @param forward Direction of traversal. @param result Result of lookup.
[ "Returns", "a", "bolus", "of", "users", "." ]
train
https://github.com/carewebframework/carewebframework-vista/blob/883b2cbe395d9e8a21cd19db820f0876bda6b1c6/org.carewebframework.vista.api-parent/org.carewebframework.vista.api.notification/src/main/java/org/carewebframework/vista/api/notification/NotificationService.java#L74-L77
reinert/requestor
requestor/core/requestor-api/src/main/java/io/reinert/requestor/uri/UriBuilderImpl.java
UriBuilderImpl.assertNotNull
private void assertNotNull(Object value, String message) throws IllegalArgumentException { if (value == null) { throw new IllegalArgumentException(message); } }
java
private void assertNotNull(Object value, String message) throws IllegalArgumentException { if (value == null) { throw new IllegalArgumentException(message); } }
[ "private", "void", "assertNotNull", "(", "Object", "value", ",", "String", "message", ")", "throws", "IllegalArgumentException", "{", "if", "(", "value", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "message", ")", ";", "}", "}" ]
Assert that the value is not null. @param value the value @param message the message to include with any exceptions @throws IllegalArgumentException if value is null
[ "Assert", "that", "the", "value", "is", "not", "null", "." ]
train
https://github.com/reinert/requestor/blob/40163a75cd17815d5089935d0dd97b8d652ad6d4/requestor/core/requestor-api/src/main/java/io/reinert/requestor/uri/UriBuilderImpl.java#L317-L321
netty/netty
resolver/src/main/java/io/netty/resolver/AddressResolverGroup.java
AddressResolverGroup.getResolver
public AddressResolver<T> getResolver(final EventExecutor executor) { if (executor == null) { throw new NullPointerException("executor"); } if (executor.isShuttingDown()) { throw new IllegalStateException("executor not accepting a task"); } AddressResolv...
java
public AddressResolver<T> getResolver(final EventExecutor executor) { if (executor == null) { throw new NullPointerException("executor"); } if (executor.isShuttingDown()) { throw new IllegalStateException("executor not accepting a task"); } AddressResolv...
[ "public", "AddressResolver", "<", "T", ">", "getResolver", "(", "final", "EventExecutor", "executor", ")", "{", "if", "(", "executor", "==", "null", ")", "{", "throw", "new", "NullPointerException", "(", "\"executor\"", ")", ";", "}", "if", "(", "executor", ...
Returns the {@link AddressResolver} associated with the specified {@link EventExecutor}. If there's no associated resolved found, this method creates and returns a new resolver instance created by {@link #newResolver(EventExecutor)} so that the new resolver is reused on another {@link #getResolver(EventExecutor)} call ...
[ "Returns", "the", "{" ]
train
https://github.com/netty/netty/blob/ba06eafa1c1824bd154f1a380019e7ea2edf3c4c/resolver/src/main/java/io/netty/resolver/AddressResolverGroup.java#L54-L90
QSFT/Doradus
doradus-server/src/main/java/com/dell/doradus/service/schema/SchemaService.java
SchemaService.getApplication
public ApplicationDefinition getApplication(Tenant tenant, String appName) { checkServiceState(); return getApplicationDefinition(tenant, appName); }
java
public ApplicationDefinition getApplication(Tenant tenant, String appName) { checkServiceState(); return getApplicationDefinition(tenant, appName); }
[ "public", "ApplicationDefinition", "getApplication", "(", "Tenant", "tenant", ",", "String", "appName", ")", "{", "checkServiceState", "(", ")", ";", "return", "getApplicationDefinition", "(", "tenant", ",", "appName", ")", ";", "}" ]
Return the {@link ApplicationDefinition} for the application in the given tenant. Null is returned if no application is found with the given name and tenant. @return The {@link ApplicationDefinition} for the given application or null if no no such application is defined in the default tenant.
[ "Return", "the", "{", "@link", "ApplicationDefinition", "}", "for", "the", "application", "in", "the", "given", "tenant", ".", "Null", "is", "returned", "if", "no", "application", "is", "found", "with", "the", "given", "name", "and", "tenant", "." ]
train
https://github.com/QSFT/Doradus/blob/ad64d3c37922eefda68ec8869ef089c1ca604b70/doradus-server/src/main/java/com/dell/doradus/service/schema/SchemaService.java#L178-L181
rometools/rome
rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedCollection.java
FileBasedCollection.addMediaEntry
public String addMediaEntry(final Entry entry, final String slug, final InputStream is) throws Exception { synchronized (FileStore.getFileStore()) { // Save media file temp file final Content content = entry.getContents().get(0); if (entry.getTitle() == null) { ...
java
public String addMediaEntry(final Entry entry, final String slug, final InputStream is) throws Exception { synchronized (FileStore.getFileStore()) { // Save media file temp file final Content content = entry.getContents().get(0); if (entry.getTitle() == null) { ...
[ "public", "String", "addMediaEntry", "(", "final", "Entry", "entry", ",", "final", "String", "slug", ",", "final", "InputStream", "is", ")", "throws", "Exception", "{", "synchronized", "(", "FileStore", ".", "getFileStore", "(", ")", ")", "{", "// Save media f...
Add media entry to collection. Accepts a media file to be added to collection. The file will be saved to disk in a directory under the collection's directory and the path will follow the pattern <code>[collection-plural]/[entryid]/media/[entryid]</code>. An Atom entry will be created to store metadata for the entry and...
[ "Add", "media", "entry", "to", "collection", ".", "Accepts", "a", "media", "file", "to", "be", "added", "to", "collection", ".", "The", "file", "will", "be", "saved", "to", "disk", "in", "a", "directory", "under", "the", "collection", "s", "directory", "...
train
https://github.com/rometools/rome/blob/5fcf0b1a9a6cdedbe253a45ad9468c54a0f97010/rome-propono/src/main/java/com/rometools/propono/atom/server/impl/FileBasedCollection.java#L226-L264
GerdHolz/TOVAL
src/de/invation/code/toval/os/LinuxUtils.java
LinuxUtils.registerFileExtension
@Override public boolean registerFileExtension(String mimeTypeName, String fileTypeExtension, String application) throws OSException { // TODO create mime-info in /usr/share/mime/packages // TODO add MIME type to .desktop file // not possible due to missing permissions? throw new Uns...
java
@Override public boolean registerFileExtension(String mimeTypeName, String fileTypeExtension, String application) throws OSException { // TODO create mime-info in /usr/share/mime/packages // TODO add MIME type to .desktop file // not possible due to missing permissions? throw new Uns...
[ "@", "Override", "public", "boolean", "registerFileExtension", "(", "String", "mimeTypeName", ",", "String", "fileTypeExtension", ",", "String", "application", ")", "throws", "OSException", "{", "// TODO create mime-info in /usr/share/mime/packages", "// TODO add MIME type to ....
Registers a new file extension. @param mimeTypeName MIME type of the file extension. Must be atomic, e.g. <code>foocorp.fooapp.v1</code>. @param fileTypeExtension File extension with leading dot, e.g. <code>.bar</code>. @param application Path to the application, which should open the new file extension. @return <code...
[ "Registers", "a", "new", "file", "extension", "." ]
train
https://github.com/GerdHolz/TOVAL/blob/036922cdfd710fa53b18e5dbe1e07f226f731fde/src/de/invation/code/toval/os/LinuxUtils.java#L141-L147
fcrepo3/fcrepo
fcrepo-server/src/main/java/org/fcrepo/server/journal/JournalCreator.java
JournalCreator.purgeObject
public Date purgeObject(Context context, String pid, String logMessage) throws ServerException { try { CreatorJournalEntry cje = new CreatorJournalEntry(METHOD_PURGE_OBJECT, context); cje.addArgument(ARGUMENT_NAM...
java
public Date purgeObject(Context context, String pid, String logMessage) throws ServerException { try { CreatorJournalEntry cje = new CreatorJournalEntry(METHOD_PURGE_OBJECT, context); cje.addArgument(ARGUMENT_NAM...
[ "public", "Date", "purgeObject", "(", "Context", "context", ",", "String", "pid", ",", "String", "logMessage", ")", "throws", "ServerException", "{", "try", "{", "CreatorJournalEntry", "cje", "=", "new", "CreatorJournalEntry", "(", "METHOD_PURGE_OBJECT", ",", "con...
Create a journal entry, add the arguments, and invoke the method.
[ "Create", "a", "journal", "entry", "add", "the", "arguments", "and", "invoke", "the", "method", "." ]
train
https://github.com/fcrepo3/fcrepo/blob/37df51b9b857fd12c6ab8269820d406c3c4ad774/fcrepo-server/src/main/java/org/fcrepo/server/journal/JournalCreator.java#L148-L160
deeplearning4j/deeplearning4j
deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/util/ConvolutionUtils.java
ConvolutionUtils.cnn1dMaskReduction
public static INDArray cnn1dMaskReduction(INDArray in, int kernel, int stride, int padding, int dilation, ConvolutionMode cm){ Preconditions.checkState(in.rank()==2, "Rank must be 2 for cnn1d mask array - shape ", in.shape()); if(cm == ConvolutionMode.Same && stride == 1 ){ return in; ...
java
public static INDArray cnn1dMaskReduction(INDArray in, int kernel, int stride, int padding, int dilation, ConvolutionMode cm){ Preconditions.checkState(in.rank()==2, "Rank must be 2 for cnn1d mask array - shape ", in.shape()); if(cm == ConvolutionMode.Same && stride == 1 ){ return in; ...
[ "public", "static", "INDArray", "cnn1dMaskReduction", "(", "INDArray", "in", ",", "int", "kernel", ",", "int", "stride", ",", "int", "padding", ",", "int", "dilation", ",", "ConvolutionMode", "cm", ")", "{", "Preconditions", ".", "checkState", "(", "in", "."...
Given a mask array for a 1D CNN layer of shape [minibatch, sequenceLength], reduce the mask according to the 1D CNN layer configuration. Unlike RNN layers, 1D CNN layers may down-sample the data; consequently, we need to down-sample the mask array in the same way, to maintain the correspondence between the masks and th...
[ "Given", "a", "mask", "array", "for", "a", "1D", "CNN", "layer", "of", "shape", "[", "minibatch", "sequenceLength", "]", "reduce", "the", "mask", "according", "to", "the", "1D", "CNN", "layer", "configuration", ".", "Unlike", "RNN", "layers", "1D", "CNN", ...
train
https://github.com/deeplearning4j/deeplearning4j/blob/effce52f2afd7eeb53c5bcca699fcd90bd06822f/deeplearning4j/deeplearning4j-nn/src/main/java/org/deeplearning4j/util/ConvolutionUtils.java#L614-L645
i-net-software/jlessc
src/com/inet/lib/less/FunctionExpression.java
FunctionExpression.getColorDigit
private int getColorDigit( int idx, CssFormatter formatter ) { Expression expression = get( idx ); double d = expression.doubleValue( formatter ); if( expression.getDataType( formatter ) == PERCENT ) { d *= 2.55; } return colorDigit(d); }
java
private int getColorDigit( int idx, CssFormatter formatter ) { Expression expression = get( idx ); double d = expression.doubleValue( formatter ); if( expression.getDataType( formatter ) == PERCENT ) { d *= 2.55; } return colorDigit(d); }
[ "private", "int", "getColorDigit", "(", "int", "idx", ",", "CssFormatter", "formatter", ")", "{", "Expression", "expression", "=", "get", "(", "idx", ")", ";", "double", "d", "=", "expression", ".", "doubleValue", "(", "formatter", ")", ";", "if", "(", "...
Get the idx parameter from the parameter list as color digit. @param idx the index starting with 0 @param formatter current formatter @return the expression
[ "Get", "the", "idx", "parameter", "from", "the", "parameter", "list", "as", "color", "digit", "." ]
train
https://github.com/i-net-software/jlessc/blob/15b13e1637f6cc2e4d72df021e23ee0ca8d5e629/src/com/inet/lib/less/FunctionExpression.java#L899-L906
Azure/azure-sdk-for-java
cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ReviewsImpl.java
ReviewsImpl.createVideoReviewsWithServiceResponseAsync
public Observable<ServiceResponse<List<String>>> createVideoReviewsWithServiceResponseAsync(String teamName, String contentType, List<CreateVideoReviewsBodyItem> createVideoReviewsBody, CreateVideoReviewsOptionalParameter createVideoReviewsOptionalParameter) { if (this.client.baseUrl() == null) { th...
java
public Observable<ServiceResponse<List<String>>> createVideoReviewsWithServiceResponseAsync(String teamName, String contentType, List<CreateVideoReviewsBodyItem> createVideoReviewsBody, CreateVideoReviewsOptionalParameter createVideoReviewsOptionalParameter) { if (this.client.baseUrl() == null) { th...
[ "public", "Observable", "<", "ServiceResponse", "<", "List", "<", "String", ">", ">", ">", "createVideoReviewsWithServiceResponseAsync", "(", "String", "teamName", ",", "String", "contentType", ",", "List", "<", "CreateVideoReviewsBodyItem", ">", "createVideoReviewsBody...
The reviews created would show up for Reviewers on your team. As Reviewers complete reviewing, results of the Review would be POSTED (i.e. HTTP POST) on the specified CallBackEndpoint. &lt;h3&gt;CallBack Schemas &lt;/h3&gt; &lt;h4&gt;Review Completion CallBack Sample&lt;/h4&gt; &lt;p&gt; {&lt;br/&gt; "ReviewId": "&lt;R...
[ "The", "reviews", "created", "would", "show", "up", "for", "Reviewers", "on", "your", "team", ".", "As", "Reviewers", "complete", "reviewing", "results", "of", "the", "Review", "would", "be", "POSTED", "(", "i", ".", "e", ".", "HTTP", "POST", ")", "on", ...
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/cognitiveservices/data-plane/vision/contentmoderator/src/main/java/com/microsoft/azure/cognitiveservices/vision/contentmoderator/implementation/ReviewsImpl.java#L2019-L2036
apache/groovy
subprojects/groovy-nio/src/main/java/org/codehaus/groovy/runtime/NioGroovyMethods.java
NioGroovyMethods.eachFile
public static void eachFile(final Path self, final FileType fileType, @ClosureParams(value = SimpleType.class, options = "java.nio.file.Path") final Closure closure) throws IOException { //throws FileNotFoundException, IllegalArgumentException { checkDir(self); // TODO GroovyDoc doesn't parse t...
java
public static void eachFile(final Path self, final FileType fileType, @ClosureParams(value = SimpleType.class, options = "java.nio.file.Path") final Closure closure) throws IOException { //throws FileNotFoundException, IllegalArgumentException { checkDir(self); // TODO GroovyDoc doesn't parse t...
[ "public", "static", "void", "eachFile", "(", "final", "Path", "self", ",", "final", "FileType", "fileType", ",", "@", "ClosureParams", "(", "value", "=", "SimpleType", ".", "class", ",", "options", "=", "\"java.nio.file.Path\"", ")", "final", "Closure", "closu...
Invokes the closure for each 'child' file in this 'parent' folder/directory. Both regular files and subfolders/subdirectories can be processed depending on the fileType enum value. @param self a Path (that happens to be a folder/directory) @param fileType if normal files or directories or both should be processed ...
[ "Invokes", "the", "closure", "for", "each", "child", "file", "in", "this", "parent", "folder", "/", "directory", ".", "Both", "regular", "files", "and", "subfolders", "/", "subdirectories", "can", "be", "processed", "depending", "on", "the", "fileType", "enum"...
train
https://github.com/apache/groovy/blob/71cf20addb611bb8d097a59e395fd20bc7f31772/subprojects/groovy-nio/src/main/java/org/codehaus/groovy/runtime/NioGroovyMethods.java#L859-L873
ManfredTremmel/gwt-bean-validators
gwtp-spring-integration/src/main/super/de/knightsoftnet/gwtp/spring/supersource/org/springframework/util/CollectionUtils.java
CollectionUtils.findValueOfType
@GwtIncompatible("incompatible method") @Nullable public static Object findValueOfType(final Collection<?> collection, final Class<?>[] types) { if (CollectionUtils.isEmpty(collection) || ObjectUtils.isEmpty(types)) { return null; } for (final Class<?> type : types) { final Object value = Co...
java
@GwtIncompatible("incompatible method") @Nullable public static Object findValueOfType(final Collection<?> collection, final Class<?>[] types) { if (CollectionUtils.isEmpty(collection) || ObjectUtils.isEmpty(types)) { return null; } for (final Class<?> type : types) { final Object value = Co...
[ "@", "GwtIncompatible", "(", "\"incompatible method\"", ")", "@", "Nullable", "public", "static", "Object", "findValueOfType", "(", "final", "Collection", "<", "?", ">", "collection", ",", "final", "Class", "<", "?", ">", "[", "]", "types", ")", "{", "if", ...
Find a single value of one of the given types in the given Collection: searching the Collection for a value of the first type, then searching for a value of the second type, etc. @param collection the collection to search @param types the types to look for, in prioritized order @return a value of one of the given type...
[ "Find", "a", "single", "value", "of", "one", "of", "the", "given", "types", "in", "the", "given", "Collection", ":", "searching", "the", "Collection", "for", "a", "value", "of", "the", "first", "type", "then", "searching", "for", "a", "value", "of", "the...
train
https://github.com/ManfredTremmel/gwt-bean-validators/blob/cff7a2c3d68c2d17bf9d3cc57c79cc16fa8b4d5c/gwtp-spring-integration/src/main/super/de/knightsoftnet/gwtp/spring/supersource/org/springframework/util/CollectionUtils.java#L272-L285
groovy/groovy-core
src/main/org/codehaus/groovy/vmplugin/v5/PluginDefaultGroovyMethods.java
PluginDefaultGroovyMethods.leftShift
public static StringBuilder leftShift(StringBuilder self, Object value) { if (value instanceof CharSequence) return self.append((CharSequence)value); else return self.append(value); }
java
public static StringBuilder leftShift(StringBuilder self, Object value) { if (value instanceof CharSequence) return self.append((CharSequence)value); else return self.append(value); }
[ "public", "static", "StringBuilder", "leftShift", "(", "StringBuilder", "self", ",", "Object", "value", ")", "{", "if", "(", "value", "instanceof", "CharSequence", ")", "return", "self", ".", "append", "(", "(", "CharSequence", ")", "value", ")", ";", "else"...
Overloads the left shift operator to provide an easy way to append multiple objects as string representations to a StringBuilder. @param self a StringBuilder @param value a value to append @return the StringBuilder on which this operation was invoked
[ "Overloads", "the", "left", "shift", "operator", "to", "provide", "an", "easy", "way", "to", "append", "multiple", "objects", "as", "string", "representations", "to", "a", "StringBuilder", "." ]
train
https://github.com/groovy/groovy-core/blob/01309f9d4be34ddf93c4a9943b5a97843bff6181/src/main/org/codehaus/groovy/vmplugin/v5/PluginDefaultGroovyMethods.java#L98-L103
Azure/azure-sdk-for-java
locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/implementation/ManagementLocksInner.java
ManagementLocksInner.getByScope
public ManagementLockObjectInner getByScope(String scope, String lockName) { return getByScopeWithServiceResponseAsync(scope, lockName).toBlocking().single().body(); }
java
public ManagementLockObjectInner getByScope(String scope, String lockName) { return getByScopeWithServiceResponseAsync(scope, lockName).toBlocking().single().body(); }
[ "public", "ManagementLockObjectInner", "getByScope", "(", "String", "scope", ",", "String", "lockName", ")", "{", "return", "getByScopeWithServiceResponseAsync", "(", "scope", ",", "lockName", ")", ".", "toBlocking", "(", ")", ".", "single", "(", ")", ".", "body...
Get a management lock by scope. @param scope The scope for the lock. @param lockName The name of lock. @throws IllegalArgumentException thrown if parameters fail the validation @throws CloudException thrown if the request is rejected by server @throws RuntimeException all other wrapped checked exceptions if the reques...
[ "Get", "a", "management", "lock", "by", "scope", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/locks/resource-manager/v2016_09_01/src/main/java/com/microsoft/azure/management/locks/v2016_09_01/implementation/ManagementLocksInner.java#L600-L602
Red5/red5-server-common
src/main/java/org/red5/server/net/rtmp/codec/RTMPProtocolDecoder.java
RTMPProtocolDecoder.decodeAction
private Invoke decodeAction(Encoding encoding, IoBuffer in, Header header) { // for response, the action string and invokeId is always encoded as AMF0 we use the first byte to decide which encoding to use in.mark(); byte tmp = in.get(); in.reset(); Input input; if (...
java
private Invoke decodeAction(Encoding encoding, IoBuffer in, Header header) { // for response, the action string and invokeId is always encoded as AMF0 we use the first byte to decide which encoding to use in.mark(); byte tmp = in.get(); in.reset(); Input input; if (...
[ "private", "Invoke", "decodeAction", "(", "Encoding", "encoding", ",", "IoBuffer", "in", ",", "Header", "header", ")", "{", "// for response, the action string and invokeId is always encoded as AMF0 we use the first byte to decide which encoding to use\r", "in", ".", "mark", "(",...
Decode the 'action' for a supplied an Invoke. @param encoding AMF encoding @param in buffer @param header data header @return notify
[ "Decode", "the", "action", "for", "a", "supplied", "an", "Invoke", "." ]
train
https://github.com/Red5/red5-server-common/blob/39ae73710c25bda86d70b13ef37ae707962217b9/src/main/java/org/red5/server/net/rtmp/codec/RTMPProtocolDecoder.java#L752-L796
RestComm/sip-servlets
containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/startup/SipNamingContextListener.java
SipNamingContextListener.removeSipSessionsUtil
public static void removeSipSessionsUtil(Context envCtx, String appName, SipSessionsUtil sipSessionsUtil) { if(envCtx != null) { try { javax.naming.Context sipContext = (javax.naming.Context)envCtx.lookup(SIP_SUBCONTEXT + "/" + appName); sipContext.unbind(SIP_SESSIONS_UTIL_JNDI_NAME); } catch (Nami...
java
public static void removeSipSessionsUtil(Context envCtx, String appName, SipSessionsUtil sipSessionsUtil) { if(envCtx != null) { try { javax.naming.Context sipContext = (javax.naming.Context)envCtx.lookup(SIP_SUBCONTEXT + "/" + appName); sipContext.unbind(SIP_SESSIONS_UTIL_JNDI_NAME); } catch (Nami...
[ "public", "static", "void", "removeSipSessionsUtil", "(", "Context", "envCtx", ",", "String", "appName", ",", "SipSessionsUtil", "sipSessionsUtil", ")", "{", "if", "(", "envCtx", "!=", "null", ")", "{", "try", "{", "javax", ".", "naming", ".", "Context", "si...
Removes the sip sessions util binding from the jndi mapping @param appName the application name subcontext @param sipSessionsUtil the sip sessions util to remove
[ "Removes", "the", "sip", "sessions", "util", "binding", "from", "the", "jndi", "mapping" ]
train
https://github.com/RestComm/sip-servlets/blob/fd7011d2803ab1d205b140768a760c8c69e0c997/containers/tomcat-7/src/main/java/org/mobicents/servlet/sip/startup/SipNamingContextListener.java#L229-L238
james-hu/jabb-core
src/main/java/net/sf/jabb/util/db/ResultSetUtility.java
ResultSetUtility.columnToPropertyName
protected String columnToPropertyName(ResultSetMetaData rsmd, int col) throws SQLException{ String columnName = rsmd.getColumnLabel(col); if (null == columnName || 0 == columnName.length()) { columnName = rsmd.getColumnName(col); } return columnNameToPropertyName(columnName); }
java
protected String columnToPropertyName(ResultSetMetaData rsmd, int col) throws SQLException{ String columnName = rsmd.getColumnLabel(col); if (null == columnName || 0 == columnName.length()) { columnName = rsmd.getColumnName(col); } return columnNameToPropertyName(columnName); }
[ "protected", "String", "columnToPropertyName", "(", "ResultSetMetaData", "rsmd", ",", "int", "col", ")", "throws", "SQLException", "{", "String", "columnName", "=", "rsmd", ".", "getColumnLabel", "(", "col", ")", ";", "if", "(", "null", "==", "columnName", "||...
Convert column name to property name for a column, for example, THIS_IS_1ST_COLUMN_$$ will become thisIs1stColumn @param rsmd the metadata @param col the column number @return for example, THIS_IS_1ST_COLUMN_$$ will become thisIs1stColumn @throws SQLException
[ "Convert", "column", "name", "to", "property", "name", "for", "a", "column", "for", "example", "THIS_IS_1ST_COLUMN_$$", "will", "become", "thisIs1stColumn" ]
train
https://github.com/james-hu/jabb-core/blob/bceed441595c5e5195a7418795f03b69fa7b61e4/src/main/java/net/sf/jabb/util/db/ResultSetUtility.java#L294-L300
alkacon/opencms-core
src/org/opencms/ui/apps/sitemanager/CmsEditSiteForm.java
CmsEditSiteForm.getParameterString
private String getParameterString(Entry<String, String> parameter) { return parameter.getKey() + "=" + parameter.getValue(); }
java
private String getParameterString(Entry<String, String> parameter) { return parameter.getKey() + "=" + parameter.getValue(); }
[ "private", "String", "getParameterString", "(", "Entry", "<", "String", ",", "String", ">", "parameter", ")", "{", "return", "parameter", ".", "getKey", "(", ")", "+", "\"=\"", "+", "parameter", ".", "getValue", "(", ")", ";", "}" ]
Map entry of parameter to String representation.<p> @param parameter Entry holding parameter info. @return the parameter formatted as string
[ "Map", "entry", "of", "parameter", "to", "String", "representation", ".", "<p", ">" ]
train
https://github.com/alkacon/opencms-core/blob/bc104acc75d2277df5864da939a1f2de5fdee504/src/org/opencms/ui/apps/sitemanager/CmsEditSiteForm.java#L1784-L1787
eFaps/eFaps-Kernel
src/main/java/org/efaps/admin/common/SystemConfiguration.java
SystemConfiguration.getObjectAttributeValueAsProperties
public Properties getObjectAttributeValueAsProperties(final String _key) throws EFapsException { final Properties ret = new Properties(); final String value = getValue(_key, ConfType.OBJATTR); if (value != null) { try { ret.load(new StringReader(value)); ...
java
public Properties getObjectAttributeValueAsProperties(final String _key) throws EFapsException { final Properties ret = new Properties(); final String value = getValue(_key, ConfType.OBJATTR); if (value != null) { try { ret.load(new StringReader(value)); ...
[ "public", "Properties", "getObjectAttributeValueAsProperties", "(", "final", "String", "_key", ")", "throws", "EFapsException", "{", "final", "Properties", "ret", "=", "new", "Properties", "(", ")", ";", "final", "String", "value", "=", "getValue", "(", "_key", ...
Returns for given <code>OID</code> the related value as Properties. If no attribute is found an empty Properties is returned. @param _key key of searched attribute @return Properties @throws EFapsException on error @see #objectAttributes
[ "Returns", "for", "given", "<code", ">", "OID<", "/", "code", ">", "the", "related", "value", "as", "Properties", ".", "If", "no", "attribute", "is", "found", "an", "empty", "Properties", "is", "returned", "." ]
train
https://github.com/eFaps/eFaps-Kernel/blob/04b96548f518c2386a93f5ec2b9349f9b9063859/src/main/java/org/efaps/admin/common/SystemConfiguration.java#L350-L363
gallandarakhneorg/afc
advanced/gis/giscorefx/src/main/java/org/arakhne/afc/gis/ui/drawers/AbstractMapPolylineDrawer.java
AbstractMapPolylineDrawer.definePath
protected void definePath(ZoomableGraphicsContext gc, T element) { gc.beginPath(); final PathIterator2afp<PathElement2d> pathIterator = element.toPath2D().getPathIterator(); switch (pathIterator.getWindingRule()) { case EVEN_ODD: gc.setFillRule(FillRule.EVEN_ODD); break; case NON_ZERO: gc.setFillRule...
java
protected void definePath(ZoomableGraphicsContext gc, T element) { gc.beginPath(); final PathIterator2afp<PathElement2d> pathIterator = element.toPath2D().getPathIterator(); switch (pathIterator.getWindingRule()) { case EVEN_ODD: gc.setFillRule(FillRule.EVEN_ODD); break; case NON_ZERO: gc.setFillRule...
[ "protected", "void", "definePath", "(", "ZoomableGraphicsContext", "gc", ",", "T", "element", ")", "{", "gc", ".", "beginPath", "(", ")", ";", "final", "PathIterator2afp", "<", "PathElement2d", ">", "pathIterator", "=", "element", ".", "toPath2D", "(", ")", ...
Draw the polyline path. @param gc the graphics context that must be used for drawing. @param element the map element.
[ "Draw", "the", "polyline", "path", "." ]
train
https://github.com/gallandarakhneorg/afc/blob/0c7d2e1ddefd4167ef788416d970a6c1ef6f8bbb/advanced/gis/giscorefx/src/main/java/org/arakhne/afc/gis/ui/drawers/AbstractMapPolylineDrawer.java#L46-L90
Azure/azure-sdk-for-java
network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/LoadBalancersInner.java
LoadBalancersInner.createOrUpdate
public LoadBalancerInner createOrUpdate(String resourceGroupName, String loadBalancerName, LoadBalancerInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, loadBalancerName, parameters).toBlocking().last().body(); }
java
public LoadBalancerInner createOrUpdate(String resourceGroupName, String loadBalancerName, LoadBalancerInner parameters) { return createOrUpdateWithServiceResponseAsync(resourceGroupName, loadBalancerName, parameters).toBlocking().last().body(); }
[ "public", "LoadBalancerInner", "createOrUpdate", "(", "String", "resourceGroupName", ",", "String", "loadBalancerName", ",", "LoadBalancerInner", "parameters", ")", "{", "return", "createOrUpdateWithServiceResponseAsync", "(", "resourceGroupName", ",", "loadBalancerName", ","...
Creates or updates a load balancer. @param resourceGroupName The name of the resource group. @param loadBalancerName The name of the load balancer. @param parameters Parameters supplied to the create or update load balancer operation. @throws IllegalArgumentException thrown if parameters fail the validation @throws Cl...
[ "Creates", "or", "updates", "a", "load", "balancer", "." ]
train
https://github.com/Azure/azure-sdk-for-java/blob/aab183ddc6686c82ec10386d5a683d2691039626/network/resource-manager/v2018_08_01/src/main/java/com/microsoft/azure/management/network/v2018_08_01/implementation/LoadBalancersInner.java#L444-L446
looly/hutool
hutool-core/src/main/java/cn/hutool/core/io/file/FileWriter.java
FileWriter.writeLines
public <T> File writeLines(Collection<T> list, boolean isAppend) throws IORuntimeException { return writeLines(list, null, isAppend); }
java
public <T> File writeLines(Collection<T> list, boolean isAppend) throws IORuntimeException { return writeLines(list, null, isAppend); }
[ "public", "<", "T", ">", "File", "writeLines", "(", "Collection", "<", "T", ">", "list", ",", "boolean", "isAppend", ")", "throws", "IORuntimeException", "{", "return", "writeLines", "(", "list", ",", "null", ",", "isAppend", ")", ";", "}" ]
将列表写入文件 @param <T> 集合元素类型 @param list 列表 @param isAppend 是否追加 @return 目标文件 @throws IORuntimeException IO异常
[ "将列表写入文件" ]
train
https://github.com/looly/hutool/blob/bbd74eda4c7e8a81fe7a991fa6c2276eec062e6a/hutool-core/src/main/java/cn/hutool/core/io/file/FileWriter.java#L182-L184
Samsung/GearVRf
GVRf/Framework/framework/src/main/java/org/gearvrf/GVRDirectLight.java
GVRDirectLight.setShadowRange
public void setShadowRange(float near, float far) { GVRSceneObject owner = getOwnerObject(); GVROrthogonalCamera shadowCam = null; if (owner == null) { throw new UnsupportedOperationException("Light must have an owner to set the shadow range"); } GVRShado...
java
public void setShadowRange(float near, float far) { GVRSceneObject owner = getOwnerObject(); GVROrthogonalCamera shadowCam = null; if (owner == null) { throw new UnsupportedOperationException("Light must have an owner to set the shadow range"); } GVRShado...
[ "public", "void", "setShadowRange", "(", "float", "near", ",", "float", "far", ")", "{", "GVRSceneObject", "owner", "=", "getOwnerObject", "(", ")", ";", "GVROrthogonalCamera", "shadowCam", "=", "null", ";", "if", "(", "owner", "==", "null", ")", "{", "thr...
Sets the near and far range of the shadow map camera. <p> This function enables shadow mapping and sets the shadow map camera near and far range, controlling which objects affect the shadow map. To modify other properties of the shadow map camera's projection, you can call {@link GVRShadowMap#getCamera} and update them...
[ "Sets", "the", "near", "and", "far", "range", "of", "the", "shadow", "map", "camera", ".", "<p", ">", "This", "function", "enables", "shadow", "mapping", "and", "sets", "the", "shadow", "map", "camera", "near", "and", "far", "range", "controlling", "which"...
train
https://github.com/Samsung/GearVRf/blob/05034d465a7b0a494fabb9e9f2971ac19392f32d/GVRf/Framework/framework/src/main/java/org/gearvrf/GVRDirectLight.java#L242-L269
jenkinsci/github-plugin
src/main/java/org/jenkinsci/plugins/github/util/BuildDataHelper.java
BuildDataHelper.getCommitSHA1
@Nonnull public static ObjectId getCommitSHA1(@Nonnull Run<?, ?> build) throws IOException { List<BuildData> buildDataList = build.getActions(BuildData.class); Job<?, ?> parent = build.getParent(); BuildData buildData = calculateBuildData( parent.getName(), parent.getFullName()...
java
@Nonnull public static ObjectId getCommitSHA1(@Nonnull Run<?, ?> build) throws IOException { List<BuildData> buildDataList = build.getActions(BuildData.class); Job<?, ?> parent = build.getParent(); BuildData buildData = calculateBuildData( parent.getName(), parent.getFullName()...
[ "@", "Nonnull", "public", "static", "ObjectId", "getCommitSHA1", "(", "@", "Nonnull", "Run", "<", "?", ",", "?", ">", "build", ")", "throws", "IOException", "{", "List", "<", "BuildData", ">", "buildDataList", "=", "build", ".", "getActions", "(", "BuildDa...
Gets SHA1 from the build. @param build @return SHA1 of the las @throws IOException Cannot get the info about commit ID
[ "Gets", "SHA1", "from", "the", "build", "." ]
train
https://github.com/jenkinsci/github-plugin/blob/4e05b9aeb488af5342c78f78aa3c55114e8d462a/src/main/java/org/jenkinsci/plugins/github/util/BuildDataHelper.java#L76-L104
Sproutigy/Java-Commons-Binary
src/main/java/com/sproutigy/commons/binary/Binary.java
Binary.toByteArray
public int toByteArray(byte[] target, int targetOffset) throws IOException { long length = length(); if ((long)targetOffset + length > Integer.MAX_VALUE) { throw new IOException("Unable to write - too big data"); } if (target.length < targetOffset + length) { thro...
java
public int toByteArray(byte[] target, int targetOffset) throws IOException { long length = length(); if ((long)targetOffset + length > Integer.MAX_VALUE) { throw new IOException("Unable to write - too big data"); } if (target.length < targetOffset + length) { thro...
[ "public", "int", "toByteArray", "(", "byte", "[", "]", "target", ",", "int", "targetOffset", ")", "throws", "IOException", "{", "long", "length", "=", "length", "(", ")", ";", "if", "(", "(", "long", ")", "targetOffset", "+", "length", ">", "Integer", ...
Writes data to some existing byte array starting from specific offset @param target byte array destination @param targetOffset destination offset to start @return length of source (written) data @throws IOException
[ "Writes", "data", "to", "some", "existing", "byte", "array", "starting", "from", "specific", "offset" ]
train
https://github.com/Sproutigy/Java-Commons-Binary/blob/547ab53d16e454d53ed5cef1d1ee514ec2d7c726/src/main/java/com/sproutigy/commons/binary/Binary.java#L264-L293
rzwitserloot/lombok
src/core/lombok/javac/HandlerLibrary.java
HandlerLibrary.loadAnnotationHandlers
@SuppressWarnings({"rawtypes", "unchecked"}) private static void loadAnnotationHandlers(HandlerLibrary lib, Trees trees) throws IOException { //No, that seemingly superfluous reference to JavacAnnotationHandler's classloader is not in fact superfluous! for (JavacAnnotationHandler handler : SpiLoadUtil.findServices...
java
@SuppressWarnings({"rawtypes", "unchecked"}) private static void loadAnnotationHandlers(HandlerLibrary lib, Trees trees) throws IOException { //No, that seemingly superfluous reference to JavacAnnotationHandler's classloader is not in fact superfluous! for (JavacAnnotationHandler handler : SpiLoadUtil.findServices...
[ "@", "SuppressWarnings", "(", "{", "\"rawtypes\"", ",", "\"unchecked\"", "}", ")", "private", "static", "void", "loadAnnotationHandlers", "(", "HandlerLibrary", "lib", ",", "Trees", "trees", ")", "throws", "IOException", "{", "//No, that seemingly superfluous reference ...
Uses SPI Discovery to find implementations of {@link JavacAnnotationHandler}.
[ "Uses", "SPI", "Discovery", "to", "find", "implementations", "of", "{" ]
train
https://github.com/rzwitserloot/lombok/blob/75601240760bd81ff95fcde7a1b8185769ce64e8/src/core/lombok/javac/HandlerLibrary.java#L178-L191