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 Image createImage() throws BadElementException {
if (image == null)
return null;
byte g4[] = CCITTG4Encoder.compress(image, width + 2 * ws, height + 2 * ws);
return Image.getInstance(width + 2 * ws, height + 2 * ws, false, Image.CCITTG4, 0, g4, null);
} | Image function() throws BadElementException { if (image == null) return null; byte g4[] = CCITTG4Encoder.compress(image, width + 2 * ws, height + 2 * ws); return Image.getInstance(width + 2 * ws, height + 2 * ws, false, Image.CCITTG4, 0, g4, null); } | /** Gets an <CODE>Image</CODE> with the barcode. A successful call to the method <CODE>generate()</CODE>
* before calling this method is required.
* @return the barcode <CODE>Image</CODE>
* @throws BadElementException on error
*/ | Gets an <code>Image</code> with the barcode. A successful call to the method <code>generate()</code> before calling this method is required | createImage | {
"repo_name": "shitalm/jsignpdf2",
"path": "src/main/java/com/lowagie/text/pdf/BarcodeDatamatrix.java",
"license": "gpl-2.0",
"size": 49007
} | [
"com.lowagie.text.BadElementException",
"com.lowagie.text.Image",
"com.lowagie.text.pdf.codec.CCITTG4Encoder"
] | import com.lowagie.text.BadElementException; import com.lowagie.text.Image; import com.lowagie.text.pdf.codec.CCITTG4Encoder; | import com.lowagie.text.*; import com.lowagie.text.pdf.codec.*; | [
"com.lowagie.text"
] | com.lowagie.text; | 133,022 |
@Override
public short getShort() throws XQException {
isClosedXQException();
return getItem().getShort();
}
/** \brief Checks if the item "matches" an item type.
*
* Checks if the item "matches" an item type, as defined in 2.5.4.2 Matching an Item Type and an Item, XQuery 1.0: An ... | short function() throws XQException { isClosedXQException(); return getItem().getShort(); } /** \brief Checks if the item STR an item type. * * Checks if the item STR an item type, as defined in 2.5.4.2 Matching an Item Type and an Item, XQuery 1.0: An XML Query Language. You can use this method to first check the type... | /** \brief Gets the current item as a short.
*
* The current item must be an atomic value of type xs:decimal or a subtype, and its value must be in the value space of short.
*
* @return a short representing the current item
* @throw XQException - if (1) the conversion of the current item to a short fai... | \brief Gets the current item as a short. The current item must be an atomic value of type xs:decimal or a subtype, and its value must be in the value space of short | getShort | {
"repo_name": "cezarfx/zorba",
"path": "swig/xqj/ZorbaXQSequence.java",
"license": "apache-2.0",
"size": 48634
} | [
"io.zorba.api.Item",
"javax.xml.xquery.XQException",
"javax.xml.xquery.XQItemType",
"org.w3c.dom.Node"
] | import io.zorba.api.Item; import javax.xml.xquery.XQException; import javax.xml.xquery.XQItemType; import org.w3c.dom.Node; | import io.zorba.api.*; import javax.xml.xquery.*; import org.w3c.dom.*; | [
"io.zorba.api",
"javax.xml",
"org.w3c.dom"
] | io.zorba.api; javax.xml; org.w3c.dom; | 206,797 |
protected boolean setOptionItemEnabled(int itemMenuId, boolean enabled) {
if (_optionsMenu == null)
return false;
MenuItem item = _optionsMenu.findItem(itemMenuId);
if (item == null)
return false;
item.setEnabled(enabled);
return true;
} | boolean function(int itemMenuId, boolean enabled) { if (_optionsMenu == null) return false; MenuItem item = _optionsMenu.findItem(itemMenuId); if (item == null) return false; item.setEnabled(enabled); return true; } | /**
* Enables or disables the specified item of the Action Bar.
* Return false if the item was not found.
*/ | Enables or disables the specified item of the Action Bar. Return false if the item was not found | setOptionItemEnabled | {
"repo_name": "Daimas/android-pachi",
"path": "elygo-lib/src/main/java/lrstudios/util/android/ui/BetterFragmentActivity.java",
"license": "gpl-2.0",
"size": 5303
} | [
"android.view.MenuItem"
] | import android.view.MenuItem; | import android.view.*; | [
"android.view"
] | android.view; | 259,414 |
public static <T extends Entity> T cloneUsingNodeTranslation(T toClone)
throws InstantiationException, IllegalAccessException {
// Create a node using this the object
Node dsNode = NodeTranslationUtils.createFromEntity(toClone);
// Update an annotations object using the object
Annotations annos = new... | static <T extends Entity> T function(T toClone) throws InstantiationException, IllegalAccessException { Node dsNode = NodeTranslationUtils.createFromEntity(toClone); Annotations annos = new Annotations(); NodeTranslationUtils.updateNodeSecondaryFieldsFromObject(toClone, annos); @SuppressWarnings(STR) T clone = (T) toCl... | /**
* Will clone an object by first creating a node and annotations for the passed
* object. A new object will then be created and populated using the node and
* annotations.
*
* @param <T>
* @param toClone
* @throws IllegalAccessException
* @throws InstantiationException
*/ | Will clone an object by first creating a node and annotations for the passed object. A new object will then be created and populated using the node and annotations | cloneUsingNodeTranslation | {
"repo_name": "Sage-Bionetworks/Synapse-Repository-Services",
"path": "services/repository-managers/src/test/java/org/sagebionetworks/repo/manager/NodeTranslationUtilsTest.java",
"license": "apache-2.0",
"size": 12542
} | [
"org.sagebionetworks.repo.model.Annotations",
"org.sagebionetworks.repo.model.Entity",
"org.sagebionetworks.repo.model.Node"
] | import org.sagebionetworks.repo.model.Annotations; import org.sagebionetworks.repo.model.Entity; import org.sagebionetworks.repo.model.Node; | import org.sagebionetworks.repo.model.*; | [
"org.sagebionetworks.repo"
] | org.sagebionetworks.repo; | 2,165,578 |
public static BuildDocHandler fromJar(JarFile jarFile, String base) {
FileRepository repo = new JarRepository(jarFile, Option.apply(base));
return new DocumentationHandler(repo);
} | static BuildDocHandler function(JarFile jarFile, String base) { FileRepository repo = new JarRepository(jarFile, Option.apply(base)); return new DocumentationHandler(repo); } | /**
* Create an BuildDocHandler that serves documentation from a given JAR file by
* wrapping a JarRepository.
*
* @param jarFile The JAR file to server the documentation from.
* @param base The directory within the JAR file to serve the documentation from, or null if the
* ... | Create an BuildDocHandler that serves documentation from a given JAR file by wrapping a JarRepository | fromJar | {
"repo_name": "jyotikamboj/container",
"path": "pf-framework/src/play-docs/src/main/java/play/docs/BuildDocHandlerFactory.java",
"license": "mit",
"size": 4167
} | [
"java.util.jar.JarFile"
] | import java.util.jar.JarFile; | import java.util.jar.*; | [
"java.util"
] | java.util; | 2,612,010 |
public boolean cancelAndRefundOrder(int orderID) {
boolean isOrderRefunded = false;
orderDao = new OrderDAO();
Order custOrder = new OrderImpl();
custOrder = orderDao.getOrderDetails(orderID);
if(Constant.SHIPPED == custOrder.getOrderStatusCode()){
notifyShipmentPartnerForRefund(custOrder);
}
... | boolean function(int orderID) { boolean isOrderRefunded = false; orderDao = new OrderDAO(); Order custOrder = new OrderImpl(); custOrder = orderDao.getOrderDetails(orderID); if(Constant.SHIPPED == custOrder.getOrderStatusCode()){ notifyShipmentPartnerForRefund(custOrder); } PaymentDomain paymentDomain = new PaymentDoma... | /**
* cancels and refunds an order
* @param orderID the order ID to cancel and refund
* @return true on success, false else
*/ | cancels and refunds an order | cancelAndRefundOrder | {
"repo_name": "elliottpost/lakeshoremarket",
"path": "src/com/online/lakeshoremarket/domain/OrderDomain.java",
"license": "gpl-2.0",
"size": 3929
} | [
"com.online.lakeshoremarket.dao.OrderDAO",
"com.online.lakeshoremarket.model.order.Order",
"com.online.lakeshoremarket.model.order.OrderImpl",
"com.online.lakeshoremarket.util.Constant"
] | import com.online.lakeshoremarket.dao.OrderDAO; import com.online.lakeshoremarket.model.order.Order; import com.online.lakeshoremarket.model.order.OrderImpl; import com.online.lakeshoremarket.util.Constant; | import com.online.lakeshoremarket.dao.*; import com.online.lakeshoremarket.model.order.*; import com.online.lakeshoremarket.util.*; | [
"com.online.lakeshoremarket"
] | com.online.lakeshoremarket; | 2,633,486 |
private void addHistEvent(long stopTime, int auth, double value) {
SimpleTimePeriod hour = getTimePeriod(stopTime, mHistWidth);
// Loop over all datasets to do the stacking.
for (int i = auth; i <= ERRORS; i++) {
addToPeriod(mDatasetsSyncHist, i, hour, value);
}
} | void function(long stopTime, int auth, double value) { SimpleTimePeriod hour = getTimePeriod(stopTime, mHistWidth); for (int i = auth; i <= ERRORS; i++) { addToPeriod(mDatasetsSyncHist, i, hour, value); } } | /**
* Helper to add an event to the data series.
* Also updates error series if appropriate (x or X in details).
* @param stopTime Time event ends
* @param auth Sync authority
* @param value Value to graph for event
*/ | Helper to add an event to the data series. Also updates error series if appropriate (x or X in details) | addHistEvent | {
"repo_name": "lrscp/ControlAndroidDeviceFromPC",
"path": "src/com/android/ddmuilib/log/event/DisplaySyncHistogram.java",
"license": "apache-2.0",
"size": 6562
} | [
"org.jfree.data.time.SimpleTimePeriod"
] | import org.jfree.data.time.SimpleTimePeriod; | import org.jfree.data.time.*; | [
"org.jfree.data"
] | org.jfree.data; | 2,877,981 |
public void checkLoginAllowed() throws CmsAuthentificationException {
if ((m_loginMessage != null) && (m_loginMessage.isLoginCurrentlyForbidden())) {
// login message has been set and is active
throw new CmsAuthentificationException(Messages.get().container... | void function() throws CmsAuthentificationException { if ((m_loginMessage != null) && (m_loginMessage.isLoginCurrentlyForbidden())) { throw new CmsAuthentificationException(Messages.get().container( Messages.ERR_LOGIN_FAILED_WITH_MESSAGE_1, m_loginMessage.getMessage())); } } | /**
* Checks if a login is currently allowed.<p>
*
* In case no logins are allowed, an Exception is thrown.<p>
*
* @throws CmsAuthentificationException in case no logins are allowed
*/ | Checks if a login is currently allowed. In case no logins are allowed, an Exception is thrown | checkLoginAllowed | {
"repo_name": "comundus/opencms-comundus",
"path": "src/main/java/org/opencms/db/CmsLoginManager.java",
"license": "lgpl-2.1",
"size": 13073
} | [
"org.opencms.security.CmsAuthentificationException",
"org.opencms.security.Messages"
] | import org.opencms.security.CmsAuthentificationException; import org.opencms.security.Messages; | import org.opencms.security.*; | [
"org.opencms.security"
] | org.opencms.security; | 2,668,513 |
public final List<Cause> getCauses() {
CauseAction ca = getAction(CauseAction.class);
if (ca!=null)
return Collections.unmodifiableList(ca.getCauses());
return Collections.emptyList();
} | final List<Cause> function() { CauseAction ca = getAction(CauseAction.class); if (ca!=null) return Collections.unmodifiableList(ca.getCauses()); return Collections.emptyList(); } | /**
* Convenience method that returns a read only view of the {@link Cause}s associated with this item in the queue.
*
* @return can be empty but never null
* @since 1.343
*/ | Convenience method that returns a read only view of the <code>Cause</code>s associated with this item in the queue | getCauses | {
"repo_name": "kohsuke/hudson",
"path": "core/src/main/java/hudson/model/Queue.java",
"license": "mit",
"size": 115775
} | [
"java.util.Collections",
"java.util.List"
] | import java.util.Collections; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,076,729 |
public DataTypeDO addDataType(FuzzTestDO fuzzTest, DataTypeDO dataType) {
return addDataType(fuzzTest.getId(), dataType);
} | DataTypeDO function(FuzzTestDO fuzzTest, DataTypeDO dataType) { return addDataType(fuzzTest.getId(), dataType); } | /**
* Add a data type to the fuzzTest.
* @param fuzzTest
* @param dataType
* @return
*/ | Add a data type to the fuzzTest | addDataType | {
"repo_name": "epri-dev/PT2",
"path": "src/main/java/org/epri/pt2/controller/DataTypeController.java",
"license": "bsd-3-clause",
"size": 8925
} | [
"org.epri.pt2.DO"
] | import org.epri.pt2.DO; | import org.epri.pt2.*; | [
"org.epri.pt2"
] | org.epri.pt2; | 1,047,910 |
public Future<Boolean> cas(String key, String value, Buf casUnique) {
return this.cas(key, toBuffer(value), casUnique);
} | Future<Boolean> function(String key, String value, Buf casUnique) { return this.cas(key, toBuffer(value), casUnique); } | /**
* Convenience version of cas used to store string values.
*/ | Convenience version of cas used to store string values | cas | {
"repo_name": "Krasnyanskiy/finagle",
"path": "finagle-memcachedx/src/main/java/com/twitter/finagle/memcachedx/java/Client.java",
"license": "apache-2.0",
"size": 5216
} | [
"com.twitter.io.Buf",
"com.twitter.util.Future"
] | import com.twitter.io.Buf; import com.twitter.util.Future; | import com.twitter.io.*; import com.twitter.util.*; | [
"com.twitter.io",
"com.twitter.util"
] | com.twitter.io; com.twitter.util; | 1,225,126 |
@Test
public void testPropertyProject() throws RemoteException
{
System.out.println("\r\nsetProject");
String newProjectName = "";
instance.setProjectName(newProjectName);
String result = instance.getProjectName();
assertNotNull(result);
assertEquals(newPro... | void function() throws RemoteException { System.out.println(STR); String newProjectName = ""; instance.setProjectName(newProjectName); String result = instance.getProjectName(); assertNotNull(result); assertEquals(newProjectName, result); } | /**
* Test of setProject method, of class CodeSegment.
*
* @throws java.rmi.RemoteException
*/ | Test of setProject method, of class CodeSegment | testPropertyProject | {
"repo_name": "ldawkes/LiveBeans",
"path": "LiveBeansClient/test/unit/src/livebeansclient/CodeSegmentTest.java",
"license": "apache-2.0",
"size": 3496
} | [
"java.rmi.RemoteException",
"org.junit.Assert"
] | import java.rmi.RemoteException; import org.junit.Assert; | import java.rmi.*; import org.junit.*; | [
"java.rmi",
"org.junit"
] | java.rmi; org.junit; | 2,806,033 |
public static Map<String, Object> revisionHistoryToJson(List<BasicDocumentRevision> history) {
return revisionHistoryToJson(history, null, null, 0);
}
/**
* <p>Serialise a branch's revision history, in the form of a list of
* {@link BasicDocumentRevision}s, into the JSON format expected b... | static Map<String, Object> function(List<BasicDocumentRevision> history) { return revisionHistoryToJson(history, null, null, 0); } /** * <p>Serialise a branch's revision history, in the form of a list of * {@link BasicDocumentRevision}s, into the JSON format expected by CouchDB's _bulk_docs * endpoint.</p> * * @param h... | /**
* Serialise a branch's revision history, without attachments.
* See {@link #revisionHistoryToJson(java.util.List, java.util.List, com.cloudant.sync.replication.PushAttachmentsInline, int)} for details.
* @param history list of {@code DocumentRevision}s.
* @return JSON-serialised {@code String} s... | Serialise a branch's revision history, without attachments. See <code>#revisionHistoryToJson(java.util.List, java.util.List, com.cloudant.sync.replication.PushAttachmentsInline, int)</code> for details | revisionHistoryToJson | {
"repo_name": "akhilesh0707/sync-android",
"path": "cloudant-sync-datastore-core/src/main/java/com/cloudant/sync/datastore/RevisionHistoryHelper.java",
"license": "apache-2.0",
"size": 14037
} | [
"java.util.List",
"java.util.Map"
] | import java.util.List; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 370,378 |
public void consumeTweets(List<String> tweets);
| void function(List<String> tweets); | /**
* This method is called by the {@link TwitterStream} ({@link SwingWorker})
* object when it has processed one or more tweets.
*
* @param tweets
*/ | This method is called by the <code>TwitterStream</code> (<code>SwingWorker</code>) object when it has processed one or more tweets | consumeTweets | {
"repo_name": "Snorremd/INFO233",
"path": "Obligatorisk Oppgave 1/src/controllers/TweetConsumer.java",
"license": "mit",
"size": 614
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 114,089 |
String eventSource = "<aura:event type='COMPONENT'/>";
DefDescriptor<EventDef> descriptor =
getAuraTestingUtil().addSourceAutoCleanup(EventDef.class,
eventSource, StringSourceLoader.DEFAULT_NAMESPACE+":testEvent",
true);
Source<EventDef> source = StringSourceLoad... | String eventSource = STR; DefDescriptor<EventDef> descriptor = getAuraTestingUtil().addSourceAutoCleanup(EventDef.class, eventSource, StringSourceLoader.DEFAULT_NAMESPACE+STR, true); Source<EventDef> source = StringSourceLoader.getInstance().getSource(descriptor); Parser<EventDef> parser = ParserFactory.getParser(Forma... | /***********************************************************************************
******************* Tests for Internal Namespace start ****************************
************************************************************************************/ | Tests for Internal Namespace start | testEventWithDefaultAccessInternalNamespace | {
"repo_name": "badlogicmanpreet/aura",
"path": "aura-impl/src/test/java/org/auraframework/impl/root/parser/handler/EventAccessAttributeTest.java",
"license": "apache-2.0",
"size": 88217
} | [
"org.auraframework.def.DefDescriptor",
"org.auraframework.def.Definition",
"org.auraframework.def.EventDef",
"org.auraframework.impl.parser.ParserFactory",
"org.auraframework.system.Parser",
"org.auraframework.system.Source",
"org.auraframework.test.source.StringSourceLoader"
] | import org.auraframework.def.DefDescriptor; import org.auraframework.def.Definition; import org.auraframework.def.EventDef; import org.auraframework.impl.parser.ParserFactory; import org.auraframework.system.Parser; import org.auraframework.system.Source; import org.auraframework.test.source.StringSourceLoader; | import org.auraframework.def.*; import org.auraframework.impl.parser.*; import org.auraframework.system.*; import org.auraframework.test.source.*; | [
"org.auraframework.def",
"org.auraframework.impl",
"org.auraframework.system",
"org.auraframework.test"
] | org.auraframework.def; org.auraframework.impl; org.auraframework.system; org.auraframework.test; | 10,148 |
public void write( IGeneratorSet generatorSet, File file)
{
try( GeneratorSetDocWriter writer = createWriter( file))
{
writer.write( generatorSet);
}
catch( Exception e)
{
throw new RuntimeException( "Can't write " + generatorSet + " to file=" + file, e);
}
} | void function( IGeneratorSet generatorSet, File file) { try( GeneratorSetDocWriter writer = createWriter( file)) { writer.write( generatorSet); } catch( Exception e) { throw new RuntimeException( STR + generatorSet + STR + file, e); } } | /**
* Writes the {@link IGeneratorSet} to the the given file.
*/ | Writes the <code>IGeneratorSet</code> to the the given file | write | {
"repo_name": "Cornutum/tcases",
"path": "tcases-io/src/test/java/org/cornutum/tcases/generator/io/GeneratorSetResources.java",
"license": "mit",
"size": 4520
} | [
"java.io.File",
"org.cornutum.tcases.generator.IGeneratorSet"
] | import java.io.File; import org.cornutum.tcases.generator.IGeneratorSet; | import java.io.*; import org.cornutum.tcases.generator.*; | [
"java.io",
"org.cornutum.tcases"
] | java.io; org.cornutum.tcases; | 2,535,966 |
EReference getObjectDefinition_Events(); | EReference getObjectDefinition_Events(); | /**
* Returns the meta object for the containment reference list '{@link org.xtuml.bp.xtext.masl.masl.structure.ObjectDefinition#getEvents <em>Events</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference list '<em>Events</em>'.
* @see org.xtuml.bp.xt... | Returns the meta object for the containment reference list '<code>org.xtuml.bp.xtext.masl.masl.structure.ObjectDefinition#getEvents Events</code>'. | getObjectDefinition_Events | {
"repo_name": "lwriemen/bridgepoint",
"path": "src/org.xtuml.bp.xtext.masl.parent/org.xtuml.bp.xtext.masl/emf-gen/org/xtuml/bp/xtext/masl/masl/structure/StructurePackage.java",
"license": "apache-2.0",
"size": 189771
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,703,201 |
protected List<Pixels> importFile(File file, String format)
throws Throwable {
return importFile(importer, file, format, false, null);
} | List<Pixels> function(File file, String format) throws Throwable { return importFile(importer, file, format, false, null); } | /**
* Imports the specified OME-XML file and returns the pixels set if
* successfully imported.
*
* @param file
* The file to import.
* @param format
* The format of the file to import.
* @return The collection of imported pixels set.
* @throws Exceptio... | Imports the specified OME-XML file and returns the pixels set if successfully imported | importFile | {
"repo_name": "tp81/openmicroscopy",
"path": "components/tools/OmeroJava/test/integration/AbstractServerTest.java",
"license": "gpl-2.0",
"size": 80125
} | [
"java.io.File",
"java.util.List"
] | import java.io.File; import java.util.List; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 799,655 |
@GET("groups/{id}/listentries")
Call<List<EntryInfo>> getList(@Path("id") int _id,
@Query("changedsince") String _sinceTimeString); | @GET(STR) Call<List<EntryInfo>> getList(@Path("id") int _id, @Query(STR) String _sinceTimeString); | /**
* Get the listentries since the given time.
*
* @param _sinceTimeString in ISO8601 format.
* @return the list of listentries changed since this date.
*/ | Get the listentries since the given time | getList | {
"repo_name": "InstaList/instalist-synch",
"path": "src/main/java/org/noorganization/instalistsynch/controller/network/api/authorized/IListEntryApiService.java",
"license": "apache-2.0",
"size": 2921
} | [
"java.util.List",
"org.noorganization.instalist.comm.message.EntryInfo"
] | import java.util.List; import org.noorganization.instalist.comm.message.EntryInfo; | import java.util.*; import org.noorganization.instalist.comm.message.*; | [
"java.util",
"org.noorganization.instalist"
] | java.util; org.noorganization.instalist; | 1,157,983 |
protected CommonProfile authenticate(HttpServletRequest request, HttpServletResponse response, WebContext context)
throws RequiresHttpAction {
String currentClientName = getClientName(context);
final Client client = ClientsConfiguration.getClients().findClient(currentClientName);
... | CommonProfile function(HttpServletRequest request, HttpServletResponse response, WebContext context) throws RequiresHttpAction { String currentClientName = getClientName(context); final Client client = ClientsConfiguration.getClients().findClient(currentClientName); logger.debug(STR, client); final Credentials credenti... | /**
* Authenticates the current request by getting the credentials and the corresponding user profile.
*
* @param request
* @param response
* @param context
* @return
* @throws RequiresHttpAction
*/ | Authenticates the current request by getting the credentials and the corresponding user profile | authenticate | {
"repo_name": "leleuj/j2e-pac4j",
"path": "src/main/java/org/pac4j/j2e/filter/RequiresAuthenticationFilter.java",
"license": "apache-2.0",
"size": 9897
} | [
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"org.pac4j.core.client.Client",
"org.pac4j.core.context.WebContext",
"org.pac4j.core.credentials.Credentials",
"org.pac4j.core.exception.RequiresHttpAction",
"org.pac4j.core.profile.CommonProfile",
"org.pac4j.j2e.config... | import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.pac4j.core.client.Client; import org.pac4j.core.context.WebContext; import org.pac4j.core.credentials.Credentials; import org.pac4j.core.exception.RequiresHttpAction; import org.pac4j.core.profile.CommonProfile; impo... | import javax.servlet.http.*; import org.pac4j.core.client.*; import org.pac4j.core.context.*; import org.pac4j.core.credentials.*; import org.pac4j.core.exception.*; import org.pac4j.core.profile.*; import org.pac4j.j2e.configuration.*; | [
"javax.servlet",
"org.pac4j.core",
"org.pac4j.j2e"
] | javax.servlet; org.pac4j.core; org.pac4j.j2e; | 2,708,735 |
public Builder country(final CountryCode country) {
assert (country != null);
return setQueryParameter("country", country);
} | Builder function(final CountryCode country) { assert (country != null); return setQueryParameter(STR, country); } | /**
* The country code setter.
*
* @param country Optional. A country: an ISO 3166-1 alpha-2 country code. Provide this parameter if you want to
* narrow the list of returned categories to those relevant to a particular country. If omitted, the
* returned items wil... | The country code setter | country | {
"repo_name": "thelinmichael/spotify-web-api-java",
"path": "src/main/java/com/wrapper/spotify/requests/data/browse/GetListOfFeaturedPlaylistsRequest.java",
"license": "mit",
"size": 6174
} | [
"com.neovisionaries.i18n.CountryCode"
] | import com.neovisionaries.i18n.CountryCode; | import com.neovisionaries.i18n.*; | [
"com.neovisionaries.i18n"
] | com.neovisionaries.i18n; | 2,875,816 |
public void testThatNotificationWorkAsExpectedManyCaches() throws Exception {
final int smallDuration = 4_000;
final int cnt = 1_000;
final int cacheCnt = CACHES_CNT;
final int threadCnt = 2;
final CyclicBarrier barrier = new CyclicBarrier(2 * threadCnt * cacheCnt + 1);
... | void function() throws Exception { final int smallDuration = 4_000; final int cnt = 1_000; final int cacheCnt = CACHES_CNT; final int threadCnt = 2; final CyclicBarrier barrier = new CyclicBarrier(2 * threadCnt * cacheCnt + 1); final AtomicInteger keysRangeGen = new AtomicInteger(); final AtomicInteger evtCnt = new Ato... | /**
* Adds in several threads value to several caches with different expiration policy.
* Waits for expiration of keys with small expiration duration.
*
* @throws Exception If failed.
*/ | Adds in several threads value to several caches with different expiration policy. Waits for expiration of keys with small expiration duration | testThatNotificationWorkAsExpectedManyCaches | {
"repo_name": "afinka77/ignite",
"path": "modules/core/src/test/java/org/apache/ignite/internal/processors/cache/GridCacheTtlManagerNotificationTest.java",
"license": "apache-2.0",
"size": 10280
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.concurrent.CyclicBarrier",
"java.util.concurrent.atomic.AtomicInteger",
"org.apache.ignite.Ignite",
"org.apache.ignite.IgniteCache"
] | import java.util.ArrayList; import java.util.List; import java.util.concurrent.CyclicBarrier; import java.util.concurrent.atomic.AtomicInteger; import org.apache.ignite.Ignite; import org.apache.ignite.IgniteCache; | import java.util.*; import java.util.concurrent.*; import java.util.concurrent.atomic.*; import org.apache.ignite.*; | [
"java.util",
"org.apache.ignite"
] | java.util; org.apache.ignite; | 2,153,559 |
@Override
public NameParser getNameParser(String name) throws NamingException {
return getNameParser(new CompositeName(name));
}
| NameParser function(String name) throws NamingException { return getNameParser(new CompositeName(name)); } | /**
* Retrieves the parser associated with the named context.
*
* @param name the name of the context from which to get the parser
* @return a name parser that can parse compound names into their atomic
* components
* @throws NamingException if a jndi exception is encountered
*... | Retrieves the parser associated with the named context | getNameParser | {
"repo_name": "Nipuni/carbon-jndi",
"path": "components/org.wso2.carbon.jndi/src/main/java/org/wso2/carbon/jndi/internal/impl/NamingContext.java",
"license": "apache-2.0",
"size": 34178
} | [
"javax.naming.CompositeName",
"javax.naming.NameParser",
"javax.naming.NamingException"
] | import javax.naming.CompositeName; import javax.naming.NameParser; import javax.naming.NamingException; | import javax.naming.*; | [
"javax.naming"
] | javax.naming; | 2,758,119 |
boolean supportsProject(IProject project); | boolean supportsProject(IProject project); | /** Returns true if the provided project has a registered nature
*
* @param project
* @return
*/ | Returns true if the provided project has a registered nature | supportsProject | {
"repo_name": "OSSIndex/eclipse-common-build",
"path": "plugins/net.ossindex.eclipse.common.builder/src/net/ossindex/eclipse/common/builder/service/ICommonBuildService.java",
"license": "bsd-3-clause",
"size": 3019
} | [
"org.eclipse.core.resources.IProject"
] | import org.eclipse.core.resources.IProject; | import org.eclipse.core.resources.*; | [
"org.eclipse.core"
] | org.eclipse.core; | 558,119 |
public HeaderWriter<V> appendExtension(Parameter extension) {
if (extension != null) {
return appendExtension(extension.getName(), extension.getValue());
} else {
return this;
}
}
| HeaderWriter<V> function(Parameter extension) { if (extension != null) { return appendExtension(extension.getName(), extension.getValue()); } else { return this; } } | /**
* Formats and appends a parameter as an extension. If the value is not a
* token, then it is quoted.
*
* @param extension
* The parameter to format as an extension.
* @return This writer.
*/ | Formats and appends a parameter as an extension. If the value is not a token, then it is quoted | appendExtension | {
"repo_name": "pecko/debrief",
"path": "org.mwc.asset.comms/docs/restlet_src/org.restlet/org/restlet/engine/http/header/HeaderWriter.java",
"license": "epl-1.0",
"size": 8793
} | [
"org.restlet.data.Parameter"
] | import org.restlet.data.Parameter; | import org.restlet.data.*; | [
"org.restlet.data"
] | org.restlet.data; | 1,607,930 |
@Test
public void testChunkedEncodeMultipleOf76() {
final byte[] expectedEncode = Base64.encodeBase64( Base64TestData.DECODED, true );
// convert to "\r\n" so we're equal to the old openssl encoding test stored
// in Base64TestData.ENCODED_76_CHARS_PER_LINE:
final String actualResult = Base64TestDat... | void function() { final byte[] expectedEncode = Base64.encodeBase64( Base64TestData.DECODED, true ); final String actualResult = Base64TestData.ENCODED_76_CHARS_PER_LINE.replaceAll( "\n", "\r\n" ); final byte[] actualEncode = StringUtil.getBytesUtf8( actualResult ); assertTrue( STR, Arrays.equals( expectedEncode, actua... | /**
* Tests Base64.encodeBase64().
*/ | Tests Base64.encodeBase64() | testChunkedEncodeMultipleOf76 | {
"repo_name": "sdcote/commons",
"path": "src/test/java/coyote/commons/codec/Base64Test.java",
"license": "mit",
"size": 74096
} | [
"java.util.Arrays",
"org.junit.Assert"
] | import java.util.Arrays; import org.junit.Assert; | import java.util.*; import org.junit.*; | [
"java.util",
"org.junit"
] | java.util; org.junit; | 1,679,352 |
private ScheduledFuture initGatherStatisticsTimerThread(Long time) {
gatherStatsScheduledFuture = jmsGatherEventsToSendService.scheduleAtFixedRate(gatherStatisticsTask, time, time, TimeUnit.MILLISECONDS);
return gatherStatsScheduledFuture;
} | ScheduledFuture function(Long time) { gatherStatsScheduledFuture = jmsGatherEventsToSendService.scheduleAtFixedRate(gatherStatisticsTask, time, time, TimeUnit.MILLISECONDS); return gatherStatsScheduledFuture; } | /**
* Start the timer thread
*/ | Start the timer thread | initGatherStatisticsTimerThread | {
"repo_name": "claudiu-stanciu/kylo",
"path": "integrations/nifi/nifi-nar-bundles/nifi-provenance-repo-bundle/nifi-provenance-repo/src/main/java/com/thinkbiganalytics/nifi/provenance/repo/FeedStatisticsManager.java",
"license": "apache-2.0",
"size": 8885
} | [
"java.util.concurrent.ScheduledFuture",
"java.util.concurrent.TimeUnit"
] | import java.util.concurrent.ScheduledFuture; import java.util.concurrent.TimeUnit; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 1,201,033 |
public static boolean isNullOrEmpty(@Nullable String s) {
return s == null || s.length() == 0;
} | static boolean function(@Nullable String s) { return s == null s.length() == 0; } | /**
* Indicates whether the given {@code String} is {@code null} or empty.
*
* @param s the {@code String} to check.
* @return {@code true} if the given {@code String} is {@code null} or empty, otherwise {@code false}.
*/ | Indicates whether the given String is null or empty | isNullOrEmpty | {
"repo_name": "alexruiz/fest-util",
"path": "src/main/java/org/fest/util/Strings.java",
"license": "apache-2.0",
"size": 6096
} | [
"org.jetbrains.annotations.Nullable"
] | import org.jetbrains.annotations.Nullable; | import org.jetbrains.annotations.*; | [
"org.jetbrains.annotations"
] | org.jetbrains.annotations; | 213,950 |
public static void startActionSetColour(Context context, Mote mote, int newColour) {
Intent intent = new Intent(context, MoteAPIService.class);
intent.setAction(ACTION_SET_COLOUR);
intent.putExtra(EXTRA_MOTE, mote);
intent.putExtra(EXTRA_COLOUR, newColour);
context.startServi... | static void function(Context context, Mote mote, int newColour) { Intent intent = new Intent(context, MoteAPIService.class); intent.setAction(ACTION_SET_COLOUR); intent.putExtra(EXTRA_MOTE, mote); intent.putExtra(EXTRA_COLOUR, newColour); context.startService(intent); } | /**
* Starts the service to call the Mote API to change the current colour. If
* the service is already performing a task this action will be queued.
*/ | Starts the service to call the Mote API to change the current colour. If the service is already performing a task this action will be queued | startActionSetColour | {
"repo_name": "EarthstormSoftware/controllerformote-android",
"path": "app/src/main/java/com/earthstormsoftware/motecontrol/api/MoteAPIService.java",
"license": "apache-2.0",
"size": 10421
} | [
"android.content.Context",
"android.content.Intent",
"com.earthstormsoftware.motecontrol.model.Mote"
] | import android.content.Context; import android.content.Intent; import com.earthstormsoftware.motecontrol.model.Mote; | import android.content.*; import com.earthstormsoftware.motecontrol.model.*; | [
"android.content",
"com.earthstormsoftware.motecontrol"
] | android.content; com.earthstormsoftware.motecontrol; | 99,410 |
public List<String> getSynonyms() {
return Collections.unmodifiableList(synonyms);
} | List<String> function() { return Collections.unmodifiableList(synonyms); } | /**
* Gets the synonyms of this value according to a given thesaurus.
* @return an unmodifiable list of synonyms to this value.
*/ | Gets the synonyms of this value according to a given thesaurus | getSynonyms | {
"repo_name": "auroreallibe/Silverpeas-Core",
"path": "core-web/src/main/java/org/silverpeas/core/webapi/pdc/PdcValueEntity.java",
"license": "agpl-3.0",
"size": 5491
} | [
"java.util.Collections",
"java.util.List"
] | import java.util.Collections; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,732,626 |
public StorageClient getStorageClient() {
return _storage;
} | StorageClient function() { return _storage; } | /**
* The storage client, this method is used in tests.
*/ | The storage client, this method is used in tests | getStorageClient | {
"repo_name": "mosoft521/memcached-session-manager",
"path": "core/src/main/java/de/javakaffee/web/msm/MemcachedSessionService.java",
"license": "apache-2.0",
"size": 78504
} | [
"de.javakaffee.web.msm.storage.StorageClient"
] | import de.javakaffee.web.msm.storage.StorageClient; | import de.javakaffee.web.msm.storage.*; | [
"de.javakaffee.web"
] | de.javakaffee.web; | 174,382 |
@Override public void setSortOrderIndex(List<Integer> sortOrderIndex) {
} | @Override void function(List<Integer> sortOrderIndex) { } | /**
* This method will set the sort order index of a dictionary column.
* Sort order index if the index of dictionary values after they are sorted.
*
* @param sortOrderIndex
*/ | This method will set the sort order index of a dictionary column. Sort order index if the index of dictionary values after they are sorted | setSortOrderIndex | {
"repo_name": "Zhangshunyu/incubator-carbondata",
"path": "core/src/main/java/org/apache/carbondata/core/cache/dictionary/AbstractColumnDictionaryInfo.java",
"license": "apache-2.0",
"size": 9406
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,782,229 |
public List<Speaker> findSpeakersByEventBranchId(final Long eventBranchId) {
return new ArrayList<Speaker>();
} | List<Speaker> function(final Long eventBranchId) { return new ArrayList<Speaker>(); } | /**
* Finds all Speakers for the concrete Event branch
* @param eventBranchId an ID of the Event branch
* @return a list of Speaker objects
*/ | Finds all Speakers for the concrete Event branch | findSpeakersByEventBranchId | {
"repo_name": "AnnieOmsk/it-conference",
"path": "src/main/java/org/happydev/core/service/SpeakerPresenter.java",
"license": "apache-2.0",
"size": 1333
} | [
"java.util.ArrayList",
"java.util.List",
"org.happydev.core.model.content.Speaker"
] | import java.util.ArrayList; import java.util.List; import org.happydev.core.model.content.Speaker; | import java.util.*; import org.happydev.core.model.content.*; | [
"java.util",
"org.happydev.core"
] | java.util; org.happydev.core; | 812,383 |
MediaPeriod createPeriod(MediaPeriodId id, Allocator allocator); | MediaPeriod createPeriod(MediaPeriodId id, Allocator allocator); | /**
* Returns a new {@link MediaPeriod} identified by {@code periodId}. This method may be called
* multiple times with the same period identifier without an intervening call to
* {@link #releasePeriod(MediaPeriod)}.
*
* @param id The identifier of the period.
* @param allocator An {@link Allocator} f... | Returns a new <code>MediaPeriod</code> identified by periodId. This method may be called multiple times with the same period identifier without an intervening call to <code>#releasePeriod(MediaPeriod)</code> | createPeriod | {
"repo_name": "antoniodiraff/ExoPlayer_Library_0.1",
"path": "library/core/src/main/java/com/google/android/exoplayer2/source/MediaSource.java",
"license": "apache-2.0",
"size": 6443
} | [
"com.google.android.exoplayer2.upstream.Allocator"
] | import com.google.android.exoplayer2.upstream.Allocator; | import com.google.android.exoplayer2.upstream.*; | [
"com.google.android"
] | com.google.android; | 2,043,813 |
public File makeDummyJar(File dir, String prefix) throws IOException {
String jarName = "";
if (prefix != null) {
jarName += prefix + "-";
}
jarName += dir.getName() + ".jar";
File jarFile = new File(dir, jarName);
writeFile(jarFile, "Dummy jar");
return jarFile;
} | File function(File dir, String prefix) throws IOException { String jarName = STR-STR.jarSTRDummy jar"); return jarFile; } | /**
* The tests should not require jar files, but we simulate them to be a bit
* more realistic. Since we dont' run Java, the jar files can be simulated.
*/ | The tests should not require jar files, but we simulate them to be a bit more realistic. Since we dont' run Java, the jar files can be simulated | makeDummyJar | {
"repo_name": "pwong-mapr/incubator-drill",
"path": "drill-yarn/src/test/java/org/apache/drill/yarn/scripts/ScriptUtils.java",
"license": "apache-2.0",
"size": 24733
} | [
"java.io.File",
"java.io.IOException"
] | import java.io.File; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,584,537 |
public static int hashCode(StringValue o) {
return o.getString().hashCode();
} | static int function(StringValue o) { return o.getString().hashCode(); } | /**
* Returns a hash code for the given object.
*
* @see java.lang.Object#hashCode()
* @param o
* the object to create a hash for
* @return the hash code of the object
*/ | Returns a hash code for the given object | hashCode | {
"repo_name": "GlorimarCastro/glorimar-wikidata-toolkit",
"path": "wdtk-datamodel/src/main/java/org/wikidata/wdtk/datamodel/helpers/Hash.java",
"license": "apache-2.0",
"size": 10121
} | [
"org.wikidata.wdtk.datamodel.interfaces.StringValue"
] | import org.wikidata.wdtk.datamodel.interfaces.StringValue; | import org.wikidata.wdtk.datamodel.interfaces.*; | [
"org.wikidata.wdtk"
] | org.wikidata.wdtk; | 2,135,293 |
public Map<Integer, String> getMappedAttributes(List<BlackboardAttribute> attList, TableReportModule... module) {
Map<Integer, String> attributes = new HashMap<>();
int size = ATTRIBUTE_TYPE.values().length;
for (int n = 0; n <= size; n++) {
attributes.put(n, "");
}
... | Map<Integer, String> function(List<BlackboardAttribute> attList, TableReportModule... module) { Map<Integer, String> attributes = new HashMap<>(); int size = ATTRIBUTE_TYPE.values().length; for (int n = 0; n <= size; n++) { attributes.put(n, STRSTRyyyy/MM/dd HH:mm:ssSTR"; } value = EscapeUtil.escapeHtml(value); attribu... | /**
* Map all BlackboardAttributes' values in a list of BlackboardAttributes to each attribute's attribute
* type ID, using module's dateToString method for date/time conversions if a module is supplied.
*
* @param attList list of BlackboardAttributes to be mapped
* @param module the TableRepo... | Map all BlackboardAttributes' values in a list of BlackboardAttributes to each attribute's attribute type ID, using module's dateToString method for date/time conversions if a module is supplied | getMappedAttributes | {
"repo_name": "kefir-/autopsy",
"path": "Core/src/org/sleuthkit/autopsy/report/ReportGenerator.java",
"license": "apache-2.0",
"size": 63757
} | [
"java.util.HashMap",
"java.util.List",
"java.util.Map",
"org.sleuthkit.autopsy.coreutils.EscapeUtil",
"org.sleuthkit.datamodel.BlackboardAttribute"
] | import java.util.HashMap; import java.util.List; import java.util.Map; import org.sleuthkit.autopsy.coreutils.EscapeUtil; import org.sleuthkit.datamodel.BlackboardAttribute; | import java.util.*; import org.sleuthkit.autopsy.coreutils.*; import org.sleuthkit.datamodel.*; | [
"java.util",
"org.sleuthkit.autopsy",
"org.sleuthkit.datamodel"
] | java.util; org.sleuthkit.autopsy; org.sleuthkit.datamodel; | 1,109,673 |
static SignInState createForSigninAndEnableSync(@SigninAccessPoint int accessPoint,
CoreAccountInfo accountInfo, @Nullable SignInCallback callback) {
return new SignInState(accessPoint, accountInfo, callback);
}
private SignInState(@SigninAccessPoint Integer accessPo... | static SignInState createForSigninAndEnableSync(@SigninAccessPoint int accessPoint, CoreAccountInfo accountInfo, @Nullable SignInCallback callback) { return new SignInState(accessPoint, accountInfo, callback); } private SignInState(@SigninAccessPoint Integer accessPoint, CoreAccountInfo accountInfo, @Nullable SignInCal... | /**
* State for the sync consent flow.
*
* @param accessPoint {@link SigninAccessPoint} that has initiated the sign-in.
* @param accountInfo The account to sign in to.
* @param callback Called when the sign-in process finishes or is cancelled. Can be null.
*/ | State for the sync consent flow | createForSigninAndEnableSync | {
"repo_name": "scheib/chromium",
"path": "chrome/android/java/src/org/chromium/chrome/browser/signin/SigninManagerImpl.java",
"license": "bsd-3-clause",
"size": 28941
} | [
"androidx.annotation.Nullable",
"org.chromium.components.signin.base.CoreAccountInfo",
"org.chromium.components.signin.metrics.SigninAccessPoint"
] | import androidx.annotation.Nullable; import org.chromium.components.signin.base.CoreAccountInfo; import org.chromium.components.signin.metrics.SigninAccessPoint; | import androidx.annotation.*; import org.chromium.components.signin.base.*; import org.chromium.components.signin.metrics.*; | [
"androidx.annotation",
"org.chromium.components"
] | androidx.annotation; org.chromium.components; | 2,804,646 |
private TableColumn getColumnByIdentifier(Object identifier) {
TableColumn columnExt;
try {
columnExt = getColumn(identifier);
} catch (IllegalArgumentException e) {
// hacking around weird getColumn(Object) behaviour -
// PENDING JW: revisit and override... | TableColumn function(Object identifier) { TableColumn columnExt; try { columnExt = getColumn(identifier); } catch (IllegalArgumentException e) { columnExt = getColumnExt(identifier); } return columnExt; } | /**
* Returns a contained TableColumn with the given identifier.
*
* Note that this is a hack around weird columnModel.getColumn(Object) contract in
* core TableColumnModel (throws exception if not found).
*
* @param identifier the column identifier
* @return a TableColumn with ... | Returns a contained TableColumn with the given identifier. Note that this is a hack around weird columnModel.getColumn(Object) contract in core TableColumnModel (throws exception if not found) | getColumnByIdentifier | {
"repo_name": "syncer/swingx",
"path": "swingx-core/src/main/java/org/jdesktop/swingx/JXTable.java",
"license": "lgpl-2.1",
"size": 163674
} | [
"javax.swing.table.TableColumn"
] | import javax.swing.table.TableColumn; | import javax.swing.table.*; | [
"javax.swing"
] | javax.swing; | 195,361 |
public static void showDeleteConfirmation(Context context, DialogInterface.OnClickListener onConfirm) {
showConfirmation(context, R.string.action_confirm, R.string.msg_confirm_delete, R.string.action_delete, onConfirm);
} | static void function(Context context, DialogInterface.OnClickListener onConfirm) { showConfirmation(context, R.string.action_confirm, R.string.msg_confirm_delete, R.string.action_delete, onConfirm); } | /**
* Shows an {@link AlertDialog} to get user delete confirmation.
* @see #showConfirmation(Context, int, int, int, DialogInterface.OnClickListener)
*/ | Shows an <code>AlertDialog</code> to get user delete confirmation | showDeleteConfirmation | {
"repo_name": "cohenadair/anglers-log",
"path": "android/app/src/main/java/com/cohenadair/anglerslog/utilities/AlertUtils.java",
"license": "gpl-3.0",
"size": 8069
} | [
"android.content.Context",
"android.content.DialogInterface"
] | import android.content.Context; import android.content.DialogInterface; | import android.content.*; | [
"android.content"
] | android.content; | 2,579,946 |
public T secureXML(String secureTag, boolean secureTagContents, byte[] passPhraseByte) {
XMLSecurityDataFormat xsdf = new XMLSecurityDataFormat();
xsdf.setSecureTag(secureTag);
xsdf.setSecureTagContents(secureTagContents);
xsdf.setPassPhraseByte(passPhraseByte);
return dataFo... | T function(String secureTag, boolean secureTagContents, byte[] passPhraseByte) { XMLSecurityDataFormat xsdf = new XMLSecurityDataFormat(); xsdf.setSecureTag(secureTag); xsdf.setSecureTagContents(secureTagContents); xsdf.setPassPhraseByte(passPhraseByte); return dataFormat(xsdf); } | /**
* Uses the XML Security data format
*/ | Uses the XML Security data format | secureXML | {
"repo_name": "kevinearls/camel",
"path": "camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java",
"license": "apache-2.0",
"size": 46439
} | [
"org.apache.camel.model.dataformat.XMLSecurityDataFormat"
] | import org.apache.camel.model.dataformat.XMLSecurityDataFormat; | import org.apache.camel.model.dataformat.*; | [
"org.apache.camel"
] | org.apache.camel; | 1,990,687 |
public final class URLEncodingTest {
@Test @Ignore public void lenientUrlToUri() throws Exception {
// alphanum
testUrlToUriMapping("abzABZ09", "abzABZ09", "abzABZ09", "abzABZ09", "abzABZ09");
// control characters
testUrlToUriMapping("\u0001", "%01", "%01", "%01", "%01");
testUrlToUriMapping(... | final class URLEncodingTest { @Test @Ignore public void function() throws Exception { testUrlToUriMapping(STR, STR, STR, STR, STR); testUrlToUriMapping(STR, "%01STR%01STR%01STR%01"); testUrlToUriMapping(STR, "%1FSTR%1FSTR%1FSTR%1FSTR%20STR%20STR%20STR%20STR%20STR%20STR%20STR%20STR%20STR%20STR STR%20STR%20STR%20STR%20ST... | /**
* This test goes through the exhaustive set of interesting ASCII characters
* because most of those characters are interesting in some way according to
* RFC 2396 and RFC 2732. http://b/1158780
*/ | This test goes through the exhaustive set of interesting ASCII characters because most of those characters are interesting in some way according to RFC 2396 and RFC 2732. HREF | lenientUrlToUri | {
"repo_name": "rohanpatel2602/okhttp",
"path": "okhttp-tests/src/test/java/com/squareup/okhttp/internal/http/URLEncodingTest.java",
"license": "apache-2.0",
"size": 6115
} | [
"org.junit.Ignore",
"org.junit.Test"
] | import org.junit.Ignore; import org.junit.Test; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,076,652 |
public void setUp(int fragmentId, DrawerLayout drawerLayout) {
mFragmentContainerView = getActivity().findViewById(fragmentId);
mDrawerLayout = drawerLayout;
// set a custom shadow that overlays the main content when the drawer opens
mDrawerLayout.setDrawerShadow(R.drawable.drawer_... | void function(int fragmentId, DrawerLayout drawerLayout) { mFragmentContainerView = getActivity().findViewById(fragmentId); mDrawerLayout = drawerLayout; mDrawerLayout.setDrawerShadow(R.drawable.drawer_shadow, GravityCompat.START); ActionBar actionBar = getActionBar(); actionBar.setDisplayHomeAsUpEnabled(true); actionB... | /**
* Users of this fragment must call this method to set up the navigation drawer interactions.
*
* @param fragmentId The android:id of this fragment in its activity's layout.
* @param drawerLayout The DrawerLayout containing this fragment's UI.
*/ | Users of this fragment must call this method to set up the navigation drawer interactions | setUp | {
"repo_name": "maloubobola/Udacity",
"path": "SuperDuo/alexandria/app/src/main/java/it/jaschke/alexandria/app/main/NavigationDrawerFragment.java",
"license": "apache-2.0",
"size": 10778
} | [
"android.support.v4.view.GravityCompat",
"android.support.v4.widget.DrawerLayout",
"android.support.v7.app.ActionBar"
] | import android.support.v4.view.GravityCompat; import android.support.v4.widget.DrawerLayout; import android.support.v7.app.ActionBar; | import android.support.v4.view.*; import android.support.v4.widget.*; import android.support.v7.app.*; | [
"android.support"
] | android.support; | 1,405,046 |
EAttribute getNode_Updateurl(); | EAttribute getNode_Updateurl(); | /**
* Returns the meta object for the attribute '{@link org.dawnsci.marketplace.Node#getUpdateurl <em>Updateurl</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Updateurl</em>'.
* @see org.dawnsci.marketplace.Node#getUpdateurl()
* @see #getNode()
*... | Returns the meta object for the attribute '<code>org.dawnsci.marketplace.Node#getUpdateurl Updateurl</code>'. | getNode_Updateurl | {
"repo_name": "Itema-as/dawn-marketplace-server",
"path": "org.dawnsci.marketplace.core/src-gen/org/dawnsci/marketplace/MarketplacePackage.java",
"license": "epl-1.0",
"size": 104026
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,373,343 |
int TessBaseAPIGetBoolVariable(TessBaseAPI handle, String name, IntBuffer value); | int TessBaseAPIGetBoolVariable(TessBaseAPI handle, String name, IntBuffer value); | /**
* Get the value of an internal bool parameter.
*
* @param handle the TesseractAPI instance
* @param name pass the name of the variable
* @param value pass the int buffer value
* @return 1 on success
*/ | Get the value of an internal bool parameter | TessBaseAPIGetBoolVariable | {
"repo_name": "nguyenq/tess4j",
"path": "src/main/java/net/sourceforge/tess4j/TessAPI.java",
"license": "apache-2.0",
"size": 53040
} | [
"java.nio.IntBuffer"
] | import java.nio.IntBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 621,997 |
public void close(DataOutput output) throws HyracksDataException; | void function(DataOutput output) throws HyracksDataException; | /**
* Close the writer.
*
* @param output
* The channel for output data.
* @throws HyracksDataException
*/ | Close the writer | close | {
"repo_name": "tectronics/hyracks",
"path": "hyracks/hyracks-hdfs/hyracks-hdfs-core/src/main/java/org/apache/hyracks/hdfs/api/ITupleWriter.java",
"license": "apache-2.0",
"size": 1743
} | [
"java.io.DataOutput",
"org.apache.hyracks.api.exceptions.HyracksDataException"
] | import java.io.DataOutput; import org.apache.hyracks.api.exceptions.HyracksDataException; | import java.io.*; import org.apache.hyracks.api.exceptions.*; | [
"java.io",
"org.apache.hyracks"
] | java.io; org.apache.hyracks; | 1,282,802 |
Date getTimestamp();
| Date getTimestamp(); | /**
* returns the timestamp of the persisted item
*
* @return the timestamp of the item
*/ | returns the timestamp of the persisted item | getTimestamp | {
"repo_name": "vkolotov/smarthome",
"path": "bundles/core/org.eclipse.smarthome.core.persistence/src/main/java/org/eclipse/smarthome/core/persistence/HistoricItem.java",
"license": "epl-1.0",
"size": 1337
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 303,282 |
public static JsonNode parse(byte[] src) {
try {
return mapper().readTree(src);
} catch(Throwable t) {
throw new RuntimeException(t);
}
} | static JsonNode function(byte[] src) { try { return mapper().readTree(src); } catch(Throwable t) { throw new RuntimeException(t); } } | /**
* Parses a byte array representing a json, and return it as a JsonNode.
* @param src the JSON input bytes.
* @return the JSON node.
*/ | Parses a byte array representing a json, and return it as a JsonNode | parse | {
"repo_name": "aradchykov/playframework",
"path": "framework/src/play/src/main/java/play/libs/Json.java",
"license": "apache-2.0",
"size": 5300
} | [
"com.fasterxml.jackson.databind.JsonNode"
] | import com.fasterxml.jackson.databind.JsonNode; | import com.fasterxml.jackson.databind.*; | [
"com.fasterxml.jackson"
] | com.fasterxml.jackson; | 617,949 |
@Override public void addWarning(String message) {
ast.printMessage(Diagnostic.Kind.WARNING, message, this, null, false);
}
| @Override void function(String message) { ast.printMessage(Diagnostic.Kind.WARNING, message, this, null, false); } | /**
* Generates a compiler warning focused on the AST node represented by this node object.
*/ | Generates a compiler warning focused on the AST node represented by this node object | addWarning | {
"repo_name": "openlegacy/lombok",
"path": "src/core/lombok/javac/JavacNode.java",
"license": "mit",
"size": 8621
} | [
"javax.tools.Diagnostic"
] | import javax.tools.Diagnostic; | import javax.tools.*; | [
"javax.tools"
] | javax.tools; | 627,294 |
@Override
public boolean isAvailable(Context context) {
return true;
} | boolean function(Context context) { return true; } | /**
* It is enabled if the phone has a flash feature
*/ | It is enabled if the phone has a flash feature | isAvailable | {
"repo_name": "RSenApps/Commandr-Android",
"path": "phone/src/com/RSen/Commandr/builtincommands/GoodNightCommand.java",
"license": "mit",
"size": 1556
} | [
"android.content.Context"
] | import android.content.Context; | import android.content.*; | [
"android.content"
] | android.content; | 1,913,302 |
private void refresh(Object obj, int M_Warehouse_ID, int M_PriceList_Version_ID)
{
//int M_Product_ID = 0;
String sql = m_sqlWarehouse;
//Add description to the query
sql = sql.replace(" FROM", ", DocumentNote FROM");
log.finest(sql);
PreparedStatement pstmt = null;
ResultSet rs = null;
try
{
p... | void function(Object obj, int M_Warehouse_ID, int M_PriceList_Version_ID) { String sql = m_sqlWarehouse; sql = sql.replace(STR, STR); log.finest(sql); PreparedStatement pstmt = null; ResultSet rs = null; try { pstmt = DB.prepareStatement(sql, null); pstmt.setString(1, (String)obj); rs = pstmt.executeQuery(); fieldDescr... | /**
* Refresh Query
*/ | Refresh Query | refresh | {
"repo_name": "geneos/adempiere",
"path": "zkwebui/WEB-INF/src/org/adempiere/webui/panel/InfoProductPanel.java",
"license": "gpl-2.0",
"size": 50856
} | [
"java.sql.PreparedStatement",
"java.sql.ResultSet",
"java.util.logging.Level",
"org.compiere.util.DB"
] | import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.logging.Level; import org.compiere.util.DB; | import java.sql.*; import java.util.logging.*; import org.compiere.util.*; | [
"java.sql",
"java.util",
"org.compiere.util"
] | java.sql; java.util; org.compiere.util; | 2,128,456 |
public static keplerIDotType fromPerUnaligned(byte[] encodedBytes) {
keplerIDotType result = new keplerIDotType();
result.decodePerUnaligned(new BitStreamReader(encodedBytes));
return result;
} | static keplerIDotType function(byte[] encodedBytes) { keplerIDotType result = new keplerIDotType(); result.decodePerUnaligned(new BitStreamReader(encodedBytes)); return result; } | /**
* Creates a new keplerIDotType from encoded stream.
*/ | Creates a new keplerIDotType from encoded stream | fromPerUnaligned | {
"repo_name": "google/supl-client",
"path": "src/main/java/com/google/location/suplclient/asn1/supl2/rrlp_components/NavModel_KeplerianSet.java",
"license": "apache-2.0",
"size": 64535
} | [
"com.google.location.suplclient.asn1.base.BitStreamReader"
] | import com.google.location.suplclient.asn1.base.BitStreamReader; | import com.google.location.suplclient.asn1.base.*; | [
"com.google.location"
] | com.google.location; | 1,578,812 |
public void setMessages(MessageController messages) {
this.messages = messages;
} | void function(MessageController messages) { this.messages = messages; } | /**
* Sets the value of {@link #messages}.
*
* @param messages
* - value
*/ | Sets the value of <code>#messages</code> | setMessages | {
"repo_name": "ow2-xlcloud/vcms",
"path": "vcms-gui/modules/virtualClusterDefinitions/src/main/java/org/xlcloud/console/virtualClusterDefinitions/controllers/VirtualClusterDefinitionsBean.java",
"license": "apache-2.0",
"size": 5803
} | [
"org.xlcloud.console.controllers.i18n.MessageController"
] | import org.xlcloud.console.controllers.i18n.MessageController; | import org.xlcloud.console.controllers.i18n.*; | [
"org.xlcloud.console"
] | org.xlcloud.console; | 2,677,970 |
public void deleteRequest (byte kind, int id)
throws JdwpException
{
Hashtable requests;
requests = (Hashtable) _requests.get (new Byte (kind));
if (requests == null)
{
// Did not get a valid event type
throw new IllegalArgumentException ("invalid event kind: " + kind);
}
Integer ... | void function (byte kind, int id) throws JdwpException { Hashtable requests; requests = (Hashtable) _requests.get (new Byte (kind)); if (requests == null) { throw new IllegalArgumentException (STR + kind); } Integer iid = new Integer (id); EventRequest request = (EventRequest) requests.get (iid); if (request != null) {... | /**
* Deletes the given request from the management table
*
* @param kind the event kind
* @param id the ID of the request to delete
* @throws IllegalArgumentException for invalid event kind
* @throws JdwpException for other errors deleting request
*/ | Deletes the given request from the management table | deleteRequest | {
"repo_name": "shaotuanchen/sunflower_exp",
"path": "tools/source/gcc-4.2.4/libjava/classpath/gnu/classpath/jdwp/event/EventManager.java",
"license": "bsd-3-clause",
"size": 10188
} | [
"gnu.classpath.jdwp.VMVirtualMachine",
"gnu.classpath.jdwp.exception.JdwpException",
"java.util.Hashtable"
] | import gnu.classpath.jdwp.VMVirtualMachine; import gnu.classpath.jdwp.exception.JdwpException; import java.util.Hashtable; | import gnu.classpath.jdwp.*; import gnu.classpath.jdwp.exception.*; import java.util.*; | [
"gnu.classpath.jdwp",
"java.util"
] | gnu.classpath.jdwp; java.util; | 2,614,108 |
public void setDeferredAll(Activation a, boolean deferred)
throws StandardException; | void function(Activation a, boolean deferred) throws StandardException; | /**
* Set the constraint mode of all deferrable constraints to the value of
* {@code deferred}. If the value is {@code false}, this method might
* throw with a constraint violation error, i.e. if some constraint
* has deferred mode before this call and had seen violations.
*
* @param a ... | Set the constraint mode of all deferrable constraints to the value of deferred. If the value is false, this method might throw with a constraint violation error, i.e. if some constraint has deferred mode before this call and had seen violations | setDeferredAll | {
"repo_name": "apache/derby",
"path": "java/org.apache.derby.engine/org/apache/derby/iapi/sql/conn/LanguageConnectionContext.java",
"license": "apache-2.0",
"size": 43432
} | [
"org.apache.derby.iapi.sql.Activation",
"org.apache.derby.shared.common.error.StandardException"
] | import org.apache.derby.iapi.sql.Activation; import org.apache.derby.shared.common.error.StandardException; | import org.apache.derby.iapi.sql.*; import org.apache.derby.shared.common.error.*; | [
"org.apache.derby"
] | org.apache.derby; | 618,551 |
@Override public void enterExprMax(@NotNull ErlangParser.ExprMaxContext ctx) { } | @Override public void enterExprMax(@NotNull ErlangParser.ExprMaxContext ctx) { } | /**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/ | The default implementation does nothing | exitBitType | {
"repo_name": "lyskouski/erlang-netbeans",
"path": "src/by/creativity/erlang/lexer/ErlangBaseListener.java",
"license": "gpl-2.0",
"size": 35296
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 2,292,000 |
private static List<IParameter> createList(Method method) {
List<IParameter> parameters = new ArrayList<IParameter>();
Class<?> paramTypes[] = method.getParameterTypes();
Annotation[][] methodAnnotations = method.getParameterAnnotations();
for (int i = 0; i < methodAnnotations.length; i++) {
... | static List<IParameter> function(Method method) { List<IParameter> parameters = new ArrayList<IParameter>(); Class<?> paramTypes[] = method.getParameterTypes(); Annotation[][] methodAnnotations = method.getParameterAnnotations(); for (int i = 0; i < methodAnnotations.length; i++) { boolean paramRequired = true; String ... | /**
* Creates the list of BinderVariables given a method obtained through
* reflection.
*
* @param method
* The method
* @return The list of BinderVariables
*/ | Creates the list of BinderVariables given a method obtained through reflection | createList | {
"repo_name": "tstirrat/ucm-twine",
"path": "src/main/java/org/ucmtwine/parameter/ParameterMarshaller.java",
"license": "mit",
"size": 7146
} | [
"java.lang.annotation.Annotation",
"java.lang.reflect.Method",
"java.util.ArrayList",
"java.util.List",
"org.ucmtwine.annotation.Binder"
] | import java.lang.annotation.Annotation; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.List; import org.ucmtwine.annotation.Binder; | import java.lang.annotation.*; import java.lang.reflect.*; import java.util.*; import org.ucmtwine.annotation.*; | [
"java.lang",
"java.util",
"org.ucmtwine.annotation"
] | java.lang; java.util; org.ucmtwine.annotation; | 1,041,696 |
static IsmSideInputReader of(
Iterable<? extends SideInputInfo> sideInputInfos,
PipelineOptions options,
BatchModeExecutionContext context,
ReaderFactory readerFactory,
DataflowOperationContext operationContext)
throws Exception {
return new IsmSideInputReader(
sideInpu... | static IsmSideInputReader of( Iterable<? extends SideInputInfo> sideInputInfos, PipelineOptions options, BatchModeExecutionContext context, ReaderFactory readerFactory, DataflowOperationContext operationContext) throws Exception { return new IsmSideInputReader( sideInputInfos, options, context, readerFactory, operation... | /**
* Creates a new {@link SideInputReader} that will provide side inputs according to the provided
* {@link SideInputInfo} descriptors.
*/ | Creates a new <code>SideInputReader</code> that will provide side inputs according to the provided <code>SideInputInfo</code> descriptors | of | {
"repo_name": "lukecwik/incubator-beam",
"path": "runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/IsmSideInputReader.java",
"license": "apache-2.0",
"size": 43869
} | [
"com.google.api.services.dataflow.model.SideInputInfo",
"org.apache.beam.sdk.options.PipelineOptions"
] | import com.google.api.services.dataflow.model.SideInputInfo; import org.apache.beam.sdk.options.PipelineOptions; | import com.google.api.services.dataflow.model.*; import org.apache.beam.sdk.options.*; | [
"com.google.api",
"org.apache.beam"
] | com.google.api; org.apache.beam; | 1,331,656 |
private static JMenuItem makeMenuItemNoRes(String label, String actionCommand) {
JMenuItem menuItem = new JMenuItem(label);
menuItem.setName(label);
menuItem.setActionCommand(actionCommand);
menuItem.addActionListener(ActionRouter.getInstance());
return menuItem;
} | static JMenuItem function(String label, String actionCommand) { JMenuItem menuItem = new JMenuItem(label); menuItem.setName(label); menuItem.setActionCommand(actionCommand); menuItem.addActionListener(ActionRouter.getInstance()); return menuItem; } | /**
* Make a menuItem using a fixed label which is also used as the item name.
* This is used for items such as recent files and hostnames which are not resources
* @param label (this is not used as a resource key)
* @param actionCommand
* @return the menu item
*/ | Make a menuItem using a fixed label which is also used as the item name. This is used for items such as recent files and hostnames which are not resources | makeMenuItemNoRes | {
"repo_name": "benbenw/jmeter",
"path": "src/core/src/main/java/org/apache/jmeter/gui/util/JMeterMenuBar.java",
"license": "apache-2.0",
"size": 35034
} | [
"javax.swing.JMenuItem",
"org.apache.jmeter.gui.action.ActionRouter"
] | import javax.swing.JMenuItem; import org.apache.jmeter.gui.action.ActionRouter; | import javax.swing.*; import org.apache.jmeter.gui.action.*; | [
"javax.swing",
"org.apache.jmeter"
] | javax.swing; org.apache.jmeter; | 492,481 |
@Override
protected ResourceLocation getEntityTexture(Entity p_110775_1_)
{
return boatTexture;
} | ResourceLocation function(Entity p_110775_1_) { return boatTexture; } | /**
* Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture.
*
* @param p_110775_1_
*/ | Returns the location of an entity's texture. Doesn't seem to be called unless you call Render.bindEntityTexture | getEntityTexture | {
"repo_name": "Mazdallier/AdventureBackpack2",
"path": "src/main/java/com/darkona/adventurebackpack/client/render/RendererInflatableBoat.java",
"license": "lgpl-3.0",
"size": 2249
} | [
"net.minecraft.entity.Entity",
"net.minecraft.util.ResourceLocation"
] | import net.minecraft.entity.Entity; import net.minecraft.util.ResourceLocation; | import net.minecraft.entity.*; import net.minecraft.util.*; | [
"net.minecraft.entity",
"net.minecraft.util"
] | net.minecraft.entity; net.minecraft.util; | 855,418 |
int updateCronTrigger(Connection conn, CronTrigger trigger)
throws SQLException; | int updateCronTrigger(Connection conn, CronTrigger trigger) throws SQLException; | /**
* <p>
* Update the cron trigger data.
* </p>
*
* @param conn
* the DB Connection
* @param trigger
* the trigger to insert
* @return the number of rows updated
*/ | Update the cron trigger data. | updateCronTrigger | {
"repo_name": "optivo-org/quartz-1.8.3-optivo",
"path": "quartz/src/main/java/org/quartz/impl/jdbcjobstore/DriverDelegate.java",
"license": "apache-2.0",
"size": 41989
} | [
"java.sql.Connection",
"java.sql.SQLException",
"org.quartz.CronTrigger"
] | import java.sql.Connection; import java.sql.SQLException; import org.quartz.CronTrigger; | import java.sql.*; import org.quartz.*; | [
"java.sql",
"org.quartz"
] | java.sql; org.quartz; | 2,855,030 |
@Test
public void testAck
()
{
final byte[] data =
new byte[] { 1, 20, 3, -100, 3, 11 };
final byte headerLength = 8;
final ByteBuffer buffer =
ByteBuffer.allocate ((2 * headerLength) + data.length);
b... | void function () { final byte[] data = new byte[] { 1, 20, 3, -100, 3, 11 }; final byte headerLength = 8; final ByteBuffer buffer = ByteBuffer.allocate ((2 * headerLength) + data.length); buffer.put (RudpConstants.ACK); buffer.put (headerLength); buffer.putShort ((short) data.length); buffer.putInt (255); buffer.putInt... | /**
* Tests ACK decoding.
*/ | Tests ACK decoding | testAck | {
"repo_name": "adamfisk/littleshoot-client",
"path": "common/rudp/src/test/java/org/lastbamboo/common/rudp/segment/RudpDecoderTest.java",
"license": "gpl-2.0",
"size": 7020
} | [
"org.lastbamboo.common.rudp.RudpConstants",
"org.littleshoot.mina.common.ByteBuffer",
"org.littleshoot.util.UIntImpl"
] | import org.lastbamboo.common.rudp.RudpConstants; import org.littleshoot.mina.common.ByteBuffer; import org.littleshoot.util.UIntImpl; | import org.lastbamboo.common.rudp.*; import org.littleshoot.mina.common.*; import org.littleshoot.util.*; | [
"org.lastbamboo.common",
"org.littleshoot.mina",
"org.littleshoot.util"
] | org.lastbamboo.common; org.littleshoot.mina; org.littleshoot.util; | 742,321 |
public void testSearchPersonalFile() throws NoIndexFoundException, UserHasPublishedDeleteException, UserDeletedPublicationException, LocationAlreadyExistsException
{
// Start the transaction
TransactionStatus ts = tm.getTransaction(td);
RepositoryBasedTestHelper helper = new RepositoryBasedTestHelper(ctx... | void function() throws NoIndexFoundException, UserHasPublishedDeleteException, UserDeletedPublicationException, LocationAlreadyExistsException { TransactionStatus ts = tm.getTransaction(td); RepositoryBasedTestHelper helper = new RepositoryBasedTestHelper(ctx); Repository repo = helper.createTestRepositoryDefaultFileSe... | /**
* Test indexing a personal file - which may have multiple versions
* in it.
* @throws UserHasPublishedDeleteException
* @throws LocationAlreadyExistsException
* @throws NoUserIndexFolderException
*/ | Test indexing a personal file - which may have multiple versions in it | testSearchPersonalFile | {
"repo_name": "nate-rcl/irplus",
"path": "ir_service/test/edu/ur/ir/user/service/DefaultUserSearchServiceTest.java",
"license": "apache-2.0",
"size": 5149
} | [
"edu.ur.file.db.LocationAlreadyExistsException",
"edu.ur.ir.NoIndexFoundException",
"edu.ur.ir.SearchResults",
"edu.ur.ir.repository.Repository",
"edu.ur.ir.repository.service.test.helper.RepositoryBasedTestHelper",
"edu.ur.ir.user.IrUser",
"edu.ur.ir.user.UserDeletedPublicationException",
"edu.ur.ir.... | import edu.ur.file.db.LocationAlreadyExistsException; import edu.ur.ir.NoIndexFoundException; import edu.ur.ir.SearchResults; import edu.ur.ir.repository.Repository; import edu.ur.ir.repository.service.test.helper.RepositoryBasedTestHelper; import edu.ur.ir.user.IrUser; import edu.ur.ir.user.UserDeletedPublicationExcep... | import edu.ur.file.db.*; import edu.ur.ir.*; import edu.ur.ir.repository.*; import edu.ur.ir.repository.service.test.helper.*; import edu.ur.ir.user.*; import java.io.*; import java.util.*; import org.springframework.transaction.*; | [
"edu.ur.file",
"edu.ur.ir",
"java.io",
"java.util",
"org.springframework.transaction"
] | edu.ur.file; edu.ur.ir; java.io; java.util; org.springframework.transaction; | 535,603 |
return new JobId(UUID.fromString(jobIdStr));
} | return new JobId(UUID.fromString(jobIdStr)); } | /**
* Create JobId from string representation.
* @param jobIdStr string representation of job id
* @return JobId
*/ | Create JobId from string representation | of | {
"repo_name": "webmate-io/webmate-sdk-java",
"path": "src/main/java/com/testfabrik/webmate/javasdk/jobs/JobId.java",
"license": "apache-2.0",
"size": 944
} | [
"java.util.UUID"
] | import java.util.UUID; | import java.util.*; | [
"java.util"
] | java.util; | 2,240,968 |
public static void listOutboundNetworkDependenciesEndpointsByManagedCluster(
com.azure.resourcemanager.AzureResourceManager azure) {
azure
.kubernetesClusters()
.manager()
.serviceClient()
.getManagedClusters()
.listOutboundNetworkDepe... | static void function( com.azure.resourcemanager.AzureResourceManager azure) { azure .kubernetesClusters() .manager() .serviceClient() .getManagedClusters() .listOutboundNetworkDependenciesEndpoints("rg1", STR, Context.NONE); } | /**
* Sample code: List OutboundNetworkDependenciesEndpoints by Managed Cluster.
*
* @param azure The entry point for accessing resource management APIs in Azure.
*/ | Sample code: List OutboundNetworkDependenciesEndpoints by Managed Cluster | listOutboundNetworkDependenciesEndpointsByManagedCluster | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager/src/samples/java/com/azure/resourcemanager/containerservice/generated/ManagedClustersListOutboundNetworkDependenciesEndpointsSamples.java",
"license": "mit",
"size": 1177
} | [
"com.azure.core.util.Context"
] | import com.azure.core.util.Context; | import com.azure.core.util.*; | [
"com.azure.core"
] | com.azure.core; | 78,524 |
public static Message buildSyncHistoryReply(int timeout) {
ZabMessage.SyncHistoryReply reply =
ZabMessage.SyncHistoryReply.newBuilder().setSyncTimeout(timeout).build();
return Message.newBuilder().setType(MessageType.SYNC_HISTORY_REPLY)
.setSyncHistoryReply(reply).build();... | static Message function(int timeout) { ZabMessage.SyncHistoryReply reply = ZabMessage.SyncHistoryReply.newBuilder().setSyncTimeout(timeout).build(); return Message.newBuilder().setType(MessageType.SYNC_HISTORY_REPLY) .setSyncHistoryReply(reply).build(); } | /**
* Creates the SYNC_HISTORY_REPLY message. It's the first time to tell the
* joiner the synchronization timeout.
*
* @param timeout timeout in milliseconds.
* @return a protobuf message.
*/ | Creates the SYNC_HISTORY_REPLY message. It's the first time to tell the joiner the synchronization timeout | buildSyncHistoryReply | {
"repo_name": "fpj/jzab",
"path": "src/main/java/com/github/zk1931/jzab/MessageBuilder.java",
"license": "apache-2.0",
"size": 23166
} | [
"com.github.zk1931.jzab.proto.ZabMessage"
] | import com.github.zk1931.jzab.proto.ZabMessage; | import com.github.zk1931.jzab.proto.*; | [
"com.github.zk1931"
] | com.github.zk1931; | 1,950,883 |
public FileFilter getFileFilter() {
return fileFilter;
}
| FileFilter function() { return fileFilter; } | /**
* Return the fileFilter.
*
* @return the fileFilter
* @since 2.1
*/ | Return the fileFilter | getFileFilter | {
"repo_name": "0x90sled/droidtowers",
"path": "main/source/org/apach3/commons/io/monitor/FileAlterationObserver.java",
"license": "mit",
"size": 16773
} | [
"java.io.FileFilter"
] | import java.io.FileFilter; | import java.io.*; | [
"java.io"
] | java.io; | 2,898,974 |
public static final SearchServiceClient create(SearchServiceSettings settings)
throws IOException {
return new SearchServiceClient(settings);
} | static final SearchServiceClient function(SearchServiceSettings settings) throws IOException { return new SearchServiceClient(settings); } | /**
* Constructs an instance of SearchServiceClient, using the given settings. The channels are
* created based on the settings passed in, or defaults for any settings that are not set.
*/ | Constructs an instance of SearchServiceClient, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set | create | {
"repo_name": "googleapis/java-retail",
"path": "google-cloud-retail/src/main/java/com/google/cloud/retail/v2/SearchServiceClient.java",
"license": "apache-2.0",
"size": 16791
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,699,405 |
protected boolean isClosing() throws IOException
{
return isClosing(source.peek());
} | boolean function() throws IOException { return isClosing(source.peek()); } | /**
* This will tell if the next character is a closing brace( close of PDF array ).
*
* @return true if the next byte is ']', false otherwise.
*
* @throws IOException If an IO error occurs.
*/ | This will tell if the next character is a closing brace( close of PDF array ) | isClosing | {
"repo_name": "apache/pdfbox",
"path": "pdfbox/src/main/java/org/apache/pdfbox/pdfparser/BaseParser.java",
"license": "apache-2.0",
"size": 43341
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,957,032 |
private void appendModels(Class<?> clazz, OasDocument openApi) {
RestModelConverters converters = new RestModelConverters();
List<? extends OasSchema> models = converters.readClass(openApi, clazz);
if (models == null) {
return;
}
for (OasSchema entry : models) {
... | void function(Class<?> clazz, OasDocument openApi) { RestModelConverters converters = new RestModelConverters(); List<? extends OasSchema> models = converters.readClass(openApi, clazz); if (models == null) { return; } for (OasSchema entry : models) { if (openApi instanceof Oas20Document) { boolean oldExt = false; if ((... | /**
* If the class is annotated with openApi annotations its parsed into a OpenApi model representation which
* is added to openApi
*
* @param clazz the class such as pojo with openApi annotation
* @param openApi the openApi model
*/ | If the class is annotated with openApi annotations its parsed into a OpenApi model representation which is added to openApi | appendModels | {
"repo_name": "DariusX/camel",
"path": "components/camel-openapi-java/src/main/java/org/apache/camel/openapi/RestOpenApiReader.java",
"license": "apache-2.0",
"size": 62895
} | [
"io.apicurio.datamodels.openapi.models.OasDocument",
"io.apicurio.datamodels.openapi.models.OasSchema",
"io.apicurio.datamodels.openapi.v2.models.Oas20Document",
"io.apicurio.datamodels.openapi.v2.models.Oas20SchemaDefinition",
"io.apicurio.datamodels.openapi.v3.models.Oas30Document",
"io.apicurio.datamod... | import io.apicurio.datamodels.openapi.models.OasDocument; import io.apicurio.datamodels.openapi.models.OasSchema; import io.apicurio.datamodels.openapi.v2.models.Oas20Document; import io.apicurio.datamodels.openapi.v2.models.Oas20SchemaDefinition; import io.apicurio.datamodels.openapi.v3.models.Oas30Document; import io... | import io.apicurio.datamodels.openapi.models.*; import io.apicurio.datamodels.openapi.v2.models.*; import io.apicurio.datamodels.openapi.v3.models.*; import java.util.*; import org.apache.camel.model.rest.*; | [
"io.apicurio.datamodels",
"java.util",
"org.apache.camel"
] | io.apicurio.datamodels; java.util; org.apache.camel; | 1,101,029 |
public List<String> getLegendSetFilterItemsOrAll()
{
if ( !hasLegendSet() )
{
return null;
}
return hasFilter() ? getQueryFilterItems() :
IdentifiableObjectUtils.getUids( legendSet.getSortedLegends() );
} | List<String> function() { if ( !hasLegendSet() ) { return null; } return hasFilter() ? getQueryFilterItems() : IdentifiableObjectUtils.getUids( legendSet.getSortedLegends() ); } | /**
* Returns filter items for all filters associated with this
* query item. If no filter items are specified, return all
* items part of the legend set. If not legend set is specified,
* returns null.
*/ | Returns filter items for all filters associated with this query item. If no filter items are specified, return all items part of the legend set. If not legend set is specified, returns null | getLegendSetFilterItemsOrAll | {
"repo_name": "troyel/dhis2-core",
"path": "dhis-2/dhis-api/src/main/java/org/hisp/dhis/common/QueryItem.java",
"license": "bsd-3-clause",
"size": 10536
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,152,279 |
@Function(attributes = Attribute.NOT_ENUMERABLE, arity = 3)
public static Object setFullYear(final Object self, final Object... args) {
final NativeDate nd = ensureNativeDate(self);
if (nd.isValidDate()) {
setFields(nd, YEAR, args, true);
} else {
final double[]... | @Function(attributes = Attribute.NOT_ENUMERABLE, arity = 3) static Object function(final Object self, final Object... args) { final NativeDate nd = ensureNativeDate(self); if (nd.isValidDate()) { setFields(nd, YEAR, args, true); } else { final double[] d = convertArgs(args, 0, YEAR, YEAR, 3); if (d != null) { nd.setTim... | /**
* ECMA 15.9.5.40 Date.prototype.setFullYear (year [, month [, date ] ] )
*
* @param self self reference
* @param args year (optional second and third arguments are month and date)
* @return time
*/ | ECMA 15.9.5.40 Date.prototype.setFullYear (year [, month [, date ] ] ) | setFullYear | {
"repo_name": "hazzik/nashorn",
"path": "src/jdk/nashorn/internal/objects/NativeDate.java",
"license": "gpl-2.0",
"size": 45219
} | [
"java.lang.Double"
] | import java.lang.Double; | import java.lang.*; | [
"java.lang"
] | java.lang; | 1,362,814 |
return new HashSet<String>(Arrays.asList(new String[] { "output" }));
}
@SuppressWarnings("unchecked")
static public final Set<Class<? extends Node>> validChildClasses = Collections
.unmodifiableSet(new HashSet<Class<? extends Node>>(Arrays
.asList((Class<? extends Node>[]) new Class[] {
Measure.... | return new HashSet<String>(Arrays.asList(new String[] { STR })); } @SuppressWarnings(STR) static public final Set<Class<? extends Node>> validChildClasses = Collections .unmodifiableSet(new HashSet<Class<? extends Node>>(Arrays .asList((Class<? extends Node>[]) new Class[] { Measure.class, Operator.class }))); | /**
* returns HashSet of identifiers
*
* @return identifiers
*/ | returns HashSet of identifiers | identifiers | {
"repo_name": "dobraczka/LIMESGui",
"path": "swp15-ld/src/main/java/swp15/link_discovery/model/metric/Output.java",
"license": "gpl-2.0",
"size": 1347
} | [
"java.util.Arrays",
"java.util.Collections",
"java.util.HashSet",
"java.util.Set"
] | import java.util.Arrays; import java.util.Collections; import java.util.HashSet; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,356,372 |
@Override
public OrbConfiguration getOrbConf() {
return orbConf;
} | OrbConfiguration function() { return orbConf; } | /**
* Return the orbConf
*/ | Return the orbConf | getOrbConf | {
"repo_name": "jzachr/goldenorb",
"path": "src/main/java/org/goldenorb/JobManager.java",
"license": "apache-2.0",
"size": 19140
} | [
"org.goldenorb.conf.OrbConfiguration"
] | import org.goldenorb.conf.OrbConfiguration; | import org.goldenorb.conf.*; | [
"org.goldenorb.conf"
] | org.goldenorb.conf; | 1,694,227 |
private List<Step> buildStepsTree(List<Step> steps) {
List<Step> jobDirectSteps = new ArrayList<Step>();
// a map of parent step id and a list of child-steps
Map<NGuid, List<Step>> parentStepMap = new HashMap<NGuid, List<Step>>();
for (Step step : steps) {
if (step.getP... | List<Step> function(List<Step> steps) { List<Step> jobDirectSteps = new ArrayList<Step>(); Map<NGuid, List<Step>> parentStepMap = new HashMap<NGuid, List<Step>>(); for (Step step : steps) { if (step.getParentStepId() == null) { jobDirectSteps.add(step); } else { MultiValueMapUtils.addToMap(step.getParentStepId(), step,... | /**
* Gets a list of {@link Step} entities ordered by:
* <li> parent step id, preceded by nulls
* <li> step number
* @param steps
* @return a collection of the steps.
*/ | Gets a list of <code>Step</code> entities ordered by: parent step id, preceded by nulls step number | buildStepsTree | {
"repo_name": "Dhandapani/gluster-ovirt",
"path": "backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dal/job/JobRepositoryImpl.java",
"license": "apache-2.0",
"size": 7789
} | [
"java.util.ArrayList",
"java.util.HashMap",
"java.util.List",
"java.util.Map",
"org.ovirt.engine.core.common.job.Step",
"org.ovirt.engine.core.compat.NGuid",
"org.ovirt.engine.core.utils.MultiValueMapUtils"
] | import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.ovirt.engine.core.common.job.Step; import org.ovirt.engine.core.compat.NGuid; import org.ovirt.engine.core.utils.MultiValueMapUtils; | import java.util.*; import org.ovirt.engine.core.common.job.*; import org.ovirt.engine.core.compat.*; import org.ovirt.engine.core.utils.*; | [
"java.util",
"org.ovirt.engine"
] | java.util; org.ovirt.engine; | 1,229,171 |
final ClusterHealthStatus status = client.admin().cluster().prepareHealth().get().getStatus();
if (status == ClusterHealthStatus.RED || failOnYellow && status == ClusterHealthStatus.YELLOW) {
return Result.unhealthy("Last status: %s", status.name());
} else {
return Result.healt... | final ClusterHealthStatus status = client.admin().cluster().prepareHealth().get().getStatus(); if (status == ClusterHealthStatus.RED failOnYellow && status == ClusterHealthStatus.YELLOW) { return Result.unhealthy(STR, status.name()); } else { return Result.healthy(STR, status.name()); } } | /**
* Perform a check of the Elasticsearch cluster health.
*
* @return if the Elasticsearch cluster is healthy,
* a healthy {@link com.codahale.metrics.health.HealthCheck.Result};
* otherwise, an unhealthy {@link com.codahale.metrics.health.HealthCheck.Result} with a descriptive... | Perform a check of the Elasticsearch cluster health | check | {
"repo_name": "saikocat/dropwizard-elasticsearch",
"path": "src/main/java/com/saikocat/dropwizard/elasticsearch/EsClusterHealthCheck.java",
"license": "apache-2.0",
"size": 2367
} | [
"org.elasticsearch.action.admin.cluster.health.ClusterHealthStatus"
] | import org.elasticsearch.action.admin.cluster.health.ClusterHealthStatus; | import org.elasticsearch.action.admin.cluster.health.*; | [
"org.elasticsearch.action"
] | org.elasticsearch.action; | 2,861,025 |
public static <T> void initializeTrivial(AtomicReference<AsyncFuture<T>> ref, T result) {
boolean updated;
updated = ref.compareAndSet(null, new Done<T>(result));
} | static <T> void function(AtomicReference<AsyncFuture<T>> ref, T result) { boolean updated; updated = ref.compareAndSet(null, new Done<T>(result)); } | /**
* Initializes the reference with the a new instance of {@link AsyncFuture} that already
* holds a result. This method skips the calculation phase and may be needed to support
* some trivial cases.
* <p>This method is thread-safe.
*/ | Initializes the reference with the a new instance of <code>AsyncFuture</code> that already holds a result. This method skips the calculation phase and may be needed to support some trivial cases. This method is thread-safe | initializeTrivial | {
"repo_name": "develar/chromedevtools",
"path": "platform-backend/src/org/chromium/sdk/util/AsyncFuture.java",
"license": "bsd-3-clause",
"size": 13434
} | [
"java.util.concurrent.atomic.AtomicReference"
] | import java.util.concurrent.atomic.AtomicReference; | import java.util.concurrent.atomic.*; | [
"java.util"
] | java.util; | 846,141 |
public RequestPost<Group> createGroup(Group group) {
String url = String.format(Constants.GROUPS_LIST_URL, getNotEmptyInstanceName());
return new RequestPost<>(Group.class, url, this, group);
} | RequestPost<Group> function(Group group) { String url = String.format(Constants.GROUPS_LIST_URL, getNotEmptyInstanceName()); return new RequestPost<>(Group.class, url, this, group); } | /**
* Create a new Group.
*
* @param group Group to create.
* @return Created group
*/ | Create a new Group | createGroup | {
"repo_name": "Syncano/syncano-android",
"path": "library/src/main/java/com/syncano/library/SyncanoDashboard.java",
"license": "mit",
"size": 24946
} | [
"com.syncano.library.api.RequestPost",
"com.syncano.library.data.Group"
] | import com.syncano.library.api.RequestPost; import com.syncano.library.data.Group; | import com.syncano.library.api.*; import com.syncano.library.data.*; | [
"com.syncano.library"
] | com.syncano.library; | 1,590,273 |
public boolean saveNamespace(long timeWindow, long txGap) throws IOException {
return dfs.saveNamespace(timeWindow, txGap);
} | boolean function(long timeWindow, long txGap) throws IOException { return dfs.saveNamespace(timeWindow, txGap); } | /**
* Save namespace image.
*
* @param timeWindow NameNode can ignore this command if the latest
* checkpoint was done within the given time period (in
* seconds).
* @return true if a new checkpoint has been made
* @see ClientProtocol#saveNamespace(long, long)
... | Save namespace image | saveNamespace | {
"repo_name": "soumabrata-chakraborty/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java",
"license": "apache-2.0",
"size": 105290
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,866,093 |
public void forceKeyspaceFlush(String keyspaceName, String... columnFamilies) throws IOException, ExecutionException, InterruptedException; | void function(String keyspaceName, String... columnFamilies) throws IOException, ExecutionException, InterruptedException; | /**
* Flush all memtables for the given column families, or all columnfamilies for the given keyspace
* if none are explicitly listed.
* @param keyspaceName
* @param columnFamilies
* @throws IOException
*/ | Flush all memtables for the given column families, or all columnfamilies for the given keyspace if none are explicitly listed | forceKeyspaceFlush | {
"repo_name": "adelapena/cassandra_2i",
"path": "src/java/org/apache/cassandra/service/StorageServiceMBean.java",
"license": "apache-2.0",
"size": 19323
} | [
"java.io.IOException",
"java.util.concurrent.ExecutionException"
] | import java.io.IOException; import java.util.concurrent.ExecutionException; | import java.io.*; import java.util.concurrent.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,280,761 |
@SuppressWarnings("unused")
public void initMsgFile() { //known bug: if the messages keys are updated in config it will just show null
File MsgFile = new File(plugin.getDataFolder() + File.separator + "messages.yml");
if(!MsgFile.exists()) {
HLRmain.log.info("Cannot find messages.yml, Generating now....");
... | @SuppressWarnings(STR) void function() { File MsgFile = new File(plugin.getDataFolder() + File.separator + STR); if(!MsgFile.exists()) { HLRmain.log.info(STR); try { MsgFile.createNewFile(); InputStream defMsgFile = plugin.getResource(STR); Files.copy(defMsgFile, Paths.get(MsgFile.getPath()), StandardCopyOption.REPLACE... | /**
* Gets all configuration values
*/ | Gets all configuration values | initMsgFile | {
"repo_name": "despawningbone/HLR",
"path": "src/me/despawningbone/HLR/ConfigHandler.java",
"license": "gpl-3.0",
"size": 14457
} | [
"java.io.File",
"java.io.IOException",
"java.io.InputStream",
"java.io.InputStreamReader",
"java.nio.file.Files",
"java.nio.file.Paths",
"java.nio.file.StandardCopyOption",
"java.util.Map",
"me.despawningbone.HLR",
"org.bukkit.ChatColor",
"org.bukkit.configuration.ConfigurationSection",
"org.b... | import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.nio.file.Files; import java.nio.file.Paths; import java.nio.file.StandardCopyOption; import java.util.Map; import me.despawningbone.HLR; import org.bukkit.ChatColor; import org.bukkit.configuration... | import java.io.*; import java.nio.file.*; import java.util.*; import me.despawningbone.*; import org.bukkit.*; import org.bukkit.configuration.*; import org.bukkit.configuration.file.*; | [
"java.io",
"java.nio",
"java.util",
"me.despawningbone",
"org.bukkit",
"org.bukkit.configuration"
] | java.io; java.nio; java.util; me.despawningbone; org.bukkit; org.bukkit.configuration; | 677,889 |
public Jackson2ObjectMapperBuilder serializersByType(Map<Class<?>, JsonSerializer<?>> serializers) {
if (serializers != null) {
this.serializers.putAll(serializers);
}
return this;
} | Jackson2ObjectMapperBuilder function(Map<Class<?>, JsonSerializer<?>> serializers) { if (serializers != null) { this.serializers.putAll(serializers); } return this; } | /**
* Configure custom serializers for the given types.
* @see #serializers(JsonSerializer...)
*/ | Configure custom serializers for the given types | serializersByType | {
"repo_name": "shivpun/spring-framework",
"path": "spring-web/src/main/java/org/springframework/http/converter/json/Jackson2ObjectMapperBuilder.java",
"license": "apache-2.0",
"size": 29502
} | [
"com.fasterxml.jackson.databind.JsonSerializer",
"java.util.Map"
] | import com.fasterxml.jackson.databind.JsonSerializer; import java.util.Map; | import com.fasterxml.jackson.databind.*; import java.util.*; | [
"com.fasterxml.jackson",
"java.util"
] | com.fasterxml.jackson; java.util; | 314,118 |
@Test
public void testFailingExecutionAfterRestart() throws Exception {
JobVertex sender = ExecutionGraphTestUtils.createJobVertex("Task1", 1, NoOpInvokable.class);
JobVertex receiver =
ExecutionGraphTestUtils.createJobVertex("Task2", 1, NoOpInvokable.class);
JobGraph job... | void function() throws Exception { JobVertex sender = ExecutionGraphTestUtils.createJobVertex("Task1", 1, NoOpInvokable.class); JobVertex receiver = ExecutionGraphTestUtils.createJobVertex("Task2", 1, NoOpInvokable.class); JobGraph jobGraph = JobGraphTestUtils.streamingJobGraph(sender, receiver); try (SlotPool slotPool... | /**
* Tests that a failing execution does not affect a restarted job. This is important if a
* callback handler fails an execution after it has already reached a final state and the job
* has been restarted.
*/ | Tests that a failing execution does not affect a restarted job. This is important if a callback handler fails an execution after it has already reached a final state and the job has been restarted | testFailingExecutionAfterRestart | {
"repo_name": "lincoln-lil/flink",
"path": "flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/ExecutionGraphRestartTest.java",
"license": "apache-2.0",
"size": 18246
} | [
"java.util.Iterator",
"org.apache.flink.api.common.JobStatus",
"org.apache.flink.runtime.execution.ExecutionState",
"org.apache.flink.runtime.executiongraph.failover.flip1.TestRestartBackoffTimeStrategy",
"org.apache.flink.runtime.jobgraph.JobGraph",
"org.apache.flink.runtime.jobgraph.JobGraphTestUtils",
... | import java.util.Iterator; import org.apache.flink.api.common.JobStatus; import org.apache.flink.runtime.execution.ExecutionState; import org.apache.flink.runtime.executiongraph.failover.flip1.TestRestartBackoffTimeStrategy; import org.apache.flink.runtime.jobgraph.JobGraph; import org.apache.flink.runtime.jobgraph.Job... | import java.util.*; import org.apache.flink.api.common.*; import org.apache.flink.runtime.execution.*; import org.apache.flink.runtime.executiongraph.failover.flip1.*; import org.apache.flink.runtime.jobgraph.*; import org.apache.flink.runtime.jobmaster.slotpool.*; import org.apache.flink.runtime.scheduler.*; import or... | [
"java.util",
"org.apache.flink",
"org.junit"
] | java.util; org.apache.flink; org.junit; | 2,533,314 |
private void loadAttributeValueRefSetMembers() throws Exception {
Set<Concept> modifiedConcepts = new HashSet<>();
Set<Atom> modifiedAtoms = new HashSet<>();
// Setup variables
String line = "";
int objectsAdded = 0;
int objectsUpdated = 0;
// Iterate through simple refset reader
Pus... | void function() throws Exception { Set<Concept> modifiedConcepts = new HashSet<>(); Set<Atom> modifiedAtoms = new HashSet<>(); String line = STR\tSTRidSTRvalueIdSTRvalueIdSTR add attribute = STR add attribute value refset member = STRmoduleIdSTRvalueIdSTR update simple - STR update attribute value refset member - STR u... | /**
* Load attribute value ref set members.
*
* @throws Exception the exception
*/ | Load attribute value ref set members | loadAttributeValueRefSetMembers | {
"repo_name": "WestCoastInformatics/UMLS-Terminology-Server",
"path": "jpa-services/src/main/java/com/wci/umls/server/jpa/algo/Rf2DeltaLoaderAlgorithm.java",
"license": "apache-2.0",
"size": 114719
} | [
"com.wci.umls.server.model.content.Atom",
"com.wci.umls.server.model.content.Concept",
"java.util.HashSet",
"java.util.Set"
] | import com.wci.umls.server.model.content.Atom; import com.wci.umls.server.model.content.Concept; import java.util.HashSet; import java.util.Set; | import com.wci.umls.server.model.content.*; import java.util.*; | [
"com.wci.umls",
"java.util"
] | com.wci.umls; java.util; | 1,461,110 |
public ToXContent filter() {
return filter;
} | ToXContent function() { return filter; } | /**
* An optional Query DSL defined query that can added as a filter on the top of the SQL query
*/ | An optional Query DSL defined query that can added as a filter on the top of the SQL query | filter | {
"repo_name": "coding0011/elasticsearch",
"path": "x-pack/plugin/sql/sql-proto/src/main/java/org/elasticsearch/xpack/sql/proto/SqlQueryRequest.java",
"license": "apache-2.0",
"size": 6741
} | [
"org.elasticsearch.common.xcontent.ToXContent"
] | import org.elasticsearch.common.xcontent.ToXContent; | import org.elasticsearch.common.xcontent.*; | [
"org.elasticsearch.common"
] | org.elasticsearch.common; | 2,687,451 |
public void setRegisterValueValue(YangString registerValueValue)
throws JNCException {
setLeafValue(Epc.NAMESPACE,
"register-value",
registerValueValue,
childrenNames());
} | void function(YangString registerValueValue) throws JNCException { setLeafValue(Epc.NAMESPACE, STR, registerValueValue, childrenNames()); } | /**
* Sets the value for child leaf "register-value",
* using instance of generated typedef class.
* @param registerValueValue The value to set.
* @param registerValueValue used during instantiation.
*/ | Sets the value for child leaf "register-value", using instance of generated typedef class | setRegisterValueValue | {
"repo_name": "jnpr-shinma/yangfile",
"path": "hitel/src/hctaEpc/fgw/statistics/fgwBm/ERabRelease.java",
"license": "apache-2.0",
"size": 11380
} | [
"com.tailf.jnc.YangString"
] | import com.tailf.jnc.YangString; | import com.tailf.jnc.*; | [
"com.tailf.jnc"
] | com.tailf.jnc; | 2,275,706 |
public void loop() {
if (error != null) {
double delta = Utils.getDeltaTime(this.getRuntime());
ctime += delta;
ByteArrayOutputStream sw = new ByteArrayOutputStream();
error.printStackTrace(new PrintStream(sw));
try {
telemetry.addD... | void function() { if (error != null) { double delta = Utils.getDeltaTime(this.getRuntime()); ctime += delta; ByteArrayOutputStream sw = new ByteArrayOutputStream(); error.printStackTrace(new PrintStream(sw)); try { telemetry.addData("ERROR", sw.toString("UTF-8")); } catch (UnsupportedEncodingException e) { e.printStack... | /**
* User defined loop method
* <p>
* This method will be called repeatedly in x loop while this op mode is running
*/ | User defined loop method This method will be called repeatedly in x loop while this op mode is running | loop | {
"repo_name": "VinesRobotics/VinesRobotics",
"path": "TeamCode/src/main/java/org/vinesrobotics/bot/opmodes/final_16/VibotHardwareBase.java",
"license": "mit",
"size": 5892
} | [
"java.io.ByteArrayOutputStream",
"java.io.PrintStream",
"java.io.UnsupportedEncodingException",
"org.vinesrobotics.bot.utils.Utils"
] | import java.io.ByteArrayOutputStream; import java.io.PrintStream; import java.io.UnsupportedEncodingException; import org.vinesrobotics.bot.utils.Utils; | import java.io.*; import org.vinesrobotics.bot.utils.*; | [
"java.io",
"org.vinesrobotics.bot"
] | java.io; org.vinesrobotics.bot; | 2,656,315 |
private void initialize() {
this.setContentPane(getJContentPane());
this.setTitle("Change Password");
this.setFrameIcon(DorianLookAndFeel.getPasswordIcon());
} | void function() { this.setContentPane(getJContentPane()); this.setTitle(STR); this.setFrameIcon(DorianLookAndFeel.getPasswordIcon()); } | /**
* This method initializes this
*/ | This method initializes this | initialize | {
"repo_name": "NCIP/cagrid",
"path": "cagrid/Software/core/caGrid/projects/gaards-ui/src/org/cagrid/gaards/ui/dorian/idp/ChangePasswordWindow.java",
"license": "bsd-3-clause",
"size": 12459
} | [
"org.cagrid.gaards.ui.dorian.DorianLookAndFeel"
] | import org.cagrid.gaards.ui.dorian.DorianLookAndFeel; | import org.cagrid.gaards.ui.dorian.*; | [
"org.cagrid.gaards"
] | org.cagrid.gaards; | 212,009 |
public static CsvReader parse(String data) {
if (data == null) {
throw new IllegalArgumentException(
"Parameter data can not be null.");
}
return new CsvReader(new StringReader(data));
} | static CsvReader function(String data) { if (data == null) { throw new IllegalArgumentException( STR); } return new CsvReader(new StringReader(data)); } | /**
* Creates a {@link com.csvreader.CsvReader CsvReader} object using a string
* of data as the source. Uses ISO-8859-1 as the
* {@link java.nio.charset.Charset Charset}.
*
* @param data
* The String of data to use as the source.
* @return A {@link com.csvreader.CsvReader CsvReader} obje... | Creates a <code>com.csvreader.CsvReader CsvReader</code> object using a string of data as the source. Uses ISO-8859-1 as the <code>java.nio.charset.Charset Charset</code> | parse | {
"repo_name": "alrocar/POIProxy",
"path": "es.alrocar.poiproxy/src/test/java/es/alrocar/csv/CsvReader.java",
"license": "apache-2.0",
"size": 47568
} | [
"java.io.StringReader"
] | import java.io.StringReader; | import java.io.*; | [
"java.io"
] | java.io; | 1,837,890 |
public void submit() throws IOException, InterruptedException, ClassNotFoundException
{
ensureState(JobState.DEFINE);
setUseNewAPI();
connect();
| void function() throws IOException, InterruptedException, ClassNotFoundException { ensureState(JobState.DEFINE); setUseNewAPI(); connect(); | /**
* Submit the job to the cluster and return immediately.
*
* @throws IOException
*/ | Submit the job to the cluster and return immediately | submit | {
"repo_name": "leechoongyon/HadoopSourceAnalyze",
"path": "hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/Job.java",
"license": "apache-2.0",
"size": 48882
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,879,508 |
public static <T extends NamedNode> T createModelFromXml(CamelContext context, String xml, Class<T> type) throws JAXBException {
return modelToXml(context, null, xml, type);
} | static <T extends NamedNode> T function(CamelContext context, String xml, Class<T> type) throws JAXBException { return modelToXml(context, null, xml, type); } | /**
* Marshal the xml to the model definition
*
* @param context the CamelContext, if <tt>null</tt> then {@link org.apache.camel.spi.ModelJAXBContextFactory} is not in use
* @param xml the xml
* @param type the definition type to return, will throw a {@link ClassCastException} if not the... | Marshal the xml to the model definition | createModelFromXml | {
"repo_name": "lburgazzoli/apache-camel",
"path": "camel-core/src/main/java/org/apache/camel/model/ModelHelper.java",
"license": "apache-2.0",
"size": 13930
} | [
"javax.xml.bind.JAXBException",
"org.apache.camel.CamelContext",
"org.apache.camel.NamedNode"
] | import javax.xml.bind.JAXBException; import org.apache.camel.CamelContext; import org.apache.camel.NamedNode; | import javax.xml.bind.*; import org.apache.camel.*; | [
"javax.xml",
"org.apache.camel"
] | javax.xml; org.apache.camel; | 2,880,701 |
private void initBPShipmentDetails(int C_BPartner_ID)
{
log.config("C_BPartner_ID" + C_BPartner_ID);
// load Shipments (Receipts) - Completed, Closed
shipmentField.removeActionListener(this);
shipmentField.removeAllItems();
// None
KeyNamePair pp = new KeyNamePair(0,"");
shipmentField.addIt... | void function(int C_BPartner_ID) { log.config(STR + C_BPartner_ID); shipmentField.removeActionListener(this); shipmentField.removeAllItems(); KeyNamePair pp = new KeyNamePair(0,""); shipmentField.addItem(pp); ArrayList<KeyNamePair> list = loadShipmentData(C_BPartner_ID); for(KeyNamePair knp : list) shipmentField.addIte... | /**
* Load PBartner dependent Order/Invoice/Shipment Field.
* @param C_BPartner_ID
*/ | Load PBartner dependent Order/Invoice/Shipment Field | initBPShipmentDetails | {
"repo_name": "erpcya/adempierePOS",
"path": "client/src/org/compiere/grid/VCreateFromInvoiceUI.java",
"license": "gpl-2.0",
"size": 12623
} | [
"java.util.ArrayList",
"org.compiere.util.KeyNamePair"
] | import java.util.ArrayList; import org.compiere.util.KeyNamePair; | import java.util.*; import org.compiere.util.*; | [
"java.util",
"org.compiere.util"
] | java.util; org.compiere.util; | 688,769 |
@Nullable public GridCacheMvccCandidate explicitLock(long threadId, IgniteTxKey key) {
if (threadId < 0)
return explicitLock(key, null);
else {
GridCacheExplicitLockSpan span = pendingExplicit.get(threadId);
return span == null ? null : span.candidate(key, null);... | @Nullable GridCacheMvccCandidate function(long threadId, IgniteTxKey key) { if (threadId < 0) return explicitLock(key, null); else { GridCacheExplicitLockSpan span = pendingExplicit.get(threadId); return span == null ? null : span.candidate(key, null); } } | /**
* Gets last added explicit lock candidate by thread id and key.
*
* @param threadId Thread id.
* @param key Key to look up.
* @return Last added explicit lock candidate for given thread id and key or {@code null} if
* no such candidate.
*/ | Gets last added explicit lock candidate by thread id and key | explicitLock | {
"repo_name": "psadusumilli/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvccManager.java",
"license": "apache-2.0",
"size": 46448
} | [
"org.apache.ignite.internal.processors.cache.transactions.IgniteTxKey",
"org.jetbrains.annotations.Nullable"
] | import org.apache.ignite.internal.processors.cache.transactions.IgniteTxKey; import org.jetbrains.annotations.Nullable; | import org.apache.ignite.internal.processors.cache.transactions.*; import org.jetbrains.annotations.*; | [
"org.apache.ignite",
"org.jetbrains.annotations"
] | org.apache.ignite; org.jetbrains.annotations; | 2,518,065 |
public static void initInstance(Context context, String meteorServerHostname, boolean useSsl) {
initInstance(context, meteorServerHostname, sMeteorPort, useSsl);
} | static void function(Context context, String meteorServerHostname, boolean useSsl) { initInstance(context, meteorServerHostname, sMeteorPort, useSsl); } | /**
* Initializes instance to connect to given Meteor server
* @param context Android context
* @param meteorServerHostname Meteor hostname/IP
* @param useSsl whether to use SSL for connection
*/ | Initializes instance to connect to given Meteor server | initInstance | {
"repo_name": "kenyee/android-ddp-client",
"path": "src/com/keysolutions/ddpclient/android/DDPStateSingleton.java",
"license": "apache-2.0",
"size": 33928
} | [
"android.content.Context"
] | import android.content.Context; | import android.content.*; | [
"android.content"
] | android.content; | 2,820,529 |
private void setUserInterfaceActive(boolean active) {
Shell[] shells = Display.getCurrent().getShells();
if (active) {
for (int i = 0; i < shells.length; i++) {
if (!shells[i].isDisposed()) {
shells[i].setEnabled(active);
}
}
} else {
// Deactive shells in reverse order
for (int i = sh... | void function(boolean active) { Shell[] shells = Display.getCurrent().getShells(); if (active) { for (int i = 0; i < shells.length; i++) { if (!shells[i].isDisposed()) { shells[i].setEnabled(active); } } } else { for (int i = shells.length - 1; i >= 0; i--) { if (!shells[i].isDisposed()) { shells[i].setEnabled(active);... | /**
* Iterate through all of the windows and set them to be disabled or enabled
* as appropriate.'
*
* @param active
* The set the windows will be set to.
*/ | Iterate through all of the windows and set them to be disabled or enabled as appropriate.' | setUserInterfaceActive | {
"repo_name": "CohesionForce/eclipse4-parts",
"path": "org.eclipse.e4.ui.part/src/org/eclipse/e4/ui/internal/progress/ProgressManager.java",
"license": "epl-1.0",
"size": 32895
} | [
"org.eclipse.swt.widgets.Display",
"org.eclipse.swt.widgets.Shell"
] | import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; | import org.eclipse.swt.widgets.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 2,891,253 |
public List<String> getDefines() {
List<String> defines = new ArrayList<>();
for (String define :
ruleContext.attributes().get(DEFINES_ATTRIBUTE, Type.STRING_LIST)) {
List<String> tokens = new ArrayList<>();
try {
ShellUtils.tokenize(tokens, ruleContext.expandMakeVariables(DEFINES_AT... | List<String> function() { List<String> defines = new ArrayList<>(); for (String define : ruleContext.attributes().get(DEFINES_ATTRIBUTE, Type.STRING_LIST)) { List<String> tokens = new ArrayList<>(); try { ShellUtils.tokenize(tokens, ruleContext.expandMakeVariables(DEFINES_ATTRIBUTE, define)); if (tokens.size() == 1) { ... | /**
* Returns a list of define tokens from "defines" attribute.
*
* <p>We tokenize the "defines" attribute, to ensure that the handling of
* quotes and backslash escapes is consistent Bazel's treatment of the "copts" attribute.
*
* <p>But we require that the "defines" attribute consists of a single to... | Returns a list of define tokens from "defines" attribute. We tokenize the "defines" attribute, to ensure that the handling of quotes and backslash escapes is consistent Bazel's treatment of the "copts" attribute. But we require that the "defines" attribute consists of a single token | getDefines | {
"repo_name": "kchodorow/bazel",
"path": "src/main/java/com/google/devtools/build/lib/rules/cpp/CcCommon.java",
"license": "apache-2.0",
"size": 26720
} | [
"com.google.devtools.build.lib.shell.ShellUtils",
"com.google.devtools.build.lib.syntax.Type",
"java.util.ArrayList",
"java.util.List"
] | import com.google.devtools.build.lib.shell.ShellUtils; import com.google.devtools.build.lib.syntax.Type; import java.util.ArrayList; import java.util.List; | import com.google.devtools.build.lib.shell.*; import com.google.devtools.build.lib.syntax.*; import java.util.*; | [
"com.google.devtools",
"java.util"
] | com.google.devtools; java.util; | 2,184,055 |
public static void setContinuousDismissCount(int count) {
SharedPreferencesManager sharedPreferencesManager = SharedPreferencesManager.getInstance();
sharedPreferencesManager.writeInt(CONTINUOUS_DISMISS_COUNTER, count);
} | static void function(int count) { SharedPreferencesManager sharedPreferencesManager = SharedPreferencesManager.getInstance(); sharedPreferencesManager.writeInt(CONTINUOUS_DISMISS_COUNTER, count); } | /**
* Set the count that records how many sessions in which user has continuously dismissed the
* conditional tab strip in SharedPreference.
*
* @param count the updated count to save into SharedPreference.
*/ | Set the count that records how many sessions in which user has continuously dismissed the conditional tab strip in SharedPreference | setContinuousDismissCount | {
"repo_name": "ric2b/Vivaldi-browser",
"path": "chromium/chrome/android/java/src/org/chromium/chrome/browser/tasks/ConditionalTabStripUtils.java",
"license": "bsd-3-clause",
"size": 12615
} | [
"org.chromium.chrome.browser.preferences.SharedPreferencesManager"
] | import org.chromium.chrome.browser.preferences.SharedPreferencesManager; | import org.chromium.chrome.browser.preferences.*; | [
"org.chromium.chrome"
] | org.chromium.chrome; | 2,507,929 |
public void addModified(ModifiedSelector selector) {
appendSelector(selector);
} | void function(ModifiedSelector selector) { appendSelector(selector); } | /**
* add the modified selector
* @param selector the selector to add
* @since ant 1.6
*/ | add the modified selector | addModified | {
"repo_name": "Mayo-WE01051879/mayosapp",
"path": "Build/src/main/org/apache/tools/ant/types/selectors/AbstractSelectorContainer.java",
"license": "mit",
"size": 10393
} | [
"org.apache.tools.ant.types.selectors.modifiedselector.ModifiedSelector"
] | import org.apache.tools.ant.types.selectors.modifiedselector.ModifiedSelector; | import org.apache.tools.ant.types.selectors.modifiedselector.*; | [
"org.apache.tools"
] | org.apache.tools; | 2,227,786 |
BiomeGenBase getBiomeGenForCoords(int p_72807_1_, int p_72807_2_); | BiomeGenBase getBiomeGenForCoords(int p_72807_1_, int p_72807_2_); | /**
* Gets the biome for a given set of x/z coordinates
*/ | Gets the biome for a given set of x/z coordinates | getBiomeGenForCoords | {
"repo_name": "mviitanen/marsmod",
"path": "mcp/src/minecraft/net/minecraft/world/IBlockAccess.java",
"license": "gpl-2.0",
"size": 1341
} | [
"net.minecraft.world.biome.BiomeGenBase"
] | import net.minecraft.world.biome.BiomeGenBase; | import net.minecraft.world.biome.*; | [
"net.minecraft.world"
] | net.minecraft.world; | 2,616,986 |
protected ForceMergeResponse forceMerge() {
waitForRelocation();
ForceMergeResponse actionGet = client().admin().indices().prepareForceMerge().setMaxNumSegments(1).execute().actionGet();
assertNoFailures(actionGet);
return actionGet;
} | ForceMergeResponse function() { waitForRelocation(); ForceMergeResponse actionGet = client().admin().indices().prepareForceMerge().setMaxNumSegments(1).execute().actionGet(); assertNoFailures(actionGet); return actionGet; } | /**
* Waits for all relocations and force merge all indices in the cluster to 1 segment.
*/ | Waits for all relocations and force merge all indices in the cluster to 1 segment | forceMerge | {
"repo_name": "rajanm/elasticsearch",
"path": "test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java",
"license": "apache-2.0",
"size": 107161
} | [
"org.elasticsearch.action.admin.indices.forcemerge.ForceMergeResponse",
"org.elasticsearch.test.hamcrest.ElasticsearchAssertions"
] | import org.elasticsearch.action.admin.indices.forcemerge.ForceMergeResponse; import org.elasticsearch.test.hamcrest.ElasticsearchAssertions; | import org.elasticsearch.action.admin.indices.forcemerge.*; import org.elasticsearch.test.hamcrest.*; | [
"org.elasticsearch.action",
"org.elasticsearch.test"
] | org.elasticsearch.action; org.elasticsearch.test; | 2,239 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.