repository_name
stringlengths
7
58
func_path_in_repository
stringlengths
11
204
func_name
stringlengths
5
103
whole_func_string
stringlengths
87
3.44k
language
stringclasses
1 value
func_code_string
stringlengths
87
3.44k
func_code_tokens
listlengths
21
714
func_documentation_string
stringlengths
61
1.95k
func_documentation_tokens
listlengths
1
482
split_name
stringclasses
1 value
func_code_url
stringlengths
102
309
MariaDB/mariadb-connector-j
src/main/java/org/mariadb/jdbc/MariaDbConnection.java
MariaDbConnection.getWarnings
public SQLWarning getWarnings() throws SQLException { if (warningsCleared || isClosed() || !protocol.hasWarnings()) { return null; } SQLWarning last = null; SQLWarning first = null; try (Statement st = this.createStatement()) { try (ResultSet rs = st.executeQuery("show warnings")) { ...
java
public SQLWarning getWarnings() throws SQLException { if (warningsCleared || isClosed() || !protocol.hasWarnings()) { return null; } SQLWarning last = null; SQLWarning first = null; try (Statement st = this.createStatement()) { try (ResultSet rs = st.executeQuery("show warnings")) { ...
[ "public", "SQLWarning", "getWarnings", "(", ")", "throws", "SQLException", "{", "if", "(", "warningsCleared", "||", "isClosed", "(", ")", "||", "!", "protocol", ".", "hasWarnings", "(", ")", ")", "{", "return", "null", ";", "}", "SQLWarning", "last", "=", ...
<p>Retrieves the first warning reported by calls on this <code>Connection</code> object. If there is more than one warning, subsequent warnings will be chained to the first one and can be retrieved by calling the method <code>SQLWarning.getNextWarning</code> on the warning that was retrieved previously.</p> <p>This me...
[ "<p", ">", "Retrieves", "the", "first", "warning", "reported", "by", "calls", "on", "this", "<code", ">", "Connection<", "/", "code", ">", "object", ".", "If", "there", "is", "more", "than", "one", "warning", "subsequent", "warnings", "will", "be", "chaine...
train
https://github.com/MariaDB/mariadb-connector-j/blob/d148c7cd347c4680617be65d9e511b289d38a30b/src/main/java/org/mariadb/jdbc/MariaDbConnection.java#L997-L1024
graphhopper/graphhopper
core/src/main/java/com/graphhopper/routing/subnetwork/SubnetworkStorage.java
SubnetworkStorage.setSubnetwork
public void setSubnetwork(int nodeId, int subnetwork) { if (subnetwork > 127) throw new IllegalArgumentException("Number of subnetworks is currently limited to 127 but requested " + subnetwork); byte[] bytes = new byte[1]; bytes[0] = (byte) subnetwork; da.setBytes(nodeId, by...
java
public void setSubnetwork(int nodeId, int subnetwork) { if (subnetwork > 127) throw new IllegalArgumentException("Number of subnetworks is currently limited to 127 but requested " + subnetwork); byte[] bytes = new byte[1]; bytes[0] = (byte) subnetwork; da.setBytes(nodeId, by...
[ "public", "void", "setSubnetwork", "(", "int", "nodeId", ",", "int", "subnetwork", ")", "{", "if", "(", "subnetwork", ">", "127", ")", "throw", "new", "IllegalArgumentException", "(", "\"Number of subnetworks is currently limited to 127 but requested \"", "+", "subnetwo...
This method sets the subnetwork if of the specified nodeId. Default is 0 and means subnetwork was too small to be useful to be stored.
[ "This", "method", "sets", "the", "subnetwork", "if", "of", "the", "specified", "nodeId", ".", "Default", "is", "0", "and", "means", "subnetwork", "was", "too", "small", "to", "be", "useful", "to", "be", "stored", "." ]
train
https://github.com/graphhopper/graphhopper/blob/c235e306e6e823043cadcc41ead0e685bdebf737/core/src/main/java/com/graphhopper/routing/subnetwork/SubnetworkStorage.java#L54-L61
xmlunit/xmlunit
xmlunit-core/src/main/java/org/xmlunit/transform/Transformation.java
Transformation.addOutputProperty
public void addOutputProperty(String name, String value) { if (name == null) { throw new IllegalArgumentException("name must not be null"); } if (value == null) { throw new IllegalArgumentException("value must not be null"); } output.setProperty(name, valu...
java
public void addOutputProperty(String name, String value) { if (name == null) { throw new IllegalArgumentException("name must not be null"); } if (value == null) { throw new IllegalArgumentException("value must not be null"); } output.setProperty(name, valu...
[ "public", "void", "addOutputProperty", "(", "String", "name", ",", "String", "value", ")", "{", "if", "(", "name", "==", "null", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"name must not be null\"", ")", ";", "}", "if", "(", "value", "==", ...
Add a named output property. @param name name of the property - must not be null @param value value of the property - must not be null
[ "Add", "a", "named", "output", "property", "." ]
train
https://github.com/xmlunit/xmlunit/blob/fe3d701d43f57ee83dcba336e4c1555619d3084b/xmlunit-core/src/main/java/org/xmlunit/transform/Transformation.java#L84-L92
weld/core
environments/servlet/core/src/main/java/org/jboss/weld/environment/servlet/WeldServletLifecycle.java
WeldServletLifecycle.findContainer
protected Container findContainer(ContainerContext ctx, StringBuilder dump) { Container container = null; // 1. Custom container class String containerClassName = ctx.getServletContext().getInitParameter(Container.CONTEXT_PARAM_CONTAINER_CLASS); if (containerClassName != null) { ...
java
protected Container findContainer(ContainerContext ctx, StringBuilder dump) { Container container = null; // 1. Custom container class String containerClassName = ctx.getServletContext().getInitParameter(Container.CONTEXT_PARAM_CONTAINER_CLASS); if (containerClassName != null) { ...
[ "protected", "Container", "findContainer", "(", "ContainerContext", "ctx", ",", "StringBuilder", "dump", ")", "{", "Container", "container", "=", "null", ";", "// 1. Custom container class", "String", "containerClassName", "=", "ctx", ".", "getServletContext", "(", ")...
Find container env. @param ctx the container context @param dump the exception dump @return valid container or null
[ "Find", "container", "env", "." ]
train
https://github.com/weld/core/blob/567a2eaf95b168597d23a56be89bf05a7834b2aa/environments/servlet/core/src/main/java/org/jboss/weld/environment/servlet/WeldServletLifecycle.java#L341-L366
sagiegurari/fax4j
src/main/java/org/fax4j/spi/hylafax/HylaFaxClientSpi.java
HylaFaxClientSpi.cancelFaxJob
protected void cancelFaxJob(HylaFaxJob faxJob,HylaFAXClient client) throws Exception { //get job Job job=faxJob.getHylaFaxJob(); //cancel job client.kill(job); }
java
protected void cancelFaxJob(HylaFaxJob faxJob,HylaFAXClient client) throws Exception { //get job Job job=faxJob.getHylaFaxJob(); //cancel job client.kill(job); }
[ "protected", "void", "cancelFaxJob", "(", "HylaFaxJob", "faxJob", ",", "HylaFAXClient", "client", ")", "throws", "Exception", "{", "//get job", "Job", "job", "=", "faxJob", ".", "getHylaFaxJob", "(", ")", ";", "//cancel job", "client", ".", "kill", "(", "job",...
This function will cancel an existing fax job. @param client The client instance @param faxJob The fax job object containing the needed information @throws Exception Any exception
[ "This", "function", "will", "cancel", "an", "existing", "fax", "job", "." ]
train
https://github.com/sagiegurari/fax4j/blob/42fa51acabe7bf279e27ab3dd1cf76146b27955f/src/main/java/org/fax4j/spi/hylafax/HylaFaxClientSpi.java#L491-L498
mygreen/excel-cellformatter
src/main/java/com/github/mygreen/cellformatter/lang/MessageResolver.java
MessageResolver.loadDefaultResource
private MessageResource loadDefaultResource(final boolean allowedNoDefault, final boolean appendUserResource) { final String path = getPropertyPath(); Properties props = new Properties(); try { props.load(new InputStreamReader(MessageResolver.class.getResourceAsStream(path), "U...
java
private MessageResource loadDefaultResource(final boolean allowedNoDefault, final boolean appendUserResource) { final String path = getPropertyPath(); Properties props = new Properties(); try { props.load(new InputStreamReader(MessageResolver.class.getResourceAsStream(path), "U...
[ "private", "MessageResource", "loadDefaultResource", "(", "final", "boolean", "allowedNoDefault", ",", "final", "boolean", "appendUserResource", ")", "{", "final", "String", "path", "=", "getPropertyPath", "(", ")", ";", "Properties", "props", "=", "new", "Propertie...
プロパティファイルから取得する。 <p>プロパティ名を補完する。 @param path プロパティファイルのパス名 @param allowedNoDefault デフォルトのメッセージがない場合を許可するかどうか。 @param appendUserResource クラスパスのルートにあるユーザ定義のメッセージソースも読み込むかどうか指定します。 @return
[ "プロパティファイルから取得する。", "<p", ">", "プロパティ名を補完する。" ]
train
https://github.com/mygreen/excel-cellformatter/blob/e802af273d49889500591e03799c9262cbf29185/src/main/java/com/github/mygreen/cellformatter/lang/MessageResolver.java#L128-L158
facebookarchive/hadoop-20
src/hdfs/org/apache/hadoop/hdfs/server/datanode/FSDataset.java
FSDataset.removeVolumes
public void removeVolumes(Configuration conf, List<File> directories) throws Exception { if (directories == null || directories.isEmpty()) { DataNode.LOG.warn("There were no directories to remove. Exiting "); return; } List<FSVolume> volArray = null; lock.readLock().lock(); try { ...
java
public void removeVolumes(Configuration conf, List<File> directories) throws Exception { if (directories == null || directories.isEmpty()) { DataNode.LOG.warn("There were no directories to remove. Exiting "); return; } List<FSVolume> volArray = null; lock.readLock().lock(); try { ...
[ "public", "void", "removeVolumes", "(", "Configuration", "conf", ",", "List", "<", "File", ">", "directories", ")", "throws", "Exception", "{", "if", "(", "directories", "==", "null", "||", "directories", ".", "isEmpty", "(", ")", ")", "{", "DataNode", "."...
remove directories that are given from the list of volumes to use. This function also makes sure to remove all the blocks that belong to these volumes.
[ "remove", "directories", "that", "are", "given", "from", "the", "list", "of", "volumes", "to", "use", ".", "This", "function", "also", "makes", "sure", "to", "remove", "all", "the", "blocks", "that", "belong", "to", "these", "volumes", "." ]
train
https://github.com/facebookarchive/hadoop-20/blob/2a29bc6ecf30edb1ad8dbde32aa49a317b4d44f4/src/hdfs/org/apache/hadoop/hdfs/server/datanode/FSDataset.java#L2873-L2902