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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
switch (notification.getFeatureID(IFMLModule.class)) {
case CorePackage.IFML_MODULE__PARAMETERS:
case CorePackage.IFML_MODULE__OUT_INTERACTION_FLOWS:
fireNotifyChanged(new ViewerNotification(notification, n... | void function(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(IFMLModule.class)) { case CorePackage.IFML_MODULE__PARAMETERS: case CorePackage.IFML_MODULE__OUT_INTERACTION_FLOWS: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));... | /**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This handles model notifications by calling <code>#updateChildren</code> to update any cached children and by creating a viewer notification, which it passes to <code>#fireNotifyChanged</code>. | notifyChanged | {
"repo_name": "ifml/ifml-editor",
"path": "plugins/IFMLEditor.edit/src/IFML/Core/provider/IFMLModuleItemProvider.java",
"license": "mit",
"size": 7945
} | [
"org.eclipse.emf.common.notify.Notification",
"org.eclipse.emf.edit.provider.ViewerNotification"
] | import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.edit.provider.ViewerNotification; | import org.eclipse.emf.common.notify.*; import org.eclipse.emf.edit.provider.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,225,256 |
public boolean checkUserHasPublishPermission(String queueName, String userName) throws BrokerManagerAdminException {
boolean hasPermission = false;
String queueID = CommonsUtil.getQueueID(queueName);
try {
if (Utils.isAdmin(userName)) {
hasPermission = true;
... | boolean function(String queueName, String userName) throws BrokerManagerAdminException { boolean hasPermission = false; String queueID = CommonsUtil.getQueueID(queueName); try { if (Utils.isAdmin(userName)) { hasPermission = true; } else if (CarbonContext.getThreadLocalCarbonContext().getUserRealm().getAuthorizationMan... | /**
* Check if a user has publishing permission for a queue.
*
* @param queueName The name of the queue
* @param userName The username of the user
* @return true if current user has publishing permissions, false otherwise.
* @throws BrokerManagerAdminException
*/ | Check if a user has publishing permission for a queue | checkUserHasPublishPermission | {
"repo_name": "ThilankaBowala/carbon-business-messaging",
"path": "components/andes/org.wso2.carbon.andes.admin/src/main/java/org/wso2/carbon/andes/admin/AndesAdminService.java",
"license": "apache-2.0",
"size": 57298
} | [
"org.wso2.carbon.andes.admin.internal.Exception",
"org.wso2.carbon.andes.commons.CommonsUtil",
"org.wso2.carbon.andes.core.QueueManagerException",
"org.wso2.carbon.andes.core.internal.util.Utils",
"org.wso2.carbon.context.CarbonContext",
"org.wso2.carbon.user.api.UserStoreException",
"org.wso2.carbon.us... | import org.wso2.carbon.andes.admin.internal.Exception; import org.wso2.carbon.andes.commons.CommonsUtil; import org.wso2.carbon.andes.core.QueueManagerException; import org.wso2.carbon.andes.core.internal.util.Utils; import org.wso2.carbon.context.CarbonContext; import org.wso2.carbon.user.api.UserStoreException; impor... | import org.wso2.carbon.andes.admin.internal.*; import org.wso2.carbon.andes.commons.*; import org.wso2.carbon.andes.core.*; import org.wso2.carbon.andes.core.internal.util.*; import org.wso2.carbon.context.*; import org.wso2.carbon.user.api.*; import org.wso2.carbon.user.core.authorization.*; | [
"org.wso2.carbon"
] | org.wso2.carbon; | 234,583 |
public ServiceFuture<CertificatePolicy> getCertificatePolicyAsync(String vaultBaseUrl, String certificateName, final ServiceCallback<CertificatePolicy> serviceCallback) {
return ServiceFuture.fromResponse(getCertificatePolicyWithServiceResponseAsync(vaultBaseUrl, certificateName), serviceCallback);
} | ServiceFuture<CertificatePolicy> function(String vaultBaseUrl, String certificateName, final ServiceCallback<CertificatePolicy> serviceCallback) { return ServiceFuture.fromResponse(getCertificatePolicyWithServiceResponseAsync(vaultBaseUrl, certificateName), serviceCallback); } | /**
* Lists the policy for a certificate.
*
* @param vaultBaseUrl The vault name, for example https://myvault.vault.azure.net.
* @param certificateName The name of the certificate in a given key vault.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.... | Lists the policy for a certificate | getCertificatePolicyAsync | {
"repo_name": "anudeepsharma/azure-sdk-for-java",
"path": "azure-keyvault/src/main/java/com/microsoft/azure/keyvault/KeyVaultClientImpl.java",
"license": "mit",
"size": 399443
} | [
"com.microsoft.azure.keyvault.models.CertificatePolicy",
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.azure.keyvault.models.CertificatePolicy; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.azure.keyvault.models.*; import com.microsoft.rest.*; | [
"com.microsoft.azure",
"com.microsoft.rest"
] | com.microsoft.azure; com.microsoft.rest; | 2,698,856 |
Connection getConnection(); | Connection getConnection(); | /**
* Creates a new Connection or retrieves an existing one on this thread.
*
* @return A Connection that uses the typical begin(), add(Statement), flush()/commit() then rollback() type
* behaviour.
*/ | Creates a new Connection or retrieves an existing one on this thread | getConnection | {
"repo_name": "inner-loop/java-neo4j-client",
"path": "src/main/java/io/innerloop/neo4j/client/spi/ConnectionFactory.java",
"license": "gpl-2.0",
"size": 483
} | [
"io.innerloop.neo4j.client.Connection"
] | import io.innerloop.neo4j.client.Connection; | import io.innerloop.neo4j.client.*; | [
"io.innerloop.neo4j"
] | io.innerloop.neo4j; | 59,700 |
private void goToUrl(String url) {
Uri uriUrl = Uri.parse(url);
Intent launchBrowser = new Intent(Intent.ACTION_VIEW, uriUrl);
startActivity(launchBrowser);
} | void function(String url) { Uri uriUrl = Uri.parse(url); Intent launchBrowser = new Intent(Intent.ACTION_VIEW, uriUrl); startActivity(launchBrowser); } | /**
* Convenience method for triggering an #Intent.ACTION_VIEW event to an url
* passed as a parameter
*
* @param url : the url to launch the intent with
*/ | Convenience method for triggering an #Intent.ACTION_VIEW event to an url passed as a parameter | goToUrl | {
"repo_name": "Androguide/APKreator",
"path": "APKreator/src/com/androguide/apkreator/MainActivity.java",
"license": "gpl-2.0",
"size": 22030
} | [
"android.content.Intent",
"android.net.Uri"
] | import android.content.Intent; import android.net.Uri; | import android.content.*; import android.net.*; | [
"android.content",
"android.net"
] | android.content; android.net; | 1,764,432 |
InternalVersion getHeadVersionOfNode(NodeId id) throws RepositoryException; | InternalVersion getHeadVersionOfNode(NodeId id) throws RepositoryException; | /**
* Returns the head version of the node with the given id. this is always
* the last of all versions. this only works correctly for liner version
* graphs (i.e. simple versioning)
*
* @param id id of the node to retrieve the version for
* @return the version.
* @throws RepositoryEx... | Returns the head version of the node with the given id. this is always the last of all versions. this only works correctly for liner version graphs (i.e. simple versioning) | getHeadVersionOfNode | {
"repo_name": "Overseas-Student-Living/jackrabbit",
"path": "jackrabbit-core/src/main/java/org/apache/jackrabbit/core/version/InternalVersionManager.java",
"license": "apache-2.0",
"size": 8107
} | [
"javax.jcr.RepositoryException",
"org.apache.jackrabbit.core.id.NodeId"
] | import javax.jcr.RepositoryException; import org.apache.jackrabbit.core.id.NodeId; | import javax.jcr.*; import org.apache.jackrabbit.core.id.*; | [
"javax.jcr",
"org.apache.jackrabbit"
] | javax.jcr; org.apache.jackrabbit; | 1,421,610 |
public static DescriptorExtensionList<AbstractUpload,
AbstractUploadDescriptor> all() {
return checkNotNull(Hudson.getInstance()).<AbstractUpload,
AbstractUploadDescriptor>getDescriptorList(AbstractUpload.class);
} | static DescriptorExtensionList<AbstractUpload, AbstractUploadDescriptor> function() { return checkNotNull(Hudson.getInstance()).<AbstractUpload, AbstractUploadDescriptor>getDescriptorList(AbstractUpload.class); } | /**
* Boilerplate, see:
* https://wiki.jenkins-ci.org/display/JENKINS/Defining+a+new+extension+point
*/ | Boilerplate, see: HREF | all | {
"repo_name": "astroilov/google-storage-plugin",
"path": "src/main/java/com/google/jenkins/plugins/storage/AbstractUpload.java",
"license": "apache-2.0",
"size": 22896
} | [
"com.google.common.base.Preconditions",
"hudson.model.Hudson"
] | import com.google.common.base.Preconditions; import hudson.model.Hudson; | import com.google.common.base.*; import hudson.model.*; | [
"com.google.common",
"hudson.model"
] | com.google.common; hudson.model; | 2,573,955 |
public MMXStatus createTopic(JID from, String appId, TopicAction.CreateRequest rqt)
throws MMXException {
String topic = rqt.getTopicName();
try {
// Note, TopicHelper.checkPathAllowed(topic) should not be called here;
// it is a restriction in the client SDK.
topi... | MMXStatus function(JID from, String appId, TopicAction.CreateRequest rqt) throws MMXException { String topic = rqt.getTopicName(); try { topic = TopicHelper.normalizePath(topic); } catch (IllegalArgumentException e) { throw new MMXException(e.getMessage(), StatusCode.BAD_REQUEST.getCode()); } boolean isValid = TopicHel... | /**
* Create an application-wide or personal topic and create all parent nodes
* if needed.
* @param from
* @param appId
* @param rqt
* @return
* @throws MMXException
*/ | Create an application-wide or personal topic and create all parent nodes if needed | createTopic | {
"repo_name": "sanyaade-iot/message-server",
"path": "server/plugins/mmxmgmt/src/main/java/com/magnet/mmx/server/plugin/mmxmgmt/handler/MMXTopicManager.java",
"license": "apache-2.0",
"size": 74782
} | [
"com.magnet.mmx.protocol.MMXStatus",
"com.magnet.mmx.protocol.TopicAction",
"com.magnet.mmx.server.plugin.mmxmgmt.MMXException",
"com.magnet.mmx.server.plugin.mmxmgmt.util.JIDUtil",
"com.magnet.mmx.util.TopicHelper",
"org.jivesoftware.openfire.pubsub.CollectionNode",
"org.jivesoftware.openfire.pubsub.Le... | import com.magnet.mmx.protocol.MMXStatus; import com.magnet.mmx.protocol.TopicAction; import com.magnet.mmx.server.plugin.mmxmgmt.MMXException; import com.magnet.mmx.server.plugin.mmxmgmt.util.JIDUtil; import com.magnet.mmx.util.TopicHelper; import org.jivesoftware.openfire.pubsub.CollectionNode; import org.jivesoftwar... | import com.magnet.mmx.protocol.*; import com.magnet.mmx.server.plugin.mmxmgmt.*; import com.magnet.mmx.server.plugin.mmxmgmt.util.*; import com.magnet.mmx.util.*; import org.jivesoftware.openfire.pubsub.*; import org.jivesoftware.openfire.pubsub.cluster.*; import org.jivesoftware.util.cache.*; | [
"com.magnet.mmx",
"org.jivesoftware.openfire",
"org.jivesoftware.util"
] | com.magnet.mmx; org.jivesoftware.openfire; org.jivesoftware.util; | 1,947,616 |
public String toJSON() throws JsonProcessingException {
return JSONUtils.INSTANCE.toJSON(this, true);
} | String function() throws JsonProcessingException { return JSONUtils.INSTANCE.toJSON(this, true); } | /**
* Serialize a {@link ProfilerConfig} to a JSON string.
*
* @return The Profiler configuration serialized as a JSON string.
* @throws JsonProcessingException If an error occurs serializing this as a Json string
*/ | Serialize a <code>ProfilerConfig</code> to a JSON string | toJSON | {
"repo_name": "justinleet/incubator-metron",
"path": "metron-platform/metron-common/src/main/java/org/apache/metron/common/configuration/profiler/ProfilerConfig.java",
"license": "apache-2.0",
"size": 5057
} | [
"com.fasterxml.jackson.core.JsonProcessingException",
"org.apache.metron.common.utils.JSONUtils"
] | import com.fasterxml.jackson.core.JsonProcessingException; import org.apache.metron.common.utils.JSONUtils; | import com.fasterxml.jackson.core.*; import org.apache.metron.common.utils.*; | [
"com.fasterxml.jackson",
"org.apache.metron"
] | com.fasterxml.jackson; org.apache.metron; | 2,801,649 |
public InstrumentableDescriptor getParentInstrumentableDescriptor()
{
InstrumentableProxy parent = m_instrumentableProxy.getParentInstrumentableProxy();
if ( parent == null )
{
return null;
}
else
{
return parent.getDescriptor();
}
... | InstrumentableDescriptor function() { InstrumentableProxy parent = m_instrumentableProxy.getParentInstrumentableProxy(); if ( parent == null ) { return null; } else { return parent.getDescriptor(); } } | /**
* Returns the parent InstrumentableDescriptor or null if this is a top
* level instrumentable.
*
* @return The parent InstrumentableDescriptor or null.
*/ | Returns the parent InstrumentableDescriptor or null if this is a top level instrumentable | getParentInstrumentableDescriptor | {
"repo_name": "eva-xuyen/excalibur",
"path": "containerkit/instrument/mgr-impl/src/main/java/org/apache/excalibur/instrument/manager/impl/InstrumentableDescriptorImpl.java",
"license": "apache-2.0",
"size": 7185
} | [
"org.apache.excalibur.instrument.manager.InstrumentableDescriptor"
] | import org.apache.excalibur.instrument.manager.InstrumentableDescriptor; | import org.apache.excalibur.instrument.manager.*; | [
"org.apache.excalibur"
] | org.apache.excalibur; | 2,153,081 |
private void expandParms(Autoaction[] autoactions, Event event) {
boolean expanded = false;
for (Autoaction action : autoactions) {
String strRet = EventUtil.expandParms(action.getContent(), event);
if (strRet != null) {
action.setContent(strRet);
... | void function(Autoaction[] autoactions, Event event) { boolean expanded = false; for (Autoaction action : autoactions) { String strRet = EventUtil.expandParms(action.getContent(), event); if (strRet != null) { action.setContent(strRet); expanded = true; } } if (expanded) { event.setAutoaction(autoactions); } } | /**
* Expand parms in the event autoaction(s)
*/ | Expand parms in the event autoaction(s) | expandParms | {
"repo_name": "rfdrake/opennms",
"path": "opennms-config/src/main/java/org/opennms/netmgt/config/EventExpander.java",
"license": "gpl-2.0",
"size": 29128
} | [
"org.opennms.netmgt.eventd.datablock.EventUtil",
"org.opennms.netmgt.xml.event.Autoaction",
"org.opennms.netmgt.xml.event.Event"
] | import org.opennms.netmgt.eventd.datablock.EventUtil; import org.opennms.netmgt.xml.event.Autoaction; import org.opennms.netmgt.xml.event.Event; | import org.opennms.netmgt.eventd.datablock.*; import org.opennms.netmgt.xml.event.*; | [
"org.opennms.netmgt"
] | org.opennms.netmgt; | 531,154 |
Optional<T> flavor = model.getFlavor(getFlavorName(), getFlavorClass());
if (!flavor.isPresent()) {
throw new PredictorLoadingException(
String.format(
"Attempted to load the %s flavor of the model,"
+ " but the model does not have this flavor.",
getFlav... | Optional<T> flavor = model.getFlavor(getFlavorName(), getFlavorClass()); if (!flavor.isPresent()) { throw new PredictorLoadingException( String.format( STR + STR, getFlavorName())); } Optional<String> rootPath = model.getRootPath(); if (!rootPath.isPresent()) { throw new PredictorLoadingException( STR + STR + STR); } r... | /**
* Loads an MLflow model as a generic predictor that can be used for inference
*
* Throws {@link PredictorLoadingException} for any failure encountered while attempting to load
* the model
*/ | Loads an MLflow model as a generic predictor that can be used for inference Throws <code>PredictorLoadingException</code> for any failure encountered while attempting to load the model | load | {
"repo_name": "mlflow/mlflow",
"path": "mlflow/java/scoring/src/main/java/org/mlflow/LoaderModule.java",
"license": "apache-2.0",
"size": 3439
} | [
"java.util.Optional",
"org.mlflow.sagemaker.PredictorLoadingException"
] | import java.util.Optional; import org.mlflow.sagemaker.PredictorLoadingException; | import java.util.*; import org.mlflow.sagemaker.*; | [
"java.util",
"org.mlflow.sagemaker"
] | java.util; org.mlflow.sagemaker; | 419,666 |
@Override
public void write(int oneByte) throws IOException {
mSingleByteArray[0] = (byte) (0xff & oneByte);
write(mSingleByteArray);
} | void function(int oneByte) throws IOException { mSingleByteArray[0] = (byte) (0xff & oneByte); write(mSingleByteArray); } | /**
* Writes the one bytes out. The input data should be a valid JPEG format.
* After writing, it's Exif header will be replaced by the given header.
*/ | Writes the one bytes out. The input data should be a valid JPEG format. After writing, it's Exif header will be replaced by the given header | write | {
"repo_name": "n2hsu/Nii-Launcher",
"path": "src/com/android/gallery3d/exif/ExifOutputStream.java",
"license": "apache-2.0",
"size": 16945
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 853,056 |
public static void terminalInteraction(Bot bot) {
Timer timer = new Timer();
sort_mode = !shuffle_mode;
// if (sort_mode)
Collections.sort(bot.suggestedCategories, Category.ACTIVATION_COMPARATOR);
ArrayList<Category> topSuggestCategories = new ArrayList<Category>();
f... | static void function(Bot bot) { Timer timer = new Timer(); sort_mode = !shuffle_mode; Collections.sort(bot.suggestedCategories, Category.ACTIVATION_COMPARATOR); ArrayList<Category> topSuggestCategories = new ArrayList<Category>(); for (int i = 0; i < 10000 && i < bot.suggestedCategories.size(); i++) { topSuggestCategor... | /**
* train the bot through a terminal interaction
*
* @param bot the bot to train
*/ | train the bot through a terminal interaction | terminalInteraction | {
"repo_name": "emixgg/sofia-java",
"path": "src/main/java/com/somospnt/sofiabot/ab/AB.java",
"license": "lgpl-3.0",
"size": 13573
} | [
"java.util.ArrayList",
"java.util.Collections"
] | import java.util.ArrayList; import java.util.Collections; | import java.util.*; | [
"java.util"
] | java.util; | 2,024,028 |
public static void setInputPaths(JobConf conf, Path... inputPaths) {
Path path = new Path(conf.getWorkingDirectory(), inputPaths[0]);
StringBuffer str = new StringBuffer(StringUtils.escapeString(path.toString()));
for(int i = 1; i < inputPaths.length;i++) {
str.append(StringUtils.COMMA_STR);
p... | static void function(JobConf conf, Path... inputPaths) { Path path = new Path(conf.getWorkingDirectory(), inputPaths[0]); StringBuffer str = new StringBuffer(StringUtils.escapeString(path.toString())); for(int i = 1; i < inputPaths.length;i++) { str.append(StringUtils.COMMA_STR); path = new Path(conf.getWorkingDirector... | /**
* Set the array of {@link Path}s as the list of inputs
* for the map-reduce job.
*
* @param conf Configuration of the job.
* @param inputPaths the {@link Path}s of the input directories/files
* for the map-reduce job.
*/ | Set the array of <code>Path</code>s as the list of inputs for the map-reduce job | setInputPaths | {
"repo_name": "rekhajoshm/mapreduce-fork",
"path": "src/java/org/apache/hadoop/mapred/FileInputFormat.java",
"license": "apache-2.0",
"size": 22363
} | [
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.util.StringUtils"
] | import org.apache.hadoop.fs.Path; import org.apache.hadoop.util.StringUtils; | import org.apache.hadoop.fs.*; import org.apache.hadoop.util.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,486,907 |
T taskDefinitionKeys(Collection<String> keys); | T taskDefinitionKeys(Collection<String> keys); | /**
* Only select tasks with the given taskDefinitionKeys. The task definition key is the id of the userTask: <userTask id="xxx" .../>
**/ | Only select tasks with the given taskDefinitionKeys. The task definition key is the id of the userTask: <userTask id="xxx" .../> | taskDefinitionKeys | {
"repo_name": "paulstapleton/flowable-engine",
"path": "modules/flowable-task-service-api/src/main/java/org/flowable/task/api/TaskInfoQuery.java",
"license": "apache-2.0",
"size": 30152
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 394,253 |
protected String setUpCallableActor() {
String result;
HashSet<String> variables;
result = null;
m_CallableActor = findCallableActor();
m_Configured = true;
if (m_CallableActor == null) {
if (!m_Optional)
result = "Couldn't find callable actor '" + getCallableName() + "'!";
... | String function() { String result; HashSet<String> variables; result = null; m_CallableActor = findCallableActor(); m_Configured = true; if (m_CallableActor == null) { if (!m_Optional) result = STR + getCallableName() + "'!"; else getLogger().info(STR + getCallableName() + STR); } else { variables = findVariables(m_Cal... | /**
* Configures the callable actor.
*
* @return null if successful, otherwise error message
*/ | Configures the callable actor | setUpCallableActor | {
"repo_name": "automenta/adams-core",
"path": "src/main/java/adams/flow/core/AbstractCallableActor.java",
"license": "gpl-3.0",
"size": 9670
} | [
"java.util.HashSet"
] | import java.util.HashSet; | import java.util.*; | [
"java.util"
] | java.util; | 1,055,989 |
Socket socket = null;
while (serverRunning) {
try {
socket = serverChannel.accept();
socket.setSoTimeout(1);
socket.setTcpNoDelay(true);
appendConnection(getAddress(socket));
Misc.println("Connection recieved fr... | Socket socket = null; while (serverRunning) { try { socket = serverChannel.accept(); socket.setSoTimeout(1); socket.setTcpNoDelay(true); appendConnection(getAddress(socket)); Misc.println(STR + getAddress(socket)); if (checkBanned(getAddress(socket))) { socket.close(); continue; } int id = getFreeId(); if (!getAddress(... | /**
* The thread's process.
* <p>The serverChannel listens for incoming connections, and accepts them.
* The timeout is set to 1 to prevent i/o blocking.
*/ | The thread's process. The serverChannel listens for incoming connections, and accepts them. The timeout is set to 1 to prevent i/o blocking | run | {
"repo_name": "moparisthebest/MoparScape",
"path": "servers/server508/src/main/java/DavidScape/net/SocketListener.java",
"license": "agpl-3.0",
"size": 3568
} | [
"java.net.Socket"
] | import java.net.Socket; | import java.net.*; | [
"java.net"
] | java.net; | 2,037,840 |
void deleteTasks(Query.Builder query); | void deleteTasks(Query.Builder query); | /**
* Deletes all tasks matching a query. Deleted tasks will not be reflected in the snapshot when
* {@link #toSnapshot()} is executed.
*
* @param query Query builder for tasks to delete.
*/ | Deletes all tasks matching a query. Deleted tasks will not be reflected in the snapshot when <code>#toSnapshot()</code> is executed | deleteTasks | {
"repo_name": "apache/aurora",
"path": "src/main/java/org/apache/aurora/scheduler/storage/backup/TemporaryStorage.java",
"license": "apache-2.0",
"size": 4092
} | [
"org.apache.aurora.scheduler.base.Query"
] | import org.apache.aurora.scheduler.base.Query; | import org.apache.aurora.scheduler.base.*; | [
"org.apache.aurora"
] | org.apache.aurora; | 1,861,600 |
@SmallTest
@Feature({"Cronet"})
public void testSimpleGetBufferUpdates() throws Exception {
TestUrlRequestCallback callback = new TestUrlRequestCallback();
callback.setAutoAdvance(false);
// Since the default method is "GET", the expected response body is also
// "GET".
... | @Feature({STR}) void function() throws Exception { TestUrlRequestCallback callback = new TestUrlRequestCallback(); callback.setAutoAdvance(false); UrlRequest.Builder builder = new UrlRequest.Builder(NativeTestServer.getEchoMethodURL(), callback, callback.getExecutor(), mTestFramework.mCronetEngine); UrlRequest urlReque... | /**
* Checks that the buffer is updated correctly, when starting at an offset.
*/ | Checks that the buffer is updated correctly, when starting at an offset | testSimpleGetBufferUpdates | {
"repo_name": "ds-hwang/chromium-crosswalk",
"path": "components/cronet/android/test/javatests/src/org/chromium/net/CronetUrlRequestTest.java",
"license": "bsd-3-clause",
"size": 79493
} | [
"java.nio.ByteBuffer",
"org.chromium.base.test.util.Feature",
"org.chromium.net.TestUrlRequestCallback"
] | import java.nio.ByteBuffer; import org.chromium.base.test.util.Feature; import org.chromium.net.TestUrlRequestCallback; | import java.nio.*; import org.chromium.base.test.util.*; import org.chromium.net.*; | [
"java.nio",
"org.chromium.base",
"org.chromium.net"
] | java.nio; org.chromium.base; org.chromium.net; | 1,646,669 |
EntityQueryResults structuredQuery(Long userId, EntityQuery query) throws NotFoundException; | EntityQueryResults structuredQuery(Long userId, EntityQuery query) throws NotFoundException; | /**
* Structured query.
* @param userId
* @param query
* @return
* @throws NotFoundException
*/ | Structured query | structuredQuery | {
"repo_name": "hhu94/Synapse-Repository-Services",
"path": "services/repository/src/main/java/org/sagebionetworks/repo/web/service/NodeQueryService.java",
"license": "apache-2.0",
"size": 1247
} | [
"org.sagebionetworks.repo.model.entity.query.EntityQuery",
"org.sagebionetworks.repo.model.entity.query.EntityQueryResults",
"org.sagebionetworks.repo.web.NotFoundException"
] | import org.sagebionetworks.repo.model.entity.query.EntityQuery; import org.sagebionetworks.repo.model.entity.query.EntityQueryResults; import org.sagebionetworks.repo.web.NotFoundException; | import org.sagebionetworks.repo.model.entity.query.*; import org.sagebionetworks.repo.web.*; | [
"org.sagebionetworks.repo"
] | org.sagebionetworks.repo; | 599,655 |
boolean containsTask(TaskId id); | boolean containsTask(TaskId id); | /**
* Returns whether the storage contains the given task
* @param id String id of task
* @return true if the storage contains the given state
*/ | Returns whether the storage contains the given task | containsTask | {
"repo_name": "sheldonkhall/grakn",
"path": "grakn-engine/src/main/java/ai/grakn/engine/tasks/manager/TaskStateStorage.java",
"license": "gpl-3.0",
"size": 3814
} | [
"ai.grakn.engine.TaskId"
] | import ai.grakn.engine.TaskId; | import ai.grakn.engine.*; | [
"ai.grakn.engine"
] | ai.grakn.engine; | 1,930,176 |
List<String> values = new ArrayList<>();
try {
Enumeration<URL> resources = classloader.getResources("META-INF/MANIFEST.MF");
while (resources.hasMoreElements()) {
Manifest manifest = new Manifest(resources.nextElement().openStream());
Attributes attributes = manifest.getMainAttributes()... | List<String> values = new ArrayList<>(); try { Enumeration<URL> resources = classloader.getResources(STR); while (resources.hasMoreElements()) { Manifest manifest = new Manifest(resources.nextElement().openStream()); Attributes attributes = manifest.getMainAttributes(); String value = attributes.getValue(key); if (valu... | /**
* Search for a property in all the manifests found in the classloader
*
* @return the values, an empty list if the property is not found.
*/ | Search for a property in all the manifests found in the classloader | getPropertyValues | {
"repo_name": "jblievremont/sonarqube",
"path": "sonar-plugin-api/src/main/java/org/sonar/api/utils/ManifestUtils.java",
"license": "lgpl-3.0",
"size": 2051
} | [
"java.io.IOException",
"java.util.ArrayList",
"java.util.Enumeration",
"java.util.List",
"java.util.jar.Attributes",
"java.util.jar.Manifest"
] | import java.io.IOException; import java.util.ArrayList; import java.util.Enumeration; import java.util.List; import java.util.jar.Attributes; import java.util.jar.Manifest; | import java.io.*; import java.util.*; import java.util.jar.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,478,558 |
private String removeFrontSideAudio(String answerContent) {
String answerFormat = getAnswerFormat();
if (answerFormat.contains("{{FrontSide}}")) { // possible audio removal necessary
String frontSideFormat = mCurrentCard._getQA(false).get("q");
Matcher audioReferences = Sound... | String function(String answerContent) { String answerFormat = getAnswerFormat(); if (answerFormat.contains(STR)) { String frontSideFormat = mCurrentCard._getQA(false).get("q"); Matcher audioReferences = Sound.sSoundPattern.matcher(frontSideFormat); while (audioReferences.find()) { answerContent = answerContent.replaceF... | /**
* Removes first occurrence in answerContent of any audio that is present due to use of
* {{FrontSide}} on the answer.
* @param answerContent The content from which to remove front side audio.
* @return The content stripped of audio due to {{FrontSide}} inclusion.
*/ | Removes first occurrence in answerContent of any audio that is present due to use of {{FrontSide}} on the answer | removeFrontSideAudio | {
"repo_name": "vince-d/Anki-Android",
"path": "AnkiDroid/src/main/java/com/ichi2/anki/AbstractFlashcardViewer.java",
"license": "gpl-3.0",
"size": 106512
} | [
"com.ichi2.libanki.Sound",
"java.util.regex.Matcher",
"java.util.regex.Pattern"
] | import com.ichi2.libanki.Sound; import java.util.regex.Matcher; import java.util.regex.Pattern; | import com.ichi2.libanki.*; import java.util.regex.*; | [
"com.ichi2.libanki",
"java.util"
] | com.ichi2.libanki; java.util; | 158,821 |
String httpUrl = "";
if(PROVIDED_HTTP_URL.isParameterConfigured()) {
// If HTTP URL is provided by system property then it is returned.
httpUrl = PROVIDED_HTTP_URL.getParameterValue();
} else {
// If HTTP URL is not provided by system property then we run tests local... | String httpUrl = ""; if(PROVIDED_HTTP_URL.isParameterConfigured()) { httpUrl = PROVIDED_HTTP_URL.getParameterValue(); } else { httpUrl = getEmbeddedKieServerHttpUrl(); } return httpUrl; } | /**
* Get kie-server URL for HTTP services - like REST.
*
* @return HTTP URL.
*/ | Get kie-server URL for HTTP services - like REST | getKieServerHttpUrl | {
"repo_name": "etirelli/droolsjbpm-integration",
"path": "kie-server-parent/kie-server-tests/kie-server-integ-tests-common/src/main/java/org/kie/server/integrationtests/config/TestConfig.java",
"license": "apache-2.0",
"size": 19484
} | [
"java.net.URL"
] | import java.net.URL; | import java.net.*; | [
"java.net"
] | java.net; | 1,525,197 |
private Point try_neckdown_at_start(IntPoint p_to_corner) {
if (!(this.start_item instanceof net.freerouting.freeroute.board.Pin)) {
return this.prev_corner;
}
net.freerouting.freeroute.board.Pin start_pin = (net.freerouting.freeroute.board.Pin) this.start_item;
if (!star... | Point function(IntPoint p_to_corner) { if (!(this.start_item instanceof net.freerouting.freeroute.board.Pin)) { return this.prev_corner; } net.freerouting.freeroute.board.Pin start_pin = (net.freerouting.freeroute.board.Pin) this.start_item; if (!start_pin.is_on_layer(this.layer_no)) { return this.prev_corner; } FloatP... | /**
* If the routed starts at a pin and the route failed with the normal trace
* width, another try with the smalllest pin width is done. Returns the
* ok_point of the try, which is this.prev_point, if the try failed.
*/ | If the routed starts at a pin and the route failed with the normal trace width, another try with the smalllest pin width is done. Returns the ok_point of the try, which is this.prev_point, if the try failed | try_neckdown_at_start | {
"repo_name": "rbuj/FreeRouting",
"path": "src/main/java/net/freerouting/freeroute/interactive/Route.java",
"license": "gpl-3.0",
"size": 36792
} | [
"net.freerouting.freeroute.board.Item",
"net.freerouting.freeroute.board.Trace",
"net.freerouting.freeroute.datastructures.TimeLimit",
"net.freerouting.freeroute.geometry.planar.FloatPoint",
"net.freerouting.freeroute.geometry.planar.IntPoint",
"net.freerouting.freeroute.geometry.planar.Point"
] | import net.freerouting.freeroute.board.Item; import net.freerouting.freeroute.board.Trace; import net.freerouting.freeroute.datastructures.TimeLimit; import net.freerouting.freeroute.geometry.planar.FloatPoint; import net.freerouting.freeroute.geometry.planar.IntPoint; import net.freerouting.freeroute.geometry.planar.P... | import net.freerouting.freeroute.board.*; import net.freerouting.freeroute.datastructures.*; import net.freerouting.freeroute.geometry.planar.*; | [
"net.freerouting.freeroute"
] | net.freerouting.freeroute; | 1,044,415 |
return obtenerFormatosResult;
}
/**
* Sets the value of the obtenerFormatosResult property.
*
* @param value
* allowed object is
* {@link JAXBElement }{@code <}{@link ArrayOfFormato }{@code >} | return obtenerFormatosResult; } /** * Sets the value of the obtenerFormatosResult property. * * @param value * allowed object is * {@link JAXBElement }{@code <}{@link ArrayOfFormato }{@code >} | /**
* Gets the value of the obtenerFormatosResult property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link ArrayOfFormato }{@code >}
*
*/ | Gets the value of the obtenerFormatosResult property | getObtenerFormatosResult | {
"repo_name": "sidlors/digital-booking",
"path": "digital-booking-ws/src/main/java/mx/com/cinepolis/digital/booking/model/ws/com/cinepolis/api/ObtenerFormatosResponse.java",
"license": "epl-1.0",
"size": 2110
} | [
"javax.xml.bind.JAXBElement",
"mx.com.cinepolis.digital.booking.model.ws.org.datacontract.schemas._2004._07.apicinepolis.ArrayOfFormato"
] | import javax.xml.bind.JAXBElement; import mx.com.cinepolis.digital.booking.model.ws.org.datacontract.schemas._2004._07.apicinepolis.ArrayOfFormato; | import javax.xml.bind.*; import mx.com.cinepolis.digital.booking.model.ws.org.datacontract.schemas.*; | [
"javax.xml",
"mx.com.cinepolis"
] | javax.xml; mx.com.cinepolis; | 768,260 |
private static int findDataValidationTableInsertPos(List<RecordBase> records) {
int i = records.size() - 1;
if (!(records.get(i) instanceof EOFRecord)) {
throw new IllegalStateException("Last sheet record should be EOFRecord");
}
while (i > 0) {
i--;
RecordBase rb = records.get(i);
if (isDVTPrior... | static int function(List<RecordBase> records) { int i = records.size() - 1; if (!(records.get(i) instanceof EOFRecord)) { throw new IllegalStateException(STR); } while (i > 0) { i--; RecordBase rb = records.get(i); if (isDVTPriorRecord(rb)) { Record nextRec = (Record) records.get(i + 1); if (!isDVTSubsequentRecord(next... | /**
* Finds the index where the sheet validations header record should be inserted
* @param records the records for this sheet
*
* + WINDOW2
* o SCL
* o PANE
* oo SELECTION
* o STANDARDWIDTH
* oo MERGEDCELLS
* o LABELRANGES
* o PHONETICPR
* o Conditional Formatting Table
* o Hyperlink Table
... | Finds the index where the sheet validations header record should be inserted | findDataValidationTableInsertPos | {
"repo_name": "tobyclemson/msci-project",
"path": "vendor/poi-3.6/src/java/org/apache/poi/hssf/model/RecordOrderer.java",
"license": "mit",
"size": 14222
} | [
"java.util.List",
"org.apache.poi.hssf.record.EOFRecord",
"org.apache.poi.hssf.record.Record",
"org.apache.poi.hssf.record.RecordBase"
] | import java.util.List; import org.apache.poi.hssf.record.EOFRecord; import org.apache.poi.hssf.record.Record; import org.apache.poi.hssf.record.RecordBase; | import java.util.*; import org.apache.poi.hssf.record.*; | [
"java.util",
"org.apache.poi"
] | java.util; org.apache.poi; | 2,320,351 |
@Override
public void nodeCrashed(GfManagerAgent source, GemFireVM vm) {
// sync to prevent bug 33341 Admin API can double-represent system members
synchronized (this.membershipListenerLock) {
// member has crashed...
SystemMember member = AdminDistributedSystemImpl.this.removeSystemMember(vm.ge... | void function(GfManagerAgent source, GemFireVM vm) { synchronized (this.membershipListenerLock) { SystemMember member = AdminDistributedSystemImpl.this.removeSystemMember(vm.getId()); if (member == null) { return; } SystemMembershipEvent event = new SystemMembershipEventImpl(vm.getId()); for (Iterator iter = this.membe... | /**
* Listener callback for when a member of this DistributedSystem has crashed.
* <p>
* Reacts by removing the member.
*
* @param source the distributed system that fired nodeCrashed
* @param vm the VM that crashed
* @see org.apache.geode.internal.admin.JoinLeaveListener#nodeCrashed
*/ | Listener callback for when a member of this DistributedSystem has crashed. Reacts by removing the member | nodeCrashed | {
"repo_name": "davinash/geode",
"path": "geode-core/src/main/java/org/apache/geode/admin/internal/AdminDistributedSystemImpl.java",
"license": "apache-2.0",
"size": 81159
} | [
"java.util.Iterator",
"org.apache.geode.admin.SystemMember",
"org.apache.geode.admin.SystemMembershipEvent",
"org.apache.geode.admin.SystemMembershipListener",
"org.apache.geode.internal.admin.GemFireVM",
"org.apache.geode.internal.admin.GfManagerAgent"
] | import java.util.Iterator; import org.apache.geode.admin.SystemMember; import org.apache.geode.admin.SystemMembershipEvent; import org.apache.geode.admin.SystemMembershipListener; import org.apache.geode.internal.admin.GemFireVM; import org.apache.geode.internal.admin.GfManagerAgent; | import java.util.*; import org.apache.geode.admin.*; import org.apache.geode.internal.admin.*; | [
"java.util",
"org.apache.geode"
] | java.util; org.apache.geode; | 921,860 |
public static String streamToString(InputStream source) {
DirectInputStreamReader disr = null;
try {
disr = new DirectInputStreamReader(source);
return readerToString(disr);
}
catch (Throwable t) {
throw UniversalRuntimeException.accumulate(t,
"Error converting stream to s... | static String function(InputStream source) { DirectInputStreamReader disr = null; try { disr = new DirectInputStreamReader(source); return readerToString(disr); } catch (Throwable t) { throw UniversalRuntimeException.accumulate(t, STR); } finally { StreamCloseUtil.closeReader(disr); } } | /**
* Produces a String representation of the complete contents of the supplied
* string, assuming it to be encoded in UTF-8. The supplied stream WILL be
* closed.
*
* @param source input source
* @return contents
*/ | Produces a String representation of the complete contents of the supplied string, assuming it to be encoded in UTF-8. The supplied stream WILL be closed | streamToString | {
"repo_name": "ern/rsf",
"path": "rsf-core/ponderutilcore/src/uk/org/ponder/streamutil/StreamCopyUtil.java",
"license": "bsd-3-clause",
"size": 7433
} | [
"java.io.InputStream",
"uk.org.ponder.util.UniversalRuntimeException"
] | import java.io.InputStream; import uk.org.ponder.util.UniversalRuntimeException; | import java.io.*; import uk.org.ponder.util.*; | [
"java.io",
"uk.org.ponder"
] | java.io; uk.org.ponder; | 875,552 |
@ServiceMethod(returns = ReturnType.SINGLE)
Response<ADGroupInner> createWithResponse(String tenantId, GroupCreateParameters parameters, Context context); | @ServiceMethod(returns = ReturnType.SINGLE) Response<ADGroupInner> createWithResponse(String tenantId, GroupCreateParameters parameters, Context context); | /**
* Create a group in the directory.
*
* @param tenantId The tenant ID.
* @param parameters The parameters for the group to create.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws c... | Create a group in the directory | createWithResponse | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanagerhybrid/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/GroupsClient.java",
"license": "mit",
"size": 35920
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.Context",
"com.azure.resourcemanager.authorization.fluent.models.ADGroupInner",
"com.azure.resourcemanager.authorization.models.GroupCreateParameters"
] | 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.authorization.fluent.models.ADGroupInner; import com.azure.resourcemanager.authorization.models.GroupCreateParameter... | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.authorization.fluent.models.*; import com.azure.resourcemanager.authorization.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 905,264 |
public void onIntermediateImageSet(String id, @Nullable INFO imageInfo); | void function(String id, @Nullable INFO imageInfo); | /**
* Called after any intermediate image has been set.
* @param id controller id
* @param imageInfo image info
*/ | Called after any intermediate image has been set | onIntermediateImageSet | {
"repo_name": "ppamorim/fresco",
"path": "drawee/src/main/java/com/facebook/drawee/controller/ControllerListener.java",
"license": "bsd-3-clause",
"size": 2276
} | [
"javax.annotation.Nullable"
] | import javax.annotation.Nullable; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 1,905,554 |
public java.sql.PreparedStatement prepareStatement(String sql,
int resultSetType, int resultSetConcurrency) throws SQLException {
checkClosed();
try {
return PreparedStatementWrapper
.getInstance(this, this.pooledConnection, this.mc.prepareStatement(sql,
resultSetType, resultSetConcurrency));
... | java.sql.PreparedStatement function(String sql, int resultSetType, int resultSetConcurrency) throws SQLException { checkClosed(); try { return PreparedStatementWrapper .getInstance(this, this.pooledConnection, this.mc.prepareStatement(sql, resultSetType, resultSetConcurrency)); } catch (SQLException sqlException) { che... | /**
* Passes call to method on physical connection instance. Notifies listeners
* of any caught exceptions before re-throwing to client.
*
* @see java.sql.Connection#prepareStatement()
*/ | Passes call to method on physical connection instance. Notifies listeners of any caught exceptions before re-throwing to client | prepareStatement | {
"repo_name": "vaisaghvt/gameAnalyzer",
"path": "mysql-connector-java-5.1.22/src/com/mysql/jdbc/jdbc2/optional/ConnectionWrapper.java",
"license": "mit",
"size": 72741
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,301,243 |
private synchronized void refreshLocalContent() {
final File localDir = new File(localContentPath);
bytesUsed = 0;
addDir(localDir);
} | synchronized void function() { final File localDir = new File(localContentPath); bytesUsed = 0; addDir(localDir); } | /**
* Refreshes the local content by reading the file system. This happens only on construction.
*/ | Refreshes the local content by reading the file system. This happens only on construction | refreshLocalContent | {
"repo_name": "ronniemara/android-UniversalMusicPlayer",
"path": "mobile/src/main/java/com/amazonaws/mobile/content/LocalContentCache.java",
"license": "apache-2.0",
"size": 23472
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 160,111 |
public static Version getProvisionalVersionForDimension(int dimension) throws ReaderException {
if (dimension % 4 != 1) {
throw new ReaderException("Dimension must be 1 mod 4");
}
return getVersionForNumber((dimension - 17) >> 2);
}
| static Version function(int dimension) throws ReaderException { if (dimension % 4 != 1) { throw new ReaderException(STR); } return getVersionForNumber((dimension - 17) >> 2); } | /**
* <p>Deduces version information purely from QR Code dimensions.</p>
*
* @param dimension dimension in modules
* @return {@link Version} for a QR Code of that dimension
* @throws ReaderException if dimension is not 1 mod 4
*/ | Deduces version information purely from QR Code dimensions | getProvisionalVersionForDimension | {
"repo_name": "mobilesec/openuat",
"path": "thirdparty/zxing/com/google/zxing/qrcode/decoder/Version.java",
"license": "lgpl-3.0",
"size": 21856
} | [
"com.google.zxing.ReaderException"
] | import com.google.zxing.ReaderException; | import com.google.zxing.*; | [
"com.google.zxing"
] | com.google.zxing; | 2,417,218 |
private String getImportPackageHeader(Project project) {
StringBuffer imports = new StringBuffer();
for (Iterator iter = project.getImports().iterator(); iter.hasNext();) {
PackageSpecification packageImport = (PackageSpecification) iter.next();
if (imports.length() > 0) {
imports.append(",");
}
... | String function(Project project) { StringBuffer imports = new StringBuffer(); for (Iterator iter = project.getImports().iterator(); iter.hasNext();) { PackageSpecification packageImport = (PackageSpecification) iter.next(); if (imports.length() > 0) { imports.append(","); } imports.append(packageImport.getName()); if (... | /**
* Create an Import-Package header from the project imports
* @param project
* @return
*/ | Create an Import-Package header from the project imports | getImportPackageHeader | {
"repo_name": "BeamFoundry/spring-osgi",
"path": "spring-dm/samples/weather/weather-extension/src/main/java/org/springframework/osgi/samples/weather/extension/bundle/MavenBundleManager.java",
"license": "apache-2.0",
"size": 16550
} | [
"java.util.Iterator",
"org.springframework.util.StringUtils"
] | import java.util.Iterator; import org.springframework.util.StringUtils; | import java.util.*; import org.springframework.util.*; | [
"java.util",
"org.springframework.util"
] | java.util; org.springframework.util; | 1,139,437 |
public ServiceFuture<Void> deleteAsync(String resourceGroupName, String integrationAccountName, final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, integrationAccountName), serviceCallback);
} | ServiceFuture<Void> function(String resourceGroupName, String integrationAccountName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, integrationAccountName), serviceCallback); } | /**
* Deletes an integration account.
*
* @param resourceGroupName The resource group name.
* @param integrationAccountName The integration account name.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown ... | Deletes an integration account | deleteAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/logic/mgmt-v2016_06_01/src/main/java/com/microsoft/azure/management/logic/v2016_06_01/implementation/IntegrationAccountsInner.java",
"license": "mit",
"size": 95447
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 2,422,348 |
int findInMemoryBatchIndex(int row) {
int batchIndex = Collections.binarySearch(inMemoryStartRowIndex, row);
batchIndex = batchIndex < 0 ? (batchIndex + 1) * -1 - 1 : batchIndex;
return batchIndex;
} | int findInMemoryBatchIndex(int row) { int batchIndex = Collections.binarySearch(inMemoryStartRowIndex, row); batchIndex = batchIndex < 0 ? (batchIndex + 1) * -1 - 1 : batchIndex; return batchIndex; } | /**
* Finds the batch which contains a given row with binary search. The row reflects a global row
* number within the partition, so as the values in inMemoryStartRowIndex. This method assumes
* that the caller loaded the needed block into memory, and refresh the index via
* refreshInMemoryStartRowIndex.
... | Finds the batch which contains a given row with binary search. The row reflects a global row number within the partition, so as the values in inMemoryStartRowIndex. This method assumes that the caller loaded the needed block into memory, and refresh the index via refreshInMemoryStartRowIndex | findInMemoryBatchIndex | {
"repo_name": "jcamachor/hive",
"path": "ql/src/java/org/apache/hadoop/hive/ql/exec/vector/ptf/VectorPTFGroupBatches.java",
"license": "apache-2.0",
"size": 46005
} | [
"java.util.Collections"
] | import java.util.Collections; | import java.util.*; | [
"java.util"
] | java.util; | 481,329 |
public void testDrawWithNullInfo() {
boolean success = false;
try {
DefaultBoxAndWhiskerCategoryDataset dataset
= new DefaultBoxAndWhiskerCategoryDataset();
dataset.add(new BoxAndWhiskerItem(new Double(1.0), new Double(2.0),
new Double(0.0)... | void function() { boolean success = false; try { DefaultBoxAndWhiskerCategoryDataset dataset = new DefaultBoxAndWhiskerCategoryDataset(); dataset.add(new BoxAndWhiskerItem(new Double(1.0), new Double(2.0), new Double(0.0), new Double(4.0), new Double(0.5), new Double(4.5), new Double(-0.5), new Double(5.5), null), "S1"... | /**
* Draws the chart with a <code>null</code> info object to make sure that
* no exceptions are thrown (particularly by code in the renderer).
*/ | Draws the chart with a <code>null</code> info object to make sure that no exceptions are thrown (particularly by code in the renderer) | testDrawWithNullInfo | {
"repo_name": "ilyessou/jfreechart",
"path": "tests/org/jfree/chart/renderer/category/junit/BoxAndWhiskerRendererTests.java",
"license": "lgpl-2.1",
"size": 21894
} | [
"org.jfree.chart.JFreeChart",
"org.jfree.chart.axis.CategoryAxis",
"org.jfree.chart.axis.NumberAxis",
"org.jfree.chart.plot.CategoryPlot",
"org.jfree.chart.renderer.category.BoxAndWhiskerRenderer",
"org.jfree.data.statistics.BoxAndWhiskerItem",
"org.jfree.data.statistics.DefaultBoxAndWhiskerCategoryData... | import org.jfree.chart.JFreeChart; import org.jfree.chart.axis.CategoryAxis; import org.jfree.chart.axis.NumberAxis; import org.jfree.chart.plot.CategoryPlot; import org.jfree.chart.renderer.category.BoxAndWhiskerRenderer; import org.jfree.data.statistics.BoxAndWhiskerItem; import org.jfree.data.statistics.DefaultBoxAn... | import org.jfree.chart.*; import org.jfree.chart.axis.*; import org.jfree.chart.plot.*; import org.jfree.chart.renderer.category.*; import org.jfree.data.statistics.*; | [
"org.jfree.chart",
"org.jfree.data"
] | org.jfree.chart; org.jfree.data; | 91,717 |
if (portOpened) return;
closeConnection();
jsch.setKnownHosts("./.ssh/known_hosts");
if(ipAddress.startsWith("http://")) {
ipAddress = ipAddress.substring(7);
}
// the string input
URL a = new URL("http://"+ipAddress);
String host = a.getHost();
int port = a.getPort();
String userInfo = a.get... | if (portOpened) return; closeConnection(); jsch.setKnownHosts(STR); if(ipAddress.startsWith(STRhttp: String host = a.getHost(); int port = a.getPort(); String userInfo = a.getUserInfo(); if(port==-1) port = DEFAULT_TCP_PORT; String [] userParts = userInfo.split(":"); session = jsch.getSession(userParts[0], host, port);... | /**
* Open a connection to a device on the net.
* The ipAddress format is a normal URI - name:password@ipaddress:port
* @param ipAddress the network address of the device
*/ | Open a connection to a device on the net. The ipAddress format is a normal URI - name:password@ipaddress:port | openConnection | {
"repo_name": "i-make-robots/Evil-Overlord",
"path": "src/main/java/com/marginallyclever/communications/tcp/TCPConnection.java",
"license": "gpl-2.0",
"size": 5326
} | [
"com.jcraft.jsch.ChannelExec",
"com.marginallyclever.convenience.log.Log",
"java.io.BufferedReader",
"java.io.InputStreamReader",
"java.io.PrintWriter"
] | import com.jcraft.jsch.ChannelExec; import com.marginallyclever.convenience.log.Log; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.PrintWriter; | import com.jcraft.jsch.*; import com.marginallyclever.convenience.log.*; import java.io.*; | [
"com.jcraft.jsch",
"com.marginallyclever.convenience",
"java.io"
] | com.jcraft.jsch; com.marginallyclever.convenience; java.io; | 1,828,612 |
public void removeTouchFocus (EventListener listener, Actor listenerActor, Actor target, int pointer, int button) {
SnapshotArray<TouchFocus> touchFocuses = this.touchFocuses;
for (int i = touchFocuses.size - 1; i >= 0; i--) {
TouchFocus focus = touchFocuses.get(i);
if (focus.listener == listener && focus.... | void function (EventListener listener, Actor listenerActor, Actor target, int pointer, int button) { SnapshotArray<TouchFocus> touchFocuses = this.touchFocuses; for (int i = touchFocuses.size - 1; i >= 0; i--) { TouchFocus focus = touchFocuses.get(i); if (focus.listener == listener && focus.listenerActor == listenerAct... | /** Removes the listener from being notified for all touchDragged and touchUp events for the specified pointer and button. Note
* the listener may never receive a touchUp event if this method is used. */ | Removes the listener from being notified for all touchDragged and touchUp events for the specified pointer and button. Note | removeTouchFocus | {
"repo_name": "czyzby/libgdx",
"path": "gdx/src/com/badlogic/gdx/scenes/scene2d/Stage.java",
"license": "apache-2.0",
"size": 32028
} | [
"com.badlogic.gdx.utils.Pools",
"com.badlogic.gdx.utils.SnapshotArray"
] | import com.badlogic.gdx.utils.Pools; import com.badlogic.gdx.utils.SnapshotArray; | import com.badlogic.gdx.utils.*; | [
"com.badlogic.gdx"
] | com.badlogic.gdx; | 2,220,566 |
public static interface SamePrefixComparator<T> {
public int compareIgnoringPrefix(int commonPrefix,
T left, int loffset, int llength,
T right, int roffset, int rlength);
}
public static class KeyComparator
implements RawComparator<byte []>, SamePrefixComparator<byte[]> {
vo... | static interface SamePrefixComparator<T> { public int function(int commonPrefix, T left, int loffset, int llength, T right, int roffset, int rlength); } public static class KeyComparator implements RawComparator<byte []>, SamePrefixComparator<byte[]> { volatile boolean ignoreTimestamp = false; volatile boolean ignoreTy... | /**
* Compare two keys assuming that the first n bytes are the same.
* @param commonPrefix How many bytes are the same.
*/ | Compare two keys assuming that the first n bytes are the same | compareIgnoringPrefix | {
"repo_name": "matteobertozzi/hbase",
"path": "hbase-common/src/main/java/org/apache/hadoop/hbase/KeyValue.java",
"license": "apache-2.0",
"size": 89740
} | [
"org.apache.hadoop.io.RawComparator"
] | import org.apache.hadoop.io.RawComparator; | import org.apache.hadoop.io.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 963,364 |
public void writeBody(byte[] rawContent) {
if ((state & STS_CLOSING) == 0) {
checkWriter();
writerFlushed = true;
if (writer.checkError()) {
state = ST_CLOSING;
}
if ((state & STS_CLOSING) == 0) {
try {
... | void function(byte[] rawContent) { if ((state & STS_CLOSING) == 0) { checkWriter(); writerFlushed = true; if (writer.checkError()) { state = ST_CLOSING; } if ((state & STS_CLOSING) == 0) { try { socket.getOutputStream().write(rawContent); } catch (IOException e) { LOG.error(e.getMessage(), e); state = ST_CLOSING; } } }... | /**
* Sends the given body to the remote peer and part of the HTTP server response
*
* @param rawContent The body to send to remote peer
*/ | Sends the given body to the remote peer and part of the HTTP server response | writeBody | {
"repo_name": "actility/ong",
"path": "gscl/song.binding.http/src/main/java/com/actility/m2m/http/server/HttpServerTransaction.java",
"license": "gpl-2.0",
"size": 37792
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,427,643 |
protected void sequence_Datatypes(ISerializationContext context, Datatypes semanticObject) {
if (errorAcceptor != null) {
if (transientValues.isValueTransient(semanticObject, FormattertestlanguagePackage.Literals.DATATYPES__VAL1) == ValueTransient.YES)
errorAcceptor.accept(diagnosticProvider.createFeatureVa... | void function(ISerializationContext context, Datatypes semanticObject) { if (errorAcceptor != null) { if (transientValues.isValueTransient(semanticObject, FormattertestlanguagePackage.Literals.DATATYPES__VAL1) == ValueTransient.YES) errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, Forma... | /**
* Contexts:
* Line returns Datatypes
* Datatypes returns Datatypes
*
* Constraint:
* (val1=Datatype1 val2=Datatype2 val3=Datatype3)
*/ | Contexts: Line returns Datatypes Datatypes returns Datatypes Constraint: (val1=Datatype1 val2=Datatype2 val3=Datatype3) | sequence_Datatypes | {
"repo_name": "miklossy/xtext-core",
"path": "org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/parsetree/formatter/serializer/FormatterTestLanguageSemanticSequencer.java",
"license": "epl-1.0",
"size": 14181
} | [
"org.eclipse.xtext.parsetree.formatter.formattertestlanguage.Datatypes",
"org.eclipse.xtext.parsetree.formatter.formattertestlanguage.FormattertestlanguagePackage",
"org.eclipse.xtext.serializer.ISerializationContext",
"org.eclipse.xtext.serializer.acceptor.SequenceFeeder",
"org.eclipse.xtext.serializer.seq... | import org.eclipse.xtext.parsetree.formatter.formattertestlanguage.Datatypes; import org.eclipse.xtext.parsetree.formatter.formattertestlanguage.FormattertestlanguagePackage; import org.eclipse.xtext.serializer.ISerializationContext; import org.eclipse.xtext.serializer.acceptor.SequenceFeeder; import org.eclipse.xtext.... | import org.eclipse.xtext.parsetree.formatter.formattertestlanguage.*; import org.eclipse.xtext.serializer.*; import org.eclipse.xtext.serializer.acceptor.*; import org.eclipse.xtext.serializer.sequencer.*; | [
"org.eclipse.xtext"
] | org.eclipse.xtext; | 1,380,910 |
public List<FeedbackQuestionAttributes> getCopiableFeedbackQuestionsForInstructor(String googleId)
throws EntityDoesNotExistException {
Assumption.assertNotNull(googleId);
return feedbackQuestionsLogic.getCopiableFeedbackQuestionsForInstructor(googleId);
} | List<FeedbackQuestionAttributes> function(String googleId) throws EntityDoesNotExistException { Assumption.assertNotNull(googleId); return feedbackQuestionsLogic.getCopiableFeedbackQuestionsForInstructor(googleId); } | /**
* Gets all copiable questions for an instructor<br>
* Returns an empty list if they are no questions
* for the session.
* Preconditions: <br>
* * All parameters are non-null.
*/ | Gets all copiable questions for an instructor Returns an empty list if they are no questions for the session. Preconditions: All parameters are non-null | getCopiableFeedbackQuestionsForInstructor | {
"repo_name": "thenaesh/teammates",
"path": "src/main/java/teammates/logic/api/Logic.java",
"license": "gpl-2.0",
"size": 87996
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 602,713 |
Observable<Void> putDateTimeRfc1123ValidAsync(Map<String, DateTime> arrayBody); | Observable<Void> putDateTimeRfc1123ValidAsync(Map<String, DateTime> arrayBody); | /**
* Set dictionary value empty {"0": "Fri, 01 Dec 2000 00:00:01 GMT", "1": "Wed, 02 Jan 1980 00:11:35 GMT", "2": "Wed, 12 Oct 1492 10:15:01 GMT"}.
*
* @param arrayBody the Map<String, DateTimeRfc1123> value
* @return the {@link ServiceResponse} object if successful.
*/ | Set dictionary value empty {"0": "Fri, 01 Dec 2000 00:00:01 GMT", "1": "Wed, 02 Jan 1980 00:11:35 GMT", "2": "Wed, 12 Oct 1492 10:15:01 GMT"} | putDateTimeRfc1123ValidAsync | {
"repo_name": "anudeepsharma/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/bodydictionary/Dictionarys.java",
"license": "mit",
"size": 79030
} | [
"java.util.Map",
"org.joda.time.DateTime"
] | import java.util.Map; import org.joda.time.DateTime; | import java.util.*; import org.joda.time.*; | [
"java.util",
"org.joda.time"
] | java.util; org.joda.time; | 788,833 |
public List<UpdateListener> getUpdateListeners() {
return this.updateListeners;
}
| List<UpdateListener> function() { return this.updateListeners; } | /**
* Returns the list of registered update listeners
* @return the list of registered update listeners
*/ | Returns the list of registered update listeners | getUpdateListeners | {
"repo_name": "davidsan/one",
"path": "core/SimScenario.java",
"license": "gpl-3.0",
"size": 12941
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 62,212 |
public void setBehindContentView(View view, LayoutParams layoutParams); | void function(View view, LayoutParams layoutParams); | /**
* Set the behind view content to an explicit view. This view is placed directly into the behind view 's view hierarchy.
* It can itself be a complex view hierarchy.
*
* @param view The desired content to display.
* @param layoutParams Layout parameters for the view.
*/ | Set the behind view content to an explicit view. This view is placed directly into the behind view 's view hierarchy. It can itself be a complex view hierarchy | setBehindContentView | {
"repo_name": "liyuanwei55/CityNewsApp2",
"path": "智慧北京/src/com/jeremyfeinstein/slidingmenu/lib/app/SlidingActivityBase.java",
"license": "mit",
"size": 2408
} | [
"android.view.View",
"android.view.ViewGroup"
] | import android.view.View; import android.view.ViewGroup; | import android.view.*; | [
"android.view"
] | android.view; | 1,319,711 |
public Vector getProperty(String propertyName) {
if (rulesList.size() == 0) {
return getValue(propertyName);
} else {
if (checkPropertyAllowed(propertyName)) {
return getValue(propertyName);
} else {
return null;
}
... | Vector function(String propertyName) { if (rulesList.size() == 0) { return getValue(propertyName); } else { if (checkPropertyAllowed(propertyName)) { return getValue(propertyName); } else { return null; } } } | /**
* Retrieves the property specified, as long as it exists in one of the current rulesets
*
* @param propertyName the name of the property being retrieved
* @return The String value of the property specified if it exists, and is the current ruleset, if one exists.
* null if the property is de... | Retrieves the property specified, as long as it exists in one of the current rulesets | getProperty | {
"repo_name": "dimagi/javarosa",
"path": "javarosa/core/src/main/java/org/javarosa/core/services/PropertyManager.java",
"license": "apache-2.0",
"size": 10677
} | [
"java.util.Vector"
] | import java.util.Vector; | import java.util.*; | [
"java.util"
] | java.util; | 1,005,432 |
public Type getSuccessType() {
return successType;
} | Type function() { return successType; } | /**
* The type declared by either the interface method return type or the generic type of the
* supplied {@link Callback} parameter.
*/ | The type declared by either the interface method return type or the generic type of the supplied <code>Callback</code> parameter | getSuccessType | {
"repo_name": "segmentio/retrofit",
"path": "retrofit/src/main/java/retrofit/RetrofitError.java",
"license": "apache-2.0",
"size": 4588
} | [
"java.lang.reflect.Type"
] | import java.lang.reflect.Type; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 1,182,616 |
public Drawer buildForFragment() {
if (mUsed) {
throw new RuntimeException("you must not reuse a DrawerBuilder builder");
}
if (mActivity == null) {
throw new RuntimeException("please pass an activity");
}
if (mRootView == null) {
throw new... | Drawer function() { if (mUsed) { throw new RuntimeException(STR); } if (mActivity == null) { throw new RuntimeException(STR); } if (mRootView == null) { throw new RuntimeException(STR); } mUsed = true; if (mDrawerLayout == null) { withDrawerLayout(-1); } View originalContentView = mRootView.getChildAt(0); boolean alrea... | /**
* Build and add the DrawerBuilder to your activity
*
* @return
*/ | Build and add the DrawerBuilder to your activity | buildForFragment | {
"repo_name": "amithub/Material-Drawer-Sample",
"path": "library/src/main/java/com/mikepenz/materialdrawer/DrawerBuilder.java",
"license": "apache-2.0",
"size": 62341
} | [
"android.view.View",
"android.view.ViewGroup",
"android.widget.FrameLayout"
] | import android.view.View; import android.view.ViewGroup; import android.widget.FrameLayout; | import android.view.*; import android.widget.*; | [
"android.view",
"android.widget"
] | android.view; android.widget; | 1,908,606 |
int insertSelective(Survey record); | int insertSelective(Survey record); | /**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table survey
*
* @mbggenerated Thu Feb 18 09:02:10 CST 2016
*/ | This method was generated by MyBatis Generator. This method corresponds to the database table survey | insertSelective | {
"repo_name": "smartgear/timeholder",
"path": "trymvc/src/main/java/com/toy/data/generate/SurveyMapper.java",
"license": "mit",
"size": 2898
} | [
"com.toy.model.generate.Survey"
] | import com.toy.model.generate.Survey; | import com.toy.model.generate.*; | [
"com.toy.model"
] | com.toy.model; | 1,596,005 |
protected IssueCommentsFeed getCommentsFeed(URL feedUrl)
throws IOException, ServiceException {
return service.getFeed(feedUrl, IssueCommentsFeed.class);
} | IssueCommentsFeed function(URL feedUrl) throws IOException, ServiceException { return service.getFeed(feedUrl, IssueCommentsFeed.class); } | /**
* Retrieves comments feed.
*
* @param feedUrl comments feed URL to retrieve
* @throws IOException if there is a problem communicating with the server
* @throws ServiceException if the service is unable to handle the request
*/ | Retrieves comments feed | getCommentsFeed | {
"repo_name": "athibanraj/gdata-java-client",
"path": "java/sample/projecthosting/ProjectHostingClient.java",
"license": "apache-2.0",
"size": 19161
} | [
"com.google.gdata.data.projecthosting.IssueCommentsFeed",
"com.google.gdata.util.ServiceException",
"java.io.IOException"
] | import com.google.gdata.data.projecthosting.IssueCommentsFeed; import com.google.gdata.util.ServiceException; import java.io.IOException; | import com.google.gdata.data.projecthosting.*; import com.google.gdata.util.*; import java.io.*; | [
"com.google.gdata",
"java.io"
] | com.google.gdata; java.io; | 593,996 |
public static int choosePort() {
return choosePorts(1)[0];
}
private int numBrokers;
private boolean setupRestApp;
private String compatibilityType;
// ZK Config
protected EmbeddedZookeeper zookeeper;
protected String zkConnect;
protected ZkClient zkClient;
protected ZkUtils zkUtils;
protect... | static int function() { return choosePorts(1)[0]; } private int numBrokers; private boolean setupRestApp; private String compatibilityType; protected EmbeddedZookeeper zookeeper; protected String zkConnect; protected ZkClient zkClient; protected ZkUtils zkUtils; protected int zkConnectionTimeout = 6000; protected int z... | /**
* Choose an available port
*/ | Choose an available port | choosePort | {
"repo_name": "yushuyao/schema-registry",
"path": "core/src/test/java/io/confluent/kafka/schemaregistry/ClusterTestHarness.java",
"license": "apache-2.0",
"size": 5869
} | [
"io.confluent.kafka.schemaregistry.avro.AvroCompatibilityLevel",
"java.util.List"
] | import io.confluent.kafka.schemaregistry.avro.AvroCompatibilityLevel; import java.util.List; | import io.confluent.kafka.schemaregistry.avro.*; import java.util.*; | [
"io.confluent.kafka",
"java.util"
] | io.confluent.kafka; java.util; | 20,005 |
final void close() {
builder.close();
}
}
private class HeadersBuilder {
private ByteBuf headerBlock; | final void close() { builder.close(); } } private class HeadersBuilder { private ByteBuf headerBlock; | /**
* Free any allocated resources.
*/ | Free any allocated resources | close | {
"repo_name": "virur7/netty",
"path": "codec-http2/src/main/java/io/netty/handler/codec/http2/DefaultHttp2FrameReader.java",
"license": "apache-2.0",
"size": 29958
} | [
"io.netty.buffer.ByteBuf"
] | import io.netty.buffer.ByteBuf; | import io.netty.buffer.*; | [
"io.netty.buffer"
] | io.netty.buffer; | 58,705 |
public NNClassificationModel withDistanceMeasure(DistanceMeasure distanceMeasure) {
this.distanceMeasure = distanceMeasure;
return this;
} | NNClassificationModel function(DistanceMeasure distanceMeasure) { this.distanceMeasure = distanceMeasure; return this; } | /**
* Set up parameter of the NN model.
* @param distanceMeasure Distance measure.
* @return Model.
*/ | Set up parameter of the NN model | withDistanceMeasure | {
"repo_name": "amirakhmedov/ignite",
"path": "modules/ml/src/main/java/org/apache/ignite/ml/knn/NNClassificationModel.java",
"license": "apache-2.0",
"size": 7953
} | [
"org.apache.ignite.ml.math.distances.DistanceMeasure"
] | import org.apache.ignite.ml.math.distances.DistanceMeasure; | import org.apache.ignite.ml.math.distances.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 2,453,158 |
public static String getHLogDirectoryName(HServerInfo info) {
return getHLogDirectoryName(info.getServerName());
} | static String function(HServerInfo info) { return getHLogDirectoryName(info.getServerName()); } | /**
* Construct the HLog directory name
*
* @param info HServerInfo for server
* @return the HLog directory name
*/ | Construct the HLog directory name | getHLogDirectoryName | {
"repo_name": "ryanobjc/hbase",
"path": "src/main/java/org/apache/hadoop/hbase/regionserver/wal/HLog.java",
"license": "apache-2.0",
"size": 58414
} | [
"org.apache.hadoop.hbase.HServerInfo"
] | import org.apache.hadoop.hbase.HServerInfo; | import org.apache.hadoop.hbase.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,309,063 |
private Void write() {
Table table = null;
TableDescriptor tableDesc = null;
try {
table = connection.getTable(region.getTable());
tableDesc = table.getDescriptor();
byte[] rowToCheck = region.getStartKey();
if (rowToCheck.length == 0) {
rowToCheck = new b... | Void function() { Table table = null; TableDescriptor tableDesc = null; try { table = connection.getTable(region.getTable()); tableDesc = table.getDescriptor(); byte[] rowToCheck = region.getStartKey(); if (rowToCheck.length == 0) { rowToCheck = new byte[]{0x0}; } int writeValueSize = connection.getConfiguration().getI... | /**
* Check writes for the canary table
*/ | Check writes for the canary table | write | {
"repo_name": "HubSpot/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/tool/CanaryTool.java",
"license": "apache-2.0",
"size": 73551
} | [
"java.io.IOException",
"java.util.concurrent.Callable",
"java.util.concurrent.atomic.AtomicLong",
"org.apache.hadoop.hbase.HConstants",
"org.apache.hadoop.hbase.client.ColumnFamilyDescriptor",
"org.apache.hadoop.hbase.client.Connection",
"org.apache.hadoop.hbase.client.Put",
"org.apache.hadoop.hbase.c... | import java.io.IOException; import java.util.concurrent.Callable; import java.util.concurrent.atomic.AtomicLong; import org.apache.hadoop.hbase.HConstants; import org.apache.hadoop.hbase.client.ColumnFamilyDescriptor; import org.apache.hadoop.hbase.client.Connection; import org.apache.hadoop.hbase.client.Put; import or... | import java.io.*; import java.util.concurrent.*; import java.util.concurrent.atomic.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.util.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 2,500,155 |
public void setAccessibleInfo(Component c, String uiKey) {
setAccessibleInfo(c.getAccessibleContext(), uiKey);
} | void function(Component c, String uiKey) { setAccessibleInfo(c.getAccessibleContext(), uiKey); } | /**
* Sets the accessible name and description for the given
* component.
* @param c the component object to modify
* @param uiKey the base name of the resource to be used
* @see #setAccessibleInfo(AccessibleContext,String)
*/ | Sets the accessible name and description for the given component | setAccessibleInfo | {
"repo_name": "Distrotech/icedtea6-1.12",
"path": "src/jtreg/com/sun/javatest/tool/UIFactory.java",
"license": "gpl-2.0",
"size": 117735
} | [
"java.awt.Component"
] | import java.awt.Component; | import java.awt.*; | [
"java.awt"
] | java.awt; | 931,063 |
public static void deleteProcessDefinition(long processDefinitionId) throws WorkflowException {
log.debug("deleteProcessDefinition({})", processDefinitionId);
JbpmContext jbpmContext = JBPMUtils.getConfig().createJbpmContext();
if (Config.SYSTEM_READONLY) {
throw new WorkflowExc... | static void function(long processDefinitionId) throws WorkflowException { log.debug(STR, processDefinitionId); JbpmContext jbpmContext = JBPMUtils.getConfig().createJbpmContext(); if (Config.SYSTEM_READONLY) { throw new WorkflowException(STR); } try { GraphSession graphSession = jbpmContext.getGraphSession(); graphSess... | /**
* Delete Process Definition
*/ | Delete Process Definition | deleteProcessDefinition | {
"repo_name": "codelibs/n2dms",
"path": "src/main/java/com/openkm/module/common/CommonWorkflowModule.java",
"license": "gpl-2.0",
"size": 39627
} | [
"com.openkm.core.Config",
"com.openkm.core.WorkflowException",
"com.openkm.util.JBPMUtils",
"org.jbpm.JbpmContext",
"org.jbpm.JbpmException",
"org.jbpm.db.GraphSession"
] | import com.openkm.core.Config; import com.openkm.core.WorkflowException; import com.openkm.util.JBPMUtils; import org.jbpm.JbpmContext; import org.jbpm.JbpmException; import org.jbpm.db.GraphSession; | import com.openkm.core.*; import com.openkm.util.*; import org.jbpm.*; import org.jbpm.db.*; | [
"com.openkm.core",
"com.openkm.util",
"org.jbpm",
"org.jbpm.db"
] | com.openkm.core; com.openkm.util; org.jbpm; org.jbpm.db; | 1,885,263 |
public MediaPlayer.OnPreparedListener getOnPreparedListener() {
return preparedListener;
} | MediaPlayer.OnPreparedListener function() { return preparedListener; } | /**
* Non-Android accessor.
*
* @return On prepared listener.
*/ | Non-Android accessor | getOnPreparedListener | {
"repo_name": "zbsz/robolectric",
"path": "robolectric-shadows/shadows-core/src/main/java/org/robolectric/shadows/ShadowVideoView.java",
"license": "mit",
"size": 3625
} | [
"android.media.MediaPlayer"
] | import android.media.MediaPlayer; | import android.media.*; | [
"android.media"
] | android.media; | 1,658,266 |
private void createEditBtnGroup( Composite rightComposite )
{
Composite btnComposite = new Composite( rightComposite, SWT.NONE );
GridLayout layout = new GridLayout( );
layout.verticalSpacing = 5;
btnComposite.setLayout( layout );
btnMoveUp = new Button( btnComposite, SWT.NONE );
btnMoveUp.setText( Mes... | void function( Composite rightComposite ) { Composite btnComposite = new Composite( rightComposite, SWT.NONE ); GridLayout layout = new GridLayout( ); layout.verticalSpacing = 5; btnComposite.setLayout( layout ); btnMoveUp = new Button( btnComposite, SWT.NONE ); btnMoveUp.setText( Messages.getString( STR ) ); btnMoveUp... | /**
* Create the right button group that displays the UP,DOWN and REMOVE
* buttons
*
* @param rightComposite
*/ | Create the right button group that displays the UP,DOWN and REMOVE buttons | createEditBtnGroup | {
"repo_name": "sguan-actuate/birt",
"path": "data/org.eclipse.birt.report.data.oda.excel.ui/src/org/eclipse/birt/report/data/oda/excel/ui/wizards/ExcelFileSelectionWizardPage.java",
"license": "epl-1.0",
"size": 56907
} | [
"org.eclipse.birt.report.data.oda.excel.ui.i18n.Messages",
"org.eclipse.swt.events.SelectionAdapter",
"org.eclipse.swt.layout.GridLayout",
"org.eclipse.swt.widgets.Button",
"org.eclipse.swt.widgets.Composite"
] | import org.eclipse.birt.report.data.oda.excel.ui.i18n.Messages; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; | import org.eclipse.birt.report.data.oda.excel.ui.i18n.*; import org.eclipse.swt.events.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; | [
"org.eclipse.birt",
"org.eclipse.swt"
] | org.eclipse.birt; org.eclipse.swt; | 1,749,945 |
UserPermissionsList getUserPermissionsList(UserInfo.Username userID); | UserPermissionsList getUserPermissionsList(UserInfo.Username userID); | /**
* Returns a list of user permissions for the given user name (ID)
*
* @param userID Username
* @return list of user permissions if found, empty list otherwise
*/ | Returns a list of user permissions for the given user name (ID) | getUserPermissionsList | {
"repo_name": "intuit/wasabi",
"path": "modules/authorization/src/main/java/com/intuit/wasabi/authorization/Authorization.java",
"license": "apache-2.0",
"size": 5528
} | [
"com.intuit.wasabi.authenticationobjects.UserInfo",
"com.intuit.wasabi.authorizationobjects.UserPermissionsList"
] | import com.intuit.wasabi.authenticationobjects.UserInfo; import com.intuit.wasabi.authorizationobjects.UserPermissionsList; | import com.intuit.wasabi.authenticationobjects.*; import com.intuit.wasabi.authorizationobjects.*; | [
"com.intuit.wasabi"
] | com.intuit.wasabi; | 1,752,913 |
protected Resource getResourceByPath(String path) {
return new ClassPathContextResource(path, getClassLoader());
}
protected static class ClassPathContextResource extends ClassPathResource implements ContextResource {
public ClassPathContextResource(String path, ClassLoader classLoade... | Resource function(String path) { return new ClassPathContextResource(path, getClassLoader()); } protected static class ClassPathContextResource extends ClassPathResource implements ContextResource { public ClassPathContextResource(String path, ClassLoader classLoader) { super(path, classLoader); } | /**
* Return a Resource handle for the resource at the given path.
* <p>
* The default implementation supports class path locations. This should be
* appropriate for standalone implementations but can be overridden, e.g.
* for implementations targeted at a Servlet container.
*
* @par... | Return a Resource handle for the resource at the given path. The default implementation supports class path locations. This should be appropriate for standalone implementations but can be overridden, e.g. for implementations targeted at a Servlet container | getResourceByPath | {
"repo_name": "HotswapProjects/HotswapAgent",
"path": "hotswap-agent-core/src/main/java/org/hotswap/agent/util/spring/io/loader/DefaultResourceLoader.java",
"license": "gpl-2.0",
"size": 5793
} | [
"org.hotswap.agent.util.spring.io.resource.ClassPathResource",
"org.hotswap.agent.util.spring.io.resource.ContextResource",
"org.hotswap.agent.util.spring.io.resource.Resource"
] | import org.hotswap.agent.util.spring.io.resource.ClassPathResource; import org.hotswap.agent.util.spring.io.resource.ContextResource; import org.hotswap.agent.util.spring.io.resource.Resource; | import org.hotswap.agent.util.spring.io.resource.*; | [
"org.hotswap.agent"
] | org.hotswap.agent; | 2,092,444 |
public void endDTD()
throws SAXException {
if (lexicalHandler != null) {
lexicalHandler.endDTD();
}
} | void function() throws SAXException { if (lexicalHandler != null) { lexicalHandler.endDTD(); } } | /**
* Sends end of DTD.
*
* @exception org.xml.sax.SAXException If a filter
* further down the chain raises an exception.
* @see org.xml.sax.ext.LexicalHandler#endDTD
*/ | Sends end of DTD | endDTD | {
"repo_name": "Baltasarq/Gia",
"path": "src/JDom/samples/sax/XMLReaderBase.java",
"license": "mit",
"size": 39286
} | [
"org.xml.sax.SAXException"
] | import org.xml.sax.SAXException; | import org.xml.sax.*; | [
"org.xml.sax"
] | org.xml.sax; | 821,235 |
private void likeEscape() throws SQLException {
copyLiteral("escape ");
skipWhiteSpace();
if (in[s] == '\'' || in[s] == '"') {
copyString();
} else {
mustbe('\'', true);
}
skipWhiteSpace();
} | void function() throws SQLException { copyLiteral(STR); skipWhiteSpace(); if (in[s] == '\'' in[s] == '"') { copyString(); } else { mustbe('\'', true); } skipWhiteSpace(); } | /**
* Processes the JDBC escape {escape 'X'}.
*
* @throws SQLException
*/ | Processes the JDBC escape {escape 'X'} | likeEscape | {
"repo_name": "kassak/jtds",
"path": "src/main/net/sourceforge/jtds/jdbc/SQLParser.java",
"license": "lgpl-2.1",
"size": 43303
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,551,230 |
private PropertyContentProvider getPropertyContentProvider(String pathToProperties) {
if (propertyContentProvider==null) {
propertyContentProvider = new PropertyContentProvider(new File(pathToProperties));
try {
propertyContentProvider.checkAndProvideFullPropertyContent();
} catch (Exception ex) ... | PropertyContentProvider function(String pathToProperties) { if (propertyContentProvider==null) { propertyContentProvider = new PropertyContentProvider(new File(pathToProperties)); try { propertyContentProvider.checkAndProvideFullPropertyContent(); } catch (Exception ex) { ex.printStackTrace(); } } return propertyConten... | /**
* Returns the property content provider.
* @param pathToProperties the path to properties. May be <code>null</code> in case that PropertyContentProvider is already initiated.
* @return the property content provider
*/ | Returns the property content provider | getPropertyContentProvider | {
"repo_name": "EnFlexIT/AgentWorkbench",
"path": "eclipseProjects/org.agentgui/bundles/org.agentgui.core/src/agentgui/core/config/GlobalInfo.java",
"license": "lgpl-2.1",
"size": 78561
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 53,461 |
@Override
public Object invoke( Object proxy, Method method, Object[] args ) throws Throwable {
try {
String methodName = method.getName();
if ( "getConnection".equals( methodName ) ) {
// Return the connection
return c;
} else if ( "getIdentifierQuoteS... | Object function( Object proxy, Method method, Object[] args ) throws Throwable { try { String methodName = method.getName(); if ( STR.equals( methodName ) ) { return c; } else if ( STR.equals( methodName ) ) { return getIdentifierQuoteString(); } Object o = method.invoke( t, args ); if ( o instanceof ResultSet ) { Resu... | /**
* Intercepts methods called on the DatabaseMetaData object to possibly perform alternate processing.
*
* @param proxy the proxy
* @param method the method
* @param args the args
* @return the object
* @throws Throwable the throwable
*/ | Intercepts methods called on the DatabaseMetaData object to possibly perform alternate processing | invoke | {
"repo_name": "mattyb149/pdi-drill-jdbc",
"path": "src/main/java/org/pentaho/di/plugins/database/drill/DriverProxyInvocationChain.java",
"license": "apache-2.0",
"size": 27115
} | [
"java.lang.reflect.InvocationTargetException",
"java.lang.reflect.Method",
"java.lang.reflect.Proxy",
"java.sql.ResultSet"
] | import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.lang.reflect.Proxy; import java.sql.ResultSet; | import java.lang.reflect.*; import java.sql.*; | [
"java.lang",
"java.sql"
] | java.lang; java.sql; | 512,131 |
public Set<HostAndPort> getClusterNodes(){
Set<HostAndPort> jedisClusterNodes = new HashSet<HostAndPort>();
String redisList = getHosts();
if (redisList.isEmpty() || redisList==null) {
log.error("Error hosts list is null");
return null;
}
String[] hosts = redisList.split(",");
for (i... | Set<HostAndPort> function(){ Set<HostAndPort> jedisClusterNodes = new HashSet<HostAndPort>(); String redisList = getHosts(); if (redisList.isEmpty() redisList==null) { log.error(STR); return null; } String[] hosts = redisList.split(","); for (int i = 0; i < hosts.length; i++) { String host = hosts[i].split(":")[0]; Str... | /**
* Get redis host and port config
* @return
*/ | Get redis host and port config | getClusterNodes | {
"repo_name": "inps/trsm",
"path": "trsm/src/main/java/cn/inps/trsm/RedisSessionManager.java",
"license": "apache-2.0",
"size": 28988
} | [
"java.util.HashSet",
"java.util.Set",
"redis.clients.jedis.HostAndPort"
] | import java.util.HashSet; import java.util.Set; import redis.clients.jedis.HostAndPort; | import java.util.*; import redis.clients.jedis.*; | [
"java.util",
"redis.clients.jedis"
] | java.util; redis.clients.jedis; | 2,573,233 |
public static MozuClient<com.mozu.api.contracts.commerceruntime.wishlists.WishlistItemCollection> getWishlistItemsClient(String wishlistId, Integer startIndex, Integer pageSize, String sortBy, String filter, String responseFields) throws Exception
{
MozuUrl url = com.mozu.api.urls.commerce.wishlists.WishlistIte... | static MozuClient<com.mozu.api.contracts.commerceruntime.wishlists.WishlistItemCollection> function(String wishlistId, Integer startIndex, Integer pageSize, String sortBy, String filter, String responseFields) throws Exception { MozuUrl url = com.mozu.api.urls.commerce.wishlists.WishlistItemUrl.getWishlistItemsUrl(filt... | /**
*
* <p><pre><code>
* MozuClient<com.mozu.api.contracts.commerceruntime.wishlists.WishlistItemCollection> mozuClient=GetWishlistItemsClient( wishlistId, startIndex, pageSize, sortBy, filter, responseFields);
* client.setBaseAddress(url);
* client.executeRequest();
* WishlistItemCollection wis... | <code><code> MozuClient mozuClient=GetWishlistItemsClient( wishlistId, startIndex, pageSize, sortBy, filter, responseFields); client.setBaseAddress(url); client.executeRequest(); WishlistItemCollection wishlistItemCollection = client.Result(); </code></code> | getWishlistItemsClient | {
"repo_name": "Mozu/mozu-java",
"path": "mozu-java-core/src/main/java/com/mozu/api/clients/commerce/wishlists/WishlistItemClient.java",
"license": "mit",
"size": 21872
} | [
"com.mozu.api.MozuClient",
"com.mozu.api.MozuClientFactory",
"com.mozu.api.MozuUrl"
] | import com.mozu.api.MozuClient; import com.mozu.api.MozuClientFactory; import com.mozu.api.MozuUrl; | import com.mozu.api.*; | [
"com.mozu.api"
] | com.mozu.api; | 1,520,180 |
public PlanarYUVLuminanceSource buildLuminanceSource(byte[] data,
int width, int height) {
Rect rect = getFramingRectInPreview();
if (rect == null) {
return null;
}
// Go ahead and assume it's YUV rather than die.
return new PlanarYUVLuminanceSource(data, width, height, rect.left,
rect.top, rect.... | PlanarYUVLuminanceSource function(byte[] data, int width, int height) { Rect rect = getFramingRectInPreview(); if (rect == null) { return null; } return new PlanarYUVLuminanceSource(data, width, height, rect.left, rect.top, rect.width(), rect.height(), reverseImage); } | /**
* A factory method to build the appropriate LuminanceSource object based on
* the format of the preview buffers, as described by Camera.Parameters.
*
* @param data
* A preview frame.
* @param width
* The width of the image.
* @param height
* The height of the imag... | A factory method to build the appropriate LuminanceSource object based on the format of the preview buffers, as described by Camera.Parameters | buildLuminanceSource | {
"repo_name": "gongtingshisi/pba",
"path": "src/com/kg/zxing/camera/CameraManager.java",
"license": "gpl-2.0",
"size": 9841
} | [
"android.graphics.Rect"
] | import android.graphics.Rect; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 92,155 |
public void testCloning_LegendItemLabelGenerator() {
StandardCategorySeriesLabelGenerator generator
= new StandardCategorySeriesLabelGenerator("Series {0}");
BarRenderer r1 = new BarRenderer();
r1.setLegendItemLabelGenerator(generator);
BarRenderer r2 = null;
... | void function() { StandardCategorySeriesLabelGenerator generator = new StandardCategorySeriesLabelGenerator(STR); BarRenderer r1 = new BarRenderer(); r1.setLegendItemLabelGenerator(generator); BarRenderer r2 = null; try { r2 = (BarRenderer) r1.clone(); } catch (CloneNotSupportedException e) { e.printStackTrace(); } ass... | /**
* Check that the legendItemLabelGenerator is cloned.
*/ | Check that the legendItemLabelGenerator is cloned | testCloning_LegendItemLabelGenerator | {
"repo_name": "SpoonLabs/astor",
"path": "examples/chart_11/tests/org/jfree/chart/renderer/category/junit/AbstractCategoryItemRendererTests.java",
"license": "gpl-2.0",
"size": 12395
} | [
"org.jfree.chart.labels.StandardCategorySeriesLabelGenerator",
"org.jfree.chart.renderer.category.BarRenderer"
] | import org.jfree.chart.labels.StandardCategorySeriesLabelGenerator; import org.jfree.chart.renderer.category.BarRenderer; | import org.jfree.chart.labels.*; import org.jfree.chart.renderer.category.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 2,341,039 |
EAttribute getDatatypes_Val1(); | EAttribute getDatatypes_Val1(); | /**
* Returns the meta object for the attribute '{@link org.eclipse.xtext.parsetree.formatter.formattertestlanguage.Datatypes#getVal1 <em>Val1</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Val1</em>'.
* @see org.eclipse.xtext.parsetree.formatte... | Returns the meta object for the attribute '<code>org.eclipse.xtext.parsetree.formatter.formattertestlanguage.Datatypes#getVal1 Val1</code>'. | getDatatypes_Val1 | {
"repo_name": "miklossy/xtext-core",
"path": "org.eclipse.xtext.tests/src-gen/org/eclipse/xtext/parsetree/formatter/formattertestlanguage/FormattertestlanguagePackage.java",
"license": "epl-1.0",
"size": 56203
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 37,268 |
public Map toMap() {
Map map = new HashMap();
map.put("segNo",StringUtils.toString(segNo, eiMetadata.getMeta("segNo").getFieldLength(), eiMetadata.getMeta("segNo").getScaleLength()));
map.put("instructionId",StringUtils.toString(instructionId, eiMetadata.getMeta("instructionId").getFieldLength(), eiM... | Map function() { Map map = new HashMap(); map.put("segNo",StringUtils.toString(segNo, eiMetadata.getMeta("segNo").getFieldLength(), eiMetadata.getMeta("segNo").getScaleLength())); map.put(STR,StringUtils.toString(instructionId, eiMetadata.getMeta(STR).getFieldLength(), eiMetadata.getMeta(STR).getScaleLength())); map.pu... | /**
* set the value to Map
*/ | set the value to Map | toMap | {
"repo_name": "stserp/erp1",
"path": "source/src/com/baosight/sts/st/jg/domain/STJG0301.java",
"license": "apache-2.0",
"size": 25884
} | [
"com.baosight.iplat4j.util.StringUtils",
"java.util.HashMap",
"java.util.Map"
] | import com.baosight.iplat4j.util.StringUtils; import java.util.HashMap; import java.util.Map; | import com.baosight.iplat4j.util.*; import java.util.*; | [
"com.baosight.iplat4j",
"java.util"
] | com.baosight.iplat4j; java.util; | 2,843,277 |
@Test
public void testDSAKeyValue() throws Exception {
Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG);
WSSecHeader secHeader = new WSSecHeader(doc);
secHeader.insertSecurityHeader();
WSSecSignature builder = new WSSecSignature(secHeader);
builder.setUserInf... | void function() throws Exception { Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG); WSSecHeader secHeader = new WSSecHeader(doc); secHeader.insertSecurityHeader(); WSSecSignature builder = new WSSecSignature(secHeader); builder.setUserInfo(STR, STR); builder.setKeyIdentifierType(WSConstants.KEY_VALUE); Doc... | /**
* Successful DSAKeyValue test.
*/ | Successful DSAKeyValue test | testDSAKeyValue | {
"repo_name": "apache/wss4j",
"path": "ws-security-dom/src/test/java/org/apache/wss4j/dom/message/SignatureKeyValueTest.java",
"license": "apache-2.0",
"size": 7192
} | [
"java.util.Collections",
"org.apache.wss4j.common.bsp.BSPRule",
"org.apache.wss4j.common.principal.PublicKeyPrincipal",
"org.apache.wss4j.common.util.XMLUtils",
"org.apache.wss4j.dom.WSConstants",
"org.apache.wss4j.dom.common.SOAPUtil",
"org.apache.wss4j.dom.engine.WSSecurityEngine",
"org.apache.wss4j... | import java.util.Collections; import org.apache.wss4j.common.bsp.BSPRule; import org.apache.wss4j.common.principal.PublicKeyPrincipal; import org.apache.wss4j.common.util.XMLUtils; import org.apache.wss4j.dom.WSConstants; import org.apache.wss4j.dom.common.SOAPUtil; import org.apache.wss4j.dom.engine.WSSecurityEngine; ... | import java.util.*; import org.apache.wss4j.common.bsp.*; import org.apache.wss4j.common.principal.*; import org.apache.wss4j.common.util.*; import org.apache.wss4j.dom.*; import org.apache.wss4j.dom.common.*; import org.apache.wss4j.dom.engine.*; import org.apache.wss4j.dom.handler.*; import org.junit.jupiter.api.*; i... | [
"java.util",
"org.apache.wss4j",
"org.junit.jupiter",
"org.w3c.dom"
] | java.util; org.apache.wss4j; org.junit.jupiter; org.w3c.dom; | 1,267,204 |
public void performUpdate(UpdateableNvdCve updateable) throws UpdateException {
int maxUpdates = 0;
try {
for (NvdCveInfo cve : updateable) {
if (cve.getNeedsUpdate()) {
maxUpdates += 1;
}
}
if (maxUpdates <= 0) ... | void function(UpdateableNvdCve updateable) throws UpdateException { int maxUpdates = 0; try { for (NvdCveInfo cve : updateable) { if (cve.getNeedsUpdate()) { maxUpdates += 1; } } if (maxUpdates <= 0) { return; } if (maxUpdates > 3) { LOGGER.info( STR); } if (maxUpdates > 0) { openDataStores(); } final int poolSize = (M... | /**
* Downloads the latest NVD CVE XML file from the web and imports it into the current CVE Database.
*
* @param updateable a collection of NVD CVE data file references that need to be downloaded and processed to update the
* database
* @throws UpdateException is thrown if there is an error up... | Downloads the latest NVD CVE XML file from the web and imports it into the current CVE Database | performUpdate | {
"repo_name": "recena/DependencyCheck",
"path": "dependency-check-core/src/main/java/org/owasp/dependencycheck/data/update/NvdCveUpdater.java",
"license": "apache-2.0",
"size": 13347
} | [
"java.util.HashSet",
"java.util.Set",
"java.util.concurrent.ExecutionException",
"java.util.concurrent.ExecutorService",
"java.util.concurrent.Executors",
"java.util.concurrent.Future",
"org.owasp.dependencycheck.data.update.exception.UpdateException",
"org.owasp.dependencycheck.data.update.nvd.Downlo... | import java.util.HashSet; import java.util.Set; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; import org.owasp.dependencycheck.data.update.exception.UpdateException; import org.owasp.dependencycheck... | import java.util.*; import java.util.concurrent.*; import org.owasp.dependencycheck.data.update.exception.*; import org.owasp.dependencycheck.data.update.nvd.*; import org.owasp.dependencycheck.utils.*; | [
"java.util",
"org.owasp.dependencycheck"
] | java.util; org.owasp.dependencycheck; | 106,536 |
protected void assertTextMessagesEqual(String messsage,
Message[] firstSet,
Message[] secondSet) throws JMSException {
assertEquals("Message count does not match: " + messsage, firstSet.length, secondSet.length);
for (in... | void function(String messsage, Message[] firstSet, Message[] secondSet) throws JMSException { assertEquals(STR + messsage, firstSet.length, secondSet.length); for (int i = 0; i < secondSet.length; i++) { TextMessage m1 = (TextMessage) firstSet[i]; TextMessage m2 = (TextMessage) secondSet[i]; assertTextMessageEqual(STR ... | /**
* Tests if firstSet and secondSet are equal.
*
* @param messsage - string to be displayed when the assertion fails.
* @param firstSet[] - set of messages to be compared with its counterpart
* in the secondset.
* @param secondSet[] - set of messages to be compared with its coun... | Tests if firstSet and secondSet are equal | assertTextMessagesEqual | {
"repo_name": "franz1981/activemq-artemis",
"path": "tests/activemq5-unit-tests/src/test/java/org/apache/activemq/test/TestSupport.java",
"license": "apache-2.0",
"size": 8100
} | [
"javax.jms.JMSException",
"javax.jms.Message",
"javax.jms.TextMessage"
] | import javax.jms.JMSException; import javax.jms.Message; import javax.jms.TextMessage; | import javax.jms.*; | [
"javax.jms"
] | javax.jms; | 1,891,633 |
private void firstPageParser() {
try {
Document document = Jsoup.connect(SETTINGS.getValue("sql.WebPage")).get();
String cssSelect = SETTINGS.getValue("css.selectorForOfferLinks");
Elements elements = document.select(cssSelect);
List<Vacancy> vacancyElementsL... | void function() { try { Document document = Jsoup.connect(SETTINGS.getValue(STR)).get(); String cssSelect = SETTINGS.getValue(STR); Elements elements = document.select(cssSelect); List<Vacancy> vacancyElementsList = onePageParser.pageParser(elements); if (!vacancyElementsList.isEmpty()) { for (Vacancy vacancy : vacancy... | /**
* parsing first page.
*/ | parsing first page | firstPageParser | {
"repo_name": "VardanMatevosyan/Vardan-Git-Repository",
"path": "SQL_JDBC/6.TestTask/vacancyParser/src/main/java/ru.matevosyan/parser/VacancyParser.java",
"license": "apache-2.0",
"size": 4742
} | [
"java.io.IOException",
"java.util.List",
"org.jsoup.Jsoup",
"org.jsoup.nodes.Document",
"org.jsoup.select.Elements",
"ru.matevosyan.model.Vacancy"
] | import java.io.IOException; import java.util.List; import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.select.Elements; import ru.matevosyan.model.Vacancy; | import java.io.*; import java.util.*; import org.jsoup.*; import org.jsoup.nodes.*; import org.jsoup.select.*; import ru.matevosyan.model.*; | [
"java.io",
"java.util",
"org.jsoup",
"org.jsoup.nodes",
"org.jsoup.select",
"ru.matevosyan.model"
] | java.io; java.util; org.jsoup; org.jsoup.nodes; org.jsoup.select; ru.matevosyan.model; | 2,212,830 |
@Column(name = "serno")
@OrderBy(value = "SerialNumber DESC")
@Id
public Long getSerialNumber() {
return serialNumber;
} | @Column(name = "serno") @OrderBy(value = STR) Long function() { return serialNumber; } | /**
* Gets the value of the serialNumber property.
*
*/ | Gets the value of the serialNumber property | getSerialNumber | {
"repo_name": "apache/juddi",
"path": "juddi-core/src/main/java/org/apache/juddi/model/ReplicationConfiguration.java",
"license": "apache-2.0",
"size": 7368
} | [
"javax.persistence.Column",
"javax.persistence.OrderBy"
] | import javax.persistence.Column; import javax.persistence.OrderBy; | import javax.persistence.*; | [
"javax.persistence"
] | javax.persistence; | 2,621,532 |
public static Pair getCanonicalForm(String theSystem, BigDecimal theValue, String theCode) {
// -- only for http://unitsofmeasure.org
if (!UCUM_CODESYSTEM_URL.equals(theSystem) || theValue == null || theCode == null)
return null;
init();
Pair theCanonicalPair;
try {
Decimal theDecimal = new Decima... | static Pair function(String theSystem, BigDecimal theValue, String theCode) { if (!UCUM_CODESYSTEM_URL.equals(theSystem) theValue == null theCode == null) return null; init(); Pair theCanonicalPair; try { Decimal theDecimal = new Decimal(theValue.toPlainString(), theValue.precision()); theCanonicalPair = myUcumEssenceS... | /**
* Get the canonical form of a code, it's define at
* <link>http://unitsofmeasure.org</link>
*
* e.g. 12cm -> 0.12m where m is the canonical form of the length.
*
* @param theSystem must be http://unitsofmeasure.org
* @param theValue the value in the original form e.g. 0.12
* @param theCode the ... | Get the canonical form of a code, it's define at HREF e.g. 12cm -> 0.12m where m is the canonical form of the length | getCanonicalForm | {
"repo_name": "SingingTree/hapi-fhir",
"path": "hapi-fhir-jpaserver-model/src/main/java/ca/uhn/fhir/jpa/model/util/UcumServiceUtil.java",
"license": "apache-2.0",
"size": 3774
} | [
"java.math.BigDecimal",
"org.fhir.ucum.Decimal",
"org.fhir.ucum.Pair",
"org.fhir.ucum.UcumException"
] | import java.math.BigDecimal; import org.fhir.ucum.Decimal; import org.fhir.ucum.Pair; import org.fhir.ucum.UcumException; | import java.math.*; import org.fhir.ucum.*; | [
"java.math",
"org.fhir.ucum"
] | java.math; org.fhir.ucum; | 505,520 |
public void setGeofence(String id, SimpleGeofence geofence) {
SharedPreferences.Editor editor = mPrefs.edit();
// Write the Geofence values to SharedPreferences
editor.putFloat(getGeofenceFieldKey(id, KEY_LATITUDE), (float) geofence.getLatitude());
editor.putFloat(getGeofenceFieldKey(id, K... | void function(String id, SimpleGeofence geofence) { SharedPreferences.Editor editor = mPrefs.edit(); editor.putFloat(getGeofenceFieldKey(id, KEY_LATITUDE), (float) geofence.getLatitude()); editor.putFloat(getGeofenceFieldKey(id, KEY_LONGITUDE), (float) geofence.getLongitude()); editor.putFloat(getGeofenceFieldKey(id, K... | /**
* Save a geofence.
* @param geofence The SimpleGeofence containing the
* values you want to save in SharedPreferences
*/ | Save a geofence | setGeofence | {
"repo_name": "thatkide/lydia",
"path": "Autosense/Autosense/src/main/java/com/autosenseapp/includes/Geofencing.java",
"license": "gpl-2.0",
"size": 7522
} | [
"android.content.SharedPreferences"
] | import android.content.SharedPreferences; | import android.content.*; | [
"android.content"
] | android.content; | 1,225,669 |
private static Test decorateTest() {
Test test = TestConfiguration.clientServerSuite(Derby3980DeadlockTest.class);
Properties diagProperties = new Properties();
diagProperties.setProperty("derby.stream.error.extendedDiagSeverityLevel", "30000");
diagProperties.setProperty("derby.info... | static Test function() { Test test = TestConfiguration.clientServerSuite(Derby3980DeadlockTest.class); Properties diagProperties = new Properties(); diagProperties.setProperty(STR, "30000"); diagProperties.setProperty(STR, "true"); test = new SystemPropertyTestSetup(test, diagProperties, true); return new SecurityManag... | /**
* Decorate a test with SecurityManagerSetup, clientServersuite, and
* SupportFilesSetup.
*
* @return the decorated test
*/ | Decorate a test with SecurityManagerSetup, clientServersuite, and SupportFilesSetup | decorateTest | {
"repo_name": "trejkaz/derby",
"path": "java/testing/org/apache/derbyTesting/functionTests/tests/store/Derby3980DeadlockTest.java",
"license": "apache-2.0",
"size": 7379
} | [
"java.util.Properties",
"junit.framework.Test",
"org.apache.derbyTesting.junit.SecurityManagerSetup",
"org.apache.derbyTesting.junit.SystemPropertyTestSetup",
"org.apache.derbyTesting.junit.TestConfiguration"
] | import java.util.Properties; import junit.framework.Test; import org.apache.derbyTesting.junit.SecurityManagerSetup; import org.apache.derbyTesting.junit.SystemPropertyTestSetup; import org.apache.derbyTesting.junit.TestConfiguration; | import java.util.*; import junit.framework.*; import org.apache.*; | [
"java.util",
"junit.framework",
"org.apache"
] | java.util; junit.framework; org.apache; | 2,526,720 |
protected void doExecute(VtiFpRequest request, VtiFpResponse response) throws VtiMethodException, IOException
{
if (logger.isDebugEnabled())
{
logger.debug("Start method execution. Method name: " + getName());
}
String serviceName = request.getParameter("service... | void function(VtiFpRequest request, VtiFpResponse response) throws VtiMethodException, IOException { if (logger.isDebugEnabled()) { logger.debug(STR + getName()); } String serviceName = request.getParameter(STR, STRdocument_nameSTRSTRforceSTRtime_checked_outSTRrlsshorttermSTRvalidateWelcomeNamesSTRSTRmeta_infoSTREnd of... | /**
* Realize currently checkouted document
*
* @param request Vti Frontpage request ({@link VtiFpRequest})
* @param response Vti Frontpage response ({@link VtiFpResponse})
*/ | Realize currently checkouted document | doExecute | {
"repo_name": "Tybion/community-edition",
"path": "modules/sharepoint/amp/source/java/org/alfresco/module/vti/web/fp/UncheckoutDocumentMethod.java",
"license": "lgpl-3.0",
"size": 3279
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,293,618 |
void enterLogicalTest(@NotNull PQLParser.LogicalTestContext ctx);
void exitLogicalTest(@NotNull PQLParser.LogicalTestContext ctx); | void enterLogicalTest(@NotNull PQLParser.LogicalTestContext ctx); void exitLogicalTest(@NotNull PQLParser.LogicalTestContext ctx); | /**
* Exit a parse tree produced by {@link PQLParser#logicalTest}.
* @param ctx the parse tree
*/ | Exit a parse tree produced by <code>PQLParser#logicalTest</code> | exitLogicalTest | {
"repo_name": "processquerying/PQL",
"path": "src/org/pql/antlr/PQLListener.java",
"license": "lgpl-3.0",
"size": 22896
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 1,920,904 |
@Nonnull
public WorkbookFunctionsAcothRequest expand(@Nonnull final String value) {
addExpandOption(value);
return this;
} | WorkbookFunctionsAcothRequest function(@Nonnull final String value) { addExpandOption(value); return this; } | /**
* Sets the expand clause for the request
*
* @param value the expand clause
* @return the updated request
*/ | Sets the expand clause for the request | expand | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/requests/WorkbookFunctionsAcothRequest.java",
"license": "mit",
"size": 2965
} | [
"com.microsoft.graph.requests.WorkbookFunctionsAcothRequest",
"javax.annotation.Nonnull"
] | import com.microsoft.graph.requests.WorkbookFunctionsAcothRequest; import javax.annotation.Nonnull; | import com.microsoft.graph.requests.*; import javax.annotation.*; | [
"com.microsoft.graph",
"javax.annotation"
] | com.microsoft.graph; javax.annotation; | 1,011,026 |
public TagsObject withTags(Map<String, String> tags) {
this.tags = tags;
return this;
} | TagsObject function(Map<String, String> tags) { this.tags = tags; return this; } | /**
* Set the tags property: Resource tags.
*
* @param tags the tags value to set.
* @return the TagsObject object itself.
*/ | Set the tags property: Resource tags | withTags | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/mysql/azure-resourcemanager-mysql/src/main/java/com/azure/resourcemanager/mysql/models/TagsObject.java",
"license": "mit",
"size": 1459
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 957,763 |
public Duration getStartTime(); | Duration function(); | /**
* Returns the time that the initial execution started.
*/ | Returns the time that the initial execution started | getStartTime | {
"repo_name": "Emily-Jiang/microprofile-faultTolerance-incubation",
"path": "src/main/java/org/eclipse/microprofile/faulttolerance/Execution.java",
"license": "apache-2.0",
"size": 1283
} | [
"java.time.Duration"
] | import java.time.Duration; | import java.time.*; | [
"java.time"
] | java.time; | 841,412 |
public static <T> Tuple<T> copyOf(ImmutableList<T> contents) {
return create(contents);
} | static <T> Tuple<T> function(ImmutableList<T> contents) { return create(contents); } | /**
* Returns a {@code Tuple} whose items are given by an immutable list.
*
* <p>This method is a specialization of a {@link #copyOf(Iterable)} that avoids an unnecessary
* {@code copyOf} invocation.
*/ | Returns a Tuple whose items are given by an immutable list. This method is a specialization of a <code>#copyOf(Iterable)</code> that avoids an unnecessary copyOf invocation | copyOf | {
"repo_name": "aehlig/bazel",
"path": "src/main/java/com/google/devtools/build/lib/syntax/SkylarkList.java",
"license": "apache-2.0",
"size": 28123
} | [
"com.google.common.collect.ImmutableList"
] | import com.google.common.collect.ImmutableList; | import com.google.common.collect.*; | [
"com.google.common"
] | com.google.common; | 1,890,431 |
public DocumentPut configDoc(DocumentProcessor docProc, DocumentPut documentPut) {
if ( ! docProc.getFieldMap().isEmpty() || docProc.hasAnnotations()) {
Document document = documentPut.getDocument();
document = new ProxyDocument(docProc, document, docProc.getDocMap(document.getDataTy... | DocumentPut function(DocumentProcessor docProc, DocumentPut documentPut) { if ( ! docProc.getFieldMap().isEmpty() docProc.hasAnnotations()) { Document document = documentPut.getDocument(); document = new ProxyDocument(docProc, document, docProc.getDocMap(document.getDataType().getName())); DocumentPut newDocumentPut = ... | /**
* The Document object the proc should work on. Normally the one in arguments, but could be a proxy object
* if schema mapping or @Accesses is in effect.
*
* <p>
* Public for testing
*/ | The Document object the proc should work on. Normally the one in arguments, but could be a proxy object if schema mapping or @Accesses is in effect. Public for testing | configDoc | {
"repo_name": "vespa-engine/vespa",
"path": "docproc/src/main/java/com/yahoo/docproc/Call.java",
"license": "apache-2.0",
"size": 6699
} | [
"com.yahoo.docproc.proxy.ProxyDocument",
"com.yahoo.document.Document",
"com.yahoo.document.DocumentPut"
] | import com.yahoo.docproc.proxy.ProxyDocument; import com.yahoo.document.Document; import com.yahoo.document.DocumentPut; | import com.yahoo.docproc.proxy.*; import com.yahoo.document.*; | [
"com.yahoo.docproc",
"com.yahoo.document"
] | com.yahoo.docproc; com.yahoo.document; | 528,545 |
public ServiceFuture<Void> beginDeletePrivateEndpointConnectionAsync(String resourceGroupName, String serviceName, String peConnectionName, final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromResponse(beginDeletePrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, service... | ServiceFuture<Void> function(String resourceGroupName, String serviceName, String peConnectionName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginDeletePrivateEndpointConnectionWithServiceResponseAsync(resourceGroupName, serviceName, peConnectionName), serviceCallback); } | /**
* Delete private end point connection for a private link service in a subscription.
*
* @param resourceGroupName The name of the resource group.
* @param serviceName The name of the private link service.
* @param peConnectionName The name of the private end point connection.
* @param s... | Delete private end point connection for a private link service in a subscription | beginDeletePrivateEndpointConnectionAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_11_01/src/main/java/com/microsoft/azure/management/network/v2019_11_01/implementation/PrivateLinkServicesInner.java",
"license": "mit",
"size": 162539
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 2,327,120 |
private void setParameters(Settings settings, MySqlExtensionsFactory extensionsFactory) {
this.host = settings.getProperty(DatabaseSettings.MYSQL_HOST);
this.port = settings.getProperty(DatabaseSettings.MYSQL_PORT);
this.username = settings.getProperty(DatabaseSettings.MYSQL_USERNAME);
... | void function(Settings settings, MySqlExtensionsFactory extensionsFactory) { this.host = settings.getProperty(DatabaseSettings.MYSQL_HOST); this.port = settings.getProperty(DatabaseSettings.MYSQL_PORT); this.username = settings.getProperty(DatabaseSettings.MYSQL_USERNAME); this.password = settings.getProperty(DatabaseS... | /**
* Retrieves various settings.
*
* @param settings the settings to read properties from
* @param extensionsFactory factory to create the MySQL extension
*/ | Retrieves various settings | setParameters | {
"repo_name": "AuthMe/AuthMeReloaded",
"path": "src/main/java/fr/xephi/authme/datasource/PostgreSqlDataSource.java",
"license": "gpl-3.0",
"size": 18307
} | [
"fr.xephi.authme.datasource.columnshandler.AuthMeColumnsHandler",
"fr.xephi.authme.datasource.mysqlextensions.MySqlExtensionsFactory",
"fr.xephi.authme.settings.Settings",
"fr.xephi.authme.settings.properties.DatabaseSettings",
"fr.xephi.authme.settings.properties.HooksSettings"
] | import fr.xephi.authme.datasource.columnshandler.AuthMeColumnsHandler; import fr.xephi.authme.datasource.mysqlextensions.MySqlExtensionsFactory; import fr.xephi.authme.settings.Settings; import fr.xephi.authme.settings.properties.DatabaseSettings; import fr.xephi.authme.settings.properties.HooksSettings; | import fr.xephi.authme.datasource.columnshandler.*; import fr.xephi.authme.datasource.mysqlextensions.*; import fr.xephi.authme.settings.*; import fr.xephi.authme.settings.properties.*; | [
"fr.xephi.authme"
] | fr.xephi.authme; | 31,935 |
public static Set<Host> getByNameLabel(Connection c, String label) throws
BadServerResponse,
XenAPIException,
XmlRpcException {
String method_call = "host.get_by_name_label";
String session = c.getSessionReference();
Object[] method_params = {Marshalling.toXMLRPC(session... | static Set<Host> function(Connection c, String label) throws BadServerResponse, XenAPIException, XmlRpcException { String method_call = STR; String session = c.getSessionReference(); Object[] method_params = {Marshalling.toXMLRPC(session), Marshalling.toXMLRPC(label)}; Map response = c.dispatch(method_call, method_para... | /**
* Get all the host instances with the given label.
*
* @param label label of object to return
* @return references to objects with matching names
*/ | Get all the host instances with the given label | getByNameLabel | {
"repo_name": "cinderella/incubator-cloudstack",
"path": "deps/XenServerJava/com/xensource/xenapi/Host.java",
"license": "apache-2.0",
"size": 105838
} | [
"com.xensource.xenapi.Types",
"java.util.Map",
"java.util.Set",
"org.apache.xmlrpc.XmlRpcException"
] | import com.xensource.xenapi.Types; import java.util.Map; import java.util.Set; import org.apache.xmlrpc.XmlRpcException; | import com.xensource.xenapi.*; import java.util.*; import org.apache.xmlrpc.*; | [
"com.xensource.xenapi",
"java.util",
"org.apache.xmlrpc"
] | com.xensource.xenapi; java.util; org.apache.xmlrpc; | 625,169 |
public static void setBillingPlanAndCustomAttributesToTier(SubscriptionPolicy subscriptionPolicy, Tier tier) {
//set the billing plan.
tier.setTierPlan(subscriptionPolicy.getBillingPlan());
//If the tier has custom attributes
if (subscriptionPolicy.getCustomAttributes() != null &&
... | static void function(SubscriptionPolicy subscriptionPolicy, Tier tier) { tier.setTierPlan(subscriptionPolicy.getBillingPlan()); if (subscriptionPolicy.getCustomAttributes() != null && subscriptionPolicy.getCustomAttributes().length > 0) { Map<String, Object> tierAttributes = new HashMap<String, Object>(); try { String ... | /**
* Extract custom attributes and billing plan from subscription policy and set to tier.
*
* @param subscriptionPolicy - The SubscriptionPolicy object to extract details from
* @param tier - The Tier to set information into
*/ | Extract custom attributes and billing plan from subscription policy and set to tier | setBillingPlanAndCustomAttributesToTier | {
"repo_name": "ruks/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/utils/APIUtil.java",
"license": "apache-2.0",
"size": 564037
} | [
"java.io.UnsupportedEncodingException",
"java.util.HashMap",
"java.util.Iterator",
"java.util.Map",
"org.json.simple.JSONArray",
"org.json.simple.JSONObject",
"org.json.simple.parser.JSONParser",
"org.json.simple.parser.ParseException",
"org.wso2.carbon.apimgt.api.model.Tier",
"org.wso2.carbon.api... | import java.io.UnsupportedEncodingException; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import org.json.simple.JSONArray; import org.json.simple.JSONObject; import org.json.simple.parser.JSONParser; import org.json.simple.parser.ParseException; import org.wso2.carbon.apimgt.api.model.Tie... | import java.io.*; import java.util.*; import org.json.simple.*; import org.json.simple.parser.*; import org.wso2.carbon.apimgt.api.model.*; import org.wso2.carbon.apimgt.api.model.policy.*; | [
"java.io",
"java.util",
"org.json.simple",
"org.wso2.carbon"
] | java.io; java.util; org.json.simple; org.wso2.carbon; | 889,391 |
config = ConfigUtility.getConfigProperties();
if (ConfigUtility.isServerActive()) {
server = "false";
}
} | config = ConfigUtility.getConfigProperties(); if (ConfigUtility.isServerActive()) { server = "false"; } } | /**
* Create test fixtures for class.
*
* @throws Exception the exception
*/ | Create test fixtures for class | setupClass | {
"repo_name": "WestCoastInformatics/ihtsdo-refset-tool",
"path": "integration-test/src/test/java/org/ihtsdo/otf/refset/test/mojo/Rf2SnapshotLoadAndUnloadTest.java",
"license": "apache-2.0",
"size": 2985
} | [
"org.ihtsdo.otf.refset.helpers.ConfigUtility"
] | import org.ihtsdo.otf.refset.helpers.ConfigUtility; | import org.ihtsdo.otf.refset.helpers.*; | [
"org.ihtsdo.otf"
] | org.ihtsdo.otf; | 569,296 |
@Test
public void intialize_map () {
Map<String, String> newMap = Maps.newHashMap();
assertNotNull(newMap);
}
| void function () { Map<String, String> newMap = Maps.newHashMap(); assertNotNull(newMap); } | /**
* Initialize map
*/ | Initialize map | intialize_map | {
"repo_name": "wq19880601/java-util-examples",
"path": "src/test/java/com/levelup/java/guava/MapsExample.java",
"license": "apache-2.0",
"size": 5425
} | [
"com.google.common.collect.Maps",
"java.util.Map",
"org.junit.Assert"
] | import com.google.common.collect.Maps; import java.util.Map; import org.junit.Assert; | import com.google.common.collect.*; import java.util.*; import org.junit.*; | [
"com.google.common",
"java.util",
"org.junit"
] | com.google.common; java.util; org.junit; | 2,408,209 |
@Test public void getTableId() {
assertEquals(1, pid.getTableId());
} | @Test void function() { assertEquals(1, pid.getTableId()); } | /**
* Unit test for HeapPageId.getTableId()
*/ | Unit test for HeapPageId.getTableId() | getTableId | {
"repo_name": "jfeser/ImputeDB",
"path": "simpledb/test/simpledb/HeapPageIdTest.java",
"license": "mit",
"size": 2230
} | [
"org.junit.Assert",
"org.junit.Test"
] | import org.junit.Assert; import org.junit.Test; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,495,840 |
public static PortURL getPortURL(String portUrlStr) {
Matcher matcher = PORT_URL_PATTERN.matcher(portUrlStr);
if (matcher.matches()) {
String recordName = matcher.group(2);
String fieldName = matcher.group(3);
ProcessingType processingType = ProcessingType.fromString(matcher.group(5), ProcessingType.DIS... | static PortURL function(String portUrlStr) { Matcher matcher = PORT_URL_PATTERN.matcher(portUrlStr); if (matcher.matches()) { String recordName = matcher.group(2); String fieldName = matcher.group(3); ProcessingType processingType = ProcessingType.fromString(matcher.group(5), ProcessingType.DISCRETE); if (recordName !=... | /**
* This method parses the given port URL, for example "port:$0.field1:source"
* and the resulted {@link PortURL} will contain recordName "0", fieldName "field1"
* and processing type "source".
* @param portUrlStr
* @return port URL representation - record id, field name and processing type (discrete, sourc... | This method parses the given port URL, for example "port:$0.field1:source" and the resulted <code>PortURL</code> will contain recordName "0", fieldName "field1" and processing type "source" | getPortURL | {
"repo_name": "CloverETL/CloverETL-Engine",
"path": "cloveretl.engine/src/org/jetel/util/file/FileUtils.java",
"license": "lgpl-2.1",
"size": 97871
} | [
"java.util.regex.Matcher",
"org.jetel.enums.ProcessingType",
"org.jetel.exception.JetelRuntimeException",
"org.jetel.util.string.StringUtils"
] | import java.util.regex.Matcher; import org.jetel.enums.ProcessingType; import org.jetel.exception.JetelRuntimeException; import org.jetel.util.string.StringUtils; | import java.util.regex.*; import org.jetel.enums.*; import org.jetel.exception.*; import org.jetel.util.string.*; | [
"java.util",
"org.jetel.enums",
"org.jetel.exception",
"org.jetel.util"
] | java.util; org.jetel.enums; org.jetel.exception; org.jetel.util; | 2,720,311 |
public static HttpMethods createMethod(Exchange exchange, HttpCommonEndpoint endpoint, boolean hasPayload) throws URISyntaxException {
// is a query string provided in the endpoint URI or in a header (header overrules endpoint)
String queryString = exchange.getIn().getHeader(Exchange.HTTP_QUERY, Str... | static HttpMethods function(Exchange exchange, HttpCommonEndpoint endpoint, boolean hasPayload) throws URISyntaxException { String queryString = exchange.getIn().getHeader(Exchange.HTTP_QUERY, String.class); String uriString = exchange.getIn().getHeader(Exchange.HTTP_URI, String.class); try { uriString = exchange.getCo... | /**
* Creates the HttpMethod to use to call the remote server, often either its GET or POST.
*
* @param exchange the exchange
* @return the created method
* @throws URISyntaxException
*/ | Creates the HttpMethod to use to call the remote server, often either its GET or POST | createMethod | {
"repo_name": "jarst/camel",
"path": "components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpHelper.java",
"license": "apache-2.0",
"size": 22219
} | [
"java.net.URISyntaxException",
"org.apache.camel.Exchange",
"org.apache.camel.RuntimeExchangeException",
"org.apache.camel.util.UnsafeUriCharactersEncoder"
] | import java.net.URISyntaxException; import org.apache.camel.Exchange; import org.apache.camel.RuntimeExchangeException; import org.apache.camel.util.UnsafeUriCharactersEncoder; | import java.net.*; import org.apache.camel.*; import org.apache.camel.util.*; | [
"java.net",
"org.apache.camel"
] | java.net; org.apache.camel; | 104,022 |
private void monitorMemory() {
Double memUsed = nodeStatus.getMemoryUsage();
// Min breach
if(memUsed < Config.min_memory_usage) {
memMaxBreachTimer = 0;
memMinBreachTimer += Config.intervall_timer;
if(memMinBreachTimer > Config.threshold_breach_limit) {
LOG.info("Sending message - Minimum ... | void function() { Double memUsed = nodeStatus.getMemoryUsage(); if(memUsed < Config.min_memory_usage) { memMaxBreachTimer = 0; memMinBreachTimer += Config.intervall_timer; if(memMinBreachTimer > Config.threshold_breach_limit) { LOG.info(STR,memUsed); BreachMessage<Double> breachMessage = new BreachMessage<Double>(Breac... | /**
* Monitor current memory status
* @return
*/ | Monitor current memory status | monitorMemory | {
"repo_name": "baakind/autoscale-agent",
"path": "src/main/java/no/uio/master/autoscale/agent/stat/NodeMonitor.java",
"license": "apache-2.0",
"size": 3951
} | [
"no.uio.master.autoscale.agent.config.Config",
"no.uio.master.autoscale.message.AgentMessage",
"no.uio.master.autoscale.message.BreachMessage",
"no.uio.master.autoscale.message.enumerator.AgentMessageType",
"no.uio.master.autoscale.message.enumerator.BreachType"
] | import no.uio.master.autoscale.agent.config.Config; import no.uio.master.autoscale.message.AgentMessage; import no.uio.master.autoscale.message.BreachMessage; import no.uio.master.autoscale.message.enumerator.AgentMessageType; import no.uio.master.autoscale.message.enumerator.BreachType; | import no.uio.master.autoscale.agent.config.*; import no.uio.master.autoscale.message.*; import no.uio.master.autoscale.message.enumerator.*; | [
"no.uio.master"
] | no.uio.master; | 2,139,198 |
public void testInitStackTraceEnabledAfterOpeningManySessions()
throws IllegalAccessException, RepositoryException {
final int sessionCount = SessionStats.INIT_STACK_TRACE_THRESHOLD + 1;
final List<Session> sessions = new ArrayList<Session>(sessionCount);
for (int i = 0; i < sess... | void function() throws IllegalAccessException, RepositoryException { final int sessionCount = SessionStats.INIT_STACK_TRACE_THRESHOLD + 1; final List<Session> sessions = new ArrayList<Session>(sessionCount); for (int i = 0; i < sessionCount; i++) { sessions.add(createSession()); } Session lastSession = sessions.get(ses... | /**
* Tests if the init stack trace is recorded after opening a lot of sessions.
*/ | Tests if the init stack trace is recorded after opening a lot of sessions | testInitStackTraceEnabledAfterOpeningManySessions | {
"repo_name": "alexkli/jackrabbit-oak",
"path": "oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/session/SessionStatsTest.java",
"license": "apache-2.0",
"size": 2912
} | [
"java.util.ArrayList",
"java.util.List",
"javax.jcr.RepositoryException",
"javax.jcr.Session"
] | import java.util.ArrayList; import java.util.List; import javax.jcr.RepositoryException; import javax.jcr.Session; | import java.util.*; import javax.jcr.*; | [
"java.util",
"javax.jcr"
] | java.util; javax.jcr; | 1,499,812 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.