method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public void deleteDefinitionEnvironmentTemplate(
final String project,
final UUID templateId) {
final UUID locationId = UUID.fromString("6b03b696-824e-4479-8eb2-6644a51aba89"); //$NON-NLS-1$
final ApiResourceVersion apiVersion = new ApiResourceVersion("3.1-preview.2"); //$NON-NLS-... | void function( final String project, final UUID templateId) { final UUID locationId = UUID.fromString(STR); final ApiResourceVersion apiVersion = new ApiResourceVersion(STR); final Map<String, Object> routeValues = new HashMap<String, Object>(); routeValues.put(STR, project); final NameValueCollection queryParameters =... | /**
* [Preview API 3.1-preview.2]
*
* @param project
* Project ID or project name
* @param templateId
*
*/ | [Preview API 3.1-preview.2] | deleteDefinitionEnvironmentTemplate | {
"repo_name": "Microsoft/vso-httpclient-java",
"path": "Rest/alm-releasemanagement-client/src/main/generated/com/microsoft/alm/visualstudio/services/releasemanagement/webapi/ReleaseHttpClientBase.java",
"license": "mit",
"size": 186198
} | [
"com.microsoft.alm.client.HttpMethod",
"com.microsoft.alm.client.VssMediaTypes",
"com.microsoft.alm.client.VssRestRequest",
"com.microsoft.alm.client.model.NameValueCollection",
"com.microsoft.alm.visualstudio.services.webapi.ApiResourceVersion",
"java.util.HashMap",
"java.util.Map",
"java.util.UUID"
... | import com.microsoft.alm.client.HttpMethod; import com.microsoft.alm.client.VssMediaTypes; import com.microsoft.alm.client.VssRestRequest; import com.microsoft.alm.client.model.NameValueCollection; import com.microsoft.alm.visualstudio.services.webapi.ApiResourceVersion; import java.util.HashMap; import java.util.Map; ... | import com.microsoft.alm.client.*; import com.microsoft.alm.client.model.*; import com.microsoft.alm.visualstudio.services.webapi.*; import java.util.*; | [
"com.microsoft.alm",
"java.util"
] | com.microsoft.alm; java.util; | 321,833 |
protected Path getWorkingDir(List<String> localDirs, String user,
String appId) throws IOException {
long totalAvailable = 0L;
long[] availableOnDisk = new long[localDirs.size()];
int i = 0;
// randomly choose the app directory
// the chance of picking a directory is proportional to
// t... | Path function(List<String> localDirs, String user, String appId) throws IOException { long totalAvailable = 0L; long[] availableOnDisk = new long[localDirs.size()]; int i = 0; for (String localDir : localDirs) { Path curBase = getApplicationDir(new Path(localDir), user, appId); long space = 0L; try { space = getDiskFre... | /**
* Return a randomly chosen application directory from a list of local storage
* directories. The probability of selecting a directory is proportional to
* its size.
*
* @param localDirs the target directories from which to select
* @param user the user who owns the application
* @param appId th... | Return a randomly chosen application directory from a list of local storage directories. The probability of selecting a directory is proportional to its size | getWorkingDir | {
"repo_name": "WIgor/hadoop",
"path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/DefaultContainerExecutor.java",
"license": "apache-2.0",
"size": 35935
} | [
"java.io.IOException",
"java.util.List",
"org.apache.commons.lang.math.RandomUtils",
"org.apache.hadoop.fs.Path"
] | import java.io.IOException; import java.util.List; import org.apache.commons.lang.math.RandomUtils; import org.apache.hadoop.fs.Path; | import java.io.*; import java.util.*; import org.apache.commons.lang.math.*; import org.apache.hadoop.fs.*; | [
"java.io",
"java.util",
"org.apache.commons",
"org.apache.hadoop"
] | java.io; java.util; org.apache.commons; org.apache.hadoop; | 1,471,674 |
@Test
public void testGDPRSettingsReset() throws Exception {
executionSteps();
JSONObject postDataBeforeGDPRValueSet = inspectPostData();
assertFalse(postDataBeforeGDPRValueSet.has("gdpr_consent"));
SDKSettings.setAAID("1234", true);
ANGDPRSettings.setConsentRequired(act... | void function() throws Exception { executionSteps(); JSONObject postDataBeforeGDPRValueSet = inspectPostData(); assertFalse(postDataBeforeGDPRValueSet.has(STR)); SDKSettings.setAAID("1234", true); ANGDPRSettings.setConsentRequired(activity, true); ANGDPRSettings.setConsentString(activity, STR); ANGDPRSettings.setPurpos... | /**
* Test ANGDPRSettings.reset()
*
* @throws Exception
*/ | Test ANGDPRSettings.reset() | testGDPRSettingsReset | {
"repo_name": "appnexus/mobile-sdk-android",
"path": "sdk/test/com/appnexus/opensdk/UTAdRequestTest.java",
"license": "apache-2.0",
"size": 50438
} | [
"junit.framework.Assert",
"org.json.JSONObject",
"org.junit.Assert"
] | import junit.framework.Assert; import org.json.JSONObject; import org.junit.Assert; | import junit.framework.*; import org.json.*; import org.junit.*; | [
"junit.framework",
"org.json",
"org.junit"
] | junit.framework; org.json; org.junit; | 1,172,520 |
public void fieldsFrom(DataObject arg) {
boolean isValidArg = false;
if (arg instanceof org.opendaylight.yang.gen.v1.urn.opendaylight.model.statistics.types.rev130925.NodeConnectorStatistics) {
this._bytes = ((org.opendaylight.yang.gen.v1.urn.opendaylight.model.statistics.types.rev130925... | void function(DataObject arg) { boolean isValidArg = false; if (arg instanceof org.opendaylight.yang.gen.v1.urn.opendaylight.model.statistics.types.rev130925.NodeConnectorStatistics) { this._bytes = ((org.opendaylight.yang.gen.v1.urn.opendaylight.model.statistics.types.rev130925.NodeConnectorStatistics)arg).getBytes();... | /**
Set fields from given grouping argument. Valid argument is instance of one of following types:
* <ul>
* <li>org.opendaylight.yang.gen.v1.urn.opendaylight.model.statistics.types.rev130925.NodeConnectorStatistics</li>
* <li>org.opendaylight.yang.gen.v1.urn.opendaylight.model.statistics.types.rev13... | org.opendaylight.yang.gen.v1.urn.opendaylight.model.statistics.types.rev130925.NodeConnectorStatistics org.opendaylight.yang.gen.v1.urn.opendaylight.model.statistics.types.rev130925.Duration org.opendaylight.yang.gen.v1.urn.opendaylight.flow.transaction.rev131103.TransactionAware | fieldsFrom | {
"repo_name": "niuqg/controller",
"path": "opendaylight/md-sal/model/model-flow-statistics/src/main/yang-gen-sal/org/opendaylight/yang/gen/v1/urn/opendaylight/port/statistics/rev131214/GetNodeConnectorStatisticsOutputBuilder.java",
"license": "epl-1.0",
"size": 29617
} | [
"org.opendaylight.yang.gen.v1.urn.opendaylight.model.statistics.types.rev130925.duration.Duration",
"org.opendaylight.yangtools.yang.binding.DataObject"
] | import org.opendaylight.yang.gen.v1.urn.opendaylight.model.statistics.types.rev130925.duration.Duration; import org.opendaylight.yangtools.yang.binding.DataObject; | import org.opendaylight.yang.gen.v1.urn.opendaylight.model.statistics.types.rev130925.duration.*; import org.opendaylight.yangtools.yang.binding.*; | [
"org.opendaylight.yang",
"org.opendaylight.yangtools"
] | org.opendaylight.yang; org.opendaylight.yangtools; | 159,314 |
public static IVMInstall createVM(File location) {
@SuppressWarnings("restriction")
IVMInstallType vmType = JavaRuntime.getVMInstallType(ID_STANDARD_VM_TYPE);
IVMInstall vm = vmType.createVMInstall(createVMId(vmType));
vm.setInstallLocation(location);
return vm;
} | static IVMInstall function(File location) { @SuppressWarnings(STR) IVMInstallType vmType = JavaRuntime.getVMInstallType(ID_STANDARD_VM_TYPE); IVMInstall vm = vmType.createVMInstall(createVMId(vmType)); vm.setInstallLocation(location); return vm; } | /**
* Create a new IVMInstall of DefaultVM install type.
* @return
*/ | Create a new IVMInstall of DefaultVM install type | createVM | {
"repo_name": "oxmcvusd/eclipse-integration-gradle",
"path": "org.springsource.ide.eclipse.gradle.core.test/src/org/springsource/ide/eclipse/gradle/core/test/util/JavaUtils.java",
"license": "epl-1.0",
"size": 4158
} | [
"java.io.File",
"org.eclipse.jdt.launching.IVMInstall",
"org.eclipse.jdt.launching.IVMInstallType",
"org.eclipse.jdt.launching.JavaRuntime"
] | import java.io.File; import org.eclipse.jdt.launching.IVMInstall; import org.eclipse.jdt.launching.IVMInstallType; import org.eclipse.jdt.launching.JavaRuntime; | import java.io.*; import org.eclipse.jdt.launching.*; | [
"java.io",
"org.eclipse.jdt"
] | java.io; org.eclipse.jdt; | 1,698,440 |
public OAuth2Client build() {
if (clientCredentials == null) {
throw new IllegalStateException("Client credentials missing");
}
if (tokenEndpoint == null) {
throw new IllegalStateException("Token endpoint missing");
}
if... | OAuth2Client function() { if (clientCredentials == null) { throw new IllegalStateException(STR); } if (tokenEndpoint == null) { throw new IllegalStateException(STR); } if (okHttpClient == null) { okHttpClient = new OkHttpClient.Builder() .connectTimeout(10, TimeUnit.SECONDS) .writeTimeout(10, TimeUnit.SECONDS) .readTim... | /**
* Build an OAuth2Client based on the settings given. This will construct a new
* HTTP client if none was provided.
* @return a new OAuth2Client
* @throws IllegalStateException if the client credentials or the endpoint are not set.
*/ | Build an OAuth2Client based on the settings given. This will construct a new HTTP client if none was provided | build | {
"repo_name": "RADAR-CNS/ManagementPortal",
"path": "oauth-client-util/src/main/java/org/radarcns/oauth/OAuth2Client.java",
"license": "apache-2.0",
"size": 8125
} | [
"java.util.concurrent.TimeUnit"
] | import java.util.concurrent.TimeUnit; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 2,727,154 |
public static DefaultCoordinateOperationFactory factory() {
DefaultCoordinateOperationFactory c = factory;
if (c == null) {
// DefaultFactories.forBuildin(…) performs the necessary synchronization.
factory = c = DefaultFactories.forBuildin(CoordinateOperationFactory.class, De... | static DefaultCoordinateOperationFactory function() { DefaultCoordinateOperationFactory c = factory; if (c == null) { factory = c = DefaultFactories.forBuildin(CoordinateOperationFactory.class, DefaultCoordinateOperationFactory.class); } return c; } | /**
* Returns the factory.
*
* @return The system-wide factory.
*/ | Returns the factory | factory | {
"repo_name": "desruisseaux/sis",
"path": "core/sis-referencing/src/main/java/org/apache/sis/internal/referencing/CoordinateOperations.java",
"license": "apache-2.0",
"size": 2444
} | [
"org.apache.sis.internal.system.DefaultFactories",
"org.apache.sis.referencing.operation.DefaultCoordinateOperationFactory",
"org.opengis.referencing.operation.CoordinateOperationFactory"
] | import org.apache.sis.internal.system.DefaultFactories; import org.apache.sis.referencing.operation.DefaultCoordinateOperationFactory; import org.opengis.referencing.operation.CoordinateOperationFactory; | import org.apache.sis.internal.system.*; import org.apache.sis.referencing.operation.*; import org.opengis.referencing.operation.*; | [
"org.apache.sis",
"org.opengis.referencing"
] | org.apache.sis; org.opengis.referencing; | 794,312 |
private void updateCutView(String value)
{
if (Common.getSettings().getIntProperty(Keys.KEY_CutMode) != CommonParsing.CUTMODE_BYTE)
{
cutview.clearViews();
return;
}
Object[] listData = collection == null ? null : collection.getCutpoints();
if (listData == null || listData.length == 0)
{
cutv... | void function(String value) { if (Common.getSettings().getIntProperty(Keys.KEY_CutMode) != CommonParsing.CUTMODE_BYTE) { cutview.clearViews(); return; } Object[] listData = collection == null ? null : collection.getCutpoints(); if (listData == null listData.length == 0) { cutview.clearViews(); return; } int index = get... | /**
* updates last and next cutpoint view
*/ | updates last and next cutpoint view | updateCutView | {
"repo_name": "vladimir-zahradnik/Project-X",
"path": "src/sk/vzahradn/dvb/projectx/gui/CutPanel.java",
"license": "gpl-2.0",
"size": 54974
} | [
"sk.vzahradn.dvb.projectx.common.Common",
"sk.vzahradn.dvb.projectx.common.Keys",
"sk.vzahradn.dvb.projectx.parser.CommonParsing"
] | import sk.vzahradn.dvb.projectx.common.Common; import sk.vzahradn.dvb.projectx.common.Keys; import sk.vzahradn.dvb.projectx.parser.CommonParsing; | import sk.vzahradn.dvb.projectx.common.*; import sk.vzahradn.dvb.projectx.parser.*; | [
"sk.vzahradn.dvb"
] | sk.vzahradn.dvb; | 2,503,962 |
void onOpenInNewTabInGroup(GURL url, Referrer referrer); | void onOpenInNewTabInGroup(GURL url, Referrer referrer); | /**
* Called when {@code url} should be opened in a new tab in the same group as the current
* {@link Tab}.
* @param url The URL to open.
*/ | Called when url should be opened in a new tab in the same group as the current <code>Tab</code> | onOpenInNewTabInGroup | {
"repo_name": "nwjs/chromium.src",
"path": "chrome/browser/contextmenu/java/src/org/chromium/chrome/browser/contextmenu/ContextMenuItemDelegate.java",
"license": "bsd-3-clause",
"size": 7274
} | [
"org.chromium.content_public.common.Referrer"
] | import org.chromium.content_public.common.Referrer; | import org.chromium.content_public.common.*; | [
"org.chromium.content_public"
] | org.chromium.content_public; | 1,031,574 |
public void stateChanged(ChangeEvent e) {
// Stop the flashing only if the chat frame is in focus.
if (chatFrame.isInFocus()) {
stopFlashing();
}
final Object o = getSelectedComponent();
if (o instanceof ChatRoom) {
final ChatRoom room = (Chat... | void function(ChangeEvent e) { if (chatFrame.isInFocus()) { stopFlashing(); } final Object o = getSelectedComponent(); if (o instanceof ChatRoom) { final ChatRoom room = (ChatRoom)o; focusChat(); chatFrame.setTitle(room.getRoomTitle()); chatFrame.setIconImage(SparkManager.getMainWindow().getIconImage()); } else if (o i... | /**
* Notification that the tab pane has been modified. Generally by changing of the tabs.
*
* @param e the ChangeEvent.
*/ | Notification that the tab pane has been modified. Generally by changing of the tabs | stateChanged | {
"repo_name": "joshuairl/toothchat-client",
"path": "src/java/org/jivesoftware/spark/ui/ChatContainer.java",
"license": "apache-2.0",
"size": 52693
} | [
"javax.swing.event.ChangeEvent",
"org.jivesoftware.spark.SparkManager"
] | import javax.swing.event.ChangeEvent; import org.jivesoftware.spark.SparkManager; | import javax.swing.event.*; import org.jivesoftware.spark.*; | [
"javax.swing",
"org.jivesoftware.spark"
] | javax.swing; org.jivesoftware.spark; | 1,051,580 |
@Nonnull
public UserRequestBuilder transitiveMemberOfAsUser(@Nonnull final String id) {
return new UserRequestBuilder(getRequestUrlWithAdditionalSegment("transitiveMemberOf") + "/" + id + "/microsoft.graph.user", getClient(), null);
} | UserRequestBuilder function(@Nonnull final String id) { return new UserRequestBuilder(getRequestUrlWithAdditionalSegment(STR) + "/" + id + STR, getClient(), null); } | /**
* Gets a request builder for the User item
*
* @return the request builder
* @param id the item identifier
*/ | Gets a request builder for the User item | transitiveMemberOfAsUser | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/requests/ServicePrincipalRequestBuilder.java",
"license": "mit",
"size": 39127
} | [
"com.microsoft.graph.requests.UserRequestBuilder",
"javax.annotation.Nonnull"
] | import com.microsoft.graph.requests.UserRequestBuilder; import javax.annotation.Nonnull; | import com.microsoft.graph.requests.*; import javax.annotation.*; | [
"com.microsoft.graph",
"javax.annotation"
] | com.microsoft.graph; javax.annotation; | 340,258 |
BufferedImage getImage( String studyUID, String seriesUID, String instanceUID, String rows, String columns, String region, String suffix ); | BufferedImage getImage( String studyUID, String seriesUID, String instanceUID, String rows, String columns, String region, String suffix ); | /**
* Get an image as BufferedImage from cache.
* <p>
* This method returns the image from the default path of this cache.<br>
*
* @param studyUID Unique identifier of the study.
* @param seriesUID Unique identifier of the series.
* @param instanceUID Unique identifier of the instance.
* @param rows ... | Get an image as BufferedImage from cache. This method returns the image from the default path of this cache | getImage | {
"repo_name": "medicayun/medicayundicom",
"path": "dcm4jboss-all/tags/DCM4CHEE_2_10_13/dcm4jboss-wado/src/java/org/dcm4chex/wado/mbean/cache/WADOCache.java",
"license": "apache-2.0",
"size": 8114
} | [
"java.awt.image.BufferedImage"
] | import java.awt.image.BufferedImage; | import java.awt.image.*; | [
"java.awt"
] | java.awt; | 2,364,724 |
return (PlayerSide targetSide,CharacterIndex minionPlacementIndex, HearthTreeNode boardState) -> {
this.addHealth((byte) boardState.data_.getCurrentPlayer().getHand().size());
this.addMaxHealth((byte) boardState.data_.getCurrentPlayer().getHand().size());
return boardState;
}... | return (PlayerSide targetSide,CharacterIndex minionPlacementIndex, HearthTreeNode boardState) -> { this.addHealth((byte) boardState.data_.getCurrentPlayer().getHand().size()); this.addMaxHealth((byte) boardState.data_.getCurrentPlayer().getHand().size()); return boardState; }; } | /**
* Battlecry: Gain +1 Health for each card in your hand.
*/ | Battlecry: Gain +1 Health for each card in your hand | getBattlecryEffect | {
"repo_name": "oyachai/HearthSim",
"path": "src/main/java/com/hearthsim/card/classic/minion/rare/TwilightDrake.java",
"license": "mit",
"size": 950
} | [
"com.hearthsim.card.CharacterIndex",
"com.hearthsim.model.PlayerSide",
"com.hearthsim.util.tree.HearthTreeNode"
] | import com.hearthsim.card.CharacterIndex; import com.hearthsim.model.PlayerSide; import com.hearthsim.util.tree.HearthTreeNode; | import com.hearthsim.card.*; import com.hearthsim.model.*; import com.hearthsim.util.tree.*; | [
"com.hearthsim.card",
"com.hearthsim.model",
"com.hearthsim.util"
] | com.hearthsim.card; com.hearthsim.model; com.hearthsim.util; | 80,003 |
@Override
public String getElectionAbb(String electionId) throws StoreException {
Cursor cursor = null;
checkNotClosed();
try {
cursor = db.query(
Election.TABLE_NAME,
new String[] { Election.COLUMN_NAME_ABB_URL},
E... | String function(String electionId) throws StoreException { Cursor cursor = null; checkNotClosed(); try { cursor = db.query( Election.TABLE_NAME, new String[] { Election.COLUMN_NAME_ABB_URL}, Election.COLUMN_NAME_ELECTION_ID + STR, new String[] { electionId }, null, null, null); if (!cursor.moveToFirst()) { throw new Un... | /**
* Retrieves the URL of the Audit Bulletin Board (ABB) of the election specified.
*
* @param electionId the ID of the election to query
* @return the URL of the ABB of the election
* @throws StoreException if there was a problem retrieving the ABB from the database
* @throws UnknownElec... | Retrieves the URL of the Audit Bulletin Board (ABB) of the election specified | getElectionAbb | {
"repo_name": "import-this/demos-trustee-android",
"path": "app/src/main/java/gr/uoa/di/finer/database/ReadableDatabaseHelper.java",
"license": "mit",
"size": 15719
} | [
"android.database.Cursor",
"android.database.sqlite.SQLiteException",
"gr.uoa.di.finer.database.TrusteeContract",
"gr.uoa.di.finer.service.StoreException"
] | import android.database.Cursor; import android.database.sqlite.SQLiteException; import gr.uoa.di.finer.database.TrusteeContract; import gr.uoa.di.finer.service.StoreException; | import android.database.*; import android.database.sqlite.*; import gr.uoa.di.finer.database.*; import gr.uoa.di.finer.service.*; | [
"android.database",
"gr.uoa.di"
] | android.database; gr.uoa.di; | 1,460,043 |
public static InetAddress hexToInet6Address(String addrHexString)
throws IllegalArgumentException {
try {
return numericToInetAddress(String.format(Locale.US, "%s:%s:%s:%s:%s:%s:%s:%s",
addrHexString.substring(0,4), addrHexString.substring(4,8),
... | static InetAddress function(String addrHexString) throws IllegalArgumentException { try { return numericToInetAddress(String.format(Locale.US, STR, addrHexString.substring(0,4), addrHexString.substring(4,8), addrHexString.substring(8,12), addrHexString.substring(12,16), addrHexString.substring(16,20), addrHexString.sub... | /**
* Convert a 32 char hex string into a Inet6Address.
* throws a runtime exception if the string isn't 32 chars, isn't hex or can't be
* made into an Inet6Address
* @param addrHexString a 32 character hex string representing an IPv6 addr
* @return addr an InetAddress representation for the st... | Convert a 32 char hex string into a Inet6Address. throws a runtime exception if the string isn't 32 chars, isn't hex or can't be made into an Inet6Address | hexToInet6Address | {
"repo_name": "daiqiquan/framework-base",
"path": "core/java/android/net/NetworkUtils.java",
"license": "apache-2.0",
"size": 14307
} | [
"android.util.Log",
"java.net.InetAddress",
"java.util.Locale"
] | import android.util.Log; import java.net.InetAddress; import java.util.Locale; | import android.util.*; import java.net.*; import java.util.*; | [
"android.util",
"java.net",
"java.util"
] | android.util; java.net; java.util; | 100,922 |
public static <T extends TServiceClient> T getClient(TServiceClientFactory<T> factory, HostAndPort address, ClientContext context) throws TTransportException {
TTransport transport = ThriftTransportPool.getInstance().getTransport(address, context.getClientTimeoutInMillis(), context);
return createClient(facto... | static <T extends TServiceClient> T function(TServiceClientFactory<T> factory, HostAndPort address, ClientContext context) throws TTransportException { TTransport transport = ThriftTransportPool.getInstance().getTransport(address, context.getClientTimeoutInMillis(), context); return createClient(factory, transport); } | /**
* Create a Thrift client using the given factory with a pooled transport (if available), the address and client context. Client timeout is extracted from the
* ClientContext
*
* @param factory
* Thrift client factory
* @param address
* Server address for client to connect to
... | Create a Thrift client using the given factory with a pooled transport (if available), the address and client context. Client timeout is extracted from the ClientContext | getClient | {
"repo_name": "dhutchis/accumulo",
"path": "core/src/main/java/org/apache/accumulo/core/rpc/ThriftUtil.java",
"license": "apache-2.0",
"size": 19251
} | [
"com.google.common.net.HostAndPort",
"org.apache.accumulo.core.client.impl.ClientContext",
"org.apache.accumulo.core.client.impl.ThriftTransportPool",
"org.apache.thrift.TServiceClient",
"org.apache.thrift.TServiceClientFactory",
"org.apache.thrift.transport.TTransport",
"org.apache.thrift.transport.TTr... | import com.google.common.net.HostAndPort; import org.apache.accumulo.core.client.impl.ClientContext; import org.apache.accumulo.core.client.impl.ThriftTransportPool; import org.apache.thrift.TServiceClient; import org.apache.thrift.TServiceClientFactory; import org.apache.thrift.transport.TTransport; import org.apache.... | import com.google.common.net.*; import org.apache.accumulo.core.client.impl.*; import org.apache.thrift.*; import org.apache.thrift.transport.*; | [
"com.google.common",
"org.apache.accumulo",
"org.apache.thrift"
] | com.google.common; org.apache.accumulo; org.apache.thrift; | 1,540,949 |
public static Props loadPropsInDirs(List<File> dirs, String... suffixes) {
Props props = new Props();
for(File dir: dirs) {
props.putLocal(loadPropsInDir(dir, suffixes));
}
return props;
} | static Props function(List<File> dirs, String... suffixes) { Props props = new Props(); for(File dir: dirs) { props.putLocal(loadPropsInDir(dir, suffixes)); } return props; } | /**
* Load job schedules from the given directories
*
* @param dirs The directories to check for properties
* @param suffixes The suffixes to load
* @return The properties
*/ | Load job schedules from the given directories | loadPropsInDirs | {
"repo_name": "azkaban/azkaban-legacy",
"path": "azkaban/src/java/azkaban/app/PropsUtils.java",
"license": "apache-2.0",
"size": 6396
} | [
"java.io.File",
"java.util.List"
] | import java.io.File; import java.util.List; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 574,270 |
private synchronized boolean release(String reason, Exception ex) throws
IOException {
if (!released) {
reasonClosed = reason;
try {
if (LOG.isDebugEnabled()) {
LOG.debug("Releasing connection to " + uri + ": " + rea... | synchronized boolean function(String reason, Exception ex) throws IOException { if (!released) { reasonClosed = reason; try { if (LOG.isDebugEnabled()) { LOG.debug(STR + uri + STR + reason, ex); } if (req != null) { if (!dataConsumed) { req.abort(); } req.releaseConnection(); } if (inStream != null) { inStream.close();... | /**
* Release logic
* @param reason reason for release (used in debug messages)
* @param ex exception that is a cause -null for non-exceptional releases
* @return true if the release took place here
* @throws IOException if the abort or close operations failed.
*/ | Release logic | release | {
"repo_name": "Ethanlm/hadoop",
"path": "hadoop-tools/hadoop-openstack/src/main/java/org/apache/hadoop/fs/swift/http/HttpInputStreamWithRelease.java",
"license": "apache-2.0",
"size": 7662
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 577,846 |
public void setOptOutDate (Timestamp OptOutDate); | void function (Timestamp OptOutDate); | /** Set Opt-out Date.
* Date the contact opted out
*/ | Set Opt-out Date. Date the contact opted out | setOptOutDate | {
"repo_name": "klst-com/metasfresh",
"path": "de.metas.adempiere.adempiere/base/src/main/java-gen/org/compiere/model/I_R_ContactInterest.java",
"license": "gpl-2.0",
"size": 5039
} | [
"java.sql.Timestamp"
] | import java.sql.Timestamp; | import java.sql.*; | [
"java.sql"
] | java.sql; | 639,572 |
public Set getFoos() {
return foos;
}
| Set function() { return foos; } | /**
* Returns the foos.
* @return Set
*/ | Returns the foos | getFoos | {
"repo_name": "HerrB92/obp",
"path": "OpenBeaconPackage/libraries/hibernate-release-4.2.7.SP1/project/hibernate-core/src/test/java/org/hibernate/test/legacy/Holder.java",
"license": "mit",
"size": 1634
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,256,157 |
protected int getPriority(ServletRequest request)
{
HttpServletRequest base_request = (HttpServletRequest)request;
if (base_request.getUserPrincipal() != null)
return 2;
else
{
HttpSession session = base_request.getSession(false);
if (session !... | int function(ServletRequest request) { HttpServletRequest base_request = (HttpServletRequest)request; if (base_request.getUserPrincipal() != null) return 2; else { HttpSession session = base_request.getSession(false); if (session != null && !session.isNew()) return 1; else return 0; } } | /**
* Get the request Priority.
* <p> The default implementation assigns the following priorities:<ul>
* <li> 2 - for a authenticated request
* <li> 1 - for a request with valid /non new session
* <li> 0 - for all other requests.
* </ul>
* This method may be specialised to provide ap... | Get the request Priority. The default implementation assigns the following priorities: 2 - for a authenticated request 1 - for a request with valid /non new session 0 - for all other requests. This method may be specialised to provide application specific priorities | getPriority | {
"repo_name": "napcs/qedserver",
"path": "jetty/modules/util5/src/main/java/org/mortbay/servlet/QoSFilter.java",
"license": "mit",
"size": 9332
} | [
"javax.servlet.ServletRequest",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpSession"
] | import javax.servlet.ServletRequest; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpSession; | import javax.servlet.*; import javax.servlet.http.*; | [
"javax.servlet"
] | javax.servlet; | 1,981,757 |
public String toString() {
HashMap<String, Object> jsonObj = new HashMap<String, Object>();
jsonObj.put(MolaDbConstants.JSON_KEY, key.toJsonObj());
jsonObj.put(MolaDbConstants.JSON_TABLENAME, tableName);
return JsonUtils.toJsonString(jsonObj);
} | String function() { HashMap<String, Object> jsonObj = new HashMap<String, Object>(); jsonObj.put(MolaDbConstants.JSON_KEY, key.toJsonObj()); jsonObj.put(MolaDbConstants.JSON_TABLENAME, tableName); return JsonUtils.toJsonString(jsonObj); } | /**
* Return a string representation of request information.
*
* @return A string representation of request information.
*/ | Return a string representation of request information | toString | {
"repo_name": "baidubce/bce-sdk-java",
"path": "src/main/java/com/baidubce/services/moladb/model/DeleteItemRequest.java",
"license": "apache-2.0",
"size": 3439
} | [
"com.baidubce.services.moladb.MolaDbConstants",
"com.baidubce.util.JsonUtils",
"java.util.HashMap"
] | import com.baidubce.services.moladb.MolaDbConstants; import com.baidubce.util.JsonUtils; import java.util.HashMap; | import com.baidubce.services.moladb.*; import com.baidubce.util.*; import java.util.*; | [
"com.baidubce.services",
"com.baidubce.util",
"java.util"
] | com.baidubce.services; com.baidubce.util; java.util; | 105,360 |
public void deviceFound(BluetoothDevice device) {
if(device == null || devices.contains(device)) {
return;
}
devices.add(device);
Log.d(LOG_TAG, "Device Found: " + device.getName());
} | void function(BluetoothDevice device) { if(device == null devices.contains(device)) { return; } devices.add(device); Log.d(LOG_TAG, STR + device.getName()); } | /**
* Called each time a device is discovered
* Added device to devices ArrayList<BluetoothDevice>
* @return void
*/ | Called each time a device is discovered Added device to devices ArrayList | deviceFound | {
"repo_name": "Anthbs/cordova-plugin-background-geolocation",
"path": "src/android/bluetooth/GenericBluetooth.java",
"license": "apache-2.0",
"size": 5745
} | [
"android.bluetooth.BluetoothDevice",
"android.util.Log"
] | import android.bluetooth.BluetoothDevice; import android.util.Log; | import android.bluetooth.*; import android.util.*; | [
"android.bluetooth",
"android.util"
] | android.bluetooth; android.util; | 298,130 |
void flushOrSync(boolean isSync) throws IOException {
long flushTotalNanos = 0;
long begin = Time.monotonicNow();
if (checksumOut != null) {
long flushStartNanos = System.nanoTime();
checksumOut.flush();
long flushEndNanos = System.nanoTime();
if (isSync) {
long fsyncStartN... | void flushOrSync(boolean isSync) throws IOException { long flushTotalNanos = 0; long begin = Time.monotonicNow(); if (checksumOut != null) { long flushStartNanos = System.nanoTime(); checksumOut.flush(); long flushEndNanos = System.nanoTime(); if (isSync) { long fsyncStartNanos = flushEndNanos; streams.syncChecksumOut(... | /**
* Flush block data and metadata files to disk.
* @throws IOException
*/ | Flush block data and metadata files to disk | flushOrSync | {
"repo_name": "korrelate/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/BlockReceiver.java",
"license": "apache-2.0",
"size": 55865
} | [
"java.io.IOException",
"org.apache.hadoop.util.Time"
] | import java.io.IOException; import org.apache.hadoop.util.Time; | import java.io.*; import org.apache.hadoop.util.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 2,291,115 |
@Override
public IBinder onBind(Intent intent) {
return myEarthquakeServiceStub;
} | IBinder function(Intent intent) { return myEarthquakeServiceStub; } | /**
* Listing 18-17: Exposing an AIDL interface implementation to Service clients
*/ | Listing 18-17: Exposing an AIDL interface implementation to Service clients | onBind | {
"repo_name": "Izek/pa4ad",
"path": "PA4AP/Code Snippets/Chapter 18/PA4AD_Ch18_IPC/src/com/paad/earthquake/EarthquakeUpdateService.java",
"license": "gpl-3.0",
"size": 11899
} | [
"android.content.Intent",
"android.os.IBinder"
] | import android.content.Intent; import android.os.IBinder; | import android.content.*; import android.os.*; | [
"android.content",
"android.os"
] | android.content; android.os; | 1,278,807 |
@Generated
@Selector("startPoint")
@ByValue
public native CGPoint startPoint(); | @Selector(STR) native CGPoint function(); | /**
* Points specifying start and end points for line annotation (required).
* Points are specified in annotation space.
* Used by annotations type(s): /Line.
*/ | Points specifying start and end points for line annotation (required). Points are specified in annotation space. Used by annotations type(s): /Line | startPoint | {
"repo_name": "multi-os-engine/moe-core",
"path": "moe.apple/moe.platform.ios/src/main/java/apple/pdfkit/PDFAnnotation.java",
"license": "apache-2.0",
"size": 36415
} | [
"org.moe.natj.objc.ann.Selector"
] | import org.moe.natj.objc.ann.Selector; | import org.moe.natj.objc.ann.*; | [
"org.moe.natj"
] | org.moe.natj; | 574,376 |
public void notify(String token, String nodeId, List<String> users, List<String> mails, String message, boolean attachment)
throws PathNotFoundException, AccessDeniedException, PrincipalAdapterException, RepositoryException,
DatabaseException, IOException; | void function(String token, String nodeId, List<String> users, List<String> mails, String message, boolean attachment) throws PathNotFoundException, AccessDeniedException, PrincipalAdapterException, RepositoryException, DatabaseException, IOException; | /**
* Send a notification message to an user list.
*
* @param nodeId The complete path to the node or its UUID.
* @param users Array of users to notify.
* @param mails Array of external mails to notify.
* @param message An String with the notification message.
* @throws PathNotFoundException If the node ... | Send a notification message to an user list | notify | {
"repo_name": "papamas/DMS-KANGREG-XI-MANADO",
"path": "src/main/java/com/openkm/module/NotificationModule.java",
"license": "gpl-3.0",
"size": 3721
} | [
"com.openkm.core.AccessDeniedException",
"com.openkm.core.DatabaseException",
"com.openkm.core.PathNotFoundException",
"com.openkm.core.RepositoryException",
"com.openkm.principal.PrincipalAdapterException",
"java.io.IOException",
"java.util.List"
] | import com.openkm.core.AccessDeniedException; import com.openkm.core.DatabaseException; import com.openkm.core.PathNotFoundException; import com.openkm.core.RepositoryException; import com.openkm.principal.PrincipalAdapterException; import java.io.IOException; import java.util.List; | import com.openkm.core.*; import com.openkm.principal.*; import java.io.*; import java.util.*; | [
"com.openkm.core",
"com.openkm.principal",
"java.io",
"java.util"
] | com.openkm.core; com.openkm.principal; java.io; java.util; | 2,523,306 |
@Override
public GatewayOperationResponse stopDiagnostics(String networkName, StopGatewayPublicDiagnosticsParameters parameters) throws ParserConfigurationException, SAXException, TransformerException, IOException, ServiceException {
// Validate
if (networkName == null) {
throw new N... | GatewayOperationResponse function(String networkName, StopGatewayPublicDiagnosticsParameters parameters) throws ParserConfigurationException, SAXException, TransformerException, IOException, ServiceException { if (networkName == null) { throw new NullPointerException(STR); } if (parameters == null) { throw new NullPoin... | /**
* The Stop Diagnostics operation begins an asynchronous operation to stopa
* diagnostics session for the specified virtual network gateway in Azure.
* (see http://msdn.microsoft.com/en-us/library/windowsazure/jj154119.aspx
* for more information)
*
* @param networkName Required. The name of ... | The Stop Diagnostics operation begins an asynchronous operation to stopa diagnostics session for the specified virtual network gateway in Azure. (see HREF for more information) | stopDiagnostics | {
"repo_name": "flydream2046/azure-sdk-for-java",
"path": "service-management/azure-svc-mgmt-network/src/main/java/com/microsoft/windowsazure/management/network/GatewayOperationsImpl.java",
"license": "apache-2.0",
"size": 573643
} | [
"com.microsoft.windowsazure.core.utils.XmlUtility",
"com.microsoft.windowsazure.exception.ServiceException",
"com.microsoft.windowsazure.management.network.models.GatewayOperationResponse",
"com.microsoft.windowsazure.management.network.models.StopGatewayPublicDiagnosticsParameters",
"com.microsoft.windowsa... | import com.microsoft.windowsazure.core.utils.XmlUtility; import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.management.network.models.GatewayOperationResponse; import com.microsoft.windowsazure.management.network.models.StopGatewayPublicDiagnosticsParameters; import com.micr... | import com.microsoft.windowsazure.core.utils.*; import com.microsoft.windowsazure.exception.*; import com.microsoft.windowsazure.management.network.models.*; import com.microsoft.windowsazure.tracing.*; import java.io.*; import java.util.*; import javax.xml.parsers.*; import javax.xml.transform.*; import org.w3c.dom.*;... | [
"com.microsoft.windowsazure",
"java.io",
"java.util",
"javax.xml",
"org.w3c.dom",
"org.xml.sax"
] | com.microsoft.windowsazure; java.io; java.util; javax.xml; org.w3c.dom; org.xml.sax; | 1,499,621 |
protected void runDefaultActions(AbstractEvent e) {
List runables = e.getDefaultActions();
if (runables != null) {
Iterator i = runables.iterator();
while (i.hasNext()) {
Runnable r = (Runnable)i.next();
r.run();
}
}
} | void function(AbstractEvent e) { List runables = e.getDefaultActions(); if (runables != null) { Iterator i = runables.iterator(); while (i.hasNext()) { Runnable r = (Runnable)i.next(); r.run(); } } } | /**
* Runs all of the registered default actions for the given event object.
*/ | Runs all of the registered default actions for the given event object | runDefaultActions | {
"repo_name": "Squeegee/batik",
"path": "sources/org/apache/batik/dom/events/EventSupport.java",
"license": "apache-2.0",
"size": 18795
} | [
"java.util.Iterator",
"java.util.List"
] | import java.util.Iterator; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,628,067 |
public static <T> int count(Iterable<T> iterable, Predicate<? super T> predicate, int batchSize, ForkJoinPool executor)
{
CountCombiner<T> combiner = new CountCombiner<>();
CountProcedureFactory<T> procedureFactory = new CountProcedureFactory<>(predicate);
FJIterate.forEach(iterable, pro... | static <T> int function(Iterable<T> iterable, Predicate<? super T> predicate, int batchSize, ForkJoinPool executor) { CountCombiner<T> combiner = new CountCombiner<>(); CountProcedureFactory<T> procedureFactory = new CountProcedureFactory<>(predicate); FJIterate.forEach(iterable, procedureFactory, combiner, batchSize, ... | /**
* Same effect as {@link Iterate#count(Iterable, Predicate)}, but executed in parallel batches.
*
* @return The number of elements which satisfy the Predicate.
*/ | Same effect as <code>Iterate#count(Iterable, Predicate)</code>, but executed in parallel batches | count | {
"repo_name": "g-votte/eclipse-collections",
"path": "eclipse-collections-forkjoin/src/main/java/org/eclipse/collections/impl/forkjoin/FJIterate.java",
"license": "bsd-3-clause",
"size": 47347
} | [
"java.util.concurrent.ForkJoinPool",
"org.eclipse.collections.api.block.predicate.Predicate",
"org.eclipse.collections.impl.parallel.CountCombiner",
"org.eclipse.collections.impl.parallel.CountProcedureFactory"
] | import java.util.concurrent.ForkJoinPool; import org.eclipse.collections.api.block.predicate.Predicate; import org.eclipse.collections.impl.parallel.CountCombiner; import org.eclipse.collections.impl.parallel.CountProcedureFactory; | import java.util.concurrent.*; import org.eclipse.collections.api.block.predicate.*; import org.eclipse.collections.impl.parallel.*; | [
"java.util",
"org.eclipse.collections"
] | java.util; org.eclipse.collections; | 775,347 |
public void setValidator(final PflegezieleValidator validator) {
this.validator = validator;
} | void function(final PflegezieleValidator validator) { this.validator = validator; } | /**
* DOCUMENT ME!
*
* @param validator the validator to set
*/ | DOCUMENT ME | setValidator | {
"repo_name": "cismet/cids-custom-wrrl-db-mv",
"path": "src/main/java/de/cismet/cids/custom/objecteditors/wrrl_db_mv/GupOperativesZielAbschnittEditor.java",
"license": "lgpl-3.0",
"size": 26821
} | [
"de.cismet.cids.custom.wrrl_db_mv.util.gup.PflegezieleValidator"
] | import de.cismet.cids.custom.wrrl_db_mv.util.gup.PflegezieleValidator; | import de.cismet.cids.custom.wrrl_db_mv.util.gup.*; | [
"de.cismet.cids"
] | de.cismet.cids; | 925,952 |
public void updateRMDelegationToken(
RMDelegationTokenIdentifier rmDTIdentifier, Long renewDate) {
handleStoreEvent(new RMStateStoreRMDTEvent(rmDTIdentifier, renewDate,
RMStateStoreEventType.UPDATE_DELEGATION_TOKEN));
} | void function( RMDelegationTokenIdentifier rmDTIdentifier, Long renewDate) { handleStoreEvent(new RMStateStoreRMDTEvent(rmDTIdentifier, renewDate, RMStateStoreEventType.UPDATE_DELEGATION_TOKEN)); } | /**
* RMDTSecretManager call this to update the state of a delegation token
* and sequence number
*/ | RMDTSecretManager call this to update the state of a delegation token and sequence number | updateRMDelegationToken | {
"repo_name": "lukmajercak/hadoop",
"path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/recovery/RMStateStore.java",
"license": "apache-2.0",
"size": 51874
} | [
"org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier"
] | import org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier; | import org.apache.hadoop.yarn.security.client.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,328,273 |
public static JFreeChart createCandlestickChart(String title,
String timeAxisLabel,
String valueAxisLabel,
OHLCDataset dataset,
... | static JFreeChart function(String title, String timeAxisLabel, String valueAxisLabel, OHLCDataset dataset, boolean legend) { ValueAxis timeAxis = new DateAxis(timeAxisLabel); NumberAxis valueAxis = new NumberAxis(valueAxisLabel); XYPlot plot = new XYPlot(dataset, timeAxis, valueAxis, null); plot.setRenderer(new Candles... | /**
* Creates and returns a default instance of a candlesticks chart.
*
* @param title the chart title (<code>null</code> permitted).
* @param timeAxisLabel a label for the time axis (<code>null</code>
* permitted).
* @param valueAxisLabel a label for the val... | Creates and returns a default instance of a candlesticks chart | createCandlestickChart | {
"repo_name": "fluidware/Eastwood-Charts",
"path": "source/org/jfree/chart/ChartFactory.java",
"license": "lgpl-2.1",
"size": 102933
} | [
"org.jfree.chart.axis.DateAxis",
"org.jfree.chart.axis.NumberAxis",
"org.jfree.chart.axis.ValueAxis",
"org.jfree.chart.plot.XYPlot",
"org.jfree.chart.renderer.xy.CandlestickRenderer",
"org.jfree.data.xy.OHLCDataset"
] | import org.jfree.chart.axis.DateAxis; import org.jfree.chart.axis.NumberAxis; import org.jfree.chart.axis.ValueAxis; import org.jfree.chart.plot.XYPlot; import org.jfree.chart.renderer.xy.CandlestickRenderer; import org.jfree.data.xy.OHLCDataset; | import org.jfree.chart.axis.*; import org.jfree.chart.plot.*; import org.jfree.chart.renderer.xy.*; import org.jfree.data.xy.*; | [
"org.jfree.chart",
"org.jfree.data"
] | org.jfree.chart; org.jfree.data; | 1,519,731 |
protected boolean parseUnknownFieldProto3(
CodedInputStream input,
UnknownFieldSet.Builder unknownFields,
ExtensionRegistryLite extensionRegistry,
int tag)
throws IOException {
return parseUnknownField(input, unknownFields, extensionRegistry, tag);
} | boolean function( CodedInputStream input, UnknownFieldSet.Builder unknownFields, ExtensionRegistryLite extensionRegistry, int tag) throws IOException { return parseUnknownField(input, unknownFields, extensionRegistry, tag); } | /**
* Delegates to parseUnknownField. This method is obsolete, but we must retain it for
* compatibility with older generated code.
*/ | Delegates to parseUnknownField. This method is obsolete, but we must retain it for compatibility with older generated code | parseUnknownFieldProto3 | {
"repo_name": "scheib/chromium",
"path": "third_party/protobuf/java/core/src/main/java/com/google/protobuf/GeneratedMessageV3.java",
"license": "bsd-3-clause",
"size": 118791
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,119,719 |
@Test
public void testCalculateWithCAPM() {
assertEquals(BigDecimal.valueOf(0.025), RiskPremium.calculateWithCAPM(BETA, MARKET_RETURN, RISK_FREE_RETURN));
} | void function() { assertEquals(BigDecimal.valueOf(0.025), RiskPremium.calculateWithCAPM(BETA, MARKET_RETURN, RISK_FREE_RETURN)); } | /**
* Test calculate with capm.
*/ | Test calculate with capm | testCalculateWithCAPM | {
"repo_name": "JavaMoney/javamoney-lib",
"path": "calc/src/test/java/org/javamoney/calc/securities/RiskPremiumTest.java",
"license": "apache-2.0",
"size": 1627
} | [
"java.math.BigDecimal",
"junit.framework.Assert"
] | import java.math.BigDecimal; import junit.framework.Assert; | import java.math.*; import junit.framework.*; | [
"java.math",
"junit.framework"
] | java.math; junit.framework; | 771,931 |
public ArrayList getDaysExcluded() {
return excludeDays;
} | ArrayList function() { return excludeDays; } | /**
* <p>
* Get the array which defines the exclude-value of each day of month
* </p>
*/ | Get the array which defines the exclude-value of each day of month | getDaysExcluded | {
"repo_name": "optivo-org/quartz-1.8.3-optivo",
"path": "quartz/src/main/java/org/quartz/impl/calendar/AnnualCalendar.java",
"license": "apache-2.0",
"size": 8098
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 801,246 |
@Deprecated
public static StormZkClusterState mkStormZkClusterState(Map conf) throws Exception {
Map realConf = getFullConf(conf);
return new StormZkClusterState(realConf);
} | static StormZkClusterState function(Map conf) throws Exception { Map realConf = getFullConf(conf); return new StormZkClusterState(realConf); } | /**
* This function bring some hacks to JStorm, this isn't a good way
*/ | This function bring some hacks to JStorm, this isn't a good way | mkStormZkClusterState | {
"repo_name": "wlazjr/storm",
"path": "common/src/main/java/org/apache/storm/wanglu/selfstudy/util/JStormHelper.java",
"license": "apache-2.0",
"size": 11532
} | [
"com.alibaba.jstorm.cluster.StormZkClusterState",
"java.util.Map"
] | import com.alibaba.jstorm.cluster.StormZkClusterState; import java.util.Map; | import com.alibaba.jstorm.cluster.*; import java.util.*; | [
"com.alibaba.jstorm",
"java.util"
] | com.alibaba.jstorm; java.util; | 1,198,359 |
public static OptionValues getCurrentOptionOverrides() {
TruffleOptionsOverrideScope scope = Lazy.overrideScope.get();
return scope != null ? scope.options : null;
}
public static class TruffleOptionsOverrideScope implements AutoCloseable {
private final TruffleOptionsOverrideScope ... | static OptionValues function() { TruffleOptionsOverrideScope scope = Lazy.overrideScope.get(); return scope != null ? scope.options : null; } public static class TruffleOptionsOverrideScope implements AutoCloseable { private final TruffleOptionsOverrideScope outer; private final OptionValues options; TruffleOptionsOver... | /**
* Gets the options defined in the current option
* {@linkplain #overrideOptions(OptionKey, Object, Object...) override} scope or {@code null} if
* there is no override scope active for the current thread.
*/ | Gets the options defined in the current option #overrideOptions(OptionKey, Object, Object...) override scope or null if there is no override scope active for the current thread | getCurrentOptionOverrides | {
"repo_name": "graalvm/graal-core",
"path": "graal/org.graalvm.compiler.truffle/src/org/graalvm/compiler/truffle/TruffleCompilerOptions.java",
"license": "gpl-2.0",
"size": 15664
} | [
"org.graalvm.compiler.options.OptionKey",
"org.graalvm.compiler.options.OptionValues",
"org.graalvm.util.UnmodifiableEconomicMap"
] | import org.graalvm.compiler.options.OptionKey; import org.graalvm.compiler.options.OptionValues; import org.graalvm.util.UnmodifiableEconomicMap; | import org.graalvm.compiler.options.*; import org.graalvm.util.*; | [
"org.graalvm.compiler",
"org.graalvm.util"
] | org.graalvm.compiler; org.graalvm.util; | 1,833,253 |
@Nonnull
default Promise<Void> thenRunDelayedAsync(@Nonnull Runnable action, long delay, @Nonnull TimeUnit unit) {
return thenApplyDelayedAsync(Delegates.runnableToFunction(action), delay, unit);
} | default Promise<Void> thenRunDelayedAsync(@Nonnull Runnable action, long delay, @Nonnull TimeUnit unit) { return thenApplyDelayedAsync(Delegates.runnableToFunction(action), delay, unit); } | /**
* Returns a new Promise that, when this promise completes normally, executes
* the given task, after the delay has elapsed.
*
* @param action the action to run before completing the returned future
* @param delay the delay
* @param unit the unit of delay
* @return the new promise
... | Returns a new Promise that, when this promise completes normally, executes the given task, after the delay has elapsed | thenRunDelayedAsync | {
"repo_name": "lucko/helper",
"path": "helper/src/main/java/me/lucko/helper/promise/Promise.java",
"license": "mit",
"size": 55811
} | [
"java.util.concurrent.TimeUnit",
"javax.annotation.Nonnull",
"me.lucko.helper.utils.Delegates"
] | import java.util.concurrent.TimeUnit; import javax.annotation.Nonnull; import me.lucko.helper.utils.Delegates; | import java.util.concurrent.*; import javax.annotation.*; import me.lucko.helper.utils.*; | [
"java.util",
"javax.annotation",
"me.lucko.helper"
] | java.util; javax.annotation; me.lucko.helper; | 835,478 |
default Roles addSuffix(String suffix) {
Assert.checkNotNullParam("suffix", suffix);
return suffix.isEmpty() ? this : isEmpty() ? NONE : new AddSuffixRoles(this, suffix);
} | default Roles addSuffix(String suffix) { Assert.checkNotNullParam(STR, suffix); return suffix.isEmpty() ? this : isEmpty() ? NONE : new AddSuffixRoles(this, suffix); } | /**
* Get a roles collection which adds a suffix to all role names.
*
* @param suffix the suffix to add (must not be {@code null})
* @return the new roles collection (not {@code null})
*/ | Get a roles collection which adds a suffix to all role names | addSuffix | {
"repo_name": "sguilhen/wildfly-elytron",
"path": "src/main/java/org/wildfly/security/authz/Roles.java",
"license": "apache-2.0",
"size": 7869
} | [
"org.wildfly.common.Assert"
] | import org.wildfly.common.Assert; | import org.wildfly.common.*; | [
"org.wildfly.common"
] | org.wildfly.common; | 1,801,393 |
@Override
public long getLastMillisecond(Calendar calendar) {
int month = Quarter.LAST_MONTH_IN_QUARTER[this.quarter];
int eom = SerialDate.lastDayOfMonth(month, this.year);
calendar.set(this.year, month - 1, eom, 23, 59, 59);
calendar.set(Calendar.MILLISECOND, 999);
retu... | long function(Calendar calendar) { int month = Quarter.LAST_MONTH_IN_QUARTER[this.quarter]; int eom = SerialDate.lastDayOfMonth(month, this.year); calendar.set(this.year, month - 1, eom, 23, 59, 59); calendar.set(Calendar.MILLISECOND, 999); return calendar.getTimeInMillis(); } | /**
* Returns the last millisecond of the Quarter, evaluated using the
* supplied calendar (which determines the time zone).
*
* @param calendar the calendar (<code>null</code> not permitted).
*
* @return The last millisecond of the Quarter.
*
* @throws NullPointerException if <... | Returns the last millisecond of the Quarter, evaluated using the supplied calendar (which determines the time zone) | getLastMillisecond | {
"repo_name": "akardapolov/ASH-Viewer",
"path": "jfreechart-fse/src/main/java/org/jfree/data/time/Quarter.java",
"license": "gpl-3.0",
"size": 14734
} | [
"java.util.Calendar",
"org.jfree.chart.date.SerialDate"
] | import java.util.Calendar; import org.jfree.chart.date.SerialDate; | import java.util.*; import org.jfree.chart.date.*; | [
"java.util",
"org.jfree.chart"
] | java.util; org.jfree.chart; | 781,196 |
public void removeChangeListener(RendererChangeListener listener) {
if (listener == null) {
throw new IllegalArgumentException("Null 'listener' argument.");
}
this.listenerList.remove(RendererChangeListener.class, listener);
} | void function(RendererChangeListener listener) { if (listener == null) { throw new IllegalArgumentException(STR); } this.listenerList.remove(RendererChangeListener.class, listener); } | /**
* Deregisters an object so that it no longer receives
* notification of changes to the renderer.
*
* @param listener the object (<code>null</code> not permitted).
*
* @see #addChangeListener(RendererChangeListener)
*/ | Deregisters an object so that it no longer receives notification of changes to the renderer | removeChangeListener | {
"repo_name": "ibestvina/multithread-centiscape",
"path": "CentiScaPe2.1/src/main/java/org/jfree/chart/renderer/AbstractRenderer.java",
"license": "mit",
"size": 126056
} | [
"org.jfree.chart.event.RendererChangeListener"
] | import org.jfree.chart.event.RendererChangeListener; | import org.jfree.chart.event.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 1,564,997 |
public static String fixWindowsURI(String path) {
if (path == null) return null;
if ( path.startsWith("file:") || path.startsWith("FILE:")){
char [] u = path.toCharArray();
int l = u.length;
StringBuilder sb = new StringBuilder();
for (int i=0; i<l; i... | static String function(String path) { if (path == null) return null; if ( path.startsWith("file:") path.startsWith("FILE:")){ char [] u = path.toCharArray(); int l = u.length; StringBuilder sb = new StringBuilder(); for (int i=0; i<l; i++){ if (u[i] == File.separatorChar) { sb.append('/'); continue; } if (i == 5 && pat... | /**
* Fixes windows file URI path by converting back slashes to forward
* slashes and inserting a forward slash before the drive letter if it is
* missing. No modification of case is performed.
*/ | Fixes windows file URI path by converting back slashes to forward slashes and inserting a forward slash before the drive letter if it is missing. No modification of case is performed | fixWindowsURI | {
"repo_name": "cdegroot/river",
"path": "src/org/apache/river/impl/net/UriString.java",
"license": "apache-2.0",
"size": 53110
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,611,592 |
public static synchronized EntityDefImpl getDefinitionObject()
{
if (mDefinitionObject == null)
{
mDefinitionObject = (EntityDefImpl)EntityDefImpl.findDefObject("gov.nih.nci.ncicb.cadsr.common.persistence.bc4j.ConceptsExt");
}
return mDefinitionObject;
} | static synchronized EntityDefImpl function() { if (mDefinitionObject == null) { mDefinitionObject = (EntityDefImpl)EntityDefImpl.findDefObject(STR); } return mDefinitionObject; } | /**
*
* Retrieves the definition object for this instance class.
*/ | Retrieves the definition object for this instance class | getDefinitionObject | {
"repo_name": "CBIIT/cadsr-util",
"path": "cadsrutil/src/java/gov/nih/nci/ncicb/cadsr/common/persistence/bc4j/ConceptsExtImpl.java",
"license": "bsd-3-clause",
"size": 14051
} | [
"oracle.jbo.server.EntityDefImpl"
] | import oracle.jbo.server.EntityDefImpl; | import oracle.jbo.server.*; | [
"oracle.jbo.server"
] | oracle.jbo.server; | 205,508 |
public static final SourceModel.Expr xmlNodeToFirstXmlCanonicalForm(SourceModel.Expr node) {
return
SourceModel.Expr.Application.make(
new SourceModel.Expr[] {SourceModel.Expr.Var.make(Functions.xmlNodeToFirstXmlCanonicalForm), node});
}
public static final QualifiedName xmlNodeToFirstXm... | static final SourceModel.Expr function(SourceModel.Expr node) { return SourceModel.Expr.Application.make( new SourceModel.Expr[] {SourceModel.Expr.Var.make(Functions.xmlNodeToFirstXmlCanonicalForm), node}); } static final QualifiedName function = QualifiedName.make( CAL_XmlPrinters.MODULE_NAME, STR); | /**
* Helper binding method for function: xmlNodeToFirstXmlCanonicalForm.
* @param node
* @return the SourceModule.expr representing an application of xmlNodeToFirstXmlCanonicalForm
*/ | Helper binding method for function: xmlNodeToFirstXmlCanonicalForm | xmlNodeToFirstXmlCanonicalForm | {
"repo_name": "levans/Open-Quark",
"path": "src/CAL_Libraries/src/org/openquark/cal/module/Cal/Experimental/Utilities/CAL_XmlPrinters.java",
"license": "bsd-3-clause",
"size": 13309
} | [
"org.openquark.cal.compiler.QualifiedName",
"org.openquark.cal.compiler.SourceModel"
] | import org.openquark.cal.compiler.QualifiedName; import org.openquark.cal.compiler.SourceModel; | import org.openquark.cal.compiler.*; | [
"org.openquark.cal"
] | org.openquark.cal; | 1,270,086 |
@Override
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
addItemSubjectRefPropertyDescriptor(object);
addDataStoreRefPropertyDescriptor(object);
}
return itemPropertyDescriptors;
} | List<IItemPropertyDescriptor> function(Object object) { if (itemPropertyDescriptors == null) { super.getPropertyDescriptors(object); addItemSubjectRefPropertyDescriptor(object); addDataStoreRefPropertyDescriptor(object); } return itemPropertyDescriptors; } | /**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This returns the property descriptors for the adapted class. | getPropertyDescriptors | {
"repo_name": "adbrucker/SecureBPMN",
"path": "designer/src/org.activiti.designer.model.edit/src/org/eclipse/bpmn2/provider/DataStoreReferenceItemProvider.java",
"license": "apache-2.0",
"size": 7719
} | [
"java.util.List",
"org.eclipse.emf.edit.provider.IItemPropertyDescriptor"
] | import java.util.List; import org.eclipse.emf.edit.provider.IItemPropertyDescriptor; | import java.util.*; import org.eclipse.emf.edit.provider.*; | [
"java.util",
"org.eclipse.emf"
] | java.util; org.eclipse.emf; | 841,073 |
public BigDecimal getPercentageCovered(); | BigDecimal function(); | /**
* Return the percentage of coverage units covered
* from 0.00 to 100.00.
* @return
*/ | Return the percentage of coverage units covered from 0.00 to 100.00 | getPercentageCovered | {
"repo_name": "adligo/tests4j.adligo.org",
"path": "src/org/adligo/tests4j/models/shared/coverage/I_PercentCovered.java",
"license": "apache-2.0",
"size": 404
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 360,279 |
public void setSamplesFromBytes(byte[] input, int inByteOffset,
AudioFormat format, int floatOffset, int frameCount) {
if (floatOffset < 0 || frameCount < 0 || inByteOffset < 0) {
throw new IllegalArgumentException(
"FloatSampleBuffer.setSamplesFromBytes: negative inByteOffset, floatOffset, or frameCoun... | void function(byte[] input, int inByteOffset, AudioFormat format, int floatOffset, int frameCount) { if (floatOffset < 0 frameCount < 0 inByteOffset < 0) { throw new IllegalArgumentException( STR); } if (inByteOffset + (frameCount * format.getFrameSize()) > input.length) { throw new IllegalArgumentException( STR); } if... | /**
* Initializes audio data from the provided byte array. The float samples
* are written at <code>destOffset</code>. This FloatSampleBuffer must be
* big enough to accomodate the samples.
* <p>
* <code>srcBuffer</code> is read from index <code>srcOffset</code> to
* <code>(srcOffset + (lengthInSamples * fo... | Initializes audio data from the provided byte array. The float samples are written at <code>destOffset</code>. This FloatSampleBuffer must be big enough to accomodate the samples. <code>srcBuffer</code> is read from index <code>srcOffset</code> to <code>(srcOffset + (lengthInSamples * format.getFrameSize()))</code | setSamplesFromBytes | {
"repo_name": "srnsw/xena",
"path": "plugins/audio/ext/src/tritonus/src/classes/org/tritonus/share/sampled/FloatSampleBuffer.java",
"license": "gpl-3.0",
"size": 42920
} | [
"javax.sound.sampled.AudioFormat"
] | import javax.sound.sampled.AudioFormat; | import javax.sound.sampled.*; | [
"javax.sound"
] | javax.sound; | 2,739,132 |
private boolean validateGet(final JsonObject requestBody) {
LOG.trace("Start SessionResourceValidator#validateGet()");
boolean isValid = true;
// validation for key: op
setInvalidParameter(VtnServiceJsonConsts.OP);
if (requestBody.has(VtnServiceJsonConsts.OP)
&& requestBody.getAsJsonPrimitive(VtnServic... | boolean function(final JsonObject requestBody) { LOG.trace(STR); boolean isValid = true; setInvalidParameter(VtnServiceJsonConsts.OP); if (requestBody.has(VtnServiceJsonConsts.OP) && requestBody.getAsJsonPrimitive(VtnServiceJsonConsts.OP) .getAsString() != null && !requestBody.getAsJsonPrimitive(VtnServiceJsonConsts.OP... | /**
* Validate get request Json for List Sessions API.
*
* @param requestBody
* the request Json object
* @return true, if successful
*/ | Validate get request Json for List Sessions API | validateGet | {
"repo_name": "opendaylight/vtn",
"path": "coordinator/java/vtn-javaapi/src/org/opendaylight/vtn/javaapi/validation/SessionResourceValidator.java",
"license": "epl-1.0",
"size": 9164
} | [
"com.google.gson.JsonObject",
"org.opendaylight.vtn.javaapi.constants.VtnServiceJsonConsts"
] | import com.google.gson.JsonObject; import org.opendaylight.vtn.javaapi.constants.VtnServiceJsonConsts; | import com.google.gson.*; import org.opendaylight.vtn.javaapi.constants.*; | [
"com.google.gson",
"org.opendaylight.vtn"
] | com.google.gson; org.opendaylight.vtn; | 1,526,605 |
@Nullable public GridCacheMvccCandidate explicitLock(IgniteTxKey key, @Nullable GridCacheVersion ver) {
for (GridCacheExplicitLockSpan span : pendingExplicit.values()) {
GridCacheMvccCandidate cand = span.candidate(key, ver);
if (cand != null)
return cand;
}
... | @Nullable GridCacheMvccCandidate function(IgniteTxKey key, @Nullable GridCacheVersion ver) { for (GridCacheExplicitLockSpan span : pendingExplicit.values()) { GridCacheMvccCandidate cand = span.candidate(key, ver); if (cand != null) return cand; } return null; } | /**
* Gets explicit lock candidate added by any thread by given key and lock version.
*
* @param key Key.
* @param ver Version.
* @return Lock candidate that satisfies given criteria or {@code null} if no such candidate.
*/ | Gets explicit lock candidate added by any thread by given key and lock version | explicitLock | {
"repo_name": "ilantukh/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManager.java",
"license": "apache-2.0",
"size": 48423
} | [
"org.apache.ignite.internal.processors.cache.transactions.IgniteTxKey",
"org.apache.ignite.internal.processors.cache.version.GridCacheVersion",
"org.jetbrains.annotations.Nullable"
] | import org.apache.ignite.internal.processors.cache.transactions.IgniteTxKey; import org.apache.ignite.internal.processors.cache.version.GridCacheVersion; import org.jetbrains.annotations.Nullable; | import org.apache.ignite.internal.processors.cache.transactions.*; import org.apache.ignite.internal.processors.cache.version.*; import org.jetbrains.annotations.*; | [
"org.apache.ignite",
"org.jetbrains.annotations"
] | org.apache.ignite; org.jetbrains.annotations; | 1,649,021 |
private void validateDeprecatedJsDoc(NodeTraversal t, Node n,
JSDocInfo info) {
if (info != null && info.isExpose()) {
t.getCompiler().report(
t.makeError(n, ANNOTATION_DEPRECATED, "@expose",
"Use @nocollapse or @export instead."));
}
} | void function(NodeTraversal t, Node n, JSDocInfo info) { if (info != null && info.isExpose()) { t.getCompiler().report( t.makeError(n, ANNOTATION_DEPRECATED, STR, STR)); } } | /**
* Checks that deprecated annotations such as @expose are not present
*/ | Checks that deprecated annotations such as @expose are not present | validateDeprecatedJsDoc | {
"repo_name": "tsdl2013/closure-compiler",
"path": "src/com/google/javascript/jscomp/CheckJSDoc.java",
"license": "apache-2.0",
"size": 10432
} | [
"com.google.javascript.rhino.JSDocInfo",
"com.google.javascript.rhino.Node"
] | import com.google.javascript.rhino.JSDocInfo; import com.google.javascript.rhino.Node; | import com.google.javascript.rhino.*; | [
"com.google.javascript"
] | com.google.javascript; | 1,802,191 |
@JsonProperty("acc")
public float[] getAcc() {
return acc;
} | @JsonProperty("acc") float[] function() { return acc; } | /**
* Gets the X, Y, Z Acceleration
*
* @return
*/ | Gets the X, Y, Z Acceleration | getAcc | {
"repo_name": "florianspecker/DragStars",
"path": "src/main/java/com/zuehlke/carrera/bot/model/SensorEvent.java",
"license": "mit",
"size": 3380
} | [
"com.fasterxml.jackson.annotation.JsonProperty"
] | import com.fasterxml.jackson.annotation.JsonProperty; | import com.fasterxml.jackson.annotation.*; | [
"com.fasterxml.jackson"
] | com.fasterxml.jackson; | 1,413,906 |
public int init(String configFile) {
// change default log to a simple mode (just for the default logger JUL)
try {
String simpleLogSettings = "java.util.logging.ConsoleHandler.level=WARNING\n";
simpleLogSettings += "java.util.logging.SimpleFormatter.format=[%4$s][%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS]... | int function(String configFile) { try { String simpleLogSettings = STR; simpleLogSettings += STR; try (InputStream stream = new ByteArrayInputStream(simpleLogSettings.getBytes(StandardCharsets.UTF_8))) { LogManager.getLogManager().readConfiguration(stream); } } catch (Exception ex) { ex.printStackTrace(); } if (configF... | /**
* Initialize the application with the config file.
*
* @param configFile the config file
* @return the application state
*/ | Initialize the application with the config file | init | {
"repo_name": "joelam789/flame-ring",
"path": "project/flame-ring/src/org/flamering/app/ConsoleApp.java",
"license": "apache-2.0",
"size": 16298
} | [
"java.io.BufferedReader",
"java.io.ByteArrayInputStream",
"java.io.File",
"java.io.InputStream",
"java.io.InputStreamReader",
"java.nio.charset.StandardCharsets",
"java.util.logging.LogManager",
"org.flamering.component.Bean",
"org.flamering.component.Network",
"org.flamering.service.ServiceExecut... | import java.io.BufferedReader; import java.io.ByteArrayInputStream; import java.io.File; import java.io.InputStream; import java.io.InputStreamReader; import java.nio.charset.StandardCharsets; import java.util.logging.LogManager; import org.flamering.component.Bean; import org.flamering.component.Network; import org.fl... | import java.io.*; import java.nio.charset.*; import java.util.logging.*; import org.flamering.component.*; import org.flamering.service.*; | [
"java.io",
"java.nio",
"java.util",
"org.flamering.component",
"org.flamering.service"
] | java.io; java.nio; java.util; org.flamering.component; org.flamering.service; | 131,246 |
@Override
public void drawSeries(Canvas canvas, Paint paint, List<Float> points,
XYSeriesRenderer seriesRenderer, float yAxisValue, int seriesIndex, int startIndex) {
int seriesNr = mDataset.getSeriesCount();
int length = points.size();
paint.setColor(seriesRenderer.getColor());
paint.setStyle... | void function(Canvas canvas, Paint paint, List<Float> points, XYSeriesRenderer seriesRenderer, float yAxisValue, int seriesIndex, int startIndex) { int seriesNr = mDataset.getSeriesCount(); int length = points.size(); paint.setColor(seriesRenderer.getColor()); paint.setStyle(Style.FILL); float halfDiffX = getHalfDiffX(... | /**
* The graphical representation of a series.
*
* @param canvas the canvas to paint to
* @param paint the paint to be used for drawing
* @param points the array of points to be used for drawing the series
* @param seriesRenderer the series renderer
* @param yAxisValue the minimum value of the y ... | The graphical representation of a series | drawSeries | {
"repo_name": "DrMoriarty/AChartEngine",
"path": "src/org/achartengine/chart/RangeBarChart.java",
"license": "apache-2.0",
"size": 5046
} | [
"android.graphics.Canvas",
"android.graphics.Paint",
"java.util.List",
"org.achartengine.renderer.XYSeriesRenderer"
] | import android.graphics.Canvas; import android.graphics.Paint; import java.util.List; import org.achartengine.renderer.XYSeriesRenderer; | import android.graphics.*; import java.util.*; import org.achartengine.renderer.*; | [
"android.graphics",
"java.util",
"org.achartengine.renderer"
] | android.graphics; java.util; org.achartengine.renderer; | 1,153,905 |
protected Map<String, Object> processCommand (Command commandAnnotation) {
Map<String, Object> command = new HashMap<> ();
if (commandAnnotation.aliases ().length == 1) {
command.put ("aliases", commandAnnotation.aliases ()[0]);
} else if ... | Map<String, Object> function (Command commandAnnotation) { Map<String, Object> command = new HashMap<> (); if (commandAnnotation.aliases ().length == 1) { command.put (STR, commandAnnotation.aliases ()[0]); } else if (commandAnnotation.aliases ().length > 1) { command.put (STR, commandAnnotation.aliases ()); } if (!STR... | /**
* Processes a single command.
*
* @param commandAnnotation The annotation.
* @return The generated command metadata.
*/ | Processes a single command | processCommand | {
"repo_name": "LordAkkarin/bukkit-plugin-annotations",
"path": "src/main/java/com/torchmind/minecraft/annotation/processor/PluginAnnotationProcessor.java",
"license": "apache-2.0",
"size": 21712
} | [
"com.torchmind.minecraft.annotation.command.Command",
"java.util.HashMap",
"java.util.Map"
] | import com.torchmind.minecraft.annotation.command.Command; import java.util.HashMap; import java.util.Map; | import com.torchmind.minecraft.annotation.command.*; import java.util.*; | [
"com.torchmind.minecraft",
"java.util"
] | com.torchmind.minecraft; java.util; | 2,213,871 |
@Test void testMergeIntersect() {
final String sql = "select * from emp where deptno = 10\n"
+ "intersect\n"
+ "select * from emp where deptno = 20\n"
+ "intersect\n"
+ "select * from emp where deptno = 30\n";
sql(sql)
.withRule(CoreRules.INTERSECT_MERGE)
.check... | @Test void testMergeIntersect() { final String sql = STR + STR + STR + STR + STR; sql(sql) .withRule(CoreRules.INTERSECT_MERGE) .check(); } | /** Tests {@link CoreRules#INTERSECT_MERGE}, which merges 2
* {@link Intersect} operators into a single {@code Intersect} with 3
* inputs. */ | Tests <code>CoreRules#INTERSECT_MERGE</code>, which merges 2 <code>Intersect</code> operators into a single Intersect with 3 | testMergeIntersect | {
"repo_name": "datametica/calcite",
"path": "core/src/test/java/org/apache/calcite/test/RelOptRulesTest.java",
"license": "apache-2.0",
"size": 264929
} | [
"org.apache.calcite.rel.rules.CoreRules",
"org.junit.jupiter.api.Test"
] | import org.apache.calcite.rel.rules.CoreRules; import org.junit.jupiter.api.Test; | import org.apache.calcite.rel.rules.*; import org.junit.jupiter.api.*; | [
"org.apache.calcite",
"org.junit.jupiter"
] | org.apache.calcite; org.junit.jupiter; | 166,854 |
public boolean rewriteExif(String filename, Collection<ExifTag> tags) throws FileNotFoundException,
IOException {
RandomAccessFile file = null;
InputStream is = null;
boolean ret;
try {
File temp = new File(filename);
is = new BufferedInputStream(new FileInputStream(temp));
// Parse beginning of... | boolean function(String filename, Collection<ExifTag> tags) throws FileNotFoundException, IOException { RandomAccessFile file = null; InputStream is = null; boolean ret; try { File temp = new File(filename); is = new BufferedInputStream(new FileInputStream(temp)); ExifParser parser = null; try { parser = ExifParser.par... | /**
* Attempts to do an in-place rewrite the exif metadata in a file for the
* given tags. If tags do not exist or do not have the same size as the
* existing exif tags, this method will fail.
*
* @param filename
* a String containing a filepath for a jpeg file with exif tags
* to r... | Attempts to do an in-place rewrite the exif metadata in a file for the given tags. If tags do not exist or do not have the same size as the existing exif tags, this method will fail | rewriteExif | {
"repo_name": "n2hsu/Nii-Launcher",
"path": "src/com/android/gallery3d/exif/ExifInterface.java",
"license": "apache-2.0",
"size": 81236
} | [
"java.io.BufferedInputStream",
"java.io.File",
"java.io.FileInputStream",
"java.io.FileNotFoundException",
"java.io.IOException",
"java.io.InputStream",
"java.io.RandomAccessFile",
"java.nio.ByteBuffer",
"java.nio.channels.FileChannel",
"java.util.Collection"
] | import java.io.BufferedInputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import java.io.RandomAccessFile; import java.nio.ByteBuffer; import java.nio.channels.FileChannel; import java.util.Collection; | import java.io.*; import java.nio.*; import java.nio.channels.*; import java.util.*; | [
"java.io",
"java.nio",
"java.util"
] | java.io; java.nio; java.util; | 977,338 |
public String reportFragment(HttpServletRequest req, HttpServletResponse res, Throwable t)
{
BufferedServletResponse bufferedResponse = new BufferedServletResponse(res);
report(req,bufferedResponse,t,false);
String fragment = bufferedResponse.getInternalBuffer().getBuffer().toString();
return fragmen... | String function(HttpServletRequest req, HttpServletResponse res, Throwable t) { BufferedServletResponse bufferedResponse = new BufferedServletResponse(res); report(req,bufferedResponse,t,false); String fragment = bufferedResponse.getInternalBuffer().getBuffer().toString(); return fragment; } | /**
* Handle the inital report of an error, from an uncaught throwable, with a
* user display - but returning a string that contins a fragment.
*
* @param req
* The request.
* @param res
* The response.
* @param t
* The uncaught throwable.
*/ | Handle the inital report of an error, from an uncaught throwable, with a user display - but returning a string that contins a fragment | reportFragment | {
"repo_name": "kingmook/sakai",
"path": "portal/portal-util/util/src/java/org/sakaiproject/portal/util/ErrorReporter.java",
"license": "apache-2.0",
"size": 27994
} | [
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"org.sakaiproject.portal.util.BufferedServletResponse"
] | import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.sakaiproject.portal.util.BufferedServletResponse; | import javax.servlet.http.*; import org.sakaiproject.portal.util.*; | [
"javax.servlet",
"org.sakaiproject.portal"
] | javax.servlet; org.sakaiproject.portal; | 835,176 |
public @NotNull Counter errors(@NotNull String name) {
return counters.computeIfAbsent("vertx_" + name + "_errors", key -> register(Counter.build(key, "Errors number")
.labelNames("local_address", "class").create()));
} | @NotNull Counter function(@NotNull String name) { return counters.computeIfAbsent(STR + name + STR, key -> register(Counter.build(key, STR) .labelNames(STR, "class").create())); } | /**
* Errors counter.
*
* @param name The name of the counter, without prefix and suffix.
* @return A counter for errors, identified by the given name. Counters with the same name are shared.
*/ | Errors counter | errors | {
"repo_name": "nolequen/vertx-prometheus-metrics",
"path": "src/main/java/io/vertx/ext/prometheus/metrics/factories/CounterFactory.java",
"license": "apache-2.0",
"size": 2330
} | [
"io.prometheus.client.Counter",
"org.jetbrains.annotations.NotNull"
] | import io.prometheus.client.Counter; import org.jetbrains.annotations.NotNull; | import io.prometheus.client.*; import org.jetbrains.annotations.*; | [
"io.prometheus.client",
"org.jetbrains.annotations"
] | io.prometheus.client; org.jetbrains.annotations; | 33,798 |
private void addTermFrequencies(Map<String, Int> termFreqMap, Terms vector) throws IOException {
addTermFrequencies(termFreqMap, vector, null);
} | void function(Map<String, Int> termFreqMap, Terms vector) throws IOException { addTermFrequencies(termFreqMap, vector, null); } | /**
* Adds terms and frequencies found in vector into the Map termFreqMap
*
* @param termFreqMap a Map of terms and their frequencies
* @param vector List of terms and their frequencies for a doc/field
*/ | Adds terms and frequencies found in vector into the Map termFreqMap | addTermFrequencies | {
"repo_name": "martinstuga/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/common/lucene/search/XMoreLikeThis.java",
"license": "apache-2.0",
"size": 37463
} | [
"java.io.IOException",
"java.util.Map",
"org.apache.lucene.index.Terms"
] | import java.io.IOException; import java.util.Map; import org.apache.lucene.index.Terms; | import java.io.*; import java.util.*; import org.apache.lucene.index.*; | [
"java.io",
"java.util",
"org.apache.lucene"
] | java.io; java.util; org.apache.lucene; | 1,651,212 |
private List<CmsSelectWidgetOption> getFieldConfigurationWidgetConfiguration() {
List<CmsSelectWidgetOption> result = new ArrayList<CmsSelectWidgetOption>();
if (getSearchIndexIndex() instanceof CmsSolrIndex) {
List<CmsSolrFieldConfiguration> fieldConfigurations = m_searchManager.getFie... | List<CmsSelectWidgetOption> function() { List<CmsSelectWidgetOption> result = new ArrayList<CmsSelectWidgetOption>(); if (getSearchIndexIndex() instanceof CmsSolrIndex) { List<CmsSolrFieldConfiguration> fieldConfigurations = m_searchManager.getFieldConfigurationsSolr(); for (CmsSearchFieldConfiguration config : fieldCo... | /**
* Creates the options for the search field configuration.<p>
*
* @return the option list
*/ | Creates the options for the search field configuration | getFieldConfigurationWidgetConfiguration | {
"repo_name": "it-tavis/opencms-core",
"path": "src-modules/org/opencms/workplace/tools/searchindex/CmsEditSearchIndexDialog.java",
"license": "lgpl-2.1",
"size": 8822
} | [
"java.util.ArrayList",
"java.util.List",
"org.opencms.search.fields.CmsLuceneFieldConfiguration",
"org.opencms.search.fields.CmsSearchFieldConfiguration",
"org.opencms.search.solr.CmsSolrFieldConfiguration",
"org.opencms.search.solr.CmsSolrIndex",
"org.opencms.widgets.CmsSelectWidgetOption"
] | import java.util.ArrayList; import java.util.List; import org.opencms.search.fields.CmsLuceneFieldConfiguration; import org.opencms.search.fields.CmsSearchFieldConfiguration; import org.opencms.search.solr.CmsSolrFieldConfiguration; import org.opencms.search.solr.CmsSolrIndex; import org.opencms.widgets.CmsSelectWidget... | import java.util.*; import org.opencms.search.fields.*; import org.opencms.search.solr.*; import org.opencms.widgets.*; | [
"java.util",
"org.opencms.search",
"org.opencms.widgets"
] | java.util; org.opencms.search; org.opencms.widgets; | 765,191 |
public static String getGPIOForVoiceHatTrigger() {
switch (getBoardVariant()) {
case DEVICE_RPI3:
return "BCM16";
default:
throw new IllegalStateException("Unknown Build.DEVICE " + Build.DEVICE);
}
} | static String function() { switch (getBoardVariant()) { case DEVICE_RPI3: return "BCM16"; default: throw new IllegalStateException(STR + Build.DEVICE); } } | /**
* Return the GPIO pin for the Voice Hat DAC trigger.
*/ | Return the GPIO pin for the Voice Hat DAC trigger | getGPIOForVoiceHatTrigger | {
"repo_name": "odwdinc/AndroidThings-GoogleAssistant",
"path": "appEndpoint/src/main/java/com/example/androidthings/firebaseEndpoint/BoardDefaults.java",
"license": "apache-2.0",
"size": 4761
} | [
"android.os.Build"
] | import android.os.Build; | import android.os.*; | [
"android.os"
] | android.os; | 490,187 |
public void start() {
Intent intent = setDestinationClassName(new Intent());
mContext.startService(intent);
} | void function() { Intent intent = setDestinationClassName(new Intent()); mContext.startService(intent); } | /**
* Starts the invalidation client.
*/ | Starts the invalidation client | start | {
"repo_name": "zcbenz/cefode-chromium",
"path": "sync/android/java/src/org/chromium/sync/notifier/InvalidationController.java",
"license": "bsd-3-clause",
"size": 9399
} | [
"android.content.Intent"
] | import android.content.Intent; | import android.content.*; | [
"android.content"
] | android.content; | 1,510,373 |
@SuppressWarnings("deprecation")
private Object[] getParams(CxfEndpoint endpoint, Exchange exchange)
throws org.apache.camel.InvalidPayloadException {
Object[] params = null;
if (endpoint.getDataFormat() == DataFormat.POJO) {
Object body = exchange.getIn().getBody();
... | @SuppressWarnings(STR) Object[] function(CxfEndpoint endpoint, Exchange exchange) throws org.apache.camel.InvalidPayloadException { Object[] params = null; if (endpoint.getDataFormat() == DataFormat.POJO) { Object body = exchange.getIn().getBody(); if (body instanceof Object[]) { params = (Object[])body; } else if (bod... | /**
* Get the parameters for the web service operation
*/ | Get the parameters for the web service operation | getParams | {
"repo_name": "engagepoint/camel",
"path": "components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfProducer.java",
"license": "apache-2.0",
"size": 16229
} | [
"java.io.InputStream",
"java.util.Iterator",
"java.util.List",
"org.apache.camel.Exchange"
] | import java.io.InputStream; import java.util.Iterator; import java.util.List; import org.apache.camel.Exchange; | import java.io.*; import java.util.*; import org.apache.camel.*; | [
"java.io",
"java.util",
"org.apache.camel"
] | java.io; java.util; org.apache.camel; | 1,721,024 |
public boolean isSparseAndEmpty() throws DMLRuntimeException {
boolean isSparseAndAllocated = isAllocated() && LibMatrixCUDA.isInSparseFormat(getGPUContext(), mat);
boolean isEmptyAndSparseAndAllocated = isSparseAndAllocated && getJcudaSparseMatrixPtr().nnz == 0;
return isEmptyAndSparseAndAllocated;
} | boolean function() throws DMLRuntimeException { boolean isSparseAndAllocated = isAllocated() && LibMatrixCUDA.isInSparseFormat(getGPUContext(), mat); boolean isEmptyAndSparseAndAllocated = isSparseAndAllocated && getJcudaSparseMatrixPtr().nnz == 0; return isEmptyAndSparseAndAllocated; } | /**
* If this {@link GPUObject} is sparse and empty
* Being allocated is a prerequisite to being sparse and empty.
*
* @return true if sparse and empty
* @throws DMLRuntimeException if error
*/ | If this <code>GPUObject</code> is sparse and empty Being allocated is a prerequisite to being sparse and empty | isSparseAndEmpty | {
"repo_name": "asurve/arvind-sysml2",
"path": "src/main/java/org/apache/sysml/runtime/instructions/gpu/context/GPUObject.java",
"license": "apache-2.0",
"size": 35640
} | [
"org.apache.sysml.runtime.DMLRuntimeException",
"org.apache.sysml.runtime.matrix.data.LibMatrixCUDA"
] | import org.apache.sysml.runtime.DMLRuntimeException; import org.apache.sysml.runtime.matrix.data.LibMatrixCUDA; | import org.apache.sysml.runtime.*; import org.apache.sysml.runtime.matrix.data.*; | [
"org.apache.sysml"
] | org.apache.sysml; | 753,359 |
public boolean checkAuthentication(final HttpServletRequest request) {
return DEFAULT_CHECKAUTHENTICATION;
} | boolean function(final HttpServletRequest request) { return DEFAULT_CHECKAUTHENTICATION; } | /**
* method to check if user is authentificated.
*
* @param request current request
* @return true if is
*/ | method to check if user is authentificated | checkAuthentication | {
"repo_name": "uttmkl/etno",
"path": "sites/all/modules/CKFinder/ckfinder/_sources/CKFinder for Java/CKFinder/src/main/java/com/ckfinder/connector/configuration/Configuration.java",
"license": "gpl-2.0",
"size": 31569
} | [
"javax.servlet.http.HttpServletRequest"
] | import javax.servlet.http.HttpServletRequest; | import javax.servlet.http.*; | [
"javax.servlet"
] | javax.servlet; | 1,202,163 |
@NonNull
public ApiFuture<List<IosApp>> listIosAppsAsync() {
return iosAppService.listIosAppsAsync(projectId);
}
/**
* Creates a new iOS App in the associated Firebase project and returns an {@link IosApp} | ApiFuture<List<IosApp>> function() { return iosAppService.listIosAppsAsync(projectId); } /** * Creates a new iOS App in the associated Firebase project and returns an {@link IosApp} | /**
* Asynchronously lists all iOS Apps in the associated Firebase project, returning an {@code
* ApiFuture} of a list of {@link IosApp} references to each. This returned list is read-only and
* cannot be modified.
*
* @see IosApp
*/ | Asynchronously lists all iOS Apps in the associated Firebase project, returning an ApiFuture of a list of <code>IosApp</code> references to each. This returned list is read-only and cannot be modified | listIosAppsAsync | {
"repo_name": "firebase/firebase-admin-java",
"path": "src/main/java/com/google/firebase/projectmanagement/FirebaseProjectManagement.java",
"license": "apache-2.0",
"size": 10703
} | [
"com.google.api.core.ApiFuture",
"java.util.List"
] | import com.google.api.core.ApiFuture; import java.util.List; | import com.google.api.core.*; import java.util.*; | [
"com.google.api",
"java.util"
] | com.google.api; java.util; | 917,664 |
void removeProcessor(ProcessorNode processor); | void removeProcessor(ProcessorNode processor); | /**
* Removes the given processor from this group, destroying the Processor.
* The Processor is removed from the ProcessorRegistry, and any method in
* the Processor that is annotated with the
* {@link org.apache.nifi.processor.annotation.OnRemoved OnRemoved} annotation will be
* invoked. All o... | Removes the given processor from this group, destroying the Processor. The Processor is removed from the ProcessorRegistry, and any method in the Processor that is annotated with the <code>org.apache.nifi.processor.annotation.OnRemoved OnRemoved</code> annotation will be invoked. All outgoing connections will also be d... | removeProcessor | {
"repo_name": "apsaltis/nifi",
"path": "nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core-api/src/main/java/org/apache/nifi/groups/ProcessGroup.java",
"license": "apache-2.0",
"size": 34534
} | [
"org.apache.nifi.controller.ProcessorNode"
] | import org.apache.nifi.controller.ProcessorNode; | import org.apache.nifi.controller.*; | [
"org.apache.nifi"
] | org.apache.nifi; | 274,603 |
public static boolean available(int port) {
ServerSocket ss = null;
DatagramSocket ds = null;
try {
ss = new ServerSocket(port);
ss.setReuseAddress(true);
ds = new DatagramSocket(port);
ds.setReuseAddress(true);
return true;
} catch (IOException e) {
// Do nothing
... | static boolean function(int port) { ServerSocket ss = null; DatagramSocket ds = null; try { ss = new ServerSocket(port); ss.setReuseAddress(true); ds = new DatagramSocket(port); ds.setReuseAddress(true); return true; } catch (IOException e) { } finally { if (ds != null) { ds.close(); } if (ss != null) { try { ss.close(... | /**
* Checks to see if a specific port is available.
*
* @param port the port number to check for availability
* @return <tt>true</tt> if the port is available, or <tt>false</tt> if not
*/ | Checks to see if a specific port is available | available | {
"repo_name": "apurtell/hbase",
"path": "hbase-testing-util/src/main/java/org/apache/hadoop/hbase/HBaseTestingUtility.java",
"license": "apache-2.0",
"size": 169342
} | [
"java.io.IOException",
"java.net.DatagramSocket",
"java.net.ServerSocket"
] | import java.io.IOException; import java.net.DatagramSocket; import java.net.ServerSocket; | import java.io.*; import java.net.*; | [
"java.io",
"java.net"
] | java.io; java.net; | 2,074,808 |
BufferType preRead() throws RemoteException; | BufferType preRead() throws RemoteException; | /**
* Execute pre-read synchronization and preparation.
*
* Action performed before every read remote method invocation. It should
* update versioning and checkpoint counters appropriately and obtain
* required locks.
*
* @return a constant indicating which object to use for performing actual
* ... | Execute pre-read synchronization and preparation. Action performed before every read remote method invocation. It should update versioning and checkpoint counters appropriately and obtain required locks | preRead | {
"repo_name": "kondziu/AtomicRMI",
"path": "src/put/atomicrmi/optsva/objects/ObjectProxy.java",
"license": "gpl-3.0",
"size": 6316
} | [
"java.rmi.RemoteException"
] | import java.rmi.RemoteException; | import java.rmi.*; | [
"java.rmi"
] | java.rmi; | 1,013,622 |
void runJob(Long imagingSourceId,
File imageClinicalMappingFile,
ImageDataSourceMappingTypeEnum mappingType,
boolean mapOnly, boolean loadAimAnnotation);
| void runJob(Long imagingSourceId, File imageClinicalMappingFile, ImageDataSourceMappingTypeEnum mappingType, boolean mapOnly, boolean loadAimAnnotation); | /**
* Used to run the GenomicDataSource Job.
* @param imagingSourceId to retrieve imaging data for (asynchronously).
* @param imageClinicalMappingFile file to map.
* @param mappingType type of mapping for the image source.
* @param mapOnly to determine if it's only re-mapping the source.
... | Used to run the GenomicDataSource Job | runJob | {
"repo_name": "NCIP/caintegrator",
"path": "caintegrator-war/src/gov/nih/nci/caintegrator/web/ajax/IImagingDataSourceAjaxUpdater.java",
"license": "bsd-3-clause",
"size": 1228
} | [
"gov.nih.nci.caintegrator.application.study.ImageDataSourceMappingTypeEnum",
"java.io.File"
] | import gov.nih.nci.caintegrator.application.study.ImageDataSourceMappingTypeEnum; import java.io.File; | import gov.nih.nci.caintegrator.application.study.*; import java.io.*; | [
"gov.nih.nci",
"java.io"
] | gov.nih.nci; java.io; | 2,504,751 |
private void pointQueryCase3() throws ParseException, CQLException, IOException {
log.info("Running Point Query Case 3");
//First, we need to obtain the adapter for the SimpleFeature we want to query.
// We'll query basic-feature in this example.
//Obtain adapter for our "basic-featu... | void function() throws ParseException, CQLException, IOException { log.info(STR); ByteArrayId bfAdId = new ByteArrayId(STR); FeatureDataAdapter bfAdapter = (FeatureDataAdapter) adapterStore.getAdapter(bfAdId); String queryPolygonDefinition = STR + STR + STR + STR + STR + STR + "))"; Geometry queryPolygon = new WKTReade... | /**
* This query will use the world's Bounding Box together with a CQL filter.
*/ | This query will use the world's Bounding Box together with a CQL filter | pointQueryCase3 | {
"repo_name": "mses-bly/geowave",
"path": "examples/src/main/java/mil/nga/giat/geowave/examples/query/SpatialQueryExample.java",
"license": "apache-2.0",
"size": 26118
} | [
"com.vividsolutions.jts.geom.Geometry",
"com.vividsolutions.jts.io.ParseException",
"com.vividsolutions.jts.io.WKTReader",
"java.io.IOException",
"mil.nga.giat.geowave.adapter.vector.FeatureDataAdapter",
"mil.nga.giat.geowave.core.geotime.IndexType",
"mil.nga.giat.geowave.core.geotime.store.query.Spatia... | import com.vividsolutions.jts.geom.Geometry; import com.vividsolutions.jts.io.ParseException; import com.vividsolutions.jts.io.WKTReader; import java.io.IOException; import mil.nga.giat.geowave.adapter.vector.FeatureDataAdapter; import mil.nga.giat.geowave.core.geotime.IndexType; import mil.nga.giat.geowave.core.geotim... | import com.vividsolutions.jts.geom.*; import com.vividsolutions.jts.io.*; import java.io.*; import mil.nga.giat.geowave.adapter.vector.*; import mil.nga.giat.geowave.core.geotime.*; import mil.nga.giat.geowave.core.geotime.store.query.*; import mil.nga.giat.geowave.core.index.*; import mil.nga.giat.geowave.core.store.*... | [
"com.vividsolutions.jts",
"java.io",
"mil.nga.giat",
"org.geotools.filter",
"org.geotools.geometry",
"org.opengis.feature"
] | com.vividsolutions.jts; java.io; mil.nga.giat; org.geotools.filter; org.geotools.geometry; org.opengis.feature; | 1,507,887 |
public void writeChar(char value) throws IOException; | void function(char value) throws IOException; | /**
* Writes a char value.
* @param value the char value to write
* @exception IOException on an IO error
*/ | Writes a char value | writeChar | {
"repo_name": "jmaassen/AetherIO",
"path": "src/nl/esciencecenter/aether/io/DataOutput.java",
"license": "apache-2.0",
"size": 6740
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,840,311 |
public Set<String> getDeploymentGroups() {
if (deploymentGroups.isEmpty()) {
return Collections.singleton(DEFAULT_DEPLOYMENT_GROUP);
} else {
return new HashSet<>(deploymentGroups);
}
} | Set<String> function() { if (deploymentGroups.isEmpty()) { return Collections.singleton(DEFAULT_DEPLOYMENT_GROUP); } else { return new HashSet<>(deploymentGroups); } } | /**
* Gets the deployment group of this element instance.
*
* @return a deployment group name
*/ | Gets the deployment group of this element instance | getDeploymentGroups | {
"repo_name": "structurizr/java",
"path": "structurizr-core/src/com/structurizr/model/StaticStructureElementInstance.java",
"license": "apache-2.0",
"size": 7954
} | [
"java.util.Collections",
"java.util.HashSet",
"java.util.Set"
] | import java.util.Collections; import java.util.HashSet; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 269,041 |
public synchronized final Map<K, V> snapshot() {
return new LinkedHashMap<K, V>(map);
} | synchronized final Map<K, V> function() { return new LinkedHashMap<K, V>(map); } | /**
* Returns a copy of the current contents of the cache, ordered from least
* recently accessed to most recently accessed.
*/ | Returns a copy of the current contents of the cache, ordered from least recently accessed to most recently accessed | snapshot | {
"repo_name": "chenakam/scala-lang",
"path": "src/main/java/hobby/wei/c/tool/LruCache.java",
"license": "apache-2.0",
"size": 12973
} | [
"java.util.LinkedHashMap",
"java.util.Map"
] | import java.util.LinkedHashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,236,537 |
public static Date getDate(String dateString) {
if (dateString == null || dateString.equals(""))
return null;
LocalDate localDate = getLocalDate(dateString);
return toDate(localDate);
} | static Date function(String dateString) { if (dateString == null dateString.equals("")) return null; LocalDate localDate = getLocalDate(dateString); return toDate(localDate); } | /**
* Ubah java.lang.String menjadi java.sql.Date.<br />
* Menggunakan "-" sebagai delimeter.
*
* @param dateString format = yyyy/MM/dd
*
* @return tanggal
*/ | Ubah java.lang.String menjadi java.sql.Date. Menggunakan "-" sebagai delimeter | getDate | {
"repo_name": "uvsystem/rumkit-java-client",
"path": "src/main/java/com/dbsys/rs/client/DateUtil.java",
"license": "apache-2.0",
"size": 16186
} | [
"java.sql.Date",
"java.time.LocalDate"
] | import java.sql.Date; import java.time.LocalDate; | import java.sql.*; import java.time.*; | [
"java.sql",
"java.time"
] | java.sql; java.time; | 956,317 |
public static JFreeChart createXYStepChart(String title,
String xAxisLabel,
String yAxisLabel,
XYDataset dataset,
PlotOrient... | static JFreeChart function(String title, String xAxisLabel, String yAxisLabel, XYDataset dataset, PlotOrientation orientation, boolean legend, boolean tooltips, boolean urls) { if (orientation == null) { throw new IllegalArgumentException(STR); } DateAxis xAxis = new DateAxis(xAxisLabel); NumberAxis yAxis = new NumberA... | /**
* Creates a stepped XY plot with default settings.
*
* @param title the chart title (<code>null</code> permitted).
* @param xAxisLabel a label for the X-axis (<code>null</code> permitted).
* @param yAxisLabel a label for the Y-axis (<code>null</code> permitted).
* @param datas... | Creates a stepped XY plot with default settings | createXYStepChart | {
"repo_name": "fluidware/Eastwood-Charts",
"path": "source/org/jfree/chart/ChartFactory.java",
"license": "lgpl-2.1",
"size": 102933
} | [
"org.jfree.chart.axis.DateAxis",
"org.jfree.chart.axis.NumberAxis",
"org.jfree.chart.labels.StandardXYToolTipGenerator",
"org.jfree.chart.labels.XYToolTipGenerator",
"org.jfree.chart.plot.PlotOrientation",
"org.jfree.chart.plot.XYPlot",
"org.jfree.chart.renderer.xy.XYItemRenderer",
"org.jfree.chart.re... | import org.jfree.chart.axis.DateAxis; import org.jfree.chart.axis.NumberAxis; import org.jfree.chart.labels.StandardXYToolTipGenerator; import org.jfree.chart.labels.XYToolTipGenerator; import org.jfree.chart.plot.PlotOrientation; import org.jfree.chart.plot.XYPlot; import org.jfree.chart.renderer.xy.XYItemRenderer; im... | import org.jfree.chart.axis.*; import org.jfree.chart.labels.*; import org.jfree.chart.plot.*; import org.jfree.chart.renderer.xy.*; import org.jfree.chart.urls.*; import org.jfree.data.xy.*; | [
"org.jfree.chart",
"org.jfree.data"
] | org.jfree.chart; org.jfree.data; | 1,519,728 |
public final String join(
@Nullable Object first, @Nullable Object second, Object... rest) {
return join(iterable(first, second, rest));
} | final String function( @Nullable Object first, @Nullable Object second, Object... rest) { return join(iterable(first, second, rest)); } | /**
* Returns a string containing the string representation of each argument,
* using the previously configured separator between each.
*/ | Returns a string containing the string representation of each argument, using the previously configured separator between each | join | {
"repo_name": "biddyweb/checker-framework",
"path": "checker/jdk/nullness/src/com/google/common/base/Joiner.java",
"license": "gpl-2.0",
"size": 11846
} | [
"org.checkerframework.checker.nullness.qual.Nullable"
] | import org.checkerframework.checker.nullness.qual.Nullable; | import org.checkerframework.checker.nullness.qual.*; | [
"org.checkerframework.checker"
] | org.checkerframework.checker; | 87,527 |
public void readBIF(InputStream instream) throws BIFFormatException {
BIFParser bp = new BIFParser(instream, m_nodes, m_edges);
try {
graphID = bp.parse();
} catch(BIFFormatException bf) {
System.out.println("BIF format error");
bf.printStackTrace();
}
catch(Exception ex) { ex.pr... | void function(InputStream instream) throws BIFFormatException { BIFParser bp = new BIFParser(instream, m_nodes, m_edges); try { graphID = bp.parse(); } catch(BIFFormatException bf) { System.out.println(STR); bf.printStackTrace(); } catch(Exception ex) { ex.printStackTrace(); return; } setAppropriateNodeSize(); if(m_le!... | /**
*
* BIF reader<br>
* Reads a graph description in XMLBIF03 from an InputStrem
*
*
*/ | BIF reader Reads a graph description in XMLBIF03 from an InputStrem | readBIF | {
"repo_name": "dsibournemouth/autoweka",
"path": "weka-3.7.7/src/main/java/weka/gui/graphvisualizer/GraphVisualizer.java",
"license": "gpl-3.0",
"size": 52507
} | [
"java.io.InputStream"
] | import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,671,779 |
@SuppressWarnings("unchecked")
public T get(long id) {
int i = Arrays.binarySearch(ids, 0, size, id);
if (i < 0) {
return null;
} else {
return (T) values[i];
}
} | @SuppressWarnings(STR) T function(long id) { int i = Arrays.binarySearch(ids, 0, size, id); if (i < 0) { return null; } else { return (T) values[i]; } } | /**
* Gets an object by ID.
* @param id
* @return
*/ | Gets an object by ID | get | {
"repo_name": "arthurpitman/android-common",
"path": "src/com/arthurpitman/common/data/ResultSet.java",
"license": "apache-2.0",
"size": 3066
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 581,291 |
public BigDecimal getPaymentAmount() {
return paymentAmount;
} | BigDecimal function() { return paymentAmount; } | /**
* Gets the paymentAmount attribute.
*
* @return Returns the paymentAmount
*/ | Gets the paymentAmount attribute | getPaymentAmount | {
"repo_name": "quikkian-ua-devops/will-financials",
"path": "kfs-ar/src/main/java/org/kuali/kfs/module/ar/report/ContractsGrantsPaymentHistoryReportDetailDataHolder.java",
"license": "agpl-3.0",
"size": 7486
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 1,002,334 |
public Class<? extends Activity> get(Game game) throws IllegalArgumentException; | Class<? extends Activity> function(Game game) throws IllegalArgumentException; | /**
* Inspect which annotator activity has to return based on the specified {@code game} parameter.
*
* @param game
* A Game associated with some annotator Activity.
*
* @return The corresponding annotator activity for the specified {@code game}.
*
* @throws IllegalArgume... | Inspect which annotator activity has to return based on the specified game parameter | get | {
"repo_name": "barriosnahuel/magic-annotator_android",
"path": "src/main/java/com/nbempire/android/magicannotator/service/AnnotatorService.java",
"license": "gpl-3.0",
"size": 2652
} | [
"android.app.Activity",
"com.nbempire.android.magicannotator.domain.game.Game"
] | import android.app.Activity; import com.nbempire.android.magicannotator.domain.game.Game; | import android.app.*; import com.nbempire.android.magicannotator.domain.game.*; | [
"android.app",
"com.nbempire.android"
] | android.app; com.nbempire.android; | 1,637,237 |
public static <K, V> HashMap<K, V> newHashMap(int expSize) {
return new HashMap<>(capacity(expSize));
} | static <K, V> HashMap<K, V> function(int expSize) { return new HashMap<>(capacity(expSize)); } | /**
* Creates new {@link HashMap} with expected size.
*
* @param expSize Expected size of created map.
* @param <K> Type of map keys.
* @param <V> Type of map values.
* @return New map.
*/ | Creates new <code>HashMap</code> with expected size | newHashMap | {
"repo_name": "pperalta/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java",
"license": "apache-2.0",
"size": 314980
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 1,151,918 |
public String[] getColumnHeaders() {
if (columnHeaders == null) {
return null;
}
final String[] headers = new String[visibleColumns.size()];
int i = 0;
for (final Iterator<Object> it = visibleColumns.iterator(); it
.hasNext(); i++) {
he... | String[] function() { if (columnHeaders == null) { return null; } final String[] headers = new String[visibleColumns.size()]; int i = 0; for (final Iterator<Object> it = visibleColumns.iterator(); it .hasNext(); i++) { headers[i] = getColumnHeader(it.next()); } return headers; } | /**
* Gets the headers of the columns.
*
* <p>
* The headers match the property id:s given by the set visible column
* headers. The table must be set in either
* {@link #COLUMN_HEADER_MODE_EXPLICIT} or
* {@link #COLUMN_HEADER_MODE_EXPLICIT_DEFAULTS_ID} mode to show the
* headers... | Gets the headers of the columns. The headers match the property id:s given by the set visible column headers. The table must be set in either <code>#COLUMN_HEADER_MODE_EXPLICIT</code> or <code>#COLUMN_HEADER_MODE_EXPLICIT_DEFAULTS_ID</code> mode to show the headers. In the defaults mode any nulls in the headers array a... | getColumnHeaders | {
"repo_name": "jdahlstrom/vaadin.react",
"path": "server/src/main/java/com/vaadin/ui/Table.java",
"license": "apache-2.0",
"size": 223299
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 755,764 |
@Override
public boolean isEnabled(final Level level, final Marker marker, final Object message, final Throwable t) {
return logger.isEnabled(level, marker, message, t);
} | boolean function(final Level level, final Marker marker, final Object message, final Throwable t) { return logger.isEnabled(level, marker, message, t); } | /**
* Detect if the event would be logged.
*
* @param level The logging Level to check.
* @param marker A Marker or null.
* @param message The message.
* @param t A Throwable.
* @return true if the event would be logged for the Level, Marker, Object and Throwable, false otherwise.
... | Detect if the event would be logged | isEnabled | {
"repo_name": "xnslong/logging-log4j2",
"path": "log4j-api/src/main/java/org/apache/logging/log4j/spi/ExtendedLoggerWrapper.java",
"license": "apache-2.0",
"size": 8579
} | [
"org.apache.logging.log4j.Level",
"org.apache.logging.log4j.Marker"
] | import org.apache.logging.log4j.Level; import org.apache.logging.log4j.Marker; | import org.apache.logging.log4j.*; | [
"org.apache.logging"
] | org.apache.logging; | 1,001,400 |
public SqlDialect getSqlDialect() {
return SqlDialect.valueOf(getConfiguration().getString(TableConfigOptions.TABLE_SQL_DIALECT).toUpperCase());
} | SqlDialect function() { return SqlDialect.valueOf(getConfiguration().getString(TableConfigOptions.TABLE_SQL_DIALECT).toUpperCase()); } | /**
* Returns the current SQL dialect.
*/ | Returns the current SQL dialect | getSqlDialect | {
"repo_name": "tzulitai/flink",
"path": "flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/api/TableConfig.java",
"license": "apache-2.0",
"size": 11949
} | [
"org.apache.flink.table.api.config.TableConfigOptions"
] | import org.apache.flink.table.api.config.TableConfigOptions; | import org.apache.flink.table.api.config.*; | [
"org.apache.flink"
] | org.apache.flink; | 1,532,346 |
private MessageMap buildReplaceErrorMap() {
MessageMap testMap = new MessageMap();
testMap.putError("accountNbr", RiceKeyConstants.ERROR_INACTIVE, "Account Number");
testMap.putError("accountNbr", RiceKeyConstants.ERROR_REQUIRED, "Account Number");
testMap.putError("chartCode", RiceKey... | MessageMap function() { MessageMap testMap = new MessageMap(); testMap.putError(STR, RiceKeyConstants.ERROR_INACTIVE, STR); testMap.putError(STR, RiceKeyConstants.ERROR_REQUIRED, STR); testMap.putError(STR, RiceKeyConstants.ERROR_REQUIRED, STR); return testMap; } | /**
* create a test error map
*
* @return a MessageMap with test entries
*/ | create a test error map | buildReplaceErrorMap | {
"repo_name": "bhutchinson/rice",
"path": "rice-framework/krad-app-framework/src/test/java/org/kuali/rice/krad/util/MessageMapTest.java",
"license": "apache-2.0",
"size": 17538
} | [
"org.kuali.rice.core.api.util.RiceKeyConstants"
] | import org.kuali.rice.core.api.util.RiceKeyConstants; | import org.kuali.rice.core.api.util.*; | [
"org.kuali.rice"
] | org.kuali.rice; | 267,760 |
@Test
public void testFillInt() {
assertEquals("", Text.fill(0));
assertEquals(" ", Text.fill(1));
assertEquals(" ", Text.fill(2));
}
| void function() { assertEquals(STR STR ", Text.fill(2)); } | /**
* Unit tests for the fillInt() method of Text object.
*/ | Unit tests for the fillInt() method of Text object | testFillInt | {
"repo_name": "Martin-Spamer/java-coaching",
"path": "src/test/java/coaching/text/TextTest.java",
"license": "gpl-3.0",
"size": 3788
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 1,994,684 |
public static List<String> toList(CharSequence self) {
String s = self.toString();
int size = s.length();
List<String> answer = new ArrayList<String>(size);
for (int i = 0; i < size; i++) {
answer.add(s.substring(i, i + 1));
}
return answer;
} | static List<String> function(CharSequence self) { String s = self.toString(); int size = s.length(); List<String> answer = new ArrayList<String>(size); for (int i = 0; i < size; i++) { answer.add(s.substring(i, i + 1)); } return answer; } | /**
* Converts the given CharSequence into a List of Strings of one character.
*
* @param self a CharSequence
* @return a List of characters (a 1-character String)
* @see #toSet(String)
* @since 1.8.2
*/ | Converts the given CharSequence into a List of Strings of one character | toList | {
"repo_name": "pledbrook/incubator-groovy",
"path": "src/main/org/codehaus/groovy/runtime/StringGroovyMethods.java",
"license": "apache-2.0",
"size": 142054
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,893,647 |
@Test
public void testReindexSyncMissingProvider() throws Exception {
EditorHook hook = new EditorHook(new IndexUpdateProvider(
emptyProvider()));
NodeState before = builder.getNodeState();
createIndexDefinition(builder.child(INDEX_DEFINITIONS_NAME),
"roo... | void function() throws Exception { EditorHook hook = new EditorHook(new IndexUpdateProvider( emptyProvider())); NodeState before = builder.getNodeState(); createIndexDefinition(builder.child(INDEX_DEFINITIONS_NAME), STR, true, false, ImmutableSet.of("foo"), null); builder.child(INDEX_DEFINITIONS_NAME).child(STR); build... | /**
* OAK-2203 Test reindex behavior on a sync index when the index provider is missing
* for a given type
*/ | OAK-2203 Test reindex behavior on a sync index when the index provider is missing for a given type | testReindexSyncMissingProvider | {
"repo_name": "mreutegg/jackrabbit-oak",
"path": "oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/index/IndexUpdateTest.java",
"license": "apache-2.0",
"size": 47567
} | [
"com.google.common.collect.ImmutableSet",
"org.apache.jackrabbit.oak.api.PropertyState",
"org.apache.jackrabbit.oak.api.Type",
"org.apache.jackrabbit.oak.plugins.index.IndexUtils",
"org.apache.jackrabbit.oak.spi.commit.CommitInfo",
"org.apache.jackrabbit.oak.spi.commit.EditorHook",
"org.apache.jackrabbi... | import com.google.common.collect.ImmutableSet; import org.apache.jackrabbit.oak.api.PropertyState; import org.apache.jackrabbit.oak.api.Type; import org.apache.jackrabbit.oak.plugins.index.IndexUtils; import org.apache.jackrabbit.oak.spi.commit.CommitInfo; import org.apache.jackrabbit.oak.spi.commit.EditorHook; import ... | import com.google.common.collect.*; import org.apache.jackrabbit.oak.api.*; import org.apache.jackrabbit.oak.plugins.index.*; import org.apache.jackrabbit.oak.spi.commit.*; import org.apache.jackrabbit.oak.spi.state.*; import org.junit.*; | [
"com.google.common",
"org.apache.jackrabbit",
"org.junit"
] | com.google.common; org.apache.jackrabbit; org.junit; | 283,294 |
public Object addToEnvironment(String propName, Object propVal)
throws NamingException {
return dirContext.addToEnvironment(propName, propVal);
} | Object function(String propName, Object propVal) throws NamingException { return dirContext.addToEnvironment(propName, propVal); } | /**
* Adds a new environment property to the environment of this context. If
* the property already exists, its value is overwritten.
*
* @param propName the name of the environment property to add; may not
* be null
* @param propVal the value of the property to add; may not be null
... | Adds a new environment property to the environment of this context. If the property already exists, its value is overwritten | addToEnvironment | {
"repo_name": "NorthFacing/step-by-Java",
"path": "fra-tomcat/fra-tomcat-analysis/source/book01/HowTomcatWorks/src/org/apache/naming/resources/ProxyDirContext.java",
"license": "gpl-2.0",
"size": 57358
} | [
"javax.naming.NamingException"
] | import javax.naming.NamingException; | import javax.naming.*; | [
"javax.naming"
] | javax.naming; | 2,842,578 |
@JsonIgnore
public static WordVertex extractPattern(Set<WordVertex> vertices) {
// 1) For each node, get the primary path to the root node TODO: THIS MAY CAUSE A HIGHER ANCESTOR TO BE FOUND
HashMap<WordVertex, List<Object>> paths = new HashMap<WordVertex, List<Object>>();
for (WordVertex wv: vertices) {
... | static WordVertex function(Set<WordVertex> vertices) { HashMap<WordVertex, List<Object>> paths = new HashMap<WordVertex, List<Object>>(); for (WordVertex wv: vertices) { paths.put(wv, wv.getPathToRoot()); } WordVertex commonRoot = WordVertex.getLowestCommonAncestor(paths); WordVertex resultRoot = new WordVertex(commonR... | /**
* Returns a subgraph from the root object containing all of the vertices
* Assumptions: - All vertices are in the same graph
* - Root node is reachable from the each vertex
* @param vertices
* @return
*/ | Returns a subgraph from the root object containing all of the vertices Assumptions: - All vertices are in the same graph - Root node is reachable from the each vertex | extractPattern | {
"repo_name": "RealsearchGroup/REDE",
"path": "application/src/edu/ncsu/csc/nl/model/WordVertex.java",
"license": "apache-2.0",
"size": 49201
} | [
"java.util.HashMap",
"java.util.List",
"java.util.Set"
] | import java.util.HashMap; import java.util.List; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,196,659 |
protected void extractPaymentsForCampus(String campusCode, Person puser, Date processRunDate, boolean immediateOnly) {
if (LOG.isDebugEnabled()) {
LOG.debug("extractPaymentsForCampus() started for campus: " + campusCode);
}
Batch batch = createBatch(campusCode, puser, processRun... | void function(String campusCode, Person puser, Date processRunDate, boolean immediateOnly) { if (LOG.isDebugEnabled()) { LOG.debug(STR + campusCode); } Batch batch = createBatch(campusCode, puser, processRunDate); Integer count = 0; KualiDecimal totalAmount = KualiDecimal.ZERO; Totals totals = extractSpecialPaymentsFor... | /**
* Handle a single campus
*
* @param campusCode
* @param puser
* @param processRunDate
*/ | Handle a single campus | extractPaymentsForCampus | {
"repo_name": "quikkian-ua-devops/will-financials",
"path": "kfs-purap/src/main/java/org/kuali/kfs/module/purap/service/impl/PdpExtractServiceImpl.java",
"license": "agpl-3.0",
"size": 53832
} | [
"java.util.Date",
"org.kuali.kfs.pdp.businessobject.Batch",
"org.kuali.rice.core.api.util.type.KualiDecimal",
"org.kuali.rice.core.api.util.type.KualiInteger",
"org.kuali.rice.kim.api.identity.Person"
] | import java.util.Date; import org.kuali.kfs.pdp.businessobject.Batch; import org.kuali.rice.core.api.util.type.KualiDecimal; import org.kuali.rice.core.api.util.type.KualiInteger; import org.kuali.rice.kim.api.identity.Person; | import java.util.*; import org.kuali.kfs.pdp.businessobject.*; import org.kuali.rice.core.api.util.type.*; import org.kuali.rice.kim.api.identity.*; | [
"java.util",
"org.kuali.kfs",
"org.kuali.rice"
] | java.util; org.kuali.kfs; org.kuali.rice; | 241,166 |
public void write(int bval) throws IOException
{
byte[] b = new byte[1];
b[0] = (byte) bval;
write(b, 0, 1);
} | void function(int bval) throws IOException { byte[] b = new byte[1]; b[0] = (byte) bval; write(b, 0, 1); } | /**
* Writes a single byte to the compressed output stream.
* @param bval the byte value.
*/ | Writes a single byte to the compressed output stream | write | {
"repo_name": "sorlok/ornagai-mobile",
"path": "src/net/sf/jazzlib/DeflaterOutputStream.java",
"license": "mit",
"size": 5974
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 971,584 |
public void driveStraight(double speed){
kP = SmartDashboard.getNumber("Drive kP");
kI = SmartDashboard.getNumber("Drive kI");
kD = SmartDashboard.getNumber("Drive kD");
double currentAngle = RobotMap.gyro.getAngle();
double error = -currentAngle;
integral += error;
if(Math.abs(currentAngle) < PIDTo... | void function(double speed){ kP = SmartDashboard.getNumber(STR); kI = SmartDashboard.getNumber(STR); kD = SmartDashboard.getNumber(STR); double currentAngle = RobotMap.gyro.getAngle(); double error = -currentAngle; integral += error; if(Math.abs(currentAngle) < PIDTolerance){ integral = 0; error = 0; } derivative = err... | /**
* Drive the robot straight, using a gryo and a PID loop to correct for errors
* @param speed to drive
*/ | Drive the robot straight, using a gryo and a PID loop to correct for errors | driveStraight | {
"repo_name": "FRCTeam1719/2016Robot",
"path": "2016Robot/src/org/usfirst/frc/team1719/robot/subsystems/DriveSubsystem.java",
"license": "unlicense",
"size": 2789
} | [
"edu.wpi.first.wpilibj.smartdashboard.SmartDashboard",
"org.usfirst.frc.team1719.robot.RobotMap"
] | import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard; import org.usfirst.frc.team1719.robot.RobotMap; | import edu.wpi.first.wpilibj.smartdashboard.*; import org.usfirst.frc.team1719.robot.*; | [
"edu.wpi.first",
"org.usfirst.frc"
] | edu.wpi.first; org.usfirst.frc; | 1,679,985 |
public PDStream getFontFile3()
{
PDStream retval = null;
COSBase obj = dic.getDictionaryObject(COSName.FONT_FILE3);
if (obj instanceof COSStream)
{
retval = new PDStream((COSStream) obj);
}
return retval;
} | PDStream function() { PDStream retval = null; COSBase obj = dic.getDictionaryObject(COSName.FONT_FILE3); if (obj instanceof COSStream) { retval = new PDStream((COSStream) obj); } return retval; } | /**
* A stream containing a font program that is not true type or type 1.
*
* @return A stream containing a font program.
*/ | A stream containing a font program that is not true type or type 1 | getFontFile3 | {
"repo_name": "benmccann/pdfbox",
"path": "pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/PDFontDescriptor.java",
"license": "apache-2.0",
"size": 20541
} | [
"org.apache.pdfbox.cos.COSBase",
"org.apache.pdfbox.cos.COSName",
"org.apache.pdfbox.cos.COSStream",
"org.apache.pdfbox.pdmodel.common.PDStream"
] | import org.apache.pdfbox.cos.COSBase; import org.apache.pdfbox.cos.COSName; import org.apache.pdfbox.cos.COSStream; import org.apache.pdfbox.pdmodel.common.PDStream; | import org.apache.pdfbox.cos.*; import org.apache.pdfbox.pdmodel.common.*; | [
"org.apache.pdfbox"
] | org.apache.pdfbox; | 2,693,092 |
@Override
protected boolean parseLine(String line) throws ParseException {
boolean lineHasProvidesOrRequires = false;
// Quick sanity check that will catch most cases. This is a performance
// win for people with a lot of JS.
if (line.contains("provide")
|| line.contains("require")
... | boolean function(String line) throws ParseException { boolean lineHasProvidesOrRequires = false; if (line.contains(STR) line.contains(STR) line.contains(STR) line.contains(STR)) { googMatcher.reset(line); while (googMatcher.find()) { lineHasProvidesOrRequires = true; if (includeGoogBase && !fileHasProvidesOrRequires) {... | /**
* Parses a line of JavaScript, extracting goog.provide and goog.require
* information.
*/ | Parses a line of JavaScript, extracting goog.provide and goog.require information | parseLine | {
"repo_name": "ralic/closure-compiler",
"path": "src/com/google/javascript/jscomp/deps/JsFileParser.java",
"license": "apache-2.0",
"size": 6715
} | [
"com.google.common.base.CharMatcher"
] | import com.google.common.base.CharMatcher; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 82,400 |
public Observable<Entry<T, S>> nearest(final Point p, final double maxDistance, int maxCount) {
return nearest(p.mbr(), maxDistance, maxCount);
} | Observable<Entry<T, S>> function(final Point p, final double maxDistance, int maxCount) { return nearest(p.mbr(), maxDistance, maxCount); } | /**
* Returns the nearest k entries (k=maxCount) to the given point where the
* entries are strictly less than a given maximum distance from the point.
*
* @param p
* point
* @param maxDistance
* max distance of returned entries from the point
* @param maxC... | Returns the nearest k entries (k=maxCount) to the given point where the entries are strictly less than a given maximum distance from the point | nearest | {
"repo_name": "lhyqie/rtree",
"path": "src/main/java/com/github/davidmoten/rtree/RTree.java",
"license": "apache-2.0",
"size": 28709
} | [
"com.github.davidmoten.rtree.geometry.Point"
] | import com.github.davidmoten.rtree.geometry.Point; | import com.github.davidmoten.rtree.geometry.*; | [
"com.github.davidmoten"
] | com.github.davidmoten; | 1,799,935 |
public static iodMSBType fromPerAligned(byte[] encodedBytes) {
iodMSBType result = new iodMSBType();
result.decodePerAligned(new BitStreamReader(encodedBytes));
return result;
} | static iodMSBType function(byte[] encodedBytes) { iodMSBType result = new iodMSBType(); result.decodePerAligned(new BitStreamReader(encodedBytes)); return result; } | /**
* Creates a new iodMSBType from encoded stream.
*/ | Creates a new iodMSBType from encoded stream | fromPerAligned | {
"repo_name": "google/supl-client",
"path": "src/main/java/com/google/location/suplclient/asn1/supl2/rrlp_components_ver12/GANSSSatelliteElement.java",
"license": "apache-2.0",
"size": 28794
} | [
"com.google.location.suplclient.asn1.base.BitStreamReader"
] | import com.google.location.suplclient.asn1.base.BitStreamReader; | import com.google.location.suplclient.asn1.base.*; | [
"com.google.location"
] | com.google.location; | 2,064,238 |
public static float getDescendantCoordRelativeToAncestor(View descendant, View ancestor,
float[] coord, boolean includeRootScroll, boolean ignoreTransform) {
float scale = 1.0f;
View v = descendant;
while(v != ancestor && v != null) {
// For TextViews, scroll has a me... | static float function(View descendant, View ancestor, float[] coord, boolean includeRootScroll, boolean ignoreTransform) { float scale = 1.0f; View v = descendant; while(v != ancestor && v != null) { if (v != descendant includeRootScroll) { offsetPoints(coord, -v.getScrollX(), -v.getScrollY()); } if (!ignoreTransform) ... | /**
* Given a coordinate relative to the descendant, find the coordinate in a parent view's
* coordinates.
*
* @param descendant The descendant to which the passed coordinate is relative.
* @param ancestor The root view to make the coordinates relative to.
* @param coord The coordinate tha... | Given a coordinate relative to the descendant, find the coordinate in a parent view's coordinates | getDescendantCoordRelativeToAncestor | {
"repo_name": "Deletescape-Media/Lawnchair",
"path": "src/com/android/launcher3/Utilities.java",
"license": "gpl-3.0",
"size": 28193
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 2,614,714 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.