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 com.squareup.okhttp.Call getUniverseStargatesStargateIdAsync(Integer stargateId, String datasource, String userAgent, String xUserAgent, final ApiCallback<GetUniverseStargatesStargateIdOk> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
Progress... | com.squareup.okhttp.Call function(Integer stargateId, String datasource, String userAgent, String xUserAgent, final ApiCallback<GetUniverseStargatesStargateIdOk> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestList... | /**
* Get stargate information (asynchronously)
* Get information on a stargate --- Alternate route: `/v1/universe/stargates/{stargate_id}/` Alternate route: `/legacy/universe/stargates/{stargate_id}/` Alternate route: `/dev/universe/stargates/{stargate_id}/` --- This rout... | Get stargate information (asynchronously) Get information on a stargate --- Alternate route: `/v1/universe/stargates/{stargate_id}/` Alternate route: `/legacy/universe/stargates/{stargate_id}/` Alternate route: `/dev/universe/stargates/{stargate_id}/` --- This route expires daily at 11:05 | getUniverseStargatesStargateIdAsync | {
"repo_name": "Tmin10/EVE-Security-Service",
"path": "server-api/src/main/java/ru/tmin10/EVESecurityService/serverApi/api/UniverseApi.java",
"license": "gpl-3.0",
"size": 215688
} | [
"ru.tmin10.EVESecurityService"
] | import ru.tmin10.EVESecurityService; | import ru.tmin10.*; | [
"ru.tmin10"
] | ru.tmin10; | 1,873,909 |
public Context createSubcontext(Name subContext) throws NamingException
{
try
{
org.omg.CORBA.Object subcontext = service.bind_new_context(
toGiop(subContext));
Hashtable clonedProps = new Hashtable();
clonedProps.putAll(properties);
// Nulls are passed both for ... | Context function(Name subContext) throws NamingException { try { org.omg.CORBA.Object subcontext = service.bind_new_context( toGiop(subContext)); Hashtable clonedProps = new Hashtable(); clonedProps.putAll(properties); return new ContextContinuation(subcontext, clonedProps, null, null); } catch (AlreadyBound e) { throw... | /**
* Creates the new naming subcontext and binds it to the current (this)
* context. The returned object will wrap around the newly created CORBA
* subcontext
*
* @param subContext
* the name of the new context being created
* @return the newly created context, bound to the instance of th... | Creates the new naming subcontext and binds it to the current (this) context. The returned object will wrap around the newly created CORBA subcontext | createSubcontext | {
"repo_name": "SanDisk-Open-Source/SSD_Dashboard",
"path": "uefi/gcc/gcc-4.6.3/libjava/classpath/gnu/javax/naming/giop/ContextContinuation.java",
"license": "gpl-2.0",
"size": 29695
} | [
"java.util.Hashtable",
"javax.naming.Context",
"javax.naming.InvalidNameException",
"javax.naming.Name",
"javax.naming.NameAlreadyBoundException",
"javax.naming.NamingException",
"org.omg.CosNaming"
] | import java.util.Hashtable; import javax.naming.Context; import javax.naming.InvalidNameException; import javax.naming.Name; import javax.naming.NameAlreadyBoundException; import javax.naming.NamingException; import org.omg.CosNaming; | import java.util.*; import javax.naming.*; import org.omg.*; | [
"java.util",
"javax.naming",
"org.omg"
] | java.util; javax.naming; org.omg; | 2,794,638 |
protected boolean getNextPath() {
try {
if (this.currentPath == null) {
this.currentPath = queue.poll(this.sleepForRetries, TimeUnit.MILLISECONDS);
this.metrics.setSizeOfLogQueue(queue.size());
}
} catch (InterruptedException e) {
LOG.warn("Interrupted while reading edits", e... | boolean function() { try { if (this.currentPath == null) { this.currentPath = queue.poll(this.sleepForRetries, TimeUnit.MILLISECONDS); this.metrics.setSizeOfLogQueue(queue.size()); } } catch (InterruptedException e) { LOG.warn(STR, e); } return this.currentPath != null; } | /**
* Poll for the next path
* @return true if a path was obtained, false if not
*/ | Poll for the next path | getNextPath | {
"repo_name": "jyates/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/ReplicationSource.java",
"license": "apache-2.0",
"size": 31481
} | [
"java.util.concurrent.TimeUnit"
] | import java.util.concurrent.TimeUnit; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 2,506,787 |
private static String format(
final String resourceBundleName,
final String key,
final Object[] arguments) {
String pattern;
if (resourceBundleName != null) {
try {
ResourceBundle bundle =
ResourceBundle.getBundl... | static String function( final String resourceBundleName, final String key, final Object[] arguments) { String pattern; if (resourceBundleName != null) { try { ResourceBundle bundle = ResourceBundle.getBundle(resourceBundleName); pattern = bundle.getString(key); } catch (Exception ex) { pattern = key; } } else { pattern... | /**
* Formats arguments using MessageFormat using a pattern from
* a resource bundle.
* @param resourceBundleName name of resource bundle, may be null.
* @param key key for pattern in resource bundle, may be null.
* @param arguments arguments, may be null or mismatched.
* @return Message s... | Formats arguments using MessageFormat using a pattern from a resource bundle | format | {
"repo_name": "Mark-Booth/daq-eclipse",
"path": "uk.ac.diamond.org.apache.activemq/org/apache/log4j/LogMF.java",
"license": "epl-1.0",
"size": 61295
} | [
"java.util.ResourceBundle"
] | import java.util.ResourceBundle; | import java.util.*; | [
"java.util"
] | java.util; | 1,073,859 |
private static void validateMethod(Method method) {
String desc = method.toString();
assertTrue(desc, isAnyEnter(method) || isWaitFor(method));
switch (method.getParameterTypes().length) {
case 0:
assertFalse(desc, isGuarded(method));
assertFalse(desc, isTimed(method));
bre... | static void function(Method method) { String desc = method.toString(); assertTrue(desc, isAnyEnter(method) isWaitFor(method)); switch (method.getParameterTypes().length) { case 0: assertFalse(desc, isGuarded(method)); assertFalse(desc, isTimed(method)); break; case 1: assertTrue(desc, isGuarded(method)); assertFalse(de... | /**
* Validates that the given method's signature meets all of our assumptions.
*/ | Validates that the given method's signature meets all of our assumptions | validateMethod | {
"repo_name": "DavesMan/guava",
"path": "guava-tests/test/com/google/common/util/concurrent/GeneratedMonitorTest.java",
"license": "apache-2.0",
"size": 26452
} | [
"java.lang.reflect.Method"
] | import java.lang.reflect.Method; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 1,591,813 |
synchronized InputStream top(int msg, int n) throws IOException {
Response r = multilineCommand("TOP " + msg + " " + n, 0);
return r.bytes;
} | synchronized InputStream top(int msg, int n) throws IOException { Response r = multilineCommand(STR + msg + " " + n, 0); return r.bytes; } | /**
* Return the message header and the first n lines of the message.
*/ | Return the message header and the first n lines of the message | top | {
"repo_name": "arthurzaczek/kolab-android",
"path": "javamail/com/sun/mail/pop3/Protocol.java",
"license": "gpl-3.0",
"size": 13521
} | [
"java.io.IOException",
"java.io.InputStream"
] | import java.io.IOException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,555,870 |
private boolean handleStartBtnClick() {
Xlog.v(TAG, "-->handleStartBtnClick");
// BLEResult_String = "Response:";
// judge if Rx or Tx test is selected
int cmdLen = 4;
char[] cmd = new char[cmdLen];
char[] response = null;
int i = 0;
cmd[0] = ... | boolean function() { Xlog.v(TAG, STR); int cmdLen = 4; char[] cmd = new char[cmdLen]; char[] response = null; int i = 0; cmd[0] = 0x01; cmd[1] = 0x03; cmd[2] = 0x0C; cmd[3] = 0x00; response = mBtTest.hciCommandRun(cmd, cmdLen); if (response == null) { Xlog.i(TAG, STR); return false; } else { String s = null; for (i = 0... | /**
* Do test after push "start" button
*
* @return 0 success
*/ | Do test after push "start" button | handleStartBtnClick | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "mediatek/packages/apps/EngineerMode/src/com/mediatek/engineermode/bluetooth/BleTestMode.java",
"license": "gpl-2.0",
"size": 22930
} | [
"com.mediatek.xlog.Xlog"
] | import com.mediatek.xlog.Xlog; | import com.mediatek.xlog.*; | [
"com.mediatek.xlog"
] | com.mediatek.xlog; | 1,419,779 |
public void setRestTemplate(RestTemplate restTemplate) {
this.restTemplate = restTemplate;
} | void function(RestTemplate restTemplate) { this.restTemplate = restTemplate; } | /**
* Sets the rest template.
*
* @param restTemplate the new rest template
*/ | Sets the rest template | setRestTemplate | {
"repo_name": "lkhusid/oneops",
"path": "controller/src/main/java/com/oneops/controller/cms/CMSClient.java",
"license": "apache-2.0",
"size": 44045
} | [
"org.springframework.web.client.RestTemplate"
] | import org.springframework.web.client.RestTemplate; | import org.springframework.web.client.*; | [
"org.springframework.web"
] | org.springframework.web; | 1,413,479 |
protected void keyPressed() {
if ( !isEnabled() || !isClickable() ) {
return;
}
Drawable selector = mSelector;
Rect selectorRect = mSelectorRect;
if ( selector != null && ( isFocused() || touchModeDrawsInPressedState() )
&& !selectorRect.isEmpty() ) {
final View v = getChildAt( mSelectedPositio... | void function() { if ( !isEnabled() !isClickable() ) { return; } Drawable selector = mSelector; Rect selectorRect = mSelectorRect; if ( selector != null && ( isFocused() touchModeDrawsInPressedState() ) && !selectorRect.isEmpty() ) { final View v = getChildAt( mSelectedPosition - mFirstPosition ); if ( v != null ) { if... | /**
* Sets the selector state to "pressed" and posts a CheckForKeyLongPress to see if this is a long press.
*/ | Sets the selector state to "pressed" and posts a CheckForKeyLongPress to see if this is a long press | keyPressed | {
"repo_name": "jonathangerbaud/Klyph",
"path": "Klyph/libs_ext/HorizontalVariableListView-master/HorizontalVariableListView/src/it/sephiroth/android/library/widget/AbsHListView.java",
"license": "mit",
"size": 175073
} | [
"android.graphics.Rect",
"android.graphics.drawable.Drawable",
"android.graphics.drawable.TransitionDrawable",
"android.view.View",
"android.view.ViewConfiguration"
] | import android.graphics.Rect; import android.graphics.drawable.Drawable; import android.graphics.drawable.TransitionDrawable; import android.view.View; import android.view.ViewConfiguration; | import android.graphics.*; import android.graphics.drawable.*; import android.view.*; | [
"android.graphics",
"android.view"
] | android.graphics; android.view; | 2,072,793 |
private void setKafkaJaasConfig(Map<Object, Object> mapToPopulate, PropertyContext context) {
String keytab;
String principal;
final String explicitPrincipal = context.getProperty(KERBEROS_PRINCIPAL).evaluateAttributeExpressions().getValue();
final String explicitKeytab = context.get... | void function(Map<Object, Object> mapToPopulate, PropertyContext context) { String keytab; String principal; final String explicitPrincipal = context.getProperty(KERBEROS_PRINCIPAL).evaluateAttributeExpressions().getValue(); final String explicitKeytab = context.getProperty(KERBEROS_KEYTAB).evaluateAttributeExpressions... | /**
* Populate Kafka JAAS properties for Atlas notification.
* Since Atlas 0.8.1 uses Kafka client 0.10.0.0, we can not use 'sasl.jaas.config' property
* as it is available since 0.10.2, implemented by KAFKA-4259.
* Instead, this method uses old property names.
* @param mapToPopulate Map of con... | Populate Kafka JAAS properties for Atlas notification. Since Atlas 0.8.1 uses Kafka client 0.10.0.0, we can not use 'sasl.jaas.config' property as it is available since 0.10.2, implemented by KAFKA-4259. Instead, this method uses old property names | setKafkaJaasConfig | {
"repo_name": "YolandaMDavis/nifi",
"path": "nifi-nar-bundles/nifi-atlas-bundle/nifi-atlas-reporting-task/src/main/java/org/apache/nifi/atlas/reporting/ReportLineageToAtlas.java",
"license": "apache-2.0",
"size": 47525
} | [
"java.util.Map",
"org.apache.commons.lang3.StringUtils",
"org.apache.nifi.context.PropertyContext",
"org.apache.nifi.kerberos.KerberosCredentialsService"
] | import java.util.Map; import org.apache.commons.lang3.StringUtils; import org.apache.nifi.context.PropertyContext; import org.apache.nifi.kerberos.KerberosCredentialsService; | import java.util.*; import org.apache.commons.lang3.*; import org.apache.nifi.context.*; import org.apache.nifi.kerberos.*; | [
"java.util",
"org.apache.commons",
"org.apache.nifi"
] | java.util; org.apache.commons; org.apache.nifi; | 2,680,100 |
List<M2ModelDiff> diffModel(M2Model model); | List<M2ModelDiff> diffModel(M2Model model); | /**
* Return diffs between input model and model in the Dictionary.
*
* If the input model does not exist in the Dictionary then no diffs will be
* returned.
*
* @param model M2Model
* @return model diffs (if any)
*/ | Return diffs between input model and model in the Dictionary. If the input model does not exist in the Dictionary then no diffs will be returned | diffModel | {
"repo_name": "Alfresco/community-edition",
"path": "projects/data-model/source/java/org/alfresco/repo/dictionary/DictionaryDAO.java",
"license": "lgpl-3.0",
"size": 9384
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 182,839 |
public static String getFeedbackText(final QTIObject object, final String sIdent) {
final Feedback feedback = getFeedback(object, sIdent);
try {
final Material mat = (Material) feedback.getMaterials().get(0);
return mat.renderAsText();
} catch (final Exception e) {
... | static String function(final QTIObject object, final String sIdent) { final Feedback feedback = getFeedback(object, sIdent); try { final Material mat = (Material) feedback.getMaterials().get(0); return mat.renderAsText(); } catch (final Exception e) { return ""; } | /**
* Get feedback
*
* @param object
* @param sIdent
* @return feedback
*/ | Get feedback | getFeedbackText | {
"repo_name": "huihoo/olat",
"path": "olat7.8/src/main/java/org/olat/lms/ims/qti/editor/QTIEditHelperEBL.java",
"license": "apache-2.0",
"size": 36199
} | [
"org.olat.lms.ims.qti.objects.Feedback",
"org.olat.lms.ims.qti.objects.Material",
"org.olat.lms.ims.qti.objects.QTIObject"
] | import org.olat.lms.ims.qti.objects.Feedback; import org.olat.lms.ims.qti.objects.Material; import org.olat.lms.ims.qti.objects.QTIObject; | import org.olat.lms.ims.qti.objects.*; | [
"org.olat.lms"
] | org.olat.lms; | 2,226,705 |
public List<DataBean> traverseLinks(Link[] types, Traversal traversal) {
| List<DataBean> function(Link[] types, Traversal traversal) { | /**
* Convenience method which includes all beans into result.
*
* @see #traverseLinks(fi.csc.microarray.databeans.DataBean.Link, fi.csc.microarray.databeans.DataBean.Traversal, DataBeanSelector)
*/ | Convenience method which includes all beans into result | traverseLinks | {
"repo_name": "ilarischeinin/chipster",
"path": "src/main/java/fi/csc/microarray/databeans/DataBean.java",
"license": "gpl-3.0",
"size": 17469
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,898,990 |
@FIXVersion(introduced="4.1")
@TagNumRef(tagNum=TagNum.LastMkt)
public String getLastMkt() {
return lastMkt;
} | @FIXVersion(introduced="4.1") @TagNumRef(tagNum=TagNum.LastMkt) String function() { return lastMkt; } | /**
* Message field getter.
* @return field value
*/ | Message field getter | getLastMkt | {
"repo_name": "marvisan/HadesFIX",
"path": "Model/src/main/java/net/hades/fix/message/AdvertisementMsg.java",
"license": "gpl-3.0",
"size": 49255
} | [
"net.hades.fix.message.anno.FIXVersion",
"net.hades.fix.message.anno.TagNumRef",
"net.hades.fix.message.type.TagNum"
] | import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.anno.TagNumRef; import net.hades.fix.message.type.TagNum; | import net.hades.fix.message.anno.*; import net.hades.fix.message.type.*; | [
"net.hades.fix"
] | net.hades.fix; | 2,496,298 |
public void open() throws IOException {
Configuration conf = configuration != null ? configuration : FileFactory.getConfiguration();
dataInputStream = FileFactory.getDataInputStream(fileName, conf);
binaryIn = new TCompactProtocol(new TIOStreamTransport(dataInputStream));
} | void function() throws IOException { Configuration conf = configuration != null ? configuration : FileFactory.getConfiguration(); dataInputStream = FileFactory.getDataInputStream(fileName, conf); binaryIn = new TCompactProtocol(new TIOStreamTransport(dataInputStream)); } | /**
* Opens the fileName for reading.
*/ | Opens the fileName for reading | open | {
"repo_name": "zzcclp/carbondata",
"path": "core/src/main/java/org/apache/carbondata/core/reader/ThriftReader.java",
"license": "apache-2.0",
"size": 4811
} | [
"java.io.IOException",
"org.apache.carbondata.core.datastore.impl.FileFactory",
"org.apache.hadoop.conf.Configuration",
"org.apache.thrift.protocol.TCompactProtocol",
"org.apache.thrift.transport.TIOStreamTransport"
] | import java.io.IOException; import org.apache.carbondata.core.datastore.impl.FileFactory; import org.apache.hadoop.conf.Configuration; import org.apache.thrift.protocol.TCompactProtocol; import org.apache.thrift.transport.TIOStreamTransport; | import java.io.*; import org.apache.carbondata.core.datastore.impl.*; import org.apache.hadoop.conf.*; import org.apache.thrift.protocol.*; import org.apache.thrift.transport.*; | [
"java.io",
"org.apache.carbondata",
"org.apache.hadoop",
"org.apache.thrift"
] | java.io; org.apache.carbondata; org.apache.hadoop; org.apache.thrift; | 2,613,808 |
private void checkForSameTypeWarning(ConstraintSyntaxTree lhs, String op, ConstraintSyntaxTree rhs, EObject cause,
EStructuralFeature feature) {
if (IvmlKeyWords.UNEQUALS.equals(op) || IvmlKeyWords.UNEQUALS_ALIAS.equals(op)) {
// == is handled by OCLFeatureCall
try {
... | void function(ConstraintSyntaxTree lhs, String op, ConstraintSyntaxTree rhs, EObject cause, EStructuralFeature feature) { if (IvmlKeyWords.UNEQUALS.equals(op) IvmlKeyWords.UNEQUALS_ALIAS.equals(op)) { try { IDatatype lhsType = lhs.inferDatatype(); IDatatype rhsType = rhs.inferDatatype(); if (!(lhsType.isAssignableFrom(... | /**
* Checks whether the operation {@code op} may return wrong results if types on both sides are not somehow
* assignable.
*
* @param lhs the left hand side expression
* @param op the operator
* @param rhs the right hand side expression
* @param cause the causing grammar object
... | Checks whether the operation op may return wrong results if types on both sides are not somehow assignable | checkForSameTypeWarning | {
"repo_name": "SSEHUB/EASyProducer",
"path": "Plugins/IVML/de.uni_hildesheim.sse.ivml/src/de/uni_hildesheim/sse/translation/ExpressionTranslator.java",
"license": "apache-2.0",
"size": 86257
} | [
"net.ssehub.easy.varModel.cst.CSTSemanticException",
"net.ssehub.easy.varModel.cst.ConstraintSyntaxTree",
"net.ssehub.easy.varModel.model.IvmlKeyWords",
"net.ssehub.easy.varModel.model.datatypes.IDatatype",
"org.eclipse.emf.ecore.EObject",
"org.eclipse.emf.ecore.EStructuralFeature"
] | import net.ssehub.easy.varModel.cst.CSTSemanticException; import net.ssehub.easy.varModel.cst.ConstraintSyntaxTree; import net.ssehub.easy.varModel.model.IvmlKeyWords; import net.ssehub.easy.varModel.model.datatypes.IDatatype; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EStructuralFeature; | import net.ssehub.easy.*; import org.eclipse.emf.ecore.*; | [
"net.ssehub.easy",
"org.eclipse.emf"
] | net.ssehub.easy; org.eclipse.emf; | 636,017 |
public static Method getSubListOriginalListSetAffectsSubListMethod() {
return Platform
.getMethod(ListSubListTester.class, "testSubList_originalListSetAffectsSubList");
} | static Method function() { return Platform .getMethod(ListSubListTester.class, STR); } | /**
* Returns the {@link Method} instance for
* {@link #testSubList_originalListSetAffectsSubList()} so that tests
* of {@link CopyOnWriteArrayList} can suppress them with
* {@code FeatureSpecificTestSuiteBuilder.suppressing()} until <a
* href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6570631">... | Returns the <code>Method</code> instance for <code>#testSubList_originalListSetAffectsSubList()</code> so that tests of <code>CopyOnWriteArrayList</code> can suppress them with FeatureSpecificTestSuiteBuilder.suppressing() until Sun bug 6570631 is fixed | getSubListOriginalListSetAffectsSubListMethod | {
"repo_name": "lshain-android-source/external-guava",
"path": "guava-testlib/src/com/google/common/collect/testing/testers/ListSubListTester.java",
"license": "apache-2.0",
"size": 12593
} | [
"java.lang.reflect.Method"
] | import java.lang.reflect.Method; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 441,043 |
SystemOps.connPoolStart();
try {
GUI.start();
} catch (Exception e) {
logger.log( Level.INFO, e.toString(), e );
}
} | SystemOps.connPoolStart(); try { GUI.start(); } catch (Exception e) { logger.log( Level.INFO, e.toString(), e ); } } | /**
* This method - first run and initialize all
* <br> Note : Args not using..
* @param args String[]
*/ | This method - first run and initialize all Note : Args not using. | main | {
"repo_name": "muratti66/netstatgui-turkish",
"path": "src/com/muratti66/netstatgui/Main.java",
"license": "gpl-3.0",
"size": 1308
} | [
"java.util.logging.Level"
] | import java.util.logging.Level; | import java.util.logging.*; | [
"java.util"
] | java.util; | 651,643 |
protected void runSQL(String sql) throws SystemException {
try {
DataSource dataSource = mission_lkpPersistence.getDataSource();
SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource,
sql, new int[0]);
sqlUpdate.update();
}
catch (Exception e) {
throw new SystemException(e);
}... | void function(String sql) throws SystemException { try { DataSource dataSource = mission_lkpPersistence.getDataSource(); SqlUpdate sqlUpdate = SqlUpdateFactoryUtil.getSqlUpdate(dataSource, sql, new int[0]); sqlUpdate.update(); } catch (Exception e) { throw new SystemException(e); } } @BeanReference(type = active_conser... | /**
* Performs an SQL query.
*
* @param sql the sql query
*/ | Performs an SQL query | runSQL | {
"repo_name": "iucn-whp/world-heritage-outlook",
"path": "portlets/iucn-dbservice-portlet/docroot/WEB-INF/src/com/iucn/whp/dbservice/service/base/mission_lkpLocalServiceBaseImpl.java",
"license": "gpl-2.0",
"size": 175113
} | [
"com.liferay.counter.service.CounterLocalService",
"com.liferay.portal.kernel.bean.BeanReference",
"com.liferay.portal.kernel.dao.jdbc.SqlUpdate",
"com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil",
"com.liferay.portal.kernel.exception.SystemException",
"com.liferay.portal.service.ResourceLocalServ... | import com.liferay.counter.service.CounterLocalService; import com.liferay.portal.kernel.bean.BeanReference; import com.liferay.portal.kernel.dao.jdbc.SqlUpdate; import com.liferay.portal.kernel.dao.jdbc.SqlUpdateFactoryUtil; import com.liferay.portal.kernel.exception.SystemException; import com.liferay.portal.service.... | import com.liferay.counter.service.*; import com.liferay.portal.kernel.bean.*; import com.liferay.portal.kernel.dao.jdbc.*; import com.liferay.portal.kernel.exception.*; import com.liferay.portal.service.*; import com.liferay.portal.service.persistence.*; import javax.sql.*; | [
"com.liferay.counter",
"com.liferay.portal",
"javax.sql"
] | com.liferay.counter; com.liferay.portal; javax.sql; | 232,076 |
public void setIntents(List<Intent> intents) {
this.intents = intents;
} | void function(List<Intent> intents) { this.intents = intents; } | /**
* Sets a list of intents as detected by the service.
*
* @param intents an array of intents
*/ | Sets a list of intents as detected by the service | setIntents | {
"repo_name": "JoshSharpe/java-sdk",
"path": "conversation/src/main/java/com/ibm/watson/developer_cloud/conversation/v1/model/MessageResponse.java",
"license": "apache-2.0",
"size": 5133
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,931,519 |
private static void attachToContent(Activity activity, MenuDrawer menuDrawer) {
ViewGroup content = (ViewGroup) activity.findViewById(android.R.id.content);
content.removeAllViews();
content.addView(menuDrawer, LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT);
} | static void function(Activity activity, MenuDrawer menuDrawer) { ViewGroup content = (ViewGroup) activity.findViewById(android.R.id.content); content.removeAllViews(); content.addView(menuDrawer, LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT); } | /**
* Attaches the menu drawer to the content view.
*/ | Attaches the menu drawer to the content view | attachToContent | {
"repo_name": "xuwakao/mixtureProject",
"path": "menudrawer/src/net/simonvt/menudrawer/MenuDrawer.java",
"license": "gpl-2.0",
"size": 47581
} | [
"android.app.Activity",
"android.view.ViewGroup"
] | import android.app.Activity; import android.view.ViewGroup; | import android.app.*; import android.view.*; | [
"android.app",
"android.view"
] | android.app; android.view; | 1,389,325 |
public Date getCreatedtime() {
return createdtime;
} | Date function() { return createdtime; } | /**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column m_crm_opportunities_leads.createdTime
*
* @return the value of m_crm_opportunities_leads.createdTime
*
* @mbggenerated Thu Jul 16 10:50:10 ICT 2015
*/ | This method was generated by MyBatis Generator. This method returns the value of the database column m_crm_opportunities_leads.createdTime | getCreatedtime | {
"repo_name": "uniteddiversity/mycollab",
"path": "mycollab-services/src/main/java/com/esofthead/mycollab/module/crm/domain/OpportunityLead.java",
"license": "agpl-3.0",
"size": 6671
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 940,406 |
public static StringValue chr(Env env, long value)
{
if (! env.isUnicodeSemantics())
value = value & 0xFF;
StringValue sb = env.createUnicodeBuilder();
sb.append((char) value);
return sb;
} | static StringValue function(Env env, long value) { if (! env.isUnicodeSemantics()) value = value & 0xFF; StringValue sb = env.createUnicodeBuilder(); sb.append((char) value); return sb; } | /**
* converts a number to its character equivalent
*
* @param value the integer value
*
* @return the string equivalent
*/ | converts a number to its character equivalent | chr | {
"repo_name": "dwango/quercus",
"path": "src/main/java/com/caucho/quercus/lib/string/StringModule.java",
"license": "gpl-2.0",
"size": 150561
} | [
"com.caucho.quercus.env.Env",
"com.caucho.quercus.env.StringValue"
] | import com.caucho.quercus.env.Env; import com.caucho.quercus.env.StringValue; | import com.caucho.quercus.env.*; | [
"com.caucho.quercus"
] | com.caucho.quercus; | 93,338 |
public InterMineObject getObjectById(Integer id) throws ObjectStoreException {
return osw.getObjectById(id);
} | InterMineObject function(Integer id) throws ObjectStoreException { return osw.getObjectById(id); } | /**
* Search database for object matching the given object id
*
* @param id the object ID
* @return the retrieved object
* @throws ObjectStoreException if an error occurs retieving the object
*/ | Search database for object matching the given object id | getObjectById | {
"repo_name": "JoeCarlson/intermine",
"path": "intermine/integrate/main/src/org/intermine/dataloader/IntegrationWriterAbstractImpl.java",
"license": "lgpl-2.1",
"size": 29364
} | [
"org.intermine.model.InterMineObject",
"org.intermine.objectstore.ObjectStoreException"
] | import org.intermine.model.InterMineObject; import org.intermine.objectstore.ObjectStoreException; | import org.intermine.model.*; import org.intermine.objectstore.*; | [
"org.intermine.model",
"org.intermine.objectstore"
] | org.intermine.model; org.intermine.objectstore; | 2,680,905 |
@Generated
@Selector("configurationItems")
public native NSArray<?> configurationItems(); | @Selector(STR) native NSArray<?> function(); | /**
* Subclasses should implement this, and return an array of SLComposeSheetConfigurationItem instances, if if needs to display configuration items in the sheet. Defaults to nil.
*/ | Subclasses should implement this, and return an array of SLComposeSheetConfigurationItem instances, if if needs to display configuration items in the sheet. Defaults to nil | configurationItems | {
"repo_name": "multi-os-engine/moe-core",
"path": "moe.apple/moe.platform.ios/src/main/java/apple/social/SLComposeServiceViewController.java",
"license": "apache-2.0",
"size": 18380
} | [
"org.moe.natj.objc.ann.Selector"
] | import org.moe.natj.objc.ann.Selector; | import org.moe.natj.objc.ann.*; | [
"org.moe.natj"
] | org.moe.natj; | 74,751 |
private FPTree getFPTree(ExampleSet exampleSet, Attribute[] attributes, double[] positiveIndices, Map<Attribute, Item> mapping) {
FPTree tree = new FPTree();
for (Example currentExample : exampleSet) {
List<Item> itemSet = new ArrayList<Item>();
int i = 0;
for (Attribute currentAttribute : attributes) {... | FPTree function(ExampleSet exampleSet, Attribute[] attributes, double[] positiveIndices, Map<Attribute, Item> mapping) { FPTree tree = new FPTree(); for (Example currentExample : exampleSet) { List<Item> itemSet = new ArrayList<Item>(); int i = 0; for (Attribute currentAttribute : attributes) { if (currentExample.getVa... | /**
* Returns a new FPTree, representing the complete ExampleSet.
*
* @param exampleSet
* is the exampleSet, which shall be represented
* @param mapping
* is the mapping of attributes of the exampleSet to items
*/ | Returns a new FPTree, representing the complete ExampleSet | getFPTree | {
"repo_name": "aborg0/RapidMiner-Unuk",
"path": "src/com/rapidminer/operator/learner/associations/fpgrowth/FPGrowth.java",
"license": "agpl-3.0",
"size": 22408
} | [
"com.rapidminer.example.Attribute",
"com.rapidminer.example.Example",
"com.rapidminer.example.ExampleSet",
"com.rapidminer.operator.learner.associations.Item",
"java.util.ArrayList",
"java.util.Collections",
"java.util.List",
"java.util.Map"
] | import com.rapidminer.example.Attribute; import com.rapidminer.example.Example; import com.rapidminer.example.ExampleSet; import com.rapidminer.operator.learner.associations.Item; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Map; | import com.rapidminer.example.*; import com.rapidminer.operator.learner.associations.*; import java.util.*; | [
"com.rapidminer.example",
"com.rapidminer.operator",
"java.util"
] | com.rapidminer.example; com.rapidminer.operator; java.util; | 82,098 |
@ServiceMethod(returns = ReturnType.SINGLE)
NameAvailabilityInner checkNameAvailability(String location, NameAvailabilityParameters parameters); | @ServiceMethod(returns = ReturnType.SINGLE) NameAvailabilityInner checkNameAvailability(String location, NameAvailabilityParameters parameters); | /**
* Checks that the resource name is valid and is not already in use.
*
* @param location the region.
* @param parameters Parameters supplied to the operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exception.Manag... | Checks that the resource name is valid and is not already in use | checkNameAvailability | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/SignalRsClient.java",
"license": "mit",
"size": 28775
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.resourcemanager.signalr.fluent.models.NameAvailabilityInner",
"com.azure.resourcemanager.signalr.models.NameAvailabilityParameters"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.signalr.fluent.models.NameAvailabilityInner; import com.azure.resourcemanager.signalr.models.NameAvailabilityParameters; | import com.azure.core.annotation.*; import com.azure.resourcemanager.signalr.fluent.models.*; import com.azure.resourcemanager.signalr.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 2,429,305 |
private synchronized Schema getInputPathAvroSchema() throws IOException {
if (inputPathAvroSchema == null) {
// No need to query Hadoop more than once as this shouldn't change mid-run,
// thus, we can lazily initialize and cache the result.
inputPathAvroSchema = AvroUtils... | synchronized Schema function() throws IOException { if (inputPathAvroSchema == null) { inputPathAvroSchema = AvroUtils.getAvroSchemaFromPath(getInputPath()); } return inputPathAvroSchema; } | /**
* Get the Avro Schema of the input path, assuming the path contains just one
* schema version in all files under that path.
*/ | Get the Avro Schema of the input path, assuming the path contains just one schema version in all files under that path | getInputPathAvroSchema | {
"repo_name": "stotch/voldemort",
"path": "contrib/hadoop-store-builder/src/java/voldemort/store/readonly/mr/azkaban/VoldemortBuildAndPushJob.java",
"license": "apache-2.0",
"size": 45160
} | [
"java.io.IOException",
"org.apache.avro.Schema"
] | import java.io.IOException; import org.apache.avro.Schema; | import java.io.*; import org.apache.avro.*; | [
"java.io",
"org.apache.avro"
] | java.io; org.apache.avro; | 257,354 |
public RoundingParams setBorder(@ColorInt int color, float width) {
Preconditions.checkArgument(width >= 0, "the border width cannot be < 0");
mBorderWidth = width;
mBorderColor = color;
return this;
}
/**
* Sets the padding on rounded drawable. Works only with {@code RoundingMethod.BITMAP_ONL... | RoundingParams function(@ColorInt int color, float width) { Preconditions.checkArgument(width >= 0, STR); mBorderWidth = width; mBorderColor = color; return this; } /** * Sets the padding on rounded drawable. Works only with {@code RoundingMethod.BITMAP_ONLY} | /**
* Sets the border around the rounded drawable
* @param color of the border
* @param width of the width
*/ | Sets the border around the rounded drawable | setBorder | {
"repo_name": "weiwenqiang/GitHub",
"path": "expert/fresco/drawee/src/main/java/com/facebook/drawee/generic/RoundingParams.java",
"license": "apache-2.0",
"size": 8681
} | [
"android.support.annotation.ColorInt",
"com.facebook.common.internal.Preconditions"
] | import android.support.annotation.ColorInt; import com.facebook.common.internal.Preconditions; | import android.support.annotation.*; import com.facebook.common.internal.*; | [
"android.support",
"com.facebook.common"
] | android.support; com.facebook.common; | 1,834,898 |
public void addToHistory(List<RegInfo> history); | void function(List<RegInfo> history); | /**
* Adds to the List by treating List as a Set.
* Thus adds only if not already exists in the List and avoids duplication.
* See appendToHistory to append to List.
*/ | Adds to the List by treating List as a Set. Thus adds only if not already exists in the List and avoids duplication. See appendToHistory to append to List | addToHistory | {
"repo_name": "pdd/mongoj",
"path": "samples/PortletAndService/UsedCarService/src/java/service/org/mongoj/samples/model/CarModel.java",
"license": "mit",
"size": 4912
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 515,866 |
public Map<String, String> getNodeTypes() {
return nodeTypes;
} | Map<String, String> function() { return nodeTypes; } | /**
* Gets the node types.
*
* @return the node types
*/ | Gets the node types | getNodeTypes | {
"repo_name": "exodev/social",
"path": "component/core/src/main/java/org/exoplatform/social/core/service/ProfileConfig.java",
"license": "lgpl-3.0",
"size": 4102
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 512,039 |
private Map retrieveEditingModes(String cashManagementDocId, TransactionalDocumentPresentationController presentationController, TransactionalDocumentAuthorizer docAuthorizer) {
Map editModeMap = null;
try {
final CashManagementDocument cmDoc = (CashManagementDocument)SpringContext.getBe... | Map function(String cashManagementDocId, TransactionalDocumentPresentationController presentationController, TransactionalDocumentAuthorizer docAuthorizer) { Map editModeMap = null; try { final CashManagementDocument cmDoc = (CashManagementDocument)SpringContext.getBean(DocumentService.class).getByDocumentHeaderId(cash... | /**
* Retrieves the edit modes for the given cash management document
* @param cashManagementDocId the id of the cash management document to check
* @param presentationController the presentation controller of the cash management document
* @param docAuthorizer the cash management document authorize... | Retrieves the edit modes for the given cash management document | retrieveEditingModes | {
"repo_name": "Ariah-Group/Finance",
"path": "af_webapp/src/main/java/org/kuali/kfs/fp/document/web/struts/DepositWizardAction.java",
"license": "apache-2.0",
"size": 49629
} | [
"java.util.Map",
"java.util.Set",
"org.kuali.kfs.fp.document.CashManagementDocument",
"org.kuali.kfs.sys.context.SpringContext",
"org.kuali.rice.kew.api.exception.WorkflowException",
"org.kuali.rice.kns.document.authorization.TransactionalDocumentAuthorizer",
"org.kuali.rice.kns.document.authorization.T... | import java.util.Map; import java.util.Set; import org.kuali.kfs.fp.document.CashManagementDocument; import org.kuali.kfs.sys.context.SpringContext; import org.kuali.rice.kew.api.exception.WorkflowException; import org.kuali.rice.kns.document.authorization.TransactionalDocumentAuthorizer; import org.kuali.rice.kns.docu... | import java.util.*; import org.kuali.kfs.fp.document.*; import org.kuali.kfs.sys.context.*; import org.kuali.rice.kew.api.exception.*; import org.kuali.rice.kns.document.authorization.*; import org.kuali.rice.krad.service.*; import org.kuali.rice.krad.util.*; | [
"java.util",
"org.kuali.kfs",
"org.kuali.rice"
] | java.util; org.kuali.kfs; org.kuali.rice; | 2,086,633 |
protected boolean isSummarizeDetailLinesRendered(CertificationReportForm certificationReportForm) {
populateAuthorizationFields(certificationReportForm);
//super.populateAuthorizationFields(certificationReportForm);
return certificationReportForm.getEditingMode().containsKey(EffortCertifica... | boolean function(CertificationReportForm certificationReportForm) { populateAuthorizationFields(certificationReportForm); return certificationReportForm.getEditingMode().containsKey(EffortCertificationEditMode.SUMMARY_TAB_ENTRY); } | /**
* determine whether the summarized detail lines need to be rendered
*
* @param certificationReportForm the action form
* @return true if the summarized detail lines need to be rendered; otherwise, false
*/ | determine whether the summarized detail lines need to be rendered | isSummarizeDetailLinesRendered | {
"repo_name": "quikkian-ua-devops/will-financials",
"path": "kfs-ec/src/main/java/org/kuali/kfs/module/ec/document/web/struts/CertificationReportAction.java",
"license": "agpl-3.0",
"size": 34115
} | [
"org.kuali.kfs.module.ec.EffortConstants"
] | import org.kuali.kfs.module.ec.EffortConstants; | import org.kuali.kfs.module.ec.*; | [
"org.kuali.kfs"
] | org.kuali.kfs; | 2,867,218 |
public static String[] getFieldOrder(Class model) {
// the annotation lists fields by their SerializedName,
// except for the constant fields, which are listed by field name
JsonPropertyOrder ordering = (JsonPropertyOrder) model.getAnnotation(JsonPropertyOrder.class);
boolean isCon... | static String[] function(Class model) { JsonPropertyOrder ordering = (JsonPropertyOrder) model.getAnnotation(JsonPropertyOrder.class); boolean isConstants = false; if (DriverConstantFields.class.equals(model)) { isConstants = true; Log.d(LOG_LABEL, STR); } Field[] fields = model.getDeclaredFields(); ArrayList<String> f... | /**
* Returns the ordered list of field names for the given schema model.
* @param model Class built by jsonschema2pojo with the json editor annotations
* @return Array of the names of the fields on the class, ordered according to the JsonPropertyOrder annotation
*/ | Returns the ordered list of field names for the given schema model | getFieldOrder | {
"repo_name": "WorldBank-Transport/DRIVER-Android",
"path": "app/src/main/java/org/worldbank/transport/driver/utilities/DriverUtilities.java",
"license": "gpl-3.0",
"size": 10991
} | [
"android.util.Log",
"com.fasterxml.jackson.annotation.JsonPropertyOrder",
"com.google.gson.annotations.SerializedName",
"java.lang.reflect.Field",
"java.util.ArrayList",
"java.util.HashMap",
"org.worldbank.transport.driver.staticmodels.DriverConstantFields"
] | import android.util.Log; import com.fasterxml.jackson.annotation.JsonPropertyOrder; import com.google.gson.annotations.SerializedName; import java.lang.reflect.Field; import java.util.ArrayList; import java.util.HashMap; import org.worldbank.transport.driver.staticmodels.DriverConstantFields; | import android.util.*; import com.fasterxml.jackson.annotation.*; import com.google.gson.annotations.*; import java.lang.reflect.*; import java.util.*; import org.worldbank.transport.driver.staticmodels.*; | [
"android.util",
"com.fasterxml.jackson",
"com.google.gson",
"java.lang",
"java.util",
"org.worldbank.transport"
] | android.util; com.fasterxml.jackson; com.google.gson; java.lang; java.util; org.worldbank.transport; | 2,717,491 |
public static void writeLines(final File file, final String encoding, final Collection<?> lines,
final String lineEnding, final boolean append) throws IOException {
try (OutputStream out = new BufferedOutputStream(openOutputStream(file, append))) {
IOUtils.write... | static void function(final File file, final String encoding, final Collection<?> lines, final String lineEnding, final boolean append) throws IOException { try (OutputStream out = new BufferedOutputStream(openOutputStream(file, append))) { IOUtils.writeLines(lines, lineEnding, out, encoding); } } | /**
* Writes the <code>toString()</code> value of each item in a collection to
* the specified <code>File</code> line by line.
* The specified character encoding and the line ending will be used.
*
* @param file the file to write to
* @param encoding the encoding to use, {@code nul... | Writes the <code>toString()</code> value of each item in a collection to the specified <code>File</code> line by line. The specified character encoding and the line ending will be used | writeLines | {
"repo_name": "pimtegelaar/commons-io-test3",
"path": "src/main/java/org/apache/commons/io/FileUtils.java",
"license": "apache-2.0",
"size": 129505
} | [
"java.io.BufferedOutputStream",
"java.io.File",
"java.io.IOException",
"java.io.OutputStream",
"java.util.Collection"
] | import java.io.BufferedOutputStream; import java.io.File; import java.io.IOException; import java.io.OutputStream; import java.util.Collection; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,030,971 |
public static URL[] pathToURLs(String path) {
StringTokenizer st = new StringTokenizer(path, File.pathSeparator);
URL[] urls = new URL[st.countTokens()];
int count = 0;
while (st.hasMoreTokens()) {
URL url = fileToURL(new File(st.nextToken()));
if (url != null... | static URL[] function(String path) { StringTokenizer st = new StringTokenizer(path, File.pathSeparator); URL[] urls = new URL[st.countTokens()]; int count = 0; while (st.hasMoreTokens()) { URL url = fileToURL(new File(st.nextToken())); if (url != null) { urls[count++] = url; } } if (urls.length != count) { URL[] tmp = ... | /**
* Utility method for converting a search path string to an array
* of directory and JAR file URLs.
*
* @param path the search path string
* @return the resulting array of directory and JAR file URLs
*/ | Utility method for converting a search path string to an array of directory and JAR file URLs | pathToURLs | {
"repo_name": "FauxFaux/jdk9-jdk",
"path": "src/java.base/share/classes/sun/security/tools/PathList.java",
"license": "gpl-2.0",
"size": 3791
} | [
"java.io.File",
"java.lang.String",
"java.util.StringTokenizer"
] | import java.io.File; import java.lang.String; import java.util.StringTokenizer; | import java.io.*; import java.lang.*; import java.util.*; | [
"java.io",
"java.lang",
"java.util"
] | java.io; java.lang; java.util; | 84,977 |
public HLAnnotationHLAPI getContainerHLAnnotationHLAPI(){
if(item.getContainerHLAnnotation() == null) return null;
return new HLAnnotationHLAPI(item.getContainerHLAnnotation());
}
| HLAnnotationHLAPI function(){ if(item.getContainerHLAnnotation() == null) return null; return new HLAnnotationHLAPI(item.getContainerHLAnnotation()); } | /**
* This accessor automatically encapsulate an element of the current object.
* WARNING : this creates a new object in memory.
* @return : null if the element is null
*/ | This accessor automatically encapsulate an element of the current object. WARNING : this creates a new object in memory | getContainerHLAnnotationHLAPI | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-HLPN/src/fr/lip6/move/pnml/hlpn/lists/hlapi/LengthHLAPI.java",
"license": "epl-1.0",
"size": 108262
} | [
"fr.lip6.move.pnml.hlpn.hlcorestructure.hlapi.HLAnnotationHLAPI"
] | import fr.lip6.move.pnml.hlpn.hlcorestructure.hlapi.HLAnnotationHLAPI; | import fr.lip6.move.pnml.hlpn.hlcorestructure.hlapi.*; | [
"fr.lip6.move"
] | fr.lip6.move; | 379,218 |
public GenericResult changePassword(Locale locale, String login, byte[] oldPwHash, byte[] newPwHash);
| GenericResult function(Locale locale, String login, byte[] oldPwHash, byte[] newPwHash); | /**
* Change the users password.
* @param locale
* @param login
* @param oldPwHash
* @param newPwHash
* @return
*/ | Change the users password | changePassword | {
"repo_name": "CircleOrg/circles",
"path": "circle_api/src/main/java/net/circleorg/circles/api/Users.java",
"license": "mit",
"size": 1355
} | [
"java.util.Locale"
] | import java.util.Locale; | import java.util.*; | [
"java.util"
] | java.util; | 96,587 |
@SideOnly(Side.CLIENT)
public boolean addPartDestroyEffects(int part, EffectRenderer er); | @SideOnly(Side.CLIENT) boolean function(int part, EffectRenderer er); | /**
* Creates particles when a part is destroyed.
* If the part number is invalid, returns false.
* Otherwise, creates particles if applicable, and returns true.
*/ | Creates particles when a part is destroyed. If the part number is invalid, returns false. Otherwise, creates particles if applicable, and returns true | addPartDestroyEffects | {
"repo_name": "kremnev8/AdvancedSpaceStaion-mod",
"path": "src/main/java/mods/immibis/core/api/multipart/IPartContainer.java",
"license": "mit",
"size": 4388
} | [
"net.minecraft.client.particle.EffectRenderer"
] | import net.minecraft.client.particle.EffectRenderer; | import net.minecraft.client.particle.*; | [
"net.minecraft.client"
] | net.minecraft.client; | 1,123,090 |
private void tryMinimizeIfBlockExits(Node srcBlock, Node destBlock,
Node ifNode, int exitType, @Nullable String labelName) {
Node exitNodeParent = null;
Node exitNode = null;
// Pick an exit node candidate.
if (srcBlock.isBlock()) {
if (!srcBlock.hasChildren()) {
return;
}
... | void function(Node srcBlock, Node destBlock, Node ifNode, int exitType, @Nullable String labelName) { Node exitNodeParent = null; Node exitNode = null; if (srcBlock.isBlock()) { if (!srcBlock.hasChildren()) { return; } exitNodeParent = srcBlock; exitNode = exitNodeParent.getLastChild(); } else { exitNodeParent = ifNode... | /**
* Look for exits (returns, breaks, or continues, depending on the context) at
* the end of a block and removes them by moving the if node's siblings,
* if any, into the opposite condition block.
*
* @param srcBlock The block to inspect.
* @param destBlock The block to move sibling nodes into.
*... | Look for exits (returns, breaks, or continues, depending on the context) at the end of a block and removes them by moving the if node's siblings, if any, into the opposite condition block | tryMinimizeIfBlockExits | {
"repo_name": "lgeorgieff/closure-compiler",
"path": "src/com/google/javascript/jscomp/MinimizeExitPoints.java",
"license": "apache-2.0",
"size": 10335
} | [
"com.google.javascript.rhino.IR",
"com.google.javascript.rhino.Node",
"javax.annotation.Nullable"
] | import com.google.javascript.rhino.IR; import com.google.javascript.rhino.Node; import javax.annotation.Nullable; | import com.google.javascript.rhino.*; import javax.annotation.*; | [
"com.google.javascript",
"javax.annotation"
] | com.google.javascript; javax.annotation; | 1,471,009 |
public Player getPlayer() {
return player;
}
| Player function() { return player; } | /**
* Gets the player who cast the spell
*
* @return The player who cast the spell
*/ | Gets the player who cast the spell | getPlayer | {
"repo_name": "minnymin3/Zephyrus",
"path": "Zephyrus-Core/src/main/java/net/lordsofcode/zephyrus/events/PlayerPostCastSpellEvent.java",
"license": "gpl-3.0",
"size": 1025
} | [
"org.bukkit.entity.Player"
] | import org.bukkit.entity.Player; | import org.bukkit.entity.*; | [
"org.bukkit.entity"
] | org.bukkit.entity; | 2,482,854 |
void write(byte... data) throws IOException {
mUartDevice.write(data, data.length);
} | void write(byte... data) throws IOException { mUartDevice.write(data, data.length); } | /**
* Writes commands directly to the printer.
*
* @param data An array of bytes
*/ | Writes commands directly to the printer | write | {
"repo_name": "androidthings/contrib-drivers",
"path": "thermalprinter/src/main/java/com/google/android/things/contrib/driver/thermalprinter/CsnA2.java",
"license": "apache-2.0",
"size": 35410
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,371,778 |
if (isStandAlone) {
try {
// get the current path
String path = new java.io.File("").getAbsolutePath();
path = path.substring(0, path.lastIndexOf(File.separator));
// create the command line
String ... | if (isStandAlone) { try { String path = new java.io.File(STRrunSTRjavaSTR-jar", absoluteFile, Integer.toString(PORT)); processBuilder.redirectErrorStream(true); serverProcess = processBuilder.start(); } catch (IOException e) { e.printStackTrace(); System.exit(-1); } } } | /**
* Sets the up before class.
*/ | Sets the up before class | setUpBeforeClass | {
"repo_name": "curioustechizen/Californium",
"path": "cf-proxy/src/test/java/ch/ethz/inf/vs/californium/test/CoapServerTest.java",
"license": "bsd-3-clause",
"size": 15080
} | [
"java.io.File",
"java.io.IOException"
] | import java.io.File; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,758,014 |
public JcrNode node(String repository, String workspace, String path) throws RemoteException; | JcrNode function(String repository, String workspace, String path) throws RemoteException; | /**
* Gets node at the given path.
*
* @param repository
* @param workspace
* @param path
* @return
* @throws RemoteException
*/ | Gets node at the given path | node | {
"repo_name": "okulikov/modeshape",
"path": "web/modeshape-web-explorer/src/main/java/org/modeshape/web/client/JcrService.java",
"license": "apache-2.0",
"size": 11507
} | [
"org.modeshape.web.shared.JcrNode",
"org.modeshape.web.shared.RemoteException"
] | import org.modeshape.web.shared.JcrNode; import org.modeshape.web.shared.RemoteException; | import org.modeshape.web.shared.*; | [
"org.modeshape.web"
] | org.modeshape.web; | 2,844,211 |
private SwipeMode computeInputMode(long time, float x, float y, float dx, float dy) {
if (!mStacks[1].isDisplayable()) return SwipeMode.SEND_TO_STACK;
int currentIndex = getTabStackIndex();
if (currentIndex != getViewportParameters().getStackIndexAt(x, y)) {
return SwipeMode.SWIT... | SwipeMode function(long time, float x, float y, float dx, float dy) { if (!mStacks[1].isDisplayable()) return SwipeMode.SEND_TO_STACK; int currentIndex = getTabStackIndex(); if (currentIndex != getViewportParameters().getStackIndexAt(x, y)) { return SwipeMode.SWITCH_STACK; } float relativeX = mLastOnDownX - (x + dx); f... | /**
* Computes the input mode for drag and fling based on the first event position.
* @param time The current time of the app in ms.
* @param x The x layout position of the mouse (without the displacement).
* @param y The y layout position of the mouse (without the displacement).
* @param... | Computes the input mode for drag and fling based on the first event position | computeInputMode | {
"repo_name": "mogoweb/365browser",
"path": "app/src/main/java/org/chromium/chrome/browser/compositor/layouts/phone/StackLayout.java",
"license": "apache-2.0",
"size": 51520
} | [
"org.chromium.ui.base.LocalizationUtils"
] | import org.chromium.ui.base.LocalizationUtils; | import org.chromium.ui.base.*; | [
"org.chromium.ui"
] | org.chromium.ui; | 641,399 |
public Table getSystemTable(Session session, String name) {
return null;
} | Table function(Session session, String name) { return null; } | /**
* Retrieves a table with the specified name whose content may depend on
* the execution context indicated by the session argument as well as the
* current value of <code>withContent</code>. <p>
*
* @param session the context in which to produce the table
* @param name the name of the t... | Retrieves a table with the specified name whose content may depend on the execution context indicated by the session argument as well as the current value of <code>withContent</code>. | getSystemTable | {
"repo_name": "RabadanLab/Pegasus",
"path": "resources/hsqldb-2.2.7/hsqldb/src/org/hsqldb/dbinfo/DatabaseInformation.java",
"license": "mit",
"size": 19987
} | [
"org.hsqldb.Session",
"org.hsqldb.Table"
] | import org.hsqldb.Session; import org.hsqldb.Table; | import org.hsqldb.*; | [
"org.hsqldb"
] | org.hsqldb; | 312,074 |
@Override
public Adapter createProxyServiceSequenceAndEndpointContainerAdapter() {
if (proxyServiceSequenceAndEndpointContainerItemProvider == null) {
proxyServiceSequenceAndEndpointContainerItemProvider = new ProxyServiceSequenceAndEndpointContainerItemProvider(this);
}
ret... | Adapter function() { if (proxyServiceSequenceAndEndpointContainerItemProvider == null) { proxyServiceSequenceAndEndpointContainerItemProvider = new ProxyServiceSequenceAndEndpointContainerItemProvider(this); } return proxyServiceSequenceAndEndpointContainerItemProvider; } protected ProxyServiceFaultContainerItemProvide... | /**
* This creates an adapter for a {@link org.wso2.developerstudio.eclipse.gmf.esb.ProxyServiceSequenceAndEndpointContainer}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This creates an adapter for a <code>org.wso2.developerstudio.eclipse.gmf.esb.ProxyServiceSequenceAndEndpointContainer</code>. | createProxyServiceSequenceAndEndpointContainerAdapter | {
"repo_name": "prabushi/devstudio-tooling-esb",
"path": "plugins/org.wso2.developerstudio.eclipse.gmf.esb.edit/src/org/wso2/developerstudio/eclipse/gmf/esb/provider/EsbItemProviderAdapterFactory.java",
"license": "apache-2.0",
"size": 339597
} | [
"org.eclipse.emf.common.notify.Adapter"
] | import org.eclipse.emf.common.notify.Adapter; | import org.eclipse.emf.common.notify.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,300,253 |
@Test
public void execute_eventFlagsShuffled_reminderAdded() {
assertChangeBy(() -> getSearchResult("Event").get(0).getReminders().size(), 1,
() -> this.remindCommand.execute("remind Event n/Attend Workshop t/2000-01-01 05.00PM"));
ArrayList<Reminder> reminders = getSearchResult(... | void function() { assertChangeBy(() -> getSearchResult("Event").get(0).getReminders().size(), 1, () -> this.remindCommand.execute(STR)); ArrayList<Reminder> reminders = getSearchResult("Event").get(0).getReminders(); Reminder addedReminder = reminders.get(reminders.size() - 1); assertEquals(LocalDateTime.of(2000, 1, 1,... | /**
* Test that executing adding reminder in different order to a Event should
* return correct result.
*/ | Test that executing adding reminder in different order to a Event should return correct result | execute_eventFlagsShuffled_reminderAdded | {
"repo_name": "CS2103AUG2016-W11-C1/main",
"path": "src/test/java/linenux/command/RemindCommandTest.java",
"license": "mit",
"size": 13338
} | [
"java.time.LocalDateTime",
"java.util.ArrayList",
"org.junit.Assert"
] | import java.time.LocalDateTime; import java.util.ArrayList; import org.junit.Assert; | import java.time.*; import java.util.*; import org.junit.*; | [
"java.time",
"java.util",
"org.junit"
] | java.time; java.util; org.junit; | 640,360 |
factory.addClass(Chmod.class, "-chmod");
factory.addClass(Chown.class, "-chown");
factory.addClass(Chgrp.class, "-chgrp");
}
public static class Chmod extends FsShellPermissions {
public static final String NAME = "chmod";
public static final String USAGE = "[-R] <MODE[,MODE]... | OCTALMODE> PAT... | factory.addClass(Chmod.class, STR); factory.addClass(Chown.class, STR); factory.addClass(Chgrp.class, STR); } public static class Chmod extends FsShellPermissions { public static final String NAME = "chmod"; public static final String USAGE = STR; public static final String DESCRIPTION = STR + STR + STR + STR + STR + S... | /**
* Register the permission related commands with the factory
* @param factory the command factory
*/ | Register the permission related commands with the factory | registerCommands | {
"repo_name": "lukmajercak/hadoop",
"path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FsShellPermissions.java",
"license": "apache-2.0",
"size": 8541
} | [
"org.apache.hadoop.fs.permission.ChmodParser"
] | import org.apache.hadoop.fs.permission.ChmodParser; | import org.apache.hadoop.fs.permission.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,166,930 |
public void setRaster(WritableRaster r) {
raster = r;
DataBuffer db = r.getDataBuffer();
data = ba.getData(db);
ba.addDataBufferListener(db, this);
if (surfaceDataPtr != 0) {
setImageSize(surfaceDataPtr, r.getWidth(), r.getHeight());
}
this... | void function(WritableRaster r) { raster = r; DataBuffer db = r.getDataBuffer(); data = ba.getData(db); ba.addDataBufferListener(db, this); if (surfaceDataPtr != 0) { setImageSize(surfaceDataPtr, r.getWidth(), r.getHeight()); } this.width = r.getWidth(); this.height = r.getHeight(); } | /**
* Supposes that new raster is compatible with an old one
* @param r
*/ | Supposes that new raster is compatible with an old one | setRaster | {
"repo_name": "shannah/cn1",
"path": "Ports/iOSPort/xmlvm/apache-harmony-6.0-src-r991881/classlib/modules/awt/src/main/java/common/org/apache/harmony/awt/gl/ImageSurface.java",
"license": "gpl-2.0",
"size": 11173
} | [
"java.awt.image.DataBuffer",
"java.awt.image.WritableRaster"
] | import java.awt.image.DataBuffer; import java.awt.image.WritableRaster; | import java.awt.image.*; | [
"java.awt"
] | java.awt; | 122,401 |
int maxFieldFound = getMaxDeclaredFieldNumber(DecryptedGroupChange.class);
assertEquals("DecryptedGroupUtil and its tests need updating to account for new fields on " + DecryptedGroupChange.class.getName(),
21, maxFieldFound);
} | int maxFieldFound = getMaxDeclaredFieldNumber(DecryptedGroupChange.class); assertEquals(STR + DecryptedGroupChange.class.getName(), 21, maxFieldFound); } | /**
* Reflects over the generated protobuf class and ensures that no new fields have been added since we wrote this.
* <p>
* If we didn't, newly added fields would easily affect {@link DecryptedGroupUtil}'s ability to detect non-empty change states.
*/ | Reflects over the generated protobuf class and ensures that no new fields have been added since we wrote this. If we didn't, newly added fields would easily affect <code>DecryptedGroupUtil</code>'s ability to detect non-empty change states | ensure_DecryptedGroupUtil_knows_about_all_fields_of_DecryptedGroupChange | {
"repo_name": "Turasa/libsignal-service-java",
"path": "service/src/test/java/org/whispersystems/signalservice/api/groupsv2/DecryptedGroupUtil_empty_Test.java",
"license": "gpl-3.0",
"size": 11133
} | [
"org.junit.Assert",
"org.signal.storageservice.protos.groups.local.DecryptedGroupChange",
"org.whispersystems.signalservice.api.groupsv2.ProtobufTestUtils"
] | import org.junit.Assert; import org.signal.storageservice.protos.groups.local.DecryptedGroupChange; import org.whispersystems.signalservice.api.groupsv2.ProtobufTestUtils; | import org.junit.*; import org.signal.storageservice.protos.groups.local.*; import org.whispersystems.signalservice.api.groupsv2.*; | [
"org.junit",
"org.signal.storageservice",
"org.whispersystems.signalservice"
] | org.junit; org.signal.storageservice; org.whispersystems.signalservice; | 256,222 |
public static String toUnicode(String s) {
if (s == null) return null;
try {
s = new String(s.getBytes(COMMON_ENCODING), UNICODE);
} catch (UnsupportedEncodingException e) {
log.error(e);
}
return s.trim();
}
| static String function(String s) { if (s == null) return null; try { s = new String(s.getBytes(COMMON_ENCODING), UNICODE); } catch (UnsupportedEncodingException e) { log.error(e); } return s.trim(); } | /**
* Converts a string to unicode
* @param s
* @return
*/ | Converts a string to unicode | toUnicode | {
"repo_name": "TeamCohen/SEAL",
"path": "src/com/rcwang/seal/util/Helper.java",
"license": "apache-2.0",
"size": 16751
} | [
"java.io.UnsupportedEncodingException"
] | import java.io.UnsupportedEncodingException; | import java.io.*; | [
"java.io"
] | java.io; | 1,374,930 |
@POST
@Path("mappers")
@Consumes(MediaType.APPLICATION_JSON)
public Response addMapper(UserFederationMapperRepresentation mapper) {
auth.requireManage();
if (federationProviderModel == null) {
throw new NotFoundException("Could not find federation provider");
}
... | @Path(STR) @Consumes(MediaType.APPLICATION_JSON) Response function(UserFederationMapperRepresentation mapper) { auth.requireManage(); if (federationProviderModel == null) { throw new NotFoundException(STR); } UserFederationMapperModel model = RepresentationToModel.toModel(realm, mapper); validateModel(model); model = r... | /**
* Create a mapper
*
* @param mapper
* @return
*/ | Create a mapper | addMapper | {
"repo_name": "dbarentine/keycloak",
"path": "services/src/main/java/org/keycloak/services/resources/admin/UserFederationProviderResource.java",
"license": "apache-2.0",
"size": 17097
} | [
"javax.ws.rs.Consumes",
"javax.ws.rs.Path",
"javax.ws.rs.core.MediaType",
"javax.ws.rs.core.Response",
"org.jboss.resteasy.spi.NotFoundException",
"org.keycloak.events.admin.OperationType",
"org.keycloak.models.UserFederationMapperModel",
"org.keycloak.models.utils.RepresentationToModel",
"org.keycl... | import javax.ws.rs.Consumes; import javax.ws.rs.Path; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.jboss.resteasy.spi.NotFoundException; import org.keycloak.events.admin.OperationType; import org.keycloak.models.UserFederationMapperModel; import org.keycloak.models.utils.Representatio... | import javax.ws.rs.*; import javax.ws.rs.core.*; import org.jboss.resteasy.spi.*; import org.keycloak.events.admin.*; import org.keycloak.models.*; import org.keycloak.models.utils.*; import org.keycloak.representations.idm.*; | [
"javax.ws",
"org.jboss.resteasy",
"org.keycloak.events",
"org.keycloak.models",
"org.keycloak.representations"
] | javax.ws; org.jboss.resteasy; org.keycloak.events; org.keycloak.models; org.keycloak.representations; | 757,433 |
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
}
| void function(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); } | /**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This adds <code>org.eclipse.emf.edit.command.CommandParameter</code>s describing the children that can be created under this object. | collectNewChildDescriptors | {
"repo_name": "MenthorTools/ontouml-metamodel",
"path": "net.menthor.onto2.ontouml.edit/src-gen/net/menthor/onto2/ontouml/provider/EndPointItemProvider.java",
"license": "mit",
"size": 6879
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,396,092 |
@Test
@WithSystemProperty(key = IGNITE_CLUSTER_NAME, value = "TEST_CLUSTER_NAME")
public void testDeactivateWithCheckClusterNameInConfirmationBySystemProperty() throws Exception {
IgniteEx igniteEx = startGrid(0);
assertFalse(igniteEx.cluster().active());
deactivateActiveOrNotCluste... | @WithSystemProperty(key = IGNITE_CLUSTER_NAME, value = STR) void function() throws Exception { IgniteEx igniteEx = startGrid(0); assertFalse(igniteEx.cluster().active()); deactivateActiveOrNotClusterWithCheckClusterNameInConfirmation(igniteEx, STR); } | /**
* Test the deactivation command on the active and no cluster with checking
* the cluster name(which is set through the system property) in
* confirmation.
*
* @throws Exception If failed.
* */ | Test the deactivation command on the active and no cluster with checking the cluster name(which is set through the system property) in confirmation | testDeactivateWithCheckClusterNameInConfirmationBySystemProperty | {
"repo_name": "andrey-kuznetsov/ignite",
"path": "modules/core/src/test/java/org/apache/ignite/util/GridCommandHandlerTest.java",
"license": "apache-2.0",
"size": 67072
} | [
"org.apache.ignite.internal.IgniteEx",
"org.apache.ignite.testframework.junits.WithSystemProperty"
] | import org.apache.ignite.internal.IgniteEx; import org.apache.ignite.testframework.junits.WithSystemProperty; | import org.apache.ignite.internal.*; import org.apache.ignite.testframework.junits.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 2,718,168 |
public void write(byte[] b) throws IOException {
write(b, 0, b.length);
} | void function(byte[] b) throws IOException { write(b, 0, b.length); } | /**
* Delegates to the three-arg version.
* @param b the bytearray to write.
* @throws IOException if there is a problem.
*/ | Delegates to the three-arg version | write | {
"repo_name": "BIORIMP/biorimp",
"path": "BIO-RIMP/test_data/code/antapache/src/main/org/apache/tools/ant/util/LazyFileOutputStream.java",
"license": "gpl-2.0",
"size": 4944
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,882,692 |
public boolean hit(Rectangle rect, Shape s, boolean onStroke) {
return s.intersects(rect);
} | boolean function(Rectangle rect, Shape s, boolean onStroke) { return s.intersects(rect); } | /**
* Checks whether or not the specified Shape intersects the specified
* Rectangle, which is in device space.
*/ | Checks whether or not the specified Shape intersects the specified Rectangle, which is in device space | hit | {
"repo_name": "OpenSourcePhysics/osp",
"path": "src/org/jibble/epsgraphics/EpsGraphics2D.java",
"license": "gpl-3.0",
"size": 40716
} | [
"java.awt.Rectangle",
"java.awt.Shape"
] | import java.awt.Rectangle; import java.awt.Shape; | import java.awt.*; | [
"java.awt"
] | java.awt; | 117,300 |
public Map<String, String> getSystemProperties() {
return ImmutableMap.copyOf(systemProperties);
} | Map<String, String> function() { return ImmutableMap.copyOf(systemProperties); } | /**
* Retrieves Java <code>-D</code> style options as map
* @return a map for Java options
*/ | Retrieves Java <code>-D</code> style options as map | getSystemProperties | {
"repo_name": "wavesoftware/java-gasper",
"path": "src/main/java/pl/wavesoftware/gasper/internal/Settings.java",
"license": "apache-2.0",
"size": 3104
} | [
"com.google.common.collect.ImmutableMap",
"java.util.Map"
] | import com.google.common.collect.ImmutableMap; import java.util.Map; | import com.google.common.collect.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 967,735 |
private void applyDemoOptionsToClusterkrafOptions(
com.twotoasters.clusterkraf.Options options) {
options.setTransitionDuration(this.options.transitionDuration);
Interpolator interpolator = null;
try {
interpolator = (Interpolator) Class.forName(
this.options.transitionInterpolator).newInstance(... | void function( com.twotoasters.clusterkraf.Options options) { options.setTransitionDuration(this.options.transitionDuration); Interpolator interpolator = null; try { interpolator = (Interpolator) Class.forName( this.options.transitionInterpolator).newInstance(); } catch (InstantiationException e) { e.printStackTrace();... | /**
* Applies the sample.SampleActivity.Options chosen in Normal or Advanced
* mode menus to the clusterkraf.Options which will be used to construct our
* Clusterkraf instance
*
* @param options
*/ | Applies the sample.SampleActivity.Options chosen in Normal or Advanced mode menus to the clusterkraf.Options which will be used to construct our Clusterkraf instance | applyDemoOptionsToClusterkrafOptions | {
"repo_name": "actgov/Mobile-Canberra",
"path": "Mobile Canberra Android/src/com/imagineteam/mobilecanberraphase2/MapActivity.java",
"license": "mit",
"size": 37541
} | [
"android.view.animation.Interpolator",
"com.imagineteam.dataobjects.ToastedMarkerOptionsChooser",
"com.imagineteam.dataobjects.ToastedOnMarkerClickDownstreamListener"
] | import android.view.animation.Interpolator; import com.imagineteam.dataobjects.ToastedMarkerOptionsChooser; import com.imagineteam.dataobjects.ToastedOnMarkerClickDownstreamListener; | import android.view.animation.*; import com.imagineteam.dataobjects.*; | [
"android.view",
"com.imagineteam.dataobjects"
] | android.view; com.imagineteam.dataobjects; | 1,626,085 |
public File getPath() {
return path;
} | File function() { return path; } | /**
* Returns the path of the music folder.
*
* @return The path of the music folder.
*/ | Returns the path of the music folder | getPath | {
"repo_name": "Booksonic-Server/madsonic-main",
"path": "src/main/java/org/madsonic/domain/MusicFolder.java",
"license": "gpl-3.0",
"size": 7928
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,504,055 |
public Vertex vertexFromJson(final JsonNode json) throws IOException {
final Map<String, Object> props = readProperties(json, true, this.hasEmbeddedTypes);
final Object vertexId = getTypedValueFromJsonNode(json.get(GraphSONTokens._ID));
final Vertex v = factory.createVertex(vertexId);
... | Vertex function(final JsonNode json) throws IOException { final Map<String, Object> props = readProperties(json, true, this.hasEmbeddedTypes); final Object vertexId = getTypedValueFromJsonNode(json.get(GraphSONTokens._ID)); final Vertex v = factory.createVertex(vertexId); for (Map.Entry<String, Object> entry : props.en... | /**
* Creates a vertex from GraphSON using settings supplied in the constructor.
*/ | Creates a vertex from GraphSON using settings supplied in the constructor | vertexFromJson | {
"repo_name": "echinopsii/net.echinopsii.3rdparty.blueprints",
"path": "blueprints-core/src/main/java/com/tinkerpop/blueprints/util/io/graphson/GraphSONUtility.java",
"license": "bsd-3-clause",
"size": 37947
} | [
"com.fasterxml.jackson.databind.JsonNode",
"com.tinkerpop.blueprints.Vertex",
"java.io.IOException",
"java.util.Map"
] | import com.fasterxml.jackson.databind.JsonNode; import com.tinkerpop.blueprints.Vertex; import java.io.IOException; import java.util.Map; | import com.fasterxml.jackson.databind.*; import com.tinkerpop.blueprints.*; import java.io.*; import java.util.*; | [
"com.fasterxml.jackson",
"com.tinkerpop.blueprints",
"java.io",
"java.util"
] | com.fasterxml.jackson; com.tinkerpop.blueprints; java.io; java.util; | 383,317 |
private void authenticateClient(OAuthClientAuthenticator oAuthClientAuthenticator,
OAuthClientAuthnContext oAuthClientAuthnContext, HttpServletRequest request,
Map<String, List> bodyContentMap) throws OAuthClientAuthnException {
boolea... | void function(OAuthClientAuthenticator oAuthClientAuthenticator, OAuthClientAuthnContext oAuthClientAuthnContext, HttpServletRequest request, Map<String, List> bodyContentMap) throws OAuthClientAuthnException { boolean isAuthenticated = oAuthClientAuthenticator.authenticateClient(request, bodyContentMap, oAuthClientAut... | /**
* Authenticate an OAuth client using a given client authenticator.
*
* @param oAuthClientAuthenticator OAuth client authenticator.
* @param oAuthClientAuthnContext OAuth client authentication context.
* @param request Incoming HttpServletRequest.
* @param bodyContentM... | Authenticate an OAuth client using a given client authenticator | authenticateClient | {
"repo_name": "darshanasbg/identity-inbound-auth-oauth",
"path": "components/org.wso2.carbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/client/authentication/OAuthClientAuthnService.java",
"license": "apache-2.0",
"size": 11682
} | [
"java.util.List",
"java.util.Map",
"javax.servlet.http.HttpServletRequest",
"org.wso2.carbon.identity.oauth.common.OAuth2ErrorCodes",
"org.wso2.carbon.identity.oauth2.bean.OAuthClientAuthnContext"
] | import java.util.List; import java.util.Map; import javax.servlet.http.HttpServletRequest; import org.wso2.carbon.identity.oauth.common.OAuth2ErrorCodes; import org.wso2.carbon.identity.oauth2.bean.OAuthClientAuthnContext; | import java.util.*; import javax.servlet.http.*; import org.wso2.carbon.identity.oauth.common.*; import org.wso2.carbon.identity.oauth2.bean.*; | [
"java.util",
"javax.servlet",
"org.wso2.carbon"
] | java.util; javax.servlet; org.wso2.carbon; | 2,348,608 |
private static Scene dbToScene(Cursor c) throws Exception {
long id = c.getLong(0);
long apartmentId = c.getLong(1);
String name = c.getString(2);
int position = c.getInt(3);
Scene scene = new Scene(id, apartmentId, name);
for (SceneItem item : SceneItemHandler.getSc... | static Scene function(Cursor c) throws Exception { long id = c.getLong(0); long apartmentId = c.getLong(1); String name = c.getString(2); int position = c.getInt(3); Scene scene = new Scene(id, apartmentId, name); for (SceneItem item : SceneItemHandler.getSceneItems(scene.getId())) { scene.addSceneItem(item); } return ... | /**
* Creates a Scene Object out of Database information
*
* @param c cursor pointing to a Scene database entry
* @return Scene
*/ | Creates a Scene Object out of Database information | dbToScene | {
"repo_name": "Power-Switch/PowerSwitch_Android",
"path": "Smartphone/src/main/java/eu/power_switch/database/handler/SceneHandler.java",
"license": "gpl-3.0",
"size": 6134
} | [
"android.database.Cursor",
"eu.power_switch.obj.Scene",
"eu.power_switch.obj.SceneItem"
] | import android.database.Cursor; import eu.power_switch.obj.Scene; import eu.power_switch.obj.SceneItem; | import android.database.*; import eu.power_switch.obj.*; | [
"android.database",
"eu.power_switch.obj"
] | android.database; eu.power_switch.obj; | 161,707 |
public boolean containsInterval(ExecutionInterval begin, ExecutionInterval end) {
if (begin.isAfterOrEquals(getBeginExecutionPeriod())) {
return (getEndExecutionPeriod() == null) || (end != null && !end.isAfter(getEndExecutionPeriod()));
} else {
return false;
}
} | boolean function(ExecutionInterval begin, ExecutionInterval end) { if (begin.isAfterOrEquals(getBeginExecutionPeriod())) { return (getEndExecutionPeriod() == null) (end != null && !end.isAfter(getEndExecutionPeriod())); } else { return false; } } | /**
*
* Beware of {@link #contains(ExecutionSemester, ExecutionSemester)} method because it only checks for intersection, not a
* full
* contains.
*
* This method ensures that begin and end are contained within context interval
*
* @return
*/ | Beware of <code>#contains(ExecutionSemester, ExecutionSemester)</code> method because it only checks for intersection, not a full contains. This method ensures that begin and end are contained within context interval | containsInterval | {
"repo_name": "cfscosta/fenix",
"path": "src/main/java/org/fenixedu/academic/domain/degreeStructure/Context.java",
"license": "lgpl-3.0",
"size": 21159
} | [
"org.fenixedu.academic.domain.ExecutionInterval"
] | import org.fenixedu.academic.domain.ExecutionInterval; | import org.fenixedu.academic.domain.*; | [
"org.fenixedu.academic"
] | org.fenixedu.academic; | 2,602,015 |
public List<Itinerary> getItineraries() {
return _type.getItineraries();
} | List<Itinerary> function() { return _type.getItineraries(); } | /**
* Gets all itineraries the passenger has
*
* @return an read-only list of itineraries
* @see Passenger.PassengerType#getItineraries()
*/ | Gets all itineraries the passenger has | getItineraries | {
"repo_name": "RafaelPAndrade/LEIC-A-IST",
"path": "PO/Proj/mmt-core/src/mmt/Passenger.java",
"license": "mit",
"size": 9473
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 697,628 |
public NetworkInterfaceLoadBalancersClient getNetworkInterfaceLoadBalancers() {
return this.networkInterfaceLoadBalancers;
}
private final NetworkInterfaceTapConfigurationsClient networkInterfaceTapConfigurations; | NetworkInterfaceLoadBalancersClient function() { return this.networkInterfaceLoadBalancers; } private final NetworkInterfaceTapConfigurationsClient networkInterfaceTapConfigurations; | /**
* Gets the NetworkInterfaceLoadBalancersClient object to access its operations.
*
* @return the NetworkInterfaceLoadBalancersClient object.
*/ | Gets the NetworkInterfaceLoadBalancersClient object to access its operations | getNetworkInterfaceLoadBalancers | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanagerhybrid/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/NetworkManagementClientImpl.java",
"license": "mit",
"size": 60665
} | [
"com.azure.resourcemanager.network.fluent.NetworkInterfaceLoadBalancersClient",
"com.azure.resourcemanager.network.fluent.NetworkInterfaceTapConfigurationsClient"
] | import com.azure.resourcemanager.network.fluent.NetworkInterfaceLoadBalancersClient; import com.azure.resourcemanager.network.fluent.NetworkInterfaceTapConfigurationsClient; | import com.azure.resourcemanager.network.fluent.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 1,107,360 |
static Session fromSessionToken(UUID sesTokId) {
return new Session(UUID.randomUUID(), sesTokId);
} | static Session fromSessionToken(UUID sesTokId) { return new Session(UUID.randomUUID(), sesTokId); } | /**
* Static constructor.
*
* @param sesTokId Session token ID.
* @return New session instance with random client ID and given session ID.
*/ | Static constructor | fromSessionToken | {
"repo_name": "NSAmelchev/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/rest/GridRestProcessor.java",
"license": "apache-2.0",
"size": 43655
} | [
"java.util.UUID"
] | import java.util.UUID; | import java.util.*; | [
"java.util"
] | java.util; | 2,915,781 |
public DocTemplateFinder getDocTemplateFinder() {
return docTemplateFinder;
} | DocTemplateFinder function() { return docTemplateFinder; } | /**
* Returns the doc template finder.
*
* @return the doc template finder
*/ | Returns the doc template finder | getDocTemplateFinder | {
"repo_name": "openegovplatform/OEPv2",
"path": "oep-core-dossiermgt-portlet/docroot/WEB-INF/src/org/oep/core/dossiermgt/service/base/DocTemplateServiceBaseImpl.java",
"license": "apache-2.0",
"size": 52581
} | [
"org.oep.core.dossiermgt.service.persistence.DocTemplateFinder"
] | import org.oep.core.dossiermgt.service.persistence.DocTemplateFinder; | import org.oep.core.dossiermgt.service.persistence.*; | [
"org.oep.core"
] | org.oep.core; | 1,742,201 |
@Override
public synchronized void onGetCompleted(List<OcHeaderOption> headerOptionList,
OcRepresentation ocRepresentation) {
logMessage("Got a response from " + ocRepresentation.getUri());
} | synchronized void function(List<OcHeaderOption> headerOptionList, OcRepresentation ocRepresentation) { logMessage(STR + ocRepresentation.getUri()); } | /**
* An event handler to be executed whenever a "get" request completes successfully
*
* @param headerOptionList list of the header options
* @param ocRepresentation representation of a resource
*/ | An event handler to be executed whenever a "get" request completes successfully | onGetCompleted | {
"repo_name": "kadasaikumar/iotivity-1.2.1",
"path": "android/examples/fridgeclient/src/main/java/org/iotivity/base/examples/FridgeClient.java",
"license": "gpl-3.0",
"size": 9998
} | [
"java.util.List",
"org.iotivity.base.OcHeaderOption",
"org.iotivity.base.OcRepresentation"
] | import java.util.List; import org.iotivity.base.OcHeaderOption; import org.iotivity.base.OcRepresentation; | import java.util.*; import org.iotivity.base.*; | [
"java.util",
"org.iotivity.base"
] | java.util; org.iotivity.base; | 2,072,507 |
public Timestamp getDateLastRun ()
{
return (Timestamp)get_Value(COLUMNNAME_DateLastRun);
} | Timestamp function () { return (Timestamp)get_Value(COLUMNNAME_DateLastRun); } | /** Get Date last run.
@return Date the process was last run.
*/ | Get Date last run | getDateLastRun | {
"repo_name": "geneos/adempiere",
"path": "base/src/org/compiere/model/X_AD_LdapProcessor.java",
"license": "gpl-2.0",
"size": 7195
} | [
"java.sql.Timestamp"
] | import java.sql.Timestamp; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,114,313 |
int prepareTestSession(final TestTree tree); | int prepareTestSession(final TestTree tree); | /**
* Prepares a test session with the given {@link TestTree test tree} argument.
*
* @param tree
* the test tree for the test session.
* @return port number used
*/ | Prepares a test session with the given <code>TestTree test tree</code> argument | prepareTestSession | {
"repo_name": "lbeurerkellner/n4js",
"path": "plugins/org.eclipse.n4js.tester/src/org/eclipse/n4js/tester/TesterFacade.java",
"license": "epl-1.0",
"size": 1320
} | [
"org.eclipse.n4js.tester.domain.TestTree"
] | import org.eclipse.n4js.tester.domain.TestTree; | import org.eclipse.n4js.tester.domain.*; | [
"org.eclipse.n4js"
] | org.eclipse.n4js; | 2,103,279 |
@Nullable
public static Symbol getDeclaredSymbol(Tree tree) {
if (tree instanceof PackageTree) {
return getSymbol((PackageTree) tree);
}
if (tree instanceof TypeParameterTree) {
Type type = ((JCTypeParameter) tree).type;
return type == null ? null : type.tsym;
}
if (tree instan... | static Symbol function(Tree tree) { if (tree instanceof PackageTree) { return getSymbol((PackageTree) tree); } if (tree instanceof TypeParameterTree) { Type type = ((JCTypeParameter) tree).type; return type == null ? null : type.tsym; } if (tree instanceof ClassTree) { return getSymbol((ClassTree) tree); } if (tree ins... | /**
* Gets the symbol declared by a tree. Returns null if {@code tree} does not declare a symbol or
* is null.
*/ | Gets the symbol declared by a tree. Returns null if tree does not declare a symbol or is null | getDeclaredSymbol | {
"repo_name": "google/error-prone",
"path": "check_api/src/main/java/com/google/errorprone/util/ASTHelpers.java",
"license": "apache-2.0",
"size": 89646
} | [
"com.sun.source.tree.ClassTree",
"com.sun.source.tree.MethodTree",
"com.sun.source.tree.PackageTree",
"com.sun.source.tree.Tree",
"com.sun.source.tree.TypeParameterTree",
"com.sun.source.tree.VariableTree",
"com.sun.tools.javac.code.Symbol",
"com.sun.tools.javac.code.Type",
"com.sun.tools.javac.tree... | import com.sun.source.tree.ClassTree; import com.sun.source.tree.MethodTree; import com.sun.source.tree.PackageTree; import com.sun.source.tree.Tree; import com.sun.source.tree.TypeParameterTree; import com.sun.source.tree.VariableTree; import com.sun.tools.javac.code.Symbol; import com.sun.tools.javac.code.Type; impor... | import com.sun.source.tree.*; import com.sun.tools.javac.code.*; import com.sun.tools.javac.tree.*; | [
"com.sun.source",
"com.sun.tools"
] | com.sun.source; com.sun.tools; | 1,305,128 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Response<Flux<ByteBuffer>>> listRoutesTableWithResponseAsync(
String resourceGroupName, String circuitName, String peeringName, String devicePath, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Flux<ByteBuffer>>> function( String resourceGroupName, String circuitName, String peeringName, String devicePath, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (resourceGroupName == null... | /**
* Gets the currently advertised routes table associated with the express route circuit in a resource group.
*
* @param resourceGroupName The name of the resource group.
* @param circuitName The name of the express route circuit.
* @param peeringName The name of the peering.
* @param de... | Gets the currently advertised routes table associated with the express route circuit in a resource group | listRoutesTableWithResponseAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteCircuitsClientImpl.java",
"license": "mit",
"size": 143721
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.Context",
"java.nio.ByteBuffer"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import java.nio.ByteBuffer; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import java.nio.*; | [
"com.azure.core",
"java.nio"
] | com.azure.core; java.nio; | 2,427,413 |
public K header(String name, String value) {
if (headers == null) {
headers = new HashMap<String, String>();
}
headers.put(name, value);
return self();
} | K function(String name, String value) { if (headers == null) { headers = new HashMap<String, String>(); } headers.put(name, value); return self(); } | /**
* Set the header fields for the http request.
*
* @param name the name
* @param value the value
* @return self
*/ | Set the header fields for the http request | header | {
"repo_name": "bblue000/ExoPlayerDemo",
"path": "vsbase/src/main/java/com/androidquery/callback/AbstractAjaxCallback.java",
"license": "apache-2.0",
"size": 60679
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 779,158 |
@Test
public void whenFindItemByNameThenShowsItems() {
ByteArrayOutputStream out = new ByteArrayOutputStream();
System.setOut(new PrintStream(out));
ITracker tracker = new Tracker();
Item item1 = new Item("name", "desc1", 1);
Item item2 = new Item("name", "desc2", 1);
... | void function() { ByteArrayOutputStream out = new ByteArrayOutputStream(); System.setOut(new PrintStream(out)); ITracker tracker = new Tracker(); Item item1 = new Item("name", "desc1", 1); Item item2 = new Item("name", "desc2", 1); tracker.add(item1); tracker.add(item2); Input input = mock(Input.class); when(input.ask(... | /**
* Test for FindItemByName action.
*/ | Test for FindItemByName action | whenFindItemByNameThenShowsItems | {
"repo_name": "IvanBelyaev/ibelyaev",
"path": "chapter_002/src/test/java/ru/job4j/tracker/MenuTrackerTest.java",
"license": "apache-2.0",
"size": 4705
} | [
"java.io.ByteArrayOutputStream",
"java.io.PrintStream",
"org.hamcrest.MatcherAssert",
"org.hamcrest.core.Is",
"org.mockito.Mockito"
] | import java.io.ByteArrayOutputStream; import java.io.PrintStream; import org.hamcrest.MatcherAssert; import org.hamcrest.core.Is; import org.mockito.Mockito; | import java.io.*; import org.hamcrest.*; import org.hamcrest.core.*; import org.mockito.*; | [
"java.io",
"org.hamcrest",
"org.hamcrest.core",
"org.mockito"
] | java.io; org.hamcrest; org.hamcrest.core; org.mockito; | 1,958,809 |
@SystemApi(client = MODULE_LIBRARIES)
public static void setreuid(int ruid, int euid) throws ErrnoException { Libcore.os.setreuid(ruid, euid); } | @SystemApi(client = MODULE_LIBRARIES) public static void setreuid(int ruid, int euid) throws ErrnoException { Libcore.os.setreuid(ruid, euid); } | /**
* Set real and/or effective group ID of the calling process.
*
* See <a href="http://man7.org/linux/man-pages/man2/setregid.2.html">setregid(2)</a>.
*
* @param rgid real group ID
* @param egid effective group ID
* @throws ErrnoException one or more of the target group IDs is not v... | Set real and/or effective group ID of the calling process. See setregid(2) | setregid | {
"repo_name": "google/desugar_jdk_libs",
"path": "jdk11/src/libcore/luni/src/main/java/android/system/Os.java",
"license": "gpl-2.0",
"size": 48512
} | [
"android.annotation.SystemApi"
] | import android.annotation.SystemApi; | import android.annotation.*; | [
"android.annotation"
] | android.annotation; | 1,131,273 |
static public String getIntentAction(Intent aIntent) {
if (aIntent!=null)
return aIntent.getAction();
else
return null;
} | static String function(Intent aIntent) { if (aIntent!=null) return aIntent.getAction(); else return null; } | /**
* Get the intent's action, if any
*
* @param aIntent - the intent to extract the information from.
* @return Returns the action defined in the intent
*/ | Get the intent's action, if any | getIntentAction | {
"repo_name": "baracudda/androidBits",
"path": "lib_androidBits/src/main/java/com/blackmoonit/androidbits/content/BitsIntent.java",
"license": "apache-2.0",
"size": 9815
} | [
"android.content.Intent"
] | import android.content.Intent; | import android.content.*; | [
"android.content"
] | android.content; | 951,439 |
private void unwindPendingAcks(WalStateDistributedProcess proc) {
assert Thread.holdsLock(mux);
Iterator<WalStateAckMessage> iter = pendingAcks.iterator();
while (iter.hasNext()) {
WalStateAckMessage ackMsg = iter.next();
if (F.eq(proc.operationId(), ackMsg.operati... | void function(WalStateDistributedProcess proc) { assert Thread.holdsLock(mux); Iterator<WalStateAckMessage> iter = pendingAcks.iterator(); while (iter.hasNext()) { WalStateAckMessage ackMsg = iter.next(); if (F.eq(proc.operationId(), ackMsg.operationId())) { proc.onNodeFinished(ackMsg.senderNodeId(), ackMsg); iter.remo... | /**
* Unwind pending ack messages for the given distributed process.
*
* @param proc Process.
*/ | Unwind pending ack messages for the given distributed process | unwindPendingAcks | {
"repo_name": "psadusumilli/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/WalStateManager.java",
"license": "apache-2.0",
"size": 31670
} | [
"java.util.Iterator",
"org.apache.ignite.internal.util.typedef.F"
] | import java.util.Iterator; import org.apache.ignite.internal.util.typedef.F; | import java.util.*; import org.apache.ignite.internal.util.typedef.*; | [
"java.util",
"org.apache.ignite"
] | java.util; org.apache.ignite; | 153,930 |
public StorageAccount withLastGeoFailoverTime(DateTime lastGeoFailoverTime) {
this.lastGeoFailoverTime = lastGeoFailoverTime;
return this;
} | StorageAccount function(DateTime lastGeoFailoverTime) { this.lastGeoFailoverTime = lastGeoFailoverTime; return this; } | /**
* Set the lastGeoFailoverTime value.
*
* @param lastGeoFailoverTime the lastGeoFailoverTime value to set
* @return the StorageAccount object itself.
*/ | Set the lastGeoFailoverTime value | withLastGeoFailoverTime | {
"repo_name": "dsgouda/autorest",
"path": "Samples/3c-guards/OtherClient/models/StorageAccount.java",
"license": "mit",
"size": 9214
} | [
"org.joda.time.DateTime"
] | import org.joda.time.DateTime; | import org.joda.time.*; | [
"org.joda.time"
] | org.joda.time; | 2,211,241 |
public static String getMimeType(final File file) {
if (file != null) {
return ImportDataFileInfo.getMimeType(file.getName());
} else {
return null;
}
} | static String function(final File file) { if (file != null) { return ImportDataFileInfo.getMimeType(file.getName()); } else { return null; } } | /**
* Returns mime type for an extension.
* @param file the file to check
* @return the mimeType;
*/ | Returns mime type for an extension | getMimeType | {
"repo_name": "specify/specify6",
"path": "src/edu/ku/brc/specify/tasks/subpane/wb/ImportDataFileInfo.java",
"license": "gpl-2.0",
"size": 7636
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,897,840 |
@Test(expected = ParseException.class)
public void testIllustrateShortcutNoAliasDefined() throws Throwable {
String cmd = "\\i";
ByteArrayInputStream cmdstream = new ByteArrayInputStream(cmd.getBytes());
InputStreamReader reader = new InputStreamReader(cmdstream);
Grunt grunt =... | @Test(expected = ParseException.class) void function() throws Throwable { String cmd = "\\i"; ByteArrayInputStream cmdstream = new ByteArrayInputStream(cmd.getBytes()); InputStreamReader reader = new InputStreamReader(cmdstream); Grunt grunt = new Grunt(new BufferedReader(reader), context); grunt.exec(); } | /**
* When no alias is defined, exception is expected
*
* @throws Throwable
*/ | When no alias is defined, exception is expected | testIllustrateShortcutNoAliasDefined | {
"repo_name": "miyakawataku/piggybank-ltsv",
"path": "test/org/apache/pig/test/TestShortcuts.java",
"license": "apache-2.0",
"size": 11180
} | [
"java.io.BufferedReader",
"java.io.ByteArrayInputStream",
"java.io.InputStreamReader",
"org.apache.pig.tools.grunt.Grunt",
"org.apache.pig.tools.pigscript.parser.ParseException",
"org.junit.Test"
] | import java.io.BufferedReader; import java.io.ByteArrayInputStream; import java.io.InputStreamReader; import org.apache.pig.tools.grunt.Grunt; import org.apache.pig.tools.pigscript.parser.ParseException; import org.junit.Test; | import java.io.*; import org.apache.pig.tools.grunt.*; import org.apache.pig.tools.pigscript.parser.*; import org.junit.*; | [
"java.io",
"org.apache.pig",
"org.junit"
] | java.io; org.apache.pig; org.junit; | 1,469,324 |
final public void Text() throws ParseException {
ASTText jjtn000 = new ASTText(this, JJTTEXT);
boolean jjtc000 = true;
jjtree.openNodeScope(jjtn000);
try {
switch ((jj_ntk==-1)?jj_ntk():jj_ntk) {
case TEXT:
jj_consume_token(TEXT);
break;
case DOT:
jj... | final void function() throws ParseException { ASTText jjtn000 = new ASTText(this, JJTTEXT); boolean jjtc000 = true; jjtree.openNodeScope(jjtn000); try { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case TEXT: jj_consume_token(TEXT); break; case DOT: jj_consume_token(DOT); break; case RPAREN: jj_consume_token(RPAREN); break;... | /**
* This method is responsible for allowing
* all non-grammar text to pass through
* unscathed.
*/ | This method is responsible for allowing all non-grammar text to pass through unscathed | Text | {
"repo_name": "dotCMS/core",
"path": "dotCMS/src/main/java/org/apache/velocity/runtime/parser/Parser.java",
"license": "gpl-3.0",
"size": 105896
} | [
"org.apache.velocity.runtime.parser.node.ASTText"
] | import org.apache.velocity.runtime.parser.node.ASTText; | import org.apache.velocity.runtime.parser.node.*; | [
"org.apache.velocity"
] | org.apache.velocity; | 603,737 |
public static float getFloat(Context context, String key) {
return getFloat(context, key, -1);
} | static float function(Context context, String key) { return getFloat(context, key, -1); } | /**
* get float preferences
*
* @param context
* @param key The name of the preference to retrieve
* @return The preference value if it exists, or -1. Throws ClassCastException if there is a preference with this
* name that is not a float
* @see #getFloat(Context, String, flo... | get float preferences | getFloat | {
"repo_name": "a616707902/Commoner",
"path": "Commoner/library/src/main/java/com/example/chenpan/library/util/PreferencesUtils.java",
"license": "apache-2.0",
"size": 9751
} | [
"android.content.Context"
] | import android.content.Context; | import android.content.*; | [
"android.content"
] | android.content; | 2,306,652 |
public boolean subscribe(String mailboxName) throws IOException
{
return doCommand (IMAPCommand.SUBSCRIBE, mailboxName);
} | boolean function(String mailboxName) throws IOException { return doCommand (IMAPCommand.SUBSCRIBE, mailboxName); } | /**
* Send a SUBSCRIBE command to the server.
* @param mailboxName The mailbox name to subscribe to.
* @return {@code true} if the command was successful,{@code false} if not.
* @exception IOException If a network I/O error occurs.
*/ | Send a SUBSCRIBE command to the server | subscribe | {
"repo_name": "mohanaraosv/commons-net",
"path": "src/main/java/org/apache/commons/net/imap/IMAPClient.java",
"license": "apache-2.0",
"size": 21900
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 984,262 |
public void setRefEntityTypeValue(String refEntityTypeValue)
throws JNCException {
setRefEntityTypeValue(new YangString(refEntityTypeValue));
} | void function(String refEntityTypeValue) throws JNCException { setRefEntityTypeValue(new YangString(refEntityTypeValue)); } | /**
* Sets the value for child leaf "ref-entity-type",
* using a String value.
* @param refEntityTypeValue used during instantiation.
*/ | Sets the value for child leaf "ref-entity-type", using a String value | setRefEntityTypeValue | {
"repo_name": "jnpr-shinma/yangfile",
"path": "hitel/src/hctaEpc/mmeSgsn/statistics/gtpv2/Tunnel.java",
"license": "apache-2.0",
"size": 11327
} | [
"com.tailf.jnc.YangString"
] | import com.tailf.jnc.YangString; | import com.tailf.jnc.*; | [
"com.tailf.jnc"
] | com.tailf.jnc; | 1,534,704 |
protected void fireHierarchyChangeEvt(HierarchyChangeEvent evt) {
for (HierarchyChangeListener l : hierarchyListeners) {
l.hierarchyChangePerformed(evt);
}
} | void function(HierarchyChangeEvent evt) { for (HierarchyChangeListener l : hierarchyListeners) { l.hierarchyChangePerformed(evt); } } | /**
* Notify listeners of changes to this hierarchy
*/ | Notify listeners of changes to this hierarchy | fireHierarchyChangeEvt | {
"repo_name": "manuel-freire/ac2",
"path": "clover/src/main/java/es/ucm/fdi/clover/model/ClusterHierarchy.java",
"license": "gpl-3.0",
"size": 21005
} | [
"es.ucm.fdi.clover.event.HierarchyChangeEvent",
"es.ucm.fdi.clover.event.HierarchyChangeListener"
] | import es.ucm.fdi.clover.event.HierarchyChangeEvent; import es.ucm.fdi.clover.event.HierarchyChangeListener; | import es.ucm.fdi.clover.event.*; | [
"es.ucm.fdi"
] | es.ucm.fdi; | 1,167,605 |
void filterConsumer(Exchange exchange, WebServiceMessage response);
| void filterConsumer(Exchange exchange, WebServiceMessage response); | /**
* Calls filter for a consumer
*
* @param exchange the exchange
* @param response provided by the consumer
*/ | Calls filter for a consumer | filterConsumer | {
"repo_name": "YMartsynkevych/camel",
"path": "components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/filter/MessageFilter.java",
"license": "apache-2.0",
"size": 1629
} | [
"org.apache.camel.Exchange",
"org.springframework.ws.WebServiceMessage"
] | import org.apache.camel.Exchange; import org.springframework.ws.WebServiceMessage; | import org.apache.camel.*; import org.springframework.ws.*; | [
"org.apache.camel",
"org.springframework.ws"
] | org.apache.camel; org.springframework.ws; | 741,869 |
@Override
public GeoPos getGeoPos(final PixelPos pixelPos, GeoPos geoPos) {
initialize();
if (geoPos == null) {
geoPos = new GeoPos();
}
geoPos.setInvalid();
if (pixelPos.isValid()) {
int x0 = (int) Math.floor(pixelPos.getX());
int y0 =... | GeoPos function(final PixelPos pixelPos, GeoPos geoPos) { initialize(); if (geoPos == null) { geoPos = new GeoPos(); } geoPos.setInvalid(); if (pixelPos.isValid()) { int x0 = (int) Math.floor(pixelPos.getX()); int y0 = (int) Math.floor(pixelPos.getY()); if (x0 >= 0 && x0 < rasterWidth && y0 >= 0 && y0 < rasterHeight) {... | /**
* Returns the latitude and longitude value for a given pixel co-ordinate.
*
* @param pixelPos the pixel's co-ordinates given as x,y
* @param geoPos an instance of <code>GeoPos</code> to be used as retun value. If this parameter is
* <code>null</code>, the method creates a ... | Returns the latitude and longitude value for a given pixel co-ordinate | getGeoPos | {
"repo_name": "valgur/snap-engine",
"path": "snap-core/src/main/java/org/esa/snap/framework/datamodel/PixelGeoCoding.java",
"license": "gpl-3.0",
"size": 59963
} | [
"java.awt.Rectangle",
"java.awt.image.Raster"
] | import java.awt.Rectangle; import java.awt.image.Raster; | import java.awt.*; import java.awt.image.*; | [
"java.awt"
] | java.awt; | 2,263,710 |
public static Set<BookiiStick> getSticks() throws IOException {
File[] mounts;
if(OS.isWindows()) {
mounts = File.listRoots();
} else {
LinkedList<File> mountList = new LinkedList<File>();
Process process = new ProcessBuilder(OS.getMountCommand()).start();... | static Set<BookiiStick> function() throws IOException { File[] mounts; if(OS.isWindows()) { mounts = File.listRoots(); } else { LinkedList<File> mountList = new LinkedList<File>(); Process process = new ProcessBuilder(OS.getMountCommand()).start(); BufferedReader in = new BufferedReader(new InputStreamReader(process.ge... | /**
* get all the sticks
* @return set of stick objects
* @throws IOException
*/ | get all the sticks | getSticks | {
"repo_name": "Martin-Dames/Tingeltangel",
"path": "core/src/main/java/tingeltangel/core/BookiiStick.java",
"license": "gpl-2.0",
"size": 24165
} | [
"java.io.BufferedReader",
"java.io.File",
"java.io.IOException",
"java.io.InputStreamReader",
"java.util.HashSet",
"java.util.LinkedList",
"java.util.Set"
] | import java.io.BufferedReader; import java.io.File; import java.io.IOException; import java.io.InputStreamReader; import java.util.HashSet; import java.util.LinkedList; import java.util.Set; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,485,078 |
private GroupBean getData(Cursor cursor) {
int id = cursor.getInt(cursor.getColumnIndex(COL_ID));
String name = cursor.getString(cursor.getColumnIndex(COL_NAME));
return new GroupBean(id,name);
} | GroupBean function(Cursor cursor) { int id = cursor.getInt(cursor.getColumnIndex(COL_ID)); String name = cursor.getString(cursor.getColumnIndex(COL_NAME)); return new GroupBean(id,name); } | /**
* Method to get data from database cursor
* @param cursor is reference of database that have data
* @return or null if operation fails
*/ | Method to get data from database cursor | getData | {
"repo_name": "bshubham80/ThereVGo",
"path": "app/src/main/java/com/client/therevgo/services/database/GroupTable.java",
"license": "gpl-3.0",
"size": 6275
} | [
"android.database.Cursor"
] | import android.database.Cursor; | import android.database.*; | [
"android.database"
] | android.database; | 798,140 |
@Test
public void testGetVersionByProjectNameAndEvnName() throws Exception {
//prepare data
Map<String, String> ret = new HashMap<String, String>();
ret.put(ConfigServerService.TAG_KEY, TEST_TAG_VALUE);
ret.put(KEY1, VALUE1);
ret.put(KEY2, VALUE2);
... | void function() throws Exception { Map<String, String> ret = new HashMap<String, String>(); ret.put(ConfigServerService.TAG_KEY, TEST_TAG_VALUE); ret.put(KEY1, VALUE1); ret.put(KEY2, VALUE2); props = ret; ConfigCenterPropertyPlaceholderConfigurer ccpc; ccpc = new ConfigCenterPropertyPlaceholderConfigurer(); ccpc.setCcV... | /**
* test get version by project name and environment name
* @throws Exception all exception will throw out and mark failed at unit test.
*/ | test get version by project name and environment name | testGetVersionByProjectNameAndEvnName | {
"repo_name": "sdgdsffdsfff/configcenter-client",
"path": "src/test/java/com/baidu/cc/spring/ConfigCenterPropertyPlaceholderConfigurerTest.java",
"license": "apache-2.0",
"size": 22673
} | [
"com.baidu.cc.interfaces.ConfigServerService",
"java.util.HashMap",
"java.util.Map",
"org.springframework.beans.factory.support.DefaultListableBeanFactory"
] | import com.baidu.cc.interfaces.ConfigServerService; import java.util.HashMap; import java.util.Map; import org.springframework.beans.factory.support.DefaultListableBeanFactory; | import com.baidu.cc.interfaces.*; import java.util.*; import org.springframework.beans.factory.support.*; | [
"com.baidu.cc",
"java.util",
"org.springframework.beans"
] | com.baidu.cc; java.util; org.springframework.beans; | 2,677,778 |
public InputStream openZipEntryStream(File zipFile, String entryName) throws IOException; | InputStream function(File zipFile, String entryName) throws IOException; | /**
* Opens a stream from a given zip file and returns it.
*
* @param zipFile
* the {@link File} corresponding to the zip file to read from.
* @param entryName
* the name of the entry whose corresponding stream should be
* returned.
* @return the {@link InputStream} c... | Opens a stream from a given zip file and returns it | openZipEntryStream | {
"repo_name": "sapia-oss/corus",
"path": "modules/client/src/main/java/org/sapia/corus/client/services/file/FileSystemModule.java",
"license": "gpl-3.0",
"size": 5105
} | [
"java.io.File",
"java.io.IOException",
"java.io.InputStream"
] | import java.io.File; import java.io.IOException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 610,627 |
@Override
public void write(byte[] b, int off, int len) throws IOException {
while (len > 0) {
int c = Math.min(len, decoderIn.remaining());
decoderIn.put(b, off, c);
processInput(false);
len -= c;
off += c;
}
if (write... | void function(byte[] b, int off, int len) throws IOException { while (len > 0) { int c = Math.min(len, decoderIn.remaining()); decoderIn.put(b, off, c); processInput(false); len -= c; off += c; } if (writeImmediately) { flushOutput(); } } | /**
* Write bytes from the specified byte array to the stream.
*
* @param b the byte array containing the bytes to write
* @param off the start offset in the byte array
* @param len the number of bytes to write
* @throws IOException if an I/O error occurs
*/ | Write bytes from the specified byte array to the stream | write | {
"repo_name": "rytina/dukecon_appsgenerator",
"path": "org.apache.commons.io/source-bundle/org/apache/commons/io/output/WriterOutputStream.java",
"license": "epl-1.0",
"size": 11518
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,821,308 |
public void testRemove() {
ConcurrentHashMap map = map5();
map.remove(five);
assertEquals(4, map.size());
assertFalse(map.containsKey(five));
} | void function() { ConcurrentHashMap map = map5(); map.remove(five); assertEquals(4, map.size()); assertFalse(map.containsKey(five)); } | /**
* remove removes the correct key-value pair from the map
*/ | remove removes the correct key-value pair from the map | testRemove | {
"repo_name": "mirego/j2objc",
"path": "jre_emul/android/platform/libcore/jsr166-tests/src/test/java/jsr166/ConcurrentHashMapTest.java",
"license": "apache-2.0",
"size": 24611
} | [
"java.util.concurrent.ConcurrentHashMap"
] | import java.util.concurrent.ConcurrentHashMap; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 365,820 |
public final void setSummaryOff(@Nullable final CharSequence summaryOff) {
this.summaryOff = summaryOff;
} | final void function(@Nullable final CharSequence summaryOff) { this.summaryOff = summaryOff; } | /**
* Sets the summary, which should be shown when the preference is not checked.
*
* @param summaryOff
* The summary, which should be set, as an instance of the type {@link CharSequence} or
* null, if no dedicated summary should be shown when the preference is not checked
... | Sets the summary, which should be shown when the preference is not checked | setSummaryOff | {
"repo_name": "michael-rapp/AndroidMaterialPreferences",
"path": "library/src/main/java/de/mrapp/android/preference/AbstractTwoStatePreference.java",
"license": "apache-2.0",
"size": 18369
} | [
"androidx.annotation.Nullable"
] | import androidx.annotation.Nullable; | import androidx.annotation.*; | [
"androidx.annotation"
] | androidx.annotation; | 1,490,835 |
public void dropTable(PropertyBusinessObject cmp) throws IOException {
String tableName = getTableName(cmp);
execute("Drop table " + tableName);
} | void function(PropertyBusinessObject cmp) throws IOException { String tableName = getTableName(cmp); execute(STR + tableName); } | /**
* Drop a table matching the given property component
* @param cmp the business object
*/ | Drop a table matching the given property component | dropTable | {
"repo_name": "shannah/CodenameOne",
"path": "CodenameOne/src/com/codename1/properties/SQLMap.java",
"license": "gpl-2.0",
"size": 21745
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 905,545 |
public static String opToStr(int operator) {
switch (operator) {
case Token.BITOR:
return "|";
case Token.OR:
return "||";
case Token.BITXOR:
return "^";
case Token.AND:
return "&&";
case Token.BITAND:
return "&";
case Token.SHEQ:
... | static String function(int operator) { switch (operator) { case Token.BITOR: return " "; case Token.OR: return " "; case Token.BITXOR: return "^"; case Token.AND: return "&&"; case Token.BITAND: return "&"; case Token.SHEQ: return "==="; case Token.EQ: return "=="; case Token.NOT: return "!"; case Token.NE: return "!="... | /**
* Converts an operator's token value (see {@link Token}) to a string
* representation.
*
* @param operator the operator's token value to convert
* @return the string representation or {@code null} if the token value is
* not an operator
*/ | Converts an operator's token value (see <code>Token</code>) to a string representation | opToStr | {
"repo_name": "selkhateeb/closure-compiler",
"path": "src/com/google/javascript/jscomp/NodeUtil.java",
"license": "apache-2.0",
"size": 128800
} | [
"com.google.javascript.rhino.Token"
] | import com.google.javascript.rhino.Token; | import com.google.javascript.rhino.*; | [
"com.google.javascript"
] | com.google.javascript; | 433,330 |
public int getMetaFromState(IBlockState state)
{
return ((Integer)state.getValue(LEGACY_DATA)).intValue();
} | int function(IBlockState state) { return ((Integer)state.getValue(LEGACY_DATA)).intValue(); } | /**
* Convert the BlockState into the correct metadata value
*/ | Convert the BlockState into the correct metadata value | getMetaFromState | {
"repo_name": "SkidJava/BaseClient",
"path": "new_1.8.8/net/minecraft/block/BlockFlowerPot.java",
"license": "gpl-2.0",
"size": 17095
} | [
"net.minecraft.block.state.IBlockState"
] | import net.minecraft.block.state.IBlockState; | import net.minecraft.block.state.*; | [
"net.minecraft.block"
] | net.minecraft.block; | 2,671,692 |
@Test
public void equalsTest(){
boundObj = BoundsObject.newTightBound(x, num0);
boundObj2 = BoundsObject.newTightBound(x, num0);
boundObj.equals(boundObj2);
assertEquals(boundObj, boundObj2);
}
| void function(){ boundObj = BoundsObject.newTightBound(x, num0); boundObj2 = BoundsObject.newTightBound(x, num0); boundObj.equals(boundObj2); assertEquals(boundObj, boundObj2); } | /**
* Testing of BoundsObject.equals method,
* on the basis of equivalent BoundsObjects.
* Provides coverage of "if (object instanceof BoundsObject)"
* conditional statement for True.
*/ | Testing of BoundsObject.equals method, on the basis of equivalent BoundsObjects. Provides coverage of "if (object instanceof BoundsObject)" conditional statement for True | equalsTest | {
"repo_name": "byu-vv-lab/sarl",
"path": "test/edu/udel/cis/vsl/sarl/ideal/simplify/BoundsObjectEqualsTest.java",
"license": "gpl-3.0",
"size": 6833
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 885,604 |
public void collectionToSAX(Collection collection)
throws SAXException {
String ncollections;
String nresources;
String[] resources;
String[] collections;
try {
ncollections = Integer.toString(collection.getChildCollectionCount());
nresou... | void function(Collection collection) throws SAXException { String ncollections; String nresources; String[] resources; String[] collections; try { ncollections = Integer.toString(collection.getChildCollectionCount()); nresources = Integer.toString(collection.getResourceCount()); attributes.clear(); attributes.addAttrib... | /**
* Output SAX events listing the collection.
*
* @exception SAXException
*/ | Output SAX events listing the collection | collectionToSAX | {
"repo_name": "apache/cocoon",
"path": "blocks/cocoon-xmldb/cocoon-xmldb-impl/src/main/java/org/apache/cocoon/generation/XMLDBCollectionGenerator.java",
"license": "apache-2.0",
"size": 9626
} | [
"org.xml.sax.SAXException",
"org.xmldb.api.base.Collection"
] | import org.xml.sax.SAXException; import org.xmldb.api.base.Collection; | import org.xml.sax.*; import org.xmldb.api.base.*; | [
"org.xml.sax",
"org.xmldb.api"
] | org.xml.sax; org.xmldb.api; | 1,263,500 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.