method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public void setNetworkCountryIsoForPhone(int phoneId, String iso) { if (SubscriptionManager.isValidPhoneId(phoneId)) { setTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_OPERATOR_ISO_COUNTRY, iso); } }
void function(int phoneId, String iso) { if (SubscriptionManager.isValidPhoneId(phoneId)) { setTelephonyProperty(phoneId, TelephonyProperties.PROPERTY_OPERATOR_ISO_COUNTRY, iso); } }
/** * Set the ISO country code equivalent of the current registered * operator's MCC (Mobile Country Code). * @param phoneId which phone you want to set * @param iso the ISO country code equivalent of the current registered * @hide */
Set the ISO country code equivalent of the current registered operator's MCC (Mobile Country Code)
setNetworkCountryIsoForPhone
{ "repo_name": "syslover33/ctank", "path": "java/android-sdk-linux_r24.4.1_src/sources/android-23/android/telephony/TelephonyManager.java", "license": "gpl-3.0", "size": 165169 }
[ "com.android.internal.telephony.TelephonyProperties" ]
import com.android.internal.telephony.TelephonyProperties;
import com.android.internal.telephony.*;
[ "com.android.internal" ]
com.android.internal;
228,174
public PrintWriter buildPrintWriter() { if (this.writer == null) { return new LoggerPrintWriter(this.logger, this.autoFlush, this.fqcn, this.level, this.marker); } return new LoggerPrintWriter(this.writer, this.autoFlush, this.logger, this.fqcn, this.level, this.marker); }
PrintWriter function() { if (this.writer == null) { return new LoggerPrintWriter(this.logger, this.autoFlush, this.fqcn, this.level, this.marker); } return new LoggerPrintWriter(this.writer, this.autoFlush, this.logger, this.fqcn, this.level, this.marker); }
/** * Builds a new {@link PrintWriter} that is backed by a Logger and optionally writes to another Writer as well. If * no Writer is configured for this builder, then the returned PrintWriter will only write to its underlying * Logger. * * @return a new PrintWriter that optionally writes to ano...
Builds a new <code>PrintWriter</code> that is backed by a Logger and optionally writes to another Writer as well. If no Writer is configured for this builder, then the returned PrintWriter will only write to its underlying Logger
buildPrintWriter
{ "repo_name": "dotCMS/log4j", "path": "log4j-iostreams/src/main/java/org/apache/logging/log4j/io/IoBuilder.java", "license": "apache-2.0", "size": 15987 }
[ "java.io.PrintWriter" ]
import java.io.PrintWriter;
import java.io.*;
[ "java.io" ]
java.io;
2,182,066
public PDFColorSpace getColorSpace() { return this.colorSpace; }
PDFColorSpace function() { return this.colorSpace; }
/** * Get the color space */
Get the color space
getColorSpace
{ "repo_name": "katjas/PDFrenderer", "path": "src/com/sun/pdfview/pattern/PDFShader.java", "license": "lgpl-2.1", "size": 8355 }
[ "com.sun.pdfview.colorspace.PDFColorSpace" ]
import com.sun.pdfview.colorspace.PDFColorSpace;
import com.sun.pdfview.colorspace.*;
[ "com.sun.pdfview" ]
com.sun.pdfview;
480,610
public String getVersion() { if ( version == null ) { version = (SFString)getField( "version" ); } return( version.getValue( ) ); }
String function() { if ( version == null ) { version = (SFString)getField( STR ); } return( version.getValue( ) ); }
/** Return the version String value. * @return The version String value. */
Return the version String value
getVersion
{ "repo_name": "Norkart/NK-VirtualGlobe", "path": "Xj3D/src/java/org/xj3d/sai/internal/node/hanim/SAIHAnimHumanoid.java", "license": "gpl-2.0", "size": 13112 }
[ "org.web3d.x3d.sai.SFString" ]
import org.web3d.x3d.sai.SFString;
import org.web3d.x3d.sai.*;
[ "org.web3d.x3d" ]
org.web3d.x3d;
715,534
@Test public void testNewlineHandling() throws COSVisitorException, IOException { String bibtex = "<bibtex:title>\nHallo\nWorld \nthis \n is\n\nnot \n\nan \n\n exercise \n \n.\n \n\n</bibtex:title>\n" + "<bibtex:tabs>\nHallo\tWorld \tthis \t is\t\tnot \t\tan \t\n exercise \t \n.\t \n\t<...
void function() throws COSVisitorException, IOException { String bibtex = STR + STR + STR; writeManually(pdfFile, XMPUtilTest.bibtexXPacket(XMPUtilTest.bibtexDescription(bibtex))); List<BibEntry> l = XMPUtil.readXMP(pdfFile.getAbsoluteFile()); Assert.assertEquals(1, l.size()); BibEntry e = l.get(0); Assert.assertNotNul...
/** * Are newlines in the XML processed correctly? * @throws IOException * @throws COSVisitorException * */
Are newlines in the XML processed correctly
testNewlineHandling
{ "repo_name": "fc7/jabref", "path": "src/test/java/net/sf/jabref/logic/xmp/XMPUtilTest.java", "license": "gpl-2.0", "size": 61006 }
[ "java.io.IOException", "java.util.List", "net.sf.jabref.model.entry.BibEntry", "org.apache.pdfbox.exceptions.COSVisitorException", "org.junit.Assert" ]
import java.io.IOException; import java.util.List; import net.sf.jabref.model.entry.BibEntry; import org.apache.pdfbox.exceptions.COSVisitorException; import org.junit.Assert;
import java.io.*; import java.util.*; import net.sf.jabref.model.entry.*; import org.apache.pdfbox.exceptions.*; import org.junit.*;
[ "java.io", "java.util", "net.sf.jabref", "org.apache.pdfbox", "org.junit" ]
java.io; java.util; net.sf.jabref; org.apache.pdfbox; org.junit;
379,480
@SuppressWarnings("unchecked") public List<Converter<?, ?, ?, ?>> getConverters(int index, TaskState forkTaskState) { String converterClassKey = ForkOperatorUtils.getPropertyNameForBranch(ConfigurationKeys.CONVERTER_CLASSES_KEY, index); if (!this.taskState.contains(converterClassKey)) { retur...
@SuppressWarnings(STR) List<Converter<?, ?, ?, ?>> function(int index, TaskState forkTaskState) { String converterClassKey = ForkOperatorUtils.getPropertyNameForBranch(ConfigurationKeys.CONVERTER_CLASSES_KEY, index); if (!this.taskState.contains(converterClassKey)) { return Collections.emptyList(); } if (index >= 0) { ...
/** * Get the list of post-fork {@link Converter}s for a given branch. * * @param index branch index * @param forkTaskState a {@link TaskState} instance specific to the fork identified by the branch index * @return list (possibly empty) of {@link Converter}s */
Get the list of post-fork <code>Converter</code>s for a given branch
getConverters
{ "repo_name": "yukuai518/gobblin", "path": "gobblin-runtime/src/main/java/gobblin/runtime/TaskContext.java", "license": "apache-2.0", "size": 11197 }
[ "com.google.common.base.Splitter", "com.google.common.collect.Lists", "java.util.Collections", "java.util.List" ]
import com.google.common.base.Splitter; import com.google.common.collect.Lists; import java.util.Collections; import java.util.List;
import com.google.common.base.*; import com.google.common.collect.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
950,153
void acknowledgeCheckpoint( JobID jobID, ExecutionAttemptID executionAttemptID, long checkpointId, CheckpointMetrics checkpointMetrics, SubtaskState subtaskState);
void acknowledgeCheckpoint( JobID jobID, ExecutionAttemptID executionAttemptID, long checkpointId, CheckpointMetrics checkpointMetrics, SubtaskState subtaskState);
/** * Acknowledges the given checkpoint. * * @param jobID * Job ID of the running job * @param executionAttemptID * Execution attempt ID of the running task * @param checkpointId * Meta data for this checkpoint * @param checkpointMetrics * Metrics of t...
Acknowledges the given checkpoint
acknowledgeCheckpoint
{ "repo_name": "hongyuhong/flink", "path": "flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/CheckpointResponder.java", "license": "apache-2.0", "size": 2219 }
[ "org.apache.flink.api.common.JobID", "org.apache.flink.runtime.checkpoint.CheckpointMetrics", "org.apache.flink.runtime.checkpoint.SubtaskState", "org.apache.flink.runtime.executiongraph.ExecutionAttemptID" ]
import org.apache.flink.api.common.JobID; import org.apache.flink.runtime.checkpoint.CheckpointMetrics; import org.apache.flink.runtime.checkpoint.SubtaskState; import org.apache.flink.runtime.executiongraph.ExecutionAttemptID;
import org.apache.flink.api.common.*; import org.apache.flink.runtime.checkpoint.*; import org.apache.flink.runtime.executiongraph.*;
[ "org.apache.flink" ]
org.apache.flink;
1,791,470
public void setRemovalListener(RemovalListener removalListener) { this.removalListener = removalListener; }
void function(RemovalListener removalListener) { this.removalListener = removalListener; }
/** * Set a specific removal Listener for the cache */
Set a specific removal Listener for the cache
setRemovalListener
{ "repo_name": "nikhilvibhav/camel", "path": "components/camel-caffeine/src/main/java/org/apache/camel/component/caffeine/CaffeineConfiguration.java", "license": "apache-2.0", "size": 6511 }
[ "com.github.benmanes.caffeine.cache.RemovalListener" ]
import com.github.benmanes.caffeine.cache.RemovalListener;
import com.github.benmanes.caffeine.cache.*;
[ "com.github.benmanes" ]
com.github.benmanes;
957,598
private List<DeudaAdmin> getListDeudaAdminByListId(List<Long> listLong){ String queryString = "FROM DeudaAdmin da WHERE da.id IN (:idsDeudaAdmin) "; Session session = SiatHibernateUtil.currentSession(); Query query = session.createQuery(queryString); query.setParameterList("idsDeudaAdmin",listLong); re...
List<DeudaAdmin> function(List<Long> listLong){ String queryString = STR; Session session = SiatHibernateUtil.currentSession(); Query query = session.createQuery(queryString); query.setParameterList(STR,listLong); return (ArrayList<DeudaAdmin>) query.list(); }
/** * Obtiene la lista de Deudas Administrativas a partir de la lista de Ids * @param listLong * @return List<DeudaAdmin> */
Obtiene la lista de Deudas Administrativas a partir de la lista de Ids
getListDeudaAdminByListId
{ "repo_name": "avdata99/SIAT", "path": "siat-1.0-SOURCE/src/buss/src/ar/gov/rosario/siat/gde/buss/dao/DeudaAdminDAO.java", "license": "gpl-3.0", "size": 94168 }
[ "ar.gov.rosario.siat.base.buss.dao.SiatHibernateUtil", "ar.gov.rosario.siat.gde.buss.bean.DeudaAdmin", "java.util.ArrayList", "java.util.List", "org.hibernate.Query", "org.hibernate.classic.Session" ]
import ar.gov.rosario.siat.base.buss.dao.SiatHibernateUtil; import ar.gov.rosario.siat.gde.buss.bean.DeudaAdmin; import java.util.ArrayList; import java.util.List; import org.hibernate.Query; import org.hibernate.classic.Session;
import ar.gov.rosario.siat.base.buss.dao.*; import ar.gov.rosario.siat.gde.buss.bean.*; import java.util.*; import org.hibernate.*; import org.hibernate.classic.*;
[ "ar.gov.rosario", "java.util", "org.hibernate", "org.hibernate.classic" ]
ar.gov.rosario; java.util; org.hibernate; org.hibernate.classic;
996,142
public static void configureLog4j() { LOGGER.debug("Configure Log4J."); // Get "log4jConfDirectory" system property String log4jDirectoryParameter = System.getProperty(Constants.PROPERTIES_LOG4J_DIR_PARAM_NAME); File logConfProperty = new File(log4jDirectoryParameter + Constants.LOG4...
static void function() { LOGGER.debug(STR); String log4jDirectoryParameter = System.getProperty(Constants.PROPERTIES_LOG4J_DIR_PARAM_NAME); File logConfProperty = new File(log4jDirectoryParameter + Constants.LOG4J_SETTINGS_FILE); String path = ApplicationHelper.getJarPath(); File logConf = new File(path + Constants.LOG...
/** * Loads Log4J configuration. */
Loads Log4J configuration
configureLog4j
{ "repo_name": "petkivim/xrde2e", "path": "src/client/src/main/java/com/pkrete/xrde2e/client/util/ApplicationHelper.java", "license": "mit", "size": 12294 }
[ "java.io.File", "org.apache.log4j.xml.DOMConfigurator" ]
import java.io.File; import org.apache.log4j.xml.DOMConfigurator;
import java.io.*; import org.apache.log4j.xml.*;
[ "java.io", "org.apache.log4j" ]
java.io; org.apache.log4j;
1,259,325
public synchronized Command createACommand(final String command) throws UnhandledCommandException, ParseException, NotCamiCommandException { String identifier = null; try { final Parser parser = createParser(); parser.parse(command); identifier = parser.getCommand(); Command result = null; ...
synchronized Command function(final String command) throws UnhandledCommandException, ParseException, NotCamiCommandException { String identifier = null; try { final Parser parser = createParser(); parser.parse(command); identifier = parser.getCommand(); Command result = null; final CAMICOMMANDS idCC = CAMICOMMANDS.get...
/** * Creer une commande CAMI a partir d'une chaine representant la commande. * * @param command * La chaine CAMI de la commande a creer. * @return l'objet commande * @throws UnhandledCommandException * Cami command not handled * @throws ParseException * a parse exc...
Creer une commande CAMI a partir d'une chaine representant la commande
createACommand
{ "repo_name": "lhillah/camipnml", "path": "cpnami2-cpnami2/src/fr/lip6/move/pnml/cpnami/cami/impl/CamiFactoryImpl.java", "license": "epl-1.0", "size": 6574 }
[ "fr.lip6.move.pnml.cpnami.cami.Command", "fr.lip6.move.pnml.cpnami.cami.Parser", "fr.lip6.move.pnml.cpnami.cami.Runner", "fr.lip6.move.pnml.cpnami.cami.model.As", "fr.lip6.move.pnml.cpnami.cami.model.CAMICOMMANDS", "fr.lip6.move.pnml.cpnami.cami.model.Ca", "fr.lip6.move.pnml.cpnami.cami.model.Cm", "fr...
import fr.lip6.move.pnml.cpnami.cami.Command; import fr.lip6.move.pnml.cpnami.cami.Parser; import fr.lip6.move.pnml.cpnami.cami.Runner; import fr.lip6.move.pnml.cpnami.cami.model.As; import fr.lip6.move.pnml.cpnami.cami.model.CAMICOMMANDS; import fr.lip6.move.pnml.cpnami.cami.model.Ca; import fr.lip6.move.pnml.cpnami.c...
import fr.lip6.move.pnml.cpnami.cami.*; import fr.lip6.move.pnml.cpnami.cami.model.*; import fr.lip6.move.pnml.cpnami.exceptions.*;
[ "fr.lip6.move" ]
fr.lip6.move;
700,275
private void drawHorizontalRuler( Canvas canvas, Ruler ruler, Axis axis, Paint paint ) { float x1; float y1; float x2; float y2; float pxDash; float pxBlank; paint.setColor(ruler.getColor()); paint...
void function( Canvas canvas, Ruler ruler, Axis axis, Paint paint ) { float x1; float y1; float x2; float y2; float pxDash; float pxBlank; paint.setColor(ruler.getColor()); paint.setStrokeWidth(ruler.getWidth()); y1 = ruler.getPxPosition(); y2 = ruler.getPxPosition(); pxDash = dpToPx(ruler.getDash()); pxBlank = dpToPx(...
/** * This draw a horizontal ruler across the plot * @param canvas * @param ruler * @param axis * @param paint */
This draw a horizontal ruler across the plot
drawHorizontalRuler
{ "repo_name": "AlexandreHChaves/LogPlotAndroid", "path": "app/src/main/java/com/example/androidplot/logplotandroid/Grid.java", "license": "apache-2.0", "size": 31100 }
[ "android.graphics.Canvas", "android.graphics.Paint", "com.example.androidplot.logplotandroid.Utils" ]
import android.graphics.Canvas; import android.graphics.Paint; import com.example.androidplot.logplotandroid.Utils;
import android.graphics.*; import com.example.androidplot.logplotandroid.*;
[ "android.graphics", "com.example.androidplot" ]
android.graphics; com.example.androidplot;
1,119,701
public static IpAddress valueOf(InetAddress inetAddress) { byte[] bytes = inetAddress.getAddress(); if (inetAddress instanceof Inet4Address) { return new IpAddress(Version.INET, bytes); } if (inetAddress instanceof Inet6Address) { return new IpAddress(Version....
static IpAddress function(InetAddress inetAddress) { byte[] bytes = inetAddress.getAddress(); if (inetAddress instanceof Inet4Address) { return new IpAddress(Version.INET, bytes); } if (inetAddress instanceof Inet6Address) { return new IpAddress(Version.INET6, bytes); } if (bytes.length == INET_BYTE_LENGTH) { return ne...
/** * Converts an InetAddress into an IP address. * * @param inetAddress the InetAddress value to use * @return an IP address * @throws IllegalArgumentException if the argument is invalid */
Converts an InetAddress into an IP address
valueOf
{ "repo_name": "donNewtonAlpha/onos", "path": "utils/misc/src/main/java/org/onlab/packet/IpAddress.java", "license": "apache-2.0", "size": 20018 }
[ "java.net.Inet4Address", "java.net.Inet6Address", "java.net.InetAddress" ]
import java.net.Inet4Address; import java.net.Inet6Address; import java.net.InetAddress;
import java.net.*;
[ "java.net" ]
java.net;
1,730,549
// @VisibleForTesting String getExampleShortNumber(String regionCode) { PhoneMetadata phoneMetadata = MetadataManager.getShortNumberMetadataForRegion(regionCode); if (phoneMetadata == null) { return ""; } PhoneNumberDesc desc = phoneMetadata.getShortCode(); if (desc.hasExampleNumber()) { ...
PhoneMetadata phoneMetadata = MetadataManager.getShortNumberMetadataForRegion(regionCode); if (phoneMetadata == null) { return STR"; }
/** * Gets a valid short number for the specified region. * * @param regionCode the region for which an example short number is needed * @return a valid short number for the specified region. Returns an empty string when the * metadata does not contain such information. */
Gets a valid short number for the specified region
getExampleShortNumber
{ "repo_name": "leandrocohn/libphonenumber-7-0.5", "path": "tools/java/java-build/target/test-classes/com/google/i18n/phonenumbers/ShortNumberInfo.java", "license": "apache-2.0", "size": 26915 }
[ "com.google.i18n.phonenumbers.Phonemetadata" ]
import com.google.i18n.phonenumbers.Phonemetadata;
import com.google.i18n.phonenumbers.*;
[ "com.google.i18n" ]
com.google.i18n;
632,719
public com.iucn.whp.dbservice.model.whp_sites_indigenous_communities updatewhp_sites_indigenous_communities( com.iucn.whp.dbservice.model.whp_sites_indigenous_communities whp_sites_indigenous_communities) throws com.liferay.portal.kernel.exception.SystemException;
com.iucn.whp.dbservice.model.whp_sites_indigenous_communities function( com.iucn.whp.dbservice.model.whp_sites_indigenous_communities whp_sites_indigenous_communities) throws com.liferay.portal.kernel.exception.SystemException;
/** * Updates the whp_sites_indigenous_communities in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. * * @param whp_sites_indigenous_communities the whp_sites_indigenous_communities * @return the whp_sites_indigenous_communities that was updated * @throws SystemExc...
Updates the whp_sites_indigenous_communities in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners
updatewhp_sites_indigenous_communities
{ "repo_name": "iucn-whp/world-heritage-outlook", "path": "portlets/iucn-dbservice-portlet/docroot/WEB-INF/service/com/iucn/whp/dbservice/service/whp_sites_indigenous_communitiesLocalService.java", "license": "gpl-2.0", "size": 12644 }
[ "com.liferay.portal.kernel.exception.SystemException" ]
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.exception.*;
[ "com.liferay.portal" ]
com.liferay.portal;
188,318
String strMsg =""; OutputFormat format = new OutputFormat(doc); format.setIndenting(true); ByteArrayOutputStream baos = new ByteArrayOutputStream(); XMLSerializer serializer = new XMLSerializer(baos, format); try { serializer.serialize(doc); strMsg = baos.toString("UTF-8"); }...
String strMsg =STRUTF-8"); } catch (IOException e) { e.printStackTrace(); } return strMsg; }
/*** * Helper method which converts XML Document into pretty formatted string * @param doc to convert * @return converted XML as String */
Helper method which converts XML Document into pretty formatted string
documentToString
{ "repo_name": "AutoMates/openhab", "path": "bundles/binding/org.openhab.binding.fritzboxtr064/src/main/java/org/openhab/binding/fritzboxtr064/internal/Helper.java", "license": "epl-1.0", "size": 2160 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,593,223
@Override public TypedQuery setParameter(String name, Calendar value, TemporalType temporalType) { entityManager.verifyOpenWithSetRollbackOnly(); return setParameter(name, convertTemporalType(value, temporalType)); }
TypedQuery function(String name, Calendar value, TemporalType temporalType) { entityManager.verifyOpenWithSetRollbackOnly(); return setParameter(name, convertTemporalType(value, temporalType)); }
/** * Bind an instance of java.util.Calendar to a named parameter. * * @param name * @param value * @param temporalType * @return the same query instance */
Bind an instance of java.util.Calendar to a named parameter
setParameter
{ "repo_name": "RallySoftware/eclipselink.runtime", "path": "jpa/org.eclipse.persistence.jpa/src/org/eclipse/persistence/internal/jpa/EJBQueryImpl.java", "license": "epl-1.0", "size": 25671 }
[ "java.util.Calendar", "javax.persistence.TemporalType", "javax.persistence.TypedQuery" ]
import java.util.Calendar; import javax.persistence.TemporalType; import javax.persistence.TypedQuery;
import java.util.*; import javax.persistence.*;
[ "java.util", "javax.persistence" ]
java.util; javax.persistence;
620,952
public void testSearchTimeoutsAbortRequest() throws Exception { ScrollableHitSource.Response scrollResponse = new ScrollableHitSource.Response(true, emptyList(), 0, emptyList(), null); simulateScrollResponse(new DummyAsyncBulkByScrollAction(), timeValueNanos(System.nanoTime()), 0, scrollResponse); ...
void function() throws Exception { ScrollableHitSource.Response scrollResponse = new ScrollableHitSource.Response(true, emptyList(), 0, emptyList(), null); simulateScrollResponse(new DummyAsyncBulkByScrollAction(), timeValueNanos(System.nanoTime()), 0, scrollResponse); BulkByScrollResponse response = listener.get(); as...
/** * Mimicks search timeouts. */
Mimicks search timeouts
testSearchTimeoutsAbortRequest
{ "repo_name": "strapdata/elassandra", "path": "modules/reindex/src/test/java/org/elasticsearch/index/reindex/AsyncBulkByScrollActionTests.java", "license": "apache-2.0", "size": 43871 }
[ "java.util.Collections", "org.elasticsearch.common.unit.TimeValue", "org.hamcrest.Matchers" ]
import java.util.Collections; import org.elasticsearch.common.unit.TimeValue; import org.hamcrest.Matchers;
import java.util.*; import org.elasticsearch.common.unit.*; import org.hamcrest.*;
[ "java.util", "org.elasticsearch.common", "org.hamcrest" ]
java.util; org.elasticsearch.common; org.hamcrest;
214,662
@SuppressWarnings("unchecked") public void disabledTestSiteDeletionTriggersSiteAliasDeletion() throws IdInvalidException, IdUsedException, PermissionException { IdManager idManager = getService(IdManager.class); SiteService siteService = getService(SiteService.class); AliasService aliasService = getService(Ali...
@SuppressWarnings(STR) void function() throws IdInvalidException, IdUsedException, PermissionException { IdManager idManager = getService(IdManager.class); SiteService siteService = getService(SiteService.class); AliasService aliasService = getService(AliasService.class); Site site = siteService.addSite(idManager.creat...
/** * DISABLED this test since it no longer works, the functionality still does though - KNL-1162 */
DISABLED this test since it no longer works, the functionality still does though - KNL-1162
disabledTestSiteDeletionTriggersSiteAliasDeletion
{ "repo_name": "marktriggs/nyu-sakai-10.4", "path": "kernel/kernel-impl/src/test/java/org/sakaiproject/site/impl/test/SiteAliasCleanupNotificationActionIntegrationTest.java", "license": "apache-2.0", "size": 4234 }
[ "java.util.List", "org.sakaiproject.alias.api.AliasService", "org.sakaiproject.exception.IdInvalidException", "org.sakaiproject.exception.IdUnusedException", "org.sakaiproject.exception.IdUsedException", "org.sakaiproject.exception.PermissionException", "org.sakaiproject.id.api.IdManager", "org.sakaip...
import java.util.List; import org.sakaiproject.alias.api.AliasService; import org.sakaiproject.exception.IdInvalidException; import org.sakaiproject.exception.IdUnusedException; import org.sakaiproject.exception.IdUsedException; import org.sakaiproject.exception.PermissionException; import org.sakaiproject.id.api.IdMan...
import java.util.*; import org.sakaiproject.alias.api.*; import org.sakaiproject.exception.*; import org.sakaiproject.id.api.*; import org.sakaiproject.site.api.*;
[ "java.util", "org.sakaiproject.alias", "org.sakaiproject.exception", "org.sakaiproject.id", "org.sakaiproject.site" ]
java.util; org.sakaiproject.alias; org.sakaiproject.exception; org.sakaiproject.id; org.sakaiproject.site;
1,348,316
public void setEndDate(final Date endDate) { this.endDate = endDate; }
void function(final Date endDate) { this.endDate = endDate; }
/** * DOCUMENT ME! * * @param endDate DOCUMENT ME! */
DOCUMENT ME
setEndDate
{ "repo_name": "cismet/cids-custom-sudplan", "path": "src/main/java/de/cismet/cids/custom/sudplan/hydrology/SimulationInput.java", "license": "lgpl-3.0", "size": 2802 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
159,817
protected static boolean requiresPersistence(final Class<?> test, final String testMethodName) { return test == GraphTest.class && testMethodName.equals("shouldPersistDataOnClose"); }
static boolean function(final Class<?> test, final String testMethodName) { return test == GraphTest.class && testMethodName.equals(STR); }
/** * Determines if a test requires TinkerGraph persistence to be configured with graph location and format. */
Determines if a test requires TinkerGraph persistence to be configured with graph location and format
requiresPersistence
{ "repo_name": "pluradj/incubator-tinkerpop", "path": "tinkergraph-gremlin/src/test/java/org/apache/tinkerpop/gremlin/tinkergraph/TinkerGraphProvider.java", "license": "apache-2.0", "size": 11378 }
[ "org.apache.tinkerpop.gremlin.structure.GraphTest" ]
import org.apache.tinkerpop.gremlin.structure.GraphTest;
import org.apache.tinkerpop.gremlin.structure.*;
[ "org.apache.tinkerpop" ]
org.apache.tinkerpop;
2,043,679
private String generateVisualizationHtml( final Visualization visualization, final User user ) throws IOException { switch ( visualization.getType() ) { case PIVOT_TABLE: return generateReportTableHtml( visualization, user ); default: return genera...
String function( final Visualization visualization, final User user ) throws IOException { switch ( visualization.getType() ) { case PIVOT_TABLE: return generateReportTableHtml( visualization, user ); default: return generateChartHtml( visualization, user ); } }
/** * Returns an absolute URL to an image representing the given Visualization. * * @param visualization the visualization to be rendered and uploaded. * @param user the user generate the Visualization. * @return absolute URL to the uploaded image. */
Returns an absolute URL to an image representing the given Visualization
generateVisualizationHtml
{ "repo_name": "hispindia/dhis2-Core", "path": "dhis-2/dhis-services/dhis-service-reporting/src/main/java/org/hisp/dhis/pushanalysis/DefaultPushAnalysisService.java", "license": "bsd-3-clause", "size": 21866 }
[ "java.io.IOException", "org.hisp.dhis.user.User", "org.hisp.dhis.visualization.Visualization" ]
import java.io.IOException; import org.hisp.dhis.user.User; import org.hisp.dhis.visualization.Visualization;
import java.io.*; import org.hisp.dhis.user.*; import org.hisp.dhis.visualization.*;
[ "java.io", "org.hisp.dhis" ]
java.io; org.hisp.dhis;
2,691,606
void enterCastExpression(@NotNull CQLParser.CastExpressionContext ctx); void exitCastExpression(@NotNull CQLParser.CastExpressionContext ctx);
void enterCastExpression(@NotNull CQLParser.CastExpressionContext ctx); void exitCastExpression(@NotNull CQLParser.CastExpressionContext ctx);
/** * Exit a parse tree produced by {@link CQLParser#castExpression}. */
Exit a parse tree produced by <code>CQLParser#castExpression</code>
exitCastExpression
{ "repo_name": "HuaweiBigData/StreamCQL", "path": "cql/src/main/java/com/huawei/streaming/cql/semanticanalyzer/parser/CQLParserListener.java", "license": "apache-2.0", "size": 58667 }
[ "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,798,789
public RMatrix3D getMatrix(RMatrix3D target) { return graphics.getMatrix(target); }
RMatrix3D function(RMatrix3D target) { return graphics.getMatrix(target); }
/** * Copy the current transformation matrix into the specified target. Pass in * null to create a new matrix. */
Copy the current transformation matrix into the specified target. Pass in null to create a new matrix
getMatrix
{ "repo_name": "juankysoriano/rainbow", "path": "rainbow-lib/src/main/java/com/juankysoriano/rainbow/core/drawing/RainbowDrawer.java", "license": "lgpl-3.0", "size": 51728 }
[ "com.juankysoriano.rainbow.core.matrix.RMatrix3D" ]
import com.juankysoriano.rainbow.core.matrix.RMatrix3D;
import com.juankysoriano.rainbow.core.matrix.*;
[ "com.juankysoriano.rainbow" ]
com.juankysoriano.rainbow;
1,675,086
GameType getGameType();
GameType getGameType();
/** * Returns the game type. * @return the game type * @see GameType */
Returns the game type
getGameType
{ "repo_name": "icza/sc2gears", "path": "src-sc2gearspluginapi/hu/belicza/andras/sc2gearspluginapi/api/sc2replay/IReplay.java", "license": "apache-2.0", "size": 12299 }
[ "hu.belicza.andras.sc2gearspluginapi.api.sc2replay.ReplayConsts" ]
import hu.belicza.andras.sc2gearspluginapi.api.sc2replay.ReplayConsts;
import hu.belicza.andras.sc2gearspluginapi.api.sc2replay.*;
[ "hu.belicza.andras" ]
hu.belicza.andras;
926,456
public static <T extends PopupPanel> T showOver (T popup, Widget target) { return show(popup, Position.OVER, target); }
static <T extends PopupPanel> T function (T popup, Widget target) { return show(popup, Position.OVER, target); }
/** * Shows the supplied popup panel over the specified target. */
Shows the supplied popup panel over the specified target
showOver
{ "repo_name": "threerings/gwt-utils", "path": "src/main/java/com/threerings/gwt/ui/Popups.java", "license": "lgpl-2.1", "size": 15014 }
[ "com.google.gwt.user.client.ui.PopupPanel", "com.google.gwt.user.client.ui.Widget" ]
import com.google.gwt.user.client.ui.PopupPanel; import com.google.gwt.user.client.ui.Widget;
import com.google.gwt.user.client.ui.*;
[ "com.google.gwt" ]
com.google.gwt;
409,991
public static ActionBarHelper createInstance(Activity activity) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) { return new ActionBarHelperICS(activity); } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { return new ActionBarHelperHoneycomb(activity); } else { ...
static ActionBarHelper function(Activity activity) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) { return new ActionBarHelperICS(activity); } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { return new ActionBarHelperHoneycomb(activity); } else { return new ActionBarHelperBase...
/** * Factory method for creating {@link ActionBarHelper} objects for a given * activity. Depending on which device the app is running, either a basic * helper or Honeycomb-specific helper will be returned. */
Factory method for creating <code>ActionBarHelper</code> objects for a given activity. Depending on which device the app is running, either a basic helper or Honeycomb-specific helper will be returned
createInstance
{ "repo_name": "bjoernlohrmann/livescale-toolkit", "path": "livescale-examples/livestream/livestream-android/src/de/tuberlin/cit/livestream/android/view/actionbar/ActionBarHelper.java", "license": "apache-2.0", "size": 3397 }
[ "android.app.Activity", "android.os.Build" ]
import android.app.Activity; import android.os.Build;
import android.app.*; import android.os.*;
[ "android.app", "android.os" ]
android.app; android.os;
97,339
ExtendedStackTraceElement[] toExtendedStackTrace(final Stack<Class<?>> stack, final Map<String, CacheEntry> map, final StackTraceElement[] rootTrace, final StackTraceElement[] stackTrace) { int stackLen...
ExtendedStackTraceElement[] toExtendedStackTrace(final Stack<Class<?>> stack, final Map<String, CacheEntry> map, final StackTraceElement[] rootTrace, final StackTraceElement[] stackTrace) { int stackLength; if (rootTrace != null) { int rootIndex = rootTrace.length - 1; int stackIndex = stackTrace.length - 1; while (roo...
/** * Resolve all the stack entries in this stack trace that are not common with the parent. * * @param stack The callers Class stack. * @param map The cache of CacheEntry objects. * @param rootTrace The first stack trace resolve or null. * @param stackTrace The stack trace be...
Resolve all the stack entries in this stack trace that are not common with the parent
toExtendedStackTrace
{ "repo_name": "codescale/logging-log4j2", "path": "log4j-core/src/main/java/org/apache/logging/log4j/core/impl/ThrowableProxy.java", "license": "apache-2.0", "size": 30759 }
[ "java.util.Map", "java.util.Stack" ]
import java.util.Map; import java.util.Stack;
import java.util.*;
[ "java.util" ]
java.util;
1,610,236
@Override protected List<ReactPackage> getPackages() { return Arrays.<ReactPackage>asList( new MainReactPackage() ); }
List<ReactPackage> function() { return Arrays.<ReactPackage>asList( new MainReactPackage() ); }
/** * A list of packages used by the app. If the app uses additional views * or modules besides the default ones, add more packages here. */
A list of packages used by the app. If the app uses additional views or modules besides the default ones, add more packages here
getPackages
{ "repo_name": "applean/gmtc", "path": "GmtcClient/android/app/src/main/java/com/gmtcclient/MainActivity.java", "license": "mit", "size": 1034 }
[ "com.facebook.react.ReactPackage", "com.facebook.react.shell.MainReactPackage", "java.util.Arrays", "java.util.List" ]
import com.facebook.react.ReactPackage; import com.facebook.react.shell.MainReactPackage; import java.util.Arrays; import java.util.List;
import com.facebook.react.*; import com.facebook.react.shell.*; import java.util.*;
[ "com.facebook.react", "java.util" ]
com.facebook.react; java.util;
233,832
return FacesMapping.getMapping("anywhere-login"); }
return FacesMapping.getMapping(STR); }
/** * Return the URL for login.xhtml * * @return URL */
Return the URL for login.xhtml
gotoLogin
{ "repo_name": "cnavaropalos/CUCEI-Helpdesk", "path": "CTAHelpdesk/src/java/mx/udg/helpdesk/beans/Login.java", "license": "gpl-2.0", "size": 1100 }
[ "mx.udg.helpdesk.views.FacesMapping" ]
import mx.udg.helpdesk.views.FacesMapping;
import mx.udg.helpdesk.views.*;
[ "mx.udg.helpdesk" ]
mx.udg.helpdesk;
199,471
@Test public void testDiesel() throws IOException { // mock InputStream read mockIn = createMock(InputStream.class); mockIn.read(); expectLastCall().andReturn((byte) '4'); expectLastCall().andReturn((byte) '1'); expectLastCall().andReturn((byte) ' '); expectLastCall().andReturn((byte) '5...
void function() throws IOException { mockIn = createMock(InputStream.class); mockIn.read(); expectLastCall().andReturn((byte) '4'); expectLastCall().andReturn((byte) '1'); expectLastCall().andReturn((byte) ' '); expectLastCall().andReturn((byte) '5'); expectLastCall().andReturn((byte) '1'); expectLastCall().andReturn((...
/** * Test for valid InputStream read, Diesel * * @throws IOException */
Test for valid InputStream read, Diesel
testDiesel
{ "repo_name": "ssimd/obd-java-api", "path": "src/test/java/pt/lighthouselabs/obd/commands/FindFuelTypeObdCommandTest.java", "license": "apache-2.0", "size": 3989 }
[ "java.io.IOException", "java.io.InputStream", "org.powermock.api.easymock.PowerMock", "org.testng.Assert" ]
import java.io.IOException; import java.io.InputStream; import org.powermock.api.easymock.PowerMock; import org.testng.Assert;
import java.io.*; import org.powermock.api.easymock.*; import org.testng.*;
[ "java.io", "org.powermock.api", "org.testng" ]
java.io; org.powermock.api; org.testng;
1,722,564
public void testFacetByTokenCount() throws IOException { init(); String facetField = randomFrom(Arrays.asList( "foo.token_count", "foo.token_count_unstored", "foo.token_count_with_doc_values")); SearchResponse result = searchByNumericRange(1, 10) .addAggregation(...
void function() throws IOException { init(); String facetField = randomFrom(Arrays.asList( STR, STR, STR)); SearchResponse result = searchByNumericRange(1, 10) .addAggregation(AggregationBuilders.terms("facet").field(facetField)).get(); assertSearchReturns(result, STR, "bulk1", "bulk2", "multi", STR, STR); assertThat(r...
/** * It is possible to search by token count. */
It is possible to search by token count
testFacetByTokenCount
{ "repo_name": "dpursehouse/elasticsearch", "path": "core/src/test/java/org/elasticsearch/index/mapper/core/TokenCountFieldMapperIntegrationIT.java", "license": "apache-2.0", "size": 9868 }
[ "java.io.IOException", "java.util.Arrays", "org.elasticsearch.action.search.SearchResponse", "org.elasticsearch.search.aggregations.AggregationBuilders", "org.elasticsearch.search.aggregations.bucket.terms.Terms", "org.hamcrest.Matchers" ]
import java.io.IOException; import java.util.Arrays; import org.elasticsearch.action.search.SearchResponse; import org.elasticsearch.search.aggregations.AggregationBuilders; import org.elasticsearch.search.aggregations.bucket.terms.Terms; import org.hamcrest.Matchers;
import java.io.*; import java.util.*; import org.elasticsearch.action.search.*; import org.elasticsearch.search.aggregations.*; import org.elasticsearch.search.aggregations.bucket.terms.*; import org.hamcrest.*;
[ "java.io", "java.util", "org.elasticsearch.action", "org.elasticsearch.search", "org.hamcrest" ]
java.io; java.util; org.elasticsearch.action; org.elasticsearch.search; org.hamcrest;
293,310
public AbstractMetric getMetricInstance(String key) { return metrics.get(key); }
AbstractMetric function(String key) { return metrics.get(key); }
/** * Lookup a metric instance * @param key name of the metric * @return the metric instance */
Lookup a metric instance
getMetricInstance
{ "repo_name": "simonzhangsm/WDP", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/util/MetricsCache.java", "license": "gpl-2.0", "size": 5877 }
[ "org.apache.hadoop.metrics2.AbstractMetric" ]
import org.apache.hadoop.metrics2.AbstractMetric;
import org.apache.hadoop.metrics2.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,568,130
public PutIndexTemplateRequest source(byte[] source, XContentType xContentType) { return source(source, 0, source.length, xContentType); }
PutIndexTemplateRequest function(byte[] source, XContentType xContentType) { return source(source, 0, source.length, xContentType); }
/** * The template source definition. */
The template source definition
source
{ "repo_name": "fred84/elasticsearch", "path": "server/src/main/java/org/elasticsearch/action/admin/indices/template/put/PutIndexTemplateRequest.java", "license": "apache-2.0", "size": 19594 }
[ "org.elasticsearch.common.xcontent.XContentType" ]
import org.elasticsearch.common.xcontent.XContentType;
import org.elasticsearch.common.xcontent.*;
[ "org.elasticsearch.common" ]
org.elasticsearch.common;
479,850
@Override public void setExpireDate(final Date expireDate) { this.expireDate = expireDate; }
void function(final Date expireDate) { this.expireDate = expireDate; }
/** * Set a new value for the expireDate property. * * @param expireDate * the expireDate to set */
Set a new value for the expireDate property
setExpireDate
{ "repo_name": "openfurther/further-open-core", "path": "security/security-impl/src/main/java/edu/utah/further/security/impl/domain/UserEntity.java", "license": "apache-2.0", "size": 6606 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
85,666
public Builder<K, V> putAll(Multimap<? extends K, ? extends V> multimap) { for (Entry<? extends K, ? extends Collection<? extends V>> entry : multimap.asMap().entrySet()) { putAll(entry.getKey(), entry.getValue()); } return this; }
Builder<K, V> function(Multimap<? extends K, ? extends V> multimap) { for (Entry<? extends K, ? extends Collection<? extends V>> entry : multimap.asMap().entrySet()) { putAll(entry.getKey(), entry.getValue()); } return this; }
/** * Stores another multimap's entries in the built multimap. The generated * multimap's key and value orderings correspond to the iteration ordering * of the {@code multimap.asMap()} view, with new keys and values following * any existing keys and values. * * @throws NullPointerException...
Stores another multimap's entries in the built multimap. The generated multimap's key and value orderings correspond to the iteration ordering of the multimap.asMap() view, with new keys and values following any existing keys and values
putAll
{ "repo_name": "uschindler/guava", "path": "guava/src/com/google/common/collect/ImmutableMultimap.java", "license": "apache-2.0", "size": 22116 }
[ "java.util.Collection", "java.util.Map" ]
import java.util.Collection; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
565,716
EAttribute getPositionPoint_XPosition();
EAttribute getPositionPoint_XPosition();
/** * Returns the meta object for the attribute '{@link outagePreventionJointarget.PositionPoint#getXPosition <em>XPosition</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>XPosition</em>'. * @see outagePreventionJointarget.PositionPoint#getXPosition()...
Returns the meta object for the attribute '<code>outagePreventionJointarget.PositionPoint#getXPosition XPosition</code>'.
getPositionPoint_XPosition
{ "repo_name": "georghinkel/ttc2017smartGrids", "path": "solutions/ModelJoin/src/main/java/outagePreventionJointarget/OutagePreventionJointargetPackage.java", "license": "mit", "size": 67109 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
823,894
public void ifNull(final Label label) { mv.visitJumpInsn(Opcodes.IFNULL, label); }
void function(final Label label) { mv.visitJumpInsn(Opcodes.IFNULL, label); }
/** * Generates the instruction to jump to the given label if the top stack * value is null. * * @param label * where to jump if the condition is <tt>true</tt>. */
Generates the instruction to jump to the given label if the top stack value is null
ifNull
{ "repo_name": "Fantast/mvel", "path": "src/main/java/org/mvel2/asm/commons/GeneratorAdapter.java", "license": "apache-2.0", "size": 50816 }
[ "org.mvel2.asm.Label", "org.mvel2.asm.Opcodes" ]
import org.mvel2.asm.Label; import org.mvel2.asm.Opcodes;
import org.mvel2.asm.*;
[ "org.mvel2.asm" ]
org.mvel2.asm;
2,360,474
return (InstitutionalProposalDocument) getDocument(); }
return (InstitutionalProposalDocument) getDocument(); }
/** * Convenience method to return an InstitutionalProposalDocument * @return */
Convenience method to return an InstitutionalProposalDocument
getInstitutionalProposalDocument
{ "repo_name": "mukadder/kc", "path": "coeus-impl/src/main/java/org/kuali/kra/institutionalproposal/rules/InstitutionalProposalFinancialRuleEvent.java", "license": "agpl-3.0", "size": 2764 }
[ "org.kuali.kra.institutionalproposal.document.InstitutionalProposalDocument" ]
import org.kuali.kra.institutionalproposal.document.InstitutionalProposalDocument;
import org.kuali.kra.institutionalproposal.document.*;
[ "org.kuali.kra" ]
org.kuali.kra;
1,982,360
public boolean isVisible() { return isVisible; } /* * public boolean removeOperandAndPrecedingConnector(IExpressionOperand * operand) throws Exception { if (iExpressionOperandList.contains(operand)) { * int i = iExpressionOperandList.indexOf(operand); * iE...
boolean function() { return isVisible; } /* * public boolean removeOperandAndPrecedingConnector(IExpressionOperand * operand) throws Exception { if (iExpressionOperandList.contains(operand)) { * int i = iExpressionOperandList.indexOf(operand); * iExpressionOperandList.remove(i); iLogicalConnector.remove(i - 1); } else ...
/** * This method returns whether this Expression is in visiblew or not * * @return true if Expression is visible; false otherwise */
This method returns whether this Expression is in visiblew or not
isVisible
{ "repo_name": "NCIP/metadata-based-query", "path": "software/Query/src/main/java/edu/wustl/common/querysuite/queryobject/impl/Expression.java", "license": "bsd-3-clause", "size": 18745 }
[ "edu.wustl.common.querysuite.queryobject.IExpressionOperand" ]
import edu.wustl.common.querysuite.queryobject.IExpressionOperand;
import edu.wustl.common.querysuite.queryobject.*;
[ "edu.wustl.common" ]
edu.wustl.common;
414,847
List<? extends Project> getProjects();
List<? extends Project> getProjects();
/** * Returns projects configurations which are related to the devfile, when devfile doesn't contain * projects returns empty list. It is optional, devfile may contain 0 or N project configurations. */
Returns projects configurations which are related to the devfile, when devfile doesn't contain projects returns empty list. It is optional, devfile may contain 0 or N project configurations
getProjects
{ "repo_name": "akervern/che", "path": "core/che-core-api-model/src/main/java/org/eclipse/che/api/core/model/workspace/devfile/Devfile.java", "license": "epl-1.0", "size": 1599 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,864,480
public Configuration getConf() { return conf; }
Configuration function() { return conf; }
/** * Returns the Hadoop configuration. * @return the configuration */
Returns the Hadoop configuration
getConf
{ "repo_name": "akirakw/asakusafw", "path": "operation-project/directio/src/test/java/com/asakusafw/operation/tools/directio/DirectIoToolsTestRoot.java", "license": "apache-2.0", "size": 10255 }
[ "org.apache.hadoop.conf.Configuration" ]
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
805,718
public boolean isNativeImplementation() { return false; } private static final AtomicReference<CommandLine> sCommandLine = new AtomicReference<CommandLine>();
boolean function() { return false; } private static final AtomicReference<CommandLine> sCommandLine = new AtomicReference<CommandLine>();
/** * Determine if the command line is bound to the native (JNI) implementation. * @return true if the underlying implementation is delegating to the native command line. */
Determine if the command line is bound to the native (JNI) implementation
isNativeImplementation
{ "repo_name": "Crystalnix/BitPop", "path": "content/public/android/java/src/org/chromium/content/common/CommandLine.java", "license": "bsd-3-clause", "size": 14748 }
[ "java.util.concurrent.atomic.AtomicReference" ]
import java.util.concurrent.atomic.AtomicReference;
import java.util.concurrent.atomic.*;
[ "java.util" ]
java.util;
2,863,973
private void compile() throws QueryException, MappingException { log.trace("compiling query"); try { ParserHelper.parse( new PreprocessingParser(tokenReplacements), queryString, ParserHelper.HQL_SEPARATORS, this ); renderSQL(); } catch (QueryException qe) { qe.setQueryString(quer...
void function() throws QueryException, MappingException { log.trace(STR); try { ParserHelper.parse( new PreprocessingParser(tokenReplacements), queryString, ParserHelper.HQL_SEPARATORS, this ); renderSQL(); } catch (QueryException qe) { qe.setQueryString(queryString); throw qe; } catch (MappingException me) { throw me;...
/** * Compile the query (generate the SQL). */
Compile the query (generate the SQL)
compile
{ "repo_name": "simeshev/parabuild-ci", "path": "3rdparty/hibernate218/src/net/sf/hibernate/hql/QueryTranslator.java", "license": "lgpl-3.0", "size": 32894 }
[ "net.sf.hibernate.MappingException", "net.sf.hibernate.QueryException" ]
import net.sf.hibernate.MappingException; import net.sf.hibernate.QueryException;
import net.sf.hibernate.*;
[ "net.sf.hibernate" ]
net.sf.hibernate;
129,729
public void addLocalLink(String advertisingRouter, Ip4Address linkData, Ip4Address linkSrc, Ip4Address linkDest, boolean opaqueEnabled, boolean linkSrcIdNotRouterId) { String linkKey = "link:"; LinkInformation linkInformation = new LinkInformationImpl(); linkInfo...
void function(String advertisingRouter, Ip4Address linkData, Ip4Address linkSrc, Ip4Address linkDest, boolean opaqueEnabled, boolean linkSrcIdNotRouterId) { String linkKey = "link:"; LinkInformation linkInformation = new LinkInformationImpl(); linkInformation.setLinkId(advertisingRouter); linkInformation.setLinkSourceI...
/** * Adds link information to LinkInformationMap. * * @param advertisingRouter advertising router * @param linkData link data address * @param linkSrc link source address * @param linkDest link destination address * @param opaqueEnabled ...
Adds link information to LinkInformationMap
addLocalLink
{ "repo_name": "donNewtonAlpha/onos", "path": "protocols/ospf/ctl/src/main/java/org/onosproject/ospf/controller/impl/TopologyForDeviceAndLinkImpl.java", "license": "apache-2.0", "size": 29510 }
[ "org.onlab.packet.Ip4Address", "org.onosproject.ospf.controller.LinkInformation" ]
import org.onlab.packet.Ip4Address; import org.onosproject.ospf.controller.LinkInformation;
import org.onlab.packet.*; import org.onosproject.ospf.controller.*;
[ "org.onlab.packet", "org.onosproject.ospf" ]
org.onlab.packet; org.onosproject.ospf;
1,237,565
private void updateServerBucketProfile() { int bucketId = this.getBucket().getId(); Set<ServerBucketProfile> serverProfiles = newSetFromMap(new HashMap<ServerBucketProfile, Boolean>()); for (Profile p : this.profiles) { if (p instanceof ServerBucketProfile) { serverProfiles.add((Serv...
void function() { int bucketId = this.getBucket().getId(); Set<ServerBucketProfile> serverProfiles = newSetFromMap(new HashMap<ServerBucketProfile, Boolean>()); for (Profile p : this.profiles) { if (p instanceof ServerBucketProfile) { serverProfiles.add((ServerBucketProfile) p); } } this.regionAdvisor.setClientBucketPr...
/** * repopulates the RegionAdvisor's location information for this bucket */
repopulates the RegionAdvisor's location information for this bucket
updateServerBucketProfile
{ "repo_name": "deepakddixit/incubator-geode", "path": "geode-core/src/main/java/org/apache/geode/internal/cache/BucketAdvisor.java", "license": "apache-2.0", "size": 100306 }
[ "java.util.HashMap", "java.util.Set" ]
import java.util.HashMap; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,062,020
private static void installLinuxPRNGSecureRandom() throws SecurityException { if (Build.VERSION.SDK_INT > VERSION_CODE_JELLY_BEAN_MR2) { // No need to apply the fix return; } // Install a Linux PRNG-based SecureRandom implementation as the // defa...
static void function() throws SecurityException { if (Build.VERSION.SDK_INT > VERSION_CODE_JELLY_BEAN_MR2) { return; } Provider[] secureRandomProviders = Security.getProviders(STR); if ((secureRandomProviders == null) (secureRandomProviders.length < 1) (!LinuxPRNGSecureRandomProvider.class.equals( secureRandomProviders...
/** * Installs a Linux PRNG-backed {@code SecureRandom} implementation as the * default. Does nothing if the implementation is already the default or if * there is not need to install the implementation. * * @throws SecurityException if the fix is needed but could not be applied. */
Installs a Linux PRNG-backed SecureRandom implementation as the default. Does nothing if the implementation is already the default or if there is not need to install the implementation
installLinuxPRNGSecureRandom
{ "repo_name": "smarek/httpclient-android", "path": "extras/PRNGFixes.java", "license": "apache-2.0", "size": 12457 }
[ "android.os.Build", "java.io.DataInputStream", "java.io.File", "java.io.OutputStream", "java.security.NoSuchAlgorithmException", "java.security.Provider", "java.security.SecureRandom", "java.security.SecureRandomSpi", "java.security.Security" ]
import android.os.Build; import java.io.DataInputStream; import java.io.File; import java.io.OutputStream; import java.security.NoSuchAlgorithmException; import java.security.Provider; import java.security.SecureRandom; import java.security.SecureRandomSpi; import java.security.Security;
import android.os.*; import java.io.*; import java.security.*;
[ "android.os", "java.io", "java.security" ]
android.os; java.io; java.security;
2,223,691
private static boolean trimProcQuotas(ZooKeeper zk, String path) throws KeeperException, IOException, InterruptedException { if (Quotas.quotaZookeeper.equals(path)) { return true; } List<String> children = zk.getChildren(path, false); if (children.size() == 0)...
static boolean function(ZooKeeper zk, String path) throws KeeperException, IOException, InterruptedException { if (Quotas.quotaZookeeper.equals(path)) { return true; } List<String> children = zk.getChildren(path, false); if (children.size() == 0) { zk.delete(path, -1); String parent = path.substring(0, path.lastIndexOf...
/** * trim the quota tree to recover unwanted tree elements * in the quota's tree * @param zk the zookeeper client * @param path the path to start from and go up and see if their * is any unwanted parent in the path. * @return true if sucessful * @throws KeeperException * @throws...
trim the quota tree to recover unwanted tree elements in the quota's tree
trimProcQuotas
{ "repo_name": "williamsbdev/zookeeper", "path": "src/java/main/org/apache/zookeeper/ZooKeeperMain.java", "license": "apache-2.0", "size": 25668 }
[ "java.io.IOException", "java.util.List" ]
import java.io.IOException; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
551,171
public boolean sendNotificationIfRequired(final AuftragDO auftrag, final OperationType operationType, final String requestUrl) { if (configurationService.isSendMailConfigured() == false) { return false; } final PFUserDO contactPerson = auftrag.getContactPerson(); if (contactPerson == nul...
boolean function(final AuftragDO auftrag, final OperationType operationType, final String requestUrl) { if (configurationService.isSendMailConfigured() == false) { return false; } final PFUserDO contactPerson = auftrag.getContactPerson(); if (contactPerson == null) { return false; } if (hasAccess(contactPerson, auftrag...
/** * Sends an e-mail to the projekt manager if exists and is not equals to the logged in user. * * @param auftrag * @param operationType * @return */
Sends an e-mail to the projekt manager if exists and is not equals to the logged in user
sendNotificationIfRequired
{ "repo_name": "FlowsenAusMonotown/projectforge", "path": "projectforge-business/src/main/java/org/projectforge/business/fibu/AuftragDao.java", "license": "gpl-3.0", "size": 28310 }
[ "java.util.ArrayList", "java.util.HashMap", "java.util.List", "java.util.Map", "org.projectforge.framework.access.OperationType", "org.projectforge.framework.persistence.history.DisplayHistoryEntry", "org.projectforge.framework.persistence.user.entities.PFUserDO", "org.projectforge.mail.Mail" ]
import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.projectforge.framework.access.OperationType; import org.projectforge.framework.persistence.history.DisplayHistoryEntry; import org.projectforge.framework.persistence.user.entities.PFUserDO; import org.projectfo...
import java.util.*; import org.projectforge.framework.access.*; import org.projectforge.framework.persistence.history.*; import org.projectforge.framework.persistence.user.entities.*; import org.projectforge.mail.*;
[ "java.util", "org.projectforge.framework", "org.projectforge.mail" ]
java.util; org.projectforge.framework; org.projectforge.mail;
1,575,879
public void renewed(LeasedResource resource) { synchronized(list) { ServiceResource sr = (ServiceResource)resource; int index = list.indexOf(sr); if(index != -1) list.set(index, (ServiceResource)resource); } }
void function(LeasedResource resource) { synchronized(list) { ServiceResource sr = (ServiceResource)resource; int index = list.indexOf(sr); if(index != -1) list.set(index, (ServiceResource)resource); } }
/** * Notifies the manager of a lease being renewed. * * @param resource The resource associated with the new Lease. */
Notifies the manager of a lease being renewed
renewed
{ "repo_name": "khartig/assimilator", "path": "rio-lib/src/main/java/org/rioproject/resources/servicecore/LeasedListManager.java", "license": "apache-2.0", "size": 5898 }
[ "com.sun.jini.landlord.LeasedResource" ]
import com.sun.jini.landlord.LeasedResource;
import com.sun.jini.landlord.*;
[ "com.sun.jini" ]
com.sun.jini;
979,300
public Font getTitleFont() { try { if( linkedtd != null ) { Fontx fx = (Fontx) Chart.findRec( linkedtd.chartArr, Fontx.class ); return getParentChart().getWorkBook().getFont( fx.getIfnt() ); } } catch( Exception e ) { } return null; }
Font function() { try { if( linkedtd != null ) { Fontx fx = (Fontx) Chart.findRec( linkedtd.chartArr, Fontx.class ); return getParentChart().getWorkBook().getFont( fx.getIfnt() ); } } catch( Exception e ) { } return null; }
/** * return the Font object associated with the Axis Title, or null if none */
return the Font object associated with the Axis Title, or null if none
getTitleFont
{ "repo_name": "Maxels88/openxls", "path": "src/main/java/org/openxls/formats/XLS/charts/Axis.java", "license": "gpl-3.0", "size": 92982 }
[ "org.openxls.formats.XLS" ]
import org.openxls.formats.XLS;
import org.openxls.formats.*;
[ "org.openxls.formats" ]
org.openxls.formats;
786,014
private List<String> getUriParameters(final JsonObject requestBody) { LOG.trace("Start FlowListEntriesResource#getUriParameters()"); final List<String> uriParameters = new ArrayList<String>(); uriParameters.add(flName); if (requestBody != null && requestBody.has(VtnServiceJsonConsts.INDEX)) { uriParamete...
List<String> function(final JsonObject requestBody) { LOG.trace(STR); final List<String> uriParameters = new ArrayList<String>(); uriParameters.add(flName); if (requestBody != null && requestBody.has(VtnServiceJsonConsts.INDEX)) { uriParameters.add(requestBody.get(VtnServiceJsonConsts.INDEX) .getAsString()); } LOG.trac...
/** * Add URI parameters to list * * @return */
Add URI parameters to list
getUriParameters
{ "repo_name": "opendaylight/vtn", "path": "coordinator/java/vtn-javaapi/src/org/opendaylight/vtn/javaapi/resources/logical/FlowListEntriesResource.java", "license": "epl-1.0", "size": 8271 }
[ "com.google.gson.JsonObject", "java.util.ArrayList", "java.util.List", "org.opendaylight.vtn.javaapi.constants.VtnServiceJsonConsts" ]
import com.google.gson.JsonObject; import java.util.ArrayList; import java.util.List; import org.opendaylight.vtn.javaapi.constants.VtnServiceJsonConsts;
import com.google.gson.*; import java.util.*; import org.opendaylight.vtn.javaapi.constants.*;
[ "com.google.gson", "java.util", "org.opendaylight.vtn" ]
com.google.gson; java.util; org.opendaylight.vtn;
1,908,071
private void addProperties(SetProperties db, Element element, long dbId) { element .getProperties() .forEach((key, value) -> { if (value != null) { int encodedKey = db.encode(key); if (value instanceof Integer) { db.set(dbId, encodedKey, (int) value...
void function(SetProperties db, Element element, long dbId) { element .getProperties() .forEach((key, value) -> { if (value != null) { int encodedKey = db.encode(key); if (value instanceof Integer) { db.set(dbId, encodedKey, (int) value); } else if (value instanceof Long) { db.set(dbId, encodedKey, (long) value); } els...
/** * Add GDL properties to the database. * * @param db database to store properties * @param element vertex, edge or graph * @param dbId the element's database id */
Add GDL properties to the database
addProperties
{ "repo_name": "p3et/dmgm", "path": "src/main/java/org/biiig/dmgm/impl/db/GdlLoader.java", "license": "gpl-3.0", "size": 4793 }
[ "java.math.BigDecimal", "org.biiig.dmgm.api.db.SetProperties", "org.s1ck.gdl.model.Element" ]
import java.math.BigDecimal; import org.biiig.dmgm.api.db.SetProperties; import org.s1ck.gdl.model.Element;
import java.math.*; import org.biiig.dmgm.api.db.*; import org.s1ck.gdl.model.*;
[ "java.math", "org.biiig.dmgm", "org.s1ck.gdl" ]
java.math; org.biiig.dmgm; org.s1ck.gdl;
317,190
public void signUpUser(View view) { EditText etUsername = (EditText) findViewById(R.id.registerUsername); EditText etCity = (EditText) findViewById(R.id.registerCity); EditText etPhone = (EditText) findViewById(R.id.registerPhone); EditText etEmail = (EditText) findViewById(R.id.regi...
void function(View view) { EditText etUsername = (EditText) findViewById(R.id.registerUsername); EditText etCity = (EditText) findViewById(R.id.registerCity); EditText etPhone = (EditText) findViewById(R.id.registerPhone); EditText etEmail = (EditText) findViewById(R.id.registerEmail); UserRegistrationController urc = ...
/** * Called when user presses Sign Up button. * <p> * Checks to see if user-entered fields match required format. Checks to make sure username * is not already taken. If not, it creates a new user account and opens the user's inventory. * * @param view view that is clicked */
Called when user presses Sign Up button. Checks to see if user-entered fields match required format. Checks to make sure username is not already taken. If not, it creates a new user account and opens the user's inventory
signUpUser
{ "repo_name": "CMPUT301F15T08/SMACCR", "path": "src/GiftCarder/app/src/main/java/ca/ualberta/smaccr/giftcarder/RegisterActivity.java", "license": "apache-2.0", "size": 4104 }
[ "android.content.Intent", "android.view.View", "android.widget.EditText", "android.widget.Toast" ]
import android.content.Intent; import android.view.View; import android.widget.EditText; import android.widget.Toast;
import android.content.*; import android.view.*; import android.widget.*;
[ "android.content", "android.view", "android.widget" ]
android.content; android.view; android.widget;
2,478,504
public EmbeddedTestServerRule getEmbeddedTestServerRule() { return mTestServerRule; }
EmbeddedTestServerRule function() { return mTestServerRule; }
/** * Gets the underlying EmbeddedTestServerRule for getTestServer(). */
Gets the underlying EmbeddedTestServerRule for getTestServer()
getEmbeddedTestServerRule
{ "repo_name": "ric2b/Vivaldi-browser", "path": "chromium/chrome/test/android/javatests/src/org/chromium/chrome/test/ChromeActivityTestRule.java", "license": "bsd-3-clause", "size": 22054 }
[ "org.chromium.net.test.EmbeddedTestServerRule" ]
import org.chromium.net.test.EmbeddedTestServerRule;
import org.chromium.net.test.*;
[ "org.chromium.net" ]
org.chromium.net;
2,166,793
@Override protected void addGlobalActions(IMenuManager menuManager) { menuManager.insertAfter("additions-end", new Separator("ui-actions")); menuManager.insertAfter("ui-actions", showPropertiesViewAction); refreshViewerAction.setEnabled(refreshViewerAction.isEnabled()); menuManager.insertAfter("ui-...
void function(IMenuManager menuManager) { menuManager.insertAfter(STR, new Separator(STR)); menuManager.insertAfter(STR, showPropertiesViewAction); refreshViewerAction.setEnabled(refreshViewerAction.isEnabled()); menuManager.insertAfter(STR, refreshViewerAction); super.addGlobalActions(menuManager); }
/** * This inserts global actions before the "additions-end" separator. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This inserts global actions before the "additions-end" separator.
addGlobalActions
{ "repo_name": "SENSIDL-PROJECT/SensIDL", "path": "bundles/de.fzi.sensidl.design.editor/src-gen/de/fzi/sensidl/design/sensidl/presentation/sensidlActionBarContributor.java", "license": "epl-1.0", "size": 14482 }
[ "org.eclipse.jface.action.IMenuManager", "org.eclipse.jface.action.Separator" ]
import org.eclipse.jface.action.IMenuManager; import org.eclipse.jface.action.Separator;
import org.eclipse.jface.action.*;
[ "org.eclipse.jface" ]
org.eclipse.jface;
2,261,162
@Test public void test_getClaimNumber() { String value = "new_value"; instance.setClaimNumber(value); assertEquals("'getClaimNumber' should be correct.", value, instance.getClaimNumber()); }
void function() { String value = STR; instance.setClaimNumber(value); assertEquals(STR, value, instance.getClaimNumber()); }
/** * <p> * Accuracy test for the method <code>getClaimNumber()</code>.<br> * The value should be properly retrieved. * </p> */
Accuracy test for the method <code>getClaimNumber()</code>. The value should be properly retrieved.
test_getClaimNumber
{ "repo_name": "NASA-Tournament-Lab/CoECI-OPM-Service-Credit-Redeposit-Deposit-Application", "path": "Code/Data_Migration/src/java/tests/gov/opm/scrd/entities/application/BatchDailyPaymentsUnitTests.java", "license": "apache-2.0", "size": 19516 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,694,521
private IOStatisticsStore localIOStatistics() { return super.getIOStatistics(); }
IOStatisticsStore function() { return super.getIOStatistics(); }
/** * Get the inner class's IO Statistics. This is needed to avoid findbugs warnings about * ambiguity. * * @return the Input Stream's statistics. */
Get the inner class's IO Statistics. This is needed to avoid findbugs warnings about ambiguity
localIOStatistics
{ "repo_name": "GoogleCloudDataproc/hadoop-connectors", "path": "gcs/src/main/java/com/google/cloud/hadoop/fs/gcs/GhfsInstrumentation.java", "license": "apache-2.0", "size": 31961 }
[ "org.apache.hadoop.fs.statistics.impl.IOStatisticsStore" ]
import org.apache.hadoop.fs.statistics.impl.IOStatisticsStore;
import org.apache.hadoop.fs.statistics.impl.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,468,459
public final ResourceReference getResourceReference() { return resourceReference; }
final ResourceReference function() { return resourceReference; }
/** * return the resource * * @return resource or <code>null</code> if there is none */
return the resource
getResourceReference
{ "repo_name": "Servoy/wicket", "path": "wicket/src/main/java/org/apache/wicket/markup/html/image/resource/LocalizedImageResource.java", "license": "apache-2.0", "size": 14478 }
[ "org.apache.wicket.ResourceReference" ]
import org.apache.wicket.ResourceReference;
import org.apache.wicket.*;
[ "org.apache.wicket" ]
org.apache.wicket;
1,108,972
public UserAdapter entity(int userId) { Entity entity = rootRepository.findByUserId(userId); return new UserAdapter(userId, entity); } static enum InternalEntityType implements KeyNameAdapter { COMMON('C', "Common"); private char value; private String desc; private InternalEntityType(ch...
UserAdapter function(int userId) { Entity entity = rootRepository.findByUserId(userId); return new UserAdapter(userId, entity); } static enum InternalEntityType implements KeyNameAdapter { COMMON('C', STR); private char value; private String desc; private InternalEntityType(char value, String desc) { this.value = value...
/** * Find entity by user. * * @param userId */
Find entity by user
entity
{ "repo_name": "marianemedeiros/helianto-seed", "path": "src/main/java/org/helianto/network/service/RootQueryService.java", "license": "apache-2.0", "size": 3476 }
[ "org.helianto.core.domain.Entity", "org.helianto.core.internal.KeyNameAdapter", "org.helianto.security.internal.UserAdapter" ]
import org.helianto.core.domain.Entity; import org.helianto.core.internal.KeyNameAdapter; import org.helianto.security.internal.UserAdapter;
import org.helianto.core.domain.*; import org.helianto.core.internal.*; import org.helianto.security.internal.*;
[ "org.helianto.core", "org.helianto.security" ]
org.helianto.core; org.helianto.security;
1,188,107
public VirtualNetworkInner updateTags(String resourceGroupName, String virtualNetworkName, Map<String, String> tags) { return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkName, tags).toBlocking().last().body(); }
VirtualNetworkInner function(String resourceGroupName, String virtualNetworkName, Map<String, String> tags) { return updateTagsWithServiceResponseAsync(resourceGroupName, virtualNetworkName, tags).toBlocking().last().body(); }
/** * Updates a virtual network tags. * * @param resourceGroupName The name of the resource group. * @param virtualNetworkName The name of the virtual network. * @param tags Resource tags. * @throws IllegalArgumentException thrown if parameters fail the validation * @throws CloudExcep...
Updates a virtual network tags
updateTags
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2018_04_01/src/main/java/com/microsoft/azure/management/network/v2018_04_01/implementation/VirtualNetworksInner.java", "license": "mit", "size": 103125 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,993,619
private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); this.paint = SerialUtilities.readPaint(stream); this.basePaint = SerialUtilities.readPaint(stream); this.fillPaint = SerialUtilities.readPaint(str...
void function(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); this.paint = SerialUtilities.readPaint(stream); this.basePaint = SerialUtilities.readPaint(stream); this.fillPaint = SerialUtilities.readPaint(stream); this.baseFillPaint = SerialUtilities.readPaint(stream);...
/** * Provides serialization support. * * @param stream the input stream. * * @throws IOException if there is an I/O error. * @throws ClassNotFoundException if there is a classpath problem. */
Provides serialization support
readObject
{ "repo_name": "sternze/CurrentTopics_JFreeChart", "path": "source/org/jfree/chart/renderer/AbstractRenderer.java", "license": "lgpl-2.1", "size": 142562 }
[ "java.awt.Font", "java.awt.Paint", "java.awt.Shape", "java.awt.Stroke", "java.io.IOException", "java.io.ObjectInputStream", "javax.swing.event.EventListenerList", "org.jfree.chart.labels.ItemLabelPosition", "org.jfree.io.SerialUtilities" ]
import java.awt.Font; import java.awt.Paint; import java.awt.Shape; import java.awt.Stroke; import java.io.IOException; import java.io.ObjectInputStream; import javax.swing.event.EventListenerList; import org.jfree.chart.labels.ItemLabelPosition; import org.jfree.io.SerialUtilities;
import java.awt.*; import java.io.*; import javax.swing.event.*; import org.jfree.chart.labels.*; import org.jfree.io.*;
[ "java.awt", "java.io", "javax.swing", "org.jfree.chart", "org.jfree.io" ]
java.awt; java.io; javax.swing; org.jfree.chart; org.jfree.io;
1,195,009
public void subscribe( String channel, Callback callback ) { HashMap<String, Object> args = new HashMap<String, Object>(2); args.put("channel", channel); args.put("callback", callback); subscribe( args ); }
void function( String channel, Callback callback ) { HashMap<String, Object> args = new HashMap<String, Object>(2); args.put(STR, channel); args.put(STR, callback); subscribe( args ); }
/** * Subscribe * * Listen for a message on a channel. * * @param String channel name. * @param Callback function callback. */
Subscribe Listen for a message on a channel
subscribe
{ "repo_name": "jamesward/pubnub-api", "path": "java/src/main/java/pubnub/Pubnub.java", "license": "mit", "size": 22366 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
2,445,715
public int getHeldItemSlot(final Hand hand) { if (hand.equals(Hand.MAIN_HAND)) { return mainItem; } return offhandItem; }
int function(final Hand hand) { if (hand.equals(Hand.MAIN_HAND)) { return mainItem; } return offhandItem; }
/** * Gets slot that hold item that is being held by citizen. * * @param hand the hand it is held in. * @return Slot index of held item */
Gets slot that hold item that is being held by citizen
getHeldItemSlot
{ "repo_name": "Minecolonies/minecolonies", "path": "src/api/java/com/minecolonies/api/inventory/InventoryCitizen.java", "license": "gpl-3.0", "size": 14272 }
[ "net.minecraft.util.Hand" ]
import net.minecraft.util.Hand;
import net.minecraft.util.*;
[ "net.minecraft.util" ]
net.minecraft.util;
784,004
public String doInTransform(String comparableValue, List<String> values) { StringBuilder builder = new StringBuilder(); builder .append(comparableValue) .append(" IN ( "); String separator = ""; for (String val : values) { if (val != null) { builder.append(separator).append(val); }...
String function(String comparableValue, List<String> values) { StringBuilder builder = new StringBuilder(); builder .append(comparableValue) .append(STR); String separator = STR, STR)"); return builder.toString(); }
/** * Produce SQL that will compare the first value to all the other values using * the IN operator. * * @param comparableValue comparableValue * @param values values * <p style="color: #F90;">Support DBvolution at * <a href="http://patreon.com/dbvolution" target=new>Patreon</a></p> * * @return ...
Produce SQL that will compare the first value to all the other values using the IN operator
doInTransform
{ "repo_name": "gregorydgraham/DBvolution", "path": "src/main/java/nz/co/gregs/dbvolution/databases/definitions/DBDefinition.java", "license": "apache-2.0", "size": 191012 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,295,333
WrapperMock.createInstance(); Settings.messagesLanguage = "en"; URL url = getClass().getClassLoader().getResource(YML_TEST_FILE); if (url == null) { throw new RuntimeException("File '" + YML_TEST_FILE + "' could not be loaded"); } Settings.messageFile = new File(url...
WrapperMock.createInstance(); Settings.messagesLanguage = "en"; URL url = getClass().getClassLoader().getResource(YML_TEST_FILE); if (url == null) { throw new RuntimeException(STR + YML_TEST_FILE + STR); } Settings.messageFile = new File(url.getFile()); Settings.messagesLanguage = "en"; messages = Messages.getInstance(...
/** * Loads the messages in the file {@code messages_test.yml} in the test resources folder. * The file does not contain all messages defined in {@link MessageKey} and its contents * reflect various test cases -- not what the keys stand for. */
Loads the messages in the file messages_test.yml in the test resources folder. The file does not contain all messages defined in <code>MessageKey</code> and its contents reflect various test cases -- not what the keys stand for
setUpMessages
{ "repo_name": "sgdc3/AuthMeReloaded", "path": "src/test/java/fr/xephi/authme/output/MessagesIntegrationTest.java", "license": "gpl-3.0", "size": 4079 }
[ "fr.xephi.authme.settings.Settings", "fr.xephi.authme.util.WrapperMock", "java.io.File" ]
import fr.xephi.authme.settings.Settings; import fr.xephi.authme.util.WrapperMock; import java.io.File;
import fr.xephi.authme.settings.*; import fr.xephi.authme.util.*; import java.io.*;
[ "fr.xephi.authme", "java.io" ]
fr.xephi.authme; java.io;
118,687
private Transformer getEmptyTransformer() throws PortalException { Transformer xfrmr = null; try { xfrmr = TransformerFactory.newInstance().newTransformer(); } catch (Exception e) { throw new PortalException("Unable to instantiate transf...
Transformer function() throws PortalException { Transformer xfrmr = null; try { xfrmr = TransformerFactory.newInstance().newTransformer(); } catch (Exception e) { throw new PortalException(STR, e); } return xfrmr; }
/** * Instantiates an empty transformer to generate SAX events for the layout. * * @return Transformer * @throws PortalException */
Instantiates an empty transformer to generate SAX events for the layout
getEmptyTransformer
{ "repo_name": "MichaelVose2/uPortal", "path": "uportal-war/src/main/java/org/apereo/portal/layout/dlm/DistributedLayoutManager.java", "license": "apache-2.0", "size": 63162 }
[ "javax.xml.transform.Transformer", "javax.xml.transform.TransformerFactory", "org.apereo.portal.PortalException" ]
import javax.xml.transform.Transformer; import javax.xml.transform.TransformerFactory; import org.apereo.portal.PortalException;
import javax.xml.transform.*; import org.apereo.portal.*;
[ "javax.xml", "org.apereo.portal" ]
javax.xml; org.apereo.portal;
2,460,472
public void setKind(@NonNull final SymbolKind kind) { this.kind = Preconditions.checkNotNull(kind, "kind"); }
void function(@NonNull final SymbolKind kind) { this.kind = Preconditions.checkNotNull(kind, "kind"); }
/** * The kind of this symbol. */
The kind of this symbol
setKind
{ "repo_name": "smarr/SOMns-vscode", "path": "server/org.eclipse.lsp4j-gen/org/eclipse/lsp4j/DocumentSymbol.java", "license": "mit", "size": 9490 }
[ "org.eclipse.lsp4j.SymbolKind", "org.eclipse.lsp4j.jsonrpc.validation.NonNull", "org.eclipse.lsp4j.util.Preconditions" ]
import org.eclipse.lsp4j.SymbolKind; import org.eclipse.lsp4j.jsonrpc.validation.NonNull; import org.eclipse.lsp4j.util.Preconditions;
import org.eclipse.lsp4j.*; import org.eclipse.lsp4j.jsonrpc.validation.*; import org.eclipse.lsp4j.util.*;
[ "org.eclipse.lsp4j" ]
org.eclipse.lsp4j;
443,391
private RequestHandlerResponse download(HttpServletRequest request) throws SQLException, InvalidFormException, InvalidParameterException, SessionOutOfTimeException { Long[] formIDs; StringBuffer export = null; ProtocolSummary[] protocols = null; ProtocolSearc...
RequestHandlerResponse function(HttpServletRequest request) throws SQLException, InvalidFormException, InvalidParameterException, SessionOutOfTimeException { Long[] formIDs; StringBuffer export = null; ProtocolSummary[] protocols = null; ProtocolSearcher searcher = null; DBconnection conn = null; DBWriteManager connect...
/** * Collect information for each selected protocol and create tab-delimited * export string for download * @param request -- request from JSP * @return response -- JSP page to be posted on the web */
Collect information for each selected protocol and create tab-delimited export string for download
download
{ "repo_name": "tair/tairwebapp", "path": "src/org/tair/search/ProtocolSearchHandler.java", "license": "gpl-3.0", "size": 13911 }
[ "java.sql.SQLException", "java.util.ArrayList", "java.util.List", "javax.servlet.http.HttpServletRequest", "org.tair.handler.RequestHandlerResponse", "org.tair.tfc.DBWriteManager", "org.tair.tfc.DBconnection", "org.tair.utilities.InvalidFormException", "org.tair.utilities.InvalidParameterException",...
import java.sql.SQLException; import java.util.ArrayList; import java.util.List; import javax.servlet.http.HttpServletRequest; import org.tair.handler.RequestHandlerResponse; import org.tair.tfc.DBWriteManager; import org.tair.tfc.DBconnection; import org.tair.utilities.InvalidFormException; import org.tair.utilities.I...
import java.sql.*; import java.util.*; import javax.servlet.http.*; import org.tair.handler.*; import org.tair.tfc.*; import org.tair.utilities.*;
[ "java.sql", "java.util", "javax.servlet", "org.tair.handler", "org.tair.tfc", "org.tair.utilities" ]
java.sql; java.util; javax.servlet; org.tair.handler; org.tair.tfc; org.tair.utilities;
159,566
public static ApprovalDialog getConfirmationDialog(Dialog owner) { return getConfirmationDialog(owner, ModalityType.DOCUMENT_MODAL); }
static ApprovalDialog function(Dialog owner) { return getConfirmationDialog(owner, ModalityType.DOCUMENT_MODAL); }
/** * Returns a basic (modal) confirmation dialog (yes/no/cancel). * * @param owner the owner of the dialog */
Returns a basic (modal) confirmation dialog (yes/no/cancel)
getConfirmationDialog
{ "repo_name": "waikato-datamining/adams-base", "path": "adams-core/src/main/java/adams/gui/dialog/ApprovalDialog.java", "license": "gpl-3.0", "size": 15461 }
[ "java.awt.Dialog" ]
import java.awt.Dialog;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,395,051
public CountDownLatch createAnonymousShopperAuthTicketAsync(String responseFields, AsyncCallback<com.mozu.api.contracts.customer.CustomerAuthTicket> callback) throws Exception { MozuClient<com.mozu.api.contracts.customer.CustomerAuthTicket> client = com.mozu.api.clients.commerce.customer.CustomerAuthTicketClient....
CountDownLatch function(String responseFields, AsyncCallback<com.mozu.api.contracts.customer.CustomerAuthTicket> callback) throws Exception { MozuClient<com.mozu.api.contracts.customer.CustomerAuthTicket> client = com.mozu.api.clients.commerce.customer.CustomerAuthTicketClient.createAnonymousShopperAuthTicketClient( re...
/** * Creates an authentication ticket for an anonymous shopper user. * <p><pre><code> * CustomerAuthTicket customerauthticket = new CustomerAuthTicket(); * CountDownLatch latch = customerauthticket.createAnonymousShopperAuthTicket( responseFields, callback ); * latch.await() * </code></pre></p> * @param r...
Creates an authentication ticket for an anonymous shopper user. <code><code> CustomerAuthTicket customerauthticket = new CustomerAuthTicket(); CountDownLatch latch = customerauthticket.createAnonymousShopperAuthTicket( responseFields, callback ); latch.await() * </code></code>
createAnonymousShopperAuthTicketAsync
{ "repo_name": "bhewett/mozu-java", "path": "mozu-javaasync-core/src/main/java/com/mozu/api/resources/commerce/customer/CustomerAuthTicketResource.java", "license": "mit", "size": 13490 }
[ "com.mozu.api.AsyncCallback", "com.mozu.api.MozuClient", "java.util.concurrent.CountDownLatch" ]
import com.mozu.api.AsyncCallback; import com.mozu.api.MozuClient; import java.util.concurrent.CountDownLatch;
import com.mozu.api.*; import java.util.concurrent.*;
[ "com.mozu.api", "java.util" ]
com.mozu.api; java.util;
2,135,622
public static void addAccessMode(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdfreactor.schema.rdfs.Class value) { Base.add(model, instanceResource, ACCESSMODE, value); }
static void function(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, org.ontoware.rdfreactor.schema.rdfs.Class value) { Base.add(model, instanceResource, ACCESSMODE, value); }
/** * Adds a value to property AccessMode from an instance of * org.ontoware.rdfreactor.schema.rdfs.Class * * @param model an RDF2Go model * @param resource an RDF2Go resource [Generated from RDFReactor template * rule #add3static] */
Adds a value to property AccessMode from an instance of org.ontoware.rdfreactor.schema.rdfs.Class
addAccessMode
{ "repo_name": "m0ep/master-thesis", "path": "source/apis/rdf2go/rdf2go-w3-wacl/src/main/java/org/w3/ns/auth/acl/Authorization.java", "license": "mit", "size": 78044 }
[ "org.ontoware.rdf2go.model.Model", "org.ontoware.rdf2go.model.node.Resource", "org.ontoware.rdfreactor.runtime.Base" ]
import org.ontoware.rdf2go.model.Model; import org.ontoware.rdf2go.model.node.Resource; import org.ontoware.rdfreactor.runtime.Base;
import org.ontoware.rdf2go.model.*; import org.ontoware.rdf2go.model.node.*; import org.ontoware.rdfreactor.runtime.*;
[ "org.ontoware.rdf2go", "org.ontoware.rdfreactor" ]
org.ontoware.rdf2go; org.ontoware.rdfreactor;
675,087
public static java.util.List extractSch_SessionList(ims.domain.ILightweightDomainFactory domainFactory, ims.scheduling.vo.SessionManagementVoCollection voCollection) { return extractSch_SessionList(domainFactory, voCollection, null, new HashMap()); }
static java.util.List function(ims.domain.ILightweightDomainFactory domainFactory, ims.scheduling.vo.SessionManagementVoCollection voCollection) { return extractSch_SessionList(domainFactory, voCollection, null, new HashMap()); }
/** * Create the ims.scheduling.domain.objects.Sch_Session list from the value object collection. * @param domainFactory - used to create existing (persistent) domain objects. * @param voCollection - the collection of value objects */
Create the ims.scheduling.domain.objects.Sch_Session list from the value object collection
extractSch_SessionList
{ "repo_name": "FreudianNM/openMAXIMS", "path": "Source Library/openmaxims_workspace/ValueObjects/src/ims/scheduling/vo/domain/SessionManagementVoAssembler.java", "license": "agpl-3.0", "size": 42277 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
2,562,616
@Override public synchronized void updateAsciiStream(int columnIndex, java.io.InputStream x, int length) throws SQLException { if (!this.onInsertRow) { if (!this.doingUpdates) { this.doingUpdates = true; syncUpdate(); } this.updater.se...
synchronized void function(int columnIndex, java.io.InputStream x, int length) throws SQLException { if (!this.onInsertRow) { if (!this.doingUpdates) { this.doingUpdates = true; syncUpdate(); } this.updater.setAsciiStream(columnIndex, x, length); } else { this.inserter.setAsciiStream(columnIndex, x, length); this.thisR...
/** * JDBC 2.0 Update a column with an ascii stream value. The updateXXX() * methods are used to update column values in the current row, or the * insert row. The updateXXX() methods do not update the underlying * database, instead the updateRow() or insertRow() methods are called to * update t...
JDBC 2.0 Update a column with an ascii stream value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database
updateAsciiStream
{ "repo_name": "slockhart/sql-app", "path": "mysql-connector-java-5.1.34/src/com/mysql/jdbc/UpdatableResultSet.java", "license": "gpl-2.0", "size": 93047 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
2,284,235
public void commit(Xid xid, boolean onePhase) throws XAException { boolean logFiner = log.isLoggable(Level.FINER); try { int endFlags = _endFlags; _endFlags = -1; if (endFlags != -1 && _isXATransaction) { boolean isValid = false; try { endResourc...
void function(Xid xid, boolean onePhase) throws XAException { boolean logFiner = log.isLoggable(Level.FINER); try { int endFlags = _endFlags; _endFlags = -1; if (endFlags != -1 && _isXATransaction) { boolean isValid = false; try { endResource(xid, endFlags); isValid = true; } finally { if (! isValid) _xaResource.rollba...
/** * commit the resource */
commit the resource
commit
{ "repo_name": "christianchristensen/resin", "path": "modules/resin/src/com/caucho/jca/pool/ManagedPoolItem.java", "license": "gpl-2.0", "size": 26183 }
[ "java.util.logging.Level", "javax.resource.ResourceException", "javax.transaction.xa.XAException", "javax.transaction.xa.Xid" ]
import java.util.logging.Level; import javax.resource.ResourceException; import javax.transaction.xa.XAException; import javax.transaction.xa.Xid;
import java.util.logging.*; import javax.resource.*; import javax.transaction.xa.*;
[ "java.util", "javax.resource", "javax.transaction" ]
java.util; javax.resource; javax.transaction;
2,291,816
public void handlePreflightCORS(final HttpServletRequest request, final HttpServletResponse response, final FilterChain filterChain) throws IOException, ServletException { CORSRequestType requestType = checkRequestType(request); if (requestType != CORSRequestType.PRE_FLIG...
void function(final HttpServletRequest request, final HttpServletResponse response, final FilterChain filterChain) throws IOException, ServletException { CORSRequestType requestType = checkRequestType(request); if (requestType != CORSRequestType.PRE_FLIGHT) { throw new IllegalArgumentException( STR + CORSRequestType.PR...
/** * Handles CORS pre-flight request. * * @param request * The {@link HttpServletRequest} object. * @param response * The {@link HttpServletResponse} object. * @param filterChain * The {@link FilterChain} object. * @throws IOExcept...
Handles CORS pre-flight request
handlePreflightCORS
{ "repo_name": "yli-aldo/cros_filter", "path": "src/main/java/org/ebaysf/web/cors/CORSFilter.java", "license": "apache-2.0", "size": 44490 }
[ "java.io.IOException", "java.util.LinkedList", "java.util.List", "javax.servlet.FilterChain", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import java.io.IOException; import java.util.LinkedList; import java.util.List; import javax.servlet.FilterChain; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import java.io.*; import java.util.*; import javax.servlet.*; import javax.servlet.http.*;
[ "java.io", "java.util", "javax.servlet" ]
java.io; java.util; javax.servlet;
2,373,986
public void rebuildESIndex() { try { final HTTPRequest removeRequest = new HTTPRequest(); removeRequest.setRequestMethod(HTTPRequestMethod.DELETE); removeRequest.setURL(new URL(ES_SERVER + "/" + ES_INDEX_NAME)); URL_FETCH_SVC.fetch(removeRequest); ...
void function() { try { final HTTPRequest removeRequest = new HTTPRequest(); removeRequest.setRequestMethod(HTTPRequestMethod.DELETE); removeRequest.setURL(new URL(ES_SERVER + "/" + ES_INDEX_NAME)); URL_FETCH_SVC.fetch(removeRequest); final HTTPRequest createRequest = new HTTPRequest(); createRequest.setRequestMethod(H...
/** * Rebuilds ES index. */
Rebuilds ES index
rebuildESIndex
{ "repo_name": "sky54521/symphony", "path": "src/main/java/org/b3log/symphony/service/SearchMgmtService.java", "license": "gpl-3.0", "size": 12085 }
[ "org.b3log.latke.logging.Level", "org.b3log.latke.servlet.HTTPRequestMethod", "org.b3log.latke.urlfetch.HTTPRequest", "org.b3log.symphony.model.Article", "org.json.JSONObject" ]
import org.b3log.latke.logging.Level; import org.b3log.latke.servlet.HTTPRequestMethod; import org.b3log.latke.urlfetch.HTTPRequest; import org.b3log.symphony.model.Article; import org.json.JSONObject;
import org.b3log.latke.logging.*; import org.b3log.latke.servlet.*; import org.b3log.latke.urlfetch.*; import org.b3log.symphony.model.*; import org.json.*;
[ "org.b3log.latke", "org.b3log.symphony", "org.json" ]
org.b3log.latke; org.b3log.symphony; org.json;
611,995
RedisFuture<Long> rpushx(K key, V... values);
RedisFuture<Long> rpushx(K key, V... values);
/** * Append values to a list, only if the list exists. * * @param key the key. * @param values the values. * @return Long integer-reply the length of the list after the push operation. */
Append values to a list, only if the list exists
rpushx
{ "repo_name": "lettuce-io/lettuce-core", "path": "src/main/java/io/lettuce/core/api/async/RedisListAsyncCommands.java", "license": "apache-2.0", "size": 15307 }
[ "io.lettuce.core.RedisFuture" ]
import io.lettuce.core.RedisFuture;
import io.lettuce.core.*;
[ "io.lettuce.core" ]
io.lettuce.core;
2,400,398
public static String getIpAddress(Context c) { SharedPreferences config = getSPrefConfig( c ); return config.getString( AppConfig.SPREF_GATEWAY_IP_ADDRESS, AppConfig.DEFAULT_SDDL_IP_ADDRESS ); }
static String function(Context c) { SharedPreferences config = getSPrefConfig( c ); return config.getString( AppConfig.SPREF_GATEWAY_IP_ADDRESS, AppConfig.DEFAULT_SDDL_IP_ADDRESS ); }
/** * It gets the IP address from the Shared Preferences. * * @param c The Context of the Android system. * @return String A valid IP address. * null If there is not a valid IP address or the key has no * value. */
It gets the IP address from the Shared Preferences
getIpAddress
{ "repo_name": "luiz-pitta/IoTrade", "path": "app/src/main/java/com/lac/pucrio/luizpitta/iotrade/Utils/AppUtils.java", "license": "mit", "size": 15394 }
[ "android.content.Context", "android.content.SharedPreferences" ]
import android.content.Context; import android.content.SharedPreferences;
import android.content.*;
[ "android.content" ]
android.content;
1,857,320
@Test (timeout=30000) public void testClientBackOffByResponseTime() throws Exception { final TestRpcService proxy; boolean succeeded = false; final int numClients = 1; GenericTestUtils.setLogLevel(DecayRpcScheduler.LOG, Level.DEBUG); GenericTestUtils.setLogLevel(RPC.LOG, Level.DEBUG); fina...
@Test (timeout=30000) void function() throws Exception { final TestRpcService proxy; boolean succeeded = false; final int numClients = 1; GenericTestUtils.setLogLevel(DecayRpcScheduler.LOG, Level.DEBUG); GenericTestUtils.setLogLevel(RPC.LOG, Level.DEBUG); final List<Future<Void>> res = new ArrayList<Future<Void>>(); fi...
/** * Test RPC backoff by response time of each priority level. */
Test RPC backoff by response time of each priority level
testClientBackOffByResponseTime
{ "repo_name": "xiao-chen/hadoop", "path": "hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestRPC.java", "license": "apache-2.0", "size": 51729 }
[ "java.util.ArrayList", "java.util.List", "java.util.concurrent.ExecutorService", "java.util.concurrent.Executors", "java.util.concurrent.Future", "org.apache.hadoop.fs.CommonConfigurationKeys", "org.apache.hadoop.ipc.Server", "org.apache.hadoop.metrics2.MetricsRecordBuilder", "org.apache.hadoop.test...
import java.util.ArrayList; import java.util.List; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; import org.apache.hadoop.fs.CommonConfigurationKeys; import org.apache.hadoop.ipc.Server; import org.apache.hadoop.metrics2.MetricsRecordBuilder; imp...
import java.util.*; import java.util.concurrent.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.ipc.*; import org.apache.hadoop.metrics2.*; import org.apache.hadoop.test.*; import org.junit.*; import org.mockito.*; import org.slf4j.event.*;
[ "java.util", "org.apache.hadoop", "org.junit", "org.mockito", "org.slf4j.event" ]
java.util; org.apache.hadoop; org.junit; org.mockito; org.slf4j.event;
2,775,292
return new RemappedServoSource<NewServoId, C>(this, remapping); }
return new RemappedServoSource<NewServoId, C>(this, remapping); }
/** * Returns a ServoSource that has new channel ids, as defined by the given function. */
Returns a ServoSource that has new channel ids, as defined by the given function
remapped
{ "repo_name": "IAmContent/public", "path": "public-java/io/iamcontent-servos/src/main/java/com/iamcontent/device/servo/ServoSource.java", "license": "gpl-2.0", "size": 2656 }
[ "com.iamcontent.device.servo.impl.RemappedServoSource" ]
import com.iamcontent.device.servo.impl.RemappedServoSource;
import com.iamcontent.device.servo.impl.*;
[ "com.iamcontent.device" ]
com.iamcontent.device;
1,826,998
ContextMenuInfo createContextMenuInfo(View view, int position, long id) { return new AdapterContextMenuInfo(view, position, id); }
ContextMenuInfo createContextMenuInfo(View view, int position, long id) { return new AdapterContextMenuInfo(view, position, id); }
/** * Creates the ContextMenuInfo returned from {@link #getContextMenuInfo()}. This * methods knows the view, position and ID of the item that received the * long press. * * @param view The view that received the long press. * @param position The position of the item that received the long...
Creates the ContextMenuInfo returned from <code>#getContextMenuInfo()</code>. This methods knows the view, position and ID of the item that received the long press
createContextMenuInfo
{ "repo_name": "xorware/android_frameworks_base", "path": "core/java/android/widget/AbsListView.java", "license": "apache-2.0", "size": 278926 }
[ "android.view.ContextMenu", "android.view.View" ]
import android.view.ContextMenu; import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
2,392,857
@Override public void updatePerception(MagpieEvent event) { if(event instanceof LogicTupleEvent) { try { LogicTupleEvent ev = (LogicTupleEvent) event; SolveInfo infoPerceive = prolog.solve("perceive(" + ev.toTuple() + "," + ev.getTimestamp() + ")."); // Print the percepti...
void function(MagpieEvent event) { if(event instanceof LogicTupleEvent) { try { LogicTupleEvent ev = (LogicTupleEvent) event; SolveInfo infoPerceive = prolog.solve(STR + ev.toTuple() + "," + ev.getTimestamp() + ")."); Log.i(TAG, STR + ev.toTuple() + "," + ev.getTimestamp() + ")."); Log.i(TAG, STR + infoPerceive.toStrin...
/** * This perception in the Prolog agent is going to be processed only in the case it is a * LogicTuple. Events that are not LogicTuples cannot be handled by this particular mind. * We suggest to use the SubsumptionMind to work with events that are not logic tuples. */
This perception in the Prolog agent is going to be processed only in the case it is a LogicTuple. Events that are not LogicTuples cannot be handled by this particular mind. We suggest to use the SubsumptionMind to work with events that are not logic tuples
updatePerception
{ "repo_name": "kflauri2312lffds/Android_watch_magpie", "path": "MAGPIE/library/src/main/java/ch/hevs/aislab/magpie/agent/PrologAgentMind.java", "license": "bsd-3-clause", "size": 8460 }
[ "android.util.Log", "ch.hevs.aislab.magpie.event.LogicTupleEvent", "ch.hevs.aislab.magpie.event.MagpieEvent", "ch.hevs.aislab.magpie.event.RuleSetEvent", "ch.hevs.aislab.magpie.event.UpdateMindModelEvent", "ch.hevs.aislab.magpie.support.Rule", "java.util.Collection", "java.util.Iterator", "java.util...
import android.util.Log; import ch.hevs.aislab.magpie.event.LogicTupleEvent; import ch.hevs.aislab.magpie.event.MagpieEvent; import ch.hevs.aislab.magpie.event.RuleSetEvent; import ch.hevs.aislab.magpie.event.UpdateMindModelEvent; import ch.hevs.aislab.magpie.support.Rule; import java.util.Collection; import java.util....
import android.util.*; import ch.hevs.aislab.magpie.event.*; import ch.hevs.aislab.magpie.support.*; import java.util.*;
[ "android.util", "ch.hevs.aislab", "java.util" ]
android.util; ch.hevs.aislab; java.util;
2,486,361
public static ScoredDocIdCollector create(int maxDoc, boolean enableScoring) { return enableScoring ? new ScoringDocIdCollector(maxDoc) : new NonScoringDocIdCollector(maxDoc); } private ScoredDocIdCollector(int maxDoc) { numDocIds = 0; docIds = new FixedBitSet(maxDo...
static ScoredDocIdCollector function(int maxDoc, boolean enableScoring) { return enableScoring ? new ScoringDocIdCollector(maxDoc) : new NonScoringDocIdCollector(maxDoc); } private ScoredDocIdCollector(int maxDoc) { numDocIds = 0; docIds = new FixedBitSet(maxDoc); }
/** * Creates a new {@link ScoredDocIdCollector} with the given parameters. * * @param maxDoc the number of documents that are expected to be collected. * Note that if more documents are collected, unexpected exceptions may * be thrown. Usually you should pass {@link IndexReader#maxDo...
Creates a new <code>ScoredDocIdCollector</code> with the given parameters
create
{ "repo_name": "terrancesnyder/solr-analytics", "path": "lucene/facet/src/java/org/apache/lucene/facet/search/ScoredDocIdCollector.java", "license": "apache-2.0", "size": 7192 }
[ "org.apache.lucene.util.FixedBitSet" ]
import org.apache.lucene.util.FixedBitSet;
import org.apache.lucene.util.*;
[ "org.apache.lucene" ]
org.apache.lucene;
943,126
void setSupportButtonTintMode(@Nullable PorterDuff.Mode tintMode);
void setSupportButtonTintMode(@Nullable PorterDuff.Mode tintMode);
/** * Specifies the blending mode which should be used to apply the tint specified by * {@link #setSupportButtonTintList(ColorStateList)} to the button drawable. The * default mode is {@link PorterDuff.Mode#SRC_IN}. * * @param tintMode the blending mode used to apply the tint, may be * ...
Specifies the blending mode which should be used to apply the tint specified by <code>#setSupportButtonTintList(ColorStateList)</code> to the button drawable. The default mode is <code>PorterDuff.Mode#SRC_IN</code>
setSupportButtonTintMode
{ "repo_name": "aosp-mirror/platform_frameworks_support", "path": "compat/src/main/java/androidx/core/widget/TintableCompoundButton.java", "license": "apache-2.0", "size": 2582 }
[ "android.graphics.PorterDuff", "androidx.annotation.Nullable" ]
import android.graphics.PorterDuff; import androidx.annotation.Nullable;
import android.graphics.*; import androidx.annotation.*;
[ "android.graphics", "androidx.annotation" ]
android.graphics; androidx.annotation;
2,433,011
@SuppressWarnings("deprecation") // suspends/resumes threads intentionally @SuppressForbidden(reason = "suspends/resumes threads intentionally") protected boolean suspendThreads(Set<Thread> nodeThreads) { Thread[] allThreads = null; while (allThreads == null) { allThreads = new T...
@SuppressWarnings(STR) @SuppressForbidden(reason = STR) boolean function(Set<Thread> nodeThreads) { Thread[] allThreads = null; while (allThreads == null) { allThreads = new Thread[Thread.activeCount()]; if (Thread.enumerate(allThreads) > allThreads.length) { allThreads = null; } } boolean liveThreadsFound = false; for...
/** * resolves all threads belonging to given node and suspends them if their current stack trace * is "safe". Threads are added to nodeThreads if suspended. * * returns true if some live threads were found. The caller is expected to call this method * until no more "live" are found. */
resolves all threads belonging to given node and suspends them if their current stack trace is "safe". Threads are added to nodeThreads if suspended. returns true if some live threads were found. The caller is expected to call this method until no more "live" are found
suspendThreads
{ "repo_name": "ern/elasticsearch", "path": "test/framework/src/main/java/org/elasticsearch/test/disruption/LongGCDisruption.java", "license": "apache-2.0", "size": 15521 }
[ "java.util.Set", "java.util.concurrent.TimeUnit", "java.util.regex.Pattern", "org.elasticsearch.core.SuppressForbidden" ]
import java.util.Set; import java.util.concurrent.TimeUnit; import java.util.regex.Pattern; import org.elasticsearch.core.SuppressForbidden;
import java.util.*; import java.util.concurrent.*; import java.util.regex.*; import org.elasticsearch.core.*;
[ "java.util", "org.elasticsearch.core" ]
java.util; org.elasticsearch.core;
27,613
Item item = (Item)evt.getTo(); if(item.getProduct().getId() != null){ try { IManagerBean productBean = BeanManager.getManagerBean( Product.class ); productBean.remove(item.getProduct()); } catch (ManagerBeanException e) { e.printStackTrace(); } } }
Item item = (Item)evt.getTo(); if(item.getProduct().getId() != null){ try { IManagerBean productBean = BeanManager.getManagerBean( Product.class ); productBean.remove(item.getProduct()); } catch (ManagerBeanException e) { e.printStackTrace(); } } }
/** * This method gets called when a bean is removed. * Removes de product linket to the item removed. * * @param evt A ManagerBeanEvent object describing the event source. * * @see com.code.aon.common.event.ManagerBeanListenerAdapter#beanRemoved(com.code.aon.common.event.ManagerBeanEven...
This method gets called when a bean is removed. Removes de product linket to the item removed
beanRemoved
{ "repo_name": "Esleelkartea/aonGTA", "path": "aongta_v1.0.0_src/Fuentes y JavaDoc/aon-product/src/com/code/aon/product/event/ItemListener.java", "license": "gpl-2.0", "size": 1407 }
[ "com.code.aon.common.BeanManager", "com.code.aon.common.IManagerBean", "com.code.aon.common.ManagerBeanException", "com.code.aon.product.Item", "com.code.aon.product.Product" ]
import com.code.aon.common.BeanManager; import com.code.aon.common.IManagerBean; import com.code.aon.common.ManagerBeanException; import com.code.aon.product.Item; import com.code.aon.product.Product;
import com.code.aon.common.*; import com.code.aon.product.*;
[ "com.code.aon" ]
com.code.aon;
1,975,838
IndicesExistsRequestBuilder prepareExists(String... indices);
IndicesExistsRequestBuilder prepareExists(String... indices);
/** * Indices exists. */
Indices exists
prepareExists
{ "repo_name": "strapdata/elassandra-test", "path": "core/src/main/java/org/elasticsearch/client/IndicesAdminClient.java", "license": "apache-2.0", "size": 34405 }
[ "org.elasticsearch.action.admin.indices.exists.indices.IndicesExistsRequestBuilder" ]
import org.elasticsearch.action.admin.indices.exists.indices.IndicesExistsRequestBuilder;
import org.elasticsearch.action.admin.indices.exists.indices.*;
[ "org.elasticsearch.action" ]
org.elasticsearch.action;
2,741,445
public static String getNamespace(HasMetadata entity) { if (entity != null) { return getNamespace(entity.getMetadata()); } else { return null; } }
static String function(HasMetadata entity) { if (entity != null) { return getNamespace(entity.getMetadata()); } else { return null; } }
/** * Getting namespace from Kubernetes Resource * * @param entity Kubernetes Resource * @return returns namespace as plain string */
Getting namespace from Kubernetes Resource
getNamespace
{ "repo_name": "fabric8io/kubernetes-client", "path": "kubernetes-client-api/src/main/java/io/fabric8/kubernetes/client/utils/KubernetesResourceUtil.java", "license": "apache-2.0", "size": 14662 }
[ "io.fabric8.kubernetes.api.model.HasMetadata" ]
import io.fabric8.kubernetes.api.model.HasMetadata;
import io.fabric8.kubernetes.api.model.*;
[ "io.fabric8.kubernetes" ]
io.fabric8.kubernetes;
410,609
private void executeSecurityGroupsModel() { Log.v(TAG + ".executeModel()", "Going to execute model!"); Filter filter = new Filter("group-name").withValues(securityGroupNames);//get filters. //the filters say: get us info on the security groups with the following names. //note this model will show all por...
void function() { Log.v(TAG + STR, STR); Filter filter = new Filter(STR).withValues(securityGroupNames); securityGroupsModel = new SecurityGroupsModel(this, connectionData); securityGroupsModel.execute(new Filter[]{filter}); }
/** * Executes the model which will return the open ports assigned to this instance. * Uses SecurityGroupModel */
Executes the model which will return the open ports assigned to this instance. Uses SecurityGroupModel
executeSecurityGroupsModel
{ "repo_name": "siddhuwarrier/elastic-droid", "path": "src/org/elasticdroid/SshConnectorView.java", "license": "gpl-3.0", "size": 19136 }
[ "android.util.Log", "com.amazonaws.services.ec2.model.Filter", "org.elasticdroid.model.SecurityGroupsModel" ]
import android.util.Log; import com.amazonaws.services.ec2.model.Filter; import org.elasticdroid.model.SecurityGroupsModel;
import android.util.*; import com.amazonaws.services.ec2.model.*; import org.elasticdroid.model.*;
[ "android.util", "com.amazonaws.services", "org.elasticdroid.model" ]
android.util; com.amazonaws.services; org.elasticdroid.model;
2,249,628
public Builder setBandwidthMeter(BandwidthMeter bandwidthMeter) { Assertions.checkState(!buildCalled); this.bandwidthMeter = bandwidthMeter; return this; }
Builder function(BandwidthMeter bandwidthMeter) { Assertions.checkState(!buildCalled); this.bandwidthMeter = bandwidthMeter; return this; }
/** * Sets the {@link BandwidthMeter} that will be used by the player. * * @param bandwidthMeter A {@link BandwidthMeter}. * @return This builder. * @throws IllegalStateException If {@link #build()} has already been called. */
Sets the <code>BandwidthMeter</code> that will be used by the player
setBandwidthMeter
{ "repo_name": "amzn/exoplayer-amazon-port", "path": "library/core/src/main/java/com/google/android/exoplayer2/ExoPlayer.java", "license": "apache-2.0", "size": 30514 }
[ "com.google.android.exoplayer2.upstream.BandwidthMeter", "com.google.android.exoplayer2.util.Assertions" ]
import com.google.android.exoplayer2.upstream.BandwidthMeter; import com.google.android.exoplayer2.util.Assertions;
import com.google.android.exoplayer2.upstream.*; import com.google.android.exoplayer2.util.*;
[ "com.google.android" ]
com.google.android;
1,996,931
int insert(Env record);
int insert(Env record);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table env * * @mbggenerated */
This method was generated by MyBatis Generator. This method corresponds to the database table env
insert
{ "repo_name": "zouzhirong/configx", "path": "configx-web/src/main/java/com/configx/web/dao/EnvMapper.java", "license": "apache-2.0", "size": 1343 }
[ "com.configx.web.model.Env" ]
import com.configx.web.model.Env;
import com.configx.web.model.*;
[ "com.configx.web" ]
com.configx.web;
1,105,674
private void fireConnectionError(SQLException e) { if (!isFatalState(e.getSQLState())) { return; } fireConnectionFatalError(e); } private class ConnectionHandler implements InvocationHandler { private Connection con; private Connection proxy; // the Connection the client is currentl...
void function(SQLException e) { if (!isFatalState(e.getSQLState())) { return; } fireConnectionFatalError(e); } private class ConnectionHandler implements InvocationHandler { private Connection con; private Connection proxy; private boolean automatic = false; public ConnectionHandler(Connection con) { this.con = con; }
/** * Fires a connection error event, but only if we think the exception is fatal. * * @param e the SQLException to consider */
Fires a connection error event, but only if we think the exception is fatal
fireConnectionError
{ "repo_name": "Gordiychuk/pgjdbc", "path": "pgjdbc/src/main/java/org/postgresql/ds/PGPooledConnection.java", "license": "bsd-2-clause", "size": 14743 }
[ "java.lang.reflect.InvocationHandler", "java.sql.Connection", "java.sql.SQLException" ]
import java.lang.reflect.InvocationHandler; import java.sql.Connection; import java.sql.SQLException;
import java.lang.reflect.*; import java.sql.*;
[ "java.lang", "java.sql" ]
java.lang; java.sql;
1,697,244
private void addBibRefDirSection(Composite parent) { Composite composite = createDefaultComposite(parent, 3); //Label for path field Label label = new Label(composite, SWT.NONE); label.setText(TexlipsePlugin.getResourceString("propertiesBibRefDirLabel")); label.setLayoutData...
void function(Composite parent) { Composite composite = createDefaultComposite(parent, 3); Label label = new Label(composite, SWT.NONE); label.setText(TexlipsePlugin.getResourceString(STR)); label.setLayoutData(new GridData()); label.setToolTipText(TexlipsePlugin.getResourceString(STR));
/** * Create the bibRef dir section of the page. * @param parent parent component */
Create the bibRef dir section of the page
addBibRefDirSection
{ "repo_name": "rondiplomatico/texlipse", "path": "source/net/sourceforge/texlipse/properties/TexlipseProjectPropertyPage.java", "license": "epl-1.0", "size": 24533 }
[ "net.sourceforge.texlipse.TexlipsePlugin", "org.eclipse.swt.layout.GridData", "org.eclipse.swt.widgets.Composite", "org.eclipse.swt.widgets.Label" ]
import net.sourceforge.texlipse.TexlipsePlugin; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Label;
import net.sourceforge.texlipse.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*;
[ "net.sourceforge.texlipse", "org.eclipse.swt" ]
net.sourceforge.texlipse; org.eclipse.swt;
1,729,232
public boolean isFixedView( View v ) { { //check header view. ArrayList<FixedViewInfo> where = mHeaderViewInfos; int len = where.size(); for (int i = 0; i < len; ++i) { FixedViewInfo info = where.get(i); if (info.view == v) { ...
boolean function( View v ) { { ArrayList<FixedViewInfo> where = mHeaderViewInfos; int len = where.size(); for (int i = 0; i < len; ++i) { FixedViewInfo info = where.get(i); if (info.view == v) { return true; } } } { ArrayList<FixedViewInfo> where = mFooterViewInfos; int len = where.size(); for (int i = 0; i < len; ++i)...
/** * check this view is fixed view(ex>Header & Footer) or not. * @param v * @return true if this is fixed view. */
check this view is fixed view(ex>Header & Footer) or not
isFixedView
{ "repo_name": "susong0618/EasyFrame", "path": "library/src/main/java/com/dream/library/widgets/pla/PLA_ListView.java", "license": "apache-2.0", "size": 82672 }
[ "android.view.View", "java.util.ArrayList" ]
import android.view.View; import java.util.ArrayList;
import android.view.*; import java.util.*;
[ "android.view", "java.util" ]
android.view; java.util;
2,176,695
public OneResponse deploy(int hostId) { return deploy(hostId, false, -1); }
OneResponse function(int hostId) { return deploy(hostId, false, -1); }
/** * Initiates the instance of the VM on the target host. * * @param hostId The host id (hid) of the target host where * the VM will be instantiated. * @return If an error occurs the error message contains the reason. */
Initiates the instance of the VM on the target host
deploy
{ "repo_name": "Terradue/one", "path": "src/oca/java/src/org/opennebula/client/vm/VirtualMachine.java", "license": "apache-2.0", "size": 38638 }
[ "org.opennebula.client.OneResponse" ]
import org.opennebula.client.OneResponse;
import org.opennebula.client.*;
[ "org.opennebula.client" ]
org.opennebula.client;
2,424,461
private InvocationHandler uiThread(final Object callingTarget) { return new InvocationHandler() {
InvocationHandler function(final Object callingTarget) { return new InvocationHandler() {
/** * Creates an InvocationHandler that executes every Method inside the * UI-Thread * * @param callingTarget * targetObjet that should be called only in the uiThread * @return the InvocationHandler */
Creates an InvocationHandler that executes every Method inside the UI-Thread
uiThread
{ "repo_name": "picpromusic/incubator", "path": "eclipse/rcp/com.wordpress.codingwizard.mvp.tools/src/com/wordpress/codingwizard/mvp/tools/MVPManager.java", "license": "mit", "size": 6861 }
[ "java.lang.reflect.InvocationHandler" ]
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
1,034,541
@Override public Member[] getMembers() { if ( getNext()!=null ) return getNext().getMembers(); else return null; }
Member[] function() { if ( getNext()!=null ) return getNext().getMembers(); else return null; }
/** * Get all current cluster members * @return all members or empty array */
Get all current cluster members
getMembers
{ "repo_name": "wenzhucjy/tomcat_source", "path": "tomcat-8.0.9-sourcecode/java/org/apache/catalina/tribes/group/ChannelInterceptorBase.java", "license": "apache-2.0", "size": 5603 }
[ "org.apache.catalina.tribes.Member" ]
import org.apache.catalina.tribes.Member;
import org.apache.catalina.tribes.*;
[ "org.apache.catalina" ]
org.apache.catalina;
2,003,980
private boolean refreshWorkspaceHeader(ExtendedEventHandler eventHandler) throws InterruptedException, AbruptExitException { Root workspaceRoot = Root.fromPath(directories.getWorkspace()); RootedPath workspacePath = RootedPath.toRootedPath(workspaceRoot, LabelConstants.WORKSPACE_FILE_NAME); ...
boolean function(ExtendedEventHandler eventHandler) throws InterruptedException, AbruptExitException { Root workspaceRoot = Root.fromPath(directories.getWorkspace()); RootedPath workspacePath = RootedPath.toRootedPath(workspaceRoot, LabelConstants.WORKSPACE_FILE_NAME); WorkspaceFileKey workspaceFileKey = WorkspaceFileV...
/** * Calculate the new value of the WORKSPACE file header (WorkspaceFileValue with the index = 0), * and call the listener, if the value has changed. Needed for incremental update of user-owned * directories by repository rules. */
Calculate the new value of the WORKSPACE file header (WorkspaceFileValue with the index = 0), and call the listener, if the value has changed. Needed for incremental update of user-owned directories by repository rules
refreshWorkspaceHeader
{ "repo_name": "cushon/bazel", "path": "src/main/java/com/google/devtools/build/lib/skyframe/SequencedSkyframeExecutor.java", "license": "apache-2.0", "size": 54084 }
[ "com.google.devtools.build.lib.actions.FileStateType", "com.google.devtools.build.lib.actions.FileStateValue", "com.google.devtools.build.lib.cmdline.LabelConstants", "com.google.devtools.build.lib.events.ExtendedEventHandler", "com.google.devtools.build.lib.packages.WorkspaceFileValue", "com.google.devto...
import com.google.devtools.build.lib.actions.FileStateType; import com.google.devtools.build.lib.actions.FileStateValue; import com.google.devtools.build.lib.cmdline.LabelConstants; import com.google.devtools.build.lib.events.ExtendedEventHandler; import com.google.devtools.build.lib.packages.WorkspaceFileValue; import...
import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.cmdline.*; import com.google.devtools.build.lib.events.*; import com.google.devtools.build.lib.packages.*; import com.google.devtools.build.lib.server.*; import com.google.devtools.build.lib.util.*; import com.google.devtools.build.lib...
[ "com.google.devtools" ]
com.google.devtools;
435,025
@RequestMapping(value = "/validationToken", method = RequestMethod.GET) public ModelAndView validateUser( @RequestParam(value = "token", required = true) String token) { ModelAndView mv = new ModelAndView(); // si existe el token, acceder a dashboard if (developerFacade.validateDeveloper(token) == 1) { ...
@RequestMapping(value = STR, method = RequestMethod.GET) ModelAndView function( @RequestParam(value = "token", required = true) String token) { ModelAndView mv = new ModelAndView(); if (developerFacade.validateDeveloper(token) == 1) { mv.setViewName("login"); } else { mv.setViewName(STR); } return mv; }
/** * Controlador encargado de validar un desarrollador * * @param token * Token asignado a los usuarios para realizar la validación * @return */
Controlador encargado de validar un desarrollador
validateUser
{ "repo_name": "cictourgune/EmocionometroWeb", "path": "src/org/tourgune/apptrack/controller/view/open/OpenViewController.java", "license": "apache-2.0", "size": 3195 }
[ "org.springframework.web.bind.annotation.RequestMapping", "org.springframework.web.bind.annotation.RequestMethod", "org.springframework.web.bind.annotation.RequestParam", "org.springframework.web.servlet.ModelAndView" ]
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.*;
[ "org.springframework.web" ]
org.springframework.web;
2,625,112