method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public synchronized List<Item> getUnblockedItems() {
List<Item> queuedNotBlocked = new ArrayList<Item>();
queuedNotBlocked.addAll(waitingList);
queuedNotBlocked.addAll(buildables);
queuedNotBlocked.addAll(pendings);
// but not 'blockedProjects'
return queuedNotBlocked;
... | synchronized List<Item> function() { List<Item> queuedNotBlocked = new ArrayList<Item>(); queuedNotBlocked.addAll(waitingList); queuedNotBlocked.addAll(buildables); queuedNotBlocked.addAll(pendings); return queuedNotBlocked; } | /**
* Gets all items that are in the queue but not blocked
*
* @since 1.402
*/ | Gets all items that are in the queue but not blocked | getUnblockedItems | {
"repo_name": "mpeltonen/jenkins",
"path": "core/src/main/java/hudson/model/Queue.java",
"license": "mit",
"size": 65714
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,542,381 |
public boolean registerSlotRequest(SlotRequest slotRequest) throws SlotManagerException {
checkInit();
if (checkDuplicateRequest(slotRequest.getAllocationId())) {
LOG.debug("Ignoring a duplicate slot request with allocation id {}.", slotRequest.getAllocationId());
return false;
} else {
PendingSlotR... | boolean function(SlotRequest slotRequest) throws SlotManagerException { checkInit(); if (checkDuplicateRequest(slotRequest.getAllocationId())) { LOG.debug(STR, slotRequest.getAllocationId()); return false; } else { PendingSlotRequest pendingSlotRequest = new PendingSlotRequest(slotRequest); pendingSlotRequests.put(slot... | /**
* Requests a slot with the respective resource profile.
*
* @param slotRequest specifying the requested slot specs
* @return true if the slot request was registered; false if the request is a duplicate
* @throws SlotManagerException if the slot request failed (e.g. not enough resources left)
*/ | Requests a slot with the respective resource profile | registerSlotRequest | {
"repo_name": "haohui/flink",
"path": "flink-runtime/src/main/java/org/apache/flink/runtime/resourcemanager/slotmanager/SlotManager.java",
"license": "apache-2.0",
"size": 33659
} | [
"org.apache.flink.runtime.resourcemanager.SlotRequest",
"org.apache.flink.runtime.resourcemanager.exceptions.ResourceManagerException"
] | import org.apache.flink.runtime.resourcemanager.SlotRequest; import org.apache.flink.runtime.resourcemanager.exceptions.ResourceManagerException; | import org.apache.flink.runtime.resourcemanager.*; import org.apache.flink.runtime.resourcemanager.exceptions.*; | [
"org.apache.flink"
] | org.apache.flink; | 380,315 |
void interruptIfIdle() {
final ReentrantLock runLock = this.runLock;
if (runLock.tryLock()) {
try {
thread.interrupt();
} finally {
runLock.unlock();
}
}
}
| void interruptIfIdle() { final ReentrantLock runLock = this.runLock; if (runLock.tryLock()) { try { thread.interrupt(); } finally { runLock.unlock(); } } } | /**
* Interrupt thread if not running a task
*/ | Interrupt thread if not running a task | interruptIfIdle | {
"repo_name": "WilliamRen/bbossgroups-3.5",
"path": "bboss-rpc/src-thread/org/frameworkset/thread/ThreadPoolExecutor.java",
"license": "apache-2.0",
"size": 57994
} | [
"java.util.concurrent.locks.ReentrantLock"
] | import java.util.concurrent.locks.ReentrantLock; | import java.util.concurrent.locks.*; | [
"java.util"
] | java.util; | 911,944 |
public static List<VisualTheme> getAvailableThemes(Delegator delegator, String visualThemeSetId)
throws GenericEntityException {
if (themeVisualThemeIdCache.size() == 0) {
synchronized (ThemeFactory.class) {
if (themeVisualThemeIdCache.size() == 0) {
pullM... | static List<VisualTheme> function(Delegator delegator, String visualThemeSetId) throws GenericEntityException { if (themeVisualThemeIdCache.size() == 0) { synchronized (ThemeFactory.class) { if (themeVisualThemeIdCache.size() == 0) { pullModelThemesFromXmlToCache(); } } } LinkedHashMap<String, VisualTheme> visualThemes... | /**
* Return all visual theme available corresponding to all entries on the entity VisualTheme who have linked to a modelTheme
* @param delegator
* @param visualThemeSetId
* @return
* @throws GenericEntityException
*/ | Return all visual theme available corresponding to all entries on the entity VisualTheme who have linked to a modelTheme | getAvailableThemes | {
"repo_name": "ilscipio/scipio-erp",
"path": "framework/widget/src/org/ofbiz/widget/model/ThemeFactory.java",
"license": "apache-2.0",
"size": 10432
} | [
"java.util.ArrayList",
"java.util.LinkedHashMap",
"java.util.List",
"org.ofbiz.base.util.UtilMisc",
"org.ofbiz.entity.Delegator",
"org.ofbiz.entity.GenericEntityException",
"org.ofbiz.entity.GenericValue",
"org.ofbiz.entity.condition.EntityCondition",
"org.ofbiz.entity.util.EntityUtil",
"org.ofbiz... | import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import org.ofbiz.base.util.UtilMisc; import org.ofbiz.entity.Delegator; import org.ofbiz.entity.GenericEntityException; import org.ofbiz.entity.GenericValue; import org.ofbiz.entity.condition.EntityCondition; import org.ofbiz.entity.util... | import java.util.*; import org.ofbiz.base.util.*; import org.ofbiz.entity.*; import org.ofbiz.entity.condition.*; import org.ofbiz.entity.util.*; import org.ofbiz.widget.renderer.*; | [
"java.util",
"org.ofbiz.base",
"org.ofbiz.entity",
"org.ofbiz.widget"
] | java.util; org.ofbiz.base; org.ofbiz.entity; org.ofbiz.widget; | 1,066,439 |
@SuppressWarnings({"deprecation", "javadoc"})
private static void prepareShow(ExtensionPopupMenu popupMenu) {
popupMenu.prepareShow();
}
| @SuppressWarnings({STR, STR}) static void function(ExtensionPopupMenu popupMenu) { popupMenu.prepareShow(); } | /**
* The method {@code ExtensionPopupMenu#preprepareShow()} is deprecated but it must still be called for backward
* compatibility, so to avoid hiding future deprecations of other methods/classes this method was added to suppress the
* deprecation warning locally (instead of the whole method {@code showImpl(Popu... | The method ExtensionPopupMenu#preprepareShow() is deprecated but it must still be called for backward compatibility, so to avoid hiding future deprecations of other methods/classes this method was added to suppress the deprecation warning locally (instead of the whole method showImpl(PopupMenuInvokerWrapper, int, int))... | prepareShow | {
"repo_name": "GillesMoris/OSS",
"path": "src/org/parosproxy/paros/view/MainPopupMenu.java",
"license": "apache-2.0",
"size": 14885
} | [
"org.zaproxy.zap.extension.ExtensionPopupMenu"
] | import org.zaproxy.zap.extension.ExtensionPopupMenu; | import org.zaproxy.zap.extension.*; | [
"org.zaproxy.zap"
] | org.zaproxy.zap; | 1,098,936 |
String[] rowOne = {"O", "X", "O"};
String[] rowTwo = {"X", "O", "X"};
String[] rowThree = {"X", "X", "X"};
String[][] field = {rowOne, rowTwo, rowThree};
CheckWinRecurs underTest = new CheckWinRecurs(field);
boolean result = underTest.winCombination();
assertThat(result... | String[] rowOne = {"O", "X", "O"}; String[] rowTwo = {"X", "O", "X"}; String[] rowThree = {"X", "X", "X"}; String[][] field = {rowOne, rowTwo, rowThree}; CheckWinRecurs underTest = new CheckWinRecurs(field); boolean result = underTest.winCombination(); assertThat(result, is(true)); } | /**
* test for checking if win conditions is working properly.
*/ | test for checking if win conditions is working properly | whenWinConditionTrueThenReturnResult | {
"repo_name": "Piterski72/Java-a-to-z",
"path": "chapter_004/TestTask004/src/test/java/ru/nivanov/personalTask004/CheckWinRecursTest.java",
"license": "apache-2.0",
"size": 1225
} | [
"org.hamcrest.Matchers",
"org.junit.Assert"
] | import org.hamcrest.Matchers; import org.junit.Assert; | import org.hamcrest.*; import org.junit.*; | [
"org.hamcrest",
"org.junit"
] | org.hamcrest; org.junit; | 1,942,440 |
void deleteBlobsByPrefix(String blobNamePrefix) throws IOException; | void deleteBlobsByPrefix(String blobNamePrefix) throws IOException; | /**
* Deletes all blobs in the container that match the specified prefix.
*/ | Deletes all blobs in the container that match the specified prefix | deleteBlobsByPrefix | {
"repo_name": "Kakakakakku/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/common/blobstore/BlobContainer.java",
"license": "apache-2.0",
"size": 2194
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,909,872 |
public void setBounds(final int x, final int y, final int width, final int height) {
setBounds(new Rectangle(x, y, width, height));
} | void function(final int x, final int y, final int width, final int height) { setBounds(new Rectangle(x, y, width, height)); } | /**
* Sets the bounds of the drawing.
*
* @param x X coordinate.
* @param y Y coordinate.
* @param width Width.
* @param height Height.
*/ | Sets the bounds of the drawing | setBounds | {
"repo_name": "debrief/debrief",
"path": "org.mwc.debrief.pepys/src/main/java/org/mwc/debrief/pepys/nebula/AbstractRenderer.java",
"license": "epl-1.0",
"size": 6217
} | [
"org.eclipse.swt.graphics.Rectangle"
] | import org.eclipse.swt.graphics.Rectangle; | import org.eclipse.swt.graphics.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 23,086 |
public JobExecution launchJob( String job, String params ); | JobExecution function( String job, String params ); | /**
* Launch a batch job, and block until complete.
* Propogate first exception if ExitStatus==FAILED
*
* @param jobService
* @param job The job name
* @param params Job parameters (as a , seperated list)
* @return JobExecution
*/ | Launch a batch job, and block until complete. Propogate first exception if ExitStatus==FAILED | launchJob | {
"repo_name": "coder36/sbent",
"path": "sbent/src/main/java/coder36/sbent/testing/JobLaunchingService.java",
"license": "apache-2.0",
"size": 1802
} | [
"org.springframework.batch.core.JobExecution"
] | import org.springframework.batch.core.JobExecution; | import org.springframework.batch.core.*; | [
"org.springframework.batch"
] | org.springframework.batch; | 834,416 |
public void runPendingAccessTasks(VaadinSession session) {
assert session.hasLock();
if (session.getPendingAccessQueue().isEmpty()) {
return;
}
Map<Class<?>, CurrentInstance> oldInstances = CurrentInstance
.getInstances(false);
FutureAccess pend... | void function(VaadinSession session) { assert session.hasLock(); if (session.getPendingAccessQueue().isEmpty()) { return; } Map<Class<?>, CurrentInstance> oldInstances = CurrentInstance .getInstances(false); FutureAccess pendingAccess; try { while ((pendingAccess = session.getPendingAccessQueue().poll()) != null) { if ... | /**
* Purges the queue of pending access invocations enqueued with
* {@link VaadinSession#access(Runnable)}.
* <p>
* This method is automatically run by the framework at appropriate
* situations and is not intended to be used by application developers.
*
* @param session
* ... | Purges the queue of pending access invocations enqueued with <code>VaadinSession#access(Runnable)</code>. This method is automatically run by the framework at appropriate situations and is not intended to be used by application developers | runPendingAccessTasks | {
"repo_name": "Scarlethue/vaadin",
"path": "server/src/com/vaadin/server/VaadinService.java",
"license": "apache-2.0",
"size": 70431
} | [
"com.vaadin.server.VaadinSession",
"com.vaadin.util.CurrentInstance",
"java.util.Map"
] | import com.vaadin.server.VaadinSession; import com.vaadin.util.CurrentInstance; import java.util.Map; | import com.vaadin.server.*; import com.vaadin.util.*; import java.util.*; | [
"com.vaadin.server",
"com.vaadin.util",
"java.util"
] | com.vaadin.server; com.vaadin.util; java.util; | 2,070,946 |
private final
String
handleFrame(byte[] frame) throws MessagingException, SocketHandlerException, InterruptedException {
final String frameContent = new String(frame);
final String responseContent = handler.handle(frameContent);
if (responseContent == null) {
throw new SocketHandlerException(String.fo... | final String function(byte[] frame) throws MessagingException, SocketHandlerException, InterruptedException { final String frameContent = new String(frame); final String responseContent = handler.handle(frameContent); if (responseContent == null) { throw new SocketHandlerException(String.format( STR, handler.toString()... | /**
* Crunch the (presumably) last frame of work with {@link #handler} and return
* the response.
*
* @param frame
* Frame to crunch
*
* @return Response to this frame
*
* @throws MessagingException
* In case the underlying message channels go bad
* @throws SocketHandlerExcep... | Crunch the (presumably) last frame of work with <code>#handler</code> and return the response | handleFrame | {
"repo_name": "ever-been/everBeen",
"path": "socketworks-servers/src/main/java/cz/cuni/mff/d3s/been/socketworks/twoway/ReplyingWorker.java",
"license": "lgpl-3.0",
"size": 4349
} | [
"cz.cuni.mff.d3s.been.mq.MessagingException",
"cz.cuni.mff.d3s.been.socketworks.SocketHandlerException"
] | import cz.cuni.mff.d3s.been.mq.MessagingException; import cz.cuni.mff.d3s.been.socketworks.SocketHandlerException; | import cz.cuni.mff.d3s.been.mq.*; import cz.cuni.mff.d3s.been.socketworks.*; | [
"cz.cuni.mff"
] | cz.cuni.mff; | 2,519,996 |
public static void serializeMeterReply(List<OFMeterStatsReply> meterReplies, JsonGenerator jGen) throws IOException, JsonProcessingException{
OFMeterStatsReply meterReply = meterReplies.get(0); // we will get only one meterReply and it will contains many OFMeterStatsEntry ?
jGen.writeStringField("ve... | static void function(List<OFMeterStatsReply> meterReplies, JsonGenerator jGen) throws IOException, JsonProcessingException{ OFMeterStatsReply meterReply = meterReplies.get(0); jGen.writeStringField(STR, meterReply.getVersion().toString()); jGen.writeFieldName("meter"); jGen.writeStartArray(); for (OFMeterStats entry : ... | /***
* Serializes the Meter Statistics Reply
* @author Naveen
* @param meterReplies
* @param jGen
* @throws IOException
* @throws JsonProcessingException
*/ | Serializes the Meter Statistics Reply | serializeMeterReply | {
"repo_name": "cbarrin/EAGERFloodlight",
"path": "src/main/java/net/floodlightcontroller/core/web/serializers/StatsReplySerializer.java",
"license": "apache-2.0",
"size": 63989
} | [
"com.fasterxml.jackson.core.JsonGenerator",
"com.fasterxml.jackson.core.JsonProcessingException",
"java.io.IOException",
"java.util.List",
"org.projectfloodlight.openflow.protocol.OFMeterBandStats",
"org.projectfloodlight.openflow.protocol.OFMeterStats",
"org.projectfloodlight.openflow.protocol.OFMeterS... | import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonProcessingException; import java.io.IOException; import java.util.List; import org.projectfloodlight.openflow.protocol.OFMeterBandStats; import org.projectfloodlight.openflow.protocol.OFMeterStats; import org.projectfloodlight.openfl... | import com.fasterxml.jackson.core.*; import java.io.*; import java.util.*; import org.projectfloodlight.openflow.protocol.*; | [
"com.fasterxml.jackson",
"java.io",
"java.util",
"org.projectfloodlight.openflow"
] | com.fasterxml.jackson; java.io; java.util; org.projectfloodlight.openflow; | 1,649,003 |
public MetaProperty<Integer> numberOfCars() {
return numberOfCars;
} | MetaProperty<Integer> function() { return numberOfCars; } | /**
* The meta-property for the {@code numberOfCars} property.
* @return the meta-property, not null
*/ | The meta-property for the numberOfCars property | numberOfCars | {
"repo_name": "fengshao0907/joda-beans",
"path": "src/test/java/org/joda/beans/gen/Person.java",
"license": "apache-2.0",
"size": 20893
} | [
"org.joda.beans.MetaProperty"
] | import org.joda.beans.MetaProperty; | import org.joda.beans.*; | [
"org.joda.beans"
] | org.joda.beans; | 1,804,809 |
Activity getMoveElementActivity(); | Activity getMoveElementActivity(); | /**
* Returns the value of the '<em><b>Move Element Activity</b></em>' reference.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Move Element Activity</em>' reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of t... | Returns the value of the 'Move Element Activity' reference. If the meaning of the 'Move Element Activity' reference isn't clear, there really should be more of a description here... | getMoveElementActivity | {
"repo_name": "Somae/mdsd-factory-project",
"path": "transformation/de.mdelab.languages.productionschema2petrinet/src-gen/de/mdelab/mltgg/productionschema2petrinet/generated/productionschema2petrinetLink_r4.java",
"license": "gpl-3.0",
"size": 32261
} | [
"de.mdelab.mlsdm.Activity"
] | import de.mdelab.mlsdm.Activity; | import de.mdelab.mlsdm.*; | [
"de.mdelab.mlsdm"
] | de.mdelab.mlsdm; | 2,411,644 |
@Test
public void testCreateOwner() throws Exception {
System.out.println(CLASS_NAME + "createOwner");
final String umpalumpa = "Umpalumpa";
final String contact = "umpalumpa@johny.depp";
final Owner owner = new Owner(0, umpalumpa, contact, OwnerType.technical);
final Owner result = ownersManagerEntry.... | void function() throws Exception { System.out.println(CLASS_NAME + STR); final String umpalumpa = STR; final String contact = STR; final Owner owner = new Owner(0, umpalumpa, contact, OwnerType.technical); final Owner result = ownersManagerEntry.createOwner(sess, owner); assertNotNull(result); assertTrue(result.getId()... | /**
* Test method for {@link cz.metacentrum.perun.core.entry.OwnersManagerEntry#createOwner(cz.metacentrum.perun.core.api.PerunSession, cz.metacentrum.perun.core.api.Owner)}.
*/ | Test method for <code>cz.metacentrum.perun.core.entry.OwnersManagerEntry#createOwner(cz.metacentrum.perun.core.api.PerunSession, cz.metacentrum.perun.core.api.Owner)</code> | testCreateOwner | {
"repo_name": "Natrezim/perun",
"path": "perun-core/src/test/java/cz/metacentrum/perun/core/entry/OwnersManagerEntryIntegrationTest.java",
"license": "bsd-2-clause",
"size": 2992
} | [
"cz.metacentrum.perun.core.api.Owner",
"cz.metacentrum.perun.core.api.OwnerType",
"org.junit.Assert"
] | import cz.metacentrum.perun.core.api.Owner; import cz.metacentrum.perun.core.api.OwnerType; import org.junit.Assert; | import cz.metacentrum.perun.core.api.*; import org.junit.*; | [
"cz.metacentrum.perun",
"org.junit"
] | cz.metacentrum.perun; org.junit; | 1,357,730 |
public List<N> getNodesPath(N node) {
return getNodesPath(getRoot(), node);
}
| List<N> function(N node) { return getNodesPath(getRoot(), node); } | /**
* Returns the path, from the root, to the specified node. The returned path
* contains the root as the first node and the specified node as the last
* node.
*
* @param node the node to which the path is to be found.
* @return list of nodes on the path from the root to specified ... | Returns the path, from the root, to the specified node. The returned path contains the root as the first node and the specified node as the last node | getNodesPath | {
"repo_name": "NCIP/commons-module",
"path": "software/washu-commons/src/main/java/edu/wustl/common/util/Tree.java",
"license": "bsd-3-clause",
"size": 20651
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 214,164 |
public Map<String, List<String>> getAllHeaders(); | Map<String, List<String>> function(); | /**
* Get map of the response headers and corresponding string values.
*
* @return response headers as a map header keys and they values.
*/ | Get map of the response headers and corresponding string values | getAllHeaders | {
"repo_name": "botunge/hapi-fhir",
"path": "hapi-fhir-base/src/main/java/ca/uhn/fhir/rest/client/api/IHttpResponse.java",
"license": "apache-2.0",
"size": 3158
} | [
"java.util.List",
"java.util.Map"
] | import java.util.List; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 926,031 |
public void setLogger(Logger logger) {
this.logger = logger;
}
| void function(Logger logger) { this.logger = logger; } | /**
* Sets the logger that will be used to log messages.
*
* @param logger new specified logger
*/ | Sets the logger that will be used to log messages | setLogger | {
"repo_name": "virgo47/javasimon",
"path": "core/src/main/java/org/javasimon/utils/SLF4JLoggingCallback.java",
"license": "bsd-3-clause",
"size": 2664
} | [
"org.slf4j.Logger"
] | import org.slf4j.Logger; | import org.slf4j.*; | [
"org.slf4j"
] | org.slf4j; | 507,909 |
private void initKey() {
if (initialTextNode != null) {
setKeyText(TremaEclipseUtil.emptyStringIfNull(initialTextNode.getKey()));
}
} | void function() { if (initialTextNode != null) { setKeyText(TremaEclipseUtil.emptyStringIfNull(initialTextNode.getKey())); } } | /**
* Initializes the key according to the provided initial text node.
* The key input text must not be <code>null</code> when calling
* this method.
*/ | Initializes the key according to the provided initial text node. The key input text must not be <code>null</code> when calling this method | initKey | {
"repo_name": "netceteragroup/trema-eclipse",
"path": "com.netcetera.trema.eclipse.plugin/src/main/java/com/netcetera/trema/eclipse/dialogs/TextNodeDialog.java",
"license": "mit",
"size": 14184
} | [
"com.netcetera.trema.eclipse.TremaEclipseUtil"
] | import com.netcetera.trema.eclipse.TremaEclipseUtil; | import com.netcetera.trema.eclipse.*; | [
"com.netcetera.trema"
] | com.netcetera.trema; | 1,102,654 |
protected String getErrorNotificationMsgs(MessageProcessResult result) {
StringBuilder builder = new StringBuilder("Inbound Mime Message could not be processed by DIRECT.");
for (NotificationMessage notif : result.getNotificationMessages()) {
try {
builder.append(" " + no... | String function(MessageProcessResult result) { StringBuilder builder = new StringBuilder(STR); for (NotificationMessage notif : result.getNotificationMessages()) { try { builder.append(" " + notif.getContent()); } catch (Exception e) { LOG.warn(STR, e); } } return builder.toString(); } | /**
* Log any notification messages that were produced by direct processing.
*
* @param result to pull notification messages from
* @return String representation of notification messages from the result.
*/ | Log any notification messages that were produced by direct processing | getErrorNotificationMsgs | {
"repo_name": "beiyuxinke/CONNECT",
"path": "Product/Production/Services/DirectCore/src/main/java/gov/hhs/fha/nhinc/direct/DirectAdapter.java",
"license": "bsd-3-clause",
"size": 10404
} | [
"org.nhindirect.gateway.smtp.MessageProcessResult",
"org.nhindirect.stagent.mail.notifications.NotificationMessage"
] | import org.nhindirect.gateway.smtp.MessageProcessResult; import org.nhindirect.stagent.mail.notifications.NotificationMessage; | import org.nhindirect.gateway.smtp.*; import org.nhindirect.stagent.mail.notifications.*; | [
"org.nhindirect.gateway",
"org.nhindirect.stagent"
] | org.nhindirect.gateway; org.nhindirect.stagent; | 10,858 |
public void testCloseToAccrualAndTreatment2() {
basicStudy.setCoordinatingCenterStudyStatus(CoordinatingCenterStudyStatus.CLOSED_TO_ACCRUAL_AND_TREATMENT);
EasyMock.expect(c3prExceptionHelper.getRuntimeException(EasyMock.eq(344),EasyMock.aryEq(new String[] { basicStudy.getCoordinatingCenterStudyStatus().getDis... | void function() { basicStudy.setCoordinatingCenterStudyStatus(CoordinatingCenterStudyStatus.CLOSED_TO_ACCRUAL_AND_TREATMENT); EasyMock.expect(c3prExceptionHelper.getRuntimeException(EasyMock.eq(344),EasyMock.aryEq(new String[] { basicStudy.getCoordinatingCenterStudyStatus().getDisplayName()}))) .andReturn(new C3PRCoded... | /**
* test closeToAccrualAndTreatment
*/ | test closeToAccrualAndTreatment | testCloseToAccrualAndTreatment2 | {
"repo_name": "NCIP/c3pr",
"path": "codebase/projects/core/test/src/java/edu/duke/cabig/c3pr/domain/StudyTestCase.java",
"license": "bsd-3-clause",
"size": 75546
} | [
"edu.duke.cabig.c3pr.constants.CoordinatingCenterStudyStatus",
"edu.duke.cabig.c3pr.exception.C3PRCodedRuntimeException",
"org.easymock.classextension.EasyMock"
] | import edu.duke.cabig.c3pr.constants.CoordinatingCenterStudyStatus; import edu.duke.cabig.c3pr.exception.C3PRCodedRuntimeException; import org.easymock.classextension.EasyMock; | import edu.duke.cabig.c3pr.constants.*; import edu.duke.cabig.c3pr.exception.*; import org.easymock.classextension.*; | [
"edu.duke.cabig",
"org.easymock.classextension"
] | edu.duke.cabig; org.easymock.classextension; | 36,083 |
CommandLineConfig setOutputManifest(List<String> outputManifests) {
this.outputManifests = Lists.newArrayList();
for (String manifestName : outputManifests) {
if (!manifestName.isEmpty()) {
this.outputManifests.add(manifestName);
}
}
this.outputManifests = Immutable... | CommandLineConfig setOutputManifest(List<String> outputManifests) { this.outputManifests = Lists.newArrayList(); for (String manifestName : outputManifests) { if (!manifestName.isEmpty()) { this.outputManifests.add(manifestName); } } this.outputManifests = ImmutableList.copyOf(this.outputManifests); return this; } priv... | /**
* Sets whether to print output manifest files.
* Filter out empty file names.
*/ | Sets whether to print output manifest files. Filter out empty file names | setOutputManifest | {
"repo_name": "nicks/closure-compiler-old",
"path": "src/com/google/javascript/jscomp/AbstractCommandLineRunner.java",
"license": "apache-2.0",
"size": 65803
} | [
"com.google.common.collect.ImmutableList",
"com.google.common.collect.Lists",
"java.util.List"
] | import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; import java.util.List; | import com.google.common.collect.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 965,983 |
@Test
public final void testParsePacketValidByteArrayNullMode() throws InvalidPacketException {
// Setup the resources for the test.
byte[] byteArray = {0x7E, 0x00, 0x06, 0x08, 0x01, 0x4E, 0x49, 0x41, 0x54, (byte)0xCA};
exception.expect(NullPointerException.class);
exception.expectMessage(is(equalTo("Operat... | final void function() throws InvalidPacketException { byte[] byteArray = {0x7E, 0x00, 0x06, 0x08, 0x01, 0x4E, 0x49, 0x41, 0x54, (byte)0xCA}; exception.expect(NullPointerException.class); exception.expectMessage(is(equalTo(STR))); packetParser.parsePacket(byteArray, null); } | /**
* Test method for {@link com.digi.xbee.api.packet.XBeePacketParser#parsePacket(byte[], OperatingMode)}.
*
* <p>A {@code NullPointerException} exception must be thrown when the
* {@code OperatingMode} is {@code null}.</p>
*
* @throws InvalidPacketException
*/ | Test method for <code>com.digi.xbee.api.packet.XBeePacketParser#parsePacket(byte[], OperatingMode)</code>. A NullPointerException exception must be thrown when the OperatingMode is null | testParsePacketValidByteArrayNullMode | {
"repo_name": "digidotcom/XBeeJavaLibrary",
"path": "library/src/test/java/com/digi/xbee/api/packet/XBeePacketParserFromByteArrayTest.java",
"license": "mpl-2.0",
"size": 90611
} | [
"com.digi.xbee.api.exceptions.InvalidPacketException"
] | import com.digi.xbee.api.exceptions.InvalidPacketException; | import com.digi.xbee.api.exceptions.*; | [
"com.digi.xbee"
] | com.digi.xbee; | 2,596,178 |
SendMessageBatchResult sendMessages(SendMessageBatchRequest request,
ResultCapture<SendMessageBatchResult> extractor); | SendMessageBatchResult sendMessages(SendMessageBatchRequest request, ResultCapture<SendMessageBatchResult> extractor); | /**
* Performs the <code>SendMessages</code> action and use a ResultCapture to
* retrieve the low-level client response.
*
* <p>
* The following request parameters will be populated from the data of this
* <code>Queue</code> resource, and any conflicting parameter value set in
* the r... | Performs the <code>SendMessages</code> action and use a ResultCapture to retrieve the low-level client response. The following request parameters will be populated from the data of this <code>Queue</code> resource, and any conflicting parameter value set in the request will be overridden: <code>QueueUrl</code> - mapped... | sendMessages | {
"repo_name": "smartpcr/aws-sdk-java-resources",
"path": "aws-resources-sqs/src/main/java/com/amazonaws/resources/sqs/Queue.java",
"license": "apache-2.0",
"size": 24210
} | [
"com.amazonaws.resources.ResultCapture",
"com.amazonaws.services.sqs.model.SendMessageBatchRequest",
"com.amazonaws.services.sqs.model.SendMessageBatchResult"
] | import com.amazonaws.resources.ResultCapture; import com.amazonaws.services.sqs.model.SendMessageBatchRequest; import com.amazonaws.services.sqs.model.SendMessageBatchResult; | import com.amazonaws.resources.*; import com.amazonaws.services.sqs.model.*; | [
"com.amazonaws.resources",
"com.amazonaws.services"
] | com.amazonaws.resources; com.amazonaws.services; | 1,784,248 |
public void waitForInputReady() throws IOException, InterruptedException, TezException {
// Cannot synchronize entire method since this is called form user code and can block.
Shuffle localShuffleCopy = null;
synchronized (this) {
Preconditions.checkState(isStarted.get(), "Must start input before in... | void function() throws IOException, InterruptedException, TezException { Shuffle localShuffleCopy = null; synchronized (this) { Preconditions.checkState(isStarted.get(), STR); if (getNumPhysicalInputs() == 0) { return; } localShuffleCopy = shuffle; } TezRawKeyValueIterator localRawIter = localShuffleCopy.waitForInput()... | /**
* Waits for the input to become ready for consumption
* @throws IOException
* @throws InterruptedException
*/ | Waits for the input to become ready for consumption | waitForInputReady | {
"repo_name": "apache/tez",
"path": "tez-runtime-library/src/main/java/org/apache/tez/runtime/library/input/OrderedGroupedKVInput.java",
"license": "apache-2.0",
"size": 17436
} | [
"java.io.IOException",
"org.apache.tez.common.Preconditions",
"org.apache.tez.dag.api.TezException",
"org.apache.tez.runtime.library.common.shuffle.orderedgrouped.Shuffle",
"org.apache.tez.runtime.library.common.sort.impl.TezRawKeyValueIterator"
] | import java.io.IOException; import org.apache.tez.common.Preconditions; import org.apache.tez.dag.api.TezException; import org.apache.tez.runtime.library.common.shuffle.orderedgrouped.Shuffle; import org.apache.tez.runtime.library.common.sort.impl.TezRawKeyValueIterator; | import java.io.*; import org.apache.tez.common.*; import org.apache.tez.dag.api.*; import org.apache.tez.runtime.library.common.shuffle.orderedgrouped.*; import org.apache.tez.runtime.library.common.sort.impl.*; | [
"java.io",
"org.apache.tez"
] | java.io; org.apache.tez; | 1,807,103 |
public Proxy getProxy() {
return proxy;
} | Proxy function() { return proxy; } | /**
* Returns this address's explicitly-specified HTTP proxy, or null to
* delegate to the HTTP client's proxy selector.
*/ | Returns this address's explicitly-specified HTTP proxy, or null to delegate to the HTTP client's proxy selector | getProxy | {
"repo_name": "wutianlong/okhttp",
"path": "okhttp/src/main/java/com/squareup/okhttp/Address.java",
"license": "apache-2.0",
"size": 5496
} | [
"java.net.Proxy"
] | import java.net.Proxy; | import java.net.*; | [
"java.net"
] | java.net; | 2,910,196 |
public int getLayersAbove(Node node) {
checkKeyContainment(node);
return ((Layers) node.get(layersKey)).above;
} | int function(Node node) { checkKeyContainment(node); return ((Layers) node.get(layersKey)).above; } | /**
* Returns the number of layers above the given node (zero if the node is the root).
*
* @param node a node of the tree
* @return the number of layers below above given node (zero if the node is a root)
* @throws IllegalArgumentException if the node was not contained in t... | Returns the number of layers above the given node (zero if the node is the root) | getLayersAbove | {
"repo_name": "DimitrisAndreou/flexigraph",
"path": "src/gr/forth/ics/graph/algo/Trees.java",
"license": "apache-2.0",
"size": 14919
} | [
"gr.forth.ics.graph.Node"
] | import gr.forth.ics.graph.Node; | import gr.forth.ics.graph.*; | [
"gr.forth.ics"
] | gr.forth.ics; | 2,803,574 |
private void inspectSizes(ArrayList<AdSize> allowedSizes, JSONObject tag) throws JSONException {
System.out.println("Checking sizes validity...");
assertTrue(tag.has("sizes"));
JSONArray sizes = tag.getJSONArray("sizes");
assertEquals(allowedSizes.size(), sizes.length());
f... | void function(ArrayList<AdSize> allowedSizes, JSONObject tag) throws JSONException { System.out.println(STR); assertTrue(tag.has("sizes")); JSONArray sizes = tag.getJSONArray("sizes"); assertEquals(allowedSizes.size(), sizes.length()); for (int i = 0; i < sizes.length(); i++) { JSONObject size = sizes.getJSONObject(i);... | /**
* -------------------------- Helper methods --------------------------------
*/ | -------------------------- Helper methods -------------------------------- | inspectSizes | {
"repo_name": "appnexus/mobile-sdk-android",
"path": "sdk/test/com/appnexus/opensdk/UTAdRequestTest.java",
"license": "apache-2.0",
"size": 50438
} | [
"java.util.ArrayList",
"junit.framework.Assert",
"org.json.JSONArray",
"org.json.JSONException",
"org.json.JSONObject"
] | import java.util.ArrayList; import junit.framework.Assert; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; | import java.util.*; import junit.framework.*; import org.json.*; | [
"java.util",
"junit.framework",
"org.json"
] | java.util; junit.framework; org.json; | 1,172,527 |
public List<PluginInformation> getPluginsScheduledForUpdateOrDownload() {
return model != null ? model.getPluginsScheduledForUpdateOrDownload() : null;
} | List<PluginInformation> function() { return model != null ? model.getPluginsScheduledForUpdateOrDownload() : null; } | /**
* Replies the list of plugins waiting for update or download
*
* @return the list of plugins waiting for update or download
*/ | Replies the list of plugins waiting for update or download | getPluginsScheduledForUpdateOrDownload | {
"repo_name": "CURocketry/Ground_Station_GUI",
"path": "src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreference.java",
"license": "gpl-3.0",
"size": 22706
} | [
"java.util.List",
"org.openstreetmap.josm.plugins.PluginInformation"
] | import java.util.List; import org.openstreetmap.josm.plugins.PluginInformation; | import java.util.*; import org.openstreetmap.josm.plugins.*; | [
"java.util",
"org.openstreetmap.josm"
] | java.util; org.openstreetmap.josm; | 2,560,966 |
@Test(dataProvider = "dateCellDecoratorProvider")
public void checkOverrideDateCellDecorator(String decoratorName, short alignment, short verticalAlignment,
short border, short foregroundColor, String fontName, short fontSize, boolean isFontBold,
boolean isFontItalic, byte fontUnderline, boolean isWrapText) t... | @Test(dataProvider = STR) void function(String decoratorName, short alignment, short verticalAlignment, short border, short foregroundColor, String fontName, short fontSize, boolean isFontBold, boolean isFontItalic, byte fontUnderline, boolean isWrapText) throws Exception { CellDecorator decorator = initializeCellDecor... | /**
* Test the override date {@link CellDecorator} level at
* {@link XConfigCriteria}.
*/ | Test the override date <code>CellDecorator</code> level at <code>XConfigCriteria</code> | checkOverrideDateCellDecorator | {
"repo_name": "cacristo/ceos-project",
"path": "jexan/src/test/java/net/ceos/project/poi/annotated/core/ConfigCriteriaTest.java",
"license": "apache-2.0",
"size": 25484
} | [
"org.testng.Assert",
"org.testng.annotations.Test"
] | import org.testng.Assert; import org.testng.annotations.Test; | import org.testng.*; import org.testng.annotations.*; | [
"org.testng",
"org.testng.annotations"
] | org.testng; org.testng.annotations; | 2,250,327 |
public boolean removeFile(String folderPath, String fileName)
{
File f = new File(folderPath, fileName);
return f.delete();
} | boolean function(String folderPath, String fileName) { File f = new File(folderPath, fileName); return f.delete(); } | /**
* Deletes a file from the filesystem
*
* @param folderPath The base folder path
* @param fileName The file to delete
*
* @return {@code true} if the file was successfully deleted
*/ | Deletes a file from the filesystem | removeFile | {
"repo_name": "3sidedcube/Android-LightningUtil",
"path": "library/src/main/java/com/cube/storm/util/lib/manager/FileManager.java",
"license": "apache-2.0",
"size": 8496
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,163,145 |
protected void loadThis(File dataDir, Regions regionSpec, List<String> errors) throws IOException {
this.spec = regionSpec;
// Load map file.
String tractsMapName = FileUtil.resolve(dataDir, regionSpec.map).getPath();
this.map = GISClass.loadEsriAscii(tractsMapName);
... | void function(File dataDir, Regions regionSpec, List<String> errors) throws IOException { this.spec = regionSpec; String tractsMapName = FileUtil.resolve(dataDir, regionSpec.map).getPath(); this.map = GISClass.loadEsriAscii(tractsMapName); if(ObjectUtil.isBlank(regionSpec.table)) { this.table = null; } else { String tr... | /**
* Init this object with data described by 'spec'. It's a good idea to call
* validate() after this returns.
* <P>
* Loads map, loads table, and renumbers map.
*
* @param dataDir
* base directory of input files
* @param regionSpec
* input f... | Init this object with data described by 'spec'. It's a good idea to call validate() after this returns. Loads map, loads table, and renumbers map | loadThis | {
"repo_name": "chuckre/DigitalPopulations",
"path": "PopulationRealizer/Research GIS Kernel/src/mil/army/usace/ehlschlaeger/digitalpopulations/censusgen/RegionData.java",
"license": "apache-2.0",
"size": 12247
} | [
"java.io.File",
"java.io.IOException",
"java.util.List",
"mil.army.usace.ehlschlaeger.digitalpopulations.censusgen.filerelationship.Regions",
"mil.army.usace.ehlschlaeger.rgik.core.CSVTableNoSwing",
"mil.army.usace.ehlschlaeger.rgik.core.GISClass",
"mil.army.usace.ehlschlaeger.rgik.util.FileUtil",
"mi... | import java.io.File; import java.io.IOException; import java.util.List; import mil.army.usace.ehlschlaeger.digitalpopulations.censusgen.filerelationship.Regions; import mil.army.usace.ehlschlaeger.rgik.core.CSVTableNoSwing; import mil.army.usace.ehlschlaeger.rgik.core.GISClass; import mil.army.usace.ehlschlaeger.rgik.u... | import java.io.*; import java.util.*; import mil.army.usace.ehlschlaeger.digitalpopulations.censusgen.filerelationship.*; import mil.army.usace.ehlschlaeger.rgik.core.*; import mil.army.usace.ehlschlaeger.rgik.util.*; | [
"java.io",
"java.util",
"mil.army.usace"
] | java.io; java.util; mil.army.usace; | 1,779,336 |
ApplicationCreationResponse addApplication(Application application) throws APIManagementException; | ApplicationCreationResponse addApplication(Application application) throws APIManagementException; | /**
* Adds an application
*
* @param application Application
* @return ApplicationCreationResponse
* @throws APIManagementException if failed to add Application
*/ | Adds an application | addApplication | {
"repo_name": "Minoli/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.core/src/main/java/org/wso2/carbon/apimgt/core/api/APIStore.java",
"license": "apache-2.0",
"size": 24087
} | [
"org.wso2.carbon.apimgt.core.exception.APIManagementException",
"org.wso2.carbon.apimgt.core.models.Application",
"org.wso2.carbon.apimgt.core.workflow.ApplicationCreationResponse"
] | import org.wso2.carbon.apimgt.core.exception.APIManagementException; import org.wso2.carbon.apimgt.core.models.Application; import org.wso2.carbon.apimgt.core.workflow.ApplicationCreationResponse; | import org.wso2.carbon.apimgt.core.exception.*; import org.wso2.carbon.apimgt.core.models.*; import org.wso2.carbon.apimgt.core.workflow.*; | [
"org.wso2.carbon"
] | org.wso2.carbon; | 2,660,771 |
public ResultSet open() {
return startSelect();
} | ResultSet function() { return startSelect(); } | /**
* Questo metodo viene utilizzato per eseguire la ricerca sul database
*
* @return Restituisce il recordSet
*/ | Questo metodo viene utilizzato per eseguire la ricerca sul database | open | {
"repo_name": "TecaDigitale/Gestione-Connessioni-DataBase",
"path": "Gestione Connessioni DataBase/src/mx/database/table/DataSet.java",
"license": "agpl-3.0",
"size": 26040
} | [
"java.sql.ResultSet"
] | import java.sql.ResultSet; | import java.sql.*; | [
"java.sql"
] | java.sql; | 751,030 |
public List<TScreenPanel> getTScreenPanels(Connection con) throws TorqueException
{
if (collTScreenPanels == null)
{
collTScreenPanels = getTScreenPanels(new Criteria(10), con);
}
return collTScreenPanels;
} | List<TScreenPanel> function(Connection con) throws TorqueException { if (collTScreenPanels == null) { collTScreenPanels = getTScreenPanels(new Criteria(10), con); } return collTScreenPanels; } | /**
* If this collection has already been initialized, returns
* the collection. Otherwise returns the results of
* getTScreenPanels(new Criteria(),Connection)
* This method takes in the Connection also as input so that
* referenced objects can also be obtained using a Connection
* that is... | If this collection has already been initialized, returns the collection. Otherwise returns the results of getTScreenPanels(new Criteria(),Connection) This method takes in the Connection also as input so that referenced objects can also be obtained using a Connection that is taken as input | getTScreenPanels | {
"repo_name": "trackplus/Genji",
"path": "src/main/java/com/aurel/track/persist/BaseTScreenTab.java",
"license": "gpl-3.0",
"size": 39316
} | [
"java.sql.Connection",
"java.util.List",
"org.apache.torque.TorqueException",
"org.apache.torque.util.Criteria"
] | import java.sql.Connection; import java.util.List; import org.apache.torque.TorqueException; import org.apache.torque.util.Criteria; | import java.sql.*; import java.util.*; import org.apache.torque.*; import org.apache.torque.util.*; | [
"java.sql",
"java.util",
"org.apache.torque"
] | java.sql; java.util; org.apache.torque; | 2,491,746 |
public static TermsEnum filterPrefixCodedLongs(TermsEnum termsEnum) {
return new SeekingNumericFilteredTermsEnum(termsEnum) { | static TermsEnum function(TermsEnum termsEnum) { return new SeekingNumericFilteredTermsEnum(termsEnum) { | /**
* Filters the given {@link TermsEnum} by accepting only prefix coded 64 bit terms with a shift
* value of <code>0</code>.
*
* @param termsEnum the terms enum to filter
* @return a filtered {@link TermsEnum} that only returns prefix coded 64 bit terms with a shift
* value of <code>0</code>.
... | Filters the given <code>TermsEnum</code> by accepting only prefix coded 64 bit terms with a shift value of <code>0</code> | filterPrefixCodedLongs | {
"repo_name": "apache/solr",
"path": "solr/core/src/java/org/apache/solr/legacy/LegacyNumericUtils.java",
"license": "apache-2.0",
"size": 19419
} | [
"org.apache.lucene.index.TermsEnum"
] | import org.apache.lucene.index.TermsEnum; | import org.apache.lucene.index.*; | [
"org.apache.lucene"
] | org.apache.lucene; | 36,441 |
protected List<String> assembleLinkingPaths(Link link) {
List<String> linkingPaths = new ArrayList<String>();
if (ArrayUtils.isEmpty(link.path())) {
linkingPaths.add("");
} else {
for (String path : link.path()) {
linkingPaths.add(path);
}
... | List<String> function(Link link) { List<String> linkingPaths = new ArrayList<String>(); if (ArrayUtils.isEmpty(link.path())) { linkingPaths.add(""); } else { for (String path : link.path()) { linkingPaths.add(path); } } return linkingPaths; } | /**
* Returns a list of link paths based on provided link.
*
* @param link used get paths from.
* @return list of paths
*/ | Returns a list of link paths based on provided link | assembleLinkingPaths | {
"repo_name": "ricepanda/rice-git3",
"path": "rice-framework/krad-data/src/main/java/org/kuali/rice/krad/data/util/ReferenceLinker.java",
"license": "apache-2.0",
"size": 21807
} | [
"java.util.ArrayList",
"java.util.List",
"org.apache.commons.lang.ArrayUtils"
] | import java.util.ArrayList; import java.util.List; import org.apache.commons.lang.ArrayUtils; | import java.util.*; import org.apache.commons.lang.*; | [
"java.util",
"org.apache.commons"
] | java.util; org.apache.commons; | 2,016,591 |
public CachePartitionExchangeWorkerTask exchangeTaskForCustomDiscoveryMessage(DiscoveryCustomMessage msg) {
if (msg instanceof SchemaAbstractDiscoveryMessage) {
SchemaAbstractDiscoveryMessage msg0 = (SchemaAbstractDiscoveryMessage)msg;
if (msg0.exchange())
return new... | CachePartitionExchangeWorkerTask function(DiscoveryCustomMessage msg) { if (msg instanceof SchemaAbstractDiscoveryMessage) { SchemaAbstractDiscoveryMessage msg0 = (SchemaAbstractDiscoveryMessage)msg; if (msg0.exchange()) return new SchemaExchangeWorkerTask(msg0); } else if (msg instanceof ClientCacheChangeDummyDiscover... | /**
* Create exchange worker task for custom discovery message.
*
* @param msg Custom discovery message.
* @return Task or {@code null} if message doesn't require any special processing.
*/ | Create exchange worker task for custom discovery message | exchangeTaskForCustomDiscoveryMessage | {
"repo_name": "endian675/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java",
"license": "apache-2.0",
"size": 172471
} | [
"org.apache.ignite.internal.managers.discovery.DiscoveryCustomMessage",
"org.apache.ignite.internal.processors.query.schema.SchemaExchangeWorkerTask",
"org.apache.ignite.internal.processors.query.schema.message.SchemaAbstractDiscoveryMessage"
] | import org.apache.ignite.internal.managers.discovery.DiscoveryCustomMessage; import org.apache.ignite.internal.processors.query.schema.SchemaExchangeWorkerTask; import org.apache.ignite.internal.processors.query.schema.message.SchemaAbstractDiscoveryMessage; | import org.apache.ignite.internal.managers.discovery.*; import org.apache.ignite.internal.processors.query.schema.*; import org.apache.ignite.internal.processors.query.schema.message.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 177,685 |
protected void addReusedConfigurationPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_COREReus... | void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), CorePackage.Literals.CORE_REUSE_CONFIGURATION__REUSED_CONFIGURATION, true, false, true, null, nul... | /**
* This adds a property descriptor for the Reused Configuration feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This adds a property descriptor for the Reused Configuration feature. | addReusedConfigurationPropertyDescriptor | {
"repo_name": "sacooper/ECSE-429-Project-Group1",
"path": "ca.mcgill.sel.core.edit/src/ca/mcgill/sel/core/provider/COREReuseConfigurationItemProvider.java",
"license": "gpl-2.0",
"size": 4943
} | [
"ca.mcgill.sel.core.CorePackage",
"org.eclipse.emf.edit.provider.ComposeableAdapterFactory"
] | import ca.mcgill.sel.core.CorePackage; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; | import ca.mcgill.sel.core.*; import org.eclipse.emf.edit.provider.*; | [
"ca.mcgill.sel",
"org.eclipse.emf"
] | ca.mcgill.sel; org.eclipse.emf; | 2,462,877 |
EngineArray.arrayCopy(this.weights, target.getWeights());
EngineArray.arrayCopy(this.output, target.getLayerOutput());
} | EngineArray.arrayCopy(this.weights, target.getWeights()); EngineArray.arrayCopy(this.output, target.getLayerOutput()); } | /**
* Copy weights and output to the network.
* @param target The network to copy to.
*/ | Copy weights and output to the network | copyToNetwork | {
"repo_name": "larhoy/SentimentProjectV2",
"path": "SentimentAnalysisV2/encog-core-3.1.0/src/main/java/org/encog/neural/networks/training/cross/NetworkFold.java",
"license": "mit",
"size": 2288
} | [
"org.encog.util.EngineArray"
] | import org.encog.util.EngineArray; | import org.encog.util.*; | [
"org.encog.util"
] | org.encog.util; | 2,270,289 |
// Success outcomes
@Test(dataProvider="testName",
dependsOnMethods = {"createWithAuthRefs"})
public void readAndCheckAuthRefs(String testName) throws Exception {
// Perform setup.
testSetup(STATUS_OK, ServiceRequestType.READ);
//
// First read the object
//
... | @Test(dataProvider=STR, dependsOnMethods = {STR}) void function(String testName) throws Exception { testSetup(STATUS_OK, ServiceRequestType.READ); Response res = collectionObjectClient.read(knownResourceId); CollectionobjectsCommon collectionObject = null; try { assertStatusCode(res, testName); PoxPayloadIn input = new... | /**
* Read and check auth refs.
*
* @param testName the test name
* @throws Exception the exception
*/ | Read and check auth refs | readAndCheckAuthRefs | {
"repo_name": "cherryhill/collectionspace-services",
"path": "services/collectionobject/client/src/test/java/org/collectionspace/services/client/test/CollectionObjectAuthRefsTest.java",
"license": "apache-2.0",
"size": 28852
} | [
"java.util.List",
"javax.ws.rs.core.Response",
"org.collectionspace.services.client.PoxPayloadIn",
"org.collectionspace.services.collectionobject.CollectionobjectsCommon",
"org.collectionspace.services.common.authorityref.AuthorityRefList",
"org.testng.Assert",
"org.testng.annotations.Test"
] | import java.util.List; import javax.ws.rs.core.Response; import org.collectionspace.services.client.PoxPayloadIn; import org.collectionspace.services.collectionobject.CollectionobjectsCommon; import org.collectionspace.services.common.authorityref.AuthorityRefList; import org.testng.Assert; import org.testng.annotation... | import java.util.*; import javax.ws.rs.core.*; import org.collectionspace.services.client.*; import org.collectionspace.services.collectionobject.*; import org.collectionspace.services.common.authorityref.*; import org.testng.*; import org.testng.annotations.*; | [
"java.util",
"javax.ws",
"org.collectionspace.services",
"org.testng",
"org.testng.annotations"
] | java.util; javax.ws; org.collectionspace.services; org.testng; org.testng.annotations; | 90,572 |
public synchronized void addValve(Valve valve) {
pipeline.addValve(valve);
} | synchronized void function(Valve valve) { pipeline.addValve(valve); } | /**
* Convenience method, intended for use by the digester to simplify the
* process of adding Valves to containers. See
* {@link Pipeline#addValve(Valve)} for full details. Components other than
* the digester should use {@link #getPipeline()}.{@link #addValve(Valve)} in case a
* future implem... | Convenience method, intended for use by the digester to simplify the process of adding Valves to containers. See <code>Pipeline#addValve(Valve)</code> for full details. Components other than the digester should use <code>#getPipeline()</code>.<code>#addValve(Valve)</code> in case a future implementation provides an alt... | addValve | {
"repo_name": "Nickname0806/Test_Q4",
"path": "java/org/apache/catalina/core/ContainerBase.java",
"license": "apache-2.0",
"size": 45391
} | [
"org.apache.catalina.Valve"
] | import org.apache.catalina.Valve; | import org.apache.catalina.*; | [
"org.apache.catalina"
] | org.apache.catalina; | 1,409,637 |
@Ignore
public void testRemoveMetadata() {
log.debug("testRemoveMetadata");
List mdataList = null;
try {
mdataList = testGroup.getMetadata();
}
catch (final Exception ex) {
fail("getMetadata() failed. " + ex.getMessage());
}
A... | void function() { log.debug(STR); List mdataList = null; try { mdataList = testGroup.getMetadata(); } catch (final Exception ex) { fail(STR + ex.getMessage()); } Attribute strAttr = (Attribute) mdataList.get(2); try { testGroup.removeMetadata(strAttr); } catch (Exception e) { fail(STR + e.getMessage()); } assertEquals(... | /**
* Test method for {@link ncsa.hdf.object.DataFormat#removeMetadata(java.lang.Object)}.
* <ul>
* <li>Remove an attribute
* </ul>
*/ | Test method for <code>ncsa.hdf.object.DataFormat#removeMetadata(java.lang.Object)</code>. Remove an attribute | testRemoveMetadata | {
"repo_name": "rhchen/etrakr",
"path": "rcp/net.sf.etrakr.persistent.hdf.test/src/net/sf/etrakr/persistent/hdf/test/testsuite/DataFormatTest.java",
"license": "epl-1.0",
"size": 8725
} | [
"java.util.List",
"org.junit.Assert"
] | import java.util.List; import org.junit.Assert; | import java.util.*; import org.junit.*; | [
"java.util",
"org.junit"
] | java.util; org.junit; | 2,770,855 |
public String getComputationName() {
ComputationFactory compFactory = ReflectionUtils.newInstance(
getComputationFactoryClass());
return compFactory.computationName(this);
}
/**
* Get the user's subclassed {@link ComputationFactory} | String function() { ComputationFactory compFactory = ReflectionUtils.newInstance( getComputationFactoryClass()); return compFactory.computationName(this); } /** * Get the user's subclassed {@link ComputationFactory} | /**
* Get name of computation being run. We leave this up to the
* {@link ComputationFactory} to decide what to return.
*
* @return Name of computation being run
*/ | Get name of computation being run. We leave this up to the <code>ComputationFactory</code> to decide what to return | getComputationName | {
"repo_name": "mmaro/giraph",
"path": "giraph-core/src/main/java/org/apache/giraph/conf/GiraphConfiguration.java",
"license": "apache-2.0",
"size": 30136
} | [
"org.apache.giraph.factories.ComputationFactory",
"org.apache.giraph.utils.ReflectionUtils"
] | import org.apache.giraph.factories.ComputationFactory; import org.apache.giraph.utils.ReflectionUtils; | import org.apache.giraph.factories.*; import org.apache.giraph.utils.*; | [
"org.apache.giraph"
] | org.apache.giraph; | 1,063,735 |
private static void createCustomizerFeedItems(AdWordsServices adWordsServices,
AdWordsSession session, List<Long> adGroupIds, AdCustomizerFeed adCustomizerFeed)
throws Exception {
// Get the FeedItemService.
FeedItemServiceInterface feedItemService =
adWordsServices.get(session, FeedItemSe... | static void function(AdWordsServices adWordsServices, AdWordsSession session, List<Long> adGroupIds, AdCustomizerFeed adCustomizerFeed) throws Exception { FeedItemServiceInterface feedItemService = adWordsServices.get(session, FeedItemServiceInterface.class); List<FeedItemOperation> feedItemOperations = Lists.newArrayL... | /**
* Creates FeedItems with the values to use in ad customizations for each ad group in
* <code>adGroupIds</code>.
*/ | Creates FeedItems with the values to use in ad customizations for each ad group in <code>adGroupIds</code> | createCustomizerFeedItems | {
"repo_name": "gawkermedia/googleads-java-lib",
"path": "examples/adwords_axis/src/main/java/adwords/axis/v201601/advancedoperations/AddAdCustomizer.java",
"license": "apache-2.0",
"size": 11166
} | [
"com.google.api.ads.adwords.axis.factory.AdWordsServices",
"com.google.api.ads.adwords.axis.v201601.cm.AdCustomizerFeed",
"com.google.api.ads.adwords.axis.v201601.cm.FeedItem",
"com.google.api.ads.adwords.axis.v201601.cm.FeedItemOperation",
"com.google.api.ads.adwords.axis.v201601.cm.FeedItemReturnValue",
... | import com.google.api.ads.adwords.axis.factory.AdWordsServices; import com.google.api.ads.adwords.axis.v201601.cm.AdCustomizerFeed; import com.google.api.ads.adwords.axis.v201601.cm.FeedItem; import com.google.api.ads.adwords.axis.v201601.cm.FeedItemOperation; import com.google.api.ads.adwords.axis.v201601.cm.FeedItemR... | import com.google.api.ads.adwords.axis.factory.*; import com.google.api.ads.adwords.axis.v201601.cm.*; import com.google.api.ads.adwords.lib.client.*; import com.google.common.collect.*; import java.util.*; import org.joda.time.*; | [
"com.google.api",
"com.google.common",
"java.util",
"org.joda.time"
] | com.google.api; com.google.common; java.util; org.joda.time; | 2,666,570 |
interface BigQueryJsonReader {
boolean start() throws IOException; | interface BigQueryJsonReader { boolean start() throws IOException; | /**
* Initializes the reader and advances the reader to the first record.
*/ | Initializes the reader and advances the reader to the first record | start | {
"repo_name": "amitsela/incubator-beam",
"path": "sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryServices.java",
"license": "apache-2.0",
"size": 7334
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,136,263 |
public void testGarbledControlFrame() {
try{
rawByte = 0x0;
version.set(sdlPsm, 1);
controlFrameInfo.set(sdlPsm, SdlPacket.FRAME_INFO_START_SERVICE);
frameType.set(sdlPsm, SdlPacket.FRAME_TYPE_CONTROL);
dataLength.set(sdlPsm, MAX_DATA_LENGTH + 1);
int STATE = (Integer) transitionOnInput.invoke(... | void function() { try{ rawByte = 0x0; version.set(sdlPsm, 1); controlFrameInfo.set(sdlPsm, SdlPacket.FRAME_INFO_START_SERVICE); frameType.set(sdlPsm, SdlPacket.FRAME_TYPE_CONTROL); dataLength.set(sdlPsm, MAX_DATA_LENGTH + 1); int STATE = (Integer) transitionOnInput.invoke(sdlPsm, rawByte, SdlPsm.DATA_SIZE_4_STATE); ass... | /**
* These are unit tests for the following methods :
* {@link com.smartdevicelink.transport.SdlPsm#transitionOnInput()}
*/ | These are unit tests for the following methods : <code>com.smartdevicelink.transport.SdlPsm#transitionOnInput()</code> | testGarbledControlFrame | {
"repo_name": "anildahiya/sdl_android",
"path": "android/sdl_android/src/androidTest/java/com/smartdevicelink/test/transport/SdlPsmTests.java",
"license": "bsd-3-clause",
"size": 3006
} | [
"android.util.Log",
"com.smartdevicelink.protocol.SdlPacket",
"com.smartdevicelink.test.Test",
"com.smartdevicelink.transport.SdlPsm"
] | import android.util.Log; import com.smartdevicelink.protocol.SdlPacket; import com.smartdevicelink.test.Test; import com.smartdevicelink.transport.SdlPsm; | import android.util.*; import com.smartdevicelink.protocol.*; import com.smartdevicelink.test.*; import com.smartdevicelink.transport.*; | [
"android.util",
"com.smartdevicelink.protocol",
"com.smartdevicelink.test",
"com.smartdevicelink.transport"
] | android.util; com.smartdevicelink.protocol; com.smartdevicelink.test; com.smartdevicelink.transport; | 113,440 |
return (AccountManager) context.getSystemService(Context.ACCOUNT_SERVICE);
}
/**
* Retrieve the connectivity service.
*
* @return A {@link android.net.ConnectivityManager} | return (AccountManager) context.getSystemService(Context.ACCOUNT_SERVICE); } /** * Retrieve the connectivity service. * * @return A {@link android.net.ConnectivityManager} | /**
* Retrieve the account manager service.
*
* @return A {@link android.accounts.AccountManager}
*/ | Retrieve the account manager service | account | {
"repo_name": "remelpugh/android-shared",
"path": "Android Shared/src/main/java/com/dabay6/libraries/androidshared/helper/SystemServiceHelper.java",
"license": "mit",
"size": 3978
} | [
"android.accounts.AccountManager",
"android.content.Context",
"android.net.ConnectivityManager"
] | import android.accounts.AccountManager; import android.content.Context; import android.net.ConnectivityManager; | import android.accounts.*; import android.content.*; import android.net.*; | [
"android.accounts",
"android.content",
"android.net"
] | android.accounts; android.content; android.net; | 192,394 |
public void setTextureData(int srcPixelFormat, int componentCount,
int minFilter, int magFilter, ByteBuffer textureBuffer) {
reloadData = new ReloadData();
reloadData.srcPixelFormat = srcPixelFormat;
reloadData.componentCount = componentCount;
reloadData.minFilter = minFilter;
reloadData.magFilter... | void function(int srcPixelFormat, int componentCount, int minFilter, int magFilter, ByteBuffer textureBuffer) { reloadData = new ReloadData(); reloadData.srcPixelFormat = srcPixelFormat; reloadData.componentCount = componentCount; reloadData.minFilter = minFilter; reloadData.magFilter = magFilter; reloadData.textureBuf... | /**
* Set the texture data that this texture can be reloaded from
*
* @param srcPixelFormat The pixel format
* @param componentCount The component count
* @param minFilter The OpenGL minification filter
* @param magFilter The OpenGL magnification filter
* @param textureBuffer The texture buffer co... | Set the texture data that this texture can be reloaded from | setTextureData | {
"repo_name": "742mph/Ironclad2D",
"path": "src/org/cell2d/celick/opengl/TextureImpl.java",
"license": "gpl-3.0",
"size": 9199
} | [
"java.nio.ByteBuffer"
] | import java.nio.ByteBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 1,059,750 |
private PackageFragmentRoot getJarPkgFragmentRoot(
String resourcePathString,
int jarSeparatorIndex,
String jarPathString,
IJavaSearchScope scope) {
IPath jarPath = new Path(jarPathString);
Object target = JavaModel.getTarget(jarPath, false);
if (target instanceof IFile) {
... | PackageFragmentRoot function( String resourcePathString, int jarSeparatorIndex, String jarPathString, IJavaSearchScope scope) { IPath jarPath = new Path(jarPathString); Object target = JavaModel.getTarget(jarPath, false); if (target instanceof IFile) { IFile jarFile = (IFile) target; JavaProject javaProject = (JavaProj... | /**
* Returns the package fragment root that corresponds to the given jar path. See
* createOpenable(...) for the format of the jar path string. If not null, uses the given scope as
* a hint for getting Java project handles.
*/ | Returns the package fragment root that corresponds to the given jar path. See createOpenable(...) for the format of the jar path string. If not null, uses the given scope as a hint for getting Java project handles | getJarPkgFragmentRoot | {
"repo_name": "sleshchenko/che",
"path": "plugins/plugin-java/che-plugin-java-ext-jdt/org-eclipse-jdt-ui/src/main/java/org/eclipse/jdt/internal/core/util/HandleFactory.java",
"license": "epl-1.0",
"size": 18224
} | [
"org.eclipse.core.resources.IFile",
"org.eclipse.core.runtime.IPath",
"org.eclipse.core.runtime.Path",
"org.eclipse.jdt.core.IClasspathEntry",
"org.eclipse.jdt.core.IJavaProject",
"org.eclipse.jdt.core.JavaModelException",
"org.eclipse.jdt.core.search.IJavaSearchScope",
"org.eclipse.jdt.internal.core.... | import org.eclipse.core.resources.IFile; import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.Path; import org.eclipse.jdt.core.IClasspathEntry; import org.eclipse.jdt.core.IJavaProject; import org.eclipse.jdt.core.JavaModelException; import org.eclipse.jdt.core.search.IJavaSearchScope; import org.ecl... | import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*; import org.eclipse.jdt.core.*; import org.eclipse.jdt.core.search.*; import org.eclipse.jdt.internal.core.*; import org.eclipse.jdt.internal.core.search.*; | [
"org.eclipse.core",
"org.eclipse.jdt"
] | org.eclipse.core; org.eclipse.jdt; | 697,857 |
@ApiModelProperty(example = "null", value = "")
public String getDescription() {
return description;
} | @ApiModelProperty(example = "null", value = "") String function() { return description; } | /**
* Get description
* @return description
**/ | Get description | getDescription | {
"repo_name": "jtheulier/bouquet-java-sdk",
"path": "src/main/java/com/squid/kraken/v4/model/MetricExt.java",
"license": "apache-2.0",
"size": 5697
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 1,070,650 |
EventsFactory getEventsFactory();
interface Literals {
EClass EVENT = eINSTANCE.getEvent();
EAttribute EVENT__TIMESTAMP = eINSTANCE.getEvent_Timestamp();
} | EventsFactory getEventsFactory(); interface Literals { EClass EVENT = eINSTANCE.getEvent(); EAttribute EVENT__TIMESTAMP = eINSTANCE.getEvent_Timestamp(); } | /**
* Returns the factory that creates the instances of the model. <!--
* begin-user-doc --> <!-- end-user-doc -->
*
* @return the factory that creates the instances of the model.
* @generated
*/ | Returns the factory that creates the instances of the model. | getEventsFactory | {
"repo_name": "edgarmueller/emfstore-rest",
"path": "bundles/org.eclipse.emf.emfstore.server.model/src/org/eclipse/emf/emfstore/internal/server/model/versioning/events/EventsPackage.java",
"license": "epl-1.0",
"size": 4927
} | [
"org.eclipse.emf.ecore.EAttribute",
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EAttribute; import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 495,945 |
DeviceEvent updatePortStatus(ProviderId providerId, DeviceId deviceId,
PortDescription portDescription); | DeviceEvent updatePortStatus(ProviderId providerId, DeviceId deviceId, PortDescription portDescription); | /**
* Updates the port status of the specified infrastructure device using the
* given port description.
*
* @param providerId provider identifier
* @param deviceId device identifier
* @param portDescription port description
* @return ready to send event describing what ... | Updates the port status of the specified infrastructure device using the given port description | updatePortStatus | {
"repo_name": "osinstom/onos",
"path": "core/api/src/main/java/org/onosproject/net/device/DeviceStore.java",
"license": "apache-2.0",
"size": 7501
} | [
"org.onosproject.net.DeviceId",
"org.onosproject.net.provider.ProviderId"
] | import org.onosproject.net.DeviceId; import org.onosproject.net.provider.ProviderId; | import org.onosproject.net.*; import org.onosproject.net.provider.*; | [
"org.onosproject.net"
] | org.onosproject.net; | 1,146,228 |
public static void setPreferredNetworkType(Phone phone, int modemNetworkMode, Message msg,
int slotId) {
Assert.assertNotNull(phone);
if (GeminiUtils.isGeminiSupport() && isValidSlot(slotId)) {
((GeminiPhone) phone).setPreferredNetworkTypeGemini(modemNetworkMode, msg, slotId)... | static void function(Phone phone, int modemNetworkMode, Message msg, int slotId) { Assert.assertNotNull(phone); if (GeminiUtils.isGeminiSupport() && isValidSlot(slotId)) { ((GeminiPhone) phone).setPreferredNetworkTypeGemini(modemNetworkMode, msg, slotId); } else { phone.setPreferredNetworkType(modemNetworkMode, msg); }... | /**
* Requests to set the preferred network type for searching and registering (CS/PS domain, RAT,
* and operation mode)
*
* @param phone
* @param modemNetworkMode
* @param msg
* @param slotId
*/ | Requests to set the preferred network type for searching and registering (CS/PS domain, RAT, and operation mode) | setPreferredNetworkType | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "packages/apps/Phone/src/com/mediatek/phone/gemini/GeminiUtils.java",
"license": "gpl-2.0",
"size": 30240
} | [
"android.os.Message",
"com.android.internal.telephony.Call",
"com.android.internal.telephony.Phone",
"com.android.internal.telephony.gemini.GeminiPhone",
"junit.framework.Assert"
] | import android.os.Message; import com.android.internal.telephony.Call; import com.android.internal.telephony.Phone; import com.android.internal.telephony.gemini.GeminiPhone; import junit.framework.Assert; | import android.os.*; import com.android.internal.telephony.*; import com.android.internal.telephony.gemini.*; import junit.framework.*; | [
"android.os",
"com.android.internal",
"junit.framework"
] | android.os; com.android.internal; junit.framework; | 1,110,484 |
private String getAssignmentRange(Assignment a)
{
String rv = "";
if (a.getAccess().equals(Assignment.AssignmentAccess.SITE))
{
// site assignment
rv = rb.getString("range.allgroups");
}
else
{
try
{
// get current site
Site site = SiteService.getSite(ToolManager.getCu... | String function(Assignment a) { String rv = STRrange.allgroupsSTR:getAssignmentRange" + ignore.getMessage()); } } return rv; } | /**
* caculate the range string for an assignment
*/ | caculate the range string for an assignment | getAssignmentRange | {
"repo_name": "udayg/sakai",
"path": "assignment/assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java",
"license": "apache-2.0",
"size": 672322
} | [
"org.sakaiproject.assignment.api.Assignment"
] | import org.sakaiproject.assignment.api.Assignment; | import org.sakaiproject.assignment.api.*; | [
"org.sakaiproject.assignment"
] | org.sakaiproject.assignment; | 1,838,730 |
@Test()
public void testGetWithoutTxnSettingsResponseControl()
throws Exception
{
final Control[] controls =
{
new Control("1.2.3.4"),
new Control("1.2.3.5", true, new ASN1OctetString("foo"))
};
final ExtendedResult r = new ExtendedResult(1, ResultCode.SUCCESS, null,
... | @Test() void function() throws Exception { final Control[] controls = { new Control(STR), new Control(STR, true, new ASN1OctetString("foo")) }; final ExtendedResult r = new ExtendedResult(1, ResultCode.SUCCESS, null, null, null, null, null, controls); assertNull(TransactionSettingsResponseControl.get(r)); } | /**
* Tests the get method for a result without any controls.
*
* @throws Exception If an unexpected problem occurs.
*/ | Tests the get method for a result without any controls | testGetWithoutTxnSettingsResponseControl | {
"repo_name": "UnboundID/ldapsdk",
"path": "tests/unit/src/com/unboundid/ldap/sdk/unboundidds/controls/TransactionSettingsResponseControlTestCase.java",
"license": "gpl-2.0",
"size": 7403
} | [
"com.unboundid.asn1.ASN1OctetString",
"com.unboundid.ldap.sdk.Control",
"com.unboundid.ldap.sdk.ExtendedResult",
"com.unboundid.ldap.sdk.ResultCode",
"org.testng.annotations.Test"
] | import com.unboundid.asn1.ASN1OctetString; import com.unboundid.ldap.sdk.Control; import com.unboundid.ldap.sdk.ExtendedResult; import com.unboundid.ldap.sdk.ResultCode; import org.testng.annotations.Test; | import com.unboundid.asn1.*; import com.unboundid.ldap.sdk.*; import org.testng.annotations.*; | [
"com.unboundid.asn1",
"com.unboundid.ldap",
"org.testng.annotations"
] | com.unboundid.asn1; com.unboundid.ldap; org.testng.annotations; | 170,136 |
public static <T> Constructor<T> getConstructor(Class<?> type, Class<?>... parameterTypes) {
return (Constructor<T>) WhiteboxImpl.getConstructor(type, parameterTypes);
} | static <T> Constructor<T> function(Class<?> type, Class<?>... parameterTypes) { return (Constructor<T>) WhiteboxImpl.getConstructor(type, parameterTypes); } | /**
* Convenience method to get a (declared) constructor from a class type
* without having to catch the checked exceptions otherwise required. These
* exceptions are wrapped as runtime exceptions. The constructor is also set
* to accessible.
*
* @param type
* The type of the class where the c... | Convenience method to get a (declared) constructor from a class type without having to catch the checked exceptions otherwise required. These exceptions are wrapped as runtime exceptions. The constructor is also set to accessible | getConstructor | {
"repo_name": "hazendaz/powermock",
"path": "powermock-reflect/src/main/java/org/powermock/reflect/Whitebox.java",
"license": "apache-2.0",
"size": 31475
} | [
"java.lang.reflect.Constructor",
"org.powermock.reflect.internal.WhiteboxImpl"
] | import java.lang.reflect.Constructor; import org.powermock.reflect.internal.WhiteboxImpl; | import java.lang.reflect.*; import org.powermock.reflect.internal.*; | [
"java.lang",
"org.powermock.reflect"
] | java.lang; org.powermock.reflect; | 1,328,682 |
public void makeInvalid(int action, LanguageConnectionContext lcc)
throws StandardException
{
//Let's handle REVOKE_PRIVILEGE and REVOKE_ROLE first
if (action == DependencyManager.REVOKE_PRIVILEGE ||
action == DependencyManager.REVOKE_ROLE)
{
//At this point (Derby 10.2), only a FOREIGN KEY key co... | void function(int action, LanguageConnectionContext lcc) throws StandardException { if (action == DependencyManager.REVOKE_PRIVILEGE action == DependencyManager.REVOKE_ROLE) { ConglomerateDescriptor newBackingConglomCD = drop(lcc, true); lcc.getLastActivation().addWarning( StandardException.newWarning( SQLState.LANG_CO... | /**
* Mark the dependent as invalid (due to at least one of
* its dependencies being invalid). Always an error
* for a constraint -- should never have gotten here.
*
* @param action The action causing the invalidation
*
* @exception StandardException thrown if called in sanity mode
*/ | Mark the dependent as invalid (due to at least one of its dependencies being invalid). Always an error for a constraint -- should never have gotten here | makeInvalid | {
"repo_name": "apache/derby",
"path": "java/org.apache.derby.engine/org/apache/derby/iapi/sql/dictionary/ConstraintDescriptor.java",
"license": "apache-2.0",
"size": 21966
} | [
"org.apache.derby.iapi.sql.conn.LanguageConnectionContext",
"org.apache.derby.iapi.sql.depend.DependencyManager",
"org.apache.derby.shared.common.error.StandardException",
"org.apache.derby.shared.common.reference.SQLState",
"org.apache.derby.shared.common.sanity.SanityManager"
] | import org.apache.derby.iapi.sql.conn.LanguageConnectionContext; import org.apache.derby.iapi.sql.depend.DependencyManager; import org.apache.derby.shared.common.error.StandardException; import org.apache.derby.shared.common.reference.SQLState; import org.apache.derby.shared.common.sanity.SanityManager; | import org.apache.derby.iapi.sql.conn.*; import org.apache.derby.iapi.sql.depend.*; import org.apache.derby.shared.common.error.*; import org.apache.derby.shared.common.reference.*; import org.apache.derby.shared.common.sanity.*; | [
"org.apache.derby"
] | org.apache.derby; | 710,027 |
WriterM<W, B> apply(A a);
/**
* Compose this {@code WriterMK} with another by applying this one first,
* then the other.
* @param kBC the {@code WriterMK} to be applied after this one
* @param <C> the second {@code WriterMK}'s return type
* @return the composed {@c... | WriterM<W, B> apply(A a); /** * Compose this {@code WriterMK} with another by applying this one first, * then the other. * @param kBC the {@code WriterMK} to be applied after this one * @param <C> the second {@code WriterMK}'s return type * @return the composed {@code WriterMK} | /**
* Apply this {@code WriterMK} operation
* @param a the input value
* @return the result of the operation
*/ | Apply this WriterMK operation | apply | {
"repo_name": "jon-hanson/funcj",
"path": "core/src/main/java/org/typemeta/funcj/kleisli/WriterMK.java",
"license": "mit",
"size": 2430
} | [
"org.typemeta.funcj.control.WriterM"
] | import org.typemeta.funcj.control.WriterM; | import org.typemeta.funcj.control.*; | [
"org.typemeta.funcj"
] | org.typemeta.funcj; | 1,289,520 |
@Override public JsonObject asGeoJSON(boolean isRoot){
JsonObject json = new JsonObject();
if (isRoot){
json.add("crs", geoJSONNamedCRS("urn:ogc:def:crs:OGC:1.3:CRS84"));
}
JsonArray features = new JsonArray();
for (KmlFeature item:mItems){
JsonObject subJson = item.asGeoJSON(false);
if (item inst... | @Override JsonObject function(boolean isRoot){ JsonObject json = new JsonObject(); if (isRoot){ json.add("crs", geoJSONNamedCRS(STR)); } JsonArray features = new JsonArray(); for (KmlFeature item:mItems){ JsonObject subJson = item.asGeoJSON(false); if (item instanceof KmlFolder){ JsonArray subFeatures = subJson.getAsJs... | /**
* Set isRoot to true if this is the root of the final GeoJSON structure.
* Set isRoot to false if there is an enclosing FeatureCollection.
* As GeoJSON doesn't support nested FeatureCollection, sub-items will be inserted directly in the result.
* This is flattening the resulting GeoJSON hierarchy.
* @... | Set isRoot to true if this is the root of the final GeoJSON structure. Set isRoot to false if there is an enclosing FeatureCollection. As GeoJSON doesn't support nested FeatureCollection, sub-items will be inserted directly in the result. This is flattening the resulting GeoJSON hierarchy | asGeoJSON | {
"repo_name": "Crazyphil/osmbonuspack",
"path": "OSMBonusPack/src/main/java/org/osmdroid/bonuspack/kml/KmlFolder.java",
"license": "lgpl-3.0",
"size": 7781
} | [
"com.google.gson.JsonArray",
"com.google.gson.JsonElement",
"com.google.gson.JsonObject"
] | import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; | import com.google.gson.*; | [
"com.google.gson"
] | com.google.gson; | 1,916,655 |
private void updateCallQueueLenMetrics(BlockingQueue<Call> queue) {
if (queue == callQueue) {
rpcMetrics.callQueueLen.set(callQueue.size());
} else if (queue == priorityCallQueue) {
rpcMetrics.priorityCallQueueLen.set(priorityCallQueue.size());
} else if (queue == replicationQueue) {
rpc... | void function(BlockingQueue<Call> queue) { if (queue == callQueue) { rpcMetrics.callQueueLen.set(callQueue.size()); } else if (queue == priorityCallQueue) { rpcMetrics.priorityCallQueueLen.set(priorityCallQueue.size()); } else if (queue == replicationQueue) { rpcMetrics.replicationCallQueueLen.set(replicationQueue.size... | /**
* Reports length of the call queue to HBaseRpcMetrics.
* @param queue Which queue to report
*/ | Reports length of the call queue to HBaseRpcMetrics | updateCallQueueLenMetrics | {
"repo_name": "ddraj/hbase-trunk-mttr",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/HBaseServer.java",
"license": "apache-2.0",
"size": 81179
} | [
"java.util.concurrent.BlockingQueue",
"org.apache.hadoop.hbase.monitoring.MonitoredRPCHandler",
"org.apache.hadoop.hbase.monitoring.TaskMonitor"
] | import java.util.concurrent.BlockingQueue; import org.apache.hadoop.hbase.monitoring.MonitoredRPCHandler; import org.apache.hadoop.hbase.monitoring.TaskMonitor; | import java.util.concurrent.*; import org.apache.hadoop.hbase.monitoring.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 1,730,624 |
public void testNewDirectoryStream() throws IOException {
URL testScenarios = new File("../cloveretl.test.scenarios").toURI().toURL();
try (DirectoryStream<Input> stream = Wildcards.newDirectoryStream(contextUrl, "")) {
assertEquals(0, size(stream));
}
try (DirectoryStream<Input> stream = Wildc... | void function() throws IOException { URL testScenarios = new File(STR).toURI().toURL(); try (DirectoryStream<Input> stream = Wildcards.newDirectoryStream(contextUrl, STR*STRtest/*.fmtSTRftp: assertEquals(4, size(stream)); } try (DirectoryStream<Input> stream = Wildcards.newDirectoryStream(contextUrl, STRftp: assertEqua... | /**
* Test method for {@link org.jetel.util.file.stream.Wildcards#newDirectoryStream(java.net.URL, java.lang.String)}.
*/ | Test method for <code>org.jetel.util.file.stream.Wildcards#newDirectoryStream(java.net.URL, java.lang.String)</code> | testNewDirectoryStream | {
"repo_name": "CloverETL/CloverETL-Engine",
"path": "cloveretl.engine/test/org/jetel/util/file/stream/WildcardsTest.java",
"license": "lgpl-2.1",
"size": 8982
} | [
"java.io.File",
"java.io.IOException",
"java.nio.file.DirectoryIteratorException",
"java.nio.file.DirectoryStream",
"java.util.regex.Pattern"
] | import java.io.File; import java.io.IOException; import java.nio.file.DirectoryIteratorException; import java.nio.file.DirectoryStream; import java.util.regex.Pattern; | import java.io.*; import java.nio.file.*; import java.util.regex.*; | [
"java.io",
"java.nio",
"java.util"
] | java.io; java.nio; java.util; | 1,851,289 |
Promise<ChangePreview> getChangePreview(RefactoringChange change); | Promise<ChangePreview> getChangePreview(RefactoringChange change); | /**
* Get refactoring change preview. Preview contains new and old content of the file.
*
* @param change
* the change to get preview
* @return refactoring change preview
*/ | Get refactoring change preview. Preview contains new and old content of the file | getChangePreview | {
"repo_name": "ollie314/che-plugins",
"path": "plugin-java/che-plugin-java-ext-lang-client/src/main/java/org/eclipse/che/ide/ext/java/client/refactoring/service/RefactoringServiceClient.java",
"license": "epl-1.0",
"size": 5604
} | [
"org.eclipse.che.api.promises.client.Promise",
"org.eclipse.che.ide.ext.java.shared.dto.refactoring.ChangePreview",
"org.eclipse.che.ide.ext.java.shared.dto.refactoring.RefactoringChange"
] | import org.eclipse.che.api.promises.client.Promise; import org.eclipse.che.ide.ext.java.shared.dto.refactoring.ChangePreview; import org.eclipse.che.ide.ext.java.shared.dto.refactoring.RefactoringChange; | import org.eclipse.che.api.promises.client.*; import org.eclipse.che.ide.ext.java.shared.dto.refactoring.*; | [
"org.eclipse.che"
] | org.eclipse.che; | 2,300,017 |
public Date getTweetDate()
{
return tweetDate;
} | Date function() { return tweetDate; } | /**
* Gets the tweet date.
*
* @return the tweetDate
*/ | Gets the tweet date | getTweetDate | {
"repo_name": "ravisund/Kundera",
"path": "src/kundera-redis/src/test/java/com/impetus/client/entities/RedisEmbeddedUser.java",
"license": "apache-2.0",
"size": 3036
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 2,431,322 |
@Override
public void onUserDataResponse(final UserDataResponse response) {
final UserDataResponse.RequestStatus status = response.getRequestStatus();
Gdx.app.log(TAG, "onGetUserDataResponse: requestId (" + response.getRequestId()
+ ") userIdRequestStatus: "
+ status
+ ")");
... | void function(final UserDataResponse response) { final UserDataResponse.RequestStatus status = response.getRequestStatus(); Gdx.app.log(TAG, STR + response.getRequestId() + STR + status + ")"); switch (status) { case SUCCESSFUL: UserData userData = response.getUserData(); Gdx.app.log(TAG, STR + userData.getUserId() + S... | /**
* This is the callback for {@link PurchasingService#getUserData}.
*/ | This is the callback for <code>PurchasingService#getUserData</code> | onUserDataResponse | {
"repo_name": "squins/gdx-pay",
"path": "gdx-pay-android-amazon/src/com/badlogic/gdx/pay/android/amazon/PurchaseManagerAndroidAmazon.java",
"license": "apache-2.0",
"size": 14290
} | [
"com.amazon.device.iap.model.UserData",
"com.amazon.device.iap.model.UserDataResponse",
"com.badlogic.gdx.Gdx",
"com.badlogic.gdx.pay.GdxPayException"
] | import com.amazon.device.iap.model.UserData; import com.amazon.device.iap.model.UserDataResponse; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.pay.GdxPayException; | import com.amazon.device.iap.model.*; import com.badlogic.gdx.*; import com.badlogic.gdx.pay.*; | [
"com.amazon.device",
"com.badlogic.gdx"
] | com.amazon.device; com.badlogic.gdx; | 1,884,106 |
public PrimeNumber newPrimeNumber(long n) {
size++;
if (size <= maxSize) {
outputListener.newPrimeNumberFound(n);
return new PrimeNumberImpl(this, n);
} else {
return activePrimeContainerCreator.newActivePrimeContainer(n,
(ActivePrimeCo... | PrimeNumber function(long n) { size++; if (size <= maxSize) { outputListener.newPrimeNumberFound(n); return new PrimeNumberImpl(this, n); } else { return activePrimeContainerCreator.newActivePrimeContainer(n, (ActivePrimeContainer) PAActiveObject.getStubOnThis()); } } | /** Creates a new PrimeNumber in this container or, when maximum size
* has been reached, demands creation of a new container. */ | Creates a new PrimeNumber in this container or, when maximum size | newPrimeNumber | {
"repo_name": "nmpgaspar/PainlessProActive",
"path": "src/Examples/org/objectweb/proactive/examples/eratosthenes/ActivePrimeContainer.java",
"license": "agpl-3.0",
"size": 5581
} | [
"org.objectweb.proactive.api.PAActiveObject"
] | import org.objectweb.proactive.api.PAActiveObject; | import org.objectweb.proactive.api.*; | [
"org.objectweb.proactive"
] | org.objectweb.proactive; | 114,623 |
public boolean isInclusive(Bound b); | boolean function(Bound b); | /**
* Checks if the specified bound is inclusive or not.
* @param b the bound type
* @return <code>true</code> if the specified bound is inclusive, <code>false</code> otherwise
*/ | Checks if the specified bound is inclusive or not | isInclusive | {
"repo_name": "gdusbabek/cassandra",
"path": "src/java/org/apache/cassandra/cql3/restrictions/Restriction.java",
"license": "apache-2.0",
"size": 5559
} | [
"org.apache.cassandra.cql3.statements.Bound"
] | import org.apache.cassandra.cql3.statements.Bound; | import org.apache.cassandra.cql3.statements.*; | [
"org.apache.cassandra"
] | org.apache.cassandra; | 2,691,362 |
boolean removeChest(BlockLocation location); | boolean removeChest(BlockLocation location); | /**
* Disables a CRChest. This turns it back into a regular ol' InventoryHolder. This also deletes the file
* for the chest.
*
* @param location The {@link BlockLocation} of the chest to remove.
* @return True if the chest was deleted or false if none was found to delete.
*/ | Disables a CRChest. This turns it back into a regular ol' InventoryHolder. This also deletes the file for the chest | removeChest | {
"repo_name": "dumptruckman/ChestRestock",
"path": "src/main/java/com/dumptruckman/chestrestock/api/ChestManager.java",
"license": "bsd-3-clause",
"size": 6708
} | [
"com.dumptruckman.chestrestock.util.BlockLocation"
] | import com.dumptruckman.chestrestock.util.BlockLocation; | import com.dumptruckman.chestrestock.util.*; | [
"com.dumptruckman.chestrestock"
] | com.dumptruckman.chestrestock; | 1,468,695 |
public void drawItem(Graphics2D g2, CategoryItemRendererState state,
Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis,
ValueAxis rangeAxis, CategoryDataset dataset, int row, int column,
boolean selected, int pass) {
if (!getItemVisible(row, column)) ... | void function(Graphics2D g2, CategoryItemRendererState state, Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis, ValueAxis rangeAxis, CategoryDataset dataset, int row, int column, boolean selected, int pass) { if (!getItemVisible(row, column)) { return; } Number v = dataset.getValue(row, column); if (v =... | /**
* Draw a single data item.
*
* @param g2 the graphics device.
* @param state the renderer state.
* @param dataArea the area in which the data is drawn.
* @param plot the plot.
* @param domainAxis the domain axis.
* @param rangeAxis the range axis.
* @param... | Draw a single data item | drawItem | {
"repo_name": "linuxuser586/jfreechart",
"path": "source/org/jfree/chart/renderer/category/LineRenderer3D.java",
"license": "lgpl-2.1",
"size": 23923
} | [
"java.awt.Graphics2D",
"java.awt.Shape",
"java.awt.geom.GeneralPath",
"java.awt.geom.Rectangle2D",
"org.jfree.chart.axis.CategoryAxis",
"org.jfree.chart.axis.ValueAxis",
"org.jfree.chart.entity.EntityCollection",
"org.jfree.chart.plot.CategoryPlot",
"org.jfree.chart.plot.PlotOrientation",
"org.jfr... | import java.awt.Graphics2D; import java.awt.Shape; import java.awt.geom.GeneralPath; import java.awt.geom.Rectangle2D; import org.jfree.chart.axis.CategoryAxis; import org.jfree.chart.axis.ValueAxis; import org.jfree.chart.entity.EntityCollection; import org.jfree.chart.plot.CategoryPlot; import org.jfree.chart.plot.Pl... | import java.awt.*; import java.awt.geom.*; import org.jfree.chart.axis.*; import org.jfree.chart.entity.*; import org.jfree.chart.plot.*; import org.jfree.chart.util.*; import org.jfree.data.category.*; | [
"java.awt",
"org.jfree.chart",
"org.jfree.data"
] | java.awt; org.jfree.chart; org.jfree.data; | 2,789,747 |
public AuthResult permissionGranted(String request, User user, Action permRequest,
TableName tableName, Map<byte[], ? extends Collection<?>> families) {
// 1. All users need read access to hbase:meta table.
// this is a very common operation, so deal with it quickly.
if (TableName.META_TABLE_NAME.eq... | AuthResult function(String request, User user, Action permRequest, TableName tableName, Map<byte[], ? extends Collection<?>> families) { if (TableName.META_TABLE_NAME.equals(tableName)) { if (permRequest == Action.READ) { return AuthResult.allow(request, STR, user, permRequest, tableName, families); } } if (user == nul... | /**
* Check the current user for authorization to perform a specific action against the given set of
* row data.
* <p>
* Note: Ordering of the authorization checks has been carefully optimized to short-circuit the
* most common requests and minimize the amount of processing required.
* </p>
* @para... | Check the current user for authorization to perform a specific action against the given set of row data. Note: Ordering of the authorization checks has been carefully optimized to short-circuit the most common requests and minimize the amount of processing required. | permissionGranted | {
"repo_name": "ChinmaySKulkarni/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/security/access/AccessChecker.java",
"license": "apache-2.0",
"size": 25590
} | [
"java.util.Collection",
"java.util.List",
"java.util.Map",
"java.util.Set",
"org.apache.hadoop.hbase.Cell",
"org.apache.hadoop.hbase.CellUtil",
"org.apache.hadoop.hbase.TableName",
"org.apache.hadoop.hbase.security.User",
"org.apache.hadoop.hbase.security.access.Permission"
] | import java.util.Collection; import java.util.List; import java.util.Map; import java.util.Set; import org.apache.hadoop.hbase.Cell; import org.apache.hadoop.hbase.CellUtil; import org.apache.hadoop.hbase.TableName; import org.apache.hadoop.hbase.security.User; import org.apache.hadoop.hbase.security.access.Permission; | import java.util.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.security.*; import org.apache.hadoop.hbase.security.access.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 2,875,354 |
@Override
@SuppressWarnings("unchecked")
public default THIS withComponentError(ErrorMessage componentError) {
((Composite) this).setComponentError(componentError);
return (THIS) this;
}
| @SuppressWarnings(STR) default THIS function(ErrorMessage componentError) { ((Composite) this).setComponentError(componentError); return (THIS) this; } | /**
* Sets the component'THIS error message.
*
* @param componentError
* the new <code>ErrorMessage</code> of the component.
* @return this (for method chaining)
* @see Composite#setComponentError(com.vaadin.server.ErrorMessage)
*/ | Sets the component'THIS error message | withComponentError | {
"repo_name": "viydaag/vaadin-fluent-api",
"path": "src/main/java/com/vaadin/fluent/api/FluentComposite.java",
"license": "apache-2.0",
"size": 17603
} | [
"com.vaadin.server.ErrorMessage",
"com.vaadin.ui.Composite"
] | import com.vaadin.server.ErrorMessage; import com.vaadin.ui.Composite; | import com.vaadin.server.*; import com.vaadin.ui.*; | [
"com.vaadin.server",
"com.vaadin.ui"
] | com.vaadin.server; com.vaadin.ui; | 2,872,563 |
private List<Atributo> listaOrdenada(List<Atributo> atributo) {
Collections.sort(atributo, (o1, o2) -> o2.getValue().compareTo(o1.getValue()));
Collections.reverse(atributo);
return atributo;
} | List<Atributo> function(List<Atributo> atributo) { Collections.sort(atributo, (o1, o2) -> o2.getValue().compareTo(o1.getValue())); Collections.reverse(atributo); return atributo; } | /**
* Ordena la lista de menor a mayor
*
* @param atributo Lista de atributos
* @return Lista de atributos
*/ | Ordena la lista de menor a mayor | listaOrdenada | {
"repo_name": "juanca87/prototype-model",
"path": "prototype-client/src/main/java/com/jcalvopinam/client/service/ResultadoEjecucionServiceImpl.java",
"license": "mit",
"size": 12625
} | [
"com.jcalvopinam.client.dto.Atributo",
"java.util.Collections",
"java.util.List"
] | import com.jcalvopinam.client.dto.Atributo; import java.util.Collections; import java.util.List; | import com.jcalvopinam.client.dto.*; import java.util.*; | [
"com.jcalvopinam.client",
"java.util"
] | com.jcalvopinam.client; java.util; | 2,650,180 |
private static Map<String, Double> makeWeightMap(String featureWeightFile)
throws IOException {
Map<String, Double> weights = new HashMap<String, Double>();
BufferedReader br = new BufferedReader(new FileReader(
featureWeightFile));
for (String line = null; (... | static Map<String, Double> function(String featureWeightFile) throws IOException { Map<String, Double> weights = new HashMap<String, Double>(); BufferedReader br = new BufferedReader(new FileReader( featureWeightFile)); for (String line = null; (line = br.readLine()) != null; ) { String[] tokens = line.split(" "); weig... | /**
* Returns a mapping from terms to their weights.
*/ | Returns a mapping from terms to their weights | makeWeightMap | {
"repo_name": "fozziethebeat/C-Cat",
"path": "core/src/main/java/gov/llnl/ontology/mains/WordNetCondenser.java",
"license": "gpl-2.0",
"size": 10428
} | [
"java.io.BufferedReader",
"java.io.FileReader",
"java.io.IOException",
"java.util.HashMap",
"java.util.Map"
] | import java.io.BufferedReader; import java.io.FileReader; import java.io.IOException; import java.util.HashMap; import java.util.Map; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,188,792 |
@Override
public int[] maxFind(int[] data, int maxx, int maxy, int n) {
final IntFixedList results = getResultsBuffer(data.length / 4);
final boolean[] maximaFlag = getFlagBuffer(data.length);
// Boundary control
final int xwidth = FastMath.min(n, maxx - 1);
final int ywidth = FastMath.min(n, m... | int[] function(int[] data, int maxx, int maxy, int n) { final IntFixedList results = getResultsBuffer(data.length / 4); final boolean[] maximaFlag = getFlagBuffer(data.length); final int xwidth = FastMath.min(n, maxx - 1); final int ywidth = FastMath.min(n, maxy - 1); final int xlimit = maxx - xwidth; final int ylimit ... | /**
* Compute the local-maxima within a 2n+1 block.
*
* <p>Any maxima below the configured fraction above background are ignored. Fraction =
* (Max-background)/Max within the 2n+1 neighbourhood. Maxima below the minimum height (above
* background) or the minimum peak-width at half maximum in any dimensio... | Compute the local-maxima within a 2n+1 block. Any maxima below the configured fraction above background are ignored. Fraction = (Max-background)/Max within the 2n+1 neighbourhood. Maxima below the minimum height (above background) or the minimum peak-width at half maximum in any dimension are ignored | maxFind | {
"repo_name": "aherbert/GDSC-Core",
"path": "src/main/java/uk/ac/sussex/gdsc/core/filters/FilteredNonMaximumSuppression.java",
"license": "gpl-3.0",
"size": 54917
} | [
"org.apache.commons.math3.util.FastMath",
"uk.ac.sussex.gdsc.core.utils.IntFixedList"
] | import org.apache.commons.math3.util.FastMath; import uk.ac.sussex.gdsc.core.utils.IntFixedList; | import org.apache.commons.math3.util.*; import uk.ac.sussex.gdsc.core.utils.*; | [
"org.apache.commons",
"uk.ac.sussex"
] | org.apache.commons; uk.ac.sussex; | 161,663 |
public static synchronized void add(int userId, PermissionControl pc)
{
cache.add(FQN, Integer.toString(userId), pc);
}
| static synchronized void function(int userId, PermissionControl pc) { cache.add(FQN, Integer.toString(userId), pc); } | /**
* Adds a new permission control schema to the cache
*
* @param userId The user's id to associate with the schema
* @param pc The <code>PermissionControl</code> instance to add
*/ | Adds a new permission control schema to the cache | add | {
"repo_name": "3mtee/jforum",
"path": "target/jforum/src/main/java/net/jforum/repository/SecurityRepository.java",
"license": "bsd-3-clause",
"size": 8182
} | [
"net.jforum.security.PermissionControl"
] | import net.jforum.security.PermissionControl; | import net.jforum.security.*; | [
"net.jforum.security"
] | net.jforum.security; | 1,166,919 |
public com.squareup.okhttp.Call apisApiIdScopesNameDeleteCall(String apiId, String name, String ifMatch, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException {
Object localVarPostBody = null;
// ... | com.squareup.okhttp.Call function(String apiId, String name, String ifMatch, final ProgressResponseBody.ProgressListener progressListener, final ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { Object localVarPostBody = null; String localVarPath = STR .replaceAll("\\{" + "apiId... | /**
* Build call for apisApiIdScopesNameDelete
* @param apiId **API ID** consisting of the **UUID** of the API. (required)
* @param name Scope name (required)
* @param ifMatch Validator for conditional requests; based on ETag. (optional)
* @param progressListener Progress listener
* @pa... | Build call for apisApiIdScopesNameDelete | apisApiIdScopesNameDeleteCall | {
"repo_name": "jaadds/product-apim",
"path": "modules/integration/tests-common/clients/publisher/src/gen/java/org/wso2/am/integration/clients/publisher/api/v1/ApiScopesApi.java",
"license": "apache-2.0",
"size": 39140
} | [
"java.util.ArrayList",
"java.util.HashMap",
"java.util.List",
"java.util.Map",
"org.wso2.am.integration.clients.publisher.api.ApiException",
"org.wso2.am.integration.clients.publisher.api.Pair",
"org.wso2.am.integration.clients.publisher.api.ProgressRequestBody",
"org.wso2.am.integration.clients.publi... | import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.wso2.am.integration.clients.publisher.api.ApiException; import org.wso2.am.integration.clients.publisher.api.Pair; import org.wso2.am.integration.clients.publisher.api.ProgressRequestBody; import org.wso2.am.in... | import java.util.*; import org.wso2.am.integration.clients.publisher.api.*; | [
"java.util",
"org.wso2.am"
] | java.util; org.wso2.am; | 389,775 |
private void sendNotificationClickedIntent(Context context, long[] ids) {
final String packageName;
final String clazz;
final boolean isPublicApi;
final Uri uri = ContentUris.withAppendedId(
Downloads.Impl.ALL_DOWNLOADS_CONTENT_URI, ids[0]);
final Cursor curs... | void function(Context context, long[] ids) { final String packageName; final String clazz; final boolean isPublicApi; final Uri uri = ContentUris.withAppendedId( Downloads.Impl.ALL_DOWNLOADS_CONTENT_URI, ids[0]); final Cursor cursor = context.getContentResolver().query(uri, null, null, null, null); try { if (cursor.mov... | /**
* Notify the owner of a running download that its notification was clicked.
*/ | Notify the owner of a running download that its notification was clicked | sendNotificationClickedIntent | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "packages/providers/DownloadProvider/src/com/android/providers/downloads/DownloadReceiver.java",
"license": "gpl-2.0",
"size": 9985
} | [
"android.app.DownloadManager",
"android.content.ContentUris",
"android.content.Context",
"android.content.Intent",
"android.database.Cursor",
"android.net.Uri",
"android.provider.Downloads",
"android.text.TextUtils",
"android.util.Log"
] | import android.app.DownloadManager; import android.content.ContentUris; import android.content.Context; import android.content.Intent; import android.database.Cursor; import android.net.Uri; import android.provider.Downloads; import android.text.TextUtils; import android.util.Log; | import android.app.*; import android.content.*; import android.database.*; import android.net.*; import android.provider.*; import android.text.*; import android.util.*; | [
"android.app",
"android.content",
"android.database",
"android.net",
"android.provider",
"android.text",
"android.util"
] | android.app; android.content; android.database; android.net; android.provider; android.text; android.util; | 2,120,324 |
public List<PermissionRequest> getPermissionRequests()
{
return new ArrayList<>(permissionRequests.values());
} | List<PermissionRequest> function() { return new ArrayList<>(permissionRequests.values()); } | /**
* Returns a list of permission requests
*
* @return list of permission requests
*/ | Returns a list of permission requests | getPermissionRequests | {
"repo_name": "nrlakin/ResearchStack",
"path": "skin/src/main/java/org/researchstack/skin/PermissionRequestManager.java",
"license": "apache-2.0",
"size": 9742
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,082,429 |
public ModuleType<T> altDd(String altDd)
{
childNode.getOrCreate("alt-dd").text(altDd);
return this;
} | ModuleType<T> function(String altDd) { childNode.getOrCreate(STR).text(altDd); return this; } | /**
* Sets the <code>alt-dd</code> element
* @param altDd the value for the element <code>alt-dd</code>
* @return the current instance of <code>ModuleType<T></code>
*/ | Sets the <code>alt-dd</code> element | altDd | {
"repo_name": "forge/javaee-descriptors",
"path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/application7/ModuleTypeImpl.java",
"license": "epl-1.0",
"size": 8242
} | [
"org.jboss.shrinkwrap.descriptor.api.application7.ModuleType"
] | import org.jboss.shrinkwrap.descriptor.api.application7.ModuleType; | import org.jboss.shrinkwrap.descriptor.api.application7.*; | [
"org.jboss.shrinkwrap"
] | org.jboss.shrinkwrap; | 1,928,764 |
protected static String getIntegerKeyword() {
String keyword = null;
if (DbConnectionFactory.isPostgres()) {
keyword = "int8";
} else if (DbConnectionFactory.isMySql()) {
keyword = "bigint";
} else if (DbConnectionFactory.isMsSql()) {
keyword = "nu... | static String function() { String keyword = null; if (DbConnectionFactory.isPostgres()) { keyword = "int8"; } else if (DbConnectionFactory.isMySql()) { keyword = STR; } else if (DbConnectionFactory.isMsSql()) { keyword = STR; } else if (DbConnectionFactory.isOracle()) { keyword = STR; } return keyword; } /** * A simple... | /**
* Returns the correct numeric data type for the language ID, depending on
* the current database.
*
* @return The database-dependent keyword to represent the language ID.
*/ | Returns the correct numeric data type for the language ID, depending on the current database | getIntegerKeyword | {
"repo_name": "dotCMS/core",
"path": "dotCMS/src/main/java/com/dotcms/integritycheckers/AbstractIntegrityChecker.java",
"license": "gpl-3.0",
"size": 17888
} | [
"com.dotmarketing.db.DbConnectionFactory"
] | import com.dotmarketing.db.DbConnectionFactory; | import com.dotmarketing.db.*; | [
"com.dotmarketing.db"
] | com.dotmarketing.db; | 755,496 |
interface WithStreamingLocatorId {
WithCreate withStreamingLocatorId(UUID streamingLocatorId);
}
interface WithCreate extends Creatable<StreamingLocator>, DefinitionStages.WithContentKeys, DefinitionStages.WithDefaultContentKeyPolicyName, DefinitionStages.WithE... | interface WithStreamingLocatorId { WithCreate withStreamingLocatorId(UUID streamingLocatorId); } interface WithCreate extends Creatable<StreamingLocator>, DefinitionStages.WithContentKeys, DefinitionStages.WithDefaultContentKeyPolicyName, DefinitionStages.WithEndTime, DefinitionStages.WithStartTime, DefinitionStages.Wi... | /**
* Specifies streamingLocatorId.
*/ | Specifies streamingLocatorId | withStreamingLocatorId | {
"repo_name": "hovsepm/azure-sdk-for-java",
"path": "mediaservices/resource-manager/v2018_30_30_preview/src/main/java/com/microsoft/azure/management/mediaservices/v2018_30_30_preview/StreamingLocator.java",
"license": "mit",
"size": 7690
} | [
"com.microsoft.azure.arm.model.Appliable",
"com.microsoft.azure.arm.model.Creatable"
] | import com.microsoft.azure.arm.model.Appliable; import com.microsoft.azure.arm.model.Creatable; | import com.microsoft.azure.arm.model.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 768,128 |
boolean sendEmail(List<String> emails, String subject, String body); | boolean sendEmail(List<String> emails, String subject, String body); | /**
* Sends an email.
* @param emails a list of email addresses (recipients)
* @param subject the subject of the message
* @param body the body of the message
* @return true if the message was sent
*/ | Sends an email | sendEmail | {
"repo_name": "Erudika/para",
"path": "para-core/src/main/java/com/erudika/para/core/email/Emailer.java",
"license": "apache-2.0",
"size": 1159
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 459,448 |
public static void main(String[] args) throws FormatException, IOException, DependencyException, ServiceException {
int tileSizeX = Integer.parseInt(args[2]);
int tileSizeY = Integer.parseInt(args[3]);
OverlappedTiledWriter overlappedTiledWriter = new OverlappedTiledWriter(args[0], args[1], tileSizeX, til... | static void function(String[] args) throws FormatException, IOException, DependencyException, ServiceException { int tileSizeX = Integer.parseInt(args[2]); int tileSizeY = Integer.parseInt(args[3]); OverlappedTiledWriter overlappedTiledWriter = new OverlappedTiledWriter(args[0], args[1], tileSizeX, tileSizeY); overlapp... | /**
* To read an image file and write out an OME-Tiff tiled image on the command line:
*
* $ java OverlappedTiledWriter input-file.oib output-file.ome.tiff 256 256
* @throws IOException thrown if unable to setup input or output stream for reader or writer
* @throws FormatException thrown when setting inv... | To read an image file and write out an OME-Tiff tiled image on the command line: $ java OverlappedTiledWriter input-file.oib output-file.ome.tiff 256 256 | main | {
"repo_name": "Intelligent-Imaging/bioformats",
"path": "docs/sphinx/developers/examples/OverlappedTiledWriter.java",
"license": "gpl-2.0",
"size": 7970
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,809,252 |
public Bootstrap createBootstrap() throws SincerityException
{
List<File> classpaths = getDependencies().getClasspaths( false );
ArrayList<URL> urls = new ArrayList<URL>( classpaths.size() );
try
{
for( File file : classpaths )
urls.add( file.toURI().toURL() );
}
catch( MalformedURLException x )
... | Bootstrap function() throws SincerityException { List<File> classpaths = getDependencies().getClasspaths( false ); ArrayList<URL> urls = new ArrayList<URL>( classpaths.size() ); try { for( File file : classpaths ) urls.add( file.toURI().toURL() ); } catch( MalformedURLException x ) { throw new SincerityException( STR, ... | /**
* Creates a new bootstrap based on the classpath.
*
* @return A bootstrap
* @throws SincerityException
* In case of an error
*/ | Creates a new bootstrap based on the classpath | createBootstrap | {
"repo_name": "tliron/sincerity",
"path": "components/sincerity/source/com/threecrickets/sincerity/Container.java",
"license": "lgpl-3.0",
"size": 13334
} | [
"com.threecrickets.bootstrap.Bootstrap",
"com.threecrickets.sincerity.exception.SincerityException",
"java.io.File",
"java.net.MalformedURLException",
"java.util.ArrayList",
"java.util.List"
] | import com.threecrickets.bootstrap.Bootstrap; import com.threecrickets.sincerity.exception.SincerityException; import java.io.File; import java.net.MalformedURLException; import java.util.ArrayList; import java.util.List; | import com.threecrickets.bootstrap.*; import com.threecrickets.sincerity.exception.*; import java.io.*; import java.net.*; import java.util.*; | [
"com.threecrickets.bootstrap",
"com.threecrickets.sincerity",
"java.io",
"java.net",
"java.util"
] | com.threecrickets.bootstrap; com.threecrickets.sincerity; java.io; java.net; java.util; | 1,162,767 |
public void writeLong(long i) throws IOException {
writeInt((int) (i >> 32));
writeInt((int) i);
} | void function(long i) throws IOException { writeInt((int) (i >> 32)); writeInt((int) i); } | /** Writes a long as eight bytes.
* @see IndexInput#readLong()
*/ | Writes a long as eight bytes | writeLong | {
"repo_name": "tokee/lucene",
"path": "src/java/org/apache/lucene/store/IndexOutput.java",
"license": "apache-2.0",
"size": 7482
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,521,962 |
@Override
public IOObject[] apply() throws OperatorException {
// get input example set and some details
ExampleSet inputExampleSet = getInput(ExampleSet.class);
int elementCount = inputExampleSet.size();
int dimensionCount = inputExampleSet.getAttributes().size();
this.log... | IOObject[] function() throws OperatorException { ExampleSet inputExampleSet = getInput(ExampleSet.class); int elementCount = inputExampleSet.size(); int dimensionCount = inputExampleSet.getAttributes().size(); this.logNote(STR + elementCount + STR + dimensionCount + STR); ExampleSet outputExampleSet = (ExampleSet) inpu... | /************************************************************************************************
* PUBLIC METHODS
***********************************************************************************************/ | PUBLIC METHODS | apply | {
"repo_name": "ntj/ComplexRapidMiner",
"path": "src/de/tud/inf/operator/mm/ClusterEnsembleCreator.java",
"license": "gpl-2.0",
"size": 21189
} | [
"com.rapidminer.example.Attribute",
"com.rapidminer.example.ExampleSet",
"com.rapidminer.operator.IOContainer",
"com.rapidminer.operator.IOObject",
"com.rapidminer.operator.ModelApplier",
"com.rapidminer.operator.OperatorCreationException",
"com.rapidminer.operator.OperatorException",
"com.rapidminer.... | import com.rapidminer.example.Attribute; import com.rapidminer.example.ExampleSet; import com.rapidminer.operator.IOContainer; import com.rapidminer.operator.IOObject; import com.rapidminer.operator.ModelApplier; import com.rapidminer.operator.OperatorCreationException; import com.rapidminer.operator.OperatorException;... | import com.rapidminer.example.*; import com.rapidminer.operator.*; import com.rapidminer.operator.features.selection.*; import com.rapidminer.operator.learner.clustering.clusterer.*; import com.rapidminer.tools.*; import de.tud.inf.operator.mm.util.*; import java.util.*; | [
"com.rapidminer.example",
"com.rapidminer.operator",
"com.rapidminer.tools",
"de.tud.inf",
"java.util"
] | com.rapidminer.example; com.rapidminer.operator; com.rapidminer.tools; de.tud.inf; java.util; | 1,089,018 |
public List<DataFlow> dataFlows() {
return this.dataFlows;
} | List<DataFlow> function() { return this.dataFlows; } | /**
* Get the dataFlows property: The specification of data flows.
*
* @return the dataFlows value.
*/ | Get the dataFlows property: The specification of data flows | dataFlows | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanagerhybrid/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/models/DataCollectionRuleResourceInner.java",
"license": "mit",
"size": 7862
} | [
"com.azure.resourcemanager.monitor.models.DataFlow",
"java.util.List"
] | import com.azure.resourcemanager.monitor.models.DataFlow; import java.util.List; | import com.azure.resourcemanager.monitor.models.*; import java.util.*; | [
"com.azure.resourcemanager",
"java.util"
] | com.azure.resourcemanager; java.util; | 1,466,353 |
Map<String, SemaphoreConfig> getSemaphoreConfigs(); | Map<String, SemaphoreConfig> getSemaphoreConfigs(); | /**
* Returns all registered semaphore configurations.
*
* @return registered semaphore configurations
*/ | Returns all registered semaphore configurations | getSemaphoreConfigs | {
"repo_name": "tufangorel/hazelcast",
"path": "hazelcast/src/main/java/com/hazelcast/internal/dynamicconfig/ConfigurationService.java",
"license": "apache-2.0",
"size": 13507
} | [
"com.hazelcast.config.SemaphoreConfig",
"java.util.Map"
] | import com.hazelcast.config.SemaphoreConfig; import java.util.Map; | import com.hazelcast.config.*; import java.util.*; | [
"com.hazelcast.config",
"java.util"
] | com.hazelcast.config; java.util; | 2,503,299 |
public VirtualNetworkGatewayType gatewayType() {
return this.gatewayType;
} | VirtualNetworkGatewayType function() { return this.gatewayType; } | /**
* Get the type of this virtual network gateway. Possible values are: 'Vpn' and 'ExpressRoute'. Possible values include: 'Vpn', 'ExpressRoute'.
*
* @return the gatewayType value
*/ | Get the type of this virtual network gateway. Possible values are: 'Vpn' and 'ExpressRoute'. Possible values include: 'Vpn', 'ExpressRoute' | gatewayType | {
"repo_name": "navalev/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_02_01/src/main/java/com/microsoft/azure/management/network/v2019_02_01/implementation/VirtualNetworkGatewayInner.java",
"license": "mit",
"size": 12847
} | [
"com.microsoft.azure.management.network.v2019_02_01.VirtualNetworkGatewayType"
] | import com.microsoft.azure.management.network.v2019_02_01.VirtualNetworkGatewayType; | import com.microsoft.azure.management.network.v2019_02_01.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 1,295,719 |
private Element createMavenDependency(OArtifactReference artifactReference, Document document) {
Element mavenElement = document.createElement(MetadataTag.DEPENDENCY.get());
Element groupId = document.createElement(MetadataTag.GROUP_ID.get());
groupId.appendChild(document.createTextNode(art... | Element function(OArtifactReference artifactReference, Document document) { Element mavenElement = document.createElement(MetadataTag.DEPENDENCY.get()); Element groupId = document.createElement(MetadataTag.GROUP_ID.get()); groupId.appendChild(document.createTextNode(artifactReference.getGroupId())); mavenElement.append... | /**
* Add maven dependency to {@link Document} document.
* @param artifactReference {@link OArtifactReference} which is maven dependency
* @param document {@link Document} of metadata.xml
* @return {@link Element} with maven dependency
*/ | Add maven dependency to <code>Document</code> document | createMavenDependency | {
"repo_name": "OrienteerDW/Orienteer",
"path": "orienteer-core/src/main/java/org/orienteer/core/boot/loader/util/OMetadataUpdater.java",
"license": "apache-2.0",
"size": 16345
} | [
"org.orienteer.core.boot.loader.util.artifact.OArtifactReference",
"org.w3c.dom.Document",
"org.w3c.dom.Element"
] | import org.orienteer.core.boot.loader.util.artifact.OArtifactReference; import org.w3c.dom.Document; import org.w3c.dom.Element; | import org.orienteer.core.boot.loader.util.artifact.*; import org.w3c.dom.*; | [
"org.orienteer.core",
"org.w3c.dom"
] | org.orienteer.core; org.w3c.dom; | 1,484,752 |
private void setTupleFieldFromPersistent(Schema avroSchema, Object value, TupleEntry tupleEntry, String tupleFieldName) {
if (LOG.isTraceEnabled()) LOG.trace(" Copying the field {}, value:{}", tupleFieldName, value ) ;
switch(avroSchema.getType()) {
case UNION:
... | void function(Schema avroSchema, Object value, TupleEntry tupleEntry, String tupleFieldName) { if (LOG.isTraceEnabled()) LOG.trace(STR, tupleFieldName, value ) ; switch(avroSchema.getType()) { case UNION: if (avroSchema.getTypes().size() == 2) { Type type0 = avroSchema.getTypes().get(0).getType() ; Type type1 = avroSch... | /**
* Given a value with an avro schema, saves that value in the tuple field specified by tupleFieldName.
* @param persistent
* @param value
* @param tupleEntry
* @param tupleFieldName
*/ | Given a value with an avro schema, saves that value in the tuple field specified by tupleFieldName | setTupleFieldFromPersistent | {
"repo_name": "jaferreiro/gora-indra",
"path": "gora-cascading/src/main/java/org/apache/gora/cascading/tap/AbstractGoraScheme.java",
"license": "apache-2.0",
"size": 20978
} | [
"org.apache.avro.Schema"
] | import org.apache.avro.Schema; | import org.apache.avro.*; | [
"org.apache.avro"
] | org.apache.avro; | 718,620 |
@OnError
public void onError (Session session, Throwable throwable, @PathParam("streamname") String streamName,
@PathParam("version") String version, @PathParam("tdomain") String tdomain) {
try {
PrivilegedCarbonContext.getThreadLocalCarbonContext().startTenantFlow();
... | void function (Session session, Throwable throwable, @PathParam(STR) String streamName, @PathParam(STR) String version, @PathParam(STR) String tdomain) { try { PrivilegedCarbonContext.getThreadLocalCarbonContext().startTenantFlow(); PrivilegedCarbonContext.getThreadLocalCarbonContext().setTenantDomain(tdomain, true); s... | /**
* Web socket onError - Remove the registered sessions
*
* @param session - Users registered session.
* @param throwable - Status code for web-socket close.
* @param streamName - StreamName extracted from the ws url.
* @param version - Version extracted from the ws url.
*/ | Web socket onError - Remove the registered sessions | onError | {
"repo_name": "Shabirmean/carbon-device-mgt-plugins",
"path": "components/iot-plugins/iot-base-plugin/org.wso2.carbon.device.mgt.iot.output.adapter.ui.endpoint/src/main/java/TenantSubscriptionEndpoint.java",
"license": "apache-2.0",
"size": 6313
} | [
"javax.websocket.Session",
"javax.websocket.server.PathParam",
"org.wso2.carbon.context.PrivilegedCarbonContext"
] | import javax.websocket.Session; import javax.websocket.server.PathParam; import org.wso2.carbon.context.PrivilegedCarbonContext; | import javax.websocket.*; import javax.websocket.server.*; import org.wso2.carbon.context.*; | [
"javax.websocket",
"org.wso2.carbon"
] | javax.websocket; org.wso2.carbon; | 171,734 |
public void unbind(Registry registry) {
try {
registry.unbind(getServerName());
} catch (Exception exception) {
}
} | void function(Registry registry) { try { registry.unbind(getServerName()); } catch (Exception exception) { } } | /**
* Removes this current server from the registry
* Creation date: (7/21/00 10:53:37 AM)
* @param registry java.rmi.registry.Registry
*/ | Removes this current server from the registry Creation date: (7/21/00 10:53:37 AM) | unbind | {
"repo_name": "RallySoftware/eclipselink.runtime",
"path": "foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/distributedservers/DistributedServer.java",
"license": "epl-1.0",
"size": 4807
} | [
"java.rmi.registry.Registry"
] | import java.rmi.registry.Registry; | import java.rmi.registry.*; | [
"java.rmi"
] | java.rmi; | 254,103 |
public void startPortletHeaderRender(IPortletWindowId portletWindowId, HttpServletRequest request, HttpServletResponse response); | void function(IPortletWindowId portletWindowId, HttpServletRequest request, HttpServletResponse response); | /**
* Initiates the rendering worker for the portlet's HEAD output.
* Returns immediately.
*
* @param portletWindowId
* @param request
* @param response
*/ | Initiates the rendering worker for the portlet's HEAD output. Returns immediately | startPortletHeaderRender | {
"repo_name": "drewwills/uPortal",
"path": "uportal-war/src/main/java/org/jasig/portal/portlet/rendering/IPortletExecutionManager.java",
"license": "apache-2.0",
"size": 6623
} | [
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"org.jasig.portal.portlet.om.IPortletWindowId"
] | import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.jasig.portal.portlet.om.IPortletWindowId; | import javax.servlet.http.*; import org.jasig.portal.portlet.om.*; | [
"javax.servlet",
"org.jasig.portal"
] | javax.servlet; org.jasig.portal; | 1,988,879 |
public EntityInterface getEntity()
{
return entity;
}
| EntityInterface function() { return entity; } | /**
* This method returns the Entity associated with this Attribute.
* @hibernate.many-to-one column="ENTIY_ID" class="edu.common.dynamicextensions.domain.Entity" constrained="true"
* @return EntityInterface the Entity associated with the Attribute.
*/ | This method returns the Entity associated with this Attribute | getEntity | {
"repo_name": "NCIP/cab2b",
"path": "software/dependencies/dynamicextensions/caB2B_2009_JUN_02/src/edu/common/dynamicextensions/domain/AbstractAttribute.java",
"license": "bsd-3-clause",
"size": 3448
} | [
"edu.common.dynamicextensions.domaininterface.EntityInterface"
] | import edu.common.dynamicextensions.domaininterface.EntityInterface; | import edu.common.dynamicextensions.domaininterface.*; | [
"edu.common.dynamicextensions"
] | edu.common.dynamicextensions; | 2,435,605 |
@Deprecated
public byte[] getPostBody() throws AuthFailureError {
// Note: For compatibility with legacy clients of volley, this implementation must remain
// here instead of simply calling the getBody() function because this function must
// call getPostParams() and getPostParamsEnc... | byte[] function() throws AuthFailureError { Map<String, String> postParams = getPostParams(); if (postParams != null && postParams.size() > 0) { return encodeParameters(postParams, getPostParamsEncoding()); } return null; } | /**
* Returns the raw POST body to be sent.
*
* @throws AuthFailureError In the event of auth failure
*
* @deprecated Use {@link #getBody()} instead.
*/ | Returns the raw POST body to be sent | getPostBody | {
"repo_name": "YamatoMiura/kuruchan",
"path": "volley/src/main/java/com/android/volley/Request.java",
"license": "gpl-2.0",
"size": 19745
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,627,778 |
final WsFederationCredential wsFedCredentials = (WsFederationCredential) credentials;
final Map<String, List<Object>> attributes = wsFedCredentials.getAttributes();
LOGGER.debug("Credential attributes provided are: [{}]", attributes);
final String idAttribute = this.configuration.getIdentityAt... | final WsFederationCredential wsFedCredentials = (WsFederationCredential) credentials; final Map<String, List<Object>> attributes = wsFedCredentials.getAttributes(); LOGGER.debug(STR, attributes); final String idAttribute = this.configuration.getIdentityAttribute(); if (attributes.containsKey(idAttribute)) { LOGGER.debu... | /**
* Extracts the principalId.
*
* @param credentials the credentials
* @return the principal id
*/ | Extracts the principalId | extractPrincipalId | {
"repo_name": "Unicon/cas",
"path": "support/cas-server-support-wsfederation/src/main/java/org/apereo/cas/support/wsfederation/authentication/principal/WsFederationCredentialsToPrincipalResolver.java",
"license": "apache-2.0",
"size": 4460
} | [
"java.util.List",
"java.util.Map"
] | import java.util.List; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,854,222 |
public ArrayList<ColorStyle> getAllStyles() {
ArrayList<ColorStyle> styles = new ArrayList<ColorStyle>();
styles.addAll(iconStyles.values());
styles.addAll(lineStyles.values());
styles.addAll(polygonStyles.values());
return styles;
} | ArrayList<ColorStyle> function() { ArrayList<ColorStyle> styles = new ArrayList<ColorStyle>(); styles.addAll(iconStyles.values()); styles.addAll(lineStyles.values()); styles.addAll(polygonStyles.values()); return styles; } | /**
* Returns all styles for this theme, in an ArrayList.
*
* @return
*/ | Returns all styles for this theme, in an ArrayList | getAllStyles | {
"repo_name": "alecdhuse/Folding-Map",
"path": "FoldingMap/src/co/foldingmap/map/themes/MapTheme.java",
"license": "gpl-3.0",
"size": 13468
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 2,162,836 |
private int dependenciesHelperForModifyTargetReferenceMutator(ModifyTargetReferenceMutator mut, int com, List<Mutator> previousMutators) {
int value = 1;
if (mut.getSource() instanceof SpecificObjectSelection) {
SpecificObjectSelection selection = (SpecificObjectSelection) mut.getSource();
if (mutatorData.... | int function(ModifyTargetReferenceMutator mut, int com, List<Mutator> previousMutators) { int value = 1; if (mut.getSource() instanceof SpecificObjectSelection) { SpecificObjectSelection selection = (SpecificObjectSelection) mut.getSource(); if (mutatorData.get(selection.getObjSel().getName()) != null) { String mutator... | /**
* Dependencies helper for modify target reference mutator
* @param mut
* @param com
* @param previousMutators
* @return
*/ | Dependencies helper for modify target reference mutator | dependenciesHelperForModifyTargetReferenceMutator | {
"repo_name": "gomezabajo/Wodel",
"path": "wodel.utils/src/manager/MutatorDependencies.java",
"license": "epl-1.0",
"size": 22601
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,280,000 |
public final MetaProperty<Boolean> full() {
return _full;
} | final MetaProperty<Boolean> function() { return _full; } | /**
* The meta-property for the {@code full} property.
* @return the meta-property, not null
*/ | The meta-property for the full property | full | {
"repo_name": "jeorme/OG-Platform",
"path": "projects/OG-Financial/src/main/java/com/opengamma/financial/analytics/model/fixedincome/CashFlowDetailsProvider.java",
"license": "apache-2.0",
"size": 22992
} | [
"org.joda.beans.MetaProperty"
] | import org.joda.beans.MetaProperty; | import org.joda.beans.*; | [
"org.joda.beans"
] | org.joda.beans; | 2,723,464 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.