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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
private void executeAction(Action action, DataForm form) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
// TODO: Check that all the required fields of the form were filled, if
// TODO: not throw the corresponding exception. This will make a faster respo... | void function(Action action, DataForm form) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { AdHocCommandData data = new AdHocCommandData(); data.setType(IQ.Type.set); data.setTo(getOwnerJID()); data.setNode(getNode()); data.setSessionID(sessionID); data.setAction(action); d... | /**
* Executes the <code>action</code> with the <code>form</code>.
* The action could be any of the available actions. The form must
* be the answer of the previous stage. It can be <code>null</code> if it is the first stage.
*
* @param action the action to execute.
* @param form the form ... | Executes the <code>action</code> with the <code>form</code>. The action could be any of the available actions. The form must be the answer of the previous stage. It can be <code>null</code> if it is the first stage | executeAction | {
"repo_name": "Flowdalic/Smack",
"path": "smack-extensions/src/main/java/org/jivesoftware/smackx/commands/RemoteCommand.java",
"license": "apache-2.0",
"size": 6599
} | [
"org.jivesoftware.smack.SmackException",
"org.jivesoftware.smack.XMPPException",
"org.jivesoftware.smackx.commands.packet.AdHocCommandData",
"org.jivesoftware.smackx.xdata.packet.DataForm"
] | import org.jivesoftware.smack.SmackException; import org.jivesoftware.smack.XMPPException; import org.jivesoftware.smackx.commands.packet.AdHocCommandData; import org.jivesoftware.smackx.xdata.packet.DataForm; | import org.jivesoftware.smack.*; import org.jivesoftware.smackx.commands.packet.*; import org.jivesoftware.smackx.xdata.packet.*; | [
"org.jivesoftware.smack",
"org.jivesoftware.smackx"
] | org.jivesoftware.smack; org.jivesoftware.smackx; | 1,664,828 |
V3 wrapVector3f(ByteBuffer buffer, int offset, int numComponents);
| V3 wrapVector3f(ByteBuffer buffer, int offset, int numComponents); | /**
* Wraps a vector.<p>
*
* Most vectors are 3-dimensional, i.e., with 3 components. The exception
* are texture coordinates, which may be 1- or 2-dimensional. A vector
* consists of numComponents floats (x,y,z) starting from offset
*
* @param buffer the buffer to wrap
* @para... | Wraps a vector. Most vectors are 3-dimensional, i.e., with 3 components. The exception are texture coordinates, which may be 1- or 2-dimensional. A vector consists of numComponents floats (x,y,z) starting from offset | wrapVector3f | {
"repo_name": "mingsong/GearVRf",
"path": "GVRf/Framework/src/org/gearvrf/jassimp2/AiWrapperProvider.java",
"license": "apache-2.0",
"size": 5769
} | [
"java.nio.ByteBuffer"
] | import java.nio.ByteBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 319,114 |
public void flushBase64() throws java.io.IOException {
if( position > 0 ) {
if( encode ) {
out.write( encode3to4( b4, buffer, position, options ) );
position = 0;
} // end if: encoding
else {
... | void function() throws java.io.IOException { if( position > 0 ) { if( encode ) { out.write( encode3to4( b4, buffer, position, options ) ); position = 0; } else { throw new java.io.IOException( STR ); } } } | /**
* Method added by PHIL. [Thanks, PHIL. -Rob]
* This pads the buffer without closing the stream.
* @throws java.io.IOException if there's an error.
*/ | Method added by PHIL. [Thanks, PHIL. -Rob] This pads the buffer without closing the stream | flushBase64 | {
"repo_name": "mwambler/webshell-xpages-ext-lib",
"path": "com.tc.utils/src/com/tc/utils/Base64.java",
"license": "apache-2.0",
"size": 84149
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,605,579 |
public void openTag(String tagName) throws IOException; | void function(String tagName) throws IOException; | /**
* Open a tag with given name.
*
* @param tagName
* the tag name
*/ | Open a tag with given name | openTag | {
"repo_name": "sewe/spotbugs",
"path": "spotbugs/src/main/java/edu/umd/cs/findbugs/xml/XMLOutput.java",
"license": "lgpl-2.1",
"size": 4088
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,137,469 |
private void addCluster(SQLIndex index, String indexName, String table) {
println("");
print("CLUSTER " + indexName + " ON " + table);
endStatement(StatementType.CREATE, index);
} | void function(SQLIndex index, String indexName, String table) { println(STRCLUSTER STR ON " + table); endStatement(StatementType.CREATE, index); } | /**
* This will create a clustered index on a given table.
*/ | This will create a clustered index on a given table | addCluster | {
"repo_name": "ptrptr/power-architect",
"path": "src/main/java/ca/sqlpower/architect/ddl/PostgresDDLGenerator.java",
"license": "gpl-3.0",
"size": 19913
} | [
"ca.sqlpower.architect.ddl.DDLStatement",
"ca.sqlpower.sqlobject.SQLIndex"
] | import ca.sqlpower.architect.ddl.DDLStatement; import ca.sqlpower.sqlobject.SQLIndex; | import ca.sqlpower.architect.ddl.*; import ca.sqlpower.sqlobject.*; | [
"ca.sqlpower.architect",
"ca.sqlpower.sqlobject"
] | ca.sqlpower.architect; ca.sqlpower.sqlobject; | 1,684,226 |
HashMap<KmlGroundOverlay, GroundOverlay> getGroundOverlayHashMap() {
return mGroundOverlays;
} | HashMap<KmlGroundOverlay, GroundOverlay> getGroundOverlayHashMap() { return mGroundOverlays; } | /**
* Gets all of the ground overlays which were set in the container
*
* @return A set of ground overlays
*/ | Gets all of the ground overlays which were set in the container | getGroundOverlayHashMap | {
"repo_name": "josegury/AndroidMarkerClusteringMaps",
"path": "MarkerClusteringMaps/app/src/main/java/joseangelpardo/markerclusteringmaps/libreryMaps/kml/KmlContainer.java",
"license": "apache-2.0",
"size": 5394
} | [
"com.google.android.gms.maps.model.GroundOverlay",
"java.util.HashMap"
] | import com.google.android.gms.maps.model.GroundOverlay; import java.util.HashMap; | import com.google.android.gms.maps.model.*; import java.util.*; | [
"com.google.android",
"java.util"
] | com.google.android; java.util; | 1,965,699 |
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Response<AvailabilitySetInner>> updateWithResponseAsync(
String resourceGroupName, String availabilitySetName, AvailabilitySetUpdate parameters) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<AvailabilitySetInner>> function( String resourceGroupName, String availabilitySetName, AvailabilitySetUpdate parameters) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (resourceGroupName == null) { return... | /**
* Update an availability set.
*
* @param resourceGroupName The name of the resource group.
* @param availabilitySetName The name of the availability set.
* @param parameters Parameters supplied to the Update Availability Set operation.
* @throws IllegalArgumentException thrown if param... | Update an availability set | updateWithResponseAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/AvailabilitySetsClientImpl.java",
"license": "mit",
"size": 74440
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.FluxUtil",
"com.azure.resourcemanager.compute.fluent.models.AvailabilitySetInner",
"com.azure.resourcemanager.compute.models.AvailabilitySetUpdate"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.compute.fluent.models.AvailabilitySetInner; import com.azure.resourcemanager.compute.models.AvailabilitySetUpdate; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.compute.fluent.models.*; import com.azure.resourcemanager.compute.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 128,161 |
@LogMessage(level = WARN)
@Message(id = 701, value = "Exception during unbind")
public void exceptionDuringUnbind(@Cause Throwable t);
// RECOVERY (900) | @LogMessage(level = WARN) @Message(id = 701, value = STR) void function(@Cause Throwable t); | /**
* Exception during unbind
* @param t The exception
*/ | Exception during unbind | exceptionDuringUnbind | {
"repo_name": "jesperpedersen/ironjacamar",
"path": "core/src/main/java/org/ironjacamar/core/CoreLogger.java",
"license": "epl-1.0",
"size": 6999
} | [
"org.jboss.logging.annotations.Cause",
"org.jboss.logging.annotations.LogMessage",
"org.jboss.logging.annotations.Message"
] | import org.jboss.logging.annotations.Cause; import org.jboss.logging.annotations.LogMessage; import org.jboss.logging.annotations.Message; | import org.jboss.logging.annotations.*; | [
"org.jboss.logging"
] | org.jboss.logging; | 1,631,330 |
private void drawBackground(BufferedImage img)
{
Graphics g = img.getGraphics();
int width = img.getWidth();
int height = img.getHeight();
for (int i = 0; i < width; i += 20)
{
for (int j = 0; j < height; j += 20)
{
if ((i + j) % 40 == 0)
g.setColor(Color.gray);
else
... | void function(BufferedImage img) { Graphics g = img.getGraphics(); int width = img.getWidth(); int height = img.getHeight(); for (int i = 0; i < width; i += 20) { for (int j = 0; j < height; j += 20) { if ((i + j) % 40 == 0) g.setColor(Color.gray); else g.setColor(Color.white); g.fillRect(i, j, 20, 20); } } g.dispose()... | /**
* Draws the checkered background.
* @param img The {@code BufferedImage} objec to draw the
* background rendering to.
*/ | Draws the checkered background | drawBackground | {
"repo_name": "coobird/Paint",
"path": "src/net/coobird/paint/image/DefaultImageRenderer.java",
"license": "mit",
"size": 2572
} | [
"java.awt.Color",
"java.awt.Graphics",
"java.awt.image.BufferedImage"
] | import java.awt.Color; import java.awt.Graphics; import java.awt.image.BufferedImage; | import java.awt.*; import java.awt.image.*; | [
"java.awt"
] | java.awt; | 1,520,400 |
EList<PaletteGroupItem> getPaletteGroupItems(); | EList<PaletteGroupItem> getPaletteGroupItems(); | /**
* Returns the value of the '<em><b>Palette Group Items</b></em>' containment reference list.
* The list contents are of type {@link com.odcgroup.page.uimodel.PaletteGroupItem}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Palette Group Items</em>' containment reference list isn't clear,
... | Returns the value of the 'Palette Group Items' containment reference list. The list contents are of type <code>com.odcgroup.page.uimodel.PaletteGroupItem</code>. If the meaning of the 'Palette Group Items' containment reference list isn't clear, there really should be more of a description here... | getPaletteGroupItems | {
"repo_name": "debabratahazra/DS",
"path": "designstudio/components/page/core/com.odcgroup.page.uimodel/src/generated/java/com/odcgroup/page/uimodel/UIModel.java",
"license": "epl-1.0",
"size": 7270
} | [
"org.eclipse.emf.common.util.EList"
] | import org.eclipse.emf.common.util.EList; | import org.eclipse.emf.common.util.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,218,531 |
@ServiceMethod(returns = ReturnType.SINGLE)
Mono<PrivateLinkServiceVisibilityInner> checkPrivateLinkServiceVisibilityByResourceGroupAsync(
String location, String resourceGroupName, CheckPrivateLinkServiceVisibilityRequest parameters); | @ServiceMethod(returns = ReturnType.SINGLE) Mono<PrivateLinkServiceVisibilityInner> checkPrivateLinkServiceVisibilityByResourceGroupAsync( String location, String resourceGroupName, CheckPrivateLinkServiceVisibilityRequest parameters); | /**
* Checks whether the subscription is visible to private link service in the specified resource group.
*
* @param location The location of the domain name.
* @param resourceGroupName The name of the resource group.
* @param parameters The request body of CheckPrivateLinkService API call.
... | Checks whether the subscription is visible to private link service in the specified resource group | checkPrivateLinkServiceVisibilityByResourceGroupAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/PrivateLinkServicesClient.java",
"license": "mit",
"size": 60022
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.resourcemanager.network.fluent.models.PrivateLinkServiceVisibilityInner",
"com.azure.resourcemanager.network.models.CheckPrivateLinkServiceVisibilityRequest"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.network.fluent.models.PrivateLinkServiceVisibilityInner; import com.azure.resourcemanager.network.models.CheckPrivateLinkServiceVisibilityRequest; | import com.azure.core.annotation.*; import com.azure.resourcemanager.network.fluent.models.*; import com.azure.resourcemanager.network.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 236,238 |
public final CursorPage<DmMeeting> queryPageByMeetingPlanningNotes(java.lang.String meetingPlanningNotes,
int pageSize, String cursorString) {
final Filter filter = createEqualsFilter(COLUMN_NAME_MEETINGPLANNINGNOTES, meetingPlanningNotes);
return queryPage(false, pageSize, null, ... | final CursorPage<DmMeeting> function(java.lang.String meetingPlanningNotes, int pageSize, String cursorString) { final Filter filter = createEqualsFilter(COLUMN_NAME_MEETINGPLANNINGNOTES, meetingPlanningNotes); return queryPage(false, pageSize, null, null, null, false, null, false, cursorString, filter); } /** * {@inhe... | /**
* query-page-by method for field meetingPlanningNotes
* @param meetingPlanningNotes the specified attribute
* @param pageSize the number of domain entities in the page
* @param cursorString non-null if get next page
* @return a Page of DmMeetings for the specified meetingPlanningNotes
*/ | query-page-by method for field meetingPlanningNotes | queryPageByMeetingPlanningNotes | {
"repo_name": "goldengekko/Meetr-Backend",
"path": "src/main/java/com/goldengekko/meetr/dao/GeneratedDmMeetingDaoImpl.java",
"license": "gpl-3.0",
"size": 68599
} | [
"com.goldengekko.meetr.domain.DmMeeting",
"net.sf.mardao.core.CursorPage",
"net.sf.mardao.core.Filter"
] | import com.goldengekko.meetr.domain.DmMeeting; import net.sf.mardao.core.CursorPage; import net.sf.mardao.core.Filter; | import com.goldengekko.meetr.domain.*; import net.sf.mardao.core.*; | [
"com.goldengekko.meetr",
"net.sf.mardao"
] | com.goldengekko.meetr; net.sf.mardao; | 2,138,755 |
public WebSecurityManager getWebSecurityManager() ; | WebSecurityManager function() ; | /**
* Get the instantiated Shiro web security manager
* @return
*/ | Get the instantiated Shiro web security manager | getWebSecurityManager | {
"repo_name": "echinopsii/net.echinopsii.ariane.community.core.idm",
"path": "base/src/main/java/net/echinopsii/ariane/community/core/idm/base/proxy/WebSecurityManagerProxy.java",
"license": "agpl-3.0",
"size": 1412
} | [
"org.apache.shiro.web.mgt.WebSecurityManager"
] | import org.apache.shiro.web.mgt.WebSecurityManager; | import org.apache.shiro.web.mgt.*; | [
"org.apache.shiro"
] | org.apache.shiro; | 2,692,526 |
@Override
protected String doInBackground(String... f_url) {
int count;
try {
File pictureFolder = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);
File mediaDir = new File(pictureFolder, "Olmatix");
i... | String function(String... f_url) { int count; try { File pictureFolder = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES); File mediaDir = new File(pictureFolder, STR); if (!mediaDir.exists()){ mediaDir.mkdir(); } pathFile = pictureFolder; pathThumb = pathFile+STR; System.out.println(STR); ... | /**
* Downloading file in background thread
* */ | Downloading file in background thread | doInBackground | {
"repo_name": "lesjaw/Olmatix",
"path": "olmatix/src/main/java/com/olmatix/ui/activity/CCTVActivity.java",
"license": "apache-2.0",
"size": 53240
} | [
"android.os.Environment",
"android.util.Log",
"java.io.BufferedInputStream",
"java.io.File",
"java.io.FileOutputStream",
"java.io.InputStream",
"java.io.OutputStream",
"java.net.URLConnection"
] | import android.os.Environment; import android.util.Log; import java.io.BufferedInputStream; import java.io.File; import java.io.FileOutputStream; import java.io.InputStream; import java.io.OutputStream; import java.net.URLConnection; | import android.os.*; import android.util.*; import java.io.*; import java.net.*; | [
"android.os",
"android.util",
"java.io",
"java.net"
] | android.os; android.util; java.io; java.net; | 635,925 |
@Override
protected void display(Token token) {
XYSequenceContainer cont;
XYSequenceContainerManager manager;
XYSequence seq;
SequencePlotPoint point;
SequencePlotterContainer[] plotConts;
SequencePlotterContainer plotCont;
String plotName;
Comparable x;
Comparable y;
... | void function(Token token) { XYSequenceContainer cont; XYSequenceContainerManager manager; XYSequence seq; SequencePlotPoint point; SequencePlotterContainer[] plotConts; SequencePlotterContainer plotCont; String plotName; Comparable x; Comparable y; double dX; double dY; Double[] errorX; Double[] errorY; ContentType ty... | /**
* Displays the token (the panel and dialog have already been created at
* this stage).
*
* @param token the token to display
*/ | Displays the token (the panel and dialog have already been created at this stage) | display | {
"repo_name": "waikato-datamining/adams-base",
"path": "adams-core/src/main/java/adams/flow/sink/SimplePlot.java",
"license": "gpl-3.0",
"size": 35350
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 761,638 |
@Override
public String getSettingsJSON(Integer configID,
TreeConfigIDTokens treeConfigIDTokens, TPersonBean personBean, Locale locale, String bundleName) {
TTextBoxSettingsBean textBoxSettingsBean = getTTextBoxSettingsBeanByConfig(configID);
StringBuilder stringBuilder = new StringBuilder();
if (textBoxS... | String function(Integer configID, TreeConfigIDTokens treeConfigIDTokens, TPersonBean personBean, Locale locale, String bundleName) { TTextBoxSettingsBean textBoxSettingsBean = getTTextBoxSettingsBeanByConfig(configID); StringBuilder stringBuilder = new StringBuilder(); if (textBoxSettingsBean!=null) { JSONUtility.appen... | /**
* Gets the specific JSON string for a field
* @param configID ID of the direct or nearest fallback configuration
* @param treeConfigIDTokens a decoded node
* @param personBean
* @param locale
* @param bundleName
* @return
*/ | Gets the specific JSON string for a field | getSettingsJSON | {
"repo_name": "trackplus/Genji",
"path": "src/main/java/com/aurel/track/fieldType/design/text/EmaiAddressDT.java",
"license": "gpl-3.0",
"size": 4880
} | [
"com.aurel.track.admin.customize.treeConfig.TreeConfigIDTokens",
"com.aurel.track.admin.customize.treeConfig.field.FieldConfigJSON",
"com.aurel.track.beans.TPersonBean",
"com.aurel.track.beans.TTextBoxSettingsBean",
"com.aurel.track.json.JSONUtility",
"java.util.Locale"
] | import com.aurel.track.admin.customize.treeConfig.TreeConfigIDTokens; import com.aurel.track.admin.customize.treeConfig.field.FieldConfigJSON; import com.aurel.track.beans.TPersonBean; import com.aurel.track.beans.TTextBoxSettingsBean; import com.aurel.track.json.JSONUtility; import java.util.Locale; | import com.aurel.track.admin.customize.*; import com.aurel.track.beans.*; import com.aurel.track.json.*; import java.util.*; | [
"com.aurel.track",
"java.util"
] | com.aurel.track; java.util; | 1,734,149 |
ByteArrayOutputStream os = new ByteArrayOutputStream();
ObjectOutputStream out = new ObjectOutputStream( os );
out.writeObject( object );
return os.toByteArray();
} | ByteArrayOutputStream os = new ByteArrayOutputStream(); ObjectOutputStream out = new ObjectOutputStream( os ); out.writeObject( object ); return os.toByteArray(); } | /**
* Serializes an object.
* @param object a serializable object
* @return a non-null array of bytes
* @throws IOException
*/ | Serializes an object | serializeObject | {
"repo_name": "diarraa/roboconf-platform",
"path": "core/roboconf-messaging-api/src/main/java/net/roboconf/messaging/api/utils/SerializationUtils.java",
"license": "apache-2.0",
"size": 3030
} | [
"java.io.ByteArrayOutputStream",
"java.io.ObjectOutputStream"
] | import java.io.ByteArrayOutputStream; import java.io.ObjectOutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 911,879 |
@MainThread
@Override
public boolean onStopTask(Context context, TaskParameters taskParameters) {
// The GCM Driver has no mechanism for aborting previously dispatched messages.
return false;
} | boolean function(Context context, TaskParameters taskParameters) { return false; } | /**
* Called when the system has determined that processing the GCM message must be stopped.
*
* @return Boolean indicating whether the task has to be rescheduled.
*/ | Called when the system has determined that processing the GCM message must be stopped | onStopTask | {
"repo_name": "mogoweb/365browser",
"path": "app/src/main/java/org/chromium/chrome/browser/services/gcm/GCMBackgroundTask.java",
"license": "apache-2.0",
"size": 2413
} | [
"android.content.Context",
"org.chromium.components.background_task_scheduler.TaskParameters"
] | import android.content.Context; import org.chromium.components.background_task_scheduler.TaskParameters; | import android.content.*; import org.chromium.components.background_task_scheduler.*; | [
"android.content",
"org.chromium.components"
] | android.content; org.chromium.components; | 2,231,985 |
@DoesServiceRequest
public void downloadAttributes(AccessCondition accessCondition, BlobRequestOptions options,
OperationContext opContext) throws StorageException {
if (opContext == null) {
opContext = new OperationContext();
}
opContext.initialize();
op... | void function(AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext) throws StorageException { if (opContext == null) { opContext = new OperationContext(); } opContext.initialize(); options = BlobRequestOptions.populateAndApplyDefaults(options, BlobType.UNSPECIFIED, this.blobServiceCli... | /**
* Downloads the container's attributes, which consist of metadata and properties, using the specified request
* options and operation context.
*
* @param accessCondition
* An {@link AccessCondition} object that represents the access conditions for the container.
* @param op... | Downloads the container's attributes, which consist of metadata and properties, using the specified request options and operation context | downloadAttributes | {
"repo_name": "risezhang/azure-storage-cli",
"path": "src/main/java/com/microsoft/azure/storage/blob/CloudBlobContainer.java",
"license": "mit",
"size": 103627
} | [
"com.microsoft.azure.storage.AccessCondition",
"com.microsoft.azure.storage.OperationContext",
"com.microsoft.azure.storage.StorageException",
"com.microsoft.azure.storage.core.ExecutionEngine"
] | import com.microsoft.azure.storage.AccessCondition; import com.microsoft.azure.storage.OperationContext; import com.microsoft.azure.storage.StorageException; import com.microsoft.azure.storage.core.ExecutionEngine; | import com.microsoft.azure.storage.*; import com.microsoft.azure.storage.core.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 2,870,302 |
public boolean getHasAllGroups() {
try {
return podcastPermissionsService.hasPerm(PodcastPermissionsService.ALL_GROUPS_PERMISSIONS,
podcastService.retrievePodcastFolderId(
podcastService.getSiteId()));
}
catch (PermissionException e) {
// problem getting podcast folder id, so retu... | boolean function() { try { return podcastPermissionsService.hasPerm(PodcastPermissionsService.ALL_GROUPS_PERMISSIONS, podcastService.retrievePodcastFolderId( podcastService.getSiteId())); } catch (PermissionException e) { } return false; } | /**
* Returns TRUE if user has ALLGROUPS permission (or site.upd which supercedes),
* FALSE if not
*/ | Returns TRUE if user has ALLGROUPS permission (or site.upd which supercedes), FALSE if not | getHasAllGroups | {
"repo_name": "eemirtekin/Sakai-10.6-TR",
"path": "podcasts/podcasts-app/src/java/org/sakaiproject/tool/podcasts/podHomeBean.java",
"license": "apache-2.0",
"size": 60234
} | [
"org.sakaiproject.api.app.podcasts.PodcastPermissionsService",
"org.sakaiproject.exception.PermissionException"
] | import org.sakaiproject.api.app.podcasts.PodcastPermissionsService; import org.sakaiproject.exception.PermissionException; | import org.sakaiproject.api.app.podcasts.*; import org.sakaiproject.exception.*; | [
"org.sakaiproject.api",
"org.sakaiproject.exception"
] | org.sakaiproject.api; org.sakaiproject.exception; | 51,846 |
public synchronized Session[] findSessions() {
return (this.sessions);
} | synchronized Session[] function() { return (this.sessions); } | /**
* Returns the <code>Session</code>s associated with this SSO.
*/ | Returns the <code>Session</code>s associated with this SSO | findSessions | {
"repo_name": "plumer/codana",
"path": "tomcat_files/6.0.0/SingleSignOnEntry.java",
"license": "mit",
"size": 6285
} | [
"org.apache.catalina.Session"
] | import org.apache.catalina.Session; | import org.apache.catalina.*; | [
"org.apache.catalina"
] | org.apache.catalina; | 1,065,116 |
private JPanel getJPanel(String backText, String nextText, String finishText, String cancelText) {
if (jPanel == null) {
jPanel = new JPanel();
jPanel.setPreferredSize(new Dimension(0, 40));
jPanel.add(getBtnBack(backText), null);
jPanel.add(getBtnNext(nextText), null);
jPanel.add(getBtnFinish(finis... | JPanel function(String backText, String nextText, String finishText, String cancelText) { if (jPanel == null) { jPanel = new JPanel(); jPanel.setPreferredSize(new Dimension(0, 40)); jPanel.add(getBtnBack(backText), null); jPanel.add(getBtnNext(nextText), null); jPanel.add(getBtnFinish(finishText), null); jPanel.add(get... | /**
* This method initializes jPanel
*
* @return javax.swing.JPanel
*/ | This method initializes jPanel | getJPanel | {
"repo_name": "iCarto/siga",
"path": "libIverUtiles/src/com/iver/utiles/swing/wizard/Wizard.java",
"license": "gpl-3.0",
"size": 8797
} | [
"java.awt.Dimension",
"javax.swing.JPanel"
] | import java.awt.Dimension; import javax.swing.JPanel; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 2,136,078 |
public static boolean isSafari(HttpServletRequest request) {
return isSafari(getUserAgent(request));
} | static boolean function(HttpServletRequest request) { return isSafari(getUserAgent(request)); } | /**
* Returns true if the user-agent indicates a Safari browser.
* @param request
* @return true if the user-agent indicates a Safari browser..
*/ | Returns true if the user-agent indicates a Safari browser | isSafari | {
"repo_name": "auroreallibe/Silverpeas-Core",
"path": "core-web/src/main/java/org/silverpeas/core/web/util/ClientBrowserUtil.java",
"license": "agpl-3.0",
"size": 8201
} | [
"javax.servlet.http.HttpServletRequest"
] | import javax.servlet.http.HttpServletRequest; | import javax.servlet.http.*; | [
"javax.servlet"
] | javax.servlet; | 1,422,396 |
public void enablePeer(String id) throws IOException {
changePeerState(id, PeerState.ENABLED);
LOG.info("peer " + id + " is enabled");
} | void function(String id) throws IOException { changePeerState(id, PeerState.ENABLED); LOG.info(STR + id + STR); } | /**
* Enable replication to the peer
*
* @param id peer's identifier
* @throws IllegalArgumentException
* Thrown when the peer doesn't exist
*/ | Enable replication to the peer | enablePeer | {
"repo_name": "JichengSong/hbase",
"path": "src/main/java/org/apache/hadoop/hbase/replication/ReplicationZookeeper.java",
"license": "apache-2.0",
"size": 34562
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,835,836 |
@Test public void testUserDefinedAggregateFunctionWithFilter() throws Exception {
final String sum = Smalls.MyStaticSumFunction.class.getName();
final String sum2 = Smalls.MySumFunction.class.getName();
final CalciteAssert.AssertThat with = CalciteAssert.model("{\n"
+ " version: '1.0',\n"
... | @Test void function() throws Exception { final String sum = Smalls.MyStaticSumFunction.class.getName(); final String sum2 = Smalls.MySumFunction.class.getName(); final CalciteAssert.AssertThat with = CalciteAssert.model("{\n" + STR + STR + JdbcTest.SCOTT_SCHEMA + ",\n" + STR + STR + STR + STR + STR + STR + sum + "'\n" ... | /** Tests user-defined aggregate function with FILTER.
*
* <p>Also tests that we do not try to push ADAF to JDBC source. */ | Tests user-defined aggregate function with FILTER | testUserDefinedAggregateFunctionWithFilter | {
"repo_name": "wanglan/calcite",
"path": "core/src/test/java/org/apache/calcite/test/UdfTest.java",
"license": "apache-2.0",
"size": 27172
} | [
"org.apache.calcite.util.Smalls",
"org.junit.Test"
] | import org.apache.calcite.util.Smalls; import org.junit.Test; | import org.apache.calcite.util.*; import org.junit.*; | [
"org.apache.calcite",
"org.junit"
] | org.apache.calcite; org.junit; | 1,777,844 |
public Map<String, ?> getAll() {
return preferences.getAll();
} | Map<String, ?> function() { return preferences.getAll(); } | /**
* Retrieve all values from SharedPreferences. Do not modify collection return by method
*
* @return a Map representing a list of key/value pairs from SharedPreferences
*/ | Retrieve all values from SharedPreferences. Do not modify collection return by method | getAll | {
"repo_name": "computationalcore/smartcoins-wallet",
"path": "app/src/main/java/de/bitshares_munich/utils/TinyDB.java",
"license": "mit",
"size": 23158
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 739,233 |
public EndpointServicesListResult withValue(List<EndpointServiceResultInner> value) {
this.value = value;
return this;
} | EndpointServicesListResult function(List<EndpointServiceResultInner> value) { this.value = value; return this; } | /**
* Set the value property: List of available endpoint services in a region.
*
* @param value the value value to set.
* @return the EndpointServicesListResult object itself.
*/ | Set the value property: List of available endpoint services in a region | withValue | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanagerhybrid/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/models/EndpointServicesListResult.java",
"license": "mit",
"size": 2407
} | [
"com.azure.resourcemanager.network.fluent.models.EndpointServiceResultInner",
"java.util.List"
] | import com.azure.resourcemanager.network.fluent.models.EndpointServiceResultInner; import java.util.List; | import com.azure.resourcemanager.network.fluent.models.*; import java.util.*; | [
"com.azure.resourcemanager",
"java.util"
] | com.azure.resourcemanager; java.util; | 1,496,773 |
public static Long retrieveXPathQueryAggregate(IContext context, String xpathQuery) throws CoreException
{
return component.core().retrieveXPathQueryAggregate(context, xpathQuery);
}
| static Long function(IContext context, String xpathQuery) throws CoreException { return component.core().retrieveXPathQueryAggregate(context, xpathQuery); } | /**
* Retrieves long aggregate value based on the given query (root element of the query should be an aggregate function) (synchronously).
* @param context the context.
* @param xpathQuery the aggregate xpath query (e.g. "COUNT(//System.User)").
* @return the Future object.
*/ | Retrieves long aggregate value based on the given query (root element of the query should be an aggregate function) (synchronously) | retrieveXPathQueryAggregate | {
"repo_name": "mendix/circle-diagram-widget",
"path": "test/javasource/com/mendix/core/Core.java",
"license": "apache-2.0",
"size": 76608
} | [
"com.mendix.systemwideinterfaces.core.IContext"
] | import com.mendix.systemwideinterfaces.core.IContext; | import com.mendix.systemwideinterfaces.core.*; | [
"com.mendix.systemwideinterfaces"
] | com.mendix.systemwideinterfaces; | 1,494,582 |
@Test
public void whenUseSortByAllFieldsThenReturnedSortedByNameAndAgeList() {
//Create tested instance
UserSort us = new UserSort();
//assign original List of User's
User user1 = new User("Ann", 35);
User user2 = new User("Bob", 30);
User user3 = new User("Cris"... | void function() { UserSort us = new UserSort(); User user1 = new User("Ann", 35); User user2 = new User("Bob", 30); User user3 = new User("Cris", 33); User user4 = new User("Bob", 40); User user5 = new User("Bob", 25); User user6 = new User("Cris", 28); List<User> list = new ArrayList<>(); list.addAll(Arrays.asList(use... | /**
* Test sortByAllFields method.
*/ | Test sortByAllFields method | whenUseSortByAllFieldsThenReturnedSortedByNameAndAgeList | {
"repo_name": "PavelZubaha/pzubaha",
"path": "chapter_003/src/test/java/pzubaha/comparable/UserSortTest.java",
"license": "apache-2.0",
"size": 3799
} | [
"java.util.ArrayList",
"java.util.Arrays",
"java.util.List",
"org.hamcrest.core.Is",
"org.junit.Assert"
] | import java.util.ArrayList; import java.util.Arrays; import java.util.List; import org.hamcrest.core.Is; import org.junit.Assert; | import java.util.*; import org.hamcrest.core.*; import org.junit.*; | [
"java.util",
"org.hamcrest.core",
"org.junit"
] | java.util; org.hamcrest.core; org.junit; | 1,810,952 |
public static int getIsoYear(java.util.Date date) {
Calendar cal = Calendar.getInstance();
cal.setTimeInMillis(date.getTime());
cal.setFirstDayOfWeek(Calendar.MONDAY);
cal.setMinimalDaysInFirstWeek(4);
int year = getYear(cal);
int month = cal.get(Calendar.MONTH);
... | static int function(java.util.Date date) { Calendar cal = Calendar.getInstance(); cal.setTimeInMillis(date.getTime()); cal.setFirstDayOfWeek(Calendar.MONDAY); cal.setMinimalDaysInFirstWeek(4); int year = getYear(cal); int month = cal.get(Calendar.MONTH); int week = cal.get(Calendar.WEEK_OF_YEAR); if (month == 0 && week... | /**
* Returns the year according to the ISO week definition.
*
* @author Robert Rathsack
*
* @param date the date object which year should be calculated
* @return the year
*/ | Returns the year according to the ISO week definition | getIsoYear | {
"repo_name": "votaguz/frostwire-desktop",
"path": "lib/jars-src/h2-1.4.186/src/main/org/h2/util/DateTimeUtils.java",
"license": "gpl-3.0",
"size": 29047
} | [
"java.sql.Date",
"java.util.Calendar"
] | import java.sql.Date; import java.util.Calendar; | import java.sql.*; import java.util.*; | [
"java.sql",
"java.util"
] | java.sql; java.util; | 1,256,113 |
EList<PathParametersMLT> getParameters(); | EList<PathParametersMLT> getParameters(); | /**
* Returns the value of the '<em><b>Parameters</b></em>' containment reference list.
* The list contents are of type {@link org.xtext.nv.dsl.mMDSL.PathParametersMLT}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Parameters</em>' containment reference list isn't clear,
* there really... | Returns the value of the 'Parameters' containment reference list. The list contents are of type <code>org.xtext.nv.dsl.mMDSL.PathParametersMLT</code>. If the meaning of the 'Parameters' containment reference list isn't clear, there really should be more of a description here... | getParameters | {
"repo_name": "niksavis/mm-dsl",
"path": "org.xtext.nv.dsl/src-gen/org/xtext/nv/dsl/mMDSL/SmoothQuadraticBezierCurveTo.java",
"license": "epl-1.0",
"size": 1331
} | [
"org.eclipse.emf.common.util.EList"
] | import org.eclipse.emf.common.util.EList; | import org.eclipse.emf.common.util.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,329,833 |
public void setBackLineStroke(Paint in) {
BackLineStroke = in;
BasicBackLineStrokeWidth = in.getStrokeWidth();
} | void function(Paint in) { BackLineStroke = in; BasicBackLineStrokeWidth = in.getStrokeWidth(); } | /**
* Sets the back line stroke used by the rendering object to the one passed in the parameter.
*/ | Sets the back line stroke used by the rendering object to the one passed in the parameter | setBackLineStroke | {
"repo_name": "viridian1138/VectorVictor",
"path": "VectorVictor/VectorVictor/src/geomdir/DrawObj.java",
"license": "gpl-3.0",
"size": 67536
} | [
"android.graphics.Paint"
] | import android.graphics.Paint; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 2,373,661 |
protected Type getValueType() throws Exception {
if(valueType == null) {
valueType = label.valueType();
if(valueType == void.class) {
valueType = getDependent(1);
}
}
return new ClassType(valueType);
} | Type function() throws Exception { if(valueType == null) { valueType = label.valueType(); if(valueType == void.class) { valueType = getDependent(1); } } return new ClassType(valueType); } | /**
* This is used to acquire the dependent value for the annotated
* map. This will simply return the type that the map object is
* composed to hold. This must be a serializable type, that is,
* it must be a composite or supported primitive type.
*
* @return this returns the value object type ... | This is used to acquire the dependent value for the annotated map. This will simply return the type that the map object is composed to hold. This must be a serializable type, that is, it must be a composite or supported primitive type | getValueType | {
"repo_name": "glorycloud/GloryMail",
"path": "CloudyMail/lib_src/org/simpleframework/xml/core/Entry.java",
"license": "apache-2.0",
"size": 10616
} | [
"org.simpleframework.xml.strategy.Type"
] | import org.simpleframework.xml.strategy.Type; | import org.simpleframework.xml.strategy.*; | [
"org.simpleframework.xml"
] | org.simpleframework.xml; | 1,908,846 |
private String updateUrl(String url) {
Uri newUrl = Uri.parse(url);
if (newUrl.isRelative()) {
url = this.webView.getUrl().substring(0, this.webView.getUrl().lastIndexOf("/")+1) + url;
}
return url;
} | String function(String url) { Uri newUrl = Uri.parse(url); if (newUrl.isRelative()) { url = this.webView.getUrl().substring(0, this.webView.getUrl().lastIndexOf("/")+1) + url; } return url; } | /**
* Convert relative URL to full path
*
* @param url
* @return
*/ | Convert relative URL to full path | updateUrl | {
"repo_name": "feddu/jpHolo",
"path": "src/org/apache/cordova/inappbrowser/InAppBrowser.java",
"license": "lgpl-3.0",
"size": 32059
} | [
"android.net.Uri"
] | import android.net.Uri; | import android.net.*; | [
"android.net"
] | android.net; | 1,830,448 |
public JSONObject executeScriptSync(String script, boolean useSeparateIsolate, Tab tab) {
JSONCallbackHelper callbackHelper = new JSONCallbackHelper();
int count = callbackHelper.getCallCount();
TestThreadUtils.runOnUiThreadBlocking(() -> {
Tab scriptTab = tab == null ? getActivi... | JSONObject function(String script, boolean useSeparateIsolate, Tab tab) { JSONCallbackHelper callbackHelper = new JSONCallbackHelper(); int count = callbackHelper.getCallCount(); TestThreadUtils.runOnUiThreadBlocking(() -> { Tab scriptTab = tab == null ? getActivity().getBrowser().getActiveTab() : tab; scriptTab.execut... | /**
* Executes the script passed in and waits for the result.
*/ | Executes the script passed in and waits for the result | executeScriptSync | {
"repo_name": "endlessm/chromium-browser",
"path": "weblayer/browser/android/javatests/src/org/chromium/weblayer/test/InstrumentationActivityTestRule.java",
"license": "bsd-3-clause",
"size": 11513
} | [
"java.util.concurrent.TimeoutException",
"org.chromium.content_public.browser.test.util.TestThreadUtils",
"org.chromium.weblayer.Tab",
"org.json.JSONObject"
] | import java.util.concurrent.TimeoutException; import org.chromium.content_public.browser.test.util.TestThreadUtils; import org.chromium.weblayer.Tab; import org.json.JSONObject; | import java.util.concurrent.*; import org.chromium.content_public.browser.test.util.*; import org.chromium.weblayer.*; import org.json.*; | [
"java.util",
"org.chromium.content_public",
"org.chromium.weblayer",
"org.json"
] | java.util; org.chromium.content_public; org.chromium.weblayer; org.json; | 47,318 |
@RequestMapping(value = "admin/user/update", method = RequestMethod.PUT)
@ResponseStatus(HttpStatus.OK)
@TransactionAttribute(TransactionAttributeType.REQUIRED)
public void update(HttpServletRequest request, @RequestBody User user) throws ValidationException, OPMException {
String signature = CL... | @RequestMapping(value = STR, method = RequestMethod.PUT) @ResponseStatus(HttpStatus.OK) @TransactionAttribute(TransactionAttributeType.REQUIRED) void function(HttpServletRequest request, @RequestBody User user) throws ValidationException, OPMException { String signature = CLASS_NAME + STR; Logger logger = getLogger(); ... | /**
* Updates the user entity.
*
* @param request
* the http servlet request
* @param user
* the user to update
*
* @throws ValidationException
* if user is null or does not exist, or if user's supervisor is himself
* @throws OPMExcepti... | Updates the user entity | update | {
"repo_name": "NASA-Tournament-Lab/CoECI-OPM-Service-Credit-Redeposit-Deposit-Application",
"path": "Code/SCRD_BRE/src/java/web/gov/opm/scrd/web/controllers/AdminController.java",
"license": "apache-2.0",
"size": 11645
} | [
"gov.opm.scrd.LoggingHelper",
"gov.opm.scrd.entities.application.User",
"gov.opm.scrd.services.OPMException",
"java.util.Arrays",
"javax.ejb.TransactionAttribute",
"javax.ejb.TransactionAttributeType",
"javax.servlet.http.HttpServletRequest",
"org.jboss.logging.Logger",
"org.springframework.http.Htt... | import gov.opm.scrd.LoggingHelper; import gov.opm.scrd.entities.application.User; import gov.opm.scrd.services.OPMException; import java.util.Arrays; import javax.ejb.TransactionAttribute; import javax.ejb.TransactionAttributeType; import javax.servlet.http.HttpServletRequest; import org.jboss.logging.Logger; import or... | import gov.opm.scrd.*; import gov.opm.scrd.entities.application.*; import gov.opm.scrd.services.*; import java.util.*; import javax.ejb.*; import javax.servlet.http.*; import org.jboss.logging.*; import org.springframework.http.*; import org.springframework.web.bind.annotation.*; | [
"gov.opm.scrd",
"java.util",
"javax.ejb",
"javax.servlet",
"org.jboss.logging",
"org.springframework.http",
"org.springframework.web"
] | gov.opm.scrd; java.util; javax.ejb; javax.servlet; org.jboss.logging; org.springframework.http; org.springframework.web; | 2,560,438 |
return mForegroundGravity;
}
/**
* Describes how the foreground is positioned. Defaults to START and TOP.
*
* @param foregroundGravity See {@link android.view.Gravity} | return mForegroundGravity; } /** * Describes how the foreground is positioned. Defaults to START and TOP. * * @param foregroundGravity See {@link android.view.Gravity} | /**
* Describes how the foreground is positioned.
*
* @return foreground gravity.
* @see #setForegroundGravity(int)
*/ | Describes how the foreground is positioned | getForegroundGravity | {
"repo_name": "soarcn/COCO-Accessory",
"path": "views/src/main/java/com/cocosw/accessory/views/foreground/ForegroundRelativeLayout.java",
"license": "apache-2.0",
"size": 6436
} | [
"android.view.Gravity"
] | import android.view.Gravity; | import android.view.*; | [
"android.view"
] | android.view; | 1,475,490 |
@Override
public List findByDocumentHeaderIdAndLineType(Class clazz, String documentHeaderId, String lineType) {
Criteria criteria = new Criteria();
criteria.addEqualTo("FDOC_NBR", documentHeaderId);
criteria.addEqualTo("FDOC_LN_TYP_CD", lineType);
QueryByCriteria query = QueryFa... | List function(Class clazz, String documentHeaderId, String lineType) { Criteria criteria = new Criteria(); criteria.addEqualTo(STR, documentHeaderId); criteria.addEqualTo(STR, lineType); QueryByCriteria query = QueryFactory.newQuery(clazz, criteria); Collection lines = findCollection(query); return new ArrayList(lines)... | /**
* Retrieves accounting lines associated with the given document header ID and line type code
*
* @see org.kuali.kfs.sys.dataaccess.AccountingLineDao#findByDocumentHeaderIdAndLineType(java.lang.String, java.lang.String)
*/ | Retrieves accounting lines associated with the given document header ID and line type code | findByDocumentHeaderIdAndLineType | {
"repo_name": "quikkian-ua-devops/will-financials",
"path": "kfs-core/src/main/java/org/kuali/kfs/sys/dataaccess/impl/AccountingLineDaoOjb.java",
"license": "agpl-3.0",
"size": 4189
} | [
"java.util.ArrayList",
"java.util.Collection",
"java.util.List",
"org.apache.ojb.broker.query.Criteria",
"org.apache.ojb.broker.query.QueryByCriteria",
"org.apache.ojb.broker.query.QueryFactory"
] | import java.util.ArrayList; import java.util.Collection; import java.util.List; import org.apache.ojb.broker.query.Criteria; import org.apache.ojb.broker.query.QueryByCriteria; import org.apache.ojb.broker.query.QueryFactory; | import java.util.*; import org.apache.ojb.broker.query.*; | [
"java.util",
"org.apache.ojb"
] | java.util; org.apache.ojb; | 2,797,924 |
public synchronized void schedule(ScheduledJob scheduledJob) {
String id = scheduledJob.getId();
String cronExpression = scheduledJob.getCronExpression();
String name = scheduledJob.getName();
// Validate cron expression
if (!CronExpression.isValidExpression(cronExpression)) {
throw new Mol... | synchronized void function(ScheduledJob scheduledJob) { String id = scheduledJob.getId(); String cronExpression = scheduledJob.getCronExpression(); String name = scheduledJob.getName(); if (!CronExpression.isValidExpression(cronExpression)) { throw new MolgenisValidationException( singleton( new ConstraintViolation(STR... | /**
* Schedule a {@link ScheduledJob} with a cron expression defined in the entity.
*
* <p>Reschedules job if the job already exists.
*
* <p>If active is false, it unschedules the job
*
* @param scheduledJob the {@link ScheduledJob} to schedule
*/ | Schedule a <code>ScheduledJob</code> with a cron expression defined in the entity. Reschedules job if the job already exists. If active is false, it unschedules the job | schedule | {
"repo_name": "sidohaakma/molgenis",
"path": "molgenis-jobs/src/main/java/org/molgenis/jobs/schedule/JobScheduler.java",
"license": "lgpl-3.0",
"size": 5477
} | [
"java.util.Collections",
"org.molgenis.data.validation.MolgenisValidationException",
"org.molgenis.jobs.model.ScheduledJob",
"org.molgenis.validation.ConstraintViolation",
"org.quartz.CronExpression",
"org.quartz.JobKey",
"org.quartz.SchedulerException",
"org.quartz.Trigger",
"org.quartz.TriggerBuil... | import java.util.Collections; import org.molgenis.data.validation.MolgenisValidationException; import org.molgenis.jobs.model.ScheduledJob; import org.molgenis.validation.ConstraintViolation; import org.quartz.CronExpression; import org.quartz.JobKey; import org.quartz.SchedulerException; import org.quartz.Trigger; imp... | import java.util.*; import org.molgenis.data.validation.*; import org.molgenis.jobs.model.*; import org.molgenis.validation.*; import org.quartz.*; | [
"java.util",
"org.molgenis.data",
"org.molgenis.jobs",
"org.molgenis.validation",
"org.quartz"
] | java.util; org.molgenis.data; org.molgenis.jobs; org.molgenis.validation; org.quartz; | 2,200,227 |
private ArchiveInfo[] findDependency(Package pkg,
Collection<ArchiveInfo> outArchives,
Collection<Archive> selectedArchives,
Collection<Package> remotePkgs,
SdkSource[] remoteSources,
ArchiveInfo[] localArchives) {
// Current dependencies can be:
... | ArchiveInfo[] function(Package pkg, Collection<ArchiveInfo> outArchives, Collection<Archive> selectedArchives, Collection<Package> remotePkgs, SdkSource[] remoteSources, ArchiveInfo[] localArchives) { Set<ArchiveInfo> aiFound = new HashSet<ArchiveInfo>(); if (pkg instanceof IPlatformDependency) { ArchiveInfo ai = findP... | /**
* Resolves dependencies for a given package.
*
* Returns null if no dependencies were found.
* Otherwise return an array of {@link ArchiveInfo}, which is guaranteed to have
* at least size 1 and contain no null elements.
*/ | Resolves dependencies for a given package. Returns null if no dependencies were found. Otherwise return an array of <code>ArchiveInfo</code>, which is guaranteed to have at least size 1 and contain no null elements | findDependency | {
"repo_name": "consulo/consulo-android",
"path": "tools-base/sdklib/src/main/java/com/android/sdklib/internal/repository/updater/SdkUpdaterLogic.java",
"license": "apache-2.0",
"size": 63861
} | [
"com.android.sdklib.internal.repository.archives.Archive",
"com.android.sdklib.internal.repository.packages.IExactApiLevelDependency",
"com.android.sdklib.internal.repository.packages.IMinApiLevelDependency",
"com.android.sdklib.internal.repository.packages.IMinPlatformToolsDependency",
"com.android.sdklib.... | import com.android.sdklib.internal.repository.archives.Archive; import com.android.sdklib.internal.repository.packages.IExactApiLevelDependency; import com.android.sdklib.internal.repository.packages.IMinApiLevelDependency; import com.android.sdklib.internal.repository.packages.IMinPlatformToolsDependency; import com.a... | import com.android.sdklib.internal.repository.archives.*; import com.android.sdklib.internal.repository.packages.*; import com.android.sdklib.internal.repository.sources.*; import java.util.*; | [
"com.android.sdklib",
"java.util"
] | com.android.sdklib; java.util; | 2,238,910 |
public static Collection<LineageEventBuilder> load(Collection<? extends State> states) {
Preconditions.checkArgument(states != null && !states.isEmpty());
Set<LineageEventBuilder> allEvents = Sets.newHashSet();
for (State state : states) {
Map<String, Set<LineageEventBuilder>> branchedEvents = load(... | static Collection<LineageEventBuilder> function(Collection<? extends State> states) { Preconditions.checkArgument(states != null && !states.isEmpty()); Set<LineageEventBuilder> allEvents = Sets.newHashSet(); for (State state : states) { Map<String, Set<LineageEventBuilder>> branchedEvents = load(state); branchedEvents.... | /**
* Load all lineage information from {@link State}s of a dataset
*
* @param states All states which belong to the same dataset
* @return A collection of {@link LineageEventBuilder}s put in the state
*/ | Load all lineage information from <code>State</code>s of a dataset | load | {
"repo_name": "shirshanka/gobblin",
"path": "gobblin-metrics-libs/gobblin-metrics-base/src/main/java/org/apache/gobblin/metrics/event/lineage/LineageInfo.java",
"license": "apache-2.0",
"size": 13764
} | [
"com.google.common.base.Preconditions",
"com.google.common.collect.Sets",
"java.util.Collection",
"java.util.Map",
"java.util.Set",
"org.apache.gobblin.configuration.State"
] | import com.google.common.base.Preconditions; import com.google.common.collect.Sets; import java.util.Collection; import java.util.Map; import java.util.Set; import org.apache.gobblin.configuration.State; | import com.google.common.base.*; import com.google.common.collect.*; import java.util.*; import org.apache.gobblin.configuration.*; | [
"com.google.common",
"java.util",
"org.apache.gobblin"
] | com.google.common; java.util; org.apache.gobblin; | 2,382,371 |
public void switchoff(final boolean killTasks) throws StateChangeException {
if (currState != State.RUNNING && currState != State.STARTUP) {
throw new StateChangeException("Cannot switch off a not running machine");
}
if (killTasks) {
suspendedTasks = new ArrayList<ResourceConsumption>(underProcessing);
... | void function(final boolean killTasks) throws StateChangeException { if (currState != State.RUNNING && currState != State.STARTUP) { throw new StateChangeException(STR); } if (killTasks) { suspendedTasks = new ArrayList<ResourceConsumption>(underProcessing); for (final ResourceConsumption con : suspendedTasks) { con.ca... | /**
* Switches off an already running machine. After the successful execution of
* this function, the VM's state will be shutdown.
*
* @throws StateChangeException
* if is not running currently
*/ | Switches off an already running machine. After the successful execution of this function, the VM's state will be shutdown | switchoff | {
"repo_name": "kecskemeti/dissect-cf",
"path": "src/main/java/hu/mta/sztaki/lpds/cloud/simulator/iaas/VirtualMachine.java",
"license": "lgpl-3.0",
"size": 44423
} | [
"hu.mta.sztaki.lpds.cloud.simulator.iaas.resourcemodel.ResourceConsumption",
"java.util.ArrayList"
] | import hu.mta.sztaki.lpds.cloud.simulator.iaas.resourcemodel.ResourceConsumption; import java.util.ArrayList; | import hu.mta.sztaki.lpds.cloud.simulator.iaas.resourcemodel.*; import java.util.*; | [
"hu.mta.sztaki",
"java.util"
] | hu.mta.sztaki; java.util; | 138,263 |
private void createNewDirectory(String newDirName) {
if (createSubDir(mCurrentDir + "/" + newDirName)) {
//navigate to newly created directory
mCurrentDir += "/" + newDirName;
paths.push(newDirName);
mShowNewFolderPanel = false;
updateDirectory();
... | void function(String newDirName) { if (createSubDir(mCurrentDir + "/" + newDirName)) { mCurrentDir += "/" + newDirName; paths.push(newDirName); mShowNewFolderPanel = false; updateDirectory(); } else { Toast.makeText(mContext, mContext.getString(R.string.error_create_dir) + " " + newDirName, Toast.LENGTH_LONG).show(); }... | /**
* creates new directory and navigates to it
* @param newDirName name of the new directory to be created
*/ | creates new directory and navigates to it | createNewDirectory | {
"repo_name": "fuzz-productions/LimeLight",
"path": "src/main/java/com/fuzz/android/limelight/recorder/widget/filedialog/FileDirectoryDialog.java",
"license": "mpl-2.0",
"size": 23683
} | [
"android.widget.Toast"
] | import android.widget.Toast; | import android.widget.*; | [
"android.widget"
] | android.widget; | 1,803,044 |
public Texture loadTexture(TextureKey key); | Texture function(TextureKey key); | /**
* Loads texture file, supported types are BMP, JPG, PNG, GIF,
* TGA, DDS, PFM, and HDR.
*
* @param key The {@link TextureKey} to use for loading.
* @return The loaded texture, or null if failed to be loaded.
*
* @see AssetManager#loadAsset(com.jme3.asset.AssetKey)
*/ | Loads texture file, supported types are BMP, JPG, PNG, GIF, TGA, DDS, PFM, and HDR | loadTexture | {
"repo_name": "atomixnmc/jmonkeyengine",
"path": "jme3-core/src/main/java/com/jme3/asset/AssetManager.java",
"license": "bsd-3-clause",
"size": 16537
} | [
"com.jme3.texture.Texture"
] | import com.jme3.texture.Texture; | import com.jme3.texture.*; | [
"com.jme3.texture"
] | com.jme3.texture; | 2,410,876 |
TimeLine_Fragment fragment = new TimeLine_Fragment();
Bundle args = new Bundle();
args.putString(ARG_PASSWORD, passw_string);
fragment.setArguments(args);
return fragment;
}
public TimeLine_Fragment() {
// super();
// Required empty public constructor
}
| TimeLine_Fragment fragment = new TimeLine_Fragment(); Bundle args = new Bundle(); args.putString(ARG_PASSWORD, passw_string); fragment.setArguments(args); return fragment; } public TimeLine_Fragment() { } | /**
* Use this factory method to create a new instance of this fragment using
* the provided parameters.
* @param passw_string
*
* @param param1
* Parameter 1.
* @param param2
* Parameter 2.
* @return A new instance of fragment BlankFragment.
*/ | Use this factory method to create a new instance of this fragment using the provided parameters | newInstance | {
"repo_name": "collab-uniba/socialcde4android",
"path": "Socialcde4android/src/it/uniba/socialcde4android/fragments/TimeLine_Fragment.java",
"license": "mit",
"size": 5638
} | [
"android.os.Bundle",
"android.support.v4.app.Fragment"
] | import android.os.Bundle; import android.support.v4.app.Fragment; | import android.os.*; import android.support.v4.app.*; | [
"android.os",
"android.support"
] | android.os; android.support; | 2,107,737 |
public final ErrorListener getErrorListener()
{
if (null != m_errorListener)
return m_errorListener;
ErrorListener retval = null;
try {
if (null != m_ownerGetErrorListener)
retval = (ErrorListener) m_ownerGetErrorListener.invoke(m_owner, new Object[] {});
}
catch (Except... | final ErrorListener function() { if (null != m_errorListener) return m_errorListener; ErrorListener retval = null; try { if (null != m_ownerGetErrorListener) retval = (ErrorListener) m_ownerGetErrorListener.invoke(m_owner, new Object[] {}); } catch (Exception e) {} if (null == retval) { if (null == m_defaultErrorListen... | /**
* Get the ErrorListener where errors and warnings are to be reported.
*
* @return A non-null ErrorListener reference.
*/ | Get the ErrorListener where errors and warnings are to be reported | getErrorListener | {
"repo_name": "md-5/jdk10",
"path": "src/java.xml/share/classes/com/sun/org/apache/xpath/internal/XPathContext.java",
"license": "gpl-2.0",
"size": 40051
} | [
"javax.xml.transform.ErrorListener"
] | import javax.xml.transform.ErrorListener; | import javax.xml.transform.*; | [
"javax.xml"
] | javax.xml; | 871,853 |
public void setRuleSet(RuleSet rules); | void function(RuleSet rules); | /**
* Sets the RuleSet.
* @param rules the RuleSet object
*/ | Sets the RuleSet | setRuleSet | {
"repo_name": "DilvanLab/SWRLVisualEditor",
"path": "src/br/usp/icmc/dilvan/swrlEditor/server/swrleditor/decisiontree/GenerateNodeRootDecisionTree.java",
"license": "gpl-3.0",
"size": 1329
} | [
"br.usp.icmc.dilvan.swrlEditor.client.rpc.swrleditor.RuleSet"
] | import br.usp.icmc.dilvan.swrlEditor.client.rpc.swrleditor.RuleSet; | import br.usp.icmc.dilvan.*; | [
"br.usp.icmc"
] | br.usp.icmc; | 1,336,798 |
private synchronized RouteList getRouteList() {
if (logger.isLoggingEnabled(LogWriter.TRACE_DEBUG))
logger.logDebug("getRouteList " + this);
// Find the top via in the route list.
ListIterator li;
RouteList retval = new RouteList();
retval = new RouteList();
... | synchronized RouteList function() { if (logger.isLoggingEnabled(LogWriter.TRACE_DEBUG)) logger.logDebug(STR + this); ListIterator li; RouteList retval = new RouteList(); retval = new RouteList(); if (this.routeList != null) { li = routeList.listIterator(); while (li.hasNext()) { Route route = (Route) li.next(); retval.... | /**
* Get a cloned copy of route list for the Dialog.
*
* @return -- a cloned copy of the dialog route list.
*/ | Get a cloned copy of route list for the Dialog | getRouteList | {
"repo_name": "fhg-fokus-nubomedia/signaling-plane",
"path": "modules/lib-sip/src/main/java/gov/nist/javax/sip/stack/SIPDialog.java",
"license": "apache-2.0",
"size": 170278
} | [
"gov.nist.core.LogWriter",
"gov.nist.javax.sip.header.Route",
"gov.nist.javax.sip.header.RouteList",
"java.util.ListIterator"
] | import gov.nist.core.LogWriter; import gov.nist.javax.sip.header.Route; import gov.nist.javax.sip.header.RouteList; import java.util.ListIterator; | import gov.nist.core.*; import gov.nist.javax.sip.header.*; import java.util.*; | [
"gov.nist.core",
"gov.nist.javax",
"java.util"
] | gov.nist.core; gov.nist.javax; java.util; | 1,082,733 |
public static Timeline startFadeIn(Object view) {
Timeline animation = createFadeInAnimation(view);
animation.play();
return animation;
} | static Timeline function(Object view) { Timeline animation = createFadeInAnimation(view); animation.play(); return animation; } | /**
* Fade in the view.
*
* @param view The view to fade in.
*
* @return The timeline animation.
*/ | Fade in the view | startFadeIn | {
"repo_name": "wichtounet/jtheque-core",
"path": "jtheque-ui/src/main/java/org/jtheque/ui/utils/AnimationUtils.java",
"license": "apache-2.0",
"size": 4275
} | [
"org.pushingpixels.trident.Timeline"
] | import org.pushingpixels.trident.Timeline; | import org.pushingpixels.trident.*; | [
"org.pushingpixels.trident"
] | org.pushingpixels.trident; | 191,148 |
@Generated
@Selector("signpostCategory")
public native String signpostCategory(); | @Selector(STR) native String function(); | /**
* [@property] signpostCategory
* <p>
* The category associated with this aggregated signpost.
*/ | [@property] signpostCategory The category associated with this aggregated signpost | signpostCategory | {
"repo_name": "multi-os-engine/moe-core",
"path": "moe.apple/moe.platform.ios/src/main/java/apple/metrickit/MXSignpostMetric.java",
"license": "apache-2.0",
"size": 6060
} | [
"org.moe.natj.objc.ann.Selector"
] | import org.moe.natj.objc.ann.Selector; | import org.moe.natj.objc.ann.*; | [
"org.moe.natj"
] | org.moe.natj; | 67,378 |
private HashMap<String, INode> createHash(IContext context) {
HashMap<String, INode> result = new HashMap<>();
int nodeCount = 0;
for (Iterator<INode> i = context.nodeIterator(); i.hasNext(); ) {
INode node = i.next();
result.put(getPathToRoot(node), node);
... | HashMap<String, INode> function(IContext context) { HashMap<String, INode> result = new HashMap<>(); int nodeCount = 0; for (Iterator<INode> i = context.nodeIterator(); i.hasNext(); ) { INode node = i.next(); result.put(getPathToRoot(node), node); nodeCount++; } if (log.isInfoEnabled()) { log.info(STR + nodeCount + STR... | /**
* Creates hash map for nodes which contains path from root to node for each node.
*
* @param context a context
* @return a hash table which contains path from root to node for each node
*/ | Creates hash map for nodes which contains path from root to node for each node | createHash | {
"repo_name": "s-match/s-match-core",
"path": "src/main/java/it/unitn/disi/smatch/loaders/mapping/TabPathMappingLoader.java",
"license": "lgpl-2.1",
"size": 4872
} | [
"it.unitn.disi.smatch.data.trees.IContext",
"it.unitn.disi.smatch.data.trees.INode",
"java.util.HashMap",
"java.util.Iterator"
] | import it.unitn.disi.smatch.data.trees.IContext; import it.unitn.disi.smatch.data.trees.INode; import java.util.HashMap; import java.util.Iterator; | import it.unitn.disi.smatch.data.trees.*; import java.util.*; | [
"it.unitn.disi",
"java.util"
] | it.unitn.disi; java.util; | 1,812,368 |
void processPendingNotifications() {
RemovalNotification<K, V> notification;
while ((notification = removalNotificationQueue.poll()) != null) {
try {
removalListener.onRemoval(notification);
} catch (Exception e) {
logger.log(Level.WARNING, "Exception thrown by removal listener", e... | void processPendingNotifications() { RemovalNotification<K, V> notification; while ((notification = removalNotificationQueue.poll()) != null) { try { removalListener.onRemoval(notification); } catch (Exception e) { logger.log(Level.WARNING, STR, e); } } } | /**
* Notifies listeners that an entry has been automatically removed due to expiration, eviction,
* or eligibility for garbage collection. This should be called every time expireEntries or
* evictEntry is called (once the lock is released).
*/ | Notifies listeners that an entry has been automatically removed due to expiration, eviction, or eligibility for garbage collection. This should be called every time expireEntries or evictEntry is called (once the lock is released) | processPendingNotifications | {
"repo_name": "10xEngineer/My-Wallet-Android",
"path": "src/com/google/common/collect/MapMakerInternalMap.java",
"license": "gpl-3.0",
"size": 121941
} | [
"com.google.common.collect.MapMaker",
"java.util.logging.Level"
] | import com.google.common.collect.MapMaker; import java.util.logging.Level; | import com.google.common.collect.*; import java.util.logging.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 950,221 |
public void putPrivateKey(PrivateKey key) throws CardServiceException {
try {
byte[] encodedPriv = key.getEncoded();
BERTLVObject encodedPrivObject = BERTLVObject
.getInstance(new ByteArrayInputStream(encodedPriv));
byte[] privKeyData = (byte[]) encodedPrivObject.getChildByIndex(2)
.getValue();
... | void function(PrivateKey key) throws CardServiceException { try { byte[] encodedPriv = key.getEncoded(); BERTLVObject encodedPrivObject = BERTLVObject .getInstance(new ByteArrayInputStream(encodedPriv)); byte[] privKeyData = (byte[]) encodedPrivObject.getChildByIndex(2) .getValue(); BERTLVObject privKeyDataObject = BER... | /**
* Sends a PUT_DATA command to the card to set the private key used for
* Active Authentication.
*
* @param key holding the private key data.
* @throws CardServiceException on error.
*/ | Sends a PUT_DATA command to the card to set the private key used for Active Authentication | putPrivateKey | {
"repo_name": "Qingbao/SmartID",
"path": "src/smartid/hig/no/services/PersoService.java",
"license": "lgpl-2.1",
"size": 12048
} | [
"java.io.ByteArrayInputStream",
"java.io.IOException",
"java.security.PrivateKey",
"net.sourceforge.scuba.smartcards.CardServiceException",
"net.sourceforge.scuba.tlv.BERTLVObject"
] | import java.io.ByteArrayInputStream; import java.io.IOException; import java.security.PrivateKey; import net.sourceforge.scuba.smartcards.CardServiceException; import net.sourceforge.scuba.tlv.BERTLVObject; | import java.io.*; import java.security.*; import net.sourceforge.scuba.smartcards.*; import net.sourceforge.scuba.tlv.*; | [
"java.io",
"java.security",
"net.sourceforge.scuba"
] | java.io; java.security; net.sourceforge.scuba; | 1,334,803 |
public GenericFeature searchFeatureByName(String featureName) {
return this.features.get(featureName);
}
| GenericFeature function(String featureName) { return this.features.get(featureName); } | /**
* Searches for the feature matching the given feature name.
*
* @param featureName The feature's name whose associated feature is to be returned.
* @return The feature matching the given name if found, or null if it is not found.
*/ | Searches for the feature matching the given feature name | searchFeatureByName | {
"repo_name": "cvidalmsu/FaMA",
"path": "reasoner_choco_3/src/co/icesi/i2t/Choco3Reasoner/simple/Choco3Reasoner.java",
"license": "lgpl-3.0",
"size": 49991
} | [
"es.us.isa.FAMA"
] | import es.us.isa.FAMA; | import es.us.isa.*; | [
"es.us.isa"
] | es.us.isa; | 2,403,159 |
@ExperimentalCarApi
void removeEvStatusListener(@NonNull OnCarDataAvailableListener<EvStatus> listener); | void removeEvStatusListener(@NonNull OnCarDataAvailableListener<EvStatus> listener); | /**
* Remove an ongoing listener for {@link EvStatus} information.
*
* <p>If the listener is not currently added, then nothing will be removed.
*
* @param listener the listener to remove
*/ | Remove an ongoing listener for <code>EvStatus</code> information. If the listener is not currently added, then nothing will be removed | removeEvStatusListener | {
"repo_name": "AndroidX/androidx",
"path": "car/app/app/src/main/java/androidx/car/app/hardware/info/CarInfo.java",
"license": "apache-2.0",
"size": 6063
} | [
"androidx.annotation.NonNull",
"androidx.car.app.hardware.common.OnCarDataAvailableListener"
] | import androidx.annotation.NonNull; import androidx.car.app.hardware.common.OnCarDataAvailableListener; | import androidx.annotation.*; import androidx.car.app.hardware.common.*; | [
"androidx.annotation",
"androidx.car"
] | androidx.annotation; androidx.car; | 158,778 |
public static RespawnPlayerEvent createRespawnPlayerEvent(Game game, Cause cause, Transform<World> fromTransform, Transform<World> toTransform, Player targetEntity, boolean bedSpawn) {
Map<String, Object> values = Maps.newHashMap();
values.put("game", game);
values.put("cause", cause);
... | static RespawnPlayerEvent function(Game game, Cause cause, Transform<World> fromTransform, Transform<World> toTransform, Player targetEntity, boolean bedSpawn) { Map<String, Object> values = Maps.newHashMap(); values.put("game", game); values.put("cause", cause); values.put(STR, fromTransform); values.put(STR, toTransf... | /**
* AUTOMATICALLY GENERATED, DO NOT EDIT.
* Creates a new instance of
* {@link org.spongepowered.api.event.entity.living.player.RespawnPlayerEvent}.
*
* @param game The game
* @param cause The cause
* @param fromTransform The from transform
* @param toTransform The to transfor... | AUTOMATICALLY GENERATED, DO NOT EDIT. Creates a new instance of <code>org.spongepowered.api.event.entity.living.player.RespawnPlayerEvent</code> | createRespawnPlayerEvent | {
"repo_name": "jamierocks/SpongeAPI",
"path": "src/main/java/org/spongepowered/api/event/SpongeEventFactory.java",
"license": "mit",
"size": 196993
} | [
"com.google.common.collect.Maps",
"java.util.Map",
"org.spongepowered.api.Game",
"org.spongepowered.api.entity.Transform",
"org.spongepowered.api.entity.living.player.Player",
"org.spongepowered.api.event.cause.Cause",
"org.spongepowered.api.event.entity.living.player.RespawnPlayerEvent",
"org.spongep... | import com.google.common.collect.Maps; import java.util.Map; import org.spongepowered.api.Game; import org.spongepowered.api.entity.Transform; import org.spongepowered.api.entity.living.player.Player; import org.spongepowered.api.event.cause.Cause; import org.spongepowered.api.event.entity.living.player.RespawnPlayerEv... | import com.google.common.collect.*; import java.util.*; import org.spongepowered.api.*; import org.spongepowered.api.entity.*; import org.spongepowered.api.entity.living.player.*; import org.spongepowered.api.event.cause.*; import org.spongepowered.api.event.entity.living.player.*; import org.spongepowered.api.world.*; | [
"com.google.common",
"java.util",
"org.spongepowered.api"
] | com.google.common; java.util; org.spongepowered.api; | 2,173,253 |
UserCollection getUsers(GetGroupRequest request); | UserCollection getUsers(GetGroupRequest request); | /**
* Retrieves the Users collection referenced by this resource.
*/ | Retrieves the Users collection referenced by this resource | getUsers | {
"repo_name": "smartpcr/aws-sdk-java-resources",
"path": "aws-resources-iam/src/main/java/com/amazonaws/resources/identitymanagement/Group.java",
"license": "apache-2.0",
"size": 16248
} | [
"com.amazonaws.services.identitymanagement.model.GetGroupRequest"
] | import com.amazonaws.services.identitymanagement.model.GetGroupRequest; | import com.amazonaws.services.identitymanagement.model.*; | [
"com.amazonaws.services"
] | com.amazonaws.services; | 751,987 |
public ByteSizeValue partSize() {
return partSize;
} | ByteSizeValue function() { return partSize; } | /**
* Returns part size
*
* @return part size
*/ | Returns part size | partSize | {
"repo_name": "gmile/elasticsearch",
"path": "src/main/java/org/elasticsearch/index/snapshots/blobstore/BlobStoreIndexShardSnapshot.java",
"license": "apache-2.0",
"size": 18309
} | [
"org.elasticsearch.common.unit.ByteSizeValue"
] | import org.elasticsearch.common.unit.ByteSizeValue; | import org.elasticsearch.common.unit.*; | [
"org.elasticsearch.common"
] | org.elasticsearch.common; | 1,014,973 |
public List<Integer> getPitchClasses() {
List<Integer> pitchClasses = new ArrayList<Integer>();
for (MIDINote n : this) {
int pc = n.getPitch().getMidiNumber() % 12;
pitchClasses.add(pc);
}
return pitchClasses;
} | List<Integer> function() { List<Integer> pitchClasses = new ArrayList<Integer>(); for (MIDINote n : this) { int pc = n.getPitch().getMidiNumber() % 12; pitchClasses.add(pc); } return pitchClasses; } | /**
* Create a {@code List} of all the {@code MIDINote}'s pitch classes.
*
* @return a List of the pitch classes
*/ | Create a List of all the MIDINote's pitch classes | getPitchClasses | {
"repo_name": "genedelisa/rockymusic",
"path": "rockymusic-core/src/main/java/com/rockhoppertech/music/midi/js/MIDITrack.java",
"license": "apache-2.0",
"size": 74678
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,904,443 |
@ExceptionHandler(UnrecognizedPropertyException.class)
public ResponseEntity<?> handleUnrecognizedProperty(UnrecognizedPropertyException ex, HttpServletRequest request) {
ErrorResponse response = new ErrorResponse();
response.addFieldError(ex.getPropertyName(), ex.getMessage());
return R... | @ExceptionHandler(UnrecognizedPropertyException.class) ResponseEntity<?> function(UnrecognizedPropertyException ex, HttpServletRequest request) { ErrorResponse response = new ErrorResponse(); response.addFieldError(ex.getPropertyName(), ex.getMessage()); return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(respons... | /**
* TODO - Figure out why this method is not being called
*/ | TODO - Figure out why this method is not being called | handleUnrecognizedProperty | {
"repo_name": "hughbrien/Hygieia",
"path": "api/src/main/java/com/capitalone/dashboard/rest/RestApiExceptionHandler.java",
"license": "apache-2.0",
"size": 2862
} | [
"com.capitalone.dashboard.model.ErrorResponse",
"com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException",
"javax.servlet.http.HttpServletRequest",
"org.springframework.http.HttpStatus",
"org.springframework.http.ResponseEntity",
"org.springframework.web.bind.annotation.ExceptionHandler"
] | import com.capitalone.dashboard.model.ErrorResponse; import com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException; import javax.servlet.http.HttpServletRequest; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.Exception... | import com.capitalone.dashboard.model.*; import com.fasterxml.jackson.databind.exc.*; import javax.servlet.http.*; import org.springframework.http.*; import org.springframework.web.bind.annotation.*; | [
"com.capitalone.dashboard",
"com.fasterxml.jackson",
"javax.servlet",
"org.springframework.http",
"org.springframework.web"
] | com.capitalone.dashboard; com.fasterxml.jackson; javax.servlet; org.springframework.http; org.springframework.web; | 2,802,925 |
protected final void setDownstreamAdapter(final DownstreamAdapter adapter) {
this.downstreamAdapter = Objects.requireNonNull(adapter);
} | final void function(final DownstreamAdapter adapter) { this.downstreamAdapter = Objects.requireNonNull(adapter); } | /**
* Sets the downstream adapter to forward messages to.
* <p>
* Subclasses must invoke this method to set the specific
* downstream adapter they want to forward messages to.
*
* @param adapter The adapter.
* @throws NullPointerException if the adapter is {@code null}.
*/ | Sets the downstream adapter to forward messages to. Subclasses must invoke this method to set the specific downstream adapter they want to forward messages to | setDownstreamAdapter | {
"repo_name": "dejanb/hono",
"path": "services/messaging/src/main/java/org/eclipse/hono/messaging/MessageForwardingEndpoint.java",
"license": "epl-1.0",
"size": 11294
} | [
"java.util.Objects"
] | import java.util.Objects; | import java.util.*; | [
"java.util"
] | java.util; | 2,525,220 |
@Override
public boolean exists(DataIdentifier identifier) throws DataStoreException {
long start = System.currentTimeMillis();
String key = getKeyName(identifier);
ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
try {
Thread.currentTh... | boolean function(DataIdentifier identifier) throws DataStoreException { long start = System.currentTimeMillis(); String key = getKeyName(identifier); ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader(); try { Thread.currentThread().setContextClassLoader( getClass().getClassLoader()); ObjectM... | /**
* Check if record identified by identifier exists in Amazon S3.
*/ | Check if record identified by identifier exists in Amazon S3 | exists | {
"repo_name": "kwin/jackrabbit-oak",
"path": "oak-blob-cloud/src/main/java/org/apache/jackrabbit/oak/blob/cloud/aws/s3/S3Backend.java",
"license": "apache-2.0",
"size": 50713
} | [
"com.amazonaws.AmazonServiceException",
"com.amazonaws.services.s3.model.ObjectMetadata",
"java.lang.Thread",
"org.apache.jackrabbit.core.data.DataIdentifier",
"org.apache.jackrabbit.core.data.DataStoreException"
] | import com.amazonaws.AmazonServiceException; import com.amazonaws.services.s3.model.ObjectMetadata; import java.lang.Thread; import org.apache.jackrabbit.core.data.DataIdentifier; import org.apache.jackrabbit.core.data.DataStoreException; | import com.amazonaws.*; import com.amazonaws.services.s3.model.*; import java.lang.*; import org.apache.jackrabbit.core.data.*; | [
"com.amazonaws",
"com.amazonaws.services",
"java.lang",
"org.apache.jackrabbit"
] | com.amazonaws; com.amazonaws.services; java.lang; org.apache.jackrabbit; | 2,152,405 |
public void addPartitionTab(File file) {
this.statusMessageLabel.setText("This option allows you to make partitions of existing KEEL datasets");
for (int i = 0; i < selectorTabbedPane.getTabCount(); i++) {
if (selectorTabbedPane.getComponentAt(i) instanceof PartitionPanel) {
... | void function(File file) { this.statusMessageLabel.setText(STR); for (int i = 0; i < selectorTabbedPane.getTabCount(); i++) { if (selectorTabbedPane.getComponentAt(i) instanceof PartitionPanel) { selectorTabbedPane.setSelectedIndex(i); PartitionPanel partitionPanel = (PartitionPanel) selectorTabbedPane.getComponentAt(i... | /**
* <p>
* Adds Partiton Tab
* @param file File to partition
* </p>
*/ | Adds Partiton Tab | addPartitionTab | {
"repo_name": "SCI2SUGR/KEEL",
"path": "src/keel/GraphInterKeel/datacf/DataCFFrame.java",
"license": "gpl-3.0",
"size": 45003
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,626,892 |
void headers(boolean outFinished, boolean inFinished, int streamId, int associatedStreamId,
List<Header> headerBlock, HeadersMode headersMode); | void headers(boolean outFinished, boolean inFinished, int streamId, int associatedStreamId, List<Header> headerBlock, HeadersMode headersMode); | /**
* Create or update incoming headers, creating the corresponding streams if necessary. Frames
* that trigger this are SPDY SYN_STREAM, HEADERS, and SYN_REPLY, and HTTP/2 HEADERS and
* PUSH_PROMISE.
*
* @param outFinished true if the receiver should not send further frames... | Create or update incoming headers, creating the corresponding streams if necessary. Frames that trigger this are SPDY SYN_STREAM, HEADERS, and SYN_REPLY, and HTTP/2 HEADERS and PUSH_PROMISE | headers | {
"repo_name": "WeiDianzhao1989/AndroidAppLib",
"path": "network/src/main/java/com/koudai/net/kernal/internal/framed/FrameReader.java",
"license": "apache-2.0",
"size": 5727
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 959,154 |
public Properties getVmSystemProperties() {
return vmSystemProperties;
}
| Properties function() { return vmSystemProperties; } | /**
* Returns the vm's system properties
* @return the vm's system properties
*/ | Returns the vm's system properties | getVmSystemProperties | {
"repo_name": "nickman/heliosutils",
"path": "src/main/java/com/heliosapm/utils/jmx/protocol/attach/AttachJMXConnector.java",
"license": "apache-2.0",
"size": 16537
} | [
"java.util.Properties"
] | import java.util.Properties; | import java.util.*; | [
"java.util"
] | java.util; | 824,865 |
public static void write(OutputStream output, DynStruct value)
{
throw new MARSHAL(DynAnyFactoryHelper.not_applicable(id()));
} | static void function(OutputStream output, DynStruct value) { throw new MARSHAL(DynAnyFactoryHelper.not_applicable(id())); } | /**
* This should read DynStruct from the CDR input stream, but (following the
* JDK 1.5 API) it does not.
*
* @param output a org.omg.CORBA.portable stream to write into.
*
* @specenote Sun throws the same exception.
*
* @throws MARSHAL always.
*/ | This should read DynStruct from the CDR input stream, but (following the JDK 1.5 API) it does not | write | {
"repo_name": "taciano-perez/JamVM-PH",
"path": "src/classpath/org/omg/DynamicAny/DynStructHelper.java",
"license": "gpl-2.0",
"size": 5236
} | [
"org.omg.CORBA"
] | import org.omg.CORBA; | import org.omg.*; | [
"org.omg"
] | org.omg; | 1,308,183 |
@Before
public void setup() {
mockMvc = webAppContextSetup(wac).build();
} | void function() { mockMvc = webAppContextSetup(wac).build(); } | /**
* Sets up the test.
*/ | Sets up the test | setup | {
"repo_name": "ukdave/gradle-spring-mvc",
"path": "src/test/java/com/test/controller/HomeControllerTests.java",
"license": "mit",
"size": 2826
} | [
"org.springframework.test.web.servlet.setup.MockMvcBuilders"
] | import org.springframework.test.web.servlet.setup.MockMvcBuilders; | import org.springframework.test.web.servlet.setup.*; | [
"org.springframework.test"
] | org.springframework.test; | 2,817,360 |
void recover(boolean indexShouldExists, RecoveryState recoveryState) throws IndexShardGatewayRecoveryException; | void recover(boolean indexShouldExists, RecoveryState recoveryState) throws IndexShardGatewayRecoveryException; | /**
* Recovers the state of the shard from the gateway.
*/ | Recovers the state of the shard from the gateway | recover | {
"repo_name": "arowla/elasticsearch",
"path": "src/main/java/org/elasticsearch/index/gateway/IndexShardGateway.java",
"license": "apache-2.0",
"size": 1414
} | [
"org.elasticsearch.indices.recovery.RecoveryState"
] | import org.elasticsearch.indices.recovery.RecoveryState; | import org.elasticsearch.indices.recovery.*; | [
"org.elasticsearch.indices"
] | org.elasticsearch.indices; | 1,394,266 |
public FileInviteInfo getInvitee(String email)
{
for(FileInviteInfo invitee:invitees)
{
if( invitee.getInviteToken().getEmail().equals(email.trim().toLowerCase()))
{
return invitee;
}
}
return null;
}
| FileInviteInfo function(String email) { for(FileInviteInfo invitee:invitees) { if( invitee.getInviteToken().getEmail().equals(email.trim().toLowerCase())) { return invitee; } } return null; } | /**
* Get the file invite info for the given email otherwise return null
* @param email
* @return
*/ | Get the file invite info for the given email otherwise return null | getInvitee | {
"repo_name": "nate-rcl/irplus",
"path": "ir_core/src/edu/ur/ir/file/VersionedFile.java",
"license": "apache-2.0",
"size": 18503
} | [
"edu.ur.ir.user.FileInviteInfo"
] | import edu.ur.ir.user.FileInviteInfo; | import edu.ur.ir.user.*; | [
"edu.ur.ir"
] | edu.ur.ir; | 732,102 |
manager.backups().getStatusWithResponse("myRG", "account1", "pool1", "volume1", Context.NONE);
} | manager.backups().getStatusWithResponse("myRG", STR, "pool1", STR, Context.NONE); } | /**
* Sample code: Volumes_BackupStatus.
*
* @param manager Entry point to NetAppFilesManager.
*/ | Sample code: Volumes_BackupStatus | volumesBackupStatus | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/netapp/azure-resourcemanager-netapp/src/samples/java/com/azure/resourcemanager/netapp/generated/BackupsGetStatusSamples.java",
"license": "mit",
"size": 819
} | [
"com.azure.core.util.Context"
] | import com.azure.core.util.Context; | import com.azure.core.util.*; | [
"com.azure.core"
] | com.azure.core; | 1,062,819 |
@Test
public void testToExternalURI() {
assertNull("Virtual root has no external URI", vRoot.toExternalURI());
} | void function() { assertNull(STR, vRoot.toExternalURI()); } | /**
* Test method for {@link com.ibm.ws.kernel.service.location.internal.VirtualRootResource#toExternalURI()} .
*/ | Test method for <code>com.ibm.ws.kernel.service.location.internal.VirtualRootResource#toExternalURI()</code> | testToExternalURI | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.kernel.service/test/com/ibm/ws/kernel/service/location/internal/VirtualRootResourceTest.java",
"license": "epl-1.0",
"size": 4525
} | [
"junit.framework.Assert"
] | import junit.framework.Assert; | import junit.framework.*; | [
"junit.framework"
] | junit.framework; | 2,410,264 |
public String readLine() throws IOException {
while (lines.peek() == null) {
cbuf.clear();
// The default implementation of Reader#read(CharBuffer) allocates a
// temporary char[], so we call Reader#read(char[], int, int) instead.
int read = (reader != null)
? reader.read(buf, 0,... | String function() throws IOException { while (lines.peek() == null) { cbuf.clear(); int read = (reader != null) ? reader.read(buf, 0, buf.length) : readable.read(cbuf); if (read == -1) { lineBuf.finish(); break; } lineBuf.add(buf, 0, read); } return lines.poll(); } | /**
* Reads a line of text. A line is considered to be terminated by any
* one of a line feed ({@code '\n'}), a carriage return
* ({@code '\r'}), or a carriage return followed immediately by a linefeed
* ({@code "\r\n"}).
*
* @return a {@code String} containing the contents of the line, not
* i... | Reads a line of text. A line is considered to be terminated by any one of a line feed ('\n'), a carriage return ('\r'), or a carriage return followed immediately by a linefeed ("\r\n") | readLine | {
"repo_name": "eugeneiiim/AndroidCollections",
"path": "src/com/google/common/io/LineReader.java",
"license": "apache-2.0",
"size": 2826
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 704,738 |
return IteratorUtils.map(
IteratorUtils.filter(bytecode.getSourceInstructions().iterator(),
s -> s.getOperator().equals(TraversalSource.Symbols.withStrategies) && clazz.isAssignableFrom(s.getArguments()[0].getClass())),
os -> (A) os.getArguments()[0]);
} | return IteratorUtils.map( IteratorUtils.filter(bytecode.getSourceInstructions().iterator(), s -> s.getOperator().equals(TraversalSource.Symbols.withStrategies) && clazz.isAssignableFrom(s.getArguments()[0].getClass())), os -> (A) os.getArguments()[0]); } | /**
* Parses {@link Bytecode} to find {@link TraversalStrategy} objects added in the source instructions.
*/ | Parses <code>Bytecode</code> to find <code>TraversalStrategy</code> objects added in the source instructions | findStrategies | {
"repo_name": "apache/tinkerpop",
"path": "gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/util/BytecodeHelper.java",
"license": "apache-2.0",
"size": 5399
} | [
"org.apache.tinkerpop.gremlin.process.traversal.TraversalSource",
"org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils"
] | import org.apache.tinkerpop.gremlin.process.traversal.TraversalSource; import org.apache.tinkerpop.gremlin.util.iterator.IteratorUtils; | import org.apache.tinkerpop.gremlin.process.traversal.*; import org.apache.tinkerpop.gremlin.util.iterator.*; | [
"org.apache.tinkerpop"
] | org.apache.tinkerpop; | 2,639,628 |
public void testOpenFileOrDefaultResourceReturnsNullWhenNeitherCanBeFound() throws Exception
{
final String mydefaultsResource = "org/apache/qpid/util/doesnotexisteiether.properties";
final String defaultResource = "org/apache/qpid/util/doesnotexisteiether.properties";
... | void function() throws Exception { final String mydefaultsResource = STR; final String defaultResource = STR; final InputStream is = FileUtils.openFileOrDefaultResource(mydefaultsResource, defaultResource, this.getClass().getClassLoader()); assertNull(STR, is); } | /**
* Tests that openFileOrDefaultResource returns null if neither the file nor
* the default resource can be found..
*/ | Tests that openFileOrDefaultResource returns null if neither the file nor the default resource can be found. | testOpenFileOrDefaultResourceReturnsNullWhenNeitherCanBeFound | {
"repo_name": "hastef88/andes",
"path": "modules/andes-core/common/src/test/java/org/wso2/andes/util/FileUtilsTest.java",
"license": "apache-2.0",
"size": 24790
} | [
"java.io.InputStream"
] | import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 2,211,623 |
public static Price max(final Collection<Price> prices) throws Exception {
if (prices == null || prices.size() == 0) {
return null;
}
Price max = prices.iterator().next();
for (Price price : prices) {
if (price.toDouble() > max.toDouble()) {
max = price;
}
}
return max;
}
| static Price function(final Collection<Price> prices) throws Exception { if (prices == null prices.size() == 0) { return null; } Price max = prices.iterator().next(); for (Price price : prices) { if (price.toDouble() > max.toDouble()) { max = price; } } return max; } | /**
* Averages the prices together.
* @param prices
* @return
* @throws Exception
*/ | Averages the prices together | max | {
"repo_name": "kilroyrlc/kaflib",
"path": "src/kaflib/types/Price.java",
"license": "mit",
"size": 9850
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 76,398 |
public static ims.core.clinical.domain.objects.Alcohol extractAlcohol(ims.domain.ILightweightDomainFactory domainFactory, ims.core.vo.AlcoholVo valueObject)
{
return extractAlcohol(domainFactory, valueObject, new HashMap());
}
| static ims.core.clinical.domain.objects.Alcohol function(ims.domain.ILightweightDomainFactory domainFactory, ims.core.vo.AlcoholVo valueObject) { return extractAlcohol(domainFactory, valueObject, new HashMap()); } | /**
* Create the domain object from the value object.
* @param domainFactory - used to create existing (persistent) domain objects.
* @param valueObject - extract the domain object fields from this.
*/ | Create the domain object from the value object | extractAlcohol | {
"repo_name": "open-health-hub/openmaxims-linux",
"path": "openmaxims_workspace/ValueObjects/src/ims/core/vo/domain/AlcoholVoAssembler.java",
"license": "agpl-3.0",
"size": 19641
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 1,214,900 |
void getFaviconImageForUrl(String url, int size, FaviconImageCallback faviconCallback);
}
public BookmarksPageView(Context context, AttributeSet attrs) {
super(context, attrs);
mDesiredFaviconSize = getResources().getDimensionPixelSize(
R.dimen.default_favicon_size... | void getFaviconImageForUrl(String url, int size, FaviconImageCallback faviconCallback); } public BookmarksPageView(Context context, AttributeSet attrs) { super(context, attrs); mDesiredFaviconSize = getResources().getDimensionPixelSize( R.dimen.default_favicon_size); mFaviconCache = new LruCache<String, Bitmap>(MAX_NUM... | /**
* Gets the favicon image for a given URL.
* @param url The URL of the site whose favicon is being requested.
* @param size The desired size of the favicon in pixels.
* @param faviconCallback The callback to be notified when the favicon is available.
*/ | Gets the favicon image for a given URL | getFaviconImageForUrl | {
"repo_name": "Chilledheart/chromium",
"path": "chrome/android/java/src/org/chromium/chrome/browser/ntp/BookmarksPageView.java",
"license": "bsd-3-clause",
"size": 14693
} | [
"android.content.Context",
"android.graphics.Bitmap",
"android.util.AttributeSet",
"android.util.LruCache",
"org.chromium.chrome.browser.favicon.FaviconHelper"
] | import android.content.Context; import android.graphics.Bitmap; import android.util.AttributeSet; import android.util.LruCache; import org.chromium.chrome.browser.favicon.FaviconHelper; | import android.content.*; import android.graphics.*; import android.util.*; import org.chromium.chrome.browser.favicon.*; | [
"android.content",
"android.graphics",
"android.util",
"org.chromium.chrome"
] | android.content; android.graphics; android.util; org.chromium.chrome; | 892,373 |
@Override
public boolean isEmpty() {
boolean retVal = super.isBaseEmpty() && StringUtils.isBlank(getValue());
return retVal;
} | boolean function() { boolean retVal = super.isBaseEmpty() && StringUtils.isBlank(getValue()); return retVal; } | /**
* Returns <code>true</code> if this datatype has no extensions, and has either a <code>null</code> value or an empty ("") value.
*/ | Returns <code>true</code> if this datatype has no extensions, and has either a <code>null</code> value or an empty ("") value | isEmpty | {
"repo_name": "aemay2/hapi-fhir",
"path": "hapi-fhir-base/src/main/java/ca/uhn/fhir/model/primitive/StringDt.java",
"license": "apache-2.0",
"size": 3619
} | [
"org.apache.commons.lang3.StringUtils"
] | import org.apache.commons.lang3.StringUtils; | import org.apache.commons.lang3.*; | [
"org.apache.commons"
] | org.apache.commons; | 1,943,435 |
EAttribute getITestable_Tested(); | EAttribute getITestable_Tested(); | /**
* Returns the meta object for the attribute '{@link com.specmate.migration.test.severalattributesadded.testmodel.base.ITestable#isTested <em>Tested</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Tested</em>'.
* @see com.specmate.migration.test.se... | Returns the meta object for the attribute '<code>com.specmate.migration.test.severalattributesadded.testmodel.base.ITestable#isTested Tested</code>'. | getITestable_Tested | {
"repo_name": "junkerm/specmate",
"path": "bundles/specmate-migration-test/src/com/specmate/migration/test/severalattributesadded/testmodel/base/BasePackage.java",
"license": "apache-2.0",
"size": 19329
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,571,740 |
boolean isLinkValid(Link link) {
if (link.type() != Link.Type.DIRECT) {
// NOTE: A DIRECT link might be transiently marked as INDIRECT
// if BDDP is received before LLDP. We can safely ignore that
// until the LLDP is received and the link is marked as DIRECT.
... | boolean isLinkValid(Link link) { if (link.type() != Link.Type.DIRECT) { log.info(STR, link.src(), link.dst(), link.type()); return false; } DeviceId srcId = link.src().deviceId(); DeviceId dstId = link.dst().deviceId(); if (srcId.equals(dstId)) { log.warn(STR + STR, link); return false; } DeviceConfiguration devConfig ... | /**
* Checks validity of link. Examples of invalid links include
* indirect-links, links between ports on the same switch, and more.
*
* @param link the link to be processed
* @return true if valid link
*/ | Checks validity of link. Examples of invalid links include indirect-links, links between ports on the same switch, and more | isLinkValid | {
"repo_name": "kuujo/onos",
"path": "apps/segmentrouting/app/src/main/java/org/onosproject/segmentrouting/LinkHandler.java",
"license": "apache-2.0",
"size": 30018
} | [
"org.onosproject.net.DeviceId",
"org.onosproject.net.Link",
"org.onosproject.segmentrouting.config.DeviceConfigNotFoundException",
"org.onosproject.segmentrouting.config.DeviceConfiguration"
] | import org.onosproject.net.DeviceId; import org.onosproject.net.Link; import org.onosproject.segmentrouting.config.DeviceConfigNotFoundException; import org.onosproject.segmentrouting.config.DeviceConfiguration; | import org.onosproject.net.*; import org.onosproject.segmentrouting.config.*; | [
"org.onosproject.net",
"org.onosproject.segmentrouting"
] | org.onosproject.net; org.onosproject.segmentrouting; | 1,318,794 |
public boolean checkFileSystem() {
if (this.fsOk && this.fs != null) {
try {
FSUtils.checkFileSystemAvailable(this.fs);
} catch (IOException e) {
abort("File System not available", e);
this.fsOk = false;
}
}
return this.fsOk;
}
private static class Compact... | boolean function() { if (this.fsOk && this.fs != null) { try { FSUtils.checkFileSystemAvailable(this.fs); } catch (IOException e) { abort(STR, e); this.fsOk = false; } } return this.fsOk; } private static class CompactionChecker extends Chore { private final HRegionServer instance; private final int majorCompactPriorit... | /**
* Checks to see if the file system is still accessible. If not, sets
* abortRequested and stopRequested
*
* @return false if file system is not available
*/ | Checks to see if the file system is still accessible. If not, sets abortRequested and stopRequested | checkFileSystem | {
"repo_name": "ay65535/hbase-0.94.0",
"path": "src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java",
"license": "apache-2.0",
"size": 130077
} | [
"java.io.IOException",
"org.apache.hadoop.hbase.Chore",
"org.apache.hadoop.hbase.Stoppable",
"org.apache.hadoop.hbase.util.FSUtils",
"org.apache.hadoop.util.StringUtils"
] | import java.io.IOException; import org.apache.hadoop.hbase.Chore; import org.apache.hadoop.hbase.Stoppable; import org.apache.hadoop.hbase.util.FSUtils; import org.apache.hadoop.util.StringUtils; | import java.io.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.util.*; import org.apache.hadoop.util.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 2,464,369 |
private void registerForBluetoothHeadsetIntentBroadcast() {
IntentFilter filter = new IntentFilter(
android.bluetooth.BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED); | void function() { IntentFilter filter = new IntentFilter( android.bluetooth.BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED); | /**
* Registers receiver for the broadcasted intent related to BT headset
* availability or a change in connection state of the local Bluetooth
* adapter. Example: triggers when the BT device is turned on or off.
* BLUETOOTH permission is required to receive this one.
*/ | Registers receiver for the broadcasted intent related to BT headset availability or a change in connection state of the local Bluetooth adapter. Example: triggers when the BT device is turned on or off. BLUETOOTH permission is required to receive this one | registerForBluetoothHeadsetIntentBroadcast | {
"repo_name": "guorendong/iridium-browser-ubuntu",
"path": "media/base/android/java/src/org/chromium/media/AudioManagerAndroid.java",
"license": "bsd-3-clause",
"size": 43265
} | [
"android.content.IntentFilter"
] | import android.content.IntentFilter; | import android.content.*; | [
"android.content"
] | android.content; | 1,316,677 |
public Collection<Attribute> getAttributes() {
return ruleClass.getAttributes();
} | Collection<Attribute> function() { return ruleClass.getAttributes(); } | /**
* Returns an (unmodifiable, unordered) collection containing all the
* Attribute definitions for this kind of rule. (Note, this doesn't include
* the <i>values</i> of the attributes, merely the schema. Call
* get[Type]Attr() methods to access the actual values.)
*/ | Returns an (unmodifiable, unordered) collection containing all the Attribute definitions for this kind of rule. (Note, this doesn't include the values of the attributes, merely the schema. Call get[Type]Attr() methods to access the actual values.) | getAttributes | {
"repo_name": "akira-baruah/bazel",
"path": "src/main/java/com/google/devtools/build/lib/packages/Rule.java",
"license": "apache-2.0",
"size": 25470
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 2,715,555 |
void removeSecurityTeam(PerunSession sess, Facility facility, SecurityTeam securityTeam) throws InternalErrorException, PrivilegeException, FacilityNotExistsException, SecurityTeamNotExistsException, SecurityTeamNotAssignedException; | void removeSecurityTeam(PerunSession sess, Facility facility, SecurityTeam securityTeam) throws InternalErrorException, PrivilegeException, FacilityNotExistsException, SecurityTeamNotExistsException, SecurityTeamNotAssignedException; | /**
* Remove (Unassign) given security team from given facility
*
* @throws PrivilegeException can do only PerunAdmin or FacilityAdmin of the facility
*/ | Remove (Unassign) given security team from given facility | removeSecurityTeam | {
"repo_name": "stavamichal/perun",
"path": "perun-core/src/main/java/cz/metacentrum/perun/core/api/FacilitiesManager.java",
"license": "bsd-2-clause",
"size": 31409
} | [
"cz.metacentrum.perun.core.api.exceptions.FacilityNotExistsException",
"cz.metacentrum.perun.core.api.exceptions.InternalErrorException",
"cz.metacentrum.perun.core.api.exceptions.PrivilegeException",
"cz.metacentrum.perun.core.api.exceptions.SecurityTeamNotAssignedException",
"cz.metacentrum.perun.core.api... | import cz.metacentrum.perun.core.api.exceptions.FacilityNotExistsException; import cz.metacentrum.perun.core.api.exceptions.InternalErrorException; import cz.metacentrum.perun.core.api.exceptions.PrivilegeException; import cz.metacentrum.perun.core.api.exceptions.SecurityTeamNotAssignedException; import cz.metacentrum.... | import cz.metacentrum.perun.core.api.exceptions.*; | [
"cz.metacentrum.perun"
] | cz.metacentrum.perun; | 1,685,248 |
public void setScale(double scalex, double scaley, Point2D from) {
transform.setToIdentity();
scale(scalex, scaley, from);
} | void function(double scalex, double scaley, Point2D from) { transform.setToIdentity(); scale(scalex, scaley, from); } | /**
* setter for the scale
* fires a PropertyChangeEvent with the AffineTransforms representing
* the previous and new values for scale and offset
* @param scalex the amount to scale in the x direction
* @param scaley the amount to scale in the y direction
* @param from the point to transf... | setter for the scale fires a PropertyChangeEvent with the AffineTransforms representing the previous and new values for scale and offset | setScale | {
"repo_name": "drzhonghao/grapa",
"path": "jung-visualization/src/main/java/edu/uci/ics/jung/visualization/transform/MutableAffineTransformer.java",
"license": "lgpl-3.0",
"size": 6701
} | [
"java.awt.geom.Point2D"
] | import java.awt.geom.Point2D; | import java.awt.geom.*; | [
"java.awt"
] | java.awt; | 2,152,023 |
@Override
public Collection<? extends PostgreTableColumn> getAttributes(@NotNull DBRProgressMonitor monitor)
throws DBException
{
return getContainer().getSchema().getTableCache().getChildren(monitor, getContainer(), this);
} | Collection<? extends PostgreTableColumn> function(@NotNull DBRProgressMonitor monitor) throws DBException { return getContainer().getSchema().getTableCache().getChildren(monitor, getContainer(), this); } | /**
* Table columns
* @param monitor progress monitor
*/ | Table columns | getAttributes | {
"repo_name": "liuyuanyuan/dbeaver",
"path": "plugins/org.jkiss.dbeaver.ext.postgresql/src/org/jkiss/dbeaver/ext/postgresql/model/PostgreTableBase.java",
"license": "apache-2.0",
"size": 10705
} | [
"java.util.Collection",
"org.jkiss.code.NotNull",
"org.jkiss.dbeaver.DBException",
"org.jkiss.dbeaver.model.runtime.DBRProgressMonitor"
] | import java.util.Collection; import org.jkiss.code.NotNull; import org.jkiss.dbeaver.DBException; import org.jkiss.dbeaver.model.runtime.DBRProgressMonitor; | import java.util.*; import org.jkiss.code.*; import org.jkiss.dbeaver.*; import org.jkiss.dbeaver.model.runtime.*; | [
"java.util",
"org.jkiss.code",
"org.jkiss.dbeaver"
] | java.util; org.jkiss.code; org.jkiss.dbeaver; | 1,278,342 |
@POST
@Produces("application/json")
@Consumes("application/json")
@Path("SubscribeUserDevice")
public List<String> SubscribeUserDevice(UserDevice objOuterUserDevice) {
List<String> response = new ArrayList<String>();
try
{
DataAccessInterface objDAInterface = new ... | @Produces(STR) @Consumes(STR) @Path(STR) List<String> function(UserDevice objOuterUserDevice) { List<String> response = new ArrayList<String>(); try { DataAccessInterface objDAInterface = new UserDeviceAdapter(); AbstractDataBridge objADBridge = new DatabaseStorage(objDAInterface); response = objADBridge.SaveUserDevice... | /**
* This function is using to Register Device for user.
* @param objOuterUserDevice
* @return a list of object string with "Error", "No Error" and new added ID
*/ | This function is using to Register Device for user | SubscribeUserDevice | {
"repo_name": "ubiquitous-computing-lab/Mining-Minds",
"path": "data-curation-layer/lifelog-mapping-and-representation/MMDataCurationRestfulService/src/main/java/org/uclab/mm/rs/informationcuration/InformationCurationResource.java",
"license": "apache-2.0",
"size": 35025
} | [
"java.util.ArrayList",
"java.util.List",
"javax.ws.rs.Consumes",
"javax.ws.rs.Path",
"javax.ws.rs.Produces",
"org.uclab.mm.datamodel.AbstractDataBridge",
"org.uclab.mm.datamodel.DataAccessInterface",
"org.uclab.mm.datamodel.DatabaseStorage",
"org.uclab.mm.datamodel.ic.UserDevice",
"org.uclab.mm.da... | import java.util.ArrayList; import java.util.List; import javax.ws.rs.Consumes; import javax.ws.rs.Path; import javax.ws.rs.Produces; import org.uclab.mm.datamodel.AbstractDataBridge; import org.uclab.mm.datamodel.DataAccessInterface; import org.uclab.mm.datamodel.DatabaseStorage; import org.uclab.mm.datamodel.ic.UserD... | import java.util.*; import javax.ws.rs.*; import org.uclab.mm.datamodel.*; import org.uclab.mm.datamodel.ic.*; import org.uclab.mm.datamodel.ic.dataadapter.*; | [
"java.util",
"javax.ws",
"org.uclab.mm"
] | java.util; javax.ws; org.uclab.mm; | 2,201,263 |
public void setSpeed(Vector3f speed){
this.speed = speed;
} | void function(Vector3f speed){ this.speed = speed; } | /**
* Setter for property 'speed'.
*
* @param speed Value to set for property 'speed'.
*/ | Setter for property 'speed' | setSpeed | {
"repo_name": "gjkf/seriousEngine",
"path": "src/main/java/io/github/gjkf/seriousEngine/render/particles/Particle.java",
"license": "mit",
"size": 4354
} | [
"org.joml.Vector3f"
] | import org.joml.Vector3f; | import org.joml.*; | [
"org.joml"
] | org.joml; | 2,438,712 |
@Test
public void testDescribeContents() {
Track track = new Track();
assertTrue(track.describeContents() == 0);
}
/**
* Test method for
* {@link io.github.data4all.model.data.Track#writeToParcel(android.os.Parcel, int)} | void function() { Track track = new Track(); assertTrue(track.describeContents() == 0); } /** * Test method for * {@link io.github.data4all.model.data.Track#writeToParcel(android.os.Parcel, int)} | /**
* Test method for
* {@link io.github.data4all.model.data.Track#describeContents()}.
*/ | Test method for <code>io.github.data4all.model.data.Track#describeContents()</code> | testDescribeContents | {
"repo_name": "Data4All/Data4All",
"path": "src/test/java/io/github/data4all/model/data/TrackTest.java",
"license": "apache-2.0",
"size": 9559
} | [
"android.os.Parcel",
"org.junit.Assert",
"org.junit.Test"
] | import android.os.Parcel; import org.junit.Assert; import org.junit.Test; | import android.os.*; import org.junit.*; | [
"android.os",
"org.junit"
] | android.os; org.junit; | 994,906 |
private ExtendedBlock getBlockToCopy(FsVolumeSpi.BlockIterator iter,
DiskBalancerWorkItem item) {
while (!iter.atEnd() && item.getErrorCount() < getMaxError(item)) {
try {
ExtendedBlock block = iter.nextBlock();
if(null == block){
... | ExtendedBlock function(FsVolumeSpi.BlockIterator iter, DiskBalancerWorkItem item) { while (!iter.atEnd() && item.getErrorCount() < getMaxError(item)) { try { ExtendedBlock block = iter.nextBlock(); if(null == block){ LOG.info(STR, item.toJson()); return null; } if (!this.dataset.isValidBlock(block)) { continue; } if (i... | /**
* Gets the next block that we can copy, returns null if we cannot find a
* block that fits our parameters or if have run out of blocks.
*
* @param iter Block Iter
* @param item - Work item
* @return Extended block or null if no copyable block is found.
*/ | Gets the next block that we can copy, returns null if we cannot find a block that fits our parameters or if have run out of blocks | getBlockToCopy | {
"repo_name": "plusplusjiajia/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DiskBalancer.java",
"license": "apache-2.0",
"size": 39468
} | [
"java.io.IOException",
"org.apache.hadoop.hdfs.protocol.ExtendedBlock",
"org.apache.hadoop.hdfs.server.datanode.fsdataset.FsVolumeSpi"
] | import java.io.IOException; import org.apache.hadoop.hdfs.protocol.ExtendedBlock; import org.apache.hadoop.hdfs.server.datanode.fsdataset.FsVolumeSpi; | import java.io.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.server.datanode.fsdataset.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,104,116 |
@ManyToOne( cascade = { CascadeType.PERSIST, CascadeType.MERGE }, fetch = FetchType.LAZY )
@org.hibernate.annotations.Cascade({org.hibernate.annotations.CascadeType.SAVE_UPDATE})
@Basic( optional = true )
@JoinColumn(name = "projectid", nullable = true )
public Project getProjectid() {
return this.projectid;
... | @ManyToOne( cascade = { CascadeType.PERSIST, CascadeType.MERGE }, fetch = FetchType.LAZY ) @org.hibernate.annotations.Cascade({org.hibernate.annotations.CascadeType.SAVE_UPDATE}) @Basic( optional = true ) @JoinColumn(name = STR, nullable = true ) Project function() { return this.projectid; } | /**
* Return the value associated with the column: projectid.
* @return A Project object (this.projectid)
*/ | Return the value associated with the column: projectid | getProjectid | {
"repo_name": "servinglynk/hmis-lynk-open-source",
"path": "hmis-model-v2017/src/main/java/com/servinglynk/hmis/warehouse/model/v2017/Inventory.java",
"license": "mpl-2.0",
"size": 20391
} | [
"javax.persistence.Basic",
"javax.persistence.CascadeType",
"javax.persistence.FetchType",
"javax.persistence.JoinColumn",
"javax.persistence.ManyToOne"
] | import javax.persistence.Basic; import javax.persistence.CascadeType; import javax.persistence.FetchType; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; | import javax.persistence.*; | [
"javax.persistence"
] | javax.persistence; | 2,118,999 |
public Pair<Integer, Integer> loadBounds(final FeatureFile geneFile, final Chromosome chromosome) throws
IOException {
final Map<String, Pair<Integer, Integer>> metaMap = fileManager.loadIndexMetadata(geneFile);
Pair<Integer, Integer> bounds = metaMap.get(chromosome.getName());
i... | Pair<Integer, Integer> function(final FeatureFile geneFile, final Chromosome chromosome) throws IOException { final Map<String, Pair<Integer, Integer>> metaMap = fileManager.loadIndexMetadata(geneFile); Pair<Integer, Integer> bounds = metaMap.get(chromosome.getName()); if (bounds == null) { bounds = metaMap.get(Utils.c... | /**
* Load fixed track bounds for specified chromosome.
*
* @param geneFile gene file
* @param chromosome chromosome
* @return pair of indexes start index and end index
* @throws IOException if error occurred during working with files
*/ | Load fixed track bounds for specified chromosome | loadBounds | {
"repo_name": "epam/NGB",
"path": "server/catgenome/src/main/java/com/epam/catgenome/manager/TrackHelper.java",
"license": "mit",
"size": 14329
} | [
"com.epam.catgenome.entity.FeatureFile",
"com.epam.catgenome.entity.reference.Chromosome",
"com.epam.catgenome.util.Utils",
"java.io.IOException",
"java.util.Map",
"org.apache.commons.lang3.tuple.Pair"
] | import com.epam.catgenome.entity.FeatureFile; import com.epam.catgenome.entity.reference.Chromosome; import com.epam.catgenome.util.Utils; import java.io.IOException; import java.util.Map; import org.apache.commons.lang3.tuple.Pair; | import com.epam.catgenome.entity.*; import com.epam.catgenome.entity.reference.*; import com.epam.catgenome.util.*; import java.io.*; import java.util.*; import org.apache.commons.lang3.tuple.*; | [
"com.epam.catgenome",
"java.io",
"java.util",
"org.apache.commons"
] | com.epam.catgenome; java.io; java.util; org.apache.commons; | 2,683,506 |
String getEnum(); | String getEnum(); | /**
* Returns the value of the '<em><b>Enum</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Enum</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Enum</em>' attribute.
* ... | Returns the value of the 'Enum' attribute. If the meaning of the 'Enum' attribute isn't clear, there really should be more of a description here... | getEnum | {
"repo_name": "pedromateo/tug_qt_unit_testing_fw",
"path": "qt48_model/src/org/casa/dsltesting/Qt48XmlschemaQwtEnhanced/Property.java",
"license": "gpl-3.0",
"size": 44132
} | [
"java.lang.String"
] | import java.lang.String; | import java.lang.*; | [
"java.lang"
] | java.lang; | 1,696,136 |
public static void setTruststore(final String trustoreLocation) throws Exception {
if (trustoreLocation.startsWith("/")) {
File truststore = new File(trustoreLocation);
System.setProperty("javax.net.ssl.trustStore", truststore.getAbsolutePath());
} else {
ClassPathResource trust... | static void function(final String trustoreLocation) throws Exception { if (trustoreLocation.startsWith("/")) { File truststore = new File(trustoreLocation); System.setProperty(STR, truststore.getAbsolutePath()); } else { ClassPathResource truststore = new ClassPathResource(trustoreLocation, classloader); System.setProp... | /**
* Method to set the trustore to the desired file in the classpath or absolute path.
* A trustore is needed for the client to trust the server certificate.
* The trustore must match the certificate used by the server
*
* @param trustoreClassPathLocation
* @throws Exception
*/ | Method to set the trustore to the desired file in the classpath or absolute path. A trustore is needed for the client to trust the server certificate. The trustore must match the certificate used by the server | setTruststore | {
"repo_name": "ncaripsl/esgf-security",
"path": "src/java/main/esg/security/utils/ssl/CertUtils.java",
"license": "bsd-3-clause",
"size": 7154
} | [
"java.io.File",
"org.springframework.core.io.ClassPathResource"
] | import java.io.File; import org.springframework.core.io.ClassPathResource; | import java.io.*; import org.springframework.core.io.*; | [
"java.io",
"org.springframework.core"
] | java.io; org.springframework.core; | 2,479,248 |
protected Collection<Class<? extends Plugin>> transportClientPlugins() {
return Collections.emptyList();
} | Collection<Class<? extends Plugin>> function() { return Collections.emptyList(); } | /**
* Returns a collection of plugins that should be loaded when creating a transport client.
*/ | Returns a collection of plugins that should be loaded when creating a transport client | transportClientPlugins | {
"repo_name": "markharwood/elasticsearch",
"path": "test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java",
"license": "apache-2.0",
"size": 98901
} | [
"java.util.Collection",
"java.util.Collections",
"org.elasticsearch.plugins.Plugin"
] | import java.util.Collection; import java.util.Collections; import org.elasticsearch.plugins.Plugin; | import java.util.*; import org.elasticsearch.plugins.*; | [
"java.util",
"org.elasticsearch.plugins"
] | java.util; org.elasticsearch.plugins; | 2,283,107 |
public void traverse(ASTVisitor visitor, ClassScope scope) {
// nothing to do
} | void function(ASTVisitor visitor, ClassScope scope) { } | /**
* Traverse an expression in the context of a classScope
* @param visitor
* @param scope
*/ | Traverse an expression in the context of a classScope | traverse | {
"repo_name": "boniatillo-com/PhaserEditor",
"path": "source/thirdparty/jsdt/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/ast/Expression.java",
"license": "epl-1.0",
"size": 19699
} | [
"org.eclipse.wst.jsdt.internal.compiler.ASTVisitor",
"org.eclipse.wst.jsdt.internal.compiler.lookup.ClassScope"
] | import org.eclipse.wst.jsdt.internal.compiler.ASTVisitor; import org.eclipse.wst.jsdt.internal.compiler.lookup.ClassScope; | import org.eclipse.wst.jsdt.internal.compiler.*; import org.eclipse.wst.jsdt.internal.compiler.lookup.*; | [
"org.eclipse.wst"
] | org.eclipse.wst; | 2,672,108 |
@Test
public void testSortByKeyDescNullMap(){
assertEquals(emptyMap(), sortMapByKeyDesc(null));
} | void function(){ assertEquals(emptyMap(), sortMapByKeyDesc(null)); } | /**
* Test sort by key desc null map.
*/ | Test sort by key desc null map | testSortByKeyDescNullMap | {
"repo_name": "venusdrogon/feilong-core",
"path": "src/test/java/com/feilong/core/util/sortutiltest/SortMapByKeyDescTest.java",
"license": "apache-2.0",
"size": 2115
} | [
"com.feilong.core.util.SortUtil",
"org.junit.Assert"
] | import com.feilong.core.util.SortUtil; import org.junit.Assert; | import com.feilong.core.util.*; import org.junit.*; | [
"com.feilong.core",
"org.junit"
] | com.feilong.core; org.junit; | 2,417,277 |
void addUserThreadExecutionTime(long duration) {
percentileTotal.addValue((int) duration);
}
private volatile HealthCounts healthCountsSnapshot = new HealthCounts(0, 0, 0);
private volatile AtomicLong lastHealthCountsSnapshot = new AtomicLong(System.currentTimeMillis());
/**
* Retriev... | void addUserThreadExecutionTime(long duration) { percentileTotal.addValue((int) duration); } private volatile HealthCounts healthCountsSnapshot = new HealthCounts(0, 0, 0); private volatile AtomicLong lastHealthCountsSnapshot = new AtomicLong(System.currentTimeMillis()); /** * Retrieve a snapshot of total requests, err... | /**
* Complete execution time of {@link HystrixCommand#execute()} or {@link HystrixCommand#queue()} (queue is considered complete once the work is finished and {@link Future#get} is capable of
* retrieving the value.
* <p>
* This differs from {@link #addCommandExecutionTime} in that this covers all ... | Complete execution time of <code>HystrixCommand#execute()</code> or <code>HystrixCommand#queue()</code> (queue is considered complete once the work is finished and <code>Future#get</code> is capable of retrieving the value. This differs from <code>#addCommandExecutionTime</code> in that this covers all of the threading... | addUserThreadExecutionTime | {
"repo_name": "npccsb/Hystrix",
"path": "hystrix-core/src/main/java/com/netflix/hystrix/HystrixCommandMetrics.java",
"license": "apache-2.0",
"size": 21573
} | [
"java.util.concurrent.atomic.AtomicLong"
] | import java.util.concurrent.atomic.AtomicLong; | import java.util.concurrent.atomic.*; | [
"java.util"
] | java.util; | 860,820 |
private void validateFilterSortMapping(Map<Filter, Sort> filterSortMapping) {
BusinessRule.expect(MapUtils.isNotEmpty(filterSortMapping), equalTo(true))
.verify(ErrorType.BAD_REQUEST_ERROR, "Filter-Sort mapping should not be empty");
}
/**
* Validate provided content fields.
*
* <p>
* The value of c... | void function(Map<Filter, Sort> filterSortMapping) { BusinessRule.expect(MapUtils.isNotEmpty(filterSortMapping), equalTo(true)) .verify(ErrorType.BAD_REQUEST_ERROR, STR); } /** * Validate provided content fields. * * <p> * The value of content field should not be empty. * All content fields should match the pattern {@l... | /**
* Mapping should not be empty
*
* @param filterSortMapping Map of ${@link Filter} for query building as key and ${@link Sort} as value for each filter
*/ | Mapping should not be empty | validateFilterSortMapping | {
"repo_name": "reportportal/service-api",
"path": "src/main/java/com/epam/ta/reportportal/core/widget/content/updater/validator/BugTrendChartContentValidator.java",
"license": "apache-2.0",
"size": 2880
} | [
"com.epam.ta.reportportal.commons.Predicates",
"com.epam.ta.reportportal.commons.querygen.Filter",
"com.epam.ta.reportportal.commons.validation.BusinessRule",
"com.epam.ta.reportportal.ws.model.ErrorType",
"java.util.Map",
"org.apache.commons.collections.MapUtils",
"org.springframework.data.domain.Sort"... | import com.epam.ta.reportportal.commons.Predicates; import com.epam.ta.reportportal.commons.querygen.Filter; import com.epam.ta.reportportal.commons.validation.BusinessRule; import com.epam.ta.reportportal.ws.model.ErrorType; import java.util.Map; import org.apache.commons.collections.MapUtils; import org.springframewo... | import com.epam.ta.reportportal.commons.*; import com.epam.ta.reportportal.commons.querygen.*; import com.epam.ta.reportportal.commons.validation.*; import com.epam.ta.reportportal.ws.model.*; import java.util.*; import org.apache.commons.collections.*; import org.springframework.data.domain.*; | [
"com.epam.ta",
"java.util",
"org.apache.commons",
"org.springframework.data"
] | com.epam.ta; java.util; org.apache.commons; org.springframework.data; | 1,115,507 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Response<Boolean>> checkExistenceByIdWithResponseAsync(
String resourceId, String apiVersion, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgume... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Boolean>> function( String resourceId, String apiVersion, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (resourceId == null) { return Mono.error(new IllegalArgumentException(STR)); } if ... | /**
* Checks by ID whether a resource exists.
*
* @param resourceId The fully qualified ID of the resource, including the resource name and resource type. Use the
* format,
* /subscriptions/{guid}/resourceGroups/{resource-group-name}/{resource-provider-namespace}/{resource-type}/{resour... | Checks by ID whether a resource exists | checkExistenceByIdWithResponseAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanagerhybrid/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/implementation/ResourcesClientImpl.java",
"license": "mit",
"size": 224761
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.Context"
] | 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.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; | [
"com.azure.core"
] | com.azure.core; | 1,613,201 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.