method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public static void copyDirectory(final Path pSource, final Path pTarget, Function<String,String> pMapper) { try { java.nio.file.Files.walk(pSource).forEach(a -> { final Path relativePath = pSource.relativize(a); final Path b = pTarget.resolve(relativePath); try { if (java.nio.file.Files.i...
static void function(final Path pSource, final Path pTarget, Function<String,String> pMapper) { try { java.nio.file.Files.walk(pSource).forEach(a -> { final Path relativePath = pSource.relativize(a); final Path b = pTarget.resolve(relativePath); try { if (java.nio.file.Files.isDirectory(a)) { java.nio.file.Files.create...
/** Copies the directory {@code pSource}, to the directory {@code pTarget}. * including contents. Files in the target directory may be overwritten, but * will not be deleted. (This is a copy operation, not a synchronization.) * @param pSource The source directory. * @param pTarget The target directory. *...
Copies the directory pSource, to the directory pTarget. including contents. Files in the target directory may be overwritten, but will not be deleted. (This is a copy operation, not a synchronization.)
copyDirectory
{ "repo_name": "jochenw/afw", "path": "afw-core/src/main/java/com/github/jochenw/afw/core/util/FileUtils.java", "license": "apache-2.0", "size": 8766 }
[ "com.github.jochenw.afw.core.props.DefaultInterpolator", "com.github.jochenw.afw.core.props.Interpolator", "java.io.IOException", "java.io.Reader", "java.io.StringWriter", "java.io.UncheckedIOException", "java.io.Writer", "java.nio.charset.StandardCharsets", "java.nio.file.Files", "java.nio.file.P...
import com.github.jochenw.afw.core.props.DefaultInterpolator; import com.github.jochenw.afw.core.props.Interpolator; import java.io.IOException; import java.io.Reader; import java.io.StringWriter; import java.io.UncheckedIOException; import java.io.Writer; import java.nio.charset.StandardCharsets; import java.nio.file....
import com.github.jochenw.afw.core.props.*; import java.io.*; import java.nio.charset.*; import java.nio.file.*; import java.util.function.*;
[ "com.github.jochenw", "java.io", "java.nio", "java.util" ]
com.github.jochenw; java.io; java.nio; java.util;
1,377,555
public InputStream getInputStream(int index) { return ins[index]; }
InputStream function(int index) { return ins[index]; }
/** * Returns the unbuffered stream with the value for {@code index}. */
Returns the unbuffered stream with the value for index
getInputStream
{ "repo_name": "RyanTech/Forkids", "path": "com.xlg.library/src/com/xlg/library/imageutility/DiskLruCache.java", "license": "apache-2.0", "size": 33908 }
[ "java.io.InputStream" ]
import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
516,905
@Idempotent public void refreshNodes() throws IOException;
void function() throws IOException;
/** * Tells the namenode to reread the hosts and exclude files. * @throws IOException */
Tells the namenode to reread the hosts and exclude files
refreshNodes
{ "repo_name": "ict-carch/hadoop-plus", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java", "license": "apache-2.0", "size": 45751 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
802,090
FileDetailFragment frag = new FileDetailFragment(); Bundle args = new Bundle(); args.putParcelable(ARG_FILE, fileToDetail); args.putParcelable(ARG_ACCOUNT, account); frag.setArguments(args); return frag; } public FileDetailFragment() { super(); mAcco...
FileDetailFragment frag = new FileDetailFragment(); Bundle args = new Bundle(); args.putParcelable(ARG_FILE, fileToDetail); args.putParcelable(ARG_ACCOUNT, account); frag.setArguments(args); return frag; } public FileDetailFragment() { super(); mAccount = null; mLayout = R.layout.file_details_empty; mProgressListener =...
/** * Public factory method to create new FileDetailFragment instances. * * When 'fileToDetail' or 'ocAccount' are null, creates a dummy layout (to use when a file wasn't tapped before). * * @param fileToDetail An {@link OCFile} to show in the fragment * @param account An ow...
Public factory method to create new FileDetailFragment instances. When 'fileToDetail' or 'ocAccount' are null, creates a dummy layout (to use when a file wasn't tapped before)
newInstance
{ "repo_name": "noyo/android", "path": "src/com/owncloud/android/ui/fragment/FileDetailFragment.java", "license": "gpl-2.0", "size": 20019 }
[ "android.os.Bundle" ]
import android.os.Bundle;
import android.os.*;
[ "android.os" ]
android.os;
658,088
@ServiceMethod(returns = ReturnType.SINGLE) public Response<ManagementPolicyInner> createOrUpdateWithResponse( String resourceGroupName, String accountName, ManagementPolicyName managementPolicyName, ManagementPolicyInner properties, Context context) { return crea...
@ServiceMethod(returns = ReturnType.SINGLE) Response<ManagementPolicyInner> function( String resourceGroupName, String accountName, ManagementPolicyName managementPolicyName, ManagementPolicyInner properties, Context context) { return createOrUpdateWithResponseAsync( resourceGroupName, accountName, managementPolicyName...
/** * Sets the managementpolicy to the specified storage account. * * @param resourceGroupName The name of the resource group within the user's subscription. The name is case * insensitive. * @param accountName The name of the storage account within the specified resource group. Storage acc...
Sets the managementpolicy to the specified storage account
createOrUpdateWithResponse
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/implementation/ManagementPoliciesClientImpl.java", "license": "mit", "size": 35629 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.Context", "com.azure.resourcemanager.storage.fluent.models.ManagementPolicyInner", "com.azure.resourcemanager.storage.models.ManagementPolicyName" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.storage.fluent.models.ManagementPolicyInner; import com.azure.resourcemanager.storage.models.ManagementPolicyName;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.storage.fluent.models.*; import com.azure.resourcemanager.storage.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,796,165
@CliCommand(value = {"author"}, help = "Displays author information") public String author() { return "Jacky Chan <denghp@hotmail.com>, Please follow me: http://weibo.com/linux2china"; }
@CliCommand(value = {STR}, help = STR) String function() { return "Jacky Chan <denghp@hotmail.com>, Please follow me: http: }
/** * display author information * * @return author information */
display author information
author
{ "repo_name": "denghp/ali-oss-tools", "path": "src/main/java/org/mvnsearch/ali/oss/spring/shell/commands/OssCliBannerProvider.java", "license": "mit", "size": 2726 }
[ "org.springframework.shell.core.annotation.CliCommand" ]
import org.springframework.shell.core.annotation.CliCommand;
import org.springframework.shell.core.annotation.*;
[ "org.springframework.shell" ]
org.springframework.shell;
2,663,792
public static Path getDeveloperBuckOut() throws FileNotFoundException { return resolveInSourceRoot("buck-out"); }
static Path function() throws FileNotFoundException { return resolveInSourceRoot(STR); }
/** * Locate the path of the {@code buck-out} directory in a source tree. * * @throws FileNotFoundException if the directory cannot be found. */
Locate the path of the buck-out directory in a source tree
getDeveloperBuckOut
{ "repo_name": "MerritCR/merrit", "path": "gerrit-launcher/src/main/java/com/google/gerrit/launcher/GerritLauncher.java", "license": "apache-2.0", "size": 21838 }
[ "java.io.FileNotFoundException", "java.nio.file.Path" ]
import java.io.FileNotFoundException; import java.nio.file.Path;
import java.io.*; import java.nio.file.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
832,299
Iterable<Ip4Address> getAvailableIPs();
Iterable<Ip4Address> getAvailableIPs();
/** * Returns the list of all the available IPs with the server. * * @return list of available IPs */
Returns the list of all the available IPs with the server
getAvailableIPs
{ "repo_name": "sdnwiselab/onos", "path": "apps/dhcp/api/src/main/java/org/onosproject/dhcp/DhcpStore.java", "license": "apache-2.0", "size": 3738 }
[ "org.onlab.packet.Ip4Address" ]
import org.onlab.packet.Ip4Address;
import org.onlab.packet.*;
[ "org.onlab.packet" ]
org.onlab.packet;
2,644,977
// Implement DTDHandler public void notationDecl(String name, String pubID, String sysID) throws SAXException { // TODO Auto-generated method stub try { DTDprolog(); m_writer.write("<!NOTATION "); m_writer.write(name); if (pubID != null) { ...
void function(String name, String pubID, String sysID) throws SAXException { try { DTDprolog(); m_writer.write(STR); m_writer.write(name); if (pubID != null) { m_writer.write(STRSTR SYSTEM \STR\STR); m_writer.write(m_lineSep, 0, m_lineSepLen); } catch (IOException e) { e.printStackTrace(); } }
/** * If this method is called, the serializer is used as a * DTDHandler, which changes behavior how the serializer * handles document entities. * @see org.xml.sax.DTDHandler#notationDecl(java.lang.String, java.lang.String, java.lang.String) */
If this method is called, the serializer is used as a DTDHandler, which changes behavior how the serializer handles document entities
notationDecl
{ "repo_name": "mirkosertic/Bytecoder", "path": "classlib/java.xml/src/main/resources/META-INF/modules/java.xml/classes/com/sun/org/apache/xml/internal/serializer/ToStream.java", "license": "apache-2.0", "size": 125544 }
[ "java.io.IOException", "org.xml.sax.SAXException" ]
import java.io.IOException; import org.xml.sax.SAXException;
import java.io.*; import org.xml.sax.*;
[ "java.io", "org.xml.sax" ]
java.io; org.xml.sax;
2,611,560
public AdapterView.OnItemSelectedListener getOnItemSelectedListener() { if(mAutoCompleteMode == AUTOCOMPLETE_MODE_NONE) return null; return ((AutoCompleteTextView)mInputView).getOnItemSelectedListener(); }
AdapterView.OnItemSelectedListener function() { if(mAutoCompleteMode == AUTOCOMPLETE_MODE_NONE) return null; return ((AutoCompleteTextView)mInputView).getOnItemSelectedListener(); }
/** * <p>Returns the listener that is notified whenever the user selects an * item in the drop down list.</p> * <p>Only work when autoComplete mode is {@link #AUTOCOMPLETE_MODE_SINGLE} or {@link #AUTOCOMPLETE_MODE_MULTI}</p> * * @return the item selected listener */
Returns the listener that is notified whenever the user selects an item in the drop down list. Only work when autoComplete mode is <code>#AUTOCOMPLETE_MODE_SINGLE</code> or <code>#AUTOCOMPLETE_MODE_MULTI</code>
getOnItemSelectedListener
{ "repo_name": "android9527/AndroidDemo", "path": "material/src/main/java/com/rey/material/widget/EditText.java", "license": "apache-2.0", "size": 149798 }
[ "android.widget.AdapterView", "android.widget.AutoCompleteTextView" ]
import android.widget.AdapterView; import android.widget.AutoCompleteTextView;
import android.widget.*;
[ "android.widget" ]
android.widget;
2,832,257
private Set<PathNode> getAffectedNodes(List<PathNode> cachedPath, List<PathNode> updatedPath) { Set<PathNode> prevPath = new HashSet<>(cachedPath); prevPath.removeAll(updatedPath); return prevPath; }
Set<PathNode> function(List<PathNode> cachedPath, List<PathNode> updatedPath) { Set<PathNode> prevPath = new HashSet<>(cachedPath); prevPath.removeAll(updatedPath); return prevPath; }
/** * Returns difference in switches between previous and current path. * @param cachedPath previous flow path. * @param updatedPath current flow path. * @return switches from previous path, that not involved in the updated path */
Returns difference in switches between previous and current path
getAffectedNodes
{ "repo_name": "nikitamarchenko/open-kilda", "path": "services/wfm/src/main/java/org/openkilda/wfm/topology/cache/CacheBolt.java", "license": "apache-2.0", "size": 27329 }
[ "java.util.HashSet", "java.util.List", "java.util.Set", "org.openkilda.messaging.info.event.PathNode" ]
import java.util.HashSet; import java.util.List; import java.util.Set; import org.openkilda.messaging.info.event.PathNode;
import java.util.*; import org.openkilda.messaging.info.event.*;
[ "java.util", "org.openkilda.messaging" ]
java.util; org.openkilda.messaging;
1,536,431
public static <T> T valueOfIgnoreCase (Class<T> cls, String name) { Field[] fields = cls.getFields(); T res = null; for (int i = 0; i < fields.length; i++) { Field field = fields[i]; if (field.getName().equalsIgnoreCase (name) && Modifier.isStatic (field.getModifiers(...
static <T> T function (Class<T> cls, String name) { Field[] fields = cls.getFields(); T res = null; for (int i = 0; i < fields.length; i++) { Field field = fields[i]; if (field.getName().equalsIgnoreCase (name) && Modifier.isStatic (field.getModifiers()) && Modifier.isFinal (field.getModifiers()) && cls.isAssignableFro...
/** * Similar to \ref #valueOf(Class<T>,String), with * case insensitive field name look-up. If `cls` defines several fields * with the same case insensitive name `name`, an * IllegalArgumentException is thrown. * @param cls the class to look for a field in. * @param name the ...
Similar to \ref #valueOf(Class,String), with case insensitive field name look-up. If `cls` defines several fields with the same case insensitive name `name`, an IllegalArgumentException is thrown
valueOfIgnoreCase
{ "repo_name": "jorenver/Proyecto_Sistemas_Distribuidos", "path": "pruebaAlgoritmo/umontreal/ssj/util/Introspection.java", "license": "unlicense", "size": 12561 }
[ "java.lang.reflect.Field", "java.lang.reflect.Modifier" ]
import java.lang.reflect.Field; import java.lang.reflect.Modifier;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
2,640,945
private Response deleteComponentFromComponentManager( final String compMgrId, final String compId) { Response resp = null; try { resp = request(compMgrId, Method.DELETE, "components/" + compId, null); if (!resp.statusCode.equals(Response.OK)) { log.warn("Failed to del...
Response function( final String compMgrId, final String compId) { Response resp = null; try { resp = request(compMgrId, Method.DELETE, STR + compId, null); if (!resp.statusCode.equals(Response.OK)) { log.warn(STR, compMgrId, compId, resp.statusCode); return resp; } } catch (Exception e) { log.error(STR, compMgrId, comp...
/** * Method for deleting a Component from ComponentManager. * * @param compMgrId * Destination ComponentManager ID. * @param compId * ComponentID to be deleted. * @return res ResponseObject. */
Method for deleting a Component from ComponentManager
deleteComponentFromComponentManager
{ "repo_name": "narry/odenos", "path": "src/main/java/org/o3project/odenos/core/manager/system/SystemManager.java", "license": "apache-2.0", "size": 51600 }
[ "org.o3project.odenos.remoteobject.message.Request", "org.o3project.odenos.remoteobject.message.Response" ]
import org.o3project.odenos.remoteobject.message.Request; import org.o3project.odenos.remoteobject.message.Response;
import org.o3project.odenos.remoteobject.message.*;
[ "org.o3project.odenos" ]
org.o3project.odenos;
1,141,540
public static void awaitFileClose(IgfsSecondaryFileSystem igfs, IgfsPath file) { try { igfs.update(file, Collections.singletonMap("prop", "val")); } catch (IgniteException ignore) { // No-op. } }
static void function(IgfsSecondaryFileSystem igfs, IgfsPath file) { try { igfs.update(file, Collections.singletonMap("prop", "val")); } catch (IgniteException ignore) { } }
/** * Await for previously opened output stream to close. This is achieved by requesting dummy update on the file. * * @param igfs IGFS. * @param file File. */
Await for previously opened output stream to close. This is achieved by requesting dummy update on the file
awaitFileClose
{ "repo_name": "zzcclp/ignite", "path": "modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractSelfTest.java", "license": "apache-2.0", "size": 87306 }
[ "java.util.Collections", "org.apache.ignite.IgniteException", "org.apache.ignite.igfs.IgfsPath", "org.apache.ignite.igfs.secondary.IgfsSecondaryFileSystem" ]
import java.util.Collections; import org.apache.ignite.IgniteException; import org.apache.ignite.igfs.IgfsPath; import org.apache.ignite.igfs.secondary.IgfsSecondaryFileSystem;
import java.util.*; import org.apache.ignite.*; import org.apache.ignite.igfs.*; import org.apache.ignite.igfs.secondary.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
1,825,649
Mapper parse(ParseContext context) throws IOException;
Mapper parse(ParseContext context) throws IOException;
/** * Parse using the provided {@link ParseContext} and return a mapping * update if dynamic mappings modified the mappings, or {@code null} if * mappings were not modified. */
Parse using the provided <code>ParseContext</code> and return a mapping update if dynamic mappings modified the mappings, or null if mappings were not modified
parse
{ "repo_name": "vrkansagara/elasticsearch", "path": "src/main/java/org/elasticsearch/index/mapper/FieldMapper.java", "license": "apache-2.0", "size": 9913 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,641,323
public synchronized void maybeLeaveGroup() { if (!coordinatorUnknown() && state != MemberState.UNJOINED && generation != Generation.NO_GENERATION) { // this is a minimal effort attempt to leave the group. we do not // attempt any resending if the request fails or times out. ...
synchronized void function() { if (!coordinatorUnknown() && state != MemberState.UNJOINED && generation != Generation.NO_GENERATION) { log.info(STR, coordinator); LeaveGroupRequest.Builder request = new LeaveGroupRequest.Builder(groupId, generation.memberId); client.send(coordinator, request) .compose(new LeaveGroupRes...
/** * Leave the current group and reset local generation/memberId. */
Leave the current group and reset local generation/memberId
maybeLeaveGroup
{ "repo_name": "ollie314/kafka", "path": "clients/src/main/java/org/apache/kafka/clients/consumer/internals/AbstractCoordinator.java", "license": "apache-2.0", "size": 51466 }
[ "org.apache.kafka.common.requests.LeaveGroupRequest" ]
import org.apache.kafka.common.requests.LeaveGroupRequest;
import org.apache.kafka.common.requests.*;
[ "org.apache.kafka" ]
org.apache.kafka;
1,702,879
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync( String resourceGroupName, String clusterName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalA...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Flux<ByteBuffer>>> function( String resourceGroupName, String clusterName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (this.client.getSubscriptionId() == null) { return Mono .error( n...
/** * Delete a connected cluster, removing the tracked resource in Azure Resource Manager (ARM). * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param clusterName The name of the Kubernetes cluster on which get is called. * @param context The contex...
Delete a connected cluster, removing the tracked resource in Azure Resource Manager (ARM)
deleteWithResponseAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/ConnectedClustersClientImpl.java", "license": "mit", "size": 82942 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.Context", "java.nio.ByteBuffer" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import java.nio.ByteBuffer;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import java.nio.*;
[ "com.azure.core", "java.nio" ]
com.azure.core; java.nio;
402,701
private void createTreePositions(String idType, Atom nodeAtom, String parentTreeRel, String hcd) throws Exception { // For tree positions, create one each line. The // "node" will always be based on the first field of the // contexts.src file. final String ancestorPath = parentTreeRel.replace('.'...
void function(String idType, Atom nodeAtom, String parentTreeRel, String hcd) throws Exception { final String ancestorPath = parentTreeRel.replace('.', '~'); TreePosition<? extends ComponentHasAttributesAndName> newTreePos = null; if (idType.equals(STR)) { final ConceptTreePosition ctp = new ConceptTreePositionJpa(); f...
/** * Creates the tree positions. * * @param idType the id type * @param nodeAtom the node atom * @param parentTreeRel the parent tree rel * @param hcd the hcd * @throws Exception the exception */
Creates the tree positions
createTreePositions
{ "repo_name": "WestCoastInformatics/UMLS-Terminology-Server", "path": "jpa-services/src/main/java/com/wci/umls/server/jpa/algo/insert/ContextLoaderAlgorithm.java", "license": "apache-2.0", "size": 25790 }
[ "com.wci.umls.server.jpa.content.AtomTreePositionJpa", "com.wci.umls.server.jpa.content.CodeTreePositionJpa", "com.wci.umls.server.jpa.content.ConceptTreePositionJpa", "com.wci.umls.server.jpa.content.DescriptorTreePositionJpa", "com.wci.umls.server.model.content.Atom", "com.wci.umls.server.model.content....
import com.wci.umls.server.jpa.content.AtomTreePositionJpa; import com.wci.umls.server.jpa.content.CodeTreePositionJpa; import com.wci.umls.server.jpa.content.ConceptTreePositionJpa; import com.wci.umls.server.jpa.content.DescriptorTreePositionJpa; import com.wci.umls.server.model.content.Atom; import com.wci.umls.serv...
import com.wci.umls.server.jpa.content.*; import com.wci.umls.server.model.content.*;
[ "com.wci.umls" ]
com.wci.umls;
1,191,715
boolean releaseToGlobalPool(Set<LabelResourceId> release);
boolean releaseToGlobalPool(Set<LabelResourceId> release);
/** * Releases unused labels to the global resource pool. * * @param release release the collection of releasing labels * @return success or fail */
Releases unused labels to the global resource pool
releaseToGlobalPool
{ "repo_name": "kuangrewawa/OnosFw", "path": "incubator/api/src/main/java/org/onosproject/incubator/net/resource/label/LabelResourceStore.java", "license": "apache-2.0", "size": 3957 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,453,418
public Observable<ServiceResponse<Void>> deleteWithServiceResponseAsync(String resourceGroupName, String accountName, String poolName, String volumeName, String snapshotName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException("Parameter this.client.subscriptionId() ...
Observable<ServiceResponse<Void>> function(String resourceGroupName, String accountName, String poolName, String volumeName, String snapshotName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException(STR); } if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (accou...
/** * Delete a snapshot. * Delete snapshot. * * @param resourceGroupName The name of the resource group. * @param accountName The name of the NetApp account * @param poolName The name of the capacity pool * @param volumeName The name of the volume * @param snapshotName The name o...
Delete a snapshot. Delete snapshot
deleteWithServiceResponseAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/netapp/mgmt-v2020_02_01/src/main/java/com/microsoft/azure/management/netapp/v2020_02_01/implementation/SnapshotsInner.java", "license": "mit", "size": 56083 }
[ "com.google.common.reflect.TypeToken", "com.microsoft.rest.ServiceResponse" ]
import com.google.common.reflect.TypeToken; import com.microsoft.rest.ServiceResponse;
import com.google.common.reflect.*; import com.microsoft.rest.*;
[ "com.google.common", "com.microsoft.rest" ]
com.google.common; com.microsoft.rest;
844,979
public Builder setOnSTDERRLineListener(OnLineListener onLineListener) { this.onSTDERRLineListener = onLineListener; return this; }
Builder function(OnLineListener onLineListener) { this.onSTDERRLineListener = onLineListener; return this; }
/** * <p> * Set a callback called for every line output to STDERR by the shell * </p> * <p> * The thread on which the callback executes is dependent on various * factors, see {@link Shell.Interactive} for further details * </p> * * @param...
Set a callback called for every line output to STDERR by the shell The thread on which the callback executes is dependent on various factors, see <code>Shell.Interactive</code> for further details
setOnSTDERRLineListener
{ "repo_name": "aravindsagar/EasyLock", "path": "libsuperuser/src/eu/chainfire/libsuperuser/Shell.java", "license": "apache-2.0", "size": 66888 }
[ "eu.chainfire.libsuperuser.StreamGobbler" ]
import eu.chainfire.libsuperuser.StreamGobbler;
import eu.chainfire.libsuperuser.*;
[ "eu.chainfire.libsuperuser" ]
eu.chainfire.libsuperuser;
2,862,035
public void setStartValue(double value) { this.startValue = value; notifyListeners(new MarkerChangeEvent(this)); }
void function(double value) { this.startValue = value; notifyListeners(new MarkerChangeEvent(this)); }
/** * Sets the start value for the marker and sends a * {@link MarkerChangeEvent} to all registered listeners. * * @param value the value. * * @since 1.0.3 */
Sets the start value for the marker and sends a <code>MarkerChangeEvent</code> to all registered listeners
setStartValue
{ "repo_name": "ilyessou/jfreechart", "path": "source/org/jfree/chart/plot/IntervalMarker.java", "license": "lgpl-2.1", "size": 7551 }
[ "org.jfree.chart.event.MarkerChangeEvent" ]
import org.jfree.chart.event.MarkerChangeEvent;
import org.jfree.chart.event.*;
[ "org.jfree.chart" ]
org.jfree.chart;
863,232
public void testWeakCompareAndSetRelease() { AtomicInteger ai = new AtomicInteger(1); do {} while (!ai.weakCompareAndSetRelease(1, 2)); do {} while (!ai.weakCompareAndSetRelease(2, -4)); assertEquals(-4, ai.get()); do {} while (!ai.weakCompareAndSetRelease(-4, 7)); as...
void function() { AtomicInteger ai = new AtomicInteger(1); do {} while (!ai.weakCompareAndSetRelease(1, 2)); do {} while (!ai.weakCompareAndSetRelease(2, -4)); assertEquals(-4, ai.get()); do {} while (!ai.weakCompareAndSetRelease(-4, 7)); assertEquals(7, ai.get()); }
/** * repeated weakCompareAndSetRelease succeeds in changing value when equal * to expected */
repeated weakCompareAndSetRelease succeeds in changing value when equal to expected
testWeakCompareAndSetRelease
{ "repo_name": "FauxFaux/jdk9-jdk", "path": "test/java/util/concurrent/tck/AtomicInteger9Test.java", "license": "gpl-2.0", "size": 6723 }
[ "java.util.concurrent.atomic.AtomicInteger" ]
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.*;
[ "java.util" ]
java.util;
2,411,576
public void setStopTime(double val) { if ( stopTime == null ) { stopTime = (SFTime)getField( "stopTime" ); } stopTime.setValue( val ); }
void function(double val) { if ( stopTime == null ) { stopTime = (SFTime)getField( STR ); } stopTime.setValue( val ); }
/** Set the stopTime field. * @param val The double to set. */
Set the stopTime field
setStopTime
{ "repo_name": "Norkart/NK-VirtualGlobe", "path": "Xj3D/src/java/org/xj3d/sai/internal/node/time/SAITimeSensor.java", "license": "gpl-2.0", "size": 6960 }
[ "org.web3d.x3d.sai.SFTime" ]
import org.web3d.x3d.sai.SFTime;
import org.web3d.x3d.sai.*;
[ "org.web3d.x3d" ]
org.web3d.x3d;
1,556,960
private void readFrame() throws TTransportException, SaslException { int dataLength = readLength(); if (dataLength < 0) throw new TTransportException("Read a negative frame size (" + dataLength + ")!"); byte[] buff = new byte[dataLength]; LOGGER.debug("{}: reading data length: {}", getRole(), ...
void function() throws TTransportException, SaslException { int dataLength = readLength(); if (dataLength < 0) throw new TTransportException(STR + dataLength + ")!"); byte[] buff = new byte[dataLength]; LOGGER.debug(STR, getRole(), dataLength); underlyingTransport.readAll(buff, 0, dataLength); if (shouldWrap) { buff = ...
/** * Read a single frame of data from the underlying transport, unwrapping if * necessary. * * @throws TTransportException * Thrown if there's an error reading from the underlying transport. * @throws SaslException * Thrown if there's an error unwrapping the data. */
Read a single frame of data from the underlying transport, unwrapping if necessary
readFrame
{ "repo_name": "traceguide/api-php", "path": "vendor/apache/thrift/lib/java/src/org/apache/thrift/transport/TSaslTransport.java", "license": "mit", "size": 18605 }
[ "javax.security.sasl.SaslException" ]
import javax.security.sasl.SaslException;
import javax.security.sasl.*;
[ "javax.security" ]
javax.security;
1,399,555
public static XmlOutput create(XMLStreamWriter out, JAXBContextImpl context, CharacterEscapeHandler escapeHandler) { // try optimized path final Class writerClass = out.getClass(); if (writerClass==FI_STAX_WRITER_CLASS) { try { return FI_OUTPUT_CTOR.newInstance(ou...
static XmlOutput function(XMLStreamWriter out, JAXBContextImpl context, CharacterEscapeHandler escapeHandler) { final Class writerClass = out.getClass(); if (writerClass==FI_STAX_WRITER_CLASS) { try { return FI_OUTPUT_CTOR.newInstance(out, context); } catch (Exception e) { } } if (STAXEX_WRITER_CLASS!=null && STAXEX_WR...
/** * Creates a new {@link XmlOutput} from a {@link XMLStreamWriter}. * This method recognizes an FI StAX writer. */
Creates a new <code>XmlOutput</code> from a <code>XMLStreamWriter</code>. This method recognizes an FI StAX writer
create
{ "repo_name": "YouDiSN/OpenJDK-Research", "path": "jdk9/jaxws/src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/runtime/output/XMLStreamWriterOutput.java", "license": "gpl-2.0", "size": 10963 }
[ "com.sun.xml.internal.bind.marshaller.CharacterEscapeHandler", "com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl", "javax.xml.stream.XMLStreamWriter" ]
import com.sun.xml.internal.bind.marshaller.CharacterEscapeHandler; import com.sun.xml.internal.bind.v2.runtime.JAXBContextImpl; import javax.xml.stream.XMLStreamWriter;
import com.sun.xml.internal.bind.marshaller.*; import com.sun.xml.internal.bind.v2.runtime.*; import javax.xml.stream.*;
[ "com.sun.xml", "javax.xml" ]
com.sun.xml; javax.xml;
269,838
public void debug(Throwable throwable, String msg, Object[] argArray) { logIfEnabled(Level.DEBUG, throwable, msg, UNKNOWN_ARG, UNKNOWN_ARG, UNKNOWN_ARG, argArray); }
void function(Throwable throwable, String msg, Object[] argArray) { logIfEnabled(Level.DEBUG, throwable, msg, UNKNOWN_ARG, UNKNOWN_ARG, UNKNOWN_ARG, argArray); }
/** * Log a debug message with a throwable. */
Log a debug message with a throwable
debug
{ "repo_name": "dankito/ormlite-jpa-core", "path": "src/main/java/com/j256/ormlite/logger/Logger.java", "license": "isc", "size": 17794 }
[ "com.j256.ormlite.logger.Log" ]
import com.j256.ormlite.logger.Log;
import com.j256.ormlite.logger.*;
[ "com.j256.ormlite" ]
com.j256.ormlite;
1,024,513
@ApiModelProperty(example = "null", required = true, value = "label string") public String getLabel() { return label; }
@ApiModelProperty(example = "null", required = true, value = STR) String function() { return label; }
/** * label string * * @return label **/
label string
getLabel
{ "repo_name": "GoldenGnu/eve-esi", "path": "src/main/java/net/troja/eve/esi/model/CorporationBookmarksResponse.java", "license": "apache-2.0", "size": 8085 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
597,448
public Invoice delete(RequestOptions options) throws StripeException { return delete((Map<String, Object>) null, options); }
Invoice function(RequestOptions options) throws StripeException { return delete((Map<String, Object>) null, options); }
/** * Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices * that are no longer in a draft state will fail; once an invoice has been finalized or if an * invoice is for a subscription, it must be <a * href="https://stripe.com/docs/api#void_invoice">voided</a>. *...
Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be voided
delete
{ "repo_name": "stripe/stripe-java", "path": "src/main/java/com/stripe/model/Invoice.java", "license": "mit", "size": 73384 }
[ "com.stripe.exception.StripeException", "com.stripe.net.RequestOptions", "java.util.Map" ]
import com.stripe.exception.StripeException; import com.stripe.net.RequestOptions; import java.util.Map;
import com.stripe.exception.*; import com.stripe.net.*; import java.util.*;
[ "com.stripe.exception", "com.stripe.net", "java.util" ]
com.stripe.exception; com.stripe.net; java.util;
1,360,620
protected void updateFile(String site, ContentItemTO contentItem, String relativePath, InputStream input, String user, boolean isPreview, boolean unlock, ResultTO result) throws ServiceLayerException { boolean success = false; try { success = con...
void function(String site, ContentItemTO contentItem, String relativePath, InputStream input, String user, boolean isPreview, boolean unlock, ResultTO result) throws ServiceLayerException { boolean success = false; try { success = contentService.writeContent(site, relativePath, input); } finally { ContentUtils.release(...
/** * update the file at the given content node * * @param input * @param user * @param isPreview * @param unlock * unlock the content upon update? * @throws ServiceLayerException */
update the file at the given content node
updateFile
{ "repo_name": "avasquez614/studio", "path": "src/main/java/org/craftercms/studio/impl/v1/content/pipeline/AssetDmContentProcessor.java", "license": "gpl-3.0", "size": 11787 }
[ "java.io.InputStream", "java.time.ZoneOffset", "java.time.ZonedDateTime", "java.util.HashMap", "java.util.Map", "org.apache.commons.lang3.StringUtils", "org.craftercms.studio.api.v1.dal.ItemMetadata", "org.craftercms.studio.api.v1.exception.ServiceLayerException", "org.craftercms.studio.api.v1.servi...
import java.io.InputStream; import java.time.ZoneOffset; import java.time.ZonedDateTime; import java.util.HashMap; import java.util.Map; import org.apache.commons.lang3.StringUtils; import org.craftercms.studio.api.v1.dal.ItemMetadata; import org.craftercms.studio.api.v1.exception.ServiceLayerException; import org.craf...
import java.io.*; import java.time.*; import java.util.*; import org.apache.commons.lang3.*; import org.craftercms.studio.api.v1.dal.*; import org.craftercms.studio.api.v1.exception.*; import org.craftercms.studio.api.v1.service.objectstate.*; import org.craftercms.studio.api.v1.to.*; import org.craftercms.studio.api.v...
[ "java.io", "java.time", "java.util", "org.apache.commons", "org.craftercms.studio" ]
java.io; java.time; java.util; org.apache.commons; org.craftercms.studio;
2,849,400
private Status addGroup(InstanceIdentifier<?> path, Group groupAddDataObject) { GroupKey groupKey = groupAddDataObject.getKey(); Status groupOperationStatus = validateGroup(groupAddDataObject, FRMUtil.operation.ADD); if (!groupOperationStatus.isSuccess()) { logger.error("Group d...
Status function(InstanceIdentifier<?> path, Group groupAddDataObject) { GroupKey groupKey = groupAddDataObject.getKey(); Status groupOperationStatus = validateGroup(groupAddDataObject, FRMUtil.operation.ADD); if (!groupOperationStatus.isSuccess()) { logger.error(STR + groupAddDataObject.getGroupName()); return groupOpe...
/** * Adds Group to the southbound plugin and our internal database * * @param path * @param dataObject */
Adds Group to the southbound plugin and our internal database
addGroup
{ "repo_name": "xiaohanz/softcontroller", "path": "opendaylight/md-sal/forwardingrules-manager/src/main/java/org/opendaylight/controller/forwardingrulesmanager/consumer/impl/GroupConsumerImpl.java", "license": "epl-1.0", "size": 20542 }
[ "org.opendaylight.controller.sal.utils.Status", "org.opendaylight.yang.gen.v1.urn.opendaylight.group.config.rev131024.groups.Group", "org.opendaylight.yang.gen.v1.urn.opendaylight.group.config.rev131024.groups.GroupKey", "org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.AddGroupInputBuild...
import org.opendaylight.controller.sal.utils.Status; import org.opendaylight.yang.gen.v1.urn.opendaylight.group.config.rev131024.groups.Group; import org.opendaylight.yang.gen.v1.urn.opendaylight.group.config.rev131024.groups.GroupKey; import org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.AddGrou...
import org.opendaylight.controller.sal.utils.*; import org.opendaylight.yang.gen.v1.urn.opendaylight.group.config.rev131024.groups.*; import org.opendaylight.yang.gen.v1.urn.opendaylight.group.service.rev130918.*; import org.opendaylight.yangtools.yang.binding.*;
[ "org.opendaylight.controller", "org.opendaylight.yang", "org.opendaylight.yangtools" ]
org.opendaylight.controller; org.opendaylight.yang; org.opendaylight.yangtools;
1,358,049
private void close() { Window w = getWindow(); if (w != null) w.dispatchEvent(new WindowEvent(w, WindowEvent.WINDOW_CLOSING)); }
void function() { Window w = getWindow(); if (w != null) w.dispatchEvent(new WindowEvent(w, WindowEvent.WINDOW_CLOSING)); }
/** * Closes the Window. */
Closes the Window
close
{ "repo_name": "mclauncher/HMCL", "path": "HMCLaF/src/main/java/org/jackhuang/hmcl/laf/titlepane/BETitlePane.java", "license": "gpl-3.0", "size": 43248 }
[ "java.awt.Window", "java.awt.event.WindowEvent" ]
import java.awt.Window; import java.awt.event.WindowEvent;
import java.awt.*; import java.awt.event.*;
[ "java.awt" ]
java.awt;
687,115
public HTable createTable(byte[] tableName, byte[][] families, int[] numVersions) throws IOException { return createTable(TableName.valueOf(tableName), families, numVersions); }
HTable function(byte[] tableName, byte[][] families, int[] numVersions) throws IOException { return createTable(TableName.valueOf(tableName), families, numVersions); }
/** * Create a table. * @param tableName * @param families * @param numVersions * @return An HTable instance for the created table. * @throws IOException */
Create a table
createTable
{ "repo_name": "toshimasa-nasu/hbase", "path": "hbase-server/src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java", "license": "apache-2.0", "size": 134883 }
[ "java.io.IOException", "org.apache.hadoop.hbase.client.HTable" ]
import java.io.IOException; import org.apache.hadoop.hbase.client.HTable;
import java.io.*; import org.apache.hadoop.hbase.client.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,981,105
protected Currency getReceiveCurrency(final FinancialSecurity security) { return security.accept(ForexVisitors.getReceiveCurrencyVisitor()); }
Currency function(final FinancialSecurity security) { return security.accept(ForexVisitors.getReceiveCurrencyVisitor()); }
/** * Gets the receive currency of the security. * * @param security The security * @return The receive currency */
Gets the receive currency of the security
getReceiveCurrency
{ "repo_name": "DevStreet/FinanceAnalytics", "path": "projects/OG-Financial/src/main/java/com/opengamma/financial/analytics/model/forex/forward/FXForwardPresentValueFunction.java", "license": "apache-2.0", "size": 8676 }
[ "com.opengamma.financial.analytics.model.forex.ForexVisitors", "com.opengamma.financial.security.FinancialSecurity", "com.opengamma.util.money.Currency" ]
import com.opengamma.financial.analytics.model.forex.ForexVisitors; import com.opengamma.financial.security.FinancialSecurity; import com.opengamma.util.money.Currency;
import com.opengamma.financial.analytics.model.forex.*; import com.opengamma.financial.security.*; import com.opengamma.util.money.*;
[ "com.opengamma.financial", "com.opengamma.util" ]
com.opengamma.financial; com.opengamma.util;
2,689,672
@SuppressWarnings("deprecation") public static int getDisplayHeight(Activity activity, ILayoutDefinition layout) { DisplayMetrics displayMetrics = new DisplayMetrics(); Display display = activity.getWindowManager().getDefaultDisplay(); display.getMetrics(displayMetrics); int height = display.getHeigh...
@SuppressWarnings(STR) static int function(Activity activity, ILayoutDefinition layout) { DisplayMetrics displayMetrics = new DisplayMetrics(); Display display = activity.getWindowManager().getDefaultDisplay(); display.getMetrics(displayMetrics); int height = display.getHeight(); int statusBarHeight; if (CompatibilityH...
/** * Gets the available height using only the DisplayMetrics class and removing known decorations. */
Gets the available height using only the DisplayMetrics class and removing known decorations
getDisplayHeight
{ "repo_name": "pablanco/taskManager", "path": "Android/FlexibleClient/src/com/artech/adapters/AdaptersHelper.java", "license": "gpl-2.0", "size": 14269 }
[ "android.app.Activity", "android.util.DisplayMetrics", "android.view.Display", "com.artech.base.metadata.ILayoutDefinition", "com.artech.base.services.Services", "com.artech.compatibility.CompatibilityHelper" ]
import android.app.Activity; import android.util.DisplayMetrics; import android.view.Display; import com.artech.base.metadata.ILayoutDefinition; import com.artech.base.services.Services; import com.artech.compatibility.CompatibilityHelper;
import android.app.*; import android.util.*; import android.view.*; import com.artech.base.metadata.*; import com.artech.base.services.*; import com.artech.compatibility.*;
[ "android.app", "android.util", "android.view", "com.artech.base", "com.artech.compatibility" ]
android.app; android.util; android.view; com.artech.base; com.artech.compatibility;
1,608,746
void createRelationship(User source, UserRelationship relationship, long targetId);
void createRelationship(User source, UserRelationship relationship, long targetId);
/** * Create and store a relationship between two users * * @param source Source user * @param relationship Relationship between both user * @param targetId Target ID */
Create and store a relationship between two users
createRelationship
{ "repo_name": "reneses/tela", "path": "tela-server/src/main/java/io/reneses/tela/modules/instagram/repositories/UserRepository.java", "license": "mit", "size": 3605 }
[ "io.reneses.tela.modules.instagram.models.User", "io.reneses.tela.modules.instagram.models.UserRelationship" ]
import io.reneses.tela.modules.instagram.models.User; import io.reneses.tela.modules.instagram.models.UserRelationship;
import io.reneses.tela.modules.instagram.models.*;
[ "io.reneses.tela" ]
io.reneses.tela;
1,546,887
CompletableFuture<HttpResponse<byte[]>> asBytesAsync(Callback<byte[]> callback);
CompletableFuture<HttpResponse<byte[]>> asBytesAsync(Callback<byte[]> callback);
/** * Executes the request asynchronously and returns the response with the body mapped into a byte[] * @param callback a callback handler * @return a CompletableFuture of a response */
Executes the request asynchronously and returns the response with the body mapped into a byte[]
asBytesAsync
{ "repo_name": "Mashape/unirest-java", "path": "unirest/src/main/java/kong/unirest/HttpRequest.java", "license": "mit", "size": 15891 }
[ "java.util.concurrent.CompletableFuture" ]
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
2,353,449
@StartBundle public void initFile() throws IOException { // Write each bundle to newline delimited JSON file. String filename = String.format("fhirImportBatch-%s.ndjson", UUID.randomUUID().toString()); ResourceId tempDir = FileSystems.matchNewResource(this.tempGcsPath.get(), true); ...
void function() throws IOException { String filename = String.format(STR, UUID.randomUUID().toString()); ResourceId tempDir = FileSystems.matchNewResource(this.tempGcsPath.get(), true); this.resourceId = tempDir.resolve(filename, StandardResolveOptions.RESOLVE_FILE); this.ndJsonChannel = FileSystems.create(resourceId, ...
/** * Init batch. * * @throws IOException the io exception */
Init batch
initFile
{ "repo_name": "iemejia/incubator-beam", "path": "sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/healthcare/FhirIO.java", "license": "apache-2.0", "size": 45554 }
[ "com.fasterxml.jackson.databind.ObjectMapper", "java.io.IOException", "java.util.UUID", "org.apache.beam.sdk.io.FileSystems", "org.apache.beam.sdk.io.fs.ResolveOptions", "org.apache.beam.sdk.io.fs.ResourceId" ]
import com.fasterxml.jackson.databind.ObjectMapper; import java.io.IOException; import java.util.UUID; import org.apache.beam.sdk.io.FileSystems; import org.apache.beam.sdk.io.fs.ResolveOptions; import org.apache.beam.sdk.io.fs.ResourceId;
import com.fasterxml.jackson.databind.*; import java.io.*; import java.util.*; import org.apache.beam.sdk.io.*; import org.apache.beam.sdk.io.fs.*;
[ "com.fasterxml.jackson", "java.io", "java.util", "org.apache.beam" ]
com.fasterxml.jackson; java.io; java.util; org.apache.beam;
2,481,424
public List<Action> getActions(com.bnmi.ourmap.model.Rol r) throws NoConnectionException, IOException, IOException, BDException, BDException { init(); return em.getActions(r); }
List<Action> function(com.bnmi.ourmap.model.Rol r) throws NoConnectionException, IOException, IOException, BDException, BDException { init(); return em.getActions(r); }
/** List actions by role * * @param r * @return * @throws NoConnectionException * @throws IOException * @throws IOException * @throws BDException * @throws BDException */
List actions by role
getActions
{ "repo_name": "OurMap/OurMap", "path": "OurMap/src/com/bnmi/ourmap/control/EasyDelegate.java", "license": "bsd-3-clause", "size": 31901 }
[ "com.bnmi.ourmap.model.Action", "com.bnmi.ourmap.model.Rol", "com.inga.exception.BDException", "com.inga.exception.NoConnectionException", "java.io.IOException", "java.util.List" ]
import com.bnmi.ourmap.model.Action; import com.bnmi.ourmap.model.Rol; import com.inga.exception.BDException; import com.inga.exception.NoConnectionException; import java.io.IOException; import java.util.List;
import com.bnmi.ourmap.model.*; import com.inga.exception.*; import java.io.*; import java.util.*;
[ "com.bnmi.ourmap", "com.inga.exception", "java.io", "java.util" ]
com.bnmi.ourmap; com.inga.exception; java.io; java.util;
896,391
public static ReservedWord fromString(String text) throws IllegalArgumentException { if (text != null) { for (ReservedWord reservedWord : ReservedWord.values()) { if (text.equals(reservedWord.text)) { return reservedWord; ...
static ReservedWord function(String text) throws IllegalArgumentException { if (text != null) { for (ReservedWord reservedWord : ReservedWord.values()) { if (text.equals(reservedWord.text)) { return reservedWord; } } } boolean moreInformativeMessage = false; if (moreInformativeMessage) { throw new IllegalArgumentExcept...
/** * This is a centralized method that enforces that only reserved words * are allowed to be used by external tools. External tool authors * cannot pass their own query parameters through Dataverse such as * "mode=mode1". * * @throws IllegalArgumentException ...
This is a centralized method that enforces that only reserved words are allowed to be used by external tools. External tool authors cannot pass their own query parameters through Dataverse such as "mode=mode1"
fromString
{ "repo_name": "JayanthyChengan/dataverse", "path": "src/main/java/edu/harvard/iq/dataverse/externaltools/ExternalTool.java", "license": "apache-2.0", "size": 6670 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
257,554
Future<Void> updateBlobTtl(String blobId, String serviceId, long expiresAtMs, Callback<Void> callback); /** * Closes the router and releases any resources held by the router. If the router is already closed, then this * method has no effect. * <p/> * After a router is closed, any further attempt to inv...
Future<Void> updateBlobTtl(String blobId, String serviceId, long expiresAtMs, Callback<Void> callback); /** * Closes the router and releases any resources held by the router. If the router is already closed, then this * method has no effect. * <p/> * After a router is closed, any further attempt to invoke Router operat...
/** * Requests that a blob's TTL be updated asynchronously and returns a future that will eventually contain information * about whether the request succeeded or not. * @param blobId The ID of the blob that needs its TTL updated. * @param serviceId The service ID of the service updating the blob. This can b...
Requests that a blob's TTL be updated asynchronously and returns a future that will eventually contain information about whether the request succeeded or not
updateBlobTtl
{ "repo_name": "pnarayanan/ambry", "path": "ambry-api/src/main/java/com.github.ambry/router/Router.java", "license": "apache-2.0", "size": 9992 }
[ "java.util.concurrent.Future" ]
import java.util.concurrent.Future;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,630,344
@Override public Principal getUserPrincipal() { return this.principal; }
Principal function() { return this.principal; }
/** * Returns KerberosPrincipal of user. * * @see javax.servlet.http.HttpServletRequest#getUserPrincipal() */
Returns KerberosPrincipal of user
getUserPrincipal
{ "repo_name": "kkhmelevskoy/spnego", "path": "spnego/src/java/net/sourceforge/spnego/SpnegoHttpServletRequest.java", "license": "lgpl-3.0", "size": 3685 }
[ "java.security.Principal" ]
import java.security.Principal;
import java.security.*;
[ "java.security" ]
java.security;
1,134,950
public CosmosPagedFlux<CosmosDatabaseProperties> readAllDatabases() { return readAllDatabases(new CosmosQueryRequestOptions()); }
CosmosPagedFlux<CosmosDatabaseProperties> function() { return readAllDatabases(new CosmosQueryRequestOptions()); }
/** * Reads all databases. * <p> * After subscription the operation will be performed. * The {@link CosmosPagedFlux} will contain one or several feed response of the read databases. * In case of failure the {@link CosmosPagedFlux} will error. * * @return a {@link CosmosPagedFlux} cont...
Reads all databases. After subscription the operation will be performed. The <code>CosmosPagedFlux</code> will contain one or several feed response of the read databases. In case of failure the <code>CosmosPagedFlux</code> will error
readAllDatabases
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/cosmos/azure-cosmos/src/main/java/com/azure/cosmos/CosmosAsyncClient.java", "license": "mit", "size": 22238 }
[ "com.azure.cosmos.models.CosmosDatabaseProperties", "com.azure.cosmos.models.CosmosQueryRequestOptions", "com.azure.cosmos.util.CosmosPagedFlux" ]
import com.azure.cosmos.models.CosmosDatabaseProperties; import com.azure.cosmos.models.CosmosQueryRequestOptions; import com.azure.cosmos.util.CosmosPagedFlux;
import com.azure.cosmos.models.*; import com.azure.cosmos.util.*;
[ "com.azure.cosmos" ]
com.azure.cosmos;
1,526,425
void pi(Map<String, Map<String, Object>> args) { Iterator<Map.Entry<String, Map<String, Object>>> iterator = args.entrySet().iterator(); if (iterator.hasNext()) { Map.Entry<String, Map<String, Object>> mapEntry = iterator.next(); createNode("?" + mapEntry.getKey(), mapEntry.g...
void pi(Map<String, Map<String, Object>> args) { Iterator<Map.Entry<String, Map<String, Object>>> iterator = args.entrySet().iterator(); if (iterator.hasNext()) { Map.Entry<String, Map<String, Object>> mapEntry = iterator.next(); createNode("?" + mapEntry.getKey(), mapEntry.getValue()); state = 2; out.println("?>"); } ...
/** * Produce an XML processing instruction in the output. * For example: * <pre> * mkp.pi("xml-stylesheet":[href:"mystyle.css", type:"text/css"]) * </pre> * * @param args a map with a single entry whose key is the name of the * processing instruction and whose value ...
Produce an XML processing instruction in the output. For example: <code> mkp.pi("xml-stylesheet":[href:"mystyle.css", type:"text/css"]) </code>
pi
{ "repo_name": "paulk-asert/groovy", "path": "subprojects/groovy-xml/src/main/java/groovy/xml/MarkupBuilder.java", "license": "apache-2.0", "size": 18762 }
[ "java.util.Iterator", "java.util.Map" ]
import java.util.Iterator; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,151,697
static void sortByValue(List<KeyValue> pairs) { pairs.sort(BY_VALUE_COMPARATOR); }
static void sortByValue(List<KeyValue> pairs) { pairs.sort(BY_VALUE_COMPARATOR); }
/** * Sort two related lists simultaneously by the elements in the key parameter. * * @param pairs a list of KeyValue elements */
Sort two related lists simultaneously by the elements in the key parameter
sortByValue
{ "repo_name": "kalaspuffar/pdfbox", "path": "pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/form/FieldUtils.java", "license": "apache-2.0", "size": 5345 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
598,067
return ConvolutionMask.calculateConvolution5x5(this.getBitmapIn(), this.getConvolutionMask()); }
return ConvolutionMask.calculateConvolution5x5(this.getBitmapIn(), this.getConvolutionMask()); }
/** * Execute filter. * * @return the bitmap */
Execute filter
executeFilter
{ "repo_name": "cgewdev/AndroidImageEditingFilters", "path": "src/com/example/android_image_editing_filters/filter/GaussianBlurStrong.java", "license": "mit", "size": 1495 }
[ "com.example.android_image_editing_filters.model.ConvolutionMask" ]
import com.example.android_image_editing_filters.model.ConvolutionMask;
import com.example.android_image_editing_filters.model.*;
[ "com.example.android_image_editing_filters" ]
com.example.android_image_editing_filters;
1,796,058
CompletableFuture<TaskManagerInfo> requestTaskManagerInfo(ResourceID taskManagerId, @RpcTimeout Time timeout);
CompletableFuture<TaskManagerInfo> requestTaskManagerInfo(ResourceID taskManagerId, @RpcTimeout Time timeout);
/** * Requests information about the given {@link TaskExecutor}. * * @param taskManagerId identifying the TaskExecutor for which to return information * @param timeout of the request * @return Future TaskManager information */
Requests information about the given <code>TaskExecutor</code>
requestTaskManagerInfo
{ "repo_name": "zimmermatt/flink", "path": "flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/ResourceManagerGateway.java", "license": "apache-2.0", "size": 7834 }
[ "java.util.concurrent.CompletableFuture", "org.apache.flink.api.common.time.Time", "org.apache.flink.runtime.clusterframework.types.ResourceID", "org.apache.flink.runtime.rest.messages.taskmanager.TaskManagerInfo", "org.apache.flink.runtime.rpc.RpcTimeout" ]
import java.util.concurrent.CompletableFuture; import org.apache.flink.api.common.time.Time; import org.apache.flink.runtime.clusterframework.types.ResourceID; import org.apache.flink.runtime.rest.messages.taskmanager.TaskManagerInfo; import org.apache.flink.runtime.rpc.RpcTimeout;
import java.util.concurrent.*; import org.apache.flink.api.common.time.*; import org.apache.flink.runtime.clusterframework.types.*; import org.apache.flink.runtime.rest.messages.taskmanager.*; import org.apache.flink.runtime.rpc.*;
[ "java.util", "org.apache.flink" ]
java.util; org.apache.flink;
1,903,845
public static String openUrl(String url, String method, Bundle params) throws MalformedURLException, IOException { // random string as boundary for multi-part http post String strBoundary = "3i2ndDfv2rTHiSisAbouNdArYfORhtTPEefj3q2f"; String endLine = "\r\n"; OutputStream o...
static String function(String url, String method, Bundle params) throws MalformedURLException, IOException { String strBoundary = STR; String endLine = "\r\n"; OutputStream os; if (method.equals("GET")) { url = url + "?" + encodeUrl(params); } Log.d(STR, method + STR + url); HttpURLConnection conn = (HttpURLConnection)...
/** * Connect to an HTTP URL and return the response as a string. * * Note that the HTTP method override is used on non-GET requests. (i.e. * requests are made as "POST" with method specified in the body). * * @param url - the resource to open: must be a welformed URL * @param method ...
Connect to an HTTP URL and return the response as a string. Note that the HTTP method override is used on non-GET requests. (i.e. requests are made as "POST" with method specified in the body)
openUrl
{ "repo_name": "tah-io/Tah-Android", "path": "Tah/app/src/main/java/social/Util.java", "license": "gpl-2.0", "size": 11034 }
[ "android.os.Bundle", "android.util.Log", "java.io.BufferedOutputStream", "java.io.FileNotFoundException", "java.io.IOException", "java.io.OutputStream", "java.net.HttpURLConnection", "java.net.MalformedURLException", "java.net.URLDecoder" ]
import android.os.Bundle; import android.util.Log; import java.io.BufferedOutputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.OutputStream; import java.net.HttpURLConnection; import java.net.MalformedURLException; import java.net.URLDecoder;
import android.os.*; import android.util.*; import java.io.*; import java.net.*;
[ "android.os", "android.util", "java.io", "java.net" ]
android.os; android.util; java.io; java.net;
2,138,548
private Object sendRequest(int command) { if (Looper.myLooper() == mMainThreadHandler.getLooper()) { MainThreadRequest request = new MainThreadRequest(); mMainThreadHandler.handleMessage(mMainThreadHandler.obtainMessage(command, request)); return request.result; }...
Object function(int command) { if (Looper.myLooper() == mMainThreadHandler.getLooper()) { MainThreadRequest request = new MainThreadRequest(); mMainThreadHandler.handleMessage(mMainThreadHandler.obtainMessage(command, request)); return request.result; } else { MainThreadRequest request = sendRequestAsync(command, 0); s...
/** * Posts the specified command to be executed on the main thread, waits for the request to * complete, and returns the result. */
Posts the specified command to be executed on the main thread, waits for the request to complete, and returns the result
sendRequest
{ "repo_name": "s20121035/rk3288_android5.1_repo", "path": "packages/services/Telecomm/src/com/android/server/telecom/TelecomService.java", "license": "gpl-3.0", "size": 38138 }
[ "android.os.Looper" ]
import android.os.Looper;
import android.os.*;
[ "android.os" ]
android.os;
403,061
public boolean hasAccess(Subject subject, List<? extends Authorizable> authorizableHierarchy, Set<? extends Action> actions);
boolean function(Subject subject, List<? extends Authorizable> authorizableHierarchy, Set<? extends Action> actions);
/*** * Returns validate subject privileges on given Authorizable object * * @param subject: UserID to validate privileges * @param authorizableHierarchy : List of object accroding to namespace hierarchy. * eg. Server->Db->Table or Server->Function * The privileges will be validated from ...
Returns validate subject privileges on given Authorizable object
hasAccess
{ "repo_name": "izlley/sentry", "path": "sentry-provider/sentry-provider-common/src/main/java/org/apache/sentry/provider/common/AuthorizationProvider.java", "license": "apache-2.0", "size": 1715 }
[ "java.util.List", "java.util.Set", "org.apache.sentry.core.common.Action", "org.apache.sentry.core.common.Authorizable", "org.apache.sentry.core.common.Subject" ]
import java.util.List; import java.util.Set; import org.apache.sentry.core.common.Action; import org.apache.sentry.core.common.Authorizable; import org.apache.sentry.core.common.Subject;
import java.util.*; import org.apache.sentry.core.common.*;
[ "java.util", "org.apache.sentry" ]
java.util; org.apache.sentry;
1,699,520
public static void removeLegacyNonScopesFromMapping(Map<ScopeImpl, PvmExecutionImpl> mapping) { Map<PvmExecutionImpl, List<ScopeImpl>> scopesForExecutions = new HashMap<PvmExecutionImpl, List<ScopeImpl>>(); for (Map.Entry<ScopeImpl, PvmExecutionImpl> mappingEntry : mapping.entrySet()) { List<ScopeImpl>...
static void function(Map<ScopeImpl, PvmExecutionImpl> mapping) { Map<PvmExecutionImpl, List<ScopeImpl>> scopesForExecutions = new HashMap<PvmExecutionImpl, List<ScopeImpl>>(); for (Map.Entry<ScopeImpl, PvmExecutionImpl> mappingEntry : mapping.entrySet()) { List<ScopeImpl> scopesForExecution = scopesForExecutions.get(ma...
/** * Remove all entries for legacy non-scopes given that the assigned scope execution is also responsible for another scope */
Remove all entries for legacy non-scopes given that the assigned scope execution is also responsible for another scope
removeLegacyNonScopesFromMapping
{ "repo_name": "xasx/camunda-bpm-platform", "path": "engine/src/main/java/org/camunda/bpm/engine/impl/pvm/runtime/LegacyBehavior.java", "license": "apache-2.0", "size": 27325 }
[ "java.util.ArrayList", "java.util.HashMap", "java.util.List", "java.util.Map", "org.camunda.bpm.engine.impl.pvm.process.ScopeImpl" ]
import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.camunda.bpm.engine.impl.pvm.process.ScopeImpl;
import java.util.*; import org.camunda.bpm.engine.impl.pvm.process.*;
[ "java.util", "org.camunda.bpm" ]
java.util; org.camunda.bpm;
2,887,986
public static void addAnswerToAQuestion(Connection con, Answer answer, ForeignPK questionPK) throws SQLException { SilverTrace.info("answer", "AnswerDAO.addAnswerToAQuestion()", "root.MSG_GEN_ENTER_METHOD", "questionPK =" + questionPK); int newId = 0; AnswerPK answerPK = new AnswerPK(...
static void function(Connection con, Answer answer, ForeignPK questionPK) throws SQLException { SilverTrace.info(STR, STR, STR, STR + questionPK); int newId = 0; AnswerPK answerPK = new AnswerPK(STR, questionPK); String updateStatement = STR + answerPK.getTableName() + STR; try { newId = DBUtil.getNextId(answerPK.getTa...
/** * Add an answer to a question * @param con the Connection * @param answer the Answer * @param questionPK the QuestionPK (question id) * @throws SQLException */
Add an answer to a question
addAnswerToAQuestion
{ "repo_name": "stephaneperry/Silverpeas-Core", "path": "ejb-core/questioncontainer/src/main/java/com/stratelia/webactiv/util/answer/ejb/AnswerDAO.java", "license": "agpl-3.0", "size": 11827 }
[ "com.silverpeas.util.ForeignPK", "com.stratelia.silverpeas.silvertrace.SilverTrace", "com.stratelia.webactiv.util.DBUtil", "com.stratelia.webactiv.util.answer.model.Answer", "com.stratelia.webactiv.util.answer.model.AnswerPK", "com.stratelia.webactiv.util.answer.model.AnswerRuntimeException", "com.strat...
import com.silverpeas.util.ForeignPK; import com.stratelia.silverpeas.silvertrace.SilverTrace; import com.stratelia.webactiv.util.DBUtil; import com.stratelia.webactiv.util.answer.model.Answer; import com.stratelia.webactiv.util.answer.model.AnswerPK; import com.stratelia.webactiv.util.answer.model.AnswerRuntimeExcepti...
import com.silverpeas.util.*; import com.stratelia.silverpeas.silvertrace.*; import com.stratelia.webactiv.util.*; import com.stratelia.webactiv.util.answer.model.*; import com.stratelia.webactiv.util.exception.*; import java.sql.*;
[ "com.silverpeas.util", "com.stratelia.silverpeas", "com.stratelia.webactiv", "java.sql" ]
com.silverpeas.util; com.stratelia.silverpeas; com.stratelia.webactiv; java.sql;
2,280,317
public void insertEntity(EnsayoPrecio ensayoPrecio) { ensayoPrecioDAO.insert(ensayoPrecio); }
void function(EnsayoPrecio ensayoPrecio) { ensayoPrecioDAO.insert(ensayoPrecio); }
/** * Insert ensayoPrecio. */
Insert ensayoPrecio
insertEntity
{ "repo_name": "terrex/tntconcept-materials-testing", "path": "src/main/java/com/autentia/intra/manager/contacts/EnsayoPrecioManager.java", "license": "gpl-2.0", "size": 3625 }
[ "com.autentia.intra.businessobject.EnsayoPrecio" ]
import com.autentia.intra.businessobject.EnsayoPrecio;
import com.autentia.intra.businessobject.*;
[ "com.autentia.intra" ]
com.autentia.intra;
842,863
private long getSize(ActiveMQDestination destination) throws Exception { return getPhysicalDestination(destination) != null ? getPhysicalDestination(destination).getDestinationStatistics().getMessages().getCount() : 0; }
long function(ActiveMQDestination destination) throws Exception { return getPhysicalDestination(destination) != null ? getPhysicalDestination(destination).getDestinationStatistics().getMessages().getCount() : 0; }
/** * A helper method that returns the size of the specified queue/topic. */
A helper method that returns the size of the specified queue/topic
getSize
{ "repo_name": "wildfly/activemq-artemis", "path": "tests/activemq5-unit-tests/src/test/java/org/apache/activemq/bugs/DoubleExpireTest.java", "license": "apache-2.0", "size": 5424 }
[ "org.apache.activemq.command.ActiveMQDestination" ]
import org.apache.activemq.command.ActiveMQDestination;
import org.apache.activemq.command.*;
[ "org.apache.activemq" ]
org.apache.activemq;
1,664,888
void matches(ModuleComponentIdentifier moduleComponentIdentifier);
void matches(ModuleComponentIdentifier moduleComponentIdentifier);
/** * Marks the given module component identifier as matching. * * @param moduleComponentIdentifier Chosen module component identifier */
Marks the given module component identifier as matching
matches
{ "repo_name": "robinverduijn/gradle", "path": "subprojects/dependency-management/src/main/java/org/gradle/internal/resolve/result/ComponentSelectionContext.java", "license": "apache-2.0", "size": 2949 }
[ "org.gradle.api.artifacts.component.ModuleComponentIdentifier" ]
import org.gradle.api.artifacts.component.ModuleComponentIdentifier;
import org.gradle.api.artifacts.component.*;
[ "org.gradle.api" ]
org.gradle.api;
1,388,472
protected CertPathParameters getParameters(String algorithm, String crlf, KeyStore trustStore) throws Exception { CertPathParameters params = null; if("PKIX".equalsIgnoreCase(algorithm)) { ...
CertPathParameters function(String algorithm, String crlf, KeyStore trustStore) throws Exception { CertPathParameters params = null; if("PKIX".equalsIgnoreCase(algorithm)) { PKIXBuilderParameters xparams = new PKIXBuilderParameters(trustStore, new X509CertSelector()); Collection<? extends CRL> crls = getCRLs(crlf); Cer...
/** * Return the initialization parameters for the TrustManager. * Currently, only the default <code>PKIX</code> is supported. * * @param algorithm The algorithm to get parameters for. * @param crlf The path to the CRL file. * @param trustStore The configured TrustStore. * @ret...
Return the initialization parameters for the TrustManager. Currently, only the default <code>PKIX</code> is supported
getParameters
{ "repo_name": "pistolove/sourcecode4junit", "path": "Source4Tomcat/src/org/apache/tomcat/util/net/jsse/JSSESocketFactory.java", "license": "apache-2.0", "size": 31012 }
[ "java.security.KeyStore", "java.security.cert.CRLException", "java.security.cert.CertPathParameters", "java.security.cert.CertStore", "java.security.cert.CertStoreParameters", "java.security.cert.CollectionCertStoreParameters", "java.security.cert.PKIXBuilderParameters", "java.security.cert.X509CertSe...
import java.security.KeyStore; import java.security.cert.CRLException; import java.security.cert.CertPathParameters; import java.security.cert.CertStore; import java.security.cert.CertStoreParameters; import java.security.cert.CollectionCertStoreParameters; import java.security.cert.PKIXBuilderParameters; import java.s...
import java.security.*; import java.security.cert.*; import java.util.*;
[ "java.security", "java.util" ]
java.security; java.util;
1,750,763
public void denyTypesByRegExp(Pattern[] regexps) { denyPermission(new RegExpTypePermission(regexps)); }
void function(Pattern[] regexps) { denyPermission(new RegExpTypePermission(regexps)); }
/** * Add security permission forbidding types matching one of the specified regular expressions. * * @param regexps the regular expressions to forbid type names * @since 1.4.7 */
Add security permission forbidding types matching one of the specified regular expressions
denyTypesByRegExp
{ "repo_name": "Groostav/XStream-GG", "path": "xstream/src/java/com/thoughtworks/xstream/XStream.java", "license": "bsd-3-clause", "size": 90964 }
[ "com.thoughtworks.xstream.security.RegExpTypePermission", "java.util.regex.Pattern" ]
import com.thoughtworks.xstream.security.RegExpTypePermission; import java.util.regex.Pattern;
import com.thoughtworks.xstream.security.*; import java.util.regex.*;
[ "com.thoughtworks.xstream", "java.util" ]
com.thoughtworks.xstream; java.util;
1,265,243
protected void validateSubject(SubjectStatementType subjectStatement) throws ValidationException { if (subjectStatement.getSubject() == null) { throw new ValidationException("No Subject present"); } }
void function(SubjectStatementType subjectStatement) throws ValidationException { if (subjectStatement.getSubject() == null) { throw new ValidationException(STR); } }
/** * Validates that the statement has a subject. * * @param subjectStatement statement to validate * * @throws ValidationException thrown if the statement does not have a subject */
Validates that the statement has a subject
validateSubject
{ "repo_name": "danpal/OpenSAML", "path": "src/main/java/org/opensaml/saml1/core/validator/SubjectStatementSchemaValidator.java", "license": "apache-2.0", "size": 1704 }
[ "org.opensaml.xml.validation.ValidationException" ]
import org.opensaml.xml.validation.ValidationException;
import org.opensaml.xml.validation.*;
[ "org.opensaml.xml" ]
org.opensaml.xml;
627,441
public static ArrayList<String> parseImagesFromContentPage(Document doc) { ArrayList<String> result = new ArrayList<String>(); Elements links = doc.select("a"); for (Element link : links) { String href = link.attr("href"); if (href.contains("/project/index.php?title=...
static ArrayList<String> function(Document doc) { ArrayList<String> result = new ArrayList<String>(); Elements links = doc.select("a"); for (Element link : links) { String href = link.attr("href"); if (href.contains(STR)) { if (!href.startsWith("http")) href = UIHelper.getBaseUrl(LNReaderApplication.getInstance().getAp...
/** * Get all /project/index.php?title=File:xxx from content * * @param doc * @return */
Get all /project/index.php?title=File:xxx from content
parseImagesFromContentPage
{ "repo_name": "SandroHc/LNReader-Android", "path": "app/src/main/java/com/erakk/lnreader/parser/CommonParser.java", "license": "apache-2.0", "size": 22427 }
[ "android.util.Log", "com.erakk.lnreader.LNReaderApplication", "com.erakk.lnreader.UIHelper", "java.util.ArrayList", "org.jsoup.nodes.Document", "org.jsoup.nodes.Element", "org.jsoup.select.Elements" ]
import android.util.Log; import com.erakk.lnreader.LNReaderApplication; import com.erakk.lnreader.UIHelper; import java.util.ArrayList; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.select.Elements;
import android.util.*; import com.erakk.lnreader.*; import java.util.*; import org.jsoup.nodes.*; import org.jsoup.select.*;
[ "android.util", "com.erakk.lnreader", "java.util", "org.jsoup.nodes", "org.jsoup.select" ]
android.util; com.erakk.lnreader; java.util; org.jsoup.nodes; org.jsoup.select;
1,085,233
public void setCommentDate(Date commentDate) { this.commentDate = commentDate; }
void function(Date commentDate) { this.commentDate = commentDate; }
/** * Sets date for this comment. * * @param entryDate New date */
Sets date for this comment
setCommentDate
{ "repo_name": "otavanopisto/pyramus", "path": "persistence/src/main/java/fi/otavanopisto/pyramus/domainmodel/students/StudentGroupContactLogEntryComment.java", "license": "gpl-3.0", "size": 3500 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
2,690,261
@Override public void clear() { // iterate over all keys in originalMap and set them to null in deltaMap for (K key : originalMap.keySet()) { deltaMap.put(key, ErasureUtils.<Collection<V>>uncheckedCast(removedValue)); } }
void function() { for (K key : originalMap.keySet()) { deltaMap.put(key, ErasureUtils.<Collection<V>>uncheckedCast(removedValue)); } }
/** * This is more expensive than normal. */
This is more expensive than normal
clear
{ "repo_name": "automenta/corenlp", "path": "src/edu/stanford/nlp/util/DeltaCollectionValuedMap.java", "license": "gpl-2.0", "size": 7033 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
104,720
protected IDrawerItem getDrawerItem(int position) { return (IDrawerItem) getAdapter().getItem(position); }
IDrawerItem function(int position) { return (IDrawerItem) getAdapter().getItem(position); }
/** * get the drawerItem at a specific position * * @param position * @return */
get the drawerItem at a specific position
getDrawerItem
{ "repo_name": "natodemon/Lunary-Ethereum-Wallet", "path": "materialdrawer/src/main/java/com/mikepenz/materialdrawer/DrawerBuilder.java", "license": "gpl-3.0", "size": 67146 }
[ "com.mikepenz.materialdrawer.model.interfaces.IDrawerItem" ]
import com.mikepenz.materialdrawer.model.interfaces.IDrawerItem;
import com.mikepenz.materialdrawer.model.interfaces.*;
[ "com.mikepenz.materialdrawer" ]
com.mikepenz.materialdrawer;
2,366,661
public void testComputeConfidenceInterval() { System.out.println("computeConfidenceInterval"); int N = RANDOM.nextInt(1000) + 100; double confidence = RANDOM.nextDouble(); Collection<Double> data = new LinkedList<Double>(); for (int i = 0; i < N; i++) { ...
void function() { System.out.println(STR); int N = RANDOM.nextInt(1000) + 100; double confidence = RANDOM.nextDouble(); Collection<Double> data = new LinkedList<Double>(); for (int i = 0; i < N; i++) { data.add(RANDOM.nextGaussian()); } UnivariateGaussian g = UnivariateGaussian.MaximumLikelihoodEstimator.learn(data, 0....
/** * Test of computeConfidenceInterval method, of class gov.sandia.cognition.learning.util.statistics.StudentTConfidence. */
Test of computeConfidenceInterval method, of class gov.sandia.cognition.learning.util.statistics.StudentTConfidence
testComputeConfidenceInterval
{ "repo_name": "codeaudit/Foundry", "path": "Components/LearningCore/Test/gov/sandia/cognition/statistics/method/StudentTConfidenceTest.java", "license": "bsd-3-clause", "size": 9729 }
[ "gov.sandia.cognition.statistics.distribution.StudentTDistribution", "gov.sandia.cognition.statistics.distribution.UnivariateGaussian", "java.util.Collection", "java.util.LinkedList" ]
import gov.sandia.cognition.statistics.distribution.StudentTDistribution; import gov.sandia.cognition.statistics.distribution.UnivariateGaussian; import java.util.Collection; import java.util.LinkedList;
import gov.sandia.cognition.statistics.distribution.*; import java.util.*;
[ "gov.sandia.cognition", "java.util" ]
gov.sandia.cognition; java.util;
798,965
public Object[] listSystems(User loggedInUser) throws FaultException { DataResult<SystemOverview> dr = SystemManager.systemListShort(loggedInUser, null); dr.elaborate(); return dr.toArray(); }
Object[] function(User loggedInUser) throws FaultException { DataResult<SystemOverview> dr = SystemManager.systemListShort(loggedInUser, null); dr.elaborate(); return dr.toArray(); }
/** * Gets a list of all systems visible to user * @param loggedInUser The current user * @return Returns an array of maps representing all systems visible to user * * @throws FaultException A FaultException is thrown if a valid user can not be found * from the passed in session key *...
Gets a list of all systems visible to user
listSystems
{ "repo_name": "jdobes/spacewalk", "path": "java/code/src/com/redhat/rhn/frontend/xmlrpc/system/SystemHandler.java", "license": "gpl-2.0", "size": 240801 }
[ "com.redhat.rhn.FaultException", "com.redhat.rhn.common.db.datasource.DataResult", "com.redhat.rhn.domain.user.User", "com.redhat.rhn.frontend.dto.SystemOverview", "com.redhat.rhn.manager.system.SystemManager" ]
import com.redhat.rhn.FaultException; import com.redhat.rhn.common.db.datasource.DataResult; import com.redhat.rhn.domain.user.User; import com.redhat.rhn.frontend.dto.SystemOverview; import com.redhat.rhn.manager.system.SystemManager;
import com.redhat.rhn.*; import com.redhat.rhn.common.db.datasource.*; import com.redhat.rhn.domain.user.*; import com.redhat.rhn.frontend.dto.*; import com.redhat.rhn.manager.system.*;
[ "com.redhat.rhn" ]
com.redhat.rhn;
2,279,970
public void setOnCompletionListener(IMediaPlayer.OnCompletionListener l) { mOnCompletionListener = l; }
void function(IMediaPlayer.OnCompletionListener l) { mOnCompletionListener = l; }
/** * Register a callback to be invoked when the end of a media file * has been reached during playback. * * @param l The callback that will be run */
Register a callback to be invoked when the end of a media file has been reached during playback
setOnCompletionListener
{ "repo_name": "WeDevelopTeam/HeroVideo-master", "path": "app/src/main/java/com/github/bigexcalibur/herovideo/mediaplayer/MediaPlayerView.java", "license": "apache-2.0", "size": 35206 }
[ "tv.danmaku.ijk.media.player.IMediaPlayer" ]
import tv.danmaku.ijk.media.player.IMediaPlayer;
import tv.danmaku.ijk.media.player.*;
[ "tv.danmaku.ijk" ]
tv.danmaku.ijk;
2,024,651
int insertSelective(Button record);
int insertSelective(Button record);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table T_SYS_BUTTON * * @mbggenerated */
This method was generated by MyBatis Generator. This method corresponds to the database table T_SYS_BUTTON
insertSelective
{ "repo_name": "Qi-zheng/boot-project", "path": "boot-service/boot-service-privilege/src/main/java/org/boot/service/privilege/dao/base/ButtonMapper.java", "license": "apache-2.0", "size": 3151 }
[ "org.boot.facede.privilege.model.Button" ]
import org.boot.facede.privilege.model.Button;
import org.boot.facede.privilege.model.*;
[ "org.boot.facede" ]
org.boot.facede;
1,920,346
public LoadBalancerInner withOutboundRules(List<OutboundRuleInner> outboundRules) { this.outboundRules = outboundRules; return this; }
LoadBalancerInner function(List<OutboundRuleInner> outboundRules) { this.outboundRules = outboundRules; return this; }
/** * Set the outbound rules. * * @param outboundRules the outboundRules value to set * @return the LoadBalancerInner object itself. */
Set the outbound rules
withOutboundRules
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/network/v2020_03_01/implementation/LoadBalancerInner.java", "license": "mit", "size": 11509 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,171,859
@ApiModelProperty(value = "") public Signer getSigner() { return signer; }
@ApiModelProperty(value = "") Signer function() { return signer; }
/** * Get signer. * @return signer **/
Get signer
getSigner
{ "repo_name": "docusign/docusign-java-client", "path": "src/main/java/com/docusign/esign/model/BulkRecipientsUpdateResponse.java", "license": "mit", "size": 2127 }
[ "com.docusign.esign.model.Signer", "io.swagger.annotations.ApiModelProperty" ]
import com.docusign.esign.model.Signer; import io.swagger.annotations.ApiModelProperty;
import com.docusign.esign.model.*; import io.swagger.annotations.*;
[ "com.docusign.esign", "io.swagger.annotations" ]
com.docusign.esign; io.swagger.annotations;
1,138,627
public void setValue(String value) throws SQLException { PGtokenizer t = new PGtokenizer(value, ','); if (t.getSize() != 2) throw new PSQLException(GT.tr("Conversion to type {0} failed: {1}.", new Object[]{type,value}), PSQLState.DATA_TYPE_MISMATCH); point[0] = new PGpoint(t...
void function(String value) throws SQLException { PGtokenizer t = new PGtokenizer(value, ','); if (t.getSize() != 2) throw new PSQLException(GT.tr(STR, new Object[]{type,value}), PSQLState.DATA_TYPE_MISMATCH); point[0] = new PGpoint(t.getToken(0)); point[1] = new PGpoint(t.getToken(1)); }
/** * This method sets the value of this object. It should be overidden, * but still called by subclasses. * * @param value a string representation of the value of the object * @exception SQLException thrown if value is invalid for this type */
This method sets the value of this object. It should be overidden, but still called by subclasses
setValue
{ "repo_name": "thkoch2001/libpostgresql-jdbc-java", "path": "org/postgresql/geometric/PGbox.java", "license": "bsd-3-clause", "size": 4461 }
[ "java.sql.SQLException", "org.postgresql.util.GT", "org.postgresql.util.PGtokenizer", "org.postgresql.util.PSQLException", "org.postgresql.util.PSQLState" ]
import java.sql.SQLException; import org.postgresql.util.GT; import org.postgresql.util.PGtokenizer; import org.postgresql.util.PSQLException; import org.postgresql.util.PSQLState;
import java.sql.*; import org.postgresql.util.*;
[ "java.sql", "org.postgresql.util" ]
java.sql; org.postgresql.util;
1,295,695
static int fromCharacteristics(Spliterator<?> spliterator) { int characteristics = spliterator.characteristics(); if ((characteristics & Spliterator.SORTED) != 0 && spliterator.getComparator() != null) { // Do not propagate the SORTED characteristic if it does not correspond ...
static int fromCharacteristics(Spliterator<?> spliterator) { int characteristics = spliterator.characteristics(); if ((characteristics & Spliterator.SORTED) != 0 && spliterator.getComparator() != null) { return characteristics & SPLITERATOR_CHARACTERISTICS_MASK & ~Spliterator.SORTED; } else { return characteristics & S...
/** * Converts a spliterator characteristic bit set to stream flags. * * @implSpec * If the spliterator is naturally {@code SORTED} (the associated * {@code Comparator} is {@code null}) then the characteristic is converted * to the {@link #SORTED} flag, otherwise the characteristic is not ...
Converts a spliterator characteristic bit set to stream flags
fromCharacteristics
{ "repo_name": "evanman/Java-Source", "path": "util/stream/StreamOpFlag.java", "license": "lgpl-2.1", "size": 26525 }
[ "java.util.Spliterator" ]
import java.util.Spliterator;
import java.util.*;
[ "java.util" ]
java.util;
1,305,856
public void testStatementSeverityErrorInProcedure() throws SQLException { Statement s = createStatement(); s.execute("create procedure proc_5280() language java " + "parameter style java external name '" + getClass().getName() + ".proc_5280' reads sql data"); ...
void function() throws SQLException { Statement s = createStatement(); s.execute(STR + STR + getClass().getName() + STR); s.execute(STR); }
/** * Test that a statement severity error inside a procedure doesn't kill * the top-level statement that executes the stored procedure. Regression * test case for DERBY-5280. */
Test that a statement severity error inside a procedure doesn't kill the top-level statement that executes the stored procedure. Regression test case for DERBY-5280
testStatementSeverityErrorInProcedure
{ "repo_name": "splicemachine/spliceengine", "path": "db-testing/src/test/java/com/splicemachine/dbTesting/functionTests/tests/jdbcapi/ProcedureTest.java", "license": "agpl-3.0", "size": 64568 }
[ "java.sql.SQLException", "java.sql.Statement" ]
import java.sql.SQLException; import java.sql.Statement;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,054,851
public BxDocument getBxDocumentWithSpecificLabels() throws AnalysisException, TimeoutException { return getBxDocumentWithSpecificLabels(mainTimeout); }
BxDocument function() throws AnalysisException, TimeoutException { return getBxDocumentWithSpecificLabels(mainTimeout); }
/** * Extracts geometric structure with specific labels. * * @return geometric structure * @throws AnalysisException AnalysisException * @throws TimeoutException thrown when timeout deadline has passed. See * {@link #setTimeout(long)} for additional information about the timeout. */
Extracts geometric structure with specific labels
getBxDocumentWithSpecificLabels
{ "repo_name": "CeON/CERMINE", "path": "cermine-impl/src/main/java/pl/edu/icm/cermine/ContentExtractor.java", "license": "agpl-3.0", "size": 35437 }
[ "pl.edu.icm.cermine.exception.AnalysisException", "pl.edu.icm.cermine.structure.model.BxDocument", "pl.edu.icm.cermine.tools.timeout.TimeoutException" ]
import pl.edu.icm.cermine.exception.AnalysisException; import pl.edu.icm.cermine.structure.model.BxDocument; import pl.edu.icm.cermine.tools.timeout.TimeoutException;
import pl.edu.icm.cermine.exception.*; import pl.edu.icm.cermine.structure.model.*; import pl.edu.icm.cermine.tools.timeout.*;
[ "pl.edu.icm" ]
pl.edu.icm;
2,836,297
private void createData(Database db) throws Exception { for ( int idx = 0; idx < insertStatement.length; idx++ ) { db.execStatement(insertStatement[idx]); } }
void function(Database db) throws Exception { for ( int idx = 0; idx < insertStatement.length; idx++ ) { db.execStatement(insertStatement[idx]); } }
/** * Insert data in the source table. * * @param db database to use. */
Insert data in the source table
createData
{ "repo_name": "jjeb/kettle-trunk", "path": "test/org/pentaho/di/trans/steps/tableinput/TableInputTest.java", "license": "apache-2.0", "size": 12973 }
[ "org.pentaho.di.core.database.Database" ]
import org.pentaho.di.core.database.Database;
import org.pentaho.di.core.database.*;
[ "org.pentaho.di" ]
org.pentaho.di;
889,806
public final List<V> getVertices() { return EMPTY_LIST_OF_VERTICES; }
final List<V> function() { return EMPTY_LIST_OF_VERTICES; }
/** * Get an ordered list of vertices. * * @return */
Get an ordered list of vertices
getVertices
{ "repo_name": "lschuetze/gueryframework", "path": "guery-core/src/main/java/nz/ac/massey/cs/guery/impl/EmptyPath.java", "license": "apache-2.0", "size": 2512 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,382,078
public void testAddSequence() throws Exception { KettleEnvironment.init(); // // Create a new transformation... // TransMeta transMeta = new TransMeta(); transMeta.setName("addsequencetest"); PluginRegistry registry = PluginRegistry.getI...
void function() throws Exception { KettleEnvironment.init(); TransMeta transMeta = new TransMeta(); transMeta.setName(STR); PluginRegistry registry = PluginRegistry.getInstance(); String rowGeneratorStepname = STR; RowGeneratorMeta rm = new RowGeneratorMeta(); String rowGeneratorPid = registry.getPluginId(rm); StepMeta...
/** * Test case for add sequence step. Row generator attached to several * add sequence steps and checking whether the end result is as expected. */
Test case for add sequence step. Row generator attached to several add sequence steps and checking whether the end result is as expected
testAddSequence
{ "repo_name": "dianhu/Kettle-Research", "path": "test/org/pentaho/di/trans/steps/addsequence/AddSequenceTest.java", "license": "lgpl-2.1", "size": 10851 }
[ "java.util.List", "org.pentaho.di.core.KettleEnvironment", "org.pentaho.di.core.RowMetaAndData", "org.pentaho.di.core.plugins.PluginRegistry", "org.pentaho.di.trans.RowStepCollector", "org.pentaho.di.trans.Trans", "org.pentaho.di.trans.TransHopMeta", "org.pentaho.di.trans.TransMeta", "org.pentaho.di...
import java.util.List; import org.pentaho.di.core.KettleEnvironment; import org.pentaho.di.core.RowMetaAndData; import org.pentaho.di.core.plugins.PluginRegistry; import org.pentaho.di.trans.RowStepCollector; import org.pentaho.di.trans.Trans; import org.pentaho.di.trans.TransHopMeta; import org.pentaho.di.trans.TransM...
import java.util.*; import org.pentaho.di.core.*; import org.pentaho.di.core.plugins.*; import org.pentaho.di.trans.*; import org.pentaho.di.trans.step.*; import org.pentaho.di.trans.steps.rowgenerator.*;
[ "java.util", "org.pentaho.di" ]
java.util; org.pentaho.di;
1,352,396
Promise<List<ProjectConfigDto>> getProjects();
Promise<List<ProjectConfigDto>> getProjects();
/** * Returns the projects list. If there is no projects were found on server, empty list is * returned. * * @return {@link Promise} with list of project configuration * @see ProjectConfigDto * @since 4.4.0 */
Returns the projects list. If there is no projects were found on server, empty list is returned
getProjects
{ "repo_name": "TypeFox/che", "path": "ide/che-core-ide-api/src/main/java/org/eclipse/che/ide/api/project/ProjectServiceClient.java", "license": "epl-1.0", "size": 8622 }
[ "java.util.List", "org.eclipse.che.api.promises.client.Promise", "org.eclipse.che.api.workspace.shared.dto.ProjectConfigDto" ]
import java.util.List; import org.eclipse.che.api.promises.client.Promise; import org.eclipse.che.api.workspace.shared.dto.ProjectConfigDto;
import java.util.*; import org.eclipse.che.api.promises.client.*; import org.eclipse.che.api.workspace.shared.dto.*;
[ "java.util", "org.eclipse.che" ]
java.util; org.eclipse.che;
2,806,797
public Map<String, String> getAvailableFiles() { Map<String, String> availableFiles = new LinkedHashMap<String, String>(); availableFiles.putAll(Constants.AVAILABLE_FILE_LISTING); return availableFiles; }
Map<String, String> function() { Map<String, String> availableFiles = new LinkedHashMap<String, String>(); availableFiles.putAll(Constants.AVAILABLE_FILE_LISTING); return availableFiles; }
/** * Get the list of all available files for downloading * Note: this is to rid the constants map of the serialVersionUID * so the map can be serialized and sent through a REST call * * @return a mapping of the files (e.g. "activity" => "activity.csv") */
Get the list of all available files for downloading Note: this is to rid the constants map of the serialVersionUID so the map can be serialized and sent through a REST call
getAvailableFiles
{ "repo_name": "Apereo-Learning-Analytics-Initiative/LAP-Sakai-Extractor", "path": "src/main/java/org/sakaiproject/lap/dao/Data.java", "license": "apache-2.0", "size": 12019 }
[ "java.util.LinkedHashMap", "java.util.Map", "org.sakaiproject.lap.Constants" ]
import java.util.LinkedHashMap; import java.util.Map; import org.sakaiproject.lap.Constants;
import java.util.*; import org.sakaiproject.lap.*;
[ "java.util", "org.sakaiproject.lap" ]
java.util; org.sakaiproject.lap;
2,430,375
private static void copyDirectory(File source, File target) throws IOException { if (!target.exists()) { target.mkdirs(); } File[] files = source.listFiles(); if (files == null) { return; } for (File sourceChild : files) { String name = sourceChild.getName(); if (name.equals(".svn")) { co...
static void function(File source, File target) throws IOException { if (!target.exists()) { target.mkdirs(); } File[] files = source.listFiles(); if (files == null) { return; } for (File sourceChild : files) { String name = sourceChild.getName(); if (name.equals(".svn")) { continue; } File targetChild = new File(target...
/** * Copy the given source directory (and all its contents) to the given * target directory. */
Copy the given source directory (and all its contents) to the given target directory
copyDirectory
{ "repo_name": "pecko/cft", "path": "org.eclipse.cft.server.tests/src/org/eclipse/cft/server/tests/sts/util/StsTestUtil.java", "license": "apache-2.0", "size": 22999 }
[ "java.io.File", "java.io.IOException" ]
import java.io.File; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,370,622
void setPrev(@Nullable T element); }
void setPrev(@Nullable T element); }
/** * Sets the reference to the previous element in the list. * * @param element the reference to the previous element in the list. */
Sets the reference to the previous element in the list
setPrev
{ "repo_name": "songy23/instrumentation-java", "path": "impl_core/src/main/java/io/opencensus/implcore/trace/internal/ConcurrentIntrusiveList.java", "license": "apache-2.0", "size": 5745 }
[ "javax.annotation.Nullable" ]
import javax.annotation.Nullable;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
2,479,310
static List<Delete> createDeletesForExistingTableSnapshotSizes(Connection connection) throws IOException { return createDeletesForExistingSnapshotsFromScan(connection, createScanForSpaceSnapshotSizes()); }
static List<Delete> createDeletesForExistingTableSnapshotSizes(Connection connection) throws IOException { return createDeletesForExistingSnapshotsFromScan(connection, createScanForSpaceSnapshotSizes()); }
/** * Returns a list of {@code Delete} to remove all table snapshot entries from quota table. * @param connection connection to re-use */
Returns a list of Delete to remove all table snapshot entries from quota table
createDeletesForExistingTableSnapshotSizes
{ "repo_name": "ultratendency/hbase", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/quotas/QuotaTableUtil.java", "license": "apache-2.0", "size": 39872 }
[ "java.io.IOException", "java.util.List", "org.apache.hadoop.hbase.client.Connection", "org.apache.hadoop.hbase.client.Delete" ]
import java.io.IOException; import java.util.List; import org.apache.hadoop.hbase.client.Connection; import org.apache.hadoop.hbase.client.Delete;
import java.io.*; import java.util.*; import org.apache.hadoop.hbase.client.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
1,364,584
public BranchShareSheetBuilder setSharingTitle(View titleView) { this.sharingTitleView_ = titleView; return this; }
BranchShareSheetBuilder function(View titleView) { this.sharingTitleView_ = titleView; return this; }
/** * Set the title for the sharing dialog * * @param titleView {@link View} for setting the title. * @return this Builder object to allow for chaining of calls to set methods. */
Set the title for the sharing dialog
setSharingTitle
{ "repo_name": "BranchMetrics/Android-Deferred-Deep-Linking-SDK", "path": "Branch-SDK/src/main/java/io/branch/referral/BranchShareSheetBuilder.java", "license": "mit", "size": 21993 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
1,135,592
public CheckpointInfo getInfoFromCheckpoint(UniqueID id, int sequenceNumber) throws RemoteException;
CheckpointInfo function(UniqueID id, int sequenceNumber) throws RemoteException;
/** * Return informations on the given checkpoint * @param id owner of the considered checkpoint * @param sequenceNumber index of the considered checkpoint * @return informations on the given checkpoint * @throws RemoteException */
Return informations on the given checkpoint
getInfoFromCheckpoint
{ "repo_name": "acontes/programming", "path": "src/Core/org/objectweb/proactive/core/body/ft/servers/storage/CheckpointServer.java", "license": "agpl-3.0", "size": 6237 }
[ "java.rmi.RemoteException", "org.objectweb.proactive.core.UniqueID", "org.objectweb.proactive.core.body.ft.checkpointing.CheckpointInfo" ]
import java.rmi.RemoteException; import org.objectweb.proactive.core.UniqueID; import org.objectweb.proactive.core.body.ft.checkpointing.CheckpointInfo;
import java.rmi.*; import org.objectweb.proactive.core.*; import org.objectweb.proactive.core.body.ft.checkpointing.*;
[ "java.rmi", "org.objectweb.proactive" ]
java.rmi; org.objectweb.proactive;
2,418,590
public ImmutableList<Replacement> getFormatReplacements( String input, List<Range<Integer>> characterRanges) throws FormatterException { JavaInput javaInput = new JavaInput(null, input); JavaOutput javaOutput = new JavaOutput(javaInput, new JavaCommentsHelper()); List<FormatterDiagnostic> errors = n...
ImmutableList<Replacement> function( String input, List<Range<Integer>> characterRanges) throws FormatterException { JavaInput javaInput = new JavaInput(null, input); JavaOutput javaOutput = new JavaOutput(javaInput, new JavaCommentsHelper()); List<FormatterDiagnostic> errors = new ArrayList<>(); format(javaInput, java...
/** * Emit a list of {@link Replacement}s to convert from input to output. * @param input the input compilation unit * @param characterRanges the character ranges to reformat * @return a list of {@link Replacement}s, sorted from low index to high index, without * overlaps * @throws FormatterExcept...
Emit a list of <code>Replacement</code>s to convert from input to output
getFormatReplacements
{ "repo_name": "fengshao0907/google-java-format", "path": "core/src/main/java/com/google/googlejavaformat/java/Formatter.java", "license": "apache-2.0", "size": 9013 }
[ "com.google.common.collect.ImmutableList", "com.google.common.collect.Range", "com.google.common.collect.RangeSet", "com.google.googlejavaformat.FormatterDiagnostic", "java.util.ArrayList", "java.util.List" ]
import com.google.common.collect.ImmutableList; import com.google.common.collect.Range; import com.google.common.collect.RangeSet; import com.google.googlejavaformat.FormatterDiagnostic; import java.util.ArrayList; import java.util.List;
import com.google.common.collect.*; import com.google.googlejavaformat.*; import java.util.*;
[ "com.google.common", "com.google.googlejavaformat", "java.util" ]
com.google.common; com.google.googlejavaformat; java.util;
790,201
Object getPropertyValue(Object component, int property) throws HibernateException;
Object getPropertyValue(Object component, int property) throws HibernateException;
/** * Get the value of a property. * * @param component an instance of class mapped by this "type" * @param property * @return the property value * @throws HibernateException */
Get the value of a property
getPropertyValue
{ "repo_name": "lamsfoundation/lams", "path": "3rdParty_sources/hibernate-core/org/hibernate/usertype/CompositeUserType.java", "license": "gpl-2.0", "size": 5803 }
[ "org.hibernate.HibernateException" ]
import org.hibernate.HibernateException;
import org.hibernate.*;
[ "org.hibernate" ]
org.hibernate;
695,928
public void testRecursiveImports2() throws Exception { ProxyService testService = new ProxyService("mytest"); SynapseConfiguration synCfg = new SynapseConfiguration(); AxisConfiguration axisCfg = new AxisConfiguration(); testService.setWsdlURI(getClass().getResource("SimpleStockServi...
void function() throws Exception { ProxyService testService = new ProxyService(STR); SynapseConfiguration synCfg = new SynapseConfiguration(); AxisConfiguration axisCfg = new AxisConfiguration(); testService.setWsdlURI(getClass().getResource(STR).toURI()); testService.buildAxisService(synCfg, axisCfg); }
/** * Test a proxy service with recursive imports and without a {@link ResourceMap}. * Regression test for SYNAPSE-442. */
Test a proxy service with recursive imports and without a <code>ResourceMap</code>. Regression test for SYNAPSE-442
testRecursiveImports2
{ "repo_name": "maheshika/wso2-synapse", "path": "modules/core/src/test/java/org/apache/synapse/core/axis2/ProxyServiceTest.java", "license": "apache-2.0", "size": 4679 }
[ "org.apache.axis2.engine.AxisConfiguration", "org.apache.synapse.config.SynapseConfiguration" ]
import org.apache.axis2.engine.AxisConfiguration; import org.apache.synapse.config.SynapseConfiguration;
import org.apache.axis2.engine.*; import org.apache.synapse.config.*;
[ "org.apache.axis2", "org.apache.synapse" ]
org.apache.axis2; org.apache.synapse;
2,749,749
public final String getScheme() { return scheme; } } public static class MailSendResult { public boolean success = false; public String errorMessage; public MailResult mailResult; MailSendResult(Throwable exception) { success = false; errorMessage = exception.t...
final String function() { return scheme; } } public static class MailSendResult { public boolean success = false; public String errorMessage; public MailResult mailResult; MailSendResult(Throwable exception) { success = false; errorMessage = exception.toString(); } MailSendResult(AsyncResult<MailResult> result) { if (r...
/** * get the name of a defined scheme, which can be used inside templates to build links * * @return the scheme */
get the name of a defined scheme, which can be used inside templates to build links
getScheme
{ "repo_name": "BraintagsGmbH/NetRelay-Controller", "path": "src/main/java/de/braintags/netrelay/controller/api/MailController.java", "license": "epl-1.0", "size": 23890 }
[ "io.vertx.core.AsyncResult", "io.vertx.ext.mail.MailResult" ]
import io.vertx.core.AsyncResult; import io.vertx.ext.mail.MailResult;
import io.vertx.core.*; import io.vertx.ext.mail.*;
[ "io.vertx.core", "io.vertx.ext" ]
io.vertx.core; io.vertx.ext;
2,794,957
public Object readObject(AbstractHessianInput in, String type, String []fieldNames) throws HessianProtocolException, IOException { Deserializer deserializer = getDeserializer(type); if (deserializer != null) return deserializer.readObject(in, ...
Object function(AbstractHessianInput in, String type, String []fieldNames) throws HessianProtocolException, IOException { Deserializer deserializer = getDeserializer(type); if (deserializer != null) return deserializer.readObject(in, fieldNames); else if (_hashMapDeserializer != null) return _hashMapDeserializer.readOb...
/** * Reads the object as a map. */
Reads the object as a map
readObject
{ "repo_name": "mdaniel/svn-caucho-com-resin", "path": "modules/hessian/src/com/caucho/hessian/io/SerializerFactory.java", "license": "gpl-2.0", "size": 22527 }
[ "java.io.IOException", "java.util.HashMap" ]
import java.io.IOException; import java.util.HashMap;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,821,604
public DMLProgram doParse(String fileName, String dmlScript, String sourceNamespace, Map<String,String> argVals) throws ParseException { DMLProgram dmlPgm = null; ANTLRInputStream in; try { if(dmlScript == null) { dmlScript = readDMLScript(fileName, LOG); } InputStream stream = new ByteArra...
DMLProgram function(String fileName, String dmlScript, String sourceNamespace, Map<String,String> argVals) throws ParseException { DMLProgram dmlPgm = null; ANTLRInputStream in; try { if(dmlScript == null) { dmlScript = readDMLScript(fileName, LOG); } InputStream stream = new ByteArrayInputStream(dmlScript.getBytes());...
/** * This function is supposed to be called directly only from DmlSyntacticValidator when it encounters 'import' * @param fileName script file name * @param dmlScript script file contents * @param sourceNamespace namespace from source statement * @param argVals script arguments * @return dml program, or nu...
This function is supposed to be called directly only from DmlSyntacticValidator when it encounters 'import'
doParse
{ "repo_name": "asurve/incubator-systemml", "path": "src/main/java/org/apache/sysml/parser/dml/DMLParserWrapper.java", "license": "apache-2.0", "size": 11469 }
[ "java.io.ByteArrayInputStream", "java.io.FileNotFoundException", "java.io.IOException", "java.io.InputStream", "java.util.Map", "org.antlr.v4.runtime.ANTLRInputStream", "org.antlr.v4.runtime.BailErrorStrategy", "org.antlr.v4.runtime.CommonTokenStream", "org.antlr.v4.runtime.DefaultErrorStrategy", ...
import java.io.ByteArrayInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.util.Map; import org.antlr.v4.runtime.ANTLRInputStream; import org.antlr.v4.runtime.BailErrorStrategy; import org.antlr.v4.runtime.CommonTokenStream; import org.antlr.v4.runtime...
import java.io.*; import java.util.*; import org.antlr.v4.runtime.*; import org.antlr.v4.runtime.atn.*; import org.antlr.v4.runtime.misc.*; import org.antlr.v4.runtime.tree.*; import org.apache.sysml.parser.*; import org.apache.sysml.parser.common.*; import org.apache.sysml.parser.dml.*;
[ "java.io", "java.util", "org.antlr.v4", "org.apache.sysml" ]
java.io; java.util; org.antlr.v4; org.apache.sysml;
1,957,285
private static Node rewriteNodeAttributes(Node node, HashMap<String, String> attributes) { NamedNodeMap nodeAttrs = node.getAttributes(); // Remove all previous attributes while (nodeAttrs.getLength() > 0) { nodeAttrs.removeNamedItem(nodeAttrs.item(0).getNodeName()); } // Set to new attrib...
static Node function(Node node, HashMap<String, String> attributes) { NamedNodeMap nodeAttrs = node.getAttributes(); while (nodeAttrs.getLength() > 0) { nodeAttrs.removeNamedItem(nodeAttrs.item(0).getNodeName()); } for (String key : attributes.keySet()) { ((Element) node).setAttribute(key, attributes.get(key)); } retur...
/** * Replaces the node's attributes with the attributes in the given hashmap * * @param node XML node that should be edited * @param attributes HashMap of strings representing the attributes of a node (key = value) * @return The given node with ONLY the given attributes */
Replaces the node's attributes with the attributes in the given hashmap
rewriteNodeAttributes
{ "repo_name": "davinash/geode", "path": "geode-assembly/geode-assembly-test/src/main/java/org/apache/geode/session/tests/ContainerInstall.java", "license": "apache-2.0", "size": 21510 }
[ "java.util.HashMap", "org.w3c.dom.Element", "org.w3c.dom.NamedNodeMap", "org.w3c.dom.Node" ]
import java.util.HashMap; import org.w3c.dom.Element; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node;
import java.util.*; import org.w3c.dom.*;
[ "java.util", "org.w3c.dom" ]
java.util; org.w3c.dom;
117,500
public OffsetDateTime lastModified() { if (this.lastModified == null) { return null; } return this.lastModified.dateTime(); }
OffsetDateTime function() { if (this.lastModified == null) { return null; } return this.lastModified.dateTime(); }
/** * Get the lastModified value. * * @return the lastModified value. */
Get the lastModified value
lastModified
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/storage/microsoft-azure-storage-blob/src/main/java/com/microsoft/azure/storage/blob/models/ContainerCreateHeaders.java", "license": "mit", "size": 4527 }
[ "java.time.OffsetDateTime" ]
import java.time.OffsetDateTime;
import java.time.*;
[ "java.time" ]
java.time;
2,109,527
public JdbcTemplate createJdbcTemplate(DataSource dataSource);
JdbcTemplate function(DataSource dataSource);
/** * Create the {@link JdbcTemplate} to use in the {@link DbFacade} class. * TODO: Remove this method once we don't use SqlServer anymore, since it's a needed only for SqlServer * Compatibility. * * @param dataSource The Data Source to use for the template. * @return A {@link JdbcTemplate...
Create the <code>JdbcTemplate</code> to use in the <code>DbFacade</code> class. Compatibility
createJdbcTemplate
{ "repo_name": "jtux270/translate", "path": "ovirt/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/dbbroker/DbEngineDialect.java", "license": "gpl-3.0", "size": 2237 }
[ "javax.sql.DataSource", "org.springframework.jdbc.core.JdbcTemplate" ]
import javax.sql.DataSource; import org.springframework.jdbc.core.JdbcTemplate;
import javax.sql.*; import org.springframework.jdbc.core.*;
[ "javax.sql", "org.springframework.jdbc" ]
javax.sql; org.springframework.jdbc;
1,334,005
public static String findGroup(String userName) { String[] command = new String[] {"bash", "-c", "groups " + userName + " | awk '{print $1}'"}; try { return new ShellCommand(command).runWithOutput().getOutput().trim(); } catch (IOException e) { return ""; } }
static String function(String userName) { String[] command = new String[] {"bash", "-c", STR + userName + STR}; try { return new ShellCommand(command).runWithOutput().getOutput().trim(); } catch (IOException e) { return ""; } }
/** * Find the group name of a user. * @param userName user name * @return group name */
Find the group name of a user
findGroup
{ "repo_name": "wwjiang007/alluxio", "path": "hub/server/src/main/java/alluxio/hub/agent/util/file/PrestoCatalogUtils.java", "license": "apache-2.0", "size": 9299 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
413,086
public Builder ingressPoint(ConnectPoint ingressPoint) { this.ingressPoint = ingressPoint; return this; }
Builder function(ConnectPoint ingressPoint) { this.ingressPoint = ingressPoint; return this; }
/** * Sets the ingress point of the point to point intent that will be built. * * @param ingressPoint ingress connect point * @return this builder */
Sets the ingress point of the point to point intent that will be built
ingressPoint
{ "repo_name": "donNewtonAlpha/onos", "path": "core/api/src/main/java/org/onosproject/net/intent/MplsIntent.java", "license": "apache-2.0", "size": 8595 }
[ "org.onosproject.net.ConnectPoint" ]
import org.onosproject.net.ConnectPoint;
import org.onosproject.net.*;
[ "org.onosproject.net" ]
org.onosproject.net;
1,134,301
BitSet[] b = deInterleave(hashToBits(hash)); double lat = bitsToDouble(b[1], LAT_BIT_VALUES); double lng = bitsToDouble(b[0], LNG_BIT_VALUES); return new LatLng(lat, lng); }
BitSet[] b = deInterleave(hashToBits(hash)); double lat = bitsToDouble(b[1], LAT_BIT_VALUES); double lng = bitsToDouble(b[0], LNG_BIT_VALUES); return new LatLng(lat, lng); }
/** * Decodes a geohash string to its LatLng equivalent. * * @param hash * the geohash string of any precision, although LatLng will * still not become <em>more</em> precise than its settings. * @return the decoded point. */
Decodes a geohash string to its LatLng equivalent
decode
{ "repo_name": "zhangzuoqiang/simplelatlng", "path": "src/com/javadocmd/simplelatlng/Geohasher.java", "license": "apache-2.0", "size": 11050 }
[ "java.util.BitSet" ]
import java.util.BitSet;
import java.util.*;
[ "java.util" ]
java.util;
1,639,402
void modifyMeterForFlow(DatapathId dpid, long meterId, long bandwidth) throws SwitchOperationException;
void modifyMeterForFlow(DatapathId dpid, long meterId, long bandwidth) throws SwitchOperationException;
/** * Updates a meter on ingress switch OF_13. * * @param dpid datapath ID of the switch * @param meterId the meter ID * @param bandwidth the bandwidth * @throws SwitchOperationException Switch not found */
Updates a meter on ingress switch OF_13
modifyMeterForFlow
{ "repo_name": "jonvestal/open-kilda", "path": "src-java/floodlight-service/floodlight-modules/src/main/java/org/openkilda/floodlight/switchmanager/ISwitchManager.java", "license": "apache-2.0", "size": 31727 }
[ "org.openkilda.floodlight.error.SwitchOperationException", "org.projectfloodlight.openflow.types.DatapathId" ]
import org.openkilda.floodlight.error.SwitchOperationException; import org.projectfloodlight.openflow.types.DatapathId;
import org.openkilda.floodlight.error.*; import org.projectfloodlight.openflow.types.*;
[ "org.openkilda.floodlight", "org.projectfloodlight.openflow" ]
org.openkilda.floodlight; org.projectfloodlight.openflow;
171,221
public static void setProtocolEngine(Configuration conf, Class<?> protocol, Class<?> engine) { conf.setClass(ENGINE_PROP+"."+protocol.getName(), engine, RpcEngine.class); }
static void function(Configuration conf, Class<?> protocol, Class<?> engine) { conf.setClass(ENGINE_PROP+"."+protocol.getName(), engine, RpcEngine.class); }
/** * Set a protocol to use a non-default RpcEngine. * @param conf configuration to use * @param protocol the protocol interface * @param engine the RpcEngine impl */
Set a protocol to use a non-default RpcEngine
setProtocolEngine
{ "repo_name": "WIgor/hadoop", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/ipc/RPC.java", "license": "apache-2.0", "size": 35827 }
[ "org.apache.hadoop.conf.Configuration" ]
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,895,842
public ChangesetQuery buildChangesetQuery() { String value = tfUrl.getText().trim(); return buildChangesetQuery(value); }
ChangesetQuery function() { String value = tfUrl.getText().trim(); return buildChangesetQuery(value); }
/** * Replies the {@link ChangesetQuery} specified in this panel. null, if no valid changeset query * is specified. * * @return the changeset query */
Replies the <code>ChangesetQuery</code> specified in this panel. null, if no valid changeset query is specified
buildChangesetQuery
{ "repo_name": "CURocketry/Ground_Station_GUI", "path": "src/org/openstreetmap/josm/gui/dialogs/changeset/query/UrlBasedQueryPanel.java", "license": "gpl-3.0", "size": 7127 }
[ "org.openstreetmap.josm.io.ChangesetQuery" ]
import org.openstreetmap.josm.io.ChangesetQuery;
import org.openstreetmap.josm.io.*;
[ "org.openstreetmap.josm" ]
org.openstreetmap.josm;
1,537,205
public void executeTest(GridTestLog4jLogger log, GridKernalContext ctx) throws Exception { counter.incrementAndGet(); MarshallerContextImpl marshallerContext = new MarshallerContextImpl(null); marshallerContext.onMarshallerProcessorStarted(ctx, null); Marshaller...
void function(GridTestLog4jLogger log, GridKernalContext ctx) throws Exception { counter.incrementAndGet(); MarshallerContextImpl marshallerContext = new MarshallerContextImpl(null); marshallerContext.onMarshallerProcessorStarted(ctx, null); MarshallerMappingItem item = new MarshallerMappingItem(JAVA_ID, 1, String.clas...
/** * Executes onUpdated */
Executes onUpdated
executeTest
{ "repo_name": "WilliamDo/ignite", "path": "modules/core/src/test/java/org/apache/ignite/internal/MarshallerContextLockingSelfTest.java", "license": "apache-2.0", "size": 6428 }
[ "java.util.Collection", "java.util.concurrent.ConcurrentLinkedDeque", "org.apache.ignite.internal.processors.marshaller.MarshallerMappingItem", "org.apache.ignite.testframework.junits.logger.GridTestLog4jLogger" ]
import java.util.Collection; import java.util.concurrent.ConcurrentLinkedDeque; import org.apache.ignite.internal.processors.marshaller.MarshallerMappingItem; import org.apache.ignite.testframework.junits.logger.GridTestLog4jLogger;
import java.util.*; import java.util.concurrent.*; import org.apache.ignite.internal.processors.marshaller.*; import org.apache.ignite.testframework.junits.logger.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
2,406,156
private static boolean consumesDanglingElse(Node n) { while (true) { switch (n.getToken()) { case IF: if (n.getChildCount() < 3) { return true; } // This IF node has no else clause. n = n.getLastChild(); continue; case BLOCK: ...
static boolean function(Node n) { while (true) { switch (n.getToken()) { case IF: if (n.getChildCount() < 3) { return true; } n = n.getLastChild(); continue; case BLOCK: if (!n.hasOneChild()) { return false; } n = n.getLastChild(); continue; case WITH: case WHILE: case FOR: case FOR_IN: n = n.getLastChild(); continue; ...
/** * Does a statement consume a 'dangling else'? A statement consumes * a 'dangling else' if an 'else' token following the statement * would be considered by the parser to be part of the statement. */
Does a statement consume a 'dangling else'? A statement consumes a 'dangling else' if an 'else' token following the statement would be considered by the parser to be part of the statement
consumesDanglingElse
{ "repo_name": "vobruba-martin/closure-compiler", "path": "src/com/google/javascript/jscomp/PeepholeMinimizeConditions.java", "license": "apache-2.0", "size": 39176 }
[ "com.google.javascript.rhino.Node" ]
import com.google.javascript.rhino.Node;
import com.google.javascript.rhino.*;
[ "com.google.javascript" ]
com.google.javascript;
270,719
@Override public void setErrorManager(ErrorManager errorManager) { this.errorManager = errorManager; }
void function(ErrorManager errorManager) { this.errorManager = errorManager; }
/** * DealsWithError interface implementation * * @param errorManager */
DealsWithError interface implementation
setErrorManager
{ "repo_name": "fvasquezjatar/fermat-unused", "path": "CBP/plugin/desktop_module/fermat-cbp-plugin-desktop-module-wallet-manager-bitdubai/src/main/java/com/bitdubai/fermat_cbp_plugin/layer/desktop_module/wallet_manager/developer/bitdubai/version_1/WalletManagerDesktopModulePluginRoot.java", "license": "mit", "s...
[ "com.bitdubai.fermat_pip_api.layer.pip_platform_service.error_manager.ErrorManager" ]
import com.bitdubai.fermat_pip_api.layer.pip_platform_service.error_manager.ErrorManager;
import com.bitdubai.fermat_pip_api.layer.pip_platform_service.error_manager.*;
[ "com.bitdubai.fermat_pip_api" ]
com.bitdubai.fermat_pip_api;
630,581