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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
List<PublishingDashboardItem> getPublishingHistory(String siteId, String environment, String path, String publisher,
ZonedDateTime dateFrom, ZonedDateTime dateTo, String contentType,
long state, String sort... | List<PublishingDashboardItem> getPublishingHistory(String siteId, String environment, String path, String publisher, ZonedDateTime dateFrom, ZonedDateTime dateTo, String contentType, long state, String sortBy, String order, int offset, int limit); | /**
* Get deployment history items for given search parameters
*
* @param siteId site identifier
* @param environment environment to get publishing history
* @param path regular expression to filter paths
* @param publisher filter publishing history for specified user
* @param dateFro... | Get deployment history items for given search parameters | getPublishingHistory | {
"repo_name": "craftercms/studio",
"path": "src/main/java/org/craftercms/studio/api/v2/service/publish/PublishService.java",
"license": "gpl-3.0",
"size": 6017
} | [
"java.time.ZonedDateTime",
"java.util.List",
"org.craftercms.studio.model.rest.dashboard.PublishingDashboardItem"
] | import java.time.ZonedDateTime; import java.util.List; import org.craftercms.studio.model.rest.dashboard.PublishingDashboardItem; | import java.time.*; import java.util.*; import org.craftercms.studio.model.rest.dashboard.*; | [
"java.time",
"java.util",
"org.craftercms.studio"
] | java.time; java.util; org.craftercms.studio; | 2,416,991 |
public static void copyAssetFileToInternalStorage(Context context,
Context testContext, String assetPath) {
String filePath = getAssetFileInternalStorageLocation(context,
assetPath);
try {
copyAssetFile(testContext, assetPath, filePath);
} catch (IOException e) {
throw new GeoPackageException(
... | static void function(Context context, Context testContext, String assetPath) { String filePath = getAssetFileInternalStorageLocation(context, assetPath); try { copyAssetFile(testContext, assetPath, filePath); } catch (IOException e) { throw new GeoPackageException( STR + assetPath, e); } } | /**
* Copy the asset file to the internal memory storage
*
* @param context
* @param assetPath
*/ | Copy the asset file to the internal memory storage | copyAssetFileToInternalStorage | {
"repo_name": "boundlessgeo/geopackage-android",
"path": "geopackage-sdk/src/androidTest/java/mil/nga/geopackage/test/TestUtils.java",
"license": "mit",
"size": 16456
} | [
"android.content.Context",
"java.io.IOException",
"mil.nga.geopackage.GeoPackageException"
] | import android.content.Context; import java.io.IOException; import mil.nga.geopackage.GeoPackageException; | import android.content.*; import java.io.*; import mil.nga.geopackage.*; | [
"android.content",
"java.io",
"mil.nga.geopackage"
] | android.content; java.io; mil.nga.geopackage; | 2,842,268 |
protected Component getErrorComponent(IRequest componentRequest) throws ComponentInitializationException, ComponentNotFoundException {
try {
return this.componentManager.getComponent(configuration.getErrorComponentName());
} catch (ComponentNotFoundException e) {
return this.getMissingComponent(co... | Component function(IRequest componentRequest) throws ComponentInitializationException, ComponentNotFoundException { try { return this.componentManager.getComponent(configuration.getErrorComponentName()); } catch (ComponentNotFoundException e) { return this.getMissingComponent(componentRequest); } } | /**
* Get the id of the error component to use based on information in the component request
* and return the associated component
*
* Default method returns a constant value
*
* @param request - the httpRequest
* @param response - the httpResponse
* @throws ComponentLayoutInitializationExcept... | Get the id of the error component to use based on information in the component request and return the associated component Default method returns a constant value | getErrorComponent | {
"repo_name": "toobs/Toobs",
"path": "trunk/PresFramework/src/main/java/org/toobsframework/pres/component/controller/ComponentViewHandler.java",
"license": "apache-2.0",
"size": 8198
} | [
"org.toobsframework.pres.component.Component",
"org.toobsframework.pres.component.ComponentInitializationException",
"org.toobsframework.pres.component.ComponentNotFoundException",
"org.toobsframework.util.IRequest"
] | import org.toobsframework.pres.component.Component; import org.toobsframework.pres.component.ComponentInitializationException; import org.toobsframework.pres.component.ComponentNotFoundException; import org.toobsframework.util.IRequest; | import org.toobsframework.pres.component.*; import org.toobsframework.util.*; | [
"org.toobsframework.pres",
"org.toobsframework.util"
] | org.toobsframework.pres; org.toobsframework.util; | 1,250,209 |
public synchronized void printResults() throws Exception {
ClientStats stats = fullStatsContext.fetch().getStats();
// 1. Get/Put performance results
String display = "\n" +
HORIZONTAL_RULE +
" KV Store Results\n" +
... | synchronized void function() throws Exception { ClientStats stats = fullStatsContext.fetch().getStats(); String display = "\n" + HORIZONTAL_RULE + STR + HORIZONTAL_RULE + STR + STR + STR + STR + STR + STR + STR + STR + STR + STR + STR + STR + STR + STR + STR; double oneGigabit = (1024 * 1024 * 1024) / 8; long oneMB = (... | /**
* Prints the results of the voting simulation and statistics
* about performance.
*
* @throws Exception if anything unexpected happens.
*/ | Prints the results of the voting simulation and statistics about performance | printResults | {
"repo_name": "paulmartel/voltdb",
"path": "tests/test_apps/voltkvqa/src/voltkvqa/AsyncBenchmark.java",
"license": "agpl-3.0",
"size": 45489
} | [
"org.voltdb.client.ClientStats",
"org.voltdb.client.ProcedureCallback"
] | import org.voltdb.client.ClientStats; import org.voltdb.client.ProcedureCallback; | import org.voltdb.client.*; | [
"org.voltdb.client"
] | org.voltdb.client; | 935,648 |
public static <T> TagReadProtocol<T> readTagName(Function1<QName,T> f) {
return new TagReadProtocol<>(Option.none(), Vector.empty(), args -> f.apply((QName) args.get(0)));
} | static <T> TagReadProtocol<T> function(Function1<QName,T> f) { return new TagReadProtocol<>(Option.none(), Vector.empty(), args -> f.apply((QName) args.get(0))); } | /**
* Reads a tag with any name, creating its result using [f].
*/ | Reads a tag with any name, creating its result using [f] | readTagName | {
"repo_name": "Tradeshift/ts-reaktive",
"path": "ts-reaktive-marshal/src/main/java/com/tradeshift/reaktive/xml/XMLProtocol.java",
"license": "mit",
"size": 22485
} | [
"io.vavr.Function1",
"io.vavr.collection.Vector",
"io.vavr.control.Option",
"javax.xml.namespace.QName"
] | import io.vavr.Function1; import io.vavr.collection.Vector; import io.vavr.control.Option; import javax.xml.namespace.QName; | import io.vavr.*; import io.vavr.collection.*; import io.vavr.control.*; import javax.xml.namespace.*; | [
"io.vavr",
"io.vavr.collection",
"io.vavr.control",
"javax.xml"
] | io.vavr; io.vavr.collection; io.vavr.control; javax.xml; | 785,604 |
/////////////////////////////////////////////////////////////
// graphics plotting related
////////////////////////////////////////////////////////////
public final java.awt.FontMetrics getFontMetrics(final java.awt.Font theFont)
{
java.awt.FontMetrics res = null;
if (_theDest != null)
{... | final java.awt.FontMetrics function(final java.awt.Font theFont) { java.awt.FontMetrics res = null; if (_theDest != null) { if (theFont != null) res = _theDest.getFontMetrics(theFont); else res = _theDest.getFontMetrics(); } return res; } | /**
* find out the current metrics.
*
* @param theFont the font to try
* @return the metrics object
*/ | find out the current metrics | getFontMetrics | {
"repo_name": "theanuradha/debrief",
"path": "org.mwc.cmap.legacy/src/MWC/GUI/Canvas/Swing/SwingCanvas.java",
"license": "epl-1.0",
"size": 34120
} | [
"java.awt.Font"
] | import java.awt.Font; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,921,876 |
public static Camera<ImageCameraWrapper, VideoCameraWrapper> camera(Activity activity) {
return new AlbumCamera(activity);
} | static Camera<ImageCameraWrapper, VideoCameraWrapper> function(Activity activity) { return new AlbumCamera(activity); } | /**
* Open the camera from the activity.
*/ | Open the camera from the activity | camera | {
"repo_name": "yanzhenjie/Album",
"path": "album/src/main/java/com/yanzhenjie/album/Album.java",
"license": "apache-2.0",
"size": 9384
} | [
"android.app.Activity",
"com.yanzhenjie.album.api.ImageCameraWrapper",
"com.yanzhenjie.album.api.VideoCameraWrapper",
"com.yanzhenjie.album.api.camera.AlbumCamera",
"com.yanzhenjie.album.api.camera.Camera"
] | import android.app.Activity; import com.yanzhenjie.album.api.ImageCameraWrapper; import com.yanzhenjie.album.api.VideoCameraWrapper; import com.yanzhenjie.album.api.camera.AlbumCamera; import com.yanzhenjie.album.api.camera.Camera; | import android.app.*; import com.yanzhenjie.album.api.*; import com.yanzhenjie.album.api.camera.*; | [
"android.app",
"com.yanzhenjie.album"
] | android.app; com.yanzhenjie.album; | 576,473 |
public QName getType(NodeRef nodeRef) throws InvalidNodeRefException
{
// frozen node type -> replaced by actual node type of the version node
return (QName)this.dbNodeService.getType(VersionUtil.convertNodeRef(nodeRef));
}
| QName function(NodeRef nodeRef) throws InvalidNodeRefException { return (QName)this.dbNodeService.getType(VersionUtil.convertNodeRef(nodeRef)); } | /**
* Type translation for version store
*/ | Type translation for version store | getType | {
"repo_name": "Alfresco/alfresco-repository",
"path": "src/main/java/org/alfresco/repo/version/Node2ServiceImpl.java",
"license": "lgpl-3.0",
"size": 10705
} | [
"org.alfresco.repo.version.common.VersionUtil",
"org.alfresco.service.cmr.repository.InvalidNodeRefException",
"org.alfresco.service.cmr.repository.NodeRef",
"org.alfresco.service.namespace.QName"
] | import org.alfresco.repo.version.common.VersionUtil; import org.alfresco.service.cmr.repository.InvalidNodeRefException; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.namespace.QName; | import org.alfresco.repo.version.common.*; import org.alfresco.service.cmr.repository.*; import org.alfresco.service.namespace.*; | [
"org.alfresco.repo",
"org.alfresco.service"
] | org.alfresco.repo; org.alfresco.service; | 894,637 |
Collection<ProjectResponse> getProjects(String repositoryName); | Collection<ProjectResponse> getProjects(String repositoryName); | /**
* [GET] /repositories/{repositoryName}/projects/
*/ | [GET] /repositories/{repositoryName}/projects | getProjects | {
"repo_name": "psiroky/kie-wb-distributions",
"path": "kie-wb-tests/kie-wb-tests-rest/src/main/java/org/kie/wb/test/rest/client/WorkbenchClient.java",
"license": "apache-2.0",
"size": 4976
} | [
"java.util.Collection",
"org.guvnor.rest.client.ProjectResponse"
] | import java.util.Collection; import org.guvnor.rest.client.ProjectResponse; | import java.util.*; import org.guvnor.rest.client.*; | [
"java.util",
"org.guvnor.rest"
] | java.util; org.guvnor.rest; | 2,316,001 |
private void showPersonDetails(Person person) {
if (person != null) {
// Fill the labels with info from the person object.
firstNameLabel.setText(person.getFirstName());
lastNameLabel.setText(person.getLastName());
streetLabel.setText(person.getStreet());... | void function(Person person) { if (person != null) { firstNameLabel.setText(person.getFirstName()); lastNameLabel.setText(person.getLastName()); streetLabel.setText(person.getStreet()); postalCodeLabel.setText(Integer.toString(person.getPostalCode())); cityLabel.setText(person.getCity()); birthdayLabel.setText(DateUtil... | /**
* Fills all text fields to show details about the person.
* If the specified person is null, all text fields are cleared.
*
* @param person the person or null
*/ | Fills all text fields to show details about the person. If the specified person is null, all text fields are cleared | showPersonDetails | {
"repo_name": "ObZenTish/INFORMATICA_4IC",
"path": "Project NetBeans/JavaFX/Rubrica/src/ch/makery/address/view/PersonOverviewController.java",
"license": "gpl-3.0",
"size": 5284
} | [
"ch.makery.address.model.Person",
"ch.makery.address.util.DateUtil"
] | import ch.makery.address.model.Person; import ch.makery.address.util.DateUtil; | import ch.makery.address.model.*; import ch.makery.address.util.*; | [
"ch.makery.address"
] | ch.makery.address; | 1,211,524 |
public void testExpiration() throws Exception {
IgniteCache<Integer, Integer> cache = jcache(Integer.class, Integer.class);
cache.withExpiryPolicy(new TouchedExpiryPolicy(new Duration(MILLISECONDS, 1000))).put(7, 1);
List<Cache.Entry<Integer, Integer>> qry =
cache.query(new Sql... | void function() throws Exception { IgniteCache<Integer, Integer> cache = jcache(Integer.class, Integer.class); cache.withExpiryPolicy(new TouchedExpiryPolicy(new Duration(MILLISECONDS, 1000))).put(7, 1); List<Cache.Entry<Integer, Integer>> qry = cache.query(new SqlQuery<Integer, Integer>(Integer.class, "1=1")).getAll()... | /**
* Expired entries are not included to result.
*
* @throws Exception If failed.
*/ | Expired entries are not included to result | testExpiration | {
"repo_name": "WilliamDo/ignite",
"path": "modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/IgniteCacheAbstractQuerySelfTest.java",
"license": "apache-2.0",
"size": 71006
} | [
"java.util.List",
"javax.cache.Cache",
"javax.cache.expiry.Duration",
"javax.cache.expiry.TouchedExpiryPolicy",
"org.apache.ignite.IgniteCache",
"org.apache.ignite.cache.query.SqlQuery",
"org.apache.ignite.internal.util.typedef.F",
"org.apache.ignite.internal.util.typedef.internal.U"
] | import java.util.List; import javax.cache.Cache; import javax.cache.expiry.Duration; import javax.cache.expiry.TouchedExpiryPolicy; import org.apache.ignite.IgniteCache; import org.apache.ignite.cache.query.SqlQuery; import org.apache.ignite.internal.util.typedef.F; import org.apache.ignite.internal.util.typedef.intern... | import java.util.*; import javax.cache.*; import javax.cache.expiry.*; import org.apache.ignite.*; import org.apache.ignite.cache.query.*; import org.apache.ignite.internal.util.typedef.*; import org.apache.ignite.internal.util.typedef.internal.*; | [
"java.util",
"javax.cache",
"org.apache.ignite"
] | java.util; javax.cache; org.apache.ignite; | 2,888,677 |
@Test
public void lsReportMessageTest11() throws PcepParseException, PcepOutOfBoundMessageException {
byte[] lsReportMsg = new byte[]{0x20, (byte) 0xE0, 0x00, 0x60, // common header
(byte) 0xE0, 0x10, 0x00, 0x5C, // LS Object Header
0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x... | void function() throws PcepParseException, PcepOutOfBoundMessageException { byte[] lsReportMsg = new byte[]{0x20, (byte) 0xE0, 0x00, 0x60, (byte) 0xE0, 0x10, 0x00, 0x5C, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, (byte) 0xFF, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,... | /**
* This test case checks for
* LS Object (Routing Universe TLV,Local Node Descriptors TLV(AutonomousSystemSubTlv, BGPLSidentifierSubTlv
* OSPFareaIDsubTlv, IgpRouterIdSubTlv), RemoteNodeDescriptorsTLV(OSPFareaIDsubTlv, IgpRouterIdSubTlv))
* in PcLSRpt message.
*/ | This test case checks for LS Object (Routing Universe TLV,Local Node Descriptors TLV(AutonomousSystemSubTlv, BGPLSidentifierSubTlv OSPFareaIDsubTlv, IgpRouterIdSubTlv), RemoteNodeDescriptorsTLV(OSPFareaIDsubTlv, IgpRouterIdSubTlv)) in PcLSRpt message | lsReportMessageTest11 | {
"repo_name": "donNewtonAlpha/onos",
"path": "protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/protocol/PcepLSReportMsgTest.java",
"license": "apache-2.0",
"size": 73490
} | [
"org.hamcrest.MatcherAssert",
"org.hamcrest.Matchers",
"org.hamcrest.core.Is",
"org.jboss.netty.buffer.ChannelBuffer",
"org.jboss.netty.buffer.ChannelBuffers",
"org.onosproject.pcepio.exceptions.PcepOutOfBoundMessageException",
"org.onosproject.pcepio.exceptions.PcepParseException"
] | import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; import org.hamcrest.core.Is; import org.jboss.netty.buffer.ChannelBuffer; import org.jboss.netty.buffer.ChannelBuffers; import org.onosproject.pcepio.exceptions.PcepOutOfBoundMessageException; import org.onosproject.pcepio.exceptions.PcepParseException; | import org.hamcrest.*; import org.hamcrest.core.*; import org.jboss.netty.buffer.*; import org.onosproject.pcepio.exceptions.*; | [
"org.hamcrest",
"org.hamcrest.core",
"org.jboss.netty",
"org.onosproject.pcepio"
] | org.hamcrest; org.hamcrest.core; org.jboss.netty; org.onosproject.pcepio; | 1,653,745 |
public void warn(Object message, Throwable exception) {
log(Level.WARNING, String.valueOf(message), exception);
} | void function(Object message, Throwable exception) { log(Level.WARNING, String.valueOf(message), exception); } | /**
* Logs a message with <code>java.util.logging.Level.WARNING</code>.
*
* @param message to log
* @param exception log this cause
* @see org.apache.commons.logging.Log#warn(Object, Throwable)
*/ | Logs a message with <code>java.util.logging.Level.WARNING</code> | warn | {
"repo_name": "mohanaraosv/commons-logging",
"path": "src/main/java/org/apache/commons/logging/impl/Jdk14Logger.java",
"license": "apache-2.0",
"size": 8427
} | [
"java.util.logging.Level"
] | import java.util.logging.Level; | import java.util.logging.*; | [
"java.util"
] | java.util; | 1,245,524 |
public void addRebellionTile(final int coordX,
final int coordY) {
final String filename = DIR_EVENTS + "rebellion.png";
sectorTiles.add(new CoordinateDTO(coordX, coordY, filename, LAYER_REBELLION));
} | void function(final int coordX, final int coordY) { final String filename = DIR_EVENTS + STR; sectorTiles.add(new CoordinateDTO(coordX, coordY, filename, LAYER_REBELLION)); } | /**
* Select the tile for the rebellion.
*
* @param coordX the X coordinate.
* @param coordY the Y coordinate.
*/ | Select the tile for the rebellion | addRebellionTile | {
"repo_name": "EaW1805/engine",
"path": "src/main/java/com/eaw1805/map/TilesSelector.java",
"license": "mit",
"size": 50964
} | [
"com.eaw1805.data.dto.common.CoordinateDTO"
] | import com.eaw1805.data.dto.common.CoordinateDTO; | import com.eaw1805.data.dto.common.*; | [
"com.eaw1805.data"
] | com.eaw1805.data; | 1,506,777 |
@ServiceMethod(returns = ReturnType.SINGLE)
public void start(String resourceGroupName, String networkWatcherName, String connectionMonitorName) {
startAsync(resourceGroupName, networkWatcherName, connectionMonitorName).block();
} | @ServiceMethod(returns = ReturnType.SINGLE) void function(String resourceGroupName, String networkWatcherName, String connectionMonitorName) { startAsync(resourceGroupName, networkWatcherName, connectionMonitorName).block(); } | /**
* Starts the specified connection monitor.
*
* @param resourceGroupName The name of the resource group containing Network Watcher.
* @param networkWatcherName The name of the Network Watcher resource.
* @param connectionMonitorName The name of the connection monitor.
* @throws IllegalA... | Starts the specified connection monitor | start | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ConnectionMonitorsClientImpl.java",
"license": "mit",
"size": 107051
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; | import com.azure.core.annotation.*; | [
"com.azure.core"
] | com.azure.core; | 328,804 |
protected final NLTMAuthenticator getNTLMAuthenticator()
{
if (!(this.authenticationComponent instanceof NLTMAuthenticator))
{
throw new IllegalStateException("Attempt to use non SSO-enabled authentication component for SSO");
}
return (NLTMAuthenticator)this.au... | final NLTMAuthenticator function() { if (!(this.authenticationComponent instanceof NLTMAuthenticator)) { throw new IllegalStateException(STR); } return (NLTMAuthenticator)this.authenticationComponent; } | /**
* Returns an SSO-enabled authentication component.
*
* @return NLTMAuthenticator
*/ | Returns an SSO-enabled authentication component | getNTLMAuthenticator | {
"repo_name": "Alfresco/community-edition",
"path": "projects/repository/source/java/org/alfresco/filesys/auth/cifs/CifsAuthenticatorBase.java",
"license": "lgpl-3.0",
"size": 22690
} | [
"org.alfresco.repo.security.authentication.ntlm.NLTMAuthenticator"
] | import org.alfresco.repo.security.authentication.ntlm.NLTMAuthenticator; | import org.alfresco.repo.security.authentication.ntlm.*; | [
"org.alfresco.repo"
] | org.alfresco.repo; | 1,891,350 |
private int hash(Object k) {
int h = hashSeed;
if ((0 != h) && (k instanceof String)) {
return Hashing7.stringHash32((String) k);
}
h ^= k.hashCode();
// Spread bits to regularize both segment and index locations,
// using variant of single-word Wang/Jenkins hash.
h += (h << 15) ^... | int function(Object k) { int h = hashSeed; if ((0 != h) && (k instanceof String)) { return Hashing7.stringHash32((String) k); } h ^= k.hashCode(); h += (h << 15) ^ 0xffffcd7d; h ^= (h >>> 10); h += (h << 3); h ^= (h >>> 6); h += (h << 2) + (h << 14); return h ^ (h >>> 16); } static final class Segment<K, V> extends Ree... | /**
* Applies a supplemental hash function to a given hashCode, which
* defends against poor quality hash functions. This is critical
* because ConcurrentHashMap uses power-of-two length hash tables,
* that otherwise encounter collisions for hashCodes that do not
* differ in lower or upper bits.
*/ | Applies a supplemental hash function to a given hashCode, which defends against poor quality hash functions. This is critical because ConcurrentHashMap uses power-of-two length hash tables, that otherwise encounter collisions for hashCodes that do not differ in lower or upper bits | hash | {
"repo_name": "NorthFacing/step-by-Java",
"path": "java-base/src/main/java/com/bob/jdk/java/util/concurrent/MyConcurrentHashMap7.java",
"license": "gpl-2.0",
"size": 51981
} | [
"com.bob.jdk.sun.misc.Hashing7",
"java.io.Serializable",
"java.util.concurrent.locks.ReentrantLock"
] | import com.bob.jdk.sun.misc.Hashing7; import java.io.Serializable; import java.util.concurrent.locks.ReentrantLock; | import com.bob.jdk.sun.misc.*; import java.io.*; import java.util.concurrent.locks.*; | [
"com.bob.jdk",
"java.io",
"java.util"
] | com.bob.jdk; java.io; java.util; | 1,338,929 |
public Observable<ServiceResponse<ExpressRoutePortInner>> beginUpdateTagsWithServiceResponseAsync(String resourceGroupName, String expressRoutePortName) {
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is required and cannot... | Observable<ServiceResponse<ExpressRoutePortInner>> function(String resourceGroupName, String expressRoutePortName) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException(STR); } if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (expressRoutePortName == null) { thro... | /**
* Update ExpressRoutePort tags.
*
* @param resourceGroupName The name of the resource group.
* @param expressRoutePortName The name of the ExpressRoutePort resource.
* @throws IllegalArgumentException thrown if parameters fail the validation
* @return the observable to the ExpressRoute... | Update ExpressRoutePort tags | beginUpdateTagsWithServiceResponseAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/ExpressRoutePortsInner.java",
"license": "mit",
"size": 74971
} | [
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.rest.ServiceResponse; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 2,267,010 |
protected boolean scaleBufferedImage(SunGraphics2D sg, BufferedImage bImg,
Color bgColor,
int dx1, int dy1, int dx2, int dy2,
int sx1, int sy1, int sx2, int sy2,
... | boolean function(SunGraphics2D sg, BufferedImage bImg, Color bgColor, int dx1, int dy1, int dx2, int dy2, int sx1, int sy1, int sx2, int sy2, int xOrig, int yOrig, int xNew, int yNew, int width, int height) { AffineTransform atfm = null; if ((dx2-dx1 != sx2-sx1) (dy2-dy1 != sy2-sy1)) { atfm = new AffineTransform(); atf... | /**
* Draws a subrectangle of an image scaled to a destination rectangle in
* nonblocking mode with a solid background color and a callback object.
*/ | Draws a subrectangle of an image scaled to a destination rectangle in nonblocking mode with a solid background color and a callback object | scaleBufferedImage | {
"repo_name": "ivmai/JCGO",
"path": "sunawt/fix/sun/java2d/pipe/DrawImage.java",
"license": "gpl-2.0",
"size": 34437
} | [
"java.awt.Color",
"java.awt.geom.AffineTransform",
"java.awt.image.BufferedImage"
] | import java.awt.Color; import java.awt.geom.AffineTransform; import java.awt.image.BufferedImage; | import java.awt.*; import java.awt.geom.*; import java.awt.image.*; | [
"java.awt"
] | java.awt; | 1,098,079 |
private void writeObject(java.io.ObjectOutputStream stream) throws IOException {
if (stubDelegate == null) {
setDefaultDelegate();
}
if (stubDelegate != null) {
stubDelegate.writeObject(this, stream);
}
} | void function(java.io.ObjectOutputStream stream) throws IOException { if (stubDelegate == null) { setDefaultDelegate(); } if (stubDelegate != null) { stubDelegate.writeObject(this, stream); } } | /**
* Serialization method to save the IOR state.
* @serialData The length of the IOR type ID (int), followed by the IOR type ID
* (byte array encoded using ISO8859-1), followed by the number of IOR profiles
* (int), followed by the IOR profiles. Each IOR profile is written as a
* profile tag ... | Serialization method to save the IOR state | writeObject | {
"repo_name": "TheTypoMaster/Scaper",
"path": "openjdk/corba/src/share/classes/javax/rmi/CORBA/Stub.java",
"license": "gpl-2.0",
"size": 8820
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,481,476 |
public BigDecimal getTotalLines ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_TotalLines);
if (bd == null)
return Env.ZERO;
return bd;
} | BigDecimal function () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_TotalLines); if (bd == null) return Env.ZERO; return bd; } | /** Get Total Lines.
@return Total of all document lines
*/ | Get Total Lines | getTotalLines | {
"repo_name": "geneos/adempiere",
"path": "base/src/org/compiere/model/X_C_Invoice.java",
"license": "gpl-2.0",
"size": 39900
} | [
"java.math.BigDecimal",
"org.compiere.util.Env"
] | import java.math.BigDecimal; import org.compiere.util.Env; | import java.math.*; import org.compiere.util.*; | [
"java.math",
"org.compiere.util"
] | java.math; org.compiere.util; | 2,114,342 |
ArrayList<Vector3D> convexHull = new ArrayList<Vector3D>();
if (Vector3Ds.size() < 3) return (ArrayList<Vector3D>) Vector3Ds.clone();
// find extremals
int minVector3D = -1, maxVector3D = -1;
float minX = Float.POSITIVE_INFINITY;
float maxX = Float.NEGATIVE_INFINITY;
for (int i = 0; i < Vector3D... | ArrayList<Vector3D> convexHull = new ArrayList<Vector3D>(); if (Vector3Ds.size() < 3) return (ArrayList<Vector3D>) Vector3Ds.clone(); int minVector3D = -1, maxVector3D = -1; float minX = Float.POSITIVE_INFINITY; float maxX = Float.NEGATIVE_INFINITY; for (int i = 0; i < Vector3Ds.size(); i++) { if (Vector3Ds.get(i).getX... | /**
* Gets the convex hull2 d.
*
* @param Vector3Ds the vector3 ds
*
* @return the convex hull2 d
*/ | Gets the convex hull2 d | getConvexHull2D | {
"repo_name": "rogiermars/mt4j-core",
"path": "src/org/mt4j/util/math/ConvexQuickHull2D.java",
"license": "gpl-2.0",
"size": 4678
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 2,584,078 |
public Optional<Proxy> getProxy() {
return Optional.ofNullable(proxy);
} | Optional<Proxy> function() { return Optional.ofNullable(proxy); } | /**
* The proxy which should be used to connect to the Discord REST API and websocket.
*
* @return the proxy which should be used to connect to the Discord REST API and websocket.
*/ | The proxy which should be used to connect to the Discord REST API and websocket | getProxy | {
"repo_name": "BtoBastian/Javacord",
"path": "javacord-core/src/main/java/org/javacord/core/DiscordApiImpl.java",
"license": "lgpl-3.0",
"size": 79294
} | [
"java.net.Proxy",
"java.util.Optional"
] | import java.net.Proxy; import java.util.Optional; | import java.net.*; import java.util.*; | [
"java.net",
"java.util"
] | java.net; java.util; | 1,060,949 |
public static Object instantiateObject(Class<?> clazz, Object... arguments) throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException {
return getConstructor(clazz, DataType.getPrimitive(arguments)).newInstance(arguments);
}
| static Object function(Class<?> clazz, Object... arguments) throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException { return getConstructor(clazz, DataType.getPrimitive(arguments)).newInstance(arguments); } | /**
* Returns an instance of a class with the given arguments
*
* @param clazz Target class
* @param arguments Arguments which are used to construct an object of the target class
* @return The instance of the target class with the specified arguments
* @throws InstantiationException If you cannot crea... | Returns an instance of a class with the given arguments | instantiateObject | {
"repo_name": "Mert1602/Advanced-API",
"path": "src/main/java/me/mert1602/advancedapi/ReflectionUtils.java",
"license": "gpl-3.0",
"size": 16589
} | [
"java.lang.reflect.InvocationTargetException"
] | import java.lang.reflect.InvocationTargetException; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 2,688,233 |
public List<COSObjectKey> getPreparedKeys()
{
return Collections.unmodifiableList(preparedKeys);
} | List<COSObjectKey> function() { return Collections.unmodifiableList(preparedKeys); } | /**
* Returns all {@link COSObjectKey}s, that shall be added to the object stream, when
* {@link COSWriterObjectStream#writeObjectsToStream(COSStream)} is called.
*
* @return All {@link COSObjectKey}s, that shall be added to the object stream.
*/ | Returns all <code>COSObjectKey</code>s, that shall be added to the object stream, when <code>COSWriterObjectStream#writeObjectsToStream(COSStream)</code> is called | getPreparedKeys | {
"repo_name": "kalaspuffar/pdfbox",
"path": "pdfbox/src/main/java/org/apache/pdfbox/pdfwriter/compress/COSWriterObjectStream.java",
"license": "apache-2.0",
"size": 15011
} | [
"java.util.Collections",
"java.util.List",
"org.apache.pdfbox.cos.COSObjectKey"
] | import java.util.Collections; import java.util.List; import org.apache.pdfbox.cos.COSObjectKey; | import java.util.*; import org.apache.pdfbox.cos.*; | [
"java.util",
"org.apache.pdfbox"
] | java.util; org.apache.pdfbox; | 2,118,278 |
private Object hitToOutput(EvaluationContext ctx, FEEL feel, DTDecisionRule rule) {
List<CompiledExpression> outputEntries = rule.getOutputEntry();
Map<String, Object> values = ctx.getAllValues();
if ( outputEntries.size() == 1 ) {
Object value = feel.evaluate( outputEntries.get(... | Object function(EvaluationContext ctx, FEEL feel, DTDecisionRule rule) { List<CompiledExpression> outputEntries = rule.getOutputEntry(); Map<String, Object> values = ctx.getAllValues(); if ( outputEntries.size() == 1 ) { Object value = feel.evaluate( outputEntries.get( 0 ), values ); return value; } else { return IntSt... | /**
* Each hit results in one output value (multiple outputs are collected into a single context value)
*/ | Each hit results in one output value (multiple outputs are collected into a single context value) | hitToOutput | {
"repo_name": "sutaakar/drools",
"path": "kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/runtime/decisiontables/DecisionTableImpl.java",
"license": "apache-2.0",
"size": 11173
} | [
"java.util.List",
"java.util.Map",
"java.util.stream.Collectors",
"java.util.stream.IntStream",
"org.kie.dmn.feel.lang.CompiledExpression",
"org.kie.dmn.feel.lang.EvaluationContext"
] | import java.util.List; import java.util.Map; import java.util.stream.Collectors; import java.util.stream.IntStream; import org.kie.dmn.feel.lang.CompiledExpression; import org.kie.dmn.feel.lang.EvaluationContext; | import java.util.*; import java.util.stream.*; import org.kie.dmn.feel.lang.*; | [
"java.util",
"org.kie.dmn"
] | java.util; org.kie.dmn; | 970,463 |
public Map<SimpleString, List<Binding>> getRoutingNameBindingMap() {
return routingNameBindingMap.copyAsMap();
} | Map<SimpleString, List<Binding>> function() { return routingNameBindingMap.copyAsMap(); } | /**
* debug method: used just for tests!!
* @return
*/ | debug method: used just for tests! | getRoutingNameBindingMap | {
"repo_name": "graben/activemq-artemis",
"path": "artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/BindingsImpl.java",
"license": "apache-2.0",
"size": 22921
} | [
"java.util.List",
"java.util.Map",
"org.apache.activemq.artemis.api.core.SimpleString",
"org.apache.activemq.artemis.core.postoffice.Binding"
] | import java.util.List; import java.util.Map; import org.apache.activemq.artemis.api.core.SimpleString; import org.apache.activemq.artemis.core.postoffice.Binding; | import java.util.*; import org.apache.activemq.artemis.api.core.*; import org.apache.activemq.artemis.core.postoffice.*; | [
"java.util",
"org.apache.activemq"
] | java.util; org.apache.activemq; | 659,444 |
private static String getStyleSheet() {
if (fgStyleSheet == null)
fgStyleSheet= loadStyleSheet();
String css= fgStyleSheet;
if (css != null) {
FontData fontData= JFaceResources.getFontRegistry().getFontData(PreferenceConstants.APPEARANCE_JAVADOC_FONT)[0];
css= HTMLPrinter.convertTopLevelFont(css, font... | static String function() { if (fgStyleSheet == null) fgStyleSheet= loadStyleSheet(); String css= fgStyleSheet; if (css != null) { FontData fontData= JFaceResources.getFontRegistry().getFontData(PreferenceConstants.APPEARANCE_JAVADOC_FONT)[0]; css= HTMLPrinter.convertTopLevelFont(css, fontData); } return css; } | /**
* Returns the Javadoc hover style sheet with the current Javadoc font from the preferences.
* @return the updated style sheet
* @since 3.4
*/ | Returns the Javadoc hover style sheet with the current Javadoc font from the preferences | getStyleSheet | {
"repo_name": "brunyuriy/quick-fix-scout",
"path": "org.eclipse.jdt.ui_3.7.1.r371_v20110824-0800/src/org/eclipse/jdt/internal/ui/text/java/hover/JavadocHover.java",
"license": "mit",
"size": 41988
} | [
"org.eclipse.jdt.ui.PreferenceConstants",
"org.eclipse.jface.internal.text.html.HTMLPrinter",
"org.eclipse.jface.resource.JFaceResources",
"org.eclipse.swt.graphics.FontData"
] | import org.eclipse.jdt.ui.PreferenceConstants; import org.eclipse.jface.internal.text.html.HTMLPrinter; import org.eclipse.jface.resource.JFaceResources; import org.eclipse.swt.graphics.FontData; | import org.eclipse.jdt.ui.*; import org.eclipse.jface.internal.text.html.*; import org.eclipse.jface.resource.*; import org.eclipse.swt.graphics.*; | [
"org.eclipse.jdt",
"org.eclipse.jface",
"org.eclipse.swt"
] | org.eclipse.jdt; org.eclipse.jface; org.eclipse.swt; | 2,616,449 |
List<Attribute> getAttributes(PerunSession sess, Facility facility, User user) throws InternalErrorException; | List<Attribute> getAttributes(PerunSession sess, Facility facility, User user) throws InternalErrorException; | /**
* Get all <b>non-empty</b> attributes associated with the user on the facility.
*
* @param sess perun session
* @param facility
* @param user
* @return list of attributes
*
* @throws InternalErrorException
*/ | Get all non-empty attributes associated with the user on the facility | getAttributes | {
"repo_name": "Natrezim/perun",
"path": "perun-core/src/main/java/cz/metacentrum/perun/core/implApi/AttributesManagerImplApi.java",
"license": "bsd-2-clause",
"size": 104335
} | [
"cz.metacentrum.perun.core.api.Attribute",
"cz.metacentrum.perun.core.api.Facility",
"cz.metacentrum.perun.core.api.PerunSession",
"cz.metacentrum.perun.core.api.User",
"cz.metacentrum.perun.core.api.exceptions.InternalErrorException",
"java.util.List"
] | import cz.metacentrum.perun.core.api.Attribute; import cz.metacentrum.perun.core.api.Facility; import cz.metacentrum.perun.core.api.PerunSession; import cz.metacentrum.perun.core.api.User; import cz.metacentrum.perun.core.api.exceptions.InternalErrorException; import java.util.List; | import cz.metacentrum.perun.core.api.*; import cz.metacentrum.perun.core.api.exceptions.*; import java.util.*; | [
"cz.metacentrum.perun",
"java.util"
] | cz.metacentrum.perun; java.util; | 961,640 |
public Map<String, Double> getAttributeWeights() {
// For backwards compatibility
if (this.attributeWeights==null) {
this.attributeWeights = new HashMap<String, Double>();
}
return new HashMap<String, Double>(this.attributeWeights);
} | Map<String, Double> function() { if (this.attributeWeights==null) { this.attributeWeights = new HashMap<String, Double>(); } return new HashMap<String, Double>(this.attributeWeights); } | /**
* Returns all configured attribute weights. For attributes which are not a key in this
* set the default attribute weight will be assumed by ARX. This default value is
* currently set to 0.5.
*
* @return
*/ | Returns all configured attribute weights. For attributes which are not a key in this set the default attribute weight will be assumed by ARX. This default value is currently set to 0.5 | getAttributeWeights | {
"repo_name": "kbabioch/arx",
"path": "src/main/org/deidentifier/arx/ARXConfiguration.java",
"license": "apache-2.0",
"size": 47814
} | [
"java.util.HashMap",
"java.util.Map"
] | import java.util.HashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,602,251 |
public Observable<ServerData> getServerRx() {
return serverRx.asObservable();
} | Observable<ServerData> function() { return serverRx.asObservable(); } | /**
* Get observable emitting server items.
*
* @return observable emitting server items.
*/ | Get observable emitting server items | getServerRx | {
"repo_name": "robbyb67/openhab2",
"path": "addons/binding/org.openhab.binding.minecraft/src/main/java/org/openhab/binding/minecraft/handler/server/MinecraftSocketHandler.java",
"license": "epl-1.0",
"size": 3874
} | [
"org.openhab.binding.minecraft.message.data.ServerData"
] | import org.openhab.binding.minecraft.message.data.ServerData; | import org.openhab.binding.minecraft.message.data.*; | [
"org.openhab.binding"
] | org.openhab.binding; | 2,300,961 |
public List<User> getAllUsers()
{
return manager.getUsers();
} | List<User> function() { return manager.getUsers(); } | /**
* Returns all the users in the system
*/ | Returns all the users in the system | getAllUsers | {
"repo_name": "StevenThuriot/MOP",
"path": "Java/src/controller/InvitationController.java",
"license": "mit",
"size": 2030
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,633,131 |
public synchronized void stopJob(long jobId) {
logger.log(Level.INFO, "Stopping search job {0}", jobId); //NON-NLS
commit();
SearchJobInfo job;
job = jobs.get(jobId);
if (job == null) {
return;
}
//stop currentSearcher
IngestSearchRunner.... | synchronized void function(long jobId) { logger.log(Level.INFO, STR, jobId); commit(); SearchJobInfo job; job = jobs.get(jobId); if (job == null) { return; } IngestSearchRunner.Searcher currentSearcher = job.getCurrentSearcher(); if ((currentSearcher != null) && (!currentSearcher.isDone())) { logger.log(Level.INFO, STR... | /**
* Immediate stop and removal of job from SearchRunner. Cancels the
* associated search worker if it's still running.
*
* @param jobId
*/ | Immediate stop and removal of job from SearchRunner. Cancels the associated search worker if it's still running | stopJob | {
"repo_name": "millmanorama/autopsy",
"path": "KeywordSearch/src/org/sleuthkit/autopsy/keywordsearch/IngestSearchRunner.java",
"license": "apache-2.0",
"size": 30350
} | [
"java.util.logging.Level"
] | import java.util.logging.Level; | import java.util.logging.*; | [
"java.util"
] | java.util; | 718,348 |
private static String md5(String input) throws NoSuchAlgorithmException {
MessageDigest md = MessageDigest.getInstance("MD5");
byte[] messageDigest;
messageDigest = md.digest(input.getBytes());
BigInteger number = new BigInteger(1, messageDigest);
return String.format("%032x", number);
}
| static String function(String input) throws NoSuchAlgorithmException { MessageDigest md = MessageDigest.getInstance("MD5"); byte[] messageDigest; messageDigest = md.digest(input.getBytes()); BigInteger number = new BigInteger(1, messageDigest); return String.format("%032x", number); } | /**
* Message Digest
* @throws NoSuchAlgorithmException
*/ | Message Digest | md5 | {
"repo_name": "PRImA-Research-Lab/prima-gwt-lib",
"path": "src/org/primaresearch/web/gwt/server/UserServiceImpl.java",
"license": "apache-2.0",
"size": 16768
} | [
"java.math.BigInteger",
"java.security.MessageDigest",
"java.security.NoSuchAlgorithmException"
] | import java.math.BigInteger; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; | import java.math.*; import java.security.*; | [
"java.math",
"java.security"
] | java.math; java.security; | 825,234 |
public static boolean sendMessageToAllCCUs(IMCMessage msg){
boolean result=true;
synchronized (sysList.getList()) {
for (Sys s : sysList.getList()){
if (s.isCCU()==true){
boolean bool = sendMessage(msg, s);
if (bool==false) {
result = false;
}
}
}
}
post("INFO - "+"Sent "+m... | static boolean function(IMCMessage msg){ boolean result=true; synchronized (sysList.getList()) { for (Sys s : sysList.getList()){ if (s.isCCU()==true){ boolean bool = sendMessage(msg, s); if (bool==false) { result = false; } } } } post(STR+STR+msg.getAbbrev()+STR); return result; } | /**
* Send a IMCMessage to ALL CCUs
* @param msg The IMCMessage to be sent
* @return true if every IMCMessage was sent without erros, false otherwise.
*/ | Send a IMCMessage to ALL CCUs | sendMessageToAllCCUs | {
"repo_name": "pmfg/ALVIi",
"path": "app/src/main/java/pt/lsts/accl/bus/AcclBus.java",
"license": "mit",
"size": 15256
} | [
"pt.lsts.accl.sys.Sys",
"pt.lsts.imc.IMCMessage"
] | import pt.lsts.accl.sys.Sys; import pt.lsts.imc.IMCMessage; | import pt.lsts.accl.sys.*; import pt.lsts.imc.*; | [
"pt.lsts.accl",
"pt.lsts.imc"
] | pt.lsts.accl; pt.lsts.imc; | 1,355,550 |
public Adapter createPostBoxTypeAdapter() {
return null;
} | Adapter function() { return null; } | /**
* Creates a new adapter for an object of class '{@link org.oasis.xAL.PostBoxType <em>Post Box Type</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-us... | Creates a new adapter for an object of class '<code>org.oasis.xAL.PostBoxType Post Box Type</code>'. This default implementation returns null so that we can easily ignore cases; it's useful to ignore a case when inheritance will catch all the cases anyway. | createPostBoxTypeAdapter | {
"repo_name": "markus1978/citygml4emf",
"path": "de.hub.citygml.emf.ecore/src/org/oasis/xAL/util/XALAdapterFactory.java",
"license": "apache-2.0",
"size": 61937
} | [
"org.eclipse.emf.common.notify.Adapter"
] | import org.eclipse.emf.common.notify.Adapter; | import org.eclipse.emf.common.notify.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,353,552 |
List<ColumnFamily> columnFamilies = new LinkedList<ColumnFamily>();
columnFamilies.add(columnFamily);
Message message = createMessage(keyspace, rowKey, cfName, columnFamilies);
for (EndPoint endpoint : StorageService.instance().getReadStorageEndPoints(rowKey)) {
MessagingService.getMessag... | List<ColumnFamily> columnFamilies = new LinkedList<ColumnFamily>(); columnFamilies.add(columnFamily); Message message = createMessage(keyspace, rowKey, cfName, columnFamilies); for (EndPoint endpoint : StorageService.instance().getReadStorageEndPoints(rowKey)) { MessagingService.getMessagingInstance().sendOneWay(messag... | /**
* Make the message and send to all the right nodes
*
* @param rowKey Row key of the data
* @param columnFamily Column family with data to send
* @throws IOException
*/ | Make the message and send to all the right nodes | sendColumnFamily | {
"repo_name": "ebottabi/cassandraoutputformat",
"path": "src/java/fm/last/hadoop/mapred/CassandraClient.java",
"license": "mit",
"size": 5994
} | [
"java.util.LinkedList",
"java.util.List",
"org.apache.cassandra.db.ColumnFamily",
"org.apache.cassandra.net.EndPoint",
"org.apache.cassandra.net.Message",
"org.apache.cassandra.net.MessagingService",
"org.apache.cassandra.service.StorageService"
] | import java.util.LinkedList; import java.util.List; import org.apache.cassandra.db.ColumnFamily; import org.apache.cassandra.net.EndPoint; import org.apache.cassandra.net.Message; import org.apache.cassandra.net.MessagingService; import org.apache.cassandra.service.StorageService; | import java.util.*; import org.apache.cassandra.db.*; import org.apache.cassandra.net.*; import org.apache.cassandra.service.*; | [
"java.util",
"org.apache.cassandra"
] | java.util; org.apache.cassandra; | 1,540,191 |
public int insertAlarmCluster(AlarmClusterInfo clusterInfo); | int function(AlarmClusterInfo clusterInfo); | /**
* Storage alarm cluster,such as kafka or zookeeper.
*/ | Storage alarm cluster,such as kafka or zookeeper | insertAlarmCluster | {
"repo_name": "smartloli/kafka-eagle",
"path": "kafka-eagle-web/src/main/java/org/smartloli/kafka/eagle/web/mapper/dao/KeAlertDao.java",
"license": "apache-2.0",
"size": 4579
} | [
"org.smartloli.kafka.eagle.common.protocol.alarm.AlarmClusterInfo"
] | import org.smartloli.kafka.eagle.common.protocol.alarm.AlarmClusterInfo; | import org.smartloli.kafka.eagle.common.protocol.alarm.*; | [
"org.smartloli.kafka"
] | org.smartloli.kafka; | 1,514,947 |
private void init() {
menuBar = new JMeterMenuBar();
setJMenuBar(menuBar);
JPanel all = new JPanel(new BorderLayout());
all.add(createToolBar(), BorderLayout.NORTH);
JSplitPane treeAndMain = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
treePanel = createTreePanel();... | void function() { menuBar = new JMeterMenuBar(); setJMenuBar(menuBar); JPanel all = new JPanel(new BorderLayout()); all.add(createToolBar(), BorderLayout.NORTH); JSplitPane treeAndMain = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT); treePanel = createTreePanel(); treeAndMain.setLeftComponent(treePanel); JSplitPane topAn... | /**
* Create the GUI components and layout.
*/ | Create the GUI components and layout | init | {
"repo_name": "hemikak/jmeter",
"path": "src/core/org/apache/jmeter/gui/MainFrame.java",
"license": "apache-2.0",
"size": 31904
} | [
"java.awt.BorderLayout",
"javax.swing.JPanel",
"javax.swing.JSplitPane",
"org.apache.jmeter.gui.util.JMeterMenuBar",
"org.apache.jmeter.util.JMeterUtils",
"org.apache.jorphan.logging.LoggingManager",
"org.apache.log.LogTarget"
] | import java.awt.BorderLayout; import javax.swing.JPanel; import javax.swing.JSplitPane; import org.apache.jmeter.gui.util.JMeterMenuBar; import org.apache.jmeter.util.JMeterUtils; import org.apache.jorphan.logging.LoggingManager; import org.apache.log.LogTarget; | import java.awt.*; import javax.swing.*; import org.apache.jmeter.gui.util.*; import org.apache.jmeter.util.*; import org.apache.jorphan.logging.*; import org.apache.log.*; | [
"java.awt",
"javax.swing",
"org.apache.jmeter",
"org.apache.jorphan",
"org.apache.log"
] | java.awt; javax.swing; org.apache.jmeter; org.apache.jorphan; org.apache.log; | 1,634,214 |
public UserApplication getUserApplication() {
return userApplication;
} | UserApplication function() { return userApplication; } | /**
* Gets the user application.
*
* @return the user application.
*/ | Gets the user application | getUserApplication | {
"repo_name": "lorislab/appky",
"path": "appky-process/src/main/java/org/lorislab/appky/application/wrapper/model/PlatformWrapper.java",
"license": "apache-2.0",
"size": 5636
} | [
"org.lorislab.appky.application.model.UserApplication"
] | import org.lorislab.appky.application.model.UserApplication; | import org.lorislab.appky.application.model.*; | [
"org.lorislab.appky"
] | org.lorislab.appky; | 2,514,667 |
@ItemAttributeTrait(attrType=StoreAttributes.END_DATE, traitType=TraitType.STRING)
@XmlElement(name="end-date")
@RDFUri(uri=StoreNS.END_DATE)
@RDFSubject
public String getEndDate() {
return endDate;
}
| @ItemAttributeTrait(attrType=StoreAttributes.END_DATE, traitType=TraitType.STRING) @XmlElement(name=STR) @RDFUri(uri=StoreNS.END_DATE) String function() { return endDate; } | /**
* Get the grant end date
*
* @return The end date
*/ | Get the grant end date | getEndDate | {
"repo_name": "anu-doi/metadata-stores",
"path": "store/src/main/java/au/edu/anu/metadatastores/store/grants/Grant.java",
"license": "gpl-3.0",
"size": 7993
} | [
"au.edu.anu.metadatastores.datamodel.store.annotations.ItemAttributeTrait",
"au.edu.anu.metadatastores.datamodel.store.annotations.TraitType",
"au.edu.anu.metadatastores.datamodel.store.ext.StoreAttributes",
"au.edu.anu.metadatastores.rdf.annotation.RDFUri",
"au.edu.anu.metadatastores.rdf.namespace.StoreNS"... | import au.edu.anu.metadatastores.datamodel.store.annotations.ItemAttributeTrait; import au.edu.anu.metadatastores.datamodel.store.annotations.TraitType; import au.edu.anu.metadatastores.datamodel.store.ext.StoreAttributes; import au.edu.anu.metadatastores.rdf.annotation.RDFUri; import au.edu.anu.metadatastores.rdf.name... | import au.edu.anu.metadatastores.datamodel.store.annotations.*; import au.edu.anu.metadatastores.datamodel.store.ext.*; import au.edu.anu.metadatastores.rdf.annotation.*; import au.edu.anu.metadatastores.rdf.namespace.*; import javax.xml.bind.annotation.*; | [
"au.edu.anu",
"javax.xml"
] | au.edu.anu; javax.xml; | 2,432,401 |
void revokeRoles(Session session, Set<String> roles, Set<PrestoPrincipal> grantees, boolean adminOptionFor, Optional<PrestoPrincipal> grantor, String catalog); | void revokeRoles(Session session, Set<String> roles, Set<PrestoPrincipal> grantees, boolean adminOptionFor, Optional<PrestoPrincipal> grantor, String catalog); | /**
* Revokes the specified roles from the specified grantees in the specified catalog
*
* @param grantor represents the principal specified by GRANTED BY statement
*/ | Revokes the specified roles from the specified grantees in the specified catalog | revokeRoles | {
"repo_name": "ptkool/presto",
"path": "presto-main/src/main/java/com/facebook/presto/metadata/Metadata.java",
"license": "apache-2.0",
"size": 17661
} | [
"com.facebook.presto.Session",
"com.facebook.presto.spi.security.PrestoPrincipal",
"java.util.Optional",
"java.util.Set"
] | import com.facebook.presto.Session; import com.facebook.presto.spi.security.PrestoPrincipal; import java.util.Optional; import java.util.Set; | import com.facebook.presto.*; import com.facebook.presto.spi.security.*; import java.util.*; | [
"com.facebook.presto",
"java.util"
] | com.facebook.presto; java.util; | 2,099,368 |
public UserProxy getUserProxy(User user) {
try {
return com.dotmarketing.business.APILocator.getUserProxyAPI().getUserProxy(user,APILocator.getUserAPI().getSystemUser(), false);
} catch (Exception e) {
Logger.error(this, e.getMessage(), e);
throw new DotRuntimeException(e.getMessage(), e);
}
... | UserProxy function(User user) { try { return com.dotmarketing.business.APILocator.getUserProxyAPI().getUserProxy(user,APILocator.getUserAPI().getSystemUser(), false); } catch (Exception e) { Logger.error(this, e.getMessage(), e); throw new DotRuntimeException(e.getMessage(), e); } } | /**
* This method return user proxy of the specified user
* @param user User
* @return UserProxy
*/ | This method return user proxy of the specified user | getUserProxy | {
"repo_name": "ggonzales/dotcms",
"path": "src/com/dotmarketing/viewtools/CMSUsersWebAPI.java",
"license": "gpl-3.0",
"size": 14181
} | [
"com.dotmarketing.beans.UserProxy",
"com.dotmarketing.business.APILocator",
"com.dotmarketing.exception.DotRuntimeException",
"com.dotmarketing.util.Logger",
"com.liferay.portal.model.User"
] | import com.dotmarketing.beans.UserProxy; import com.dotmarketing.business.APILocator; import com.dotmarketing.exception.DotRuntimeException; import com.dotmarketing.util.Logger; import com.liferay.portal.model.User; | import com.dotmarketing.beans.*; import com.dotmarketing.business.*; import com.dotmarketing.exception.*; import com.dotmarketing.util.*; import com.liferay.portal.model.*; | [
"com.dotmarketing.beans",
"com.dotmarketing.business",
"com.dotmarketing.exception",
"com.dotmarketing.util",
"com.liferay.portal"
] | com.dotmarketing.beans; com.dotmarketing.business; com.dotmarketing.exception; com.dotmarketing.util; com.liferay.portal; | 181,491 |
@Override
public Adapter createCemeteryAdapter() {
if (cemeteryItemProvider == null) {
cemeteryItemProvider = new CemeteryItemProvider(this);
}
return cemeteryItemProvider;
} | Adapter function() { if (cemeteryItemProvider == null) { cemeteryItemProvider = new CemeteryItemProvider(this); } return cemeteryItemProvider; } | /**
* This creates an adapter for a {@link org.eclipse.viatra.dse.merge.scope.Cemetery}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This creates an adapter for a <code>org.eclipse.viatra.dse.merge.scope.Cemetery</code>. | createCemeteryAdapter | {
"repo_name": "FTSRG/mondo-collab-mergespaceexploration",
"path": "plugins/org.eclipse.viatra.dse.merge.edit/src/org/eclipse/viatra/dse/merge/scope/provider/ScopeItemProviderAdapterFactory.java",
"license": "epl-1.0",
"size": 7119
} | [
"org.eclipse.emf.common.notify.Adapter"
] | import org.eclipse.emf.common.notify.Adapter; | import org.eclipse.emf.common.notify.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 137,877 |
public void setPopupPosition(int left, int top) {
// Account for the difference between absolute position and the
// body's positioning context.
left -= Document.get().getBodyOffsetLeft();
top -= Document.get().getBodyOffsetTop();
// Set the popup's position manually, allowing setPopupPosition() ... | void function(int left, int top) { left -= Document.get().getBodyOffsetLeft(); top -= Document.get().getBodyOffsetTop(); Element elem = contentContainer.getElement(); elem.getStyle().setPropertyPx("left", left); elem.getStyle().setPropertyPx("top", top); } @UiTemplate(STR) interface MyBinder extends UiBinder<FlowPanel,... | /**
* Sets the popup's position relative to the browser's client area. The popup's position may be
* set before calling {@link #setShowing(boolean)}.
*
* @param left the left position, in pixels
* @param top the top position, in pixels
*/ | Sets the popup's position relative to the browser's client area. The popup's position may be set before calling <code>#setShowing(boolean)</code> | setPopupPosition | {
"repo_name": "jonahkichwacoders/che",
"path": "ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/window/View.java",
"license": "epl-1.0",
"size": 11431
} | [
"com.google.gwt.dom.client.Document",
"com.google.gwt.dom.client.Element",
"com.google.gwt.event.dom.client.MouseDownHandler",
"com.google.gwt.event.dom.client.MouseMoveHandler",
"com.google.gwt.event.dom.client.MouseUpHandler",
"com.google.gwt.uibinder.client.UiBinder",
"com.google.gwt.uibinder.client.... | import com.google.gwt.dom.client.Document; import com.google.gwt.dom.client.Element; import com.google.gwt.event.dom.client.MouseDownHandler; import com.google.gwt.event.dom.client.MouseMoveHandler; import com.google.gwt.event.dom.client.MouseUpHandler; import com.google.gwt.uibinder.client.UiBinder; import com.google.... | import com.google.gwt.dom.client.*; import com.google.gwt.event.dom.client.*; import com.google.gwt.uibinder.client.*; import com.google.gwt.user.client.ui.*; | [
"com.google.gwt"
] | com.google.gwt; | 1,702,959 |
@Generated
@StructureField(order = 6, isGetter = true)
public native byte leftClass(); | @StructureField(order = 6, isGetter = true) native byte function(); | /**
* maps left glyph to offset into kern index
*/ | maps left glyph to offset into kern index | leftClass | {
"repo_name": "multi-os-engine/moe-core",
"path": "moe.apple/moe.platform.ios/src/main/java/apple/coretext/struct/KernIndexArrayHeader.java",
"license": "apache-2.0",
"size": 3762
} | [
"org.moe.natj.c.ann.StructureField"
] | import org.moe.natj.c.ann.StructureField; | import org.moe.natj.c.ann.*; | [
"org.moe.natj"
] | org.moe.natj; | 2,640,963 |
public void reportDone(final ReportEvent event)
{
event.getReport().getPageFooter().getElement("page-footer-content").setVisible(false);
event.getReport().getPageFooter().getElement("fake-report-footer").setVisible(true);
} | void function(final ReportEvent event) { event.getReport().getPageFooter().getElement(STR).setVisible(false); event.getReport().getPageFooter().getElement(STR).setVisible(true); } | /**
* Receives notification that report generation has completed, the report footer was printed, no more output is done.
* This is a helper event to shut down the output service.
*
* @param event The event.
*/ | Receives notification that report generation has completed, the report footer was printed, no more output is done. This is a helper event to shut down the output service | reportDone | {
"repo_name": "EgorZhuk/pentaho-reporting",
"path": "engine/demo/src/main/java/org/pentaho/reporting/engine/classic/demo/ancient/demo/reportfooter/TriggerComplexPageFooterFunction.java",
"license": "lgpl-2.1",
"size": 2542
} | [
"org.pentaho.reporting.engine.classic.core.event.ReportEvent"
] | import org.pentaho.reporting.engine.classic.core.event.ReportEvent; | import org.pentaho.reporting.engine.classic.core.event.*; | [
"org.pentaho.reporting"
] | org.pentaho.reporting; | 1,825,084 |
void dropOnMap(MapDnDEvent mde);
void dragOverMap(MapDnDEvent mde); | void dropOnMap(MapDnDEvent mde); void dragOverMap(MapDnDEvent mde); | /**
* DOCUMENT ME!
*
* @param mde DOCUMENT ME!
*/ | DOCUMENT ME | dragOverMap | {
"repo_name": "cismet/cismap-commons",
"path": "src/main/java/de/cismet/cismap/commons/interaction/MapDnDListener.java",
"license": "lgpl-3.0",
"size": 743
} | [
"de.cismet.cismap.commons.interaction.events.MapDnDEvent"
] | import de.cismet.cismap.commons.interaction.events.MapDnDEvent; | import de.cismet.cismap.commons.interaction.events.*; | [
"de.cismet.cismap"
] | de.cismet.cismap; | 2,282,912 |
public void setProperties(Properties properties) {
this.properties = properties;
} | void function(Properties properties) { this.properties = properties; } | /**
* Sets the properties for the repository connection
*
* @param properties
* the properties or null
*/ | Sets the properties for the repository connection | setProperties | {
"repo_name": "naidu/mercurialeclipse",
"path": "plugin/src/com/vectrace/MercurialEclipse/wizards/HgWizardPage.java",
"license": "epl-1.0",
"size": 2763
} | [
"java.util.Properties"
] | import java.util.Properties; | import java.util.*; | [
"java.util"
] | java.util; | 1,062,282 |
private static Optional<AnnotatedValueResolver> of(AnnotatedElement annotatedElement,
AnnotatedElement typeElement, Class<?> type,
Set<String> pathParams,
... | static Optional<AnnotatedValueResolver> function(AnnotatedElement annotatedElement, AnnotatedElement typeElement, Class<?> type, Set<String> pathParams, List<RequestObjectResolver> objectResolvers) { requireNonNull(annotatedElement, STR); requireNonNull(typeElement, STR); requireNonNull(type, "type"); requireNonNull(pa... | /**
* Creates a new {@link AnnotatedValueResolver} instance if the specified {@code annotatedElement} is
* a component of {@link AnnotatedHttpService}.
*
* @param annotatedElement an element which is annotated with a value specifier such as {@link Param} and
* {@link Hea... | Creates a new <code>AnnotatedValueResolver</code> instance if the specified annotatedElement is a component of <code>AnnotatedHttpService</code> | of | {
"repo_name": "jmostella/armeria",
"path": "core/src/main/java/com/linecorp/armeria/server/AnnotatedValueResolver.java",
"license": "apache-2.0",
"size": 48024
} | [
"com.linecorp.armeria.server.AnnotatedElementNameUtil",
"com.linecorp.armeria.server.annotation.Header",
"com.linecorp.armeria.server.annotation.Param",
"com.linecorp.armeria.server.annotation.RequestObject",
"java.lang.reflect.AnnotatedElement",
"java.util.List",
"java.util.Objects",
"java.util.Optio... | import com.linecorp.armeria.server.AnnotatedElementNameUtil; import com.linecorp.armeria.server.annotation.Header; import com.linecorp.armeria.server.annotation.Param; import com.linecorp.armeria.server.annotation.RequestObject; import java.lang.reflect.AnnotatedElement; import java.util.List; import java.util.Objects;... | import com.linecorp.armeria.server.*; import com.linecorp.armeria.server.annotation.*; import java.lang.reflect.*; import java.util.*; | [
"com.linecorp.armeria",
"java.lang",
"java.util"
] | com.linecorp.armeria; java.lang; java.util; | 1,287,421 |
public ContractsAndGrantsBillingAward getAward() {
award = SpringContext.getBean(ContractsAndGrantsModuleBillingService.class).updateAwardIfNecessary(proposalNumber, award);
return award;
} | ContractsAndGrantsBillingAward function() { award = SpringContext.getBean(ContractsAndGrantsModuleBillingService.class).updateAwardIfNecessary(proposalNumber, award); return award; } | /**
* Gets the award attribute.
*
* @return Returns the award.
*/ | Gets the award attribute | getAward | {
"repo_name": "bhutchinson/kfs",
"path": "kfs-ar/src/main/java/org/kuali/kfs/module/ar/businessobject/Bill.java",
"license": "agpl-3.0",
"size": 3119
} | [
"org.kuali.kfs.integration.cg.ContractsAndGrantsBillingAward",
"org.kuali.kfs.integration.cg.ContractsAndGrantsModuleBillingService",
"org.kuali.kfs.sys.context.SpringContext"
] | import org.kuali.kfs.integration.cg.ContractsAndGrantsBillingAward; import org.kuali.kfs.integration.cg.ContractsAndGrantsModuleBillingService; import org.kuali.kfs.sys.context.SpringContext; | import org.kuali.kfs.integration.cg.*; import org.kuali.kfs.sys.context.*; | [
"org.kuali.kfs"
] | org.kuali.kfs; | 2,133,405 |
public void setMosilabInstallation(IMosilabEnvironment env) {
if (mosilabInstallation != null)
mosilabInstallation.removeReferencedBy(this);
mosilabInstallation = env;
if (env != null)
mosilabInstallation.setReferencedBy(this);
} | void function(IMosilabEnvironment env) { if (mosilabInstallation != null) mosilabInstallation.removeReferencedBy(this); mosilabInstallation = env; if (env != null) mosilabInstallation.setReferencedBy(this); } | /**
* set the IMosilabEnvironment of this project
*
* @param env
* the new Environment or null if none
*/ | set the IMosilabEnvironment of this project | setMosilabInstallation | {
"repo_name": "choeger/eModelica",
"path": "src/main/java/de/tuberlin/uebb/emodelica/model/project/impl/MosilabProject.java",
"license": "epl-1.0",
"size": 16771
} | [
"de.tuberlin.uebb.emodelica.model.project.IMosilabEnvironment"
] | import de.tuberlin.uebb.emodelica.model.project.IMosilabEnvironment; | import de.tuberlin.uebb.emodelica.model.project.*; | [
"de.tuberlin.uebb"
] | de.tuberlin.uebb; | 402,834 |
@XmlElement(name="alcanceBloqueio")
@ApiModelProperty(example = "T", value = "Indica o alcance do bloqueio.<br/> Tamanho: 1<br/>T - Total<br/>P - Parcial")
private AlcanceBloqueioEnum alcanceBloqueio = null;
@JsonProperty("tipoBloqueio")
public String getTipoBloqueio() {
return tipoBloqueio;
} | @XmlElement(name=STR) @ApiModelProperty(example = "T", value = STR) AlcanceBloqueioEnum alcanceBloqueio = null; @JsonProperty(STR) public String function() { return tipoBloqueio; } | /**
* Tipo do bloqueio aplicado<br>Tamanho: 100<br/>
* @return tipoBloqueio
**/ | Tipo do bloqueio aplicado<br>Tamanho: 100<br/> | getTipoBloqueio | {
"repo_name": "samuelfac/portalunico.siscomex.gov.br",
"path": "src/main/java/br/gov/siscomex/portalunico/ccta/model/BloqueioConsultaDetalhada.java",
"license": "mit",
"size": 7411
} | [
"com.fasterxml.jackson.annotation.JsonProperty",
"io.swagger.annotations.ApiModelProperty",
"javax.xml.bind.annotation.XmlElement"
] | import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.annotations.ApiModelProperty; import javax.xml.bind.annotation.XmlElement; | import com.fasterxml.jackson.annotation.*; import io.swagger.annotations.*; import javax.xml.bind.annotation.*; | [
"com.fasterxml.jackson",
"io.swagger.annotations",
"javax.xml"
] | com.fasterxml.jackson; io.swagger.annotations; javax.xml; | 2,461,507 |
private void undeployWhenDeleting(APIEvent apiEvent) throws NotifierException {
Map<String, Environment> gatewayEnvironments = APIUtil.getReadOnlyGatewayEnvironments();
boolean deleted;
String apiId = apiEvent.getUuid();
try {
List<APIRevisionDeployment> test = apiMgtDA... | void function(APIEvent apiEvent) throws NotifierException { Map<String, Environment> gatewayEnvironments = APIUtil.getReadOnlyGatewayEnvironments(); boolean deleted; String apiId = apiEvent.getUuid(); try { List<APIRevisionDeployment> test = apiMgtDAO.getAPIRevisionDeploymentsByApiUUID(apiId); for (APIRevisionDeploymen... | /**
* Undeploy APIs from external gateway when API is deleted
*
* @param apiEvent APIEvent to undeploy APIs from external gateway
* @throws NotifierException if error occurs when undeploying APIs from external gateway
*/ | Undeploy APIs from external gateway when API is deleted | undeployWhenDeleting | {
"repo_name": "ruks/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/notifier/ExternallyDeployedApiNotifier.java",
"license": "apache-2.0",
"size": 6852
} | [
"java.util.List",
"java.util.Map",
"org.wso2.carbon.apimgt.api.APIManagementException",
"org.wso2.carbon.apimgt.api.model.APIRevisionDeployment",
"org.wso2.carbon.apimgt.api.model.Environment",
"org.wso2.carbon.apimgt.impl.deployer.ExternalGatewayDeployer",
"org.wso2.carbon.apimgt.impl.deployer.exceptio... | import java.util.List; import java.util.Map; import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.api.model.APIRevisionDeployment; import org.wso2.carbon.apimgt.api.model.Environment; import org.wso2.carbon.apimgt.impl.deployer.ExternalGatewayDeployer; import org.wso2.carbon.apimgt.im... | import java.util.*; import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.api.model.*; import org.wso2.carbon.apimgt.impl.deployer.*; import org.wso2.carbon.apimgt.impl.deployer.exceptions.*; import org.wso2.carbon.apimgt.impl.internal.*; import org.wso2.carbon.apimgt.impl.notifier.events.*; import org.wso... | [
"java.util",
"org.wso2.carbon"
] | java.util; org.wso2.carbon; | 2,700,750 |
private void checkBounds(
final int myOffset,
final int otherLength,
final int otherOffset,
final int count) {
Preconditions.checkArgument(count >= 0);
Preconditions.checkArgument(myOffset >= 0);
Preconditions.checkArgument(otherOffset >= 0);
Preconditions.checkArgument(myOffse... | void function( final int myOffset, final int otherLength, final int otherOffset, final int count) { Preconditions.checkArgument(count >= 0); Preconditions.checkArgument(myOffset >= 0); Preconditions.checkArgument(otherOffset >= 0); Preconditions.checkArgument(myOffset + count <= mSize); Preconditions.checkArgument(othe... | /**
* Check that copy/read/write operation won't access memory it should not
*/ | Check that copy/read/write operation won't access memory it should not | checkBounds | {
"repo_name": "s1rius/fresco",
"path": "imagepipeline/src/main/java/com/facebook/imagepipeline/memory/NativeMemoryChunk.java",
"license": "mit",
"size": 9026
} | [
"com.facebook.common.internal.Preconditions"
] | import com.facebook.common.internal.Preconditions; | import com.facebook.common.internal.*; | [
"com.facebook.common"
] | com.facebook.common; | 2,558,989 |
public T secureXML(String secureTag, boolean secureTagContents, String passPhrase) {
XMLSecurityDataFormat xsdf = new XMLSecurityDataFormat(secureTag, secureTagContents, passPhrase);
return dataFormat(xsdf);
} | T function(String secureTag, boolean secureTagContents, String passPhrase) { XMLSecurityDataFormat xsdf = new XMLSecurityDataFormat(secureTag, secureTagContents, passPhrase); return dataFormat(xsdf); } | /**
* Uses the XML Security data format
*/ | Uses the XML Security data format | secureXML | {
"repo_name": "kingargyle/turmeric-bot",
"path": "camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java",
"license": "apache-2.0",
"size": 11182
} | [
"org.apache.camel.model.dataformat.XMLSecurityDataFormat"
] | import org.apache.camel.model.dataformat.XMLSecurityDataFormat; | import org.apache.camel.model.dataformat.*; | [
"org.apache.camel"
] | org.apache.camel; | 1,314,202 |
public VirtualNetworkGatewayConnectionListEntityInner withLocalNetworkGateway2(VirtualNetworkConnectionGatewayReference localNetworkGateway2) {
this.localNetworkGateway2 = localNetworkGateway2;
return this;
} | VirtualNetworkGatewayConnectionListEntityInner function(VirtualNetworkConnectionGatewayReference localNetworkGateway2) { this.localNetworkGateway2 = localNetworkGateway2; return this; } | /**
* Set the reference to local network gateway resource.
*
* @param localNetworkGateway2 the localNetworkGateway2 value to set
* @return the VirtualNetworkGatewayConnectionListEntityInner object itself.
*/ | Set the reference to local network gateway resource | withLocalNetworkGateway2 | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/VirtualNetworkGatewayConnectionListEntityInner.java",
"license": "mit",
"size": 16813
} | [
"com.microsoft.azure.management.network.v2019_02_01.VirtualNetworkConnectionGatewayReference"
] | import com.microsoft.azure.management.network.v2019_02_01.VirtualNetworkConnectionGatewayReference; | import com.microsoft.azure.management.network.v2019_02_01.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 989,028 |
public static byte [] getKeyIdentifier(Key key) {
// Works on symmetric and public.
return CCNDigestHelper.digest(key.getEncoded());
}
| static byte [] function(Key key) { return CCNDigestHelper.digest(key.getEncoded()); } | /**
* Returns the digest of a specified key.
* @param key the key.
* @return the digest.
*/ | Returns the digest of a specified key | getKeyIdentifier | {
"repo_name": "StefanoSalsano/alien-ofelia-conet-ccnx",
"path": "javasrc/src/org/ccnx/ccn/impl/security/keys/SecureKeyCache.java",
"license": "lgpl-2.1",
"size": 17495
} | [
"java.security.Key",
"org.ccnx.ccn.impl.security.crypto.CCNDigestHelper"
] | import java.security.Key; import org.ccnx.ccn.impl.security.crypto.CCNDigestHelper; | import java.security.*; import org.ccnx.ccn.impl.security.crypto.*; | [
"java.security",
"org.ccnx.ccn"
] | java.security; org.ccnx.ccn; | 947,620 |
public void setPatternList(List patternList) {
this.mPatternList = patternList;
Vector childNames = getPatternNames();
mChildPattern.updateComboBoxEntries(childNames, childNames);
} | void function(List patternList) { this.mPatternList = patternList; Vector childNames = getPatternNames(); mChildPattern.updateComboBoxEntries(childNames, childNames); } | /**
* For the child pattern box, the list is set here.
*
*/ | For the child pattern box, the list is set here | setPatternList | {
"repo_name": "iwabuchiken/freemind_1.0.0_20140624_214725",
"path": "freemind/modes/mindmapmode/dialogs/StylePatternFrame.java",
"license": "gpl-2.0",
"size": 25538
} | [
"java.util.List",
"java.util.Vector"
] | import java.util.List; import java.util.Vector; | import java.util.*; | [
"java.util"
] | java.util; | 1,948,952 |
private void saveLocaleLocked(Locale l, boolean isDiff, boolean isPersist) {
if(isDiff) {
SystemProperties.set("user.language", l.getLanguage());
SystemProperties.set("user.region", l.getCountry());
}
if(isPersist) {
SystemProperties.set("persist.sys.lan... | void function(Locale l, boolean isDiff, boolean isPersist) { if(isDiff) { SystemProperties.set(STR, l.getLanguage()); SystemProperties.set(STR, l.getCountry()); } if(isPersist) { SystemProperties.set(STR, l.getLanguage()); SystemProperties.set(STR, l.getCountry()); SystemProperties.set(STR, l.getVariant()); mHandler.se... | /**
* Save the locale. You must be inside a synchronized (this) block.
*/ | Save the locale. You must be inside a synchronized (this) block | saveLocaleLocked | {
"repo_name": "s20121035/rk3288_android5.1_repo",
"path": "frameworks/base/services/core/java/com/android/server/am/ActivityManagerService.java",
"license": "gpl-3.0",
"size": 864752
} | [
"android.os.SystemProperties",
"java.util.Locale"
] | import android.os.SystemProperties; import java.util.Locale; | import android.os.*; import java.util.*; | [
"android.os",
"java.util"
] | android.os; java.util; | 2,059,516 |
public String declare(VariableRef initialValueRef) {
String valueExpr = cast(initialValueRef);
declared = true;
return format("\n%s %s = %s", typeName(), name(), valueExpr);
}
| String function(VariableRef initialValueRef) { String valueExpr = cast(initialValueRef); declared = true; return format(STR, typeName(), name(), valueExpr); } | /**
* Returns Java code which declares this variable, initialized with the
* provided value.
*
* @param initialValueRef the VariableRef instance which describes the
* initial value of the receiver
* @return the code which declares this variable, and explicitly assigns the
... | Returns Java code which declares this variable, initialized with the provided value | declare | {
"repo_name": "Log10Solutions/orika",
"path": "core/src/main/java/ma/glasnost/orika/impl/generator/VariableRef.java",
"license": "apache-2.0",
"size": 30668
} | [
"java.lang.String"
] | import java.lang.String; | import java.lang.*; | [
"java.lang"
] | java.lang; | 2,123,896 |
EReference getConfiguration_Configuration();
| EReference getConfiguration_Configuration(); | /**
* Returns the meta object for the containment reference list '{@link org.nasdanika.config.Configuration#getConfiguration <em>Configuration</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference list '<em>Configuration</em>'.
* @see org.nasdan... | Returns the meta object for the containment reference list '<code>org.nasdanika.config.Configuration#getConfiguration Configuration</code>'. | getConfiguration_Configuration | {
"repo_name": "Nasdanika/config",
"path": "org.nasdanika.config/src/org/nasdanika/config/ConfigPackage.java",
"license": "epl-1.0",
"size": 46985
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,151,618 |
protected void onBindHeaderViewHolder(RecyclerView.ViewHolder holder, int position) {
} | void function(RecyclerView.ViewHolder holder, int position) { } | /**
* Override this method to update your headers
*
* @param holder view getHolder
* @param position header position
*/ | Override this method to update your headers | onBindHeaderViewHolder | {
"repo_name": "e16din/SimpleRecycler",
"path": "library/src/main/java/com/e16din/simplerecycler/adapter/SimpleInsertsAdapter.java",
"license": "mit",
"size": 24133
} | [
"android.support.v7.widget.RecyclerView"
] | import android.support.v7.widget.RecyclerView; | import android.support.v7.widget.*; | [
"android.support"
] | android.support; | 1,751,922 |
@Override
public void hsync() throws IOException {
if (out instanceof Syncable) {
flush();
((Syncable) out).hsync();
} else {
if (!downgradeSyncable) {
throw new UnsupportedOperationException("hsync not supported by "
+ out);
} else {
flush();
}
... | void function() throws IOException { if (out instanceof Syncable) { flush(); ((Syncable) out).hsync(); } else { if (!downgradeSyncable) { throw new UnsupportedOperationException(STR + out); } else { flush(); } } } | /**
* If the inner stream is Syncable, flush the buffer and then
* invoke the inner stream's hsync() operation.
*
* Otherwise: throw an exception, unless the stream was constructed with
* {@link #downgradeSyncable} set to true, in which case the stream
* is just flushed.
* @throws IOException IO Pr... | If the inner stream is Syncable, flush the buffer and then invoke the inner stream's hsync() operation. Otherwise: throw an exception, unless the stream was constructed with <code>#downgradeSyncable</code> set to true, in which case the stream is just flushed | hsync | {
"repo_name": "mapr/hadoop-common",
"path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/statistics/BufferedIOStatisticsOutputStream.java",
"license": "apache-2.0",
"size": 4955
} | [
"java.io.IOException",
"org.apache.hadoop.fs.Syncable"
] | import java.io.IOException; import org.apache.hadoop.fs.Syncable; | import java.io.*; import org.apache.hadoop.fs.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 482,219 |
public void destroy(@Observes BeforeShutdown shut) {
this.contexts.forEach((c) -> c.destroy());
this.registrations.stream().
forEach((s) -> {
try {
s.unregister();
} catch (Exception exc) {}
});
} | void function(@Observes BeforeShutdown shut) { this.contexts.forEach((c) -> c.destroy()); this.registrations.stream(). forEach((s) -> { try { s.unregister(); } catch (Exception exc) {} }); } | /**
* Destroy this extension. Removes the scope services.
*
* @param shut The shutdown event
*/ | Destroy this extension. Removes the scope services | destroy | {
"repo_name": "arievanwi/osgi.ee",
"path": "osgi.ee.extender.cdi/src/osgi/extender/cdi/extension/ScopeExtension.java",
"license": "apache-2.0",
"size": 5073
} | [
"javax.enterprise.event.Observes",
"javax.enterprise.inject.spi.BeforeShutdown"
] | import javax.enterprise.event.Observes; import javax.enterprise.inject.spi.BeforeShutdown; | import javax.enterprise.event.*; import javax.enterprise.inject.spi.*; | [
"javax.enterprise"
] | javax.enterprise; | 2,776,397 |
public boolean isCompatibleStream(InputStream is)
throws StreamCorruptedException {
for (int i=0; i<magicNumbers.length; i++) {
if (magicNumbers[i].isMatch(is)) {
return true;
}
}
return false;
} | boolean function(InputStream is) throws StreamCorruptedException { for (int i=0; i<magicNumbers.length; i++) { if (magicNumbers[i].isMatch(is)) { return true; } } return false; } | /**
* Check if the stream contains an image that can be
* handled by this format handler
*/ | Check if the stream contains an image that can be handled by this format handler | isCompatibleStream | {
"repo_name": "Squeegee/batik",
"path": "sources/org/apache/batik/ext/awt/image/spi/MagicNumberRegistryEntry.java",
"license": "apache-2.0",
"size": 11278
} | [
"java.io.InputStream",
"java.io.StreamCorruptedException"
] | import java.io.InputStream; import java.io.StreamCorruptedException; | import java.io.*; | [
"java.io"
] | java.io; | 2,400,463 |
public int execute() {
int instruction = bus.readUnsignedByteAsInt(pc);
int address;
int value;
int lo, hi;
// Gdx.app.debug(getClass().getSimpleName(), "****************************************************************");
// Gdx.app.debug(getClass().getSimpl... | int function() { int instruction = bus.readUnsignedByteAsInt(pc); int address; int value; int lo, hi; switch(instruction) { case 0x69: value = bus.readUnsignedByteAsInt(++pc); a += value + status_carry; if (a > 0xff) { status_carry = 1; a -= 0x100; } else { status_carry = 0; } status_negative = (a & 0x80) == 0x80; stat... | /**
* Looks at the instruction located on the bus at the current program
* counter, then jumps to the case associated with that opcode and performs
* the associated logic.
*
* @return Returns the instruction that was executed (for use by nmi to determine
* when rti has been executed)... | Looks at the instruction located on the bus at the current program counter, then jumps to the case associated with that opcode and performs the associated logic | execute | {
"repo_name": "gradualgames/ggvm",
"path": "core/src/com/gradualgames/ggvm/Cpu.java",
"license": "unlicense",
"size": 64960
} | [
"com.badlogic.gdx.Gdx"
] | import com.badlogic.gdx.Gdx; | import com.badlogic.gdx.*; | [
"com.badlogic.gdx"
] | com.badlogic.gdx; | 1,058,780 |
@Override
public byte[] transformClass(MixinEnvironment environment, String name, byte[] classBytes) {
ClassNode classNode = this.readClass(name, classBytes);
if (this.processor.applyMixins(environment, name, classNode)) {
return this.writeClass(classNode);
}
return c... | byte[] function(MixinEnvironment environment, String name, byte[] classBytes) { ClassNode classNode = this.readClass(name, classBytes); if (this.processor.applyMixins(environment, name, classNode)) { return this.writeClass(classNode); } return classBytes; } | /**
* Apply mixins and postprocessors to the supplied class
*
* @param environment Current environment
* @param name Class transformed name
* @param classBytes Class bytecode
* @return Transformed bytecode
*/ | Apply mixins and postprocessors to the supplied class | transformClass | {
"repo_name": "SpongePowered/Mixin",
"path": "src/main/java/org/spongepowered/asm/mixin/transformer/MixinTransformer.java",
"license": "mit",
"size": 10439
} | [
"org.objectweb.asm.tree.ClassNode",
"org.spongepowered.asm.mixin.MixinEnvironment"
] | import org.objectweb.asm.tree.ClassNode; import org.spongepowered.asm.mixin.MixinEnvironment; | import org.objectweb.asm.tree.*; import org.spongepowered.asm.mixin.*; | [
"org.objectweb.asm",
"org.spongepowered.asm"
] | org.objectweb.asm; org.spongepowered.asm; | 458,402 |
@Transient
public List<StudySite> getActiveStudySites(){
List<StudySite> sites = new ArrayList<StudySite>();
for(StudySite site : getStudySites()){
if(!site.isRetired()) sites.add(site);
}
return sites;
}
| List<StudySite> function(){ List<StudySite> sites = new ArrayList<StudySite>(); for(StudySite site : getStudySites()){ if(!site.isRetired()) sites.add(site); } return sites; } | /**
* Will return the {@link StudySite}s that are not retired.
*
* @return the active study sites
*/ | Will return the <code>StudySite</code>s that are not retired | getActiveStudySites | {
"repo_name": "CBIIT/caaers",
"path": "caAERS/software/core/src/main/java/gov/nih/nci/cabig/caaers/domain/Study.java",
"license": "bsd-3-clause",
"size": 80505
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 832,092 |
public static MozuClient<com.mozu.api.contracts.core.Behavior> getBehaviorClient(Integer behaviorId) throws Exception
{
return getBehaviorClient( behaviorId, null);
} | static MozuClient<com.mozu.api.contracts.core.Behavior> function(Integer behaviorId) throws Exception { return getBehaviorClient( behaviorId, null); } | /**
* Retrieves the details of a behavior based on the behavior ID specified in the request.
* <p><pre><code>
* MozuClient<com.mozu.api.contracts.core.Behavior> mozuClient=GetBehaviorClient( behaviorId);
* client.setBaseAddress(url);
* client.executeRequest();
* Behavior behavior = client.Result();
* </co... | Retrieves the details of a behavior based on the behavior ID specified in the request. <code><code> MozuClient mozuClient=GetBehaviorClient( behaviorId); client.setBaseAddress(url); client.executeRequest(); Behavior behavior = client.Result(); </code></code> | getBehaviorClient | {
"repo_name": "sanjaymandadi/mozu-java",
"path": "mozu-java-core/src/main/java/com/mozu/api/clients/platform/ReferenceDataClient.java",
"license": "mit",
"size": 27032
} | [
"com.mozu.api.MozuClient"
] | import com.mozu.api.MozuClient; | import com.mozu.api.*; | [
"com.mozu.api"
] | com.mozu.api; | 1,472,069 |
private void showApplications(final String searchStr) {
setDirty(false);
List<PackageInfoData> searchApp = new ArrayList<>();
HashSet<Integer> unique = new HashSet<>();
final List<PackageInfoData> apps = Api.getApps(this, null);
boolean isResultsFound = false;
if (... | void function(final String searchStr) { setDirty(false); List<PackageInfoData> searchApp = new ArrayList<>(); HashSet<Integer> unique = new HashSet<>(); final List<PackageInfoData> apps = Api.getApps(this, null); boolean isResultsFound = false; if (searchStr != null && searchStr.length() > 1) { for (PackageInfoData app... | /**
* Show the list of applications
*/ | Show the list of applications | showApplications | {
"repo_name": "ukanth/afwall",
"path": "app/src/main/java/dev/ukanth/ufirewall/MainActivity.java",
"license": "gpl-3.0",
"size": 103821
} | [
"dev.ukanth.ufirewall.Api",
"dev.ukanth.ufirewall.util.G",
"java.util.ArrayList",
"java.util.HashSet",
"java.util.List"
] | import dev.ukanth.ufirewall.Api; import dev.ukanth.ufirewall.util.G; import java.util.ArrayList; import java.util.HashSet; import java.util.List; | import dev.ukanth.ufirewall.*; import dev.ukanth.ufirewall.util.*; import java.util.*; | [
"dev.ukanth.ufirewall",
"java.util"
] | dev.ukanth.ufirewall; java.util; | 1,960,603 |
String toJsonString() {
try {
return from(s3obj.getObjectContent());
} catch (Exception e) {
throw new AmazonClientException("Error parsing JSON: " + e.getMessage());
}
} | String toJsonString() { try { return from(s3obj.getObjectContent()); } catch (Exception e) { throw new AmazonClientException(STR + e.getMessage()); } } | /**
* Converts and return the underlying S3 object as a json string.
*
* @throws AmazonClientException if failed in JSON conversion.
*/ | Converts and return the underlying S3 object as a json string | toJsonString | {
"repo_name": "flofreud/aws-sdk-java",
"path": "aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/internal/crypto/S3ObjectWrapper.java",
"license": "apache-2.0",
"size": 5482
} | [
"com.amazonaws.AmazonClientException"
] | import com.amazonaws.AmazonClientException; | import com.amazonaws.*; | [
"com.amazonaws"
] | com.amazonaws; | 1,208,552 |
@Test
public void testGetConvertedListDTOFromDomain( ) throws Exception {
logger.debug( "Starting GetConvertedListDTOFromDomain" );
List< SidebarType > sidebarDTOList;
List< com.mana.innovative.domain.common.SidebarType > sidebarDomainList = new ArrayList<>( );
sidebarDomainLi... | void function( ) throws Exception { logger.debug( STR ); List< SidebarType > sidebarDTOList; List< com.mana.innovative.domain.common.SidebarType > sidebarDomainList = new ArrayList<>( ); sidebarDomainList.add( sidebarDomain ); if ( sidebarDomain.getSidebarTypeId( ) != TestConstants.TEST_ID ) { TestDummyDomainObjectGene... | /**
* Test get converted list dTO from domain.
*
* @throws Exception the exception
*/ | Test get converted list dTO from domain | testGetConvertedListDTOFromDomain | {
"repo_name": "arkoghosh11/bloom-test",
"path": "bloom-converter/src/test/java/com/mana/innovative/converter/response/WhenSidebarConversionThenTestSiderbarConverterDomainDTOMethods.java",
"license": "apache-2.0",
"size": 7879
} | [
"com.mana.innovative.constants.TestConstants",
"com.mana.innovative.converter.TestDummyDomainObjectGenerator",
"com.mana.innovative.dto.common.SidebarType",
"java.util.ArrayList",
"java.util.List",
"junit.framework.Assert"
] | import com.mana.innovative.constants.TestConstants; import com.mana.innovative.converter.TestDummyDomainObjectGenerator; import com.mana.innovative.dto.common.SidebarType; import java.util.ArrayList; import java.util.List; import junit.framework.Assert; | import com.mana.innovative.constants.*; import com.mana.innovative.converter.*; import com.mana.innovative.dto.common.*; import java.util.*; import junit.framework.*; | [
"com.mana.innovative",
"java.util",
"junit.framework"
] | com.mana.innovative; java.util; junit.framework; | 1,569,853 |
CommandManager manager = new CommandManager(null, null, null, null);
Color def = (Color) SettingManager.get("color");
manager.parseCommand("let color=SKYBLUE");
assertEquals(Color.SKYBLUE, SettingManager.get("color"));
manager.parseCommand("let color = MAROON");
assertEquals(Col... | CommandManager manager = new CommandManager(null, null, null, null); Color def = (Color) SettingManager.get("color"); manager.parseCommand(STR); assertEquals(Color.SKYBLUE, SettingManager.get("color")); manager.parseCommand(STR); assertEquals(Color.MAROON, SettingManager.get("color")); manager.parseCommand(STR); assert... | /**
* A test that will check to see if the setting manager is working properly
*/ | A test that will check to see if the setting manager is working properly | testColorSwitch | {
"repo_name": "jgkamat/ViPaint",
"path": "src/test/java/io/github/jgkamat/ViPaint/CommandTests.java",
"license": "gpl-3.0",
"size": 2581
} | [
"io.github.jgkamat.ViPaint",
"org.junit.Assert"
] | import io.github.jgkamat.ViPaint; import org.junit.Assert; | import io.github.jgkamat.*; import org.junit.*; | [
"io.github.jgkamat",
"org.junit"
] | io.github.jgkamat; org.junit; | 1,808,251 |
Map<Operator, OperatorEstimate> estimate(Collection<? extends Operator> operators); | Map<Operator, OperatorEstimate> estimate(Collection<? extends Operator> operators); | /**
* Estimates statistics for the target operators.
* If the target operator is not a predecessor of the current estimating one,
* this always returns {@link OperatorEstimate#UNKNOWN unknown}.
* @param operators the target operators
* @return the estimate for each operator
... | Estimates statistics for the target operators. If the target operator is not a predecessor of the current estimating one, this always returns <code>OperatorEstimate#UNKNOWN unknown</code> | estimate | {
"repo_name": "ashigeru/asakusafw-compiler",
"path": "compiler-project/optimizer/src/main/java/com/asakusafw/lang/compiler/optimizer/OperatorEstimator.java",
"license": "apache-2.0",
"size": 4844
} | [
"com.asakusafw.lang.compiler.model.graph.Operator",
"java.util.Collection",
"java.util.Map"
] | import com.asakusafw.lang.compiler.model.graph.Operator; import java.util.Collection; import java.util.Map; | import com.asakusafw.lang.compiler.model.graph.*; import java.util.*; | [
"com.asakusafw.lang",
"java.util"
] | com.asakusafw.lang; java.util; | 975,094 |
public ActionForward approve( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response ) throws Exception {
KualiDocumentFormBase kualiDocumentFormBase = (KualiDocumentFormBase) form;
doProcessingAfterPost( kualiDocumentFormBase, request );
kualiDocumentFormBase.setDeri... | ActionForward function( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response ) throws Exception { KualiDocumentFormBase kualiDocumentFormBase = (KualiDocumentFormBase) form; doProcessingAfterPost( kualiDocumentFormBase, request ); kualiDocumentFormBase.setDerivedValuesOnForm(... | /**
* Calls the document service to approve the document
*
* @param mapping
* @param form
* @param request
* @param response
* @return ActionForward
* @throws Exception
*/ | Calls the document service to approve the document | approve | {
"repo_name": "ua-eas/ksd-kc5.2.1-rice2.3.6-ua",
"path": "rice-middleware/kns/src/main/java/org/kuali/rice/kns/web/struts/action/KualiDocumentActionBase.java",
"license": "apache-2.0",
"size": 107002
} | [
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"org.apache.struts.action.ActionForm",
"org.apache.struts.action.ActionForward",
"org.apache.struts.action.ActionMapping",
"org.kuali.rice.kns.web.struts.form.KualiDocumentFormBase",
"org.kuali.rice.krad.document.Document... | import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.kuali.rice.kns.web.struts.form.KualiDocumentFormBase; import org.kuali.rice.kr... | import javax.servlet.http.*; import org.apache.struts.action.*; import org.kuali.rice.kns.web.struts.form.*; import org.kuali.rice.krad.document.*; import org.kuali.rice.krad.util.*; | [
"javax.servlet",
"org.apache.struts",
"org.kuali.rice"
] | javax.servlet; org.apache.struts; org.kuali.rice; | 960,429 |
private void invoke(String workflowId, String workplaceName) {
WorkflowService service = get(WorkflowService.class);
DefaultWorkflowDescription wfDesc = DefaultWorkflowDescription.builder()
.workplaceName(workplaceName)
.id(workflowId)
.data(JsonNodeF... | void function(String workflowId, String workplaceName) { WorkflowService service = get(WorkflowService.class); DefaultWorkflowDescription wfDesc = DefaultWorkflowDescription.builder() .workplaceName(workplaceName) .id(workflowId) .data(JsonNodeFactory.instance.objectNode()) .build(); try { service.invokeWorkflow(wfDesc... | /**
* Invokes workflow.
* @param workflowId workflow id
* @param workplaceName workplace name
*/ | Invokes workflow | invoke | {
"repo_name": "kuujo/onos",
"path": "apps/workflow/app/src/main/java/org/onosproject/workflow/cli/WorkFlowTestCommand.java",
"license": "apache-2.0",
"size": 3297
} | [
"com.fasterxml.jackson.databind.node.JsonNodeFactory",
"java.util.Arrays",
"org.onosproject.workflow.api.DefaultWorkflowDescription",
"org.onosproject.workflow.api.WorkflowException",
"org.onosproject.workflow.api.WorkflowService"
] | import com.fasterxml.jackson.databind.node.JsonNodeFactory; import java.util.Arrays; import org.onosproject.workflow.api.DefaultWorkflowDescription; import org.onosproject.workflow.api.WorkflowException; import org.onosproject.workflow.api.WorkflowService; | import com.fasterxml.jackson.databind.node.*; import java.util.*; import org.onosproject.workflow.api.*; | [
"com.fasterxml.jackson",
"java.util",
"org.onosproject.workflow"
] | com.fasterxml.jackson; java.util; org.onosproject.workflow; | 1,059,327 |
void switchFilterMode(FilterDelegate.FilterMode filterMode); | void switchFilterMode(FilterDelegate.FilterMode filterMode); | /**
* Changes the filter mode and repaints the filter layout
*/ | Changes the filter mode and repaints the filter layout | switchFilterMode | {
"repo_name": "dimone-kun/cuba",
"path": "modules/gui/src/com/haulmont/cuba/gui/components/Filter.java",
"license": "apache-2.0",
"size": 9915
} | [
"com.haulmont.cuba.gui.components.filter.FilterDelegate"
] | import com.haulmont.cuba.gui.components.filter.FilterDelegate; | import com.haulmont.cuba.gui.components.filter.*; | [
"com.haulmont.cuba"
] | com.haulmont.cuba; | 2,185,512 |
public void finish() throws IOException {
if (!def.finished()) {
def.finish();
while (!def.finished()) {
deflate();
}
}
} | void function() throws IOException { if (!def.finished()) { def.finish(); while (!def.finished()) { deflate(); } } } | /**
* Finishes writing compressed data to the output stream without closing
* the underlying stream. Use this method when applying multiple filters
* in succession to the same output stream.
* @exception IOException if an I/O error has occurred
*/ | Finishes writing compressed data to the output stream without closing the underlying stream. Use this method when applying multiple filters in succession to the same output stream | finish | {
"repo_name": "chfoo/areca-backup-release-mirror",
"path": "src/com/myJava/file/archive/zip64/DeflaterOutputStream.java",
"license": "gpl-2.0",
"size": 5480
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,217,140 |
private boolean addDocumentToOmnivore(
final String title,
final String category,
final String dateStr,
final Path file,
final String keywords
) throws IOException, ElexisException{
String logPrefix = "addDocumentToOmnivore() - ";//$NON-NLS-1$
this.checkCreateCategory(category);
//First ... | boolean function( final String title, final String category, final String dateStr, final Path file, final String keywords ) throws IOException, ElexisException{ String logPrefix = STR; this.checkCreateCategory(category); List<IOpaqueDocument> documentList = this.omnivoreDocManager.listDocuments( this.patient, category,... | /**
* Add a new document to Omnivore
* @param title
* @param category
* @param dateStr
* @param file
* @param keywords
* @return true if was successful
* @throws IOException
* @throws ElexisException
*/ | Add a new document to Omnivore | addDocumentToOmnivore | {
"repo_name": "DavidGutknecht/elexis-3-base",
"path": "bundles/ch.novcom.elexis.mednet.plugin/src/ch/novcom/elexis/mednet/plugin/data/PatientDocumentManager.java",
"license": "epl-1.0",
"size": 17530
} | [
"ch.elexis.core.data.interfaces.text.IOpaqueDocument",
"ch.elexis.core.exceptions.ElexisException",
"ch.elexis.core.ui.text.GenericDocument",
"ch.rgw.tools.TimeSpan",
"java.io.IOException",
"java.nio.file.Files",
"java.nio.file.Path",
"java.util.List"
] | import ch.elexis.core.data.interfaces.text.IOpaqueDocument; import ch.elexis.core.exceptions.ElexisException; import ch.elexis.core.ui.text.GenericDocument; import ch.rgw.tools.TimeSpan; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.util.List; | import ch.elexis.core.data.interfaces.text.*; import ch.elexis.core.exceptions.*; import ch.elexis.core.ui.text.*; import ch.rgw.tools.*; import java.io.*; import java.nio.file.*; import java.util.*; | [
"ch.elexis.core",
"ch.rgw.tools",
"java.io",
"java.nio",
"java.util"
] | ch.elexis.core; ch.rgw.tools; java.io; java.nio; java.util; | 1,850,900 |
@Test
public void testExtractBadEvent4() {
String badData1 = "<123123123123123123123123123123> bad bad data\n";
SyslogUtils util = new SyslogUtils(false);
ChannelBuffer buff = ChannelBuffers.buffer(100);
buff.writeBytes(badData1.getBytes());
Event e = util.extractEvent(buff);
if (e == null) ... | void function() { String badData1 = STR; SyslogUtils util = new SyslogUtils(false); ChannelBuffer buff = ChannelBuffers.buffer(100); buff.writeBytes(badData1.getBytes()); Event e = util.extractEvent(buff); if (e == null) { throw new NullPointerException(STR); } Map<String, String> headers = e.getHeaders(); Assert.asser... | /**
* Test bad event format 4: Priority too long
*/ | Test bad event format 4: Priority too long | testExtractBadEvent4 | {
"repo_name": "wangcy6/storm_app",
"path": "frame/apache-flume-1.7.0-src/flume-ng-core/src/test/java/org/apache/flume/source/TestSyslogUtils.java",
"license": "apache-2.0",
"size": 22868
} | [
"java.util.Map",
"org.apache.flume.Event",
"org.jboss.netty.buffer.ChannelBuffer",
"org.jboss.netty.buffer.ChannelBuffers",
"org.junit.Assert"
] | import java.util.Map; import org.apache.flume.Event; import org.jboss.netty.buffer.ChannelBuffer; import org.jboss.netty.buffer.ChannelBuffers; import org.junit.Assert; | import java.util.*; import org.apache.flume.*; import org.jboss.netty.buffer.*; import org.junit.*; | [
"java.util",
"org.apache.flume",
"org.jboss.netty",
"org.junit"
] | java.util; org.apache.flume; org.jboss.netty; org.junit; | 911,810 |
void writeToCopy(byte[] buf, int off, int siz) throws SQLException; | void writeToCopy(byte[] buf, int off, int siz) throws SQLException; | /**
* Writes specified part of given byte array to an open and writable copy operation.
* @param buf array of bytes to write
* @param off offset of first byte to write (normally zero)
* @param siz number of bytes to write (normally buf.length)
* @throws SQLException if the operation fails
... | Writes specified part of given byte array to an open and writable copy operation | writeToCopy | {
"repo_name": "devsunny/app-galleries",
"path": "postgres-odbc-server/src/main/java/org/postgresql/copy/CopyIn.java",
"license": "mit",
"size": 1460
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,128,657 |
public static Rop opCmpg(TypeBearer type) {
switch (type.getBasicType()) {
case Type.BT_FLOAT: return CMPG_FLOAT;
case Type.BT_DOUBLE: return CMPG_DOUBLE;
}
return throwBadType(type);
} | static Rop function(TypeBearer type) { switch (type.getBasicType()) { case Type.BT_FLOAT: return CMPG_FLOAT; case Type.BT_DOUBLE: return CMPG_DOUBLE; } return throwBadType(type); } | /**
* Returns the appropriate {@code cmpg} rop for the given type. The
* result is a shared instance.
*
* @param type {@code non-null;} type of value being compared
* @return {@code non-null;} an appropriate instance
*/ | Returns the appropriate cmpg rop for the given type. The result is a shared instance | opCmpg | {
"repo_name": "raviagarwal7/buck",
"path": "third-party/java/dx/src/com/android/dx/rop/code/Rops.java",
"license": "apache-2.0",
"size": 82635
} | [
"com.android.dx.rop.type.Type",
"com.android.dx.rop.type.TypeBearer"
] | import com.android.dx.rop.type.Type; import com.android.dx.rop.type.TypeBearer; | import com.android.dx.rop.type.*; | [
"com.android.dx"
] | com.android.dx; | 837,867 |
public FDateAssert isNotBetween(final FDate start, final FDate end) {
return isNotBetween(start, end, true, false);
} | FDateAssert function(final FDate start, final FDate end) { return isNotBetween(start, end, true, false); } | /**
* Verifies that the actual {@code FDate} is not in [start, end[ period
*
* @param start
* the period start (inclusive), expected not to be null.
* @param end
* the period end (exclusive), expected not to be null.
* @return this assertion object.
* @throw... | Verifies that the actual FDate is not in [start, end[ period | isNotBetween | {
"repo_name": "subes/invesdwin-util",
"path": "invesdwin-util-parent/invesdwin-util/src/main/java/de/invesdwin/util/assertions/type/FDateAssert.java",
"license": "lgpl-3.0",
"size": 110738
} | [
"de.invesdwin.util.time.date.FDate"
] | import de.invesdwin.util.time.date.FDate; | import de.invesdwin.util.time.date.*; | [
"de.invesdwin.util"
] | de.invesdwin.util; | 2,525,579 |
ServiceResponse<List<DateTime>> getDateTimeInvalidChars() throws ErrorException, IOException; | ServiceResponse<List<DateTime>> getDateTimeInvalidChars() throws ErrorException, IOException; | /**
* Get date array value ['2000-12-01t00:00:01z', 'date-time'].
*
* @throws ErrorException exception thrown from REST call
* @throws IOException exception thrown from serialization/deserialization
* @return the List<DateTime> object wrapped in {@link ServiceResponse} if successful.
... | Get date array value ['2000-12-01t00:00:01z', 'date-time'] | getDateTimeInvalidChars | {
"repo_name": "haocs/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/bodyarray/Arrays.java",
"license": "mit",
"size": 72234
} | [
"com.microsoft.rest.ServiceResponse",
"java.io.IOException",
"java.util.List",
"org.joda.time.DateTime"
] | import com.microsoft.rest.ServiceResponse; import java.io.IOException; import java.util.List; import org.joda.time.DateTime; | import com.microsoft.rest.*; import java.io.*; import java.util.*; import org.joda.time.*; | [
"com.microsoft.rest",
"java.io",
"java.util",
"org.joda.time"
] | com.microsoft.rest; java.io; java.util; org.joda.time; | 2,501,216 |
@Test
public void testAcquireReadWriteLocksOnSameKey() throws InterruptedException {
final String key = "key";
final Vector<Integer> threadsCompleted = new Vector<Integer>();
| void function() throws InterruptedException { final String key = "key"; final Vector<Integer> threadsCompleted = new Vector<Integer>(); | /**
* For two threads trying to respectively acquire the read and write locks on the same key, only one succeeds.
*/ | For two threads trying to respectively acquire the read and write locks on the same key, only one succeeds | testAcquireReadWriteLocksOnSameKey | {
"repo_name": "turing123/lockmanager",
"path": "src/test/java/turing123/SimpleReadWriteLockManagerTest.java",
"license": "mit",
"size": 3840
} | [
"java.util.Vector"
] | import java.util.Vector; | import java.util.*; | [
"java.util"
] | java.util; | 107,068 |
public static <E> NonNullList<E> withSize(int size, E fill)
{
Validate.notNull(fill);
Object[] aobject = new Object[size];
Arrays.fill(aobject, fill);
return new NonNullList<E>(Arrays.asList((E[])aobject), fill);
} | static <E> NonNullList<E> function(int size, E fill) { Validate.notNull(fill); Object[] aobject = new Object[size]; Arrays.fill(aobject, fill); return new NonNullList<E>(Arrays.asList((E[])aobject), fill); } | /**
* Creates a new NonNullList with <i>fixed</i> size, and filled with the object passed.
*/ | Creates a new NonNullList with fixed size, and filled with the object passed | withSize | {
"repo_name": "TheGreatAndPowerfulWeegee/wipunknown",
"path": "build/tmp/recompileMc/sources/net/minecraft/util/NonNullList.java",
"license": "gpl-3.0",
"size": 2083
} | [
"java.util.Arrays",
"org.apache.commons.lang3.Validate"
] | import java.util.Arrays; import org.apache.commons.lang3.Validate; | import java.util.*; import org.apache.commons.lang3.*; | [
"java.util",
"org.apache.commons"
] | java.util; org.apache.commons; | 683,634 |
@Test
public void testReplicationNRoot2() throws Exception {
int replicationFactor = 2;
Number160 keyA = new Number160("0xa");
int[][] expectedA =
// as first node, node a is always replicating given key
{{ 1, 0, 0 },
// node a and b have to replicate key a, node a has to notify newly
// joined node... | void function() throws Exception { int replicationFactor = 2; Number160 keyA = new Number160("0xa"); int[][] expectedA = {{ 1, 0, 0 }, { 0, 1, 0 }, { 0, 0, 0 }, { 0, 0, 0 }}; int[][] leaveA = { { 1, 0, 0 }, { 1, 0, 0 }, { 1, 0, 0 }}; testReplication(keyA, replicationFactor, true, expectedA, leaveA); Number160 keyB = ne... | /**
* Test the responsibility and the notifications for the n-root replication
* approach with replication factor 2.
*
* @throws Exception
*/ | Test the responsibility and the notifications for the n-root replication approach with replication factor 2 | testReplicationNRoot2 | {
"repo_name": "tomp2p/TomP2P",
"path": "replication/src/test/java/net/tomp2p/replication/TestStoreReplication.java",
"license": "apache-2.0",
"size": 42588
} | [
"net.tomp2p.peers.Number160"
] | import net.tomp2p.peers.Number160; | import net.tomp2p.peers.*; | [
"net.tomp2p.peers"
] | net.tomp2p.peers; | 1,550,287 |
public int getPercentile(double percentile) {
// NOTE: This implementation uses the nearest-rank method.
// https://en.wikipedia.org/wiki/Percentile#The_nearest-rank_method
//
// If called concurrently with record, this implementation biases low.
// Since we read count before iterating the array, ... | int function(double percentile) { Preconditions.checkArgument(percentile > 0.0); Preconditions.checkArgument(percentile <= 100.0); long targetRank = (long) Math.ceil(percentile * count.get() / 100); long rank = 0; for (int i = 0; i < buckets.length(); i++) { rank += buckets.get(i); if (rank >= targetRank) { return i; }... | /**
* Get the percentile of recorded values. If called concurrently with {@link #record(int)}, the
* result is an approximate.
*/ | Get the percentile of recorded values. If called concurrently with <code>#record(int)</code>, the result is an approximate | getPercentile | {
"repo_name": "googleapis/gax-java",
"path": "gax/src/main/java/com/google/api/gax/core/Distribution.java",
"license": "bsd-3-clause",
"size": 4050
} | [
"com.google.common.base.Preconditions"
] | import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 1,382,338 |
public void setDepend (Depend depend)
{
this.depend = depend;
} | void function (Depend depend) { this.depend = depend; } | /**
* A Depend object for use within the Scarab API.
*/ | A Depend object for use within the Scarab API | setDepend | {
"repo_name": "SpoonLabs/gumtree-spoon-ast-diff",
"path": "src/test/resources/examples/t_225724/right_ScarabRequestTool_1.37.java",
"license": "apache-2.0",
"size": 16946
} | [
"org.tigris.scarab.om.Depend"
] | import org.tigris.scarab.om.Depend; | import org.tigris.scarab.om.*; | [
"org.tigris.scarab"
] | org.tigris.scarab; | 555,797 |
public int optInt(@Nullable String name, int fallback) {
Object object = opt(name);
Integer result = JSON.toInteger(object);
return result != null ? result : fallback;
} | int function(@Nullable String name, int fallback) { Object object = opt(name); Integer result = JSON.toInteger(object); return result != null ? result : fallback; } | /**
* Returns the value mapped by {@code name} if it exists and is an int or
* can be coerced to an int, or {@code fallback} otherwise.
*/ | Returns the value mapped by name if it exists and is an int or can be coerced to an int, or fallback otherwise | optInt | {
"repo_name": "smartdevicelink/sdl_android",
"path": "javaSE/javaSE/src/main/java/org/json/JSONObject.java",
"license": "bsd-3-clause",
"size": 30612
} | [
"androidx.annotation.Nullable"
] | import androidx.annotation.Nullable; | import androidx.annotation.*; | [
"androidx.annotation"
] | androidx.annotation; | 457,300 |
protected DataRowDataSource getDataRowDataSource() {
return dataRowDataSource;
} | DataRowDataSource function() { return dataRowDataSource; } | /**
* Returns the datarow data source used in this template.
*
* @return the datarow data source.
*/ | Returns the datarow data source used in this template | getDataRowDataSource | {
"repo_name": "EgorZhuk/pentaho-reporting",
"path": "engine/core/src/main/java/org/pentaho/reporting/engine/classic/core/filter/templates/AnchorFieldTemplate.java",
"license": "lgpl-2.1",
"size": 3840
} | [
"org.pentaho.reporting.engine.classic.core.filter.DataRowDataSource"
] | import org.pentaho.reporting.engine.classic.core.filter.DataRowDataSource; | import org.pentaho.reporting.engine.classic.core.filter.*; | [
"org.pentaho.reporting"
] | org.pentaho.reporting; | 2,145,402 |
public static Rectangle2D toAwtRectangle(Rectangle rect) {
Rectangle2D rect2d = new Rectangle2D.Double();
rect2d.setRect(rect.x, rect.y, rect.width, rect.height);
return rect2d;
} | static Rectangle2D function(Rectangle rect) { Rectangle2D rect2d = new Rectangle2D.Double(); rect2d.setRect(rect.x, rect.y, rect.width, rect.height); return rect2d; } | /**
* Transform a swt Rectangle instance into an awt one.
* @param rect the swt <code>Rectangle</code>
* @return a Rectangle2D.Double instance with
* the eappropriate location and size.
*/ | Transform a swt Rectangle instance into an awt one | toAwtRectangle | {
"repo_name": "ilyessou/jfreechart",
"path": "swt/org/jfree/experimental/swt/SWTUtils.java",
"license": "lgpl-2.1",
"size": 18372
} | [
"java.awt.geom.Rectangle2D",
"org.eclipse.swt.graphics.Rectangle"
] | import java.awt.geom.Rectangle2D; import org.eclipse.swt.graphics.Rectangle; | import java.awt.geom.*; import org.eclipse.swt.graphics.*; | [
"java.awt",
"org.eclipse.swt"
] | java.awt; org.eclipse.swt; | 1,573,230 |
public static byte[] createByteArray(int size, String data) {
byte[] byteArray = new byte[size];
for (int i = 0; i < size; i++) {
byteArray[i] = Byte.parseByte(data, 2);
}
return byteArray;
}
public static class ZonedDateTimeMatcher extends TypeSafeDiagnosin... | static byte[] function(int size, String data) { byte[] byteArray = new byte[size]; for (int i = 0; i < size; i++) { byteArray[i] = Byte.parseByte(data, 2); } return byteArray; } public static class ZonedDateTimeMatcher extends TypeSafeDiagnosingMatcher<String> { private final ZonedDateTime date; public ZonedDateTimeMat... | /**
* Create a byte array with a specific size filled with specified data.
*
* @param size the size of the byte array
* @param data the data to put in the byte array
* @return the JSON byte array
*/ | Create a byte array with a specific size filled with specified data | createByteArray | {
"repo_name": "ajeans/sandbox",
"path": "sandbox-hipster/src/test/java/com/ajeansen/sandbox/web/rest/TestUtil.java",
"license": "gpl-3.0",
"size": 4387
} | [
"java.time.ZonedDateTime",
"org.hamcrest.TypeSafeDiagnosingMatcher"
] | import java.time.ZonedDateTime; import org.hamcrest.TypeSafeDiagnosingMatcher; | import java.time.*; import org.hamcrest.*; | [
"java.time",
"org.hamcrest"
] | java.time; org.hamcrest; | 1,422,269 |
public static void writeMatrix(MatrixSquare matrix, String filename, boolean gzip) throws FileNotFoundException, IOException {
BufferedOutputStream bufferedOutputStream = openBufferedOutputStream(filename, gzip);
String line = String.format("%d %d %s\n", matrix.numCols(), matrix.numRows(), matrix.getClass().get... | static void function(MatrixSquare matrix, String filename, boolean gzip) throws FileNotFoundException, IOException { BufferedOutputStream bufferedOutputStream = openBufferedOutputStream(filename, gzip); String line = String.format(STR, matrix.numCols(), matrix.numRows(), matrix.getClass().getSimpleName()); bufferedOutp... | /**
* Write matrix.
*
* @param matrix the matrix
* @param filename the filename
* @param gzip the gzip
* @throws FileNotFoundException the file not found exception
* @throws IOException Signals that an I/O exception has occurred.
*/ | Write matrix | writeMatrix | {
"repo_name": "ahmetaa/lium-diarization",
"path": "src/fr/lium/spkDiarization/libMatrix/MatrixIO.java",
"license": "gpl-3.0",
"size": 10428
} | [
"java.io.BufferedOutputStream",
"java.io.FileNotFoundException",
"java.io.IOException"
] | import java.io.BufferedOutputStream; import java.io.FileNotFoundException; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,749,066 |
public void execute(String tenant, File tenantDirectory, DateTime deltaUptoTime) {
TenantContext.setTenantId(tenant);
audit(securityEventUtil.createSecurityEvent(this.getClass().getName(), "Delta Extract Initiation",
LogLevelType.TYPE_INFO, BEMessageCode.BE_SE_CODE_0019, DATE_TIME_F... | void function(String tenant, File tenantDirectory, DateTime deltaUptoTime) { TenantContext.setTenantId(tenant); audit(securityEventUtil.createSecurityEvent(this.getClass().getName(), STR, LogLevelType.TYPE_INFO, BEMessageCode.BE_SE_CODE_0019, DATE_TIME_FORMATTER.print(deltaUptoTime))); Map<String, Set<String>> appsPerE... | /**
* Creates delta data bulk extract files if any are needed for the given tenant.
*
* @param tenant - name of tenant to extract
* @param tenantDirectory - Base directory of the tenant
* @param deltaUptoTime - Extract for all deltas up to this time
*/ | Creates delta data bulk extract files if any are needed for the given tenant | execute | {
"repo_name": "inbloom/secure-data-service",
"path": "sli/bulk-extract/src/main/java/org/slc/sli/bulk/extract/extractor/DeltaExtractor.java",
"license": "apache-2.0",
"size": 16438
} | [
"java.io.File",
"java.util.Map",
"java.util.Set",
"org.joda.time.DateTime",
"org.slc.sli.bulk.extract.LogUtil",
"org.slc.sli.bulk.extract.delta.DeltaEntityIterator",
"org.slc.sli.bulk.extract.files.ExtractFile",
"org.slc.sli.bulk.extract.message.BEMessageCode",
"org.slc.sli.common.util.logging.LogLe... | import java.io.File; import java.util.Map; import java.util.Set; import org.joda.time.DateTime; import org.slc.sli.bulk.extract.LogUtil; import org.slc.sli.bulk.extract.delta.DeltaEntityIterator; import org.slc.sli.bulk.extract.files.ExtractFile; import org.slc.sli.bulk.extract.message.BEMessageCode; import org.slc.sli... | import java.io.*; import java.util.*; import org.joda.time.*; import org.slc.sli.bulk.extract.*; import org.slc.sli.bulk.extract.delta.*; import org.slc.sli.bulk.extract.files.*; import org.slc.sli.bulk.extract.message.*; import org.slc.sli.common.util.logging.*; import org.slc.sli.common.util.tenantdb.*; | [
"java.io",
"java.util",
"org.joda.time",
"org.slc.sli"
] | java.io; java.util; org.joda.time; org.slc.sli; | 2,400,806 |
@Message(id = Message.NONE, value = "Runs the server with a security manager installed.")
String argSecMgr(); | @Message(id = Message.NONE, value = STR) String argSecMgr(); | /**
* Instructions for the {@link CommandLineConstants#SECMGR} command line argument.
*
* @return the message
*/ | Instructions for the <code>CommandLineConstants#SECMGR</code> command line argument | argSecMgr | {
"repo_name": "darranl/wildfly-core",
"path": "server/src/main/java/org/jboss/as/server/logging/ServerLogger.java",
"license": "lgpl-2.1",
"size": 68179
} | [
"org.jboss.logging.annotations.Message"
] | import org.jboss.logging.annotations.Message; | import org.jboss.logging.annotations.*; | [
"org.jboss.logging"
] | org.jboss.logging; | 2,856,693 |
public boolean cancel(int rid) {
// remove elements in ridToTimeToTid
NavigableMap<Integer,Set<Integer>> timeToTid = ridToTimeToTid.remove(rid);
if (timeToTid != null) {
for(int dt : timeToTid.keySet()) {
// remove elements in timeToRidToTid
if (timeToRidToTid.containsKey(dt)) {
... | boolean function(int rid) { NavigableMap<Integer,Set<Integer>> timeToTid = ridToTimeToTid.remove(rid); if (timeToTid != null) { for(int dt : timeToTid.keySet()) { if (timeToRidToTid.containsKey(dt)) { timeToRidToTid.get(dt).remove(rid); } if (grids.containsKey(dt)) { int[] grid = grids.get(dt); for(int tid : timeToTid.... | /**
* Cancel a reservation
*
* @param rid the reservation ID
* @return whether the cancellation is successful
*/ | Cancel a reservation | cancel | {
"repo_name": "Xanders94/AIM-Simulator",
"path": "src/main/java/aim4/im/v2i/reservation/ReservationArray.java",
"license": "gpl-3.0",
"size": 13945
} | [
"java.util.NavigableMap",
"java.util.Set"
] | import java.util.NavigableMap; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 116,908 |
public String getTypeDescription(File file)
{
return null;
} | String function(File file) { return null; } | /**
* Returns a description for the type of the specified file. This method
* always returns <code>null</code> and should be overridden by subclasses.
*
* @param file the file.
*
* @return Always <code>null</code>.
*/ | Returns a description for the type of the specified file. This method always returns <code>null</code> and should be overridden by subclasses | getTypeDescription | {
"repo_name": "shaotuanchen/sunflower_exp",
"path": "tools/source/gcc-4.2.4/libjava/classpath/javax/swing/filechooser/FileView.java",
"license": "bsd-3-clause",
"size": 3732
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 57,614 |
public void setRecord( final MfRecord record ) {
final int id = record.getParam( POS_OBJECT_ID );
setObjectId( id );
} | void function( final MfRecord record ) { final int id = record.getParam( POS_OBJECT_ID ); setObjectId( id ); } | /**
* Reads the command data from the given record and adjusts the internal parameters according to the data parsed.
* <p/>
* After the raw record was read from the datasource, the record is parsed by the concrete implementation.
*
* @param record the raw data that makes up the record.
*/ | Reads the command data from the given record and adjusts the internal parameters according to the data parsed. After the raw record was read from the datasource, the record is parsed by the concrete implementation | setRecord | {
"repo_name": "EgorZhuk/pentaho-reporting",
"path": "libraries/libpixie/src/main/java/org/pentaho/reporting/libraries/pixie/wmf/records/MfCmdSelectPalette.java",
"license": "lgpl-2.1",
"size": 4009
} | [
"org.pentaho.reporting.libraries.pixie.wmf.MfRecord"
] | import org.pentaho.reporting.libraries.pixie.wmf.MfRecord; | import org.pentaho.reporting.libraries.pixie.wmf.*; | [
"org.pentaho.reporting"
] | org.pentaho.reporting; | 250,301 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.