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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
ConfigurableFileCollection files(Object... paths); | ConfigurableFileCollection files(Object... paths); | /**
* <p>Returns a {@link ConfigurableFileCollection} containing the given files. This works as described for {@link
* Project#files(Object...)}. Relative paths are resolved relative to the directory containing this script.</p>
*
* @param paths The paths to the files. May be empty.
* @return Th... | Returns a <code>ConfigurableFileCollection</code> containing the given files. This works as described for <code>Project#files(Object...)</code>. Relative paths are resolved relative to the directory containing this script | files | {
"repo_name": "tkmnet/RCRS-ADF",
"path": "gradle/gradle-2.1/src/core/org/gradle/api/Script.java",
"license": "bsd-2-clause",
"size": 14585
} | [
"org.gradle.api.file.ConfigurableFileCollection"
] | import org.gradle.api.file.ConfigurableFileCollection; | import org.gradle.api.file.*; | [
"org.gradle.api"
] | org.gradle.api; | 2,337,059 |
public ScaleTwoDecimal getSumDirectCostAmountFromPeriods() {
ScaleTwoDecimal amount = ScaleTwoDecimal.ZERO;
for (final BudgetPeriod period : this.getBudgetPeriods()) {
amount = amount.add(period.getTotalDirectCost());
}
return amount;
} | ScaleTwoDecimal function() { ScaleTwoDecimal amount = ScaleTwoDecimal.ZERO; for (final BudgetPeriod period : this.getBudgetPeriods()) { amount = amount.add(period.getTotalDirectCost()); } return amount; } | /**
* Gets the sum of the Direct Cost Amount for all budget periods.
* @return the amount
*/ | Gets the sum of the Direct Cost Amount for all budget periods | getSumDirectCostAmountFromPeriods | {
"repo_name": "rashikpolus/MIT_KC",
"path": "coeus-impl/src/main/java/org/kuali/kra/award/budget/AwardBudgetExt.java",
"license": "agpl-3.0",
"size": 16195
} | [
"org.kuali.coeus.common.budget.framework.period.BudgetPeriod",
"org.kuali.coeus.sys.api.model.ScaleTwoDecimal"
] | import org.kuali.coeus.common.budget.framework.period.BudgetPeriod; import org.kuali.coeus.sys.api.model.ScaleTwoDecimal; | import org.kuali.coeus.common.budget.framework.period.*; import org.kuali.coeus.sys.api.model.*; | [
"org.kuali.coeus"
] | org.kuali.coeus; | 1,793,181 |
public List<Object> getMetadata() { return metadata; } | public List<Object> getMetadata() { return metadata; } | /**
* Returns the collection of annotations to delete when unregistered.
*
* @return See above
*/ | Returns the collection of annotations to delete when unregistered | getToDelete | {
"repo_name": "knabar/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/util/DataObjectRegistration.java",
"license": "gpl-2.0",
"size": 3590
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,357,736 |
public void setPlayer(@Nullable ExoPlayer player) {
if (player == this.player) {
return;
}
if (this.player != null) {
if (surface != null) {
this.player.clearVideoSurface(surface);
}
this.player.clearVideoFrameMetadataListener(renderer);
}
this.player = player;
... | void function(@Nullable ExoPlayer player) { if (player == this.player) { return; } if (this.player != null) { if (surface != null) { this.player.clearVideoSurface(surface); } this.player.clearVideoFrameMetadataListener(renderer); } this.player = player; if (this.player != null) { this.player.setVideoFrameMetadataListen... | /**
* Attaches or detaches (if {@code player} is {@code null}) this view from the player.
*
* @param player The new player, or {@code null} to detach this view.
*/ | Attaches or detaches (if player is null) this view from the player | setPlayer | {
"repo_name": "androidx/media",
"path": "demos/gl/src/main/java/androidx/media3/demo/gl/VideoProcessingGLSurfaceView.java",
"license": "apache-2.0",
"size": 10383
} | [
"androidx.annotation.Nullable",
"androidx.media3.exoplayer.ExoPlayer"
] | import androidx.annotation.Nullable; import androidx.media3.exoplayer.ExoPlayer; | import androidx.annotation.*; import androidx.media3.exoplayer.*; | [
"androidx.annotation",
"androidx.media3"
] | androidx.annotation; androidx.media3; | 1,410,189 |
public final void configure(Option pragma) {
final String options[] = pragma.tokenizeContents();
String params[];
for (int i = 0; i < options.length; i++) {
params = Option.parseKeyValuePair(options[i]);
if (params != null) {
if ("trace".equals(params[... | final void function(Option pragma) { final String options[] = pragma.tokenizeContents(); String params[]; for (int i = 0; i < options.length; i++) { params = Option.parseKeyValuePair(options[i]); if (params != null) { if ("trace".equals(params[0])) { stats.setEnabled(true); } else if (STR.equals(params[0])) { logEnable... | /**
* Configure the profiler from an XQuery pragma.
* Parameters are:
*
* <ul>
* <li><strong>enabled</strong>: yes|no.</li>
* <li><strong>logger</strong>: name of the logger to use.</li>
* <li><strong>verbosity</strong>: integer value > 0. 1 does only output function calls.</li... | Configure the profiler from an XQuery pragma. Parameters are: enabled: yes|no. logger: name of the logger to use. verbosity: integer value > 0. 1 does only output function calls. | configure | {
"repo_name": "ljo/exist",
"path": "src/org/exist/xquery/Profiler.java",
"license": "lgpl-2.1",
"size": 15622
} | [
"org.apache.logging.log4j.LogManager"
] | import org.apache.logging.log4j.LogManager; | import org.apache.logging.log4j.*; | [
"org.apache.logging"
] | org.apache.logging; | 1,301,110 |
private Datacenter createDatacenter(String name) {
Host host = createHost(0);
hostList.add(host);
String arch = "x86"; // system architecture
String os = "Linux"; // operating system
double time_zone = 10.0; // time zone this resource located
double cost = 3.0; // t... | Datacenter function(String name) { Host host = createHost(0); hostList.add(host); String arch = "x86"; String os = "Linux"; double time_zone = 10.0; double cost = 3.0; double costPerMem = 0.05; double costPerStorage = 0.001; double costPerBw = 0.0; LinkedList<FileStorage> storageList = new LinkedList<>(); DatacenterCha... | /**
* Creates a datacenter with pre-defined configuration.
*
* @param name the datacenter name
* @return the created datacenter
*/ | Creates a datacenter with pre-defined configuration | createDatacenter | {
"repo_name": "thejotta/CloudSimPlusModificado",
"path": "cloudsim-plus-examples/src/main/java/org/cloudbus/cloudsim/examples/listeners/CloudletListenersExample1.java",
"license": "gpl-3.0",
"size": 10096
} | [
"java.util.LinkedList",
"org.cloudbus.cloudsim.Datacenter",
"org.cloudbus.cloudsim.DatacenterCharacteristics",
"org.cloudbus.cloudsim.DatacenterCharacteristicsSimple",
"org.cloudbus.cloudsim.DatacenterSimple",
"org.cloudbus.cloudsim.Host",
"org.cloudbus.cloudsim.allocationpolicies.VmAllocationPolicySimp... | import java.util.LinkedList; import org.cloudbus.cloudsim.Datacenter; import org.cloudbus.cloudsim.DatacenterCharacteristics; import org.cloudbus.cloudsim.DatacenterCharacteristicsSimple; import org.cloudbus.cloudsim.DatacenterSimple; import org.cloudbus.cloudsim.Host; import org.cloudbus.cloudsim.allocationpolicies.Vm... | import java.util.*; import org.cloudbus.cloudsim.*; import org.cloudbus.cloudsim.allocationpolicies.*; import org.cloudbus.cloudsim.resources.*; | [
"java.util",
"org.cloudbus.cloudsim"
] | java.util; org.cloudbus.cloudsim; | 1,693,986 |
public boolean onKeyUp(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK && mSlidingMenu.isMenuShowing()) {
showContent();
return true;
}
return false;
} | boolean function(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK && mSlidingMenu.isMenuShowing()) { showContent(); return true; } return false; } | /**
* On key up.
*
* @param keyCode the key code
* @param event the event
* @return true, if successful
*/ | On key up | onKeyUp | {
"repo_name": "yinglovezhuzhu/SlidingMenu",
"path": "SliddingMenu/src/com/opensource/slidingmenu/SlidingActivityHelper.java",
"license": "apache-2.0",
"size": 6120
} | [
"android.view.KeyEvent"
] | import android.view.KeyEvent; | import android.view.*; | [
"android.view"
] | android.view; | 2,154,816 |
@Override
public Response tiersTierLevelPost(TierDTO body, String tierLevel, String contentType) {
URI createdTierUri;
try {
RestApiPublisherUtils.validateTierLevels(tierLevel);
//we currently support adding/updating/deleting only API tiers
RestApiUtil.checkAl... | Response function(TierDTO body, String tierLevel, String contentType) { URI createdTierUri; try { RestApiPublisherUtils.validateTierLevels(tierLevel); RestApiUtil.checkAllowedMethodForResource("POST", RestApiConstants.RESOURCE_PATH_TIERS + "/" + tierLevel); APIProvider apiProvider = RestApiUtil.getLoggedInUserProvider(... | /** Adds a new Tier
*
* @param tierLevel tier level (api/application or resource)
* @param body TierDTO specifying the new Tier to be added
* @param contentType Content-Type header value
* @return newly added Tier object
*/ | Adds a new Tier | tiersTierLevelPost | {
"repo_name": "rnavagamuwa/custom-carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/impl/TiersApiServiceImpl.java",
"license": "apache-2.0",
"size": 15277
} | [
"java.net.URISyntaxException",
"javax.ws.rs.core.Response",
"org.wso2.carbon.apimgt.api.APIManagementException",
"org.wso2.carbon.apimgt.api.APIProvider",
"org.wso2.carbon.apimgt.api.model.Tier",
"org.wso2.carbon.apimgt.impl.utils.APIUtil",
"org.wso2.carbon.apimgt.rest.api.publisher.dto.TierDTO",
"org... | import java.net.URISyntaxException; import javax.ws.rs.core.Response; import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.api.APIProvider; import org.wso2.carbon.apimgt.api.model.Tier; import org.wso2.carbon.apimgt.impl.utils.APIUtil; import org.wso2.carbon.apimgt.rest.api.publisher.... | import java.net.*; import javax.ws.rs.core.*; import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.api.model.*; import org.wso2.carbon.apimgt.impl.utils.*; import org.wso2.carbon.apimgt.rest.api.publisher.dto.*; import org.wso2.carbon.apimgt.rest.api.publisher.utils.*; import org.wso2.carbon.apimgt.rest.a... | [
"java.net",
"javax.ws",
"org.wso2.carbon"
] | java.net; javax.ws; org.wso2.carbon; | 356,596 |
public void setReadablePorts(List<PortNameMapping> ports) {
this.readablePorts = ports;
} | void function(List<PortNameMapping> ports) { this.readablePorts = ports; } | /**
* Sets the readable ports of the described {@code Node} instance.
*
* @param ports the readable ports
*/ | Sets the readable ports of the described Node instance | setReadablePorts | {
"repo_name": "battila7/cd2t-100",
"path": "cd2t-100-game-shared/src/main/java/hu/progtech/cd2t100/game/model/NodeDescriptor.java",
"license": "mit",
"size": 4459
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 11,616 |
public Builder idMaker(final Supplier<Object> idMaker) {
this.idMaker = idMaker;
return this;
} | Builder function(final Supplier<Object> idMaker) { this.idMaker = idMaker; return this; } | /**
* Creates a new unique identifier for the next created {@link Element}.
*/ | Creates a new unique identifier for the next created <code>Element</code> | idMaker | {
"repo_name": "robertdale/tinkerpop",
"path": "gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/strategy/decoration/ElementIdStrategy.java",
"license": "apache-2.0",
"size": 8329
} | [
"java.util.function.Supplier"
] | import java.util.function.Supplier; | import java.util.function.*; | [
"java.util"
] | java.util; | 955,248 |
private void scheduleCacheCleanup(Context context) {
// Only schedule the Alarm if it's not already scheduled.
if (!isAlarmActive(context)) {
// Schedule an alarm after a certain timeout to start a
// service to delete expired data from Database.
mAlarmManager.setInexactRepeating(AlarmManager.ELAPSED_RE... | void function(Context context) { if (!isAlarmActive(context)) { mAlarmManager.setInexactRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, SystemClock.elapsedRealtime() + CLEANUP_SCHEDULER_TIME_INTERVAL, CLEANUP_SCHEDULER_TIME_INTERVAL, DeleteCacheReceiver.makeReceiverPendingIntent(context)); } } | /**
* Helper method that uses AlarmManager to schedule Cache Cleanup at regular intervals.
*
* @param context
*/ | Helper method that uses AlarmManager to schedule Cache Cleanup at regular intervals | scheduleCacheCleanup | {
"repo_name": "jgesser/mobilecloud-15",
"path": "assignments/assignment1/src/vandy/mooc/provider/cache/ContentProviderTimeoutCache.java",
"license": "apache-2.0",
"size": 9247
} | [
"android.app.AlarmManager",
"android.content.Context",
"android.os.SystemClock"
] | import android.app.AlarmManager; import android.content.Context; import android.os.SystemClock; | import android.app.*; import android.content.*; import android.os.*; | [
"android.app",
"android.content",
"android.os"
] | android.app; android.content; android.os; | 594,982 |
String id = null;
String userId = null;
ValueWrapperboolean disabled = null;
api.disableTopicSubscriber(id, userId, disabled);
// TODO: test validations
} | String id = null; String userId = null; ValueWrapperboolean disabled = null; api.disableTopicSubscriber(id, userId, disabled); } | /**
* Enable or disable messages for a user
*
* Useful for opt-out options on a single topic. Consider multiple topics for multiple opt-out options. <br><br><b>Permissions Needed:</b> TOPICS_ADMIN or self
*
* @throws ApiException
* if the Api call fails
... | Enable or disable messages for a user Useful for opt-out options on a single topic. Consider multiple topics for multiple opt-out options. <br><br><b>Permissions Needed:</b> TOPICS_ADMIN or self | disableTopicSubscriberTest | {
"repo_name": "knetikmedia/knetikcloud-java-client",
"path": "src/test/java/com/knetikcloud/api/MessagingTopicsApiTest.java",
"license": "apache-2.0",
"size": 2483
} | [
"com.knetikcloud.model.ValueWrapperboolean"
] | import com.knetikcloud.model.ValueWrapperboolean; | import com.knetikcloud.model.*; | [
"com.knetikcloud.model"
] | com.knetikcloud.model; | 417,013 |
private String getUnusedURI() throws RepositoryException {
Set<String> uris = new HashSet<String>(Arrays.asList(nsp.getURIs()));
String uri = TEST_URI;
int i = 0;
while (uris.contains(uri)) {
uri += i++;
}
return uri;
} | String function() throws RepositoryException { Set<String> uris = new HashSet<String>(Arrays.asList(nsp.getURIs())); String uri = TEST_URI; int i = 0; while (uris.contains(uri)) { uri += i++; } return uri; } | /**
* Returns a namespace URI that currently not used in the namespace
* registry.
* @return an unused namespace URI.
*/ | Returns a namespace URI that currently not used in the namespace registry | getUnusedURI | {
"repo_name": "tripodsan/jackrabbit",
"path": "jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/NamespaceRegistryTest.java",
"license": "apache-2.0",
"size": 8008
} | [
"java.util.Arrays",
"java.util.HashSet",
"java.util.Set",
"javax.jcr.RepositoryException"
] | import java.util.Arrays; import java.util.HashSet; import java.util.Set; import javax.jcr.RepositoryException; | import java.util.*; import javax.jcr.*; | [
"java.util",
"javax.jcr"
] | java.util; javax.jcr; | 2,733,112 |
public void open() throws IOException
{
// Codes_SRS_AMQPSTRANSPORT_11_020: [If an AMQPS session is already open, the function shall do nothing.]
if (this.state == AmqpsTransportState.OPEN)
{
return;
}
// Codes_SRS_AMQPSTRANSPORT_11_019: [The function shall o... | void function() throws IOException { if (this.state == AmqpsTransportState.OPEN) { return; } this.session = new AmqpsIotHubSession(this.config); this.session.open(); this.state = AmqpsTransportState.OPEN; } | /**
* Establishes a communication channel with an IoT Hub. If a channel is
* already open, the function shall do nothing.
*
* @throws IOException if a communication channel cannot be established.
*/ | Establishes a communication channel with an IoT Hub. If a channel is already open, the function shall do nothing | open | {
"repo_name": "Injac/azure-iot-sdks",
"path": "java/device/iothub-java-client/src/main/java/com/microsoft/azure/iothub/transport/amqps/AmqpsTransport.java",
"license": "mit",
"size": 13231
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 184,967 |
protected T checkReturnValue(T instance) {
if (instance == null && !isDependent()) {
throw BeanLogger.LOG.nullNotAllowedFromProducer(getProducer(), Formats.formatAsStackTraceElement(getAnnotated().getJavaMember()));
}
if (instance == null) {
InjectionPoint injectionPo... | T function(T instance) { if (instance == null && !isDependent()) { throw BeanLogger.LOG.nullNotAllowedFromProducer(getProducer(), Formats.formatAsStackTraceElement(getAnnotated().getJavaMember())); } if (instance == null) { InjectionPoint injectionPoint = beanManager.getServices().get(CurrentInjectionPoint.class).peek(... | /**
* Validates the return value
*
* @param instance The instance to validate
*/ | Validates the return value | checkReturnValue | {
"repo_name": "weld/core",
"path": "impl/src/main/java/org/jboss/weld/bean/AbstractProducerBean.java",
"license": "apache-2.0",
"size": 7820
} | [
"jakarta.enterprise.inject.spi.InjectionPoint",
"java.io.Serializable",
"java.lang.reflect.Field",
"org.jboss.weld.injection.CurrentInjectionPoint",
"org.jboss.weld.logging.BeanLogger",
"org.jboss.weld.util.Beans",
"org.jboss.weld.util.Defaults",
"org.jboss.weld.util.reflection.Formats",
"org.jboss.... | import jakarta.enterprise.inject.spi.InjectionPoint; import java.io.Serializable; import java.lang.reflect.Field; import org.jboss.weld.injection.CurrentInjectionPoint; import org.jboss.weld.logging.BeanLogger; import org.jboss.weld.util.Beans; import org.jboss.weld.util.Defaults; import org.jboss.weld.util.reflection.... | import jakarta.enterprise.inject.spi.*; import java.io.*; import java.lang.reflect.*; import org.jboss.weld.injection.*; import org.jboss.weld.logging.*; import org.jboss.weld.util.*; import org.jboss.weld.util.reflection.*; | [
"jakarta.enterprise.inject",
"java.io",
"java.lang",
"org.jboss.weld"
] | jakarta.enterprise.inject; java.io; java.lang; org.jboss.weld; | 1,179,861 |
public static <E> HashSet<E> newHashSet(Iterator<? extends E> elements) {
HashSet<E> set = newHashSet();
while (elements.hasNext()) {
set.add(elements.next());
}
return set;
}
// LinkedHashSet
/**
* Creates a <i>mutable</i>, empty {@code LinkedHashSet} instance.
*
* <p><b>Note:<... | static <E> HashSet<E> function(Iterator<? extends E> elements) { HashSet<E> set = newHashSet(); while (elements.hasNext()) { set.add(elements.next()); } return set; } /** * Creates a <i>mutable</i>, empty {@code LinkedHashSet} instance. * * <p><b>Note:</b> if mutability is not required, use { * ImmutableSet#of()} inste... | /**
* Creates a <i>mutable</i> {@code HashSet} instance containing the given
* elements in unspecified order.
*
* <p><b>Note:</b> if mutability is not required and the elements are
* non-null, use {@link ImmutableSet#copyOf(Iterable)} instead.
*
* <p><b>Note:</b> if {@code E} is an {@link Enum} typ... | Creates a mutable HashSet instance containing the given elements in unspecified order. Note: if mutability is not required and the elements are non-null, use <code>ImmutableSet#copyOf(Iterable)</code> instead. Note: if E is an <code>Enum</code> type, you should create an <code>EnumSet</code> instead | newHashSet | {
"repo_name": "tracylihui/google-collections",
"path": "src/com/google/common/collect/Sets.java",
"license": "apache-2.0",
"size": 27342
} | [
"java.util.HashSet",
"java.util.Iterator",
"java.util.LinkedHashSet"
] | import java.util.HashSet; import java.util.Iterator; import java.util.LinkedHashSet; | import java.util.*; | [
"java.util"
] | java.util; | 1,079,099 |
public void init(boolean forWrapping, CipherParameters param)
{
this.forWrapping = forWrapping;
this.engine = new CBCBlockCipher(new DESedeEngine());
SecureRandom sr;
if (param instanceof ParametersWithRandom)
{
ParametersWithRandom pr = (ParametersWithRando... | void function(boolean forWrapping, CipherParameters param) { this.forWrapping = forWrapping; this.engine = new CBCBlockCipher(new DESedeEngine()); SecureRandom sr; if (param instanceof ParametersWithRandom) { ParametersWithRandom pr = (ParametersWithRandom) param; param = pr.getParameters(); sr = pr.getRandom(); } else... | /**
* Method init
*
* @param forWrapping
* @param param
*/ | Method init | init | {
"repo_name": "dirtyfilthy/dirtyfilthy-bouncycastle",
"path": "net/dirtyfilthy/bouncycastle/crypto/engines/DESedeWrapEngine.java",
"license": "mit",
"size": 10979
} | [
"java.security.SecureRandom",
"net.dirtyfilthy.bouncycastle.crypto.CipherParameters",
"net.dirtyfilthy.bouncycastle.crypto.modes.CBCBlockCipher",
"net.dirtyfilthy.bouncycastle.crypto.params.KeyParameter",
"net.dirtyfilthy.bouncycastle.crypto.params.ParametersWithIV",
"net.dirtyfilthy.bouncycastle.crypto.p... | import java.security.SecureRandom; import net.dirtyfilthy.bouncycastle.crypto.CipherParameters; import net.dirtyfilthy.bouncycastle.crypto.modes.CBCBlockCipher; import net.dirtyfilthy.bouncycastle.crypto.params.KeyParameter; import net.dirtyfilthy.bouncycastle.crypto.params.ParametersWithIV; import net.dirtyfilthy.boun... | import java.security.*; import net.dirtyfilthy.bouncycastle.crypto.*; import net.dirtyfilthy.bouncycastle.crypto.modes.*; import net.dirtyfilthy.bouncycastle.crypto.params.*; | [
"java.security",
"net.dirtyfilthy.bouncycastle"
] | java.security; net.dirtyfilthy.bouncycastle; | 2,256,227 |
@ApiModelProperty(example = "null", value = "")
public Boolean getUniqueFactSheet() {
return uniqueFactSheet;
} | @ApiModelProperty(example = "null", value = "") Boolean function() { return uniqueFactSheet; } | /**
* Get uniqueFactSheet
* @return uniqueFactSheet
**/ | Get uniqueFactSheet | getUniqueFactSheet | {
"repo_name": "leanix/leanix-sdk-java",
"path": "src/main/java/net/leanix/api/models/ExternalIdType.java",
"license": "mit",
"size": 5148
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 1,235,553 |
public static void setCaptchaWiredDots(Context context, int v) {
v = validateCaptchaWiredDots(context, v);
p(context)
.edit()
.putInt(context
.getString(R.string.pkey_display_captcha_wired_dots),
... | static void function(Context context, int v) { v = validateCaptchaWiredDots(context, v); p(context) .edit() .putInt(context .getString(R.string.pkey_display_captcha_wired_dots), v).commit(); } } public static class Security { public static final String METADATA_ENCRYPTER_CLASS = STR; public static final String METADATA... | /**
* Sets wired dots for a "CAPTCHA" pattern.
* <p/>
* You can set this value in AndroidManifest.xml with
* {@link #METADATA_CAPTCHA_WIRED_DOTS}.
*
* @param context the context.
* @param v the wired dots for a "CAPTCHA" pattern.
*/ | Sets wired dots for a "CAPTCHA" pattern. You can set this value in AndroidManifest.xml with <code>#METADATA_CAPTCHA_WIRED_DOTS</code> | setCaptchaWiredDots | {
"repo_name": "xdtianyu/NeoAuthenticator",
"path": "AuthenticatorApp/src/main/java/org/xdty/authenticator/androidlockpattern/util/Settings.java",
"license": "apache-2.0",
"size": 16249
} | [
"android.content.Context"
] | import android.content.Context; | import android.content.*; | [
"android.content"
] | android.content; | 834,227 |
private Schema.BaseType getBaseType(VertexElement vertex){
try {
return Schema.BaseType.valueOf(vertex.label());
} catch (IllegalArgumentException e){
//Base type appears to be invalid. Let's try getting the type via the shard edge
Optional<EdgeElement> type = ver... | Schema.BaseType function(VertexElement vertex){ try { return Schema.BaseType.valueOf(vertex.label()); } catch (IllegalArgumentException e){ Optional<EdgeElement> type = vertex.getEdgesOfType(Direction.OUT, Schema.EdgeLabel.SHARD).findAny(); if(type.isPresent()){ String label = type.get().target().label(); if(label.equa... | /**
* This is a helper method to get the base type of a vertex.
* It first tried to get the base type via the label.
* If this is not possible it then tries to get the base type via the Shard Edge.
*
* @param vertex The vertex to build a concept from
* @return The base type of the vertex, ... | This is a helper method to get the base type of a vertex. It first tried to get the base type via the label. If this is not possible it then tries to get the base type via the Shard Edge | getBaseType | {
"repo_name": "alexandraorth/grakn",
"path": "grakn-graph/src/main/java/ai/grakn/graph/internal/ElementFactory.java",
"license": "gpl-3.0",
"size": 10214
} | [
"ai.grakn.util.Schema",
"java.util.Optional",
"org.apache.tinkerpop.gremlin.structure.Direction"
] | import ai.grakn.util.Schema; import java.util.Optional; import org.apache.tinkerpop.gremlin.structure.Direction; | import ai.grakn.util.*; import java.util.*; import org.apache.tinkerpop.gremlin.structure.*; | [
"ai.grakn.util",
"java.util",
"org.apache.tinkerpop"
] | ai.grakn.util; java.util; org.apache.tinkerpop; | 346,360 |
@Test(expected=IllegalArgumentException.class)
public void testPreferredBlockSizeBelowLowerBound ()
throws IllegalArgumentException {
replication = 3;
preferredBlockSize = -1;
createINodeFile(replication, preferredBlockSize);
} | @Test(expected=IllegalArgumentException.class) void function () throws IllegalArgumentException { replication = 3; preferredBlockSize = -1; createINodeFile(replication, preferredBlockSize); } | /**
* IllegalArgumentException is expected for setting below lower bound
* for PreferredBlockSize.
* @throws IllegalArgumentException as the result
*/ | IllegalArgumentException is expected for setting below lower bound for PreferredBlockSize | testPreferredBlockSizeBelowLowerBound | {
"repo_name": "gilv/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestINodeFile.java",
"license": "apache-2.0",
"size": 42660
} | [
"org.junit.Test"
] | import org.junit.Test; | import org.junit.*; | [
"org.junit"
] | org.junit; | 1,167,911 |
public boolean hasComponent(String name)
{
if (this.mappedComponents.containsKey(name))
{
return true;
}
else
{
for (JComponent j : this.children)
{
if (j.getClass().getSimpleName().equalsIgnoreCase("GridBagUIPanel"))
{
GridBagUIPanel temp = (GridBagUIPanel)j;
retur... | boolean function(String name) { if (this.mappedComponents.containsKey(name)) { return true; } else { for (JComponent j : this.children) { if (j.getClass().getSimpleName().equalsIgnoreCase(STR)) { GridBagUIPanel temp = (GridBagUIPanel)j; return temp.hasComponent(name); } } return false; } } | /**
* Returns whether either this Panel or any of it's children have the component in question
* @param name Name of the mapped component to look for
* @return true or false as appropriate
*/ | Returns whether either this Panel or any of it's children have the component in question | hasComponent | {
"repo_name": "zanza00/EP_Utilities",
"path": "EclipsePhaseLifePath/src/com/github/distanteye/ep_utils/ui/GridBagUIPanel.java",
"license": "gpl-3.0",
"size": 15835
} | [
"javax.swing.JComponent"
] | import javax.swing.JComponent; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 912,690 |
@Override
public void configure (WebAppContext context) throws Exception
{
//cannot configure if the _context is already started
if (context.isStarted())
{
LOG.debug("Cannot configure webapp after it is started");
return;
}
LOG.debug("... | void function (WebAppContext context) throws Exception { if (context.isStarted()) { LOG.debug(STR); return; } LOG.debug(STR); Resource web_inf = context.getWebInf(); if(web_inf!=null&&web_inf.isDirectory()) { Resource jetty=web_inf.addPath(STR); if(!jetty.exists()) jetty=web_inf.addPath(JETTY_WEB_XML); if(!jetty.exists... | /**
* Configure
* Apply web-jetty.xml configuration
* @see Configuration#configure(WebAppContext)
*/ | Configure Apply web-jetty.xml configuration | configure | {
"repo_name": "xmpace/jetty-read",
"path": "jetty-webapp/src/main/java/org/eclipse/jetty/webapp/JettyWebXmlConfiguration.java",
"license": "apache-2.0",
"size": 5111
} | [
"org.eclipse.jetty.util.resource.Resource",
"org.eclipse.jetty.xml.XmlConfiguration"
] | import org.eclipse.jetty.util.resource.Resource; import org.eclipse.jetty.xml.XmlConfiguration; | import org.eclipse.jetty.util.resource.*; import org.eclipse.jetty.xml.*; | [
"org.eclipse.jetty"
] | org.eclipse.jetty; | 2,376,607 |
public void setEntriesFemale (final Integer entriesFemale) {
final Integer oldEntriesFemale = getEntriesFemale();
party.setEntriesFemale(entriesFemale);
fireModelChange(PartyColumn.ENTRIES_FEMALE.getFieldName(), oldEntriesFemale, entriesFemale);
}
| void function (final Integer entriesFemale) { final Integer oldEntriesFemale = getEntriesFemale(); party.setEntriesFemale(entriesFemale); fireModelChange(PartyColumn.ENTRIES_FEMALE.getFieldName(), oldEntriesFemale, entriesFemale); } | /**
* Set the entriesFemale.
* @param entriesFemale the entriesFemale to set.
*/ | Set the entriesFemale | setEntriesFemale | {
"repo_name": "Club-Rock-ISEN/EntryManager",
"path": "src/main/java/org/clubrockisen/model/PartyModel.java",
"license": "bsd-3-clause",
"size": 7521
} | [
"org.clubrockisen.entities.Party"
] | import org.clubrockisen.entities.Party; | import org.clubrockisen.entities.*; | [
"org.clubrockisen.entities"
] | org.clubrockisen.entities; | 2,035,928 |
public static List<String> readLines(File f, Charset charset)
throws IOException
{
BufferedReader in = newReader(f, charset);
try {
return CharStreams.readLines(in);
} finally {
IO.close(in);
}
}
private TextFiles()
{
} | static List<String> function(File f, Charset charset) throws IOException { BufferedReader in = newReader(f, charset); try { return CharStreams.readLines(in); } finally { IO.close(in); } } private TextFiles() { } | /**
* Reads all the lines from the given {@code File} using the specified
* charset. Note that the returned {@code List} is immutable.
*
* @param f the file to read.
* @param charset the charset to use.
*
* @return the file's lines.
*
* @throws NullPointerException if one of the arguments is {@code nu... | Reads all the lines from the given File using the specified charset. Note that the returned List is immutable | readLines | {
"repo_name": "kocakosm/pitaya",
"path": "src/org/kocakosm/pitaya/io/TextFiles.java",
"license": "lgpl-3.0",
"size": 15156
} | [
"java.io.BufferedReader",
"java.io.File",
"java.io.IOException",
"java.nio.charset.Charset",
"java.util.List"
] | import java.io.BufferedReader; import java.io.File; import java.io.IOException; import java.nio.charset.Charset; import java.util.List; | import java.io.*; import java.nio.charset.*; import java.util.*; | [
"java.io",
"java.nio",
"java.util"
] | java.io; java.nio; java.util; | 1,286,650 |
public static JsonStringHashMap<Object, Object> mapOfObject(Object... keyValueSequence) {
boolean convertStringToText = true;
final int startIndex;
if (keyValueSequence.length % 2 == 1) {
convertStringToText = (boolean) keyValueSequence[0];
startIndex = 1;
} else {
startIndex = 0;
... | static JsonStringHashMap<Object, Object> function(Object... keyValueSequence) { boolean convertStringToText = true; final int startIndex; if (keyValueSequence.length % 2 == 1) { convertStringToText = (boolean) keyValueSequence[0]; startIndex = 1; } else { startIndex = 0; } final JsonStringHashMap<Object, Object> map = ... | /**
* Convenience method to create an instance of {@link JsonStringHashMap}{@code <Object, Object>} with the given key-value sequence.
*
* By default, any {@link String} instance will be wrapped by {@link Text} instance. To disable wrapping pass
* {@code false} as the first object to key-value sequence.
... | Convenience method to create an instance of <code>JsonStringHashMap</code> with the given key-value sequence. By default, any <code>String</code> instance will be wrapped by <code>Text</code> instance. To disable wrapping pass false as the first object to key-value sequence | mapOfObject | {
"repo_name": "arina-ielchiieva/drill",
"path": "exec/java-exec/src/test/java/org/apache/drill/test/TestBuilder.java",
"license": "apache-2.0",
"size": 31635
} | [
"org.apache.drill.exec.util.JsonStringHashMap",
"org.apache.drill.exec.util.Text"
] | import org.apache.drill.exec.util.JsonStringHashMap; import org.apache.drill.exec.util.Text; | import org.apache.drill.exec.util.*; | [
"org.apache.drill"
] | org.apache.drill; | 1,660,496 |
public void testLoadWithoutAppsDefined(){
ApplicationContextLoader.load(getSamplesDir() + "application-config-no-apps-defined.xml");
assertNotNull(ApplicationCluster.getInstance().iterator());
Map<String, String> expectedDirs = new HashMap<String, String>();
expectedDirs.put("app-4a", new File(getSamplesDir()... | void function(){ ApplicationContextLoader.load(getSamplesDir() + STR); assertNotNull(ApplicationCluster.getInstance().iterator()); Map<String, String> expectedDirs = new HashMap<String, String>(); expectedDirs.put(STR, new File(getSamplesDir()).getAbsolutePath()); expectedDirs.put(STR, new File(getSamplesDir()).getAbso... | /**
* this test tests if the reader can leve a file out, which is in the assigned root directory
*
*/ | this test tests if the reader can leve a file out, which is in the assigned root directory | testLoadWithoutAppsDefined | {
"repo_name": "qafedev/qafe-platform",
"path": "qafe-core/src/test/java/test/com/qualogy/qafe/core/application/ApplicationContextLoaderTest.java",
"license": "apache-2.0",
"size": 10998
} | [
"com.qualogy.qafe.bind.core.application.ApplicationContext",
"com.qualogy.qafe.bind.domain.ApplicationMapping",
"com.qualogy.qafe.bind.presentation.component.Window",
"com.qualogy.qafe.core.application.ApplicationCluster",
"com.qualogy.qafe.core.application.ApplicationContextLoader",
"java.io.File",
"ja... | import com.qualogy.qafe.bind.core.application.ApplicationContext; import com.qualogy.qafe.bind.domain.ApplicationMapping; import com.qualogy.qafe.bind.presentation.component.Window; import com.qualogy.qafe.core.application.ApplicationCluster; import com.qualogy.qafe.core.application.ApplicationContextLoader; import jav... | import com.qualogy.qafe.bind.core.application.*; import com.qualogy.qafe.bind.domain.*; import com.qualogy.qafe.bind.presentation.component.*; import com.qualogy.qafe.core.application.*; import java.io.*; import java.util.*; | [
"com.qualogy.qafe",
"java.io",
"java.util"
] | com.qualogy.qafe; java.io; java.util; | 1,482,164 |
public static Field fromJson(JSONObject json) throws BlockLoadingException {
String type = null;
try {
type = json.getString("type");
} catch (JSONException e) {
throw new BlockLoadingException("Error getting the field type.", e);
}
// If new fields a... | static Field function(JSONObject json) throws BlockLoadingException { String type = null; try { type = json.getString("type"); } catch (JSONException e) { throw new BlockLoadingException(STR, e); } Field field = null; switch (type) { case TYPE_LABEL_STRING: field = FieldLabel.fromJson(json); break; case TYPE_INPUT_STRI... | /**
* Create a new {@link Field} instance from JSON. If the type is not recognized
* null will be returned. If the JSON is invalid or there is an error reading the data a
* {@link RuntimeException} will be thrown.
*
* @param json The JSON to generate the Field from.
*
* @return A Fie... | Create a new <code>Field</code> instance from JSON. If the type is not recognized null will be returned. If the JSON is invalid or there is an error reading the data a <code>RuntimeException</code> will be thrown | fromJson | {
"repo_name": "rohlfingt/blockly-android",
"path": "blocklylib-core/src/main/java/com/google/blockly/model/Field.java",
"license": "apache-2.0",
"size": 8621
} | [
"android.util.Log",
"com.google.blockly.utils.BlockLoadingException",
"org.json.JSONException",
"org.json.JSONObject"
] | import android.util.Log; import com.google.blockly.utils.BlockLoadingException; import org.json.JSONException; import org.json.JSONObject; | import android.util.*; import com.google.blockly.utils.*; import org.json.*; | [
"android.util",
"com.google.blockly",
"org.json"
] | android.util; com.google.blockly; org.json; | 567,534 |
public static int getErrataCount(Channel channel) {
Map params = new HashMap();
params.put("cid", channel.getId());
return (Integer)singleton.lookupObjectByNamedQuery
("Channel.getErrataCount", params);
} | static int function(Channel channel) { Map params = new HashMap(); params.put("cid", channel.getId()); return (Integer)singleton.lookupObjectByNamedQuery (STR, params); } | /**
* Get the errata count for a channel
* @param channel the channel
* @return the errata count as an int
*/ | Get the errata count for a channel | getErrataCount | {
"repo_name": "dmacvicar/spacewalk",
"path": "java/code/src/com/redhat/rhn/domain/channel/ChannelFactory.java",
"license": "gpl-2.0",
"size": 41646
} | [
"java.util.HashMap",
"java.util.Map"
] | import java.util.HashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,515,012 |
public void setAllowableValues(List<String> allowableValues) {
this.allowableValues = allowableValues;
} | void function(List<String> allowableValues) { this.allowableValues = allowableValues; } | /**
* Sets the Swagger Parameter list of allowable values.
*/ | Sets the Swagger Parameter list of allowable values | setAllowableValues | {
"repo_name": "nikhilvibhav/camel",
"path": "core/camel-core-model/src/main/java/org/apache/camel/model/rest/RestOperationResponseHeaderDefinition.java",
"license": "apache-2.0",
"size": 7229
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 130,331 |
@Override
public DataBuffer createSame(DataBuffer buffer, boolean init, MemoryWorkspace workspace) {
switch (buffer.dataType()) {
case INT:
return createInt(buffer.length(), init, workspace);
case FLOAT:
return createFloat(buffer.length(), init, wo... | DataBuffer function(DataBuffer buffer, boolean init, MemoryWorkspace workspace) { switch (buffer.dataType()) { case INT: return createInt(buffer.length(), init, workspace); case FLOAT: return createFloat(buffer.length(), init, workspace); case DOUBLE: return createDouble(buffer.length(), init, workspace); case HALF: re... | /**
* This method will create new DataBuffer of the same dataType & same length
*
* @param buffer
* @param workspace
* @return
*/ | This method will create new DataBuffer of the same dataType & same length | createSame | {
"repo_name": "huitseeker/nd4j",
"path": "nd4j-buffer/src/main/java/org/nd4j/linalg/api/buffer/factory/DefaultDataBufferFactory.java",
"license": "apache-2.0",
"size": 22752
} | [
"org.nd4j.linalg.api.buffer.DataBuffer",
"org.nd4j.linalg.api.memory.MemoryWorkspace"
] | import org.nd4j.linalg.api.buffer.DataBuffer; import org.nd4j.linalg.api.memory.MemoryWorkspace; | import org.nd4j.linalg.api.buffer.*; import org.nd4j.linalg.api.memory.*; | [
"org.nd4j.linalg"
] | org.nd4j.linalg; | 1,189,071 |
private boolean startServices() {
cService = new TcpIpCommService(new InetSocketAddress(serverIp, serverPort));
ServiceRegistry.getInstance().addService(cService);
try {
cService.startup();
} catch (CommException e) {
e.printStackTrace();
}
return true;
}
| boolean function() { cService = new TcpIpCommService(new InetSocketAddress(serverIp, serverPort)); ServiceRegistry.getInstance().addService(cService); try { cService.startup(); } catch (CommException e) { e.printStackTrace(); } return true; } | /**
* Initialize services and start communication service.
* @return
*/ | Initialize services and start communication service | startServices | {
"repo_name": "raedle/Squidy",
"path": "squidy-nodes/src/main/java/org/squidy/nodes/tracking/configclient/MainConfigFrameDirector.java",
"license": "lgpl-3.0",
"size": 5936
} | [
"java.net.InetSocketAddress",
"org.squidy.nodes.tracking.configclient.service.ServiceRegistry",
"org.squidy.nodes.tracking.configclient.service.comm.CommException",
"org.squidy.nodes.tracking.configclient.service.comm.TcpIpCommService"
] | import java.net.InetSocketAddress; import org.squidy.nodes.tracking.configclient.service.ServiceRegistry; import org.squidy.nodes.tracking.configclient.service.comm.CommException; import org.squidy.nodes.tracking.configclient.service.comm.TcpIpCommService; | import java.net.*; import org.squidy.nodes.tracking.configclient.service.*; import org.squidy.nodes.tracking.configclient.service.comm.*; | [
"java.net",
"org.squidy.nodes"
] | java.net; org.squidy.nodes; | 2,885,362 |
public static XPathFactory createXPathFactory(boolean disableSecureProcessing) throws IllegalStateException {
try {
XPathFactory factory = XPathFactory.newInstance();
if (LOGGER.isLoggable(Level.FINE)) {
LOGGER.log(Level.FINE, "XPathFactory instance: {0}", factory);
... | static XPathFactory function(boolean disableSecureProcessing) throws IllegalStateException { try { XPathFactory factory = XPathFactory.newInstance(); if (LOGGER.isLoggable(Level.FINE)) { LOGGER.log(Level.FINE, STR, factory); } factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, !isXMLSecurityDisabled(disableSecu... | /**
* Returns properly configured (e.g. security features) factory
* - securityProcessing == is set based on security processing property, default is true
*/ | Returns properly configured (e.g. security features) factory - securityProcessing == is set based on security processing property, default is true | createXPathFactory | {
"repo_name": "FauxFaux/jdk9-jaxws",
"path": "src/java.xml.bind/share/classes/com/sun/xml/internal/bind/v2/util/XmlFactory.java",
"license": "gpl-2.0",
"size": 11828
} | [
"com.sun.xml.internal.bind.v2.Messages",
"java.util.logging.Level",
"javax.xml.XMLConstants",
"javax.xml.xpath.XPathFactory",
"javax.xml.xpath.XPathFactoryConfigurationException"
] | import com.sun.xml.internal.bind.v2.Messages; import java.util.logging.Level; import javax.xml.XMLConstants; import javax.xml.xpath.XPathFactory; import javax.xml.xpath.XPathFactoryConfigurationException; | import com.sun.xml.internal.bind.v2.*; import java.util.logging.*; import javax.xml.*; import javax.xml.xpath.*; | [
"com.sun.xml",
"java.util",
"javax.xml"
] | com.sun.xml; java.util; javax.xml; | 2,087,343 |
public static ConfigChannel createConfigChannel(Org org, String name, String label,
ConfigChannelType type) {
ConfigChannel cc = ConfigurationFactory.newConfigChannel();
cc.setConfigChannelType(type);
cc.setOrg(org);
cc.setName(name... | static ConfigChannel function(Org org, String name, String label, ConfigChannelType type) { ConfigChannel cc = ConfigurationFactory.newConfigChannel(); cc.setConfigChannelType(type); cc.setOrg(org); cc.setName(name); cc.setLabel(label); cc.setDescription(STR + TestUtils.randomString()); cc.setCreated(new Date()); cc.se... | /**
* Creates a test configuration channel and saves it to the database
* with the given information. Note: does not flush hibernate.
* Note2: users of the same org do not automatically have access to this channel.
* Use the giveUserChanAccess method to accomplish that.
* @param org The org
... | Creates a test configuration channel and saves it to the database with the given information. Note: does not flush hibernate. Note2: users of the same org do not automatically have access to this channel. Use the giveUserChanAccess method to accomplish that | createConfigChannel | {
"repo_name": "xkollar/spacewalk",
"path": "java/code/src/com/redhat/rhn/testing/ConfigTestUtils.java",
"license": "gpl-2.0",
"size": 16082
} | [
"com.redhat.rhn.domain.config.ConfigChannel",
"com.redhat.rhn.domain.config.ConfigChannelType",
"com.redhat.rhn.domain.config.ConfigurationFactory",
"com.redhat.rhn.domain.org.Org",
"java.util.Date"
] | import com.redhat.rhn.domain.config.ConfigChannel; import com.redhat.rhn.domain.config.ConfigChannelType; import com.redhat.rhn.domain.config.ConfigurationFactory; import com.redhat.rhn.domain.org.Org; import java.util.Date; | import com.redhat.rhn.domain.config.*; import com.redhat.rhn.domain.org.*; import java.util.*; | [
"com.redhat.rhn",
"java.util"
] | com.redhat.rhn; java.util; | 726,272 |
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Void> revalidateAsync(
String resourceGroupName, String managedInstanceName, EncryptionProtectorName encryptionProtectorName) {
return beginRevalidateAsync(resourceGroupName, managedInstanceName, encryptionProtectorName)
.last()... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Void> function( String resourceGroupName, String managedInstanceName, EncryptionProtectorName encryptionProtectorName) { return beginRevalidateAsync(resourceGroupName, managedInstanceName, encryptionProtectorName) .last() .flatMap(this.client::getLroFinalResultOrError); ... | /**
* Revalidates an existing encryption protector.
*
* @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
* from the Azure Resource Manager API or the portal.
* @param managedInstanceName The name of the managed instance.
* @p... | Revalidates an existing encryption protector | revalidateAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ManagedInstanceEncryptionProtectorsClientImpl.java",
"license": "mit",
"size": 61605
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.resourcemanager.sql.models.EncryptionProtectorName"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.sql.models.EncryptionProtectorName; | import com.azure.core.annotation.*; import com.azure.resourcemanager.sql.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 614,859 |
public List<byte[]> getMetaTableRows(byte[] tableName) throws IOException {
// TODO: Redo using MetaReader.
HTable t = new HTable(new Configuration(this.conf), HConstants.META_TABLE_NAME);
List<byte[]> rows = new ArrayList<byte[]>();
ResultScanner s = t.getScanner(new Scan());
for (Result result :... | List<byte[]> function(byte[] tableName) throws IOException { HTable t = new HTable(new Configuration(this.conf), HConstants.META_TABLE_NAME); List<byte[]> rows = new ArrayList<byte[]>(); ResultScanner s = t.getScanner(new Scan()); for (Result result : s) { byte[] val = result.getValue(HConstants.CATALOG_FAMILY, HConsta... | /**
* Returns all rows from the .META. table for a given user table
*
* @throws IOException When reading the rows fails.
*/ | Returns all rows from the .META. table for a given user table | getMetaTableRows | {
"repo_name": "axfcampos/hbase-0.94.19",
"path": "src/test/java/org/apache/hadoop/hbase/HBaseTestingUtility.java",
"license": "apache-2.0",
"size": 83901
} | [
"java.io.IOException",
"java.util.ArrayList",
"java.util.List",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.hbase.client.HTable",
"org.apache.hadoop.hbase.client.Result",
"org.apache.hadoop.hbase.client.ResultScanner",
"org.apache.hadoop.hbase.client.Scan",
"org.apache.hadoop.hbase.ut... | import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.client.HTable; import org.apache.hadoop.hbase.client.Result; import org.apache.hadoop.hbase.client.ResultScanner; import org.apache.hadoop.hbase.client.Scan; import ... | import java.io.*; import java.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.util.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 298,700 |
protected final void write(Comment comment)
throws IOException {
if (withComments && (nodes == null || nodes.contains(comment))) {
super.write(comment);
}
}
| final void function(Comment comment) throws IOException { if (withComments && (nodes == null nodes.contains(comment))) { super.write(comment); } } | /**
* <p>
* Serializes a <code>Comment</code> object
* onto the output stream if and only if this
* serializer is configured to produce canonical XML
* with comments.
* </p>
*
* @param comment the <code>Comment</code> to serialize
*
... | Serializes a <code>Comment</code> object onto the output stream if and only if this serializer is configured to produce canonical XML with comments. | write | {
"repo_name": "mmohan01/ReFactory",
"path": "data/xom/xom-1.2b2/nu/xom/canonical/Canonicalizer.java",
"license": "mit",
"size": 38844
} | [
"java.io.IOException",
"nu.xom.Comment"
] | import java.io.IOException; import nu.xom.Comment; | import java.io.*; import nu.xom.*; | [
"java.io",
"nu.xom"
] | java.io; nu.xom; | 1,473,603 |
protected int[] readColorTable(int ncolors) {
int nbytes = 3 * ncolors;
int[] tab = null;
byte[] c = new byte[nbytes];
int n = 0;
try {
n = in.read(c);
} catch (IOException e) {
}
if (n < nbytes) {
status = STATUS_FORMAT_ERROR;
} else {
tab = new int[256]; // max size to avoid bounds check... | int[] function(int ncolors) { int nbytes = 3 * ncolors; int[] tab = null; byte[] c = new byte[nbytes]; int n = 0; try { n = in.read(c); } catch (IOException e) { } if (n < nbytes) { status = STATUS_FORMAT_ERROR; } else { tab = new int[256]; int i = 0; int j = 0; while (i < ncolors) { int r = ((int) c[j++]) & 0xff; int ... | /**
* Reads color table as 256 RGB integer values
*
* @param ncolors
* int number of colors to read
* @return int array containing 256 colors (packed ARGB with full alpha)
*/ | Reads color table as 256 RGB integer values | readColorTable | {
"repo_name": "rayrelay/devnote",
"path": "devnote-eclipse/src/main/java/org/ray/note/thumbmaker/imageutil/gif/GifDecoder.java",
"license": "apache-2.0",
"size": 16878
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,106,169 |
public WorkItemClassificationNode createOrUpdateClassificationNode(
final WorkItemClassificationNode postedNode,
final UUID project,
final TreeStructureGroup structureGroup,
final String path) {
final UUID locationId = UUID.fromString("5a172953-1b41-49d3-840a-33f79c3ce89... | WorkItemClassificationNode function( final WorkItemClassificationNode postedNode, final UUID project, final TreeStructureGroup structureGroup, final String path) { final UUID locationId = UUID.fromString(STR); final ApiResourceVersion apiVersion = new ApiResourceVersion(STR); final Map<String, Object> routeValues = new... | /**
* [Preview API 3.1-preview.2]
*
* @param postedNode
*
* @param project
* Project ID
* @param structureGroup
*
* @param path
*
* @return WorkItemClassificationNode
*/ | [Preview API 3.1-preview.2] | createOrUpdateClassificationNode | {
"repo_name": "Microsoft/vso-httpclient-java",
"path": "Rest/alm-tfs-client/src/main/generated/com/microsoft/alm/teamfoundation/workitemtracking/webapi/WorkItemTrackingHttpClientBase.java",
"license": "mit",
"size": 169431
} | [
"com.microsoft.alm.client.HttpMethod",
"com.microsoft.alm.client.VssMediaTypes",
"com.microsoft.alm.client.VssRestRequest",
"com.microsoft.alm.teamfoundation.workitemtracking.webapi.models.TreeStructureGroup",
"com.microsoft.alm.teamfoundation.workitemtracking.webapi.models.WorkItemClassificationNode",
"c... | import com.microsoft.alm.client.HttpMethod; import com.microsoft.alm.client.VssMediaTypes; import com.microsoft.alm.client.VssRestRequest; import com.microsoft.alm.teamfoundation.workitemtracking.webapi.models.TreeStructureGroup; import com.microsoft.alm.teamfoundation.workitemtracking.webapi.models.WorkItemClassificat... | import com.microsoft.alm.client.*; import com.microsoft.alm.teamfoundation.workitemtracking.webapi.models.*; import com.microsoft.alm.visualstudio.services.webapi.*; import java.util.*; | [
"com.microsoft.alm",
"java.util"
] | com.microsoft.alm; java.util; | 2,347,178 |
public void setPrintArea(int sheetIndex, String reference)
{
NameRecord name = workbook.getSpecificBuiltinRecord(NameRecord.BUILTIN_PRINT_AREA, sheetIndex+1);
if (name == null)
name = workbook.createBuiltInName(NameRecord.BUILTIN_PRINT_AREA, sheetIndex+1);
//adding one here ... | void function(int sheetIndex, String reference) { NameRecord name = workbook.getSpecificBuiltinRecord(NameRecord.BUILTIN_PRINT_AREA, sheetIndex+1); if (name == null) name = workbook.createBuiltInName(NameRecord.BUILTIN_PRINT_AREA, sheetIndex+1); short externSheetIndex = getWorkbook().checkExternSheet(sheetIndex); name.... | /**
* Sets the printarea for the sheet provided
* <p>
* i.e. Reference = $A$1:$B$2
* @param sheetIndex Zero-based sheet index (0 Represents the first sheet to keep consistent with java)
* @param reference Valid name Reference for the Print Area
*/ | Sets the printarea for the sheet provided i.e. Reference = $A$1:$B$2 | setPrintArea | {
"repo_name": "srnsw/xena",
"path": "plugins/project/ext/src/poi-3.2-FINAL/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java",
"license": "gpl-3.0",
"size": 58791
} | [
"org.apache.poi.hssf.record.NameRecord"
] | import org.apache.poi.hssf.record.NameRecord; | import org.apache.poi.hssf.record.*; | [
"org.apache.poi"
] | org.apache.poi; | 1,819,276 |
Restlet getRestlet(Context context); | Restlet getRestlet(Context context); | /**
* Get the restlet that will map to the resources
* @param context the context for constructing the restlet
* @return the restlet
*/ | Get the restlet that will map to the resources | getRestlet | {
"repo_name": "zsavvas/MPTCP-aware-SDN",
"path": "src/main/java/net/floodlightcontroller/restserver/RestletRoutable.java",
"license": "apache-2.0",
"size": 1309
} | [
"org.restlet.Context",
"org.restlet.Restlet"
] | import org.restlet.Context; import org.restlet.Restlet; | import org.restlet.*; | [
"org.restlet"
] | org.restlet; | 1,754,298 |
//-----------------------------------------------------------------------
public static Hours hoursBetween(ReadableInstant start, ReadableInstant end) {
int amount = BaseSingleFieldPeriod.between(start, end, DurationFieldType.hours());
return Hours.hours(amount);
} | static Hours function(ReadableInstant start, ReadableInstant end) { int amount = BaseSingleFieldPeriod.between(start, end, DurationFieldType.hours()); return Hours.hours(amount); } | /**
* Creates a <code>Hours</code> representing the number of whole hours
* between the two specified datetimes.
*
* @param start the start instant, must not be null
* @param end the end instant, must not be null
* @return the period in hours
* @throws IllegalArgumentException if th... | Creates a <code>Hours</code> representing the number of whole hours between the two specified datetimes | hoursBetween | {
"repo_name": "AlexeyTrusov/testing5",
"path": "src/main/java/org/joda/time/Hours.java",
"license": "apache-2.0",
"size": 18943
} | [
"org.joda.time.base.BaseSingleFieldPeriod"
] | import org.joda.time.base.BaseSingleFieldPeriod; | import org.joda.time.base.*; | [
"org.joda.time"
] | org.joda.time; | 2,595,218 |
@NotNull
private static DBNNode[][] groupConsecutiveNodes(@NotNull List<DBNNode> nodes) {
final List<DBNNode[]> ranges = new ArrayList<>();
final List<DBNNode> range = new ArrayList<>();
for (int index = 1, length = nodes.size(); index <= length; index++) {
range.add(nodes.g... | static DBNNode[][] function(@NotNull List<DBNNode> nodes) { final List<DBNNode[]> ranges = new ArrayList<>(); final List<DBNNode> range = new ArrayList<>(); for (int index = 1, length = nodes.size(); index <= length; index++) { range.add(nodes.get(index - 1)); if (index == length getNodePosition(nodes.get(index - 1)) !... | /**
* Performs grouping of a consecutive nodes.
*
* @param nodes nodes to group
* @return an array of arrays containing consecutive nodes
*/ | Performs grouping of a consecutive nodes | groupConsecutiveNodes | {
"repo_name": "dbeaver/dbeaver",
"path": "plugins/org.jkiss.dbeaver.ui.navigator/src/org/jkiss/dbeaver/ui/navigator/actions/NavigatorHandlerObjectMove.java",
"license": "apache-2.0",
"size": 8097
} | [
"java.util.ArrayList",
"java.util.List",
"org.jkiss.code.NotNull",
"org.jkiss.dbeaver.model.navigator.DBNNode"
] | import java.util.ArrayList; import java.util.List; import org.jkiss.code.NotNull; import org.jkiss.dbeaver.model.navigator.DBNNode; | import java.util.*; import org.jkiss.code.*; import org.jkiss.dbeaver.model.navigator.*; | [
"java.util",
"org.jkiss.code",
"org.jkiss.dbeaver"
] | java.util; org.jkiss.code; org.jkiss.dbeaver; | 1,402,773 |
private boolean invalidateActions() {
if (!hasActionButtons()) {
// If the dialog is a plain list dialog, no buttons are shown.
view.findViewById(R.id.buttonDefaultFrame).setVisibility(View.GONE);
view.findViewById(R.id.buttonStackedFrame).setVisibility(View.GONE);
... | boolean function() { if (!hasActionButtons()) { view.findViewById(R.id.buttonDefaultFrame).setVisibility(View.GONE); view.findViewById(R.id.buttonStackedFrame).setVisibility(View.GONE); invalidateList(); return false; } if (isStacked) { view.findViewById(R.id.buttonDefaultFrame).setVisibility(View.GONE); view.findViewB... | /**
* Invalidates the positive/neutral/negative action buttons. Decides whether they should be visible
* and sets their properties (such as height, text color, etc.).
*/ | Invalidates the positive/neutral/negative action buttons. Decides whether they should be visible and sets their properties (such as height, text color, etc.) | invalidateActions | {
"repo_name": "simarpreetsingharora/puautologin",
"path": "library/src/main/java/com/afollestad/materialdialogs/MaterialDialog.java",
"license": "gpl-3.0",
"size": 73849
} | [
"android.os.Build",
"android.view.View",
"android.widget.FrameLayout",
"android.widget.RelativeLayout",
"android.widget.TextView"
] | import android.os.Build; import android.view.View; import android.widget.FrameLayout; import android.widget.RelativeLayout; import android.widget.TextView; | import android.os.*; import android.view.*; import android.widget.*; | [
"android.os",
"android.view",
"android.widget"
] | android.os; android.view; android.widget; | 1,409,354 |
public FilterDefinition filter(@AsPredicate ExpressionDefinition expression) {
FilterDefinition filter = new FilterDefinition(expression);
addOutput(filter);
return filter;
} | FilterDefinition function(@AsPredicate ExpressionDefinition expression) { FilterDefinition filter = new FilterDefinition(expression); addOutput(filter); return filter; } | /**
* <a href="http://camel.apache.org/message-filter.html">Message Filter EIP:</a>
* Creates a predicate expression which only if it is <tt>true</tt> then the
* exchange is forwarded to the destination
*
* @param expression the predicate expression to use
* @return the builder
*/ | Creates a predicate expression which only if it is true then the exchange is forwarded to the destination | filter | {
"repo_name": "davidkarlsen/camel",
"path": "core/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinition.java",
"license": "apache-2.0",
"size": 149529
} | [
"org.apache.camel.model.language.ExpressionDefinition",
"org.apache.camel.spi.AsPredicate"
] | import org.apache.camel.model.language.ExpressionDefinition; import org.apache.camel.spi.AsPredicate; | import org.apache.camel.model.language.*; import org.apache.camel.spi.*; | [
"org.apache.camel"
] | org.apache.camel; | 1,640,775 |
public static final Function<String,Boolean> isValidByte(final Locale locale) {
return new IsValidByte(locale);
}
| static final Function<String,Boolean> function(final Locale locale) { return new IsValidByte(locale); } | /**
* <p>
* Returns true if the input {@link String} represents a {@link Byte},
* that is, it it represents a non decimal number between
* {@link Byte#MIN_VALUE} and {@link Byte#MAX_VALUE}.
* </p>
*
* @param locale the locale defining the way in which the number is written
... | Returns true if the input <code>String</code> represents a <code>Byte</code>, that is, it it represents a non decimal number between <code>Byte#MIN_VALUE</code> and <code>Byte#MAX_VALUE</code>. | isValidByte | {
"repo_name": "op4j/op4j",
"path": "src/main/java/org/op4j/functions/FnString.java",
"license": "apache-2.0",
"size": 242735
} | [
"java.util.Locale"
] | import java.util.Locale; | import java.util.*; | [
"java.util"
] | java.util; | 2,233,764 |
public static boolean isWriteEnabled(SelectionKey key)
{
return ((key.interestOps() & SelectionKey.OP_WRITE) != 0);
} | static boolean function(SelectionKey key) { return ((key.interestOps() & SelectionKey.OP_WRITE) != 0); } | /**
* Returns {@code true} if the specified selection key has write enabled,
* {@code false} otherwise.
*/ | Returns true if the specified selection key has write enabled, false otherwise | isWriteEnabled | {
"repo_name": "cfloersch/Stdlib",
"path": "src/main/java/xpertss/io/NIOUtils.java",
"license": "gpl-2.0",
"size": 16983
} | [
"java.nio.channels.SelectionKey"
] | import java.nio.channels.SelectionKey; | import java.nio.channels.*; | [
"java.nio"
] | java.nio; | 2,775,913 |
public static int vectorsPerSlice(INDArray arr,int...rank) {
if(arr.rank() > 2) {
return arr.size(-2) * arr.size(-1);
}
return arr.size(-1);
} | static int function(INDArray arr,int...rank) { if(arr.rank() > 2) { return arr.size(-2) * arr.size(-1); } return arr.size(-1); } | /**
* The number of vectors
* in each slice of an ndarray.
* @param arr the array to
* get the number
* of vectors per slice for
* @param rank the dimensions to get the number of vectors per slice for
* @return the number of vectors per slice
*/ | The number of vectors in each slice of an ndarray | vectorsPerSlice | {
"repo_name": "tamseo/nd4j",
"path": "nd4j-api/src/main/java/org/nd4j/linalg/util/NDArrayMath.java",
"license": "apache-2.0",
"size": 5101
} | [
"org.nd4j.linalg.api.ndarray.INDArray"
] | import org.nd4j.linalg.api.ndarray.INDArray; | import org.nd4j.linalg.api.ndarray.*; | [
"org.nd4j.linalg"
] | org.nd4j.linalg; | 1,925,838 |
EClass getPrimitivePropertyType(); | EClass getPrimitivePropertyType(); | /**
* Returns the meta object for class '{@link org.eclipse.vorto.core.api.model.datatype.PrimitivePropertyType <em>Primitive Property Type</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Primitive Property Type</em>'.
* @see org.eclipse.vorto.core.api.model.... | Returns the meta object for class '<code>org.eclipse.vorto.core.api.model.datatype.PrimitivePropertyType Primitive Property Type</code>'. | getPrimitivePropertyType | {
"repo_name": "hrohmer/vorto",
"path": "bundles/org.eclipse.vorto.core/src/org/eclipse/vorto/core/api/model/datatype/DatatypePackage.java",
"license": "epl-1.0",
"size": 57755
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 194,926 |
public boolean isDataInputPeriodAndDateAllowed( Period period, Date date )
{
return dataInputPeriods.isEmpty() || dataInputPeriods.stream()
.map( dataInputPeriod -> dataInputPeriod.isPeriodAndDateValid( period, date ) )
.reduce( ( a, b ) -> a || b )
.get();
}
... | boolean function( Period period, Date date ) { return dataInputPeriods.isEmpty() dataInputPeriods.stream() .map( dataInputPeriod -> dataInputPeriod.isPeriodAndDateValid( period, date ) ) .reduce( ( a, b ) -> a b ) .get(); } | /**
* Checks if the given period and date combination conforms to any of the dataInputPeriods.
* Returns true if no dataInputPeriods exists, or the combination conforms to at least one dataInputPeriod.
*
* @param period
* @param date
* @return true if period and date conforms to a dataInpu... | Checks if the given period and date combination conforms to any of the dataInputPeriods. Returns true if no dataInputPeriods exists, or the combination conforms to at least one dataInputPeriod | isDataInputPeriodAndDateAllowed | {
"repo_name": "vmluan/dhis2-core",
"path": "dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataset/DataSet.java",
"license": "bsd-3-clause",
"size": 28471
} | [
"java.util.Date",
"org.hisp.dhis.period.Period"
] | import java.util.Date; import org.hisp.dhis.period.Period; | import java.util.*; import org.hisp.dhis.period.*; | [
"java.util",
"org.hisp.dhis"
] | java.util; org.hisp.dhis; | 125,022 |
public IProvider getProvider() {
return this;
} | IProvider function() { return this; } | /**
* Getter for provider
*
* @return Provider
*/ | Getter for provider | getProvider | {
"repo_name": "ant-media/Ant-Media-Server",
"path": "src/main/java/org/red5/server/stream/ClientBroadcastStream.java",
"license": "apache-2.0",
"size": 34416
} | [
"org.red5.server.messaging.IProvider"
] | import org.red5.server.messaging.IProvider; | import org.red5.server.messaging.*; | [
"org.red5.server"
] | org.red5.server; | 1,666,293 |
protected Label getDefaultLabel() {
return defaultLabel;
} | Label function() { return defaultLabel; } | /**
* Return the label that invites the user to click the button.
*/ | Return the label that invites the user to click the button | getDefaultLabel | {
"repo_name": "McGill-DP-Group/seg.jUCMNav",
"path": "src/seg/jUCMNav/views/property/descriptors/CodeCellEditor.java",
"license": "epl-1.0",
"size": 4121
} | [
"org.eclipse.swt.widgets.Label"
] | import org.eclipse.swt.widgets.Label; | import org.eclipse.swt.widgets.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 2,481,570 |
private void checkFields() throws JabRefException {
if (isEmptyField(hostField)) {
hostField.requestFocus();
throw new JabRefException(Localization.lang("Required field \"%0\" is empty.", Localization.lang("Host")));
}
if (isEmptyField(portField)) {
portFi... | void function() throws JabRefException { if (isEmptyField(hostField)) { hostField.requestFocus(); throw new JabRefException(Localization.lang(STR%0\STR, Localization.lang("Host"))); } if (isEmptyField(portField)) { portField.requestFocus(); throw new JabRefException(Localization.lang(STR%0\STR, Localization.lang("Port"... | /**
* Checks every required text field for emptiness.
*/ | Checks every required text field for emptiness | checkFields | {
"repo_name": "shitikanth/jabref",
"path": "src/main/java/org/jabref/gui/shared/ConnectToSharedDatabaseDialog.java",
"license": "mit",
"size": 20017
} | [
"org.jabref.JabRefException",
"org.jabref.logic.l10n.Localization"
] | import org.jabref.JabRefException; import org.jabref.logic.l10n.Localization; | import org.jabref.*; import org.jabref.logic.l10n.*; | [
"org.jabref",
"org.jabref.logic"
] | org.jabref; org.jabref.logic; | 2,754,136 |
@Override
boolean isAuthException(SQLException x) {
int ec = x.getErrorCode();
return x instanceof SQLInvalidAuthorizationSpecException
|| x.getSQLState() != null && x.getSQLState().startsWith("28")
|| ec >= 18450 && ec <= 18452
|| ec >= 18456 && ec <... | boolean isAuthException(SQLException x) { int ec = x.getErrorCode(); return x instanceof SQLInvalidAuthorizationSpecException x.getSQLState() != null && x.getSQLState().startsWith("28") ec >= 18450 && ec <= 18452 ec >= 18456 && ec <= 18461 ec == 18470 ec == 18483 ec >= 18485 && ec <= 18488; } | /**
* Determine if the top level exception is an authorization exception.
* Chained exceptions are not checked.
*
* For Microsoft SQL Server, look for the JDBC 4.0 exception subclass
* or the 28xxx SQLState (Invalid authorization specification)
* or an SQL Server error code in (18450..184... | Determine if the top level exception is an authorization exception. Chained exceptions are not checked. For Microsoft SQL Server, look for the JDBC 4.0 exception subclass or the 28xxx SQLState (Invalid authorization specification) or an SQL Server error code in (18450..18452, 18456..18461, 18470, 18483, 18485..18488) | isAuthException | {
"repo_name": "kgibm/open-liberty",
"path": "dev/com.ibm.ws.jdbc/src/com/ibm/ws/rsadapter/impl/MicrosoftSQLServerHelper.java",
"license": "epl-1.0",
"size": 12860
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,097,906 |
public void setTitles(String title) {
if (null != actionBarView) {
TextView titleText = (TextView) actionBarView.findViewById(R.id.txt_title);
titleText.setText(title);
}
} | void function(String title) { if (null != actionBarView) { TextView titleText = (TextView) actionBarView.findViewById(R.id.txt_title); titleText.setText(title); } } | /**
* set the title string
*
* @param title
*/ | set the title string | setTitles | {
"repo_name": "EricSun2012/EricWidget",
"path": "app/src/main/java/com/EricSun/EricWidget/Framework/Fragment/BaseFragment.java",
"license": "mit",
"size": 9521
} | [
"android.widget.TextView"
] | import android.widget.TextView; | import android.widget.*; | [
"android.widget"
] | android.widget; | 1,731,303 |
private String getPrototypePropertyNameFromRValue(Node rValue) {
Node lValue = NodeUtil.getBestLValue(rValue);
if (lValue == null ||
lValue.getParent() == null ||
lValue.getParent().getParent() == null ||
!(NodeUtil.isObjectLitKey(lValue) ||
NodeUtil.isExprAssig... | String function(Node rValue) { Node lValue = NodeUtil.getBestLValue(rValue); if (lValue == null lValue.getParent() == null lValue.getParent().getParent() == null !(NodeUtil.isObjectLitKey(lValue) NodeUtil.isExprAssign(lValue.getParent().getParent()))) { return null; } String lValueName = NodeUtil.getBestLValueName(Node... | /**
* Returns the name of a prototype property being assigned to this r-value.
*
* Returns null if this is not the R-value of a prototype property, or if
* the R-value is used in multiple expressions (i.e., if there's
* a prototype property assignment in a more complex expression).
*/ | Returns the name of a prototype property being assigned to this r-value. Returns null if this is not the R-value of a prototype property, or if the R-value is used in multiple expressions (i.e., if there's a prototype property assignment in a more complex expression) | getPrototypePropertyNameFromRValue | {
"repo_name": "weitzj/closure-compiler",
"path": "src/com/google/javascript/jscomp/AnalyzePrototypeProperties.java",
"license": "apache-2.0",
"size": 26588
} | [
"com.google.javascript.rhino.Node"
] | import com.google.javascript.rhino.Node; | import com.google.javascript.rhino.*; | [
"com.google.javascript"
] | com.google.javascript; | 1,582,126 |
public boolean equalType(HttpMessage msg) {
boolean result = false;
// compare method
if (!this.getRequestHeader().getMethod().equalsIgnoreCase(msg.getRequestHeader().getMethod())) {
return false;
}
// compare host, port and URI
URI uri1 = this.getRequestHeader(... | boolean function(HttpMessage msg) { boolean result = false; if (!this.getRequestHeader().getMethod().equalsIgnoreCase(msg.getRequestHeader().getMethod())) { return false; } URI uri1 = this.getRequestHeader().getURI(); URI uri2 = msg.getRequestHeader().getURI(); try { if (uri1.getHost() == null uri2.getHost() == null !u... | /**
* 2 messages are equal type if the host, port, path and query names are equal.
* Even though the query value may differ.
* @param msg
* @return
*/ | 2 messages are equal type if the host, port, path and query names are equal. Even though the query value may differ | equalType | {
"repo_name": "DJMIN/zaproxy",
"path": "src/org/parosproxy/paros/network/HttpMessage.java",
"license": "apache-2.0",
"size": 29592
} | [
"org.apache.commons.httpclient.URIException"
] | import org.apache.commons.httpclient.URIException; | import org.apache.commons.httpclient.*; | [
"org.apache.commons"
] | org.apache.commons; | 499,606 |
KieSession getKieSession(); | KieSession getKieSession(); | /**
* Returns <code>KieSession</code> configured for this <code>RuntimeEngine</code>
* @return
*/ | Returns <code>KieSession</code> configured for this <code>RuntimeEngine</code> | getKieSession | {
"repo_name": "mrietveld/droolsjbpm-knowledge",
"path": "kie-api/src/main/java/org/kie/api/runtime/manager/RuntimeEngine.java",
"license": "apache-2.0",
"size": 1663
} | [
"org.kie.api.runtime.KieSession"
] | import org.kie.api.runtime.KieSession; | import org.kie.api.runtime.*; | [
"org.kie.api"
] | org.kie.api; | 747,587 |
protected void commonAssignmentCheck(
AnnotatedTypeMirror varType,
ExpressionTree valueExp,
String errorKey) {
if (shouldSkipUses(valueExp)) {
return;
}
if (varType.getKind() == TypeKind.ARRAY
&& valueExp instanceof NewArrayTre... | void function( AnnotatedTypeMirror varType, ExpressionTree valueExp, String errorKey) { if (shouldSkipUses(valueExp)) { return; } if (varType.getKind() == TypeKind.ARRAY && valueExp instanceof NewArrayTree && ((NewArrayTree) valueExp).getType() == null) { AnnotatedTypeMirror compType = ((AnnotatedArrayType) varType).ge... | /**
* Checks the validity of an assignment (or pseudo-assignment) from a value to a variable and
* emits an error message (through the compiler's messaging interface) if it is not valid.
*
* @param varType the annotated type of the lvalue (usually a variable)
* @param valueExp the AST node for ... | Checks the validity of an assignment (or pseudo-assignment) from a value to a variable and emits an error message (through the compiler's messaging interface) if it is not valid | commonAssignmentCheck | {
"repo_name": "CharlesZ-Chen/checker-framework",
"path": "framework/src/org/checkerframework/common/basetype/BaseTypeVisitor.java",
"license": "gpl-2.0",
"size": 159526
} | [
"com.sun.source.tree.ExpressionTree",
"com.sun.source.tree.NewArrayTree",
"javax.lang.model.type.TypeKind",
"org.checkerframework.framework.type.AnnotatedTypeMirror"
] | import com.sun.source.tree.ExpressionTree; import com.sun.source.tree.NewArrayTree; import javax.lang.model.type.TypeKind; import org.checkerframework.framework.type.AnnotatedTypeMirror; | import com.sun.source.tree.*; import javax.lang.model.type.*; import org.checkerframework.framework.type.*; | [
"com.sun.source",
"javax.lang",
"org.checkerframework.framework"
] | com.sun.source; javax.lang; org.checkerframework.framework; | 1,438,390 |
@Override
public boolean hasTransitionActivityWithParam(Integer workflowID) {
Criteria crit = new Criteria();
crit.addJoin(TRANSITIONACTIVITY, TWorkflowTransitionPeer.OBJECTID);
crit.add(TWorkflowTransitionPeer.WORKFLOW, workflowID);
crit.add(FIELDSETTERRELATION, FieldChangeSetters.PARAMETER);
try {
Li... | boolean function(Integer workflowID) { Criteria crit = new Criteria(); crit.addJoin(TRANSITIONACTIVITY, TWorkflowTransitionPeer.OBJECTID); crit.add(TWorkflowTransitionPeer.WORKFLOW, workflowID); crit.add(FIELDSETTERRELATION, FieldChangeSetters.PARAMETER); try { List<TWorkflowActivity> list = doSelect(crit); return list... | /**
* Whether the worklflow has parameterized transition activity
* @param workflowID
*/ | Whether the worklflow has parameterized transition activity | hasTransitionActivityWithParam | {
"repo_name": "trackplus/Genji",
"path": "src/main/java/com/aurel/track/persist/TWorkflowActivityPeer.java",
"license": "gpl-3.0",
"size": 11556
} | [
"com.aurel.track.fieldType.fieldChange.FieldChangeSetters",
"java.util.List",
"org.apache.torque.TorqueException",
"org.apache.torque.util.Criteria"
] | import com.aurel.track.fieldType.fieldChange.FieldChangeSetters; import java.util.List; import org.apache.torque.TorqueException; import org.apache.torque.util.Criteria; | import com.aurel.track.*; import java.util.*; import org.apache.torque.*; import org.apache.torque.util.*; | [
"com.aurel.track",
"java.util",
"org.apache.torque"
] | com.aurel.track; java.util; org.apache.torque; | 2,019,224 |
public Adapter createRepresentationExtensionDescriptionAdapter() {
return null;
} | Adapter function() { return null; } | /**
* Creates a new adapter for an object of class '
* {@link org.eclipse.sirius.viewpoint.description.RepresentationExtensionDescription
* <em>Representation Extension Description</em>}'. <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore
* cases; i... | Creates a new adapter for an object of class ' <code>org.eclipse.sirius.viewpoint.description.RepresentationExtensionDescription Representation Extension Description</code>'. This default implementation returns null so that we can easily ignore cases; it's useful to ignore a case when inheritance will catch all the cas... | createRepresentationExtensionDescriptionAdapter | {
"repo_name": "FTSRG/iq-sirius-integration",
"path": "host/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/util/DescriptionAdapterFactory.java",
"license": "epl-1.0",
"size": 31915
} | [
"org.eclipse.emf.common.notify.Adapter"
] | import org.eclipse.emf.common.notify.Adapter; | import org.eclipse.emf.common.notify.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,076,879 |
List<T> list = null;
Collection collection = null;
String[] children = null;
if (log.isErrorEnabled()) {
log.debug("Retrieving all objects from the registry path " + path);
}
try {
list = new ArrayList<T>();
if (!registry.resourceExists(path... | List<T> list = null; Collection collection = null; String[] children = null; if (log.isErrorEnabled()) { log.debug(STR + path); } try { list = new ArrayList<T>(); if (!registry.resourceExists(path)) { if (log.isErrorEnabled()) { log.debug(STR + path); } return list; } collection = (Collection) registry.get(path); child... | /**
* Returns all objects for a given registry path.
*
* @param path registry path
* @return list of all objects in the given registry path
* @throws IdentityException if an error occurs while reading the registry
*/ | Returns all objects for a given registry path | getAllObjects | {
"repo_name": "wso2/carbon-identity-framework",
"path": "components/identity-core/org.wso2.carbon.identity.core/src/main/java/org/wso2/carbon/identity/core/dao/AbstractDAO.java",
"license": "apache-2.0",
"size": 8272
} | [
"java.util.ArrayList",
"java.util.List",
"org.wso2.carbon.identity.base.IdentityException",
"org.wso2.carbon.registry.core.Collection",
"org.wso2.carbon.registry.core.Resource",
"org.wso2.carbon.registry.core.exceptions.RegistryException"
] | import java.util.ArrayList; import java.util.List; import org.wso2.carbon.identity.base.IdentityException; import org.wso2.carbon.registry.core.Collection; import org.wso2.carbon.registry.core.Resource; import org.wso2.carbon.registry.core.exceptions.RegistryException; | import java.util.*; import org.wso2.carbon.identity.base.*; import org.wso2.carbon.registry.core.*; import org.wso2.carbon.registry.core.exceptions.*; | [
"java.util",
"org.wso2.carbon"
] | java.util; org.wso2.carbon; | 1,800,057 |
public Timestamp getCreated();
public static final String COLUMNNAME_CreatedBy = "CreatedBy"; | Timestamp function(); public static final String COLUMNNAME_CreatedBy = STR; | /** Get Created.
* Date this record was created
*/ | Get Created. Date this record was created | getCreated | {
"repo_name": "klst-com/metasfresh",
"path": "de.metas.adempiere.adempiere/base/src/main/java-gen/org/compiere/model/I_AD_TreeNodeCMC.java",
"license": "gpl-2.0",
"size": 4643
} | [
"java.sql.Timestamp"
] | import java.sql.Timestamp; | import java.sql.*; | [
"java.sql"
] | java.sql; | 198,306 |
public static WebDriver setUp(String username, String url, String className, String testName) throws Exception {
if ("true".equals(System.getProperty(REMOTE_JGROWL_ENABLED, "false"))) {
jGrowlEnabled = true;
}
if ("true".equals(System.getProperty(JS_HIGHLIGHT_PROPERTY, "false"))... | static WebDriver function(String username, String url, String className, String testName) throws Exception { if ("true".equals(System.getProperty(REMOTE_JGROWL_ENABLED, "false"))) { jGrowlEnabled = true; } if ("true".equals(System.getProperty(JS_HIGHLIGHT_PROPERTY, "false"))) { jsHighlightEnabled = true; if (System.get... | /**
* Setup the WebDriver test, login, and load the given web page
*
* @param username
* @param url
* @param className
* @param testName
* @return driver
* @throws Exception
*/ | Setup the WebDriver test, login, and load the given web page | setUp | {
"repo_name": "ua-eas/ksd-kc5.2.1-rice2.3.6-ua",
"path": "rice-middleware/sampleapp/src/it/java/edu/samplu/common/WebDriverUtil.java",
"license": "apache-2.0",
"size": 23243
} | [
"java.io.BufferedReader",
"java.io.InputStream",
"java.io.InputStreamReader",
"java.util.LinkedList",
"java.util.List",
"java.util.concurrent.TimeUnit",
"org.openqa.selenium.WebDriver"
] | import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; import java.util.LinkedList; import java.util.List; import java.util.concurrent.TimeUnit; import org.openqa.selenium.WebDriver; | import java.io.*; import java.util.*; import java.util.concurrent.*; import org.openqa.selenium.*; | [
"java.io",
"java.util",
"org.openqa.selenium"
] | java.io; java.util; org.openqa.selenium; | 509,928 |
public final void send(Object id, Component component) {
if (component != null) {
component._getComponent().propagate(this);
try {
if (this.componentClass.isAssignableFrom(component.getClass())) {
this.execute(component);
}
} catch (Exception e) {
throw Exceptio... | final void function(Object id, Component component) { if (component != null) { component._getComponent().propagate(this); try { if (this.componentClass.isAssignableFrom(component.getClass())) { this.execute(component); } } catch (Exception e) { throw ExceptionUtil.uncheckException(e); } } } | /**
* Send method that causes {@link #execute(Component)} to be called for each <code>Component</code> in hierarchy or
* just with those <code>Component</code>s which are instances of the defined <code>componentClass</code>.
*
* @see org.araneaframework.Message#send(java.lang.Object, org.araneaframework.Co... | Send method that causes <code>#execute(Component)</code> to be called for each <code>Component</code> in hierarchy or just with those <code>Component</code>s which are instances of the defined <code>componentClass</code> | send | {
"repo_name": "nortal/araneaframework",
"path": "src/org/araneaframework/core/BroadcastMessage.java",
"license": "apache-2.0",
"size": 2753
} | [
"org.araneaframework.Component",
"org.araneaframework.core.util.ExceptionUtil"
] | import org.araneaframework.Component; import org.araneaframework.core.util.ExceptionUtil; | import org.araneaframework.*; import org.araneaframework.core.util.*; | [
"org.araneaframework",
"org.araneaframework.core"
] | org.araneaframework; org.araneaframework.core; | 2,055,028 |
@Override Queryable<TSource> except(Enumerable<TSource> enumerable,
EqualityComparer<TSource> comparer, boolean all);
TSource first(FunctionExpression<Predicate1<TSource>> predicate); | @Override Queryable<TSource> except(Enumerable<TSource> enumerable, EqualityComparer<TSource> comparer, boolean all); TSource first(FunctionExpression<Predicate1<TSource>> predicate); | /**
* Returns the first element of a sequence that
* satisfies a specified condition.
*/ | Returns the first element of a sequence that satisfies a specified condition | first | {
"repo_name": "julianhyde/calcite",
"path": "linq4j/src/main/java/org/apache/calcite/linq4j/ExtendedQueryable.java",
"license": "apache-2.0",
"size": 26708
} | [
"org.apache.calcite.linq4j.function.EqualityComparer",
"org.apache.calcite.linq4j.function.Predicate1",
"org.apache.calcite.linq4j.tree.FunctionExpression"
] | import org.apache.calcite.linq4j.function.EqualityComparer; import org.apache.calcite.linq4j.function.Predicate1; import org.apache.calcite.linq4j.tree.FunctionExpression; | import org.apache.calcite.linq4j.function.*; import org.apache.calcite.linq4j.tree.*; | [
"org.apache.calcite"
] | org.apache.calcite; | 1,938,372 |
public Builder addQuoteIncludeDir(PathFragment quoteIncludeDir) {
quoteIncludeDirs.add(quoteIncludeDir);
return this;
} | Builder function(PathFragment quoteIncludeDir) { quoteIncludeDirs.add(quoteIncludeDir); return this; } | /**
* Add a single include directory to be added with "-iquote". It can be either relative to the
* exec root (see {@link
* com.google.devtools.build.lib.analysis.BlazeDirectories#getExecRoot(String)}) or absolute.
* Before it is stored, the include directory is normalized.
*/ | Add a single include directory to be added with "-iquote". It can be either relative to the exec root (see <code>com.google.devtools.build.lib.analysis.BlazeDirectories#getExecRoot(String)</code>) or absolute. Before it is stored, the include directory is normalized | addQuoteIncludeDir | {
"repo_name": "meteorcloudy/bazel",
"path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CcCompilationContext.java",
"license": "apache-2.0",
"size": 59940
} | [
"com.google.devtools.build.lib.vfs.PathFragment"
] | import com.google.devtools.build.lib.vfs.PathFragment; | import com.google.devtools.build.lib.vfs.*; | [
"com.google.devtools"
] | com.google.devtools; | 1,250,524 |
public double getXValue(int series, int item) {
OHLCSeries s = (OHLCSeries) this.data.get(series);
OHLCItem di = (OHLCItem) s.getDataItem(item);
RegularTimePeriod period = di.getPeriod();
return getX(period);
}
| double function(int series, int item) { OHLCSeries s = (OHLCSeries) this.data.get(series); OHLCItem di = (OHLCItem) s.getDataItem(item); RegularTimePeriod period = di.getPeriod(); return getX(period); } | /**
* Returns the x-value for an item within a series.
*
* @param series the series index.
* @param item the item index.
*
* @return The x-value.
*/ | Returns the x-value for an item within a series | getXValue | {
"repo_name": "fluidware/Eastwood-Charts",
"path": "source/org/jfree/data/time/ohlc/OHLCSeriesCollection.java",
"license": "lgpl-2.1",
"size": 14812
} | [
"org.jfree.data.time.RegularTimePeriod"
] | import org.jfree.data.time.RegularTimePeriod; | import org.jfree.data.time.*; | [
"org.jfree.data"
] | org.jfree.data; | 1,227,286 |
public Registration addExpandListener(ExpandListener<T> listener) {
return addListener(ExpandEvent.class, listener,
ExpandListener.EXPAND_METHOD);
} | Registration function(ExpandListener<T> listener) { return addListener(ExpandEvent.class, listener, ExpandListener.EXPAND_METHOD); } | /**
* Adds an ExpandListener to this TreeGrid.
*
* @see ExpandEvent
*
* @param listener
* the listener to add
* @return a registration for the listener
*/ | Adds an ExpandListener to this TreeGrid | addExpandListener | {
"repo_name": "peterl1084/framework",
"path": "server/src/main/java/com/vaadin/ui/TreeGrid.java",
"license": "apache-2.0",
"size": 19896
} | [
"com.vaadin.event.ExpandEvent",
"com.vaadin.shared.Registration"
] | import com.vaadin.event.ExpandEvent; import com.vaadin.shared.Registration; | import com.vaadin.event.*; import com.vaadin.shared.*; | [
"com.vaadin.event",
"com.vaadin.shared"
] | com.vaadin.event; com.vaadin.shared; | 1,646,452 |
protected EObject createInitialModel() {
EClass eClass = (EClass)selPackage.getEClassifier(initialObjectCreationPage.getInitialObjectName());
EObject rootObject = selFactory.create(eClass);
return rootObject;
} | EObject function() { EClass eClass = (EClass)selPackage.getEClassifier(initialObjectCreationPage.getInitialObjectName()); EObject rootObject = selFactory.create(eClass); return rootObject; } | /**
* Create a new model.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | Create a new model. | createInitialModel | {
"repo_name": "afraisse/BrowserAutomationDSL",
"path": "Selenium.editor/src/org/xtext/emn/selenium/sel/presentation/SelModelWizard.java",
"license": "gpl-3.0",
"size": 17543
} | [
"org.eclipse.emf.ecore.EClass",
"org.eclipse.emf.ecore.EObject"
] | import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EObject; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,356,400 |
@Test
public void test_GetStaceyKramersInstance() {
//Tests that a StaceyKramer instance is created
System.out.println("Testing InitialPbModelET's getStaceyKramersInstance()");
AbstractRatiosDataModel result = InitialPbModelET.getStaceyKramersInstance();
String expResult... | void function() { System.out.println(STR); AbstractRatiosDataModel result = InitialPbModelET.getStaceyKramersInstance(); String expResult=STR; String res=result.getClassNameAliasForXML(); assertEquals(expResult,res); expResult=STR; res=result.getModelName(); assertEquals(expResult,res); expResult=STR; res=result.getLab... | /**
* Test of get_StaceyKramersInstance method, of class InitialPbModelET.
*/ | Test of get_StaceyKramersInstance method, of class InitialPbModelET | test_GetStaceyKramersInstance | {
"repo_name": "bowring/ET_Redux",
"path": "src/test/java/org/earthtime/ratioDataModels/initialPbModelsET/InitialPbModelETTest.java",
"license": "apache-2.0",
"size": 20412
} | [
"java.text.SimpleDateFormat",
"java.util.Calendar",
"java.util.Map",
"org.earthtime.ratioDataModels.AbstractRatiosDataModel",
"org.junit.Assert"
] | import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Map; import org.earthtime.ratioDataModels.AbstractRatiosDataModel; import org.junit.Assert; | import java.text.*; import java.util.*; import org.earthtime.*; import org.junit.*; | [
"java.text",
"java.util",
"org.earthtime",
"org.junit"
] | java.text; java.util; org.earthtime; org.junit; | 1,560,386 |
public Map<String, Long> generateHashes(); | Map<String, Long> function(); | /**
* Generate hashes
*
* @return new map with gravatar hashes
*/ | Generate hashes | generateHashes | {
"repo_name": "jbossorg/jive-gravatar",
"path": "src/main/java/org/jboss/community/sbs/plugin/gravatar/GravatarManager.java",
"license": "apache-2.0",
"size": 821
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,505,387 |
public RowMetaInterface createResultRowMetaInterface() {
RowMetaInterface rm = new RowMeta();
ValueMetaInterface[] valuesMeta = {
new ValueMeta("a", ValueMeta.TYPE_INTEGER),
new ValueMeta("b", ValueMeta.TYPE_STRING),
new Value... | RowMetaInterface function() { RowMetaInterface rm = new RowMeta(); ValueMetaInterface[] valuesMeta = { new ValueMeta("a", ValueMeta.TYPE_INTEGER), new ValueMeta("b", ValueMeta.TYPE_STRING), new ValueMeta("c", ValueMeta.TYPE_STRING), new ValueMeta("d", ValueMeta.TYPE_STRING), new ValueMeta("e", ValueMeta.TYPE_STRING), n... | /**
* Creates a row meta interface for the fields that
* are defined by performing a getFields and by
* checking "Result filenames - Add filenames to result
* from "Text File Input" dialog.
*
* @return
*/ | Creates a row meta interface for the fields that are defined by performing a getFields and by checking "Result filenames - Add filenames to result from "Text File Input" dialog | createResultRowMetaInterface | {
"repo_name": "dianhu/Kettle-Research",
"path": "test/org/pentaho/di/trans/steps/textfileinput/TextFileInputTests.java",
"license": "lgpl-2.1",
"size": 14086
} | [
"org.pentaho.di.core.row.RowMeta",
"org.pentaho.di.core.row.RowMetaInterface",
"org.pentaho.di.core.row.ValueMeta",
"org.pentaho.di.core.row.ValueMetaInterface"
] | import org.pentaho.di.core.row.RowMeta; import org.pentaho.di.core.row.RowMetaInterface; import org.pentaho.di.core.row.ValueMeta; import org.pentaho.di.core.row.ValueMetaInterface; | import org.pentaho.di.core.row.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 2,430,119 |
public void testCoordRerunDate4() throws Exception {
final String jobId = "0000000-" + new Date().getTime() + "-testCoordRerun-C";
final int actionNum1 = 1;
final int actionNum2 = 2;
final String actionId1 = jobId + "@" + actionNum1;
final String actionId2 = jobId + "@" + act... | void function() throws Exception { final String jobId = STR + new Date().getTime() + STR; final int actionNum1 = 1; final int actionNum2 = 2; final String actionId1 = jobId + "@" + actionNum1; final String actionId2 = jobId + "@" + actionNum2; CoordinatorStore store = Services.get().get(StoreService.class).getStore(Coo... | /**
* Test : rerun <jobId> -date 2009-12-15T01:00Z::2009-12-17T01:00Z -nocleanup 2009-12-17T01:00Z is not in the action
* list, but Oozie will tolerate this.
*
* @throws Exception
*/ | list, but Oozie will tolerate this | testCoordRerunDate4 | {
"repo_name": "terrancesnyder/oozie-hadoop2",
"path": "core/src/test/java/org/apache/oozie/command/coord/TestCoordRerunXCommand.java",
"license": "apache-2.0",
"size": 52196
} | [
"java.util.Date",
"org.apache.oozie.CoordinatorActionBean",
"org.apache.oozie.client.CoordinatorAction",
"org.apache.oozie.client.CoordinatorJob",
"org.apache.oozie.client.OozieClient",
"org.apache.oozie.client.rest.RestConstants",
"org.apache.oozie.local.LocalOozie",
"org.apache.oozie.service.Service... | import java.util.Date; import org.apache.oozie.CoordinatorActionBean; import org.apache.oozie.client.CoordinatorAction; import org.apache.oozie.client.CoordinatorJob; import org.apache.oozie.client.OozieClient; import org.apache.oozie.client.rest.RestConstants; import org.apache.oozie.local.LocalOozie; import org.apach... | import java.util.*; import org.apache.oozie.*; import org.apache.oozie.client.*; import org.apache.oozie.client.rest.*; import org.apache.oozie.local.*; import org.apache.oozie.service.*; import org.apache.oozie.store.*; | [
"java.util",
"org.apache.oozie"
] | java.util; org.apache.oozie; | 1,047,689 |
public void add(final DependenciesDescriptor descriptor)
throws NullPointerException
{
descriptors.add(Arg.checkNotNull("descriptor", descriptor));
}
// --- business -----------------------------------------------------------
| void function(final DependenciesDescriptor descriptor) throws NullPointerException { descriptors.add(Arg.checkNotNull(STR, descriptor)); } | /**
* Adds the given descriptor to the list of descriptors.
*
* @param descriptor the descriptor to add.
* @throws NullPointerException if {@code descriptor} is <code>null</code>.
*/ | Adds the given descriptor to the list of descriptors | add | {
"repo_name": "KlausBrunner/mvnplugins",
"path": "smartics-jboss-modules-maven-plugin/src/main/java/de/smartics/maven/plugin/jboss/modules/descriptor/ApplyToDependencies.java",
"license": "apache-2.0",
"size": 5887
} | [
"de.smartics.util.lang.Arg"
] | import de.smartics.util.lang.Arg; | import de.smartics.util.lang.*; | [
"de.smartics.util"
] | de.smartics.util; | 2,595,214 |
@Test
public void testSignatureC14NInclusivePartsInbound_1() throws Exception {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
{
WSSSecurityProperties securityProperties = new WSSSecurityProperties();
List<WSSConstants.Action> actions = new ArrayList<WSSConsta... | void function() throws Exception { ByteArrayOutputStream baos = new ByteArrayOutputStream(); { WSSSecurityProperties securityProperties = new WSSSecurityProperties(); List<WSSConstants.Action> actions = new ArrayList<WSSConstants.Action>(); actions.add(WSSConstants.SIGNATURE); securityProperties.setActions(actions); se... | /**
* Since WSS4J hardcoded the C14N algo for References, we test against our framework
*
* @throws Exception
*/ | Since WSS4J hardcoded the C14N algo for References, we test against our framework | testSignatureC14NInclusivePartsInbound_1 | {
"repo_name": "clibois/wss4j",
"path": "ws-security-stax/src/test/java/org/apache/wss4j/stax/test/SignatureTest.java",
"license": "apache-2.0",
"size": 109649
} | [
"java.io.ByteArrayInputStream",
"java.io.ByteArrayOutputStream",
"java.nio.charset.StandardCharsets",
"java.util.ArrayList",
"java.util.List",
"javax.xml.namespace.QName",
"javax.xml.stream.XMLStreamReader",
"javax.xml.stream.XMLStreamWriter",
"org.apache.wss4j.common.bsp.BSPRule",
"org.apache.wss... | import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.List; import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamReader; import javax.xml.stream.XMLStreamWriter; import org.apache.wss4j.common.bsp.B... | import java.io.*; import java.nio.charset.*; import java.util.*; import javax.xml.namespace.*; import javax.xml.stream.*; import org.apache.wss4j.common.bsp.*; import org.apache.wss4j.stax.ext.*; import org.apache.wss4j.stax.setup.*; import org.apache.wss4j.stax.test.utils.*; import org.apache.xml.security.stax.*; impo... | [
"java.io",
"java.nio",
"java.util",
"javax.xml",
"org.apache.wss4j",
"org.apache.xml",
"org.junit",
"org.w3c.dom"
] | java.io; java.nio; java.util; javax.xml; org.apache.wss4j; org.apache.xml; org.junit; org.w3c.dom; | 485,271 |
//@Test
public void testFullNameWithUri() throws RecognitionException {
datalog = parser.parse(CQ_STRINGS[10]);
EXPECTED_RULE_SIZE = 1;
List<CQIE> rules = datalog.getRules();
assertTrue("Mismatch rule size!",
rules.size() == EXPECTED_RULE_SIZE);
// Rule #1
//-- The Head
Function head = rules.ge... | datalog = parser.parse(CQ_STRINGS[10]); EXPECTED_RULE_SIZE = 1; List<CQIE> rules = datalog.getRules(); assertTrue(STR, rules.size() == EXPECTED_RULE_SIZE); Function head = rules.get(0).getHead(); assertNotNull(STR, head); uri = head.getFunctionSymbol().getName(); assertEquals(STR, uri, STRMismatch term size!STRMismatch... | /**
* Testing Scenario #11
*
* @throws RecognitionException
*/ | Testing Scenario #11 | testFullNameWithUri | {
"repo_name": "srapisarda/ontop",
"path": "obdalib-core/src/test/java/it/unibz/inf/ontop/parser/DatalogParserTest.java",
"license": "apache-2.0",
"size": 34146
} | [
"it.unibz.inf.ontop.model.Function",
"it.unibz.inf.ontop.model.Term",
"it.unibz.inf.ontop.model.Variable",
"it.unibz.inf.ontop.model.impl.FunctionalTermImpl",
"it.unibz.inf.ontop.model.impl.URIConstantImpl",
"it.unibz.inf.ontop.model.impl.ValueConstantImpl",
"java.util.List"
] | import it.unibz.inf.ontop.model.Function; import it.unibz.inf.ontop.model.Term; import it.unibz.inf.ontop.model.Variable; import it.unibz.inf.ontop.model.impl.FunctionalTermImpl; import it.unibz.inf.ontop.model.impl.URIConstantImpl; import it.unibz.inf.ontop.model.impl.ValueConstantImpl; import java.util.List; | import it.unibz.inf.ontop.model.*; import it.unibz.inf.ontop.model.impl.*; import java.util.*; | [
"it.unibz.inf",
"java.util"
] | it.unibz.inf; java.util; | 497,119 |
@Test
public void testSetConfigurationBasePath() throws ConfigurationException
{
File deepDir = new File(ConfigurationAssert.TEST_DIR, "config/deep");
Map<String, Object> params = new HashMap<String, Object>();
params.put("fileName", "test.properties");
BaseHierarchicalConfig... | void function() throws ConfigurationException { File deepDir = new File(ConfigurationAssert.TEST_DIR, STR); Map<String, Object> params = new HashMap<String, Object>(); params.put(STR, STR); BaseHierarchicalConfiguration defConfig = createDefinitionConfig(STR, params); defConfig.addProperty(STR, VFSFileSystem.class.getN... | /**
* Tests if the base path is correctly evaluated.
*/ | Tests if the base path is correctly evaluated | testSetConfigurationBasePath | {
"repo_name": "mohanaraosv/commons-configuration",
"path": "src/test/java/org/apache/commons/configuration2/builder/combined/TestCombinedConfigurationBuilderVFS.java",
"license": "apache-2.0",
"size": 3317
} | [
"java.io.File",
"java.util.HashMap",
"java.util.Map",
"org.apache.commons.configuration2.BaseHierarchicalConfiguration",
"org.apache.commons.configuration2.Configuration",
"org.apache.commons.configuration2.ConfigurationAssert",
"org.apache.commons.configuration2.HierarchicalConfiguration",
"org.apach... | import java.io.File; import java.util.HashMap; import java.util.Map; import org.apache.commons.configuration2.BaseHierarchicalConfiguration; import org.apache.commons.configuration2.Configuration; import org.apache.commons.configuration2.ConfigurationAssert; import org.apache.commons.configuration2.HierarchicalConfigur... | import java.io.*; import java.util.*; import org.apache.commons.configuration2.*; import org.apache.commons.configuration2.builder.*; import org.apache.commons.configuration2.ex.*; import org.apache.commons.configuration2.io.*; import org.apache.commons.configuration2.tree.*; import org.junit.*; | [
"java.io",
"java.util",
"org.apache.commons",
"org.junit"
] | java.io; java.util; org.apache.commons; org.junit; | 42,600 |
@WebMethod(operationName = "GroupCount")
@WebResult(name = "GroupCountResult", targetNamespace = "http://footballpool.dataaccess.eu")
@RequestWrapper(localName = "GroupCount", targetNamespace = "http://footballpool.dataaccess.eu", className = "support.GroupCount")
@ResponseWrapper(localName = "GroupCoun... | @WebMethod(operationName = STR) @WebResult(name = STR, targetNamespace = "http: @RequestWrapper(localName = STR, targetNamespace = "http: @ResponseWrapper(localName = "GroupCountResponseSTRhttp: int function(); | /**
* Returns the number of groups in the tournament
*
* @return
* returns int
*/ | Returns the number of groups in the tournament | groupCount | {
"repo_name": "pietrodn/middleware-exe",
"path": "webservices/TestFootballService/src/support/InfoSoapType.java",
"license": "gpl-3.0",
"size": 32295
} | [
"javax.jws.WebMethod",
"javax.jws.WebResult",
"javax.xml.ws.RequestWrapper",
"javax.xml.ws.ResponseWrapper"
] | import javax.jws.WebMethod; import javax.jws.WebResult; import javax.xml.ws.RequestWrapper; import javax.xml.ws.ResponseWrapper; | import javax.jws.*; import javax.xml.ws.*; | [
"javax.jws",
"javax.xml"
] | javax.jws; javax.xml; | 843,094 |
@Test
public void testSremStringT() {
cmd = Command.SISMEMBER.code + " Java Object";
Log.log("TEST: %s command", cmd);
try {
provider.flushdb();
String setkey = keys.get(0);
for(int i=0;i<SMALL_CNT; i++)
assertTrue(provider.sadd(setkey, objectList.get(i)), "sadd of random element should be t... | void function() { cmd = Command.SISMEMBER.code + STR; Log.log(STR, cmd); try { provider.flushdb(); String setkey = keys.get(0); for(int i=0;i<SMALL_CNT; i++) assertTrue(provider.sadd(setkey, objectList.get(i)), STR); for(int i=0;i<SMALL_CNT; i++) assertTrue(provider.srem(setkey, objectList.get(i)), STR); } catch (Redis... | /**
* Test method for {@link org.jredis.ri.alphazero.JRedisSupport#srem(java.lang.String, java.io.Serializable)}.
*/ | Test method for <code>org.jredis.ri.alphazero.JRedisSupport#srem(java.lang.String, java.io.Serializable)</code> | testSremStringT | {
"repo_name": "gshlsh17/jredis",
"path": "core/ri/src/test/java/org/jredis/ri/alphazero/JRedisProviderTestsBase.java",
"license": "apache-2.0",
"size": 119563
} | [
"org.jredis.RedisException",
"org.jredis.protocol.Command",
"org.jredis.ri.alphazero.support.Log",
"org.testng.Assert"
] | import org.jredis.RedisException; import org.jredis.protocol.Command; import org.jredis.ri.alphazero.support.Log; import org.testng.Assert; | import org.jredis.*; import org.jredis.protocol.*; import org.jredis.ri.alphazero.support.*; import org.testng.*; | [
"org.jredis",
"org.jredis.protocol",
"org.jredis.ri",
"org.testng"
] | org.jredis; org.jredis.protocol; org.jredis.ri; org.testng; | 2,517,584 |
public void restoreMessagesFromDeadLetterQueueWithDifferentDestination(long[] messageIDs,
String destination,
String deadLetterQueueName)
throws BrokerMan... | void function(long[] messageIDs, String destination, String deadLetterQueueName) throws BrokerManagerAdminException { try { QueueManagerService queueManagerService = AndesBrokerManagerAdminServiceDSHolder.getInstance().getQueueManagerService(); queueManagerService.restoreMessagesFromDeadLetterQueueWithDifferentDestinat... | /**
* Restore messages from the Dead Letter Queue to another queue in the same tenant.
*
* @param messageIDs Browser Message Id / External Message Id list.
* @param destination The new destination queue for the messages in the same tenant.
* @param deadLetterQueueName Dead Lett... | Restore messages from the Dead Letter Queue to another queue in the same tenant | restoreMessagesFromDeadLetterQueueWithDifferentDestination | {
"repo_name": "chanakaudaya/carbon-business-messaging",
"path": "components/andes/org.wso2.carbon.andes.admin/src/main/java/org/wso2/carbon/andes/admin/AndesAdminService.java",
"license": "apache-2.0",
"size": 40108
} | [
"org.wso2.carbon.andes.admin.internal.Exception",
"org.wso2.carbon.andes.admin.util.AndesBrokerManagerAdminServiceDSHolder",
"org.wso2.carbon.andes.core.QueueManagerException",
"org.wso2.carbon.andes.core.QueueManagerService"
] | import org.wso2.carbon.andes.admin.internal.Exception; import org.wso2.carbon.andes.admin.util.AndesBrokerManagerAdminServiceDSHolder; import org.wso2.carbon.andes.core.QueueManagerException; import org.wso2.carbon.andes.core.QueueManagerService; | import org.wso2.carbon.andes.admin.internal.*; import org.wso2.carbon.andes.admin.util.*; import org.wso2.carbon.andes.core.*; | [
"org.wso2.carbon"
] | org.wso2.carbon; | 377,407 |
public BasicElementConfig leaseTime(String lease) {
return (BasicElementConfig) setOrClear(LEASE_TIME, lease);
} | BasicElementConfig function(String lease) { return (BasicElementConfig) setOrClear(LEASE_TIME, lease); } | /**
* Sets the Lease Time offered by the DHCP Server.
*
* @param lease new lease time; null to clear
* @return self
*/ | Sets the Lease Time offered by the DHCP Server | leaseTime | {
"repo_name": "chinghanyu/onos",
"path": "apps/dhcp/src/main/java/org/onosproject/dhcp/impl/DHCPConfig.java",
"license": "apache-2.0",
"size": 5991
} | [
"org.onosproject.net.config.basics.BasicElementConfig"
] | import org.onosproject.net.config.basics.BasicElementConfig; | import org.onosproject.net.config.basics.*; | [
"org.onosproject.net"
] | org.onosproject.net; | 1,749,904 |
public static int getRank(Player player, AbstractSubSkill abstractSubSkill)
{
String skillName = abstractSubSkill.getConfigKeyName();
int numRanks = abstractSubSkill.getNumRanks();
if(subSkillRanks == null)
subSkillRanks = new HashMap<>();
if(numRanks == 0)
... | static int function(Player player, AbstractSubSkill abstractSubSkill) { String skillName = abstractSubSkill.getConfigKeyName(); int numRanks = abstractSubSkill.getNumRanks(); if(subSkillRanks == null) subSkillRanks = new HashMap<>(); if(numRanks == 0) return -1; if(subSkillRanks.get(skillName) == null && numRanks > 0) ... | /**
* Gets the current rank of the subskill for the player
* @param player The player in question
* @param abstractSubSkill Target subskill
* @return The rank the player currently has achieved in this skill. -1 for skills without ranks.
*/ | Gets the current rank of the subskill for the player | getRank | {
"repo_name": "mcMMO-Dev/mcMMO",
"path": "src/main/java/com/gmail/nossr50/util/skills/RankUtils.java",
"license": "gpl-3.0",
"size": 13371
} | [
"com.gmail.nossr50.datatypes.skills.subskills.AbstractSubSkill",
"com.gmail.nossr50.util.player.UserManager",
"java.util.HashMap",
"org.bukkit.entity.Player"
] | import com.gmail.nossr50.datatypes.skills.subskills.AbstractSubSkill; import com.gmail.nossr50.util.player.UserManager; import java.util.HashMap; import org.bukkit.entity.Player; | import com.gmail.nossr50.datatypes.skills.subskills.*; import com.gmail.nossr50.util.player.*; import java.util.*; import org.bukkit.entity.*; | [
"com.gmail.nossr50",
"java.util",
"org.bukkit.entity"
] | com.gmail.nossr50; java.util; org.bukkit.entity; | 2,742,995 |
public final void testAddUpdateDelete() throws Exception {
{
String name = "connector1";
String typeName = "TestConnectorA";
String language = "en";
String jsonConfigString =
"{Username:foo, Password:bar, Color:red, "
+ "RepositoryFile:MockRepositoryEventLog3.txt... | final void function() throws Exception { { String name = STR; String typeName = STR; String language = "en"; String jsonConfigString = STR + STR; updateConnectorTest(instantiator, name, typeName, language, false, jsonConfigString); } { String name = STR; String typeName = STR; String language = "en"; String jsonConfigS... | /**
* Test method for adding, updating, deleting connectors.
*/ | Test method for adding, updating, deleting connectors | testAddUpdateDelete | {
"repo_name": "googlegsa/manager.v3",
"path": "projects/connector-manager/source/javatests/com/google/enterprise/connector/instantiator/InstantiatorTest.java",
"license": "apache-2.0",
"size": 19991
} | [
"com.google.enterprise.connector.manager.ConnectorManagerException",
"com.google.enterprise.connector.persist.ConnectorExistsException",
"com.google.enterprise.connector.persist.ConnectorNotFoundException",
"com.google.enterprise.connector.spi.AuthenticationManager",
"com.google.enterprise.connector.spi.Aut... | import com.google.enterprise.connector.manager.ConnectorManagerException; import com.google.enterprise.connector.persist.ConnectorExistsException; import com.google.enterprise.connector.persist.ConnectorNotFoundException; import com.google.enterprise.connector.spi.AuthenticationManager; import com.google.enterprise.con... | import com.google.enterprise.connector.manager.*; import com.google.enterprise.connector.persist.*; import com.google.enterprise.connector.spi.*; | [
"com.google.enterprise"
] | com.google.enterprise; | 2,697,620 |
static List<Requirement> mergeRequirements(AbstractCompiler compiler,
List<ConformanceConfig> configs) {
List<Requirement.Builder> builders = new ArrayList<>();
Map<String, Requirement.Builder> extendable = new HashMap<>();
for (ConformanceConfig config : configs) {
for (Requirement requiremen... | static List<Requirement> mergeRequirements(AbstractCompiler compiler, List<ConformanceConfig> configs) { List<Requirement.Builder> builders = new ArrayList<>(); Map<String, Requirement.Builder> extendable = new HashMap<>(); for (ConformanceConfig config : configs) { for (Requirement requirement : config.getRequirementL... | /**
* Gets requirements from all configs. Merges whitelists of requirements with 'extends' equal to
* 'rule_id' of other rule.
*/ | Gets requirements from all configs. Merges whitelists of requirements with 'extends' equal to 'rule_id' of other rule | mergeRequirements | {
"repo_name": "mbebenita/closure-compiler",
"path": "src/com/google/javascript/jscomp/CheckConformance.java",
"license": "apache-2.0",
"size": 9062
} | [
"com.google.protobuf.Descriptors",
"java.util.ArrayList",
"java.util.HashMap",
"java.util.List",
"java.util.Map"
] | import com.google.protobuf.Descriptors; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; | import com.google.protobuf.*; import java.util.*; | [
"com.google.protobuf",
"java.util"
] | com.google.protobuf; java.util; | 1,681,133 |
public void setUser(KaiString user) {
this.user = user;
} | void function(KaiString user) { this.user = user; } | /**
* Setter for property user.
* @param user New value of property user.
*/ | Setter for property user | setUser | {
"repo_name": "yuuakron/jKaiUI_Custom",
"path": "src/pt/jkaiui/core/messages/Chat.java",
"license": "gpl-2.0",
"size": 2507
} | [
"pt.jkaiui.core.KaiString"
] | import pt.jkaiui.core.KaiString; | import pt.jkaiui.core.*; | [
"pt.jkaiui.core"
] | pt.jkaiui.core; | 1,128,093 |
public void addColumn(IColumn column, Component component, IRenderable renderable)
{
if (column.isVisible())
{
// if the column is aligned to the left, just append it.
// Otherwise we prepend it, because we want columns aligned to right
// to be rendered rever... | void function(IColumn column, Component component, IRenderable renderable) { if (column.isVisible()) { if (column.getLocation().getAlignment() == Alignment.LEFT) { columns.add(column); components.add(component); renderables.add(renderable); } else { columns.add(0, column); components.add(0, component); renderables.add(... | /**
* Adds a column to be rendered.
*
* @param column
* The column to add
* @param component
* The component
* @param renderable
* The renderer
*/ | Adds a column to be rendered | addColumn | {
"repo_name": "medicayun/medicayundicom",
"path": "dcm4chee-dashboard/trunk/dcm4chee-dashboard-ui/src/main/java/org/dcm4chee/dashboard/ui/messaging/SideColumnsView.java",
"license": "apache-2.0",
"size": 7973
} | [
"org.apache.wicket.Component",
"org.apache.wicket.extensions.markup.html.tree.table.ColumnLocation",
"org.apache.wicket.extensions.markup.html.tree.table.IColumn",
"org.apache.wicket.extensions.markup.html.tree.table.IRenderable"
] | import org.apache.wicket.Component; import org.apache.wicket.extensions.markup.html.tree.table.ColumnLocation; import org.apache.wicket.extensions.markup.html.tree.table.IColumn; import org.apache.wicket.extensions.markup.html.tree.table.IRenderable; | import org.apache.wicket.*; import org.apache.wicket.extensions.markup.html.tree.table.*; | [
"org.apache.wicket"
] | org.apache.wicket; | 830,653 |
public Context addContext(String path, String docBase, Host host) {
log.debug("Add context - path: {} docbase: {}", path, docBase);
org.apache.catalina.Context c = embedded.createContext(path, docBase);
if (c != null) {
log.trace("Context name: {} docbase: {} encoded: {}", new Object[] { c.getName(), c.... | Context function(String path, String docBase, Host host) { log.debug(STR, path, docBase); org.apache.catalina.Context c = embedded.createContext(path, docBase); if (c != null) { log.trace(STR, new Object[] { c.getName(), c.getDocBase(), c.getEncodedPath() }); ClassLoader classLoader = Thread.currentThread().getContextC... | /**
* Add context for path and docbase to a host.
*
* @param path Path
* @param docBase Document base
* @param host Host to add context to
* @return Catalina context (that is, web application)
*/ | Add context for path and docbase to a host | addContext | {
"repo_name": "OpenCorrelate/red5load",
"path": "red5/src/main/java/org/red5/server/tomcat/TomcatLoader.java",
"license": "lgpl-3.0",
"size": 32291
} | [
"org.apache.catalina.Context",
"org.apache.catalina.Host",
"org.apache.catalina.loader.WebappLoader",
"org.red5.server.LoaderBase"
] | import org.apache.catalina.Context; import org.apache.catalina.Host; import org.apache.catalina.loader.WebappLoader; import org.red5.server.LoaderBase; | import org.apache.catalina.*; import org.apache.catalina.loader.*; import org.red5.server.*; | [
"org.apache.catalina",
"org.red5.server"
] | org.apache.catalina; org.red5.server; | 274,239 |
public static Date truncDate(final Date date) {
return truncDate(date, GENERAL_TIMEZONE);
} | static Date function(final Date date) { return truncDate(date, GENERAL_TIMEZONE); } | /**
* Truncates the date assuming it's in the {@link #GENERAL_TIMEZONE}.
*
* @param date
* the date to be truncated
*
* @return the truncated date
*/ | Truncates the date assuming it's in the <code>#GENERAL_TIMEZONE</code> | truncDate | {
"repo_name": "pmeisen/gen-misc",
"path": "src/net/meisen/general/genmisc/types/Dates.java",
"license": "mit",
"size": 14415
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 551,291 |
JSONObject toJSON(); | JSONObject toJSON(); | /**
* Consents should be convertible into a JSON format.
*
* @return a JSON object representing this consent
*/ | Consents should be convertible into a JSON format | toJSON | {
"repo_name": "alexhenrie/phenotips",
"path": "components/patient-data/api/src/main/java/org/phenotips/data/Consent.java",
"license": "agpl-3.0",
"size": 4003
} | [
"org.json.JSONObject"
] | import org.json.JSONObject; | import org.json.*; | [
"org.json"
] | org.json; | 510,328 |
public void run() throws Exception {
RMCTENPIImpl mImpl = new RMCTENPIImpl();
RemoteMethodControl main = (RemoteMethodControl)
ProxyTrustUtil.newProxyInstance(mImpl,
new InvHandler(mImpl));
ProxyTrust boot = createValidBootProxy();
ProxyTrustIn... | void function() throws Exception { RMCTENPIImpl mImpl = new RMCTENPIImpl(); RemoteMethodControl main = (RemoteMethodControl) ProxyTrustUtil.newProxyInstance(mImpl, new InvHandler(mImpl)); ProxyTrust boot = createValidBootProxy(); ProxyTrustInvocationHandler ptih = createPTIH(main, boot); Object proxy = ProxyTrustUtil.n... | /**
* This method performs all actions mentioned in class description.
*
*/ | This method performs all actions mentioned in class description | run | {
"repo_name": "pfirmstone/JGDMS",
"path": "qa/src/org/apache/river/test/spec/security/proxytrust/proxytrustinvocationhandler/Invoke_ThrowableTest.java",
"license": "apache-2.0",
"size": 6682
} | [
"java.lang.reflect.Method",
"net.jini.core.constraint.RemoteMethodControl",
"net.jini.security.proxytrust.ProxyTrust",
"net.jini.security.proxytrust.ProxyTrustInvocationHandler",
"org.apache.river.qa.harness.TestException",
"org.apache.river.test.spec.security.proxytrust.util.FakeException",
"org.apache... | import java.lang.reflect.Method; import net.jini.core.constraint.RemoteMethodControl; import net.jini.security.proxytrust.ProxyTrust; import net.jini.security.proxytrust.ProxyTrustInvocationHandler; import org.apache.river.qa.harness.TestException; import org.apache.river.test.spec.security.proxytrust.util.FakeExceptio... | import java.lang.reflect.*; import net.jini.core.constraint.*; import net.jini.security.proxytrust.*; import org.apache.river.qa.harness.*; import org.apache.river.test.spec.security.proxytrust.util.*; | [
"java.lang",
"net.jini.core",
"net.jini.security",
"org.apache.river"
] | java.lang; net.jini.core; net.jini.security; org.apache.river; | 396,971 |
@Override
public void onRefresh() {
// mSwipeLayout.setRefreshing(false);
if (ConnectionManager.getInstance().isOnline(getActivity())) {
new GetRssFeed().execute("http://feeds.feedburner.com/Anda-AgnciaDeNotciasDeDireitosAnimais?format=xml");
} else {
SnackbarUtils... | void function() { if (ConnectionManager.getInstance().isOnline(getActivity())) { new GetRssFeed().execute("http: } else { SnackbarUtils.showNoInternetConnectionSnackbar(getActivity(), mSwipeLayout); mSwipeLayout.setRefreshing(false); } } | /**
* Required by SwipeRefreshLayout.OnRefreshListener interface. It is called when user manually refreshes RecyclerView.
*/ | Required by SwipeRefreshLayout.OnRefreshListener interface. It is called when user manually refreshes RecyclerView | onRefresh | {
"repo_name": "LibertACAO/libertacao-android",
"path": "app/src/main/java/com/libertacao/libertacao/view/rssitem/ThirdPartyNewsFragment.java",
"license": "gpl-3.0",
"size": 5099
} | [
"com.libertacao.libertacao.manager.ConnectionManager",
"com.libertacao.libertacao.util.SnackbarUtils"
] | import com.libertacao.libertacao.manager.ConnectionManager; import com.libertacao.libertacao.util.SnackbarUtils; | import com.libertacao.libertacao.manager.*; import com.libertacao.libertacao.util.*; | [
"com.libertacao.libertacao"
] | com.libertacao.libertacao; | 476,122 |
void setObjectTags(String bucketName, String key, List<Tag> tags); | void setObjectTags(String bucketName, String key, List<Tag> tags); | /**
* Updates the object tags for the given object
* @param bucketName The bucket name
* @param key The object key
* @param tags The set of tags for the object (will replace the existing ones)
*/ | Updates the object tags for the given object | setObjectTags | {
"repo_name": "Sage-Bionetworks/Synapse-Repository-Services",
"path": "lib/stackConfiguration/src/main/java/org/sagebionetworks/aws/SynapseS3Client.java",
"license": "apache-2.0",
"size": 5837
} | [
"com.amazonaws.services.s3.model.Tag",
"java.util.List"
] | import com.amazonaws.services.s3.model.Tag; import java.util.List; | import com.amazonaws.services.s3.model.*; import java.util.*; | [
"com.amazonaws.services",
"java.util"
] | com.amazonaws.services; java.util; | 1,616,253 |
@Query("select cl.pointsToPass from CareerLevel cl, User u " +
"where cl.id = u.careerLevel.id and u.id = :userId order by cl.id")
public Integer findPointsToPassPerLevelByUserId(@Param("userId")Long id); | @Query(STR + STR) Integer function(@Param(STR)Long id); | /**
* Returns a list of points to pass per level tasks
*@param id Id of user.
*/ | Returns a list of points to pass per level tasks | findPointsToPassPerLevelByUserId | {
"repo_name": "nsirbu/CareerLevels",
"path": "src/main/java/com/inthergroup/internship/repositories/TodoRepository.java",
"license": "mit",
"size": 7552
} | [
"org.springframework.data.jpa.repository.Query",
"org.springframework.data.repository.query.Param"
] | import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; | import org.springframework.data.jpa.repository.*; import org.springframework.data.repository.query.*; | [
"org.springframework.data"
] | org.springframework.data; | 752,766 |
List<Remote> remoteList(RemoteListRequest request) throws GitException; | List<Remote> remoteList(RemoteListRequest request) throws GitException; | /**
* Show remotes.
*
* @param request
* remote list request
* @throws GitException
* if any error occurs
* @throws IllegalArgumentException
* if remote <code>name</code> not found
* @see RemoteListRequest
*/ | Show remotes | remoteList | {
"repo_name": "Mirage20/che",
"path": "wsagent/che-core-api-git/src/main/java/org/eclipse/che/api/git/GitConnection.java",
"license": "epl-1.0",
"size": 16171
} | [
"java.util.List",
"org.eclipse.che.api.git.exception.GitException",
"org.eclipse.che.api.git.shared.Remote",
"org.eclipse.che.api.git.shared.RemoteListRequest"
] | import java.util.List; import org.eclipse.che.api.git.exception.GitException; import org.eclipse.che.api.git.shared.Remote; import org.eclipse.che.api.git.shared.RemoteListRequest; | import java.util.*; import org.eclipse.che.api.git.exception.*; import org.eclipse.che.api.git.shared.*; | [
"java.util",
"org.eclipse.che"
] | java.util; org.eclipse.che; | 2,097,892 |
protected void onPtrSaveInstanceState(Bundle saveState) {
} | void function(Bundle saveState) { } | /**
* Called by {@link #onSaveInstanceState()} so that derivative classes can
* save their instance state.
*
* @param saveState - Bundle to be updated with saved state.
*/ | Called by <code>#onSaveInstanceState()</code> so that derivative classes can save their instance state | onPtrSaveInstanceState | {
"repo_name": "jiangshanwe/account",
"path": "src/com/jiang/shanwe/swiperefresh/PullToRefreshBase.java",
"license": "apache-2.0",
"size": 55801
} | [
"android.os.Bundle"
] | import android.os.Bundle; | import android.os.*; | [
"android.os"
] | android.os; | 2,248,203 |
@Override
protected void wipeLocal() throws Exception {
// Reset, then clear data.
this.resetLocal();
final WipeWaiter monitor = new WipeWaiter();
final Context context = session.getContext();
final Repository r = this.getLocalRepository(); | void function() throws Exception { this.resetLocal(); final WipeWaiter monitor = new WipeWaiter(); final Context context = session.getContext(); final Repository r = this.getLocalRepository(); | /**
* Synchronously wipe this stage by instantiating a local repository session
* and wiping that.
* <p>
* Logs and re-throws an exception on failure.
*/ | Synchronously wipe this stage by instantiating a local repository session and wiping that. Logs and re-throws an exception on failure | wipeLocal | {
"repo_name": "jrconlin/mc_backup",
"path": "base/sync/stage/ServerSyncStage.java",
"license": "mpl-2.0",
"size": 23457
} | [
"android.content.Context",
"org.mozilla.gecko.sync.repositories.Repository"
] | import android.content.Context; import org.mozilla.gecko.sync.repositories.Repository; | import android.content.*; import org.mozilla.gecko.sync.repositories.*; | [
"android.content",
"org.mozilla.gecko"
] | android.content; org.mozilla.gecko; | 1,354,332 |
@Override
public String getText(Object object) {
String[] tmp = ((MCommonPackageItem)object).getUri().split("[.]");
String label = "";
if (tmp != null && tmp.length >= 1)
label = tmp[tmp.length-1];
return label == null || label.length() == 0 ?
getString("_UI_MPDLItemMicroprocessor_type") :
getStrin... | String function(Object object) { String[] tmp = ((MCommonPackageItem)object).getUri().split("[.]"); String label = STR_UI_MPDLItemMicroprocessor_typeSTR_UI_MPDLItemMicroprocessor_typeSTR " + label; } | /**
* This returns the label text for the adapted class.
* @generated NOT
*/ | This returns the label text for the adapted class | getText | {
"repo_name": "parraman/micobs",
"path": "common/es.uah.aut.srg.micobs.pdl/src/es/uah/aut/srg/micobs/pdl/library/pdllibrary/provider/MPDLItemMicroprocessorItemProvider.java",
"license": "epl-1.0",
"size": 4187
} | [
"es.uah.aut.srg.micobs.common.MCommonPackageItem"
] | import es.uah.aut.srg.micobs.common.MCommonPackageItem; | import es.uah.aut.srg.micobs.common.*; | [
"es.uah.aut"
] | es.uah.aut; | 2,520,860 |
private ParameterList getExtensionParams(String extensionTypeUri)
{
ParameterList extension = new ParameterList();
if (hasExtension(extensionTypeUri))
{
String extensionAlias = getExtensionAlias(extensionTypeUri);
Iterator iter = getParameters().iterator();
... | ParameterList function(String extensionTypeUri) { ParameterList extension = new ParameterList(); if (hasExtension(extensionTypeUri)) { String extensionAlias = getExtensionAlias(extensionTypeUri); Iterator iter = getParameters().iterator(); while (iter.hasNext()) { Parameter param = (Parameter) iter.next(); String param... | /**
* Retrieves the parameters associated with a protocol extension,
* specified by the given extension type URI.
* <p>
* The "openid.ns.<extension_alias>" parameter is NOT included in the
* returned list. Also, the returned parameter names will have the
* "openid.<extension_alias>." prefi... | Retrieves the parameters associated with a protocol extension, specified by the given extension type URI. The "openid.ns." parameter is NOT included in the returned list. Also, the returned parameter names will have the "openid.." prefix removed | getExtensionParams | {
"repo_name": "WdWeaver/openid4java-gae-hacks",
"path": "src/org/openid4java/message/Message.java",
"license": "apache-2.0",
"size": 17103
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 1,794,667 |
protected void addSingletonFactory(String beanName, ObjectFactory singletonFactory) {
Assert.notNull(singletonFactory, "Singleton factory must not be null");
synchronized (this.singletonObjects) {
if (!this.singletonObjects.containsKey(beanName)) {
this.singletonFactories.put(beanName, singletonFactory);
... | void function(String beanName, ObjectFactory singletonFactory) { Assert.notNull(singletonFactory, STR); synchronized (this.singletonObjects) { if (!this.singletonObjects.containsKey(beanName)) { this.singletonFactories.put(beanName, singletonFactory); this.earlySingletonObjects.remove(beanName); this.registeredSingleto... | /**
* Add the given singleton factory for building the specified singleton
* if necessary.
* <p>To be called for eager registration of singletons, e.g. to be able to
* resolve circular references.
* @param beanName the name of the bean
* @param singletonFactory the factory for the singleton object
*/ | Add the given singleton factory for building the specified singleton if necessary. To be called for eager registration of singletons, e.g. to be able to resolve circular references | addSingletonFactory | {
"repo_name": "deathspeeder/class-guard",
"path": "spring-framework-3.2.x/spring-beans/src/main/java/org/springframework/beans/factory/support/DefaultSingletonBeanRegistry.java",
"license": "gpl-2.0",
"size": 21103
} | [
"org.springframework.beans.factory.ObjectFactory",
"org.springframework.util.Assert"
] | import org.springframework.beans.factory.ObjectFactory; import org.springframework.util.Assert; | import org.springframework.beans.factory.*; import org.springframework.util.*; | [
"org.springframework.beans",
"org.springframework.util"
] | org.springframework.beans; org.springframework.util; | 640,698 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.