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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
@Override
public void paintRoutes(SensorNode node, AbstractSensorAgent abstractagent,
Graphics2D g, VisualCanvas canvas) {
if (!node.isEnabled())
return;
BpaAgent agent = (BpaAgent) abstractagent;
switch (agent.getBpaState()) {
case BRIDGE: {
for(String fanout: agent.getFanoutNodes()) {
for(Sen... | void function(SensorNode node, AbstractSensorAgent abstractagent, Graphics2D g, VisualCanvas canvas) { if (!node.isEnabled()) return; BpaAgent agent = (BpaAgent) abstractagent; switch (agent.getBpaState()) { case BRIDGE: { for(String fanout: agent.getFanoutNodes()) { for(SensorNode candidate: sensorNetworkWorld.getSens... | /**
* Paints the routes.
*
* Changes the rules for the BridgeNode
*
* @param node
* @param abstractagent
* @param g
* @param canvas
*/ | Paints the routes. Changes the rules for the BridgeNode | paintRoutes | {
"repo_name": "NetMoc/Yaes-SensorNetwork",
"path": "src/main/java/yaes/sensornetwork/visualization/paintBPANode.java",
"license": "lgpl-2.1",
"size": 3476
} | [
"java.awt.Graphics2D"
] | import java.awt.Graphics2D; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,599,826 |
public static LazyPrimitive<? extends ObjectInspector, ? extends Writable>
createLazyPrimitiveClass(PrimitiveObjectInspector oi) {
PrimitiveCategory p = oi.getPrimitiveCategory();
switch (p) {
case BOOLEAN:
return new LazyBoolean((LazyBooleanObjectInspector) oi);
case BYTE:
return new ... | static LazyPrimitive<? extends ObjectInspector, ? extends Writable> function(PrimitiveObjectInspector oi) { PrimitiveCategory p = oi.getPrimitiveCategory(); switch (p) { case BOOLEAN: return new LazyBoolean((LazyBooleanObjectInspector) oi); case BYTE: return new LazyByte((LazyByteObjectInspector) oi); case SHORT: retur... | /**
* Create a lazy primitive class given the type name.
*/ | Create a lazy primitive class given the type name | createLazyPrimitiveClass | {
"repo_name": "cschenyuan/hive-hack",
"path": "serde/src/java/org/apache/hadoop/hive/serde2/lazy/LazyFactory.java",
"license": "apache-2.0",
"size": 19223
} | [
"org.apache.hadoop.hive.serde2.lazy.objectinspector.primitive.LazyBinaryObjectInspector",
"org.apache.hadoop.hive.serde2.lazy.objectinspector.primitive.LazyBooleanObjectInspector",
"org.apache.hadoop.hive.serde2.lazy.objectinspector.primitive.LazyByteObjectInspector",
"org.apache.hadoop.hive.serde2.lazy.objec... | import org.apache.hadoop.hive.serde2.lazy.objectinspector.primitive.LazyBinaryObjectInspector; import org.apache.hadoop.hive.serde2.lazy.objectinspector.primitive.LazyBooleanObjectInspector; import org.apache.hadoop.hive.serde2.lazy.objectinspector.primitive.LazyByteObjectInspector; import org.apache.hadoop.hive.serde2... | import org.apache.hadoop.hive.serde2.lazy.objectinspector.primitive.*; import org.apache.hadoop.hive.serde2.objectinspector.*; import org.apache.hadoop.io.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 570,411 |
public Answer getAnswer(Q query, Answer answer){
Pair<Q, QueryAnswers> match = cache.get(query);
if (match != null) {
Q equivalentQuery = match.getKey();
Unifier unifier = equivalentQuery.getUnifier(query);
QueryAnswers answers = match.getValue().unify(unifier);... | Answer function(Q query, Answer answer){ Pair<Q, QueryAnswers> match = cache.get(query); if (match != null) { Q equivalentQuery = match.getKey(); Unifier unifier = equivalentQuery.getUnifier(query); QueryAnswers answers = match.getValue().unify(unifier); return answers.stream() .filter(a -> a.containsAll(answer)) .find... | /**
* find specific answer to a query in the cache
* @param query input query
* @param answer sought specific answer to the query
* @return found answer if any, otherwise empty answer
*/ | find specific answer to a query in the cache | getAnswer | {
"repo_name": "pluraliseseverythings/grakn",
"path": "grakn-graql/src/main/java/ai/grakn/graql/internal/reasoner/cache/QueryCache.java",
"license": "gpl-3.0",
"size": 6800
} | [
"ai.grakn.graql.admin.Answer",
"ai.grakn.graql.admin.Unifier",
"ai.grakn.graql.internal.query.QueryAnswer",
"ai.grakn.graql.internal.reasoner.query.QueryAnswers",
"ai.grakn.graql.internal.reasoner.utils.Pair"
] | import ai.grakn.graql.admin.Answer; import ai.grakn.graql.admin.Unifier; import ai.grakn.graql.internal.query.QueryAnswer; import ai.grakn.graql.internal.reasoner.query.QueryAnswers; import ai.grakn.graql.internal.reasoner.utils.Pair; | import ai.grakn.graql.admin.*; import ai.grakn.graql.internal.query.*; import ai.grakn.graql.internal.reasoner.query.*; import ai.grakn.graql.internal.reasoner.utils.*; | [
"ai.grakn.graql"
] | ai.grakn.graql; | 179,033 |
public static boolean isEnabled(Config cfg) {
return cfg.hasPath(ConfigurationKeys.METRICS_ENABLED_KEY) ? cfg.getBoolean(ConfigurationKeys.METRICS_ENABLED_KEY)
: Boolean.parseBoolean(ConfigurationKeys.DEFAULT_METRICS_ENABLED);
} | static boolean function(Config cfg) { return cfg.hasPath(ConfigurationKeys.METRICS_ENABLED_KEY) ? cfg.getBoolean(ConfigurationKeys.METRICS_ENABLED_KEY) : Boolean.parseBoolean(ConfigurationKeys.DEFAULT_METRICS_ENABLED); } | /**
* Check whether metrics collection and reporting are enabled or not.
*
* @param cfg a {@link State} object containing configuration properties
* @return whether metrics collection and reporting are enabled
*/ | Check whether metrics collection and reporting are enabled or not | isEnabled | {
"repo_name": "aditya1105/gobblin",
"path": "gobblin-metrics-libs/gobblin-metrics/src/main/java/org/apache/gobblin/metrics/GobblinMetrics.java",
"license": "apache-2.0",
"size": 32323
} | [
"com.typesafe.config.Config",
"org.apache.gobblin.configuration.ConfigurationKeys"
] | import com.typesafe.config.Config; import org.apache.gobblin.configuration.ConfigurationKeys; | import com.typesafe.config.*; import org.apache.gobblin.configuration.*; | [
"com.typesafe.config",
"org.apache.gobblin"
] | com.typesafe.config; org.apache.gobblin; | 2,363,974 |
public boolean isCasAuthenticationOldForMaxAgeAuthorizationRequest(final WebContext context) {
return isCasAuthenticationAvailable(context)
.filter(a -> isCasAuthenticationOldForMaxAgeAuthorizationRequest(context, a))
.isPresent();
} | boolean function(final WebContext context) { return isCasAuthenticationAvailable(context) .filter(a -> isCasAuthenticationOldForMaxAgeAuthorizationRequest(context, a)) .isPresent(); } | /**
* Is cas authentication available and old for max age authorization request?
*
* @param context the context
* @return true/false
*/ | Is cas authentication available and old for max age authorization request | isCasAuthenticationOldForMaxAgeAuthorizationRequest | {
"repo_name": "leleuj/cas",
"path": "support/cas-server-support-oidc-core-api/src/main/java/org/apereo/cas/oidc/util/OidcAuthorizationRequestSupport.java",
"license": "apache-2.0",
"size": 7992
} | [
"org.pac4j.core.context.WebContext"
] | import org.pac4j.core.context.WebContext; | import org.pac4j.core.context.*; | [
"org.pac4j.core"
] | org.pac4j.core; | 273,264 |
public Layout getLayout();
| Layout function(); | /**
* Returns this appenders layout.
*
* @since 1.1
*/ | Returns this appenders layout | getLayout | {
"repo_name": "cscfa/bartleby",
"path": "library/slf4j/slf4j-1.7.12/log4j-over-slf4j/src/main/java/org/apache/log4j/Appender.java",
"license": "mit",
"size": 3855
} | [
"org.apache.log4j.spi.Layout"
] | import org.apache.log4j.spi.Layout; | import org.apache.log4j.spi.*; | [
"org.apache.log4j"
] | org.apache.log4j; | 1,623,645 |
public static String escapeAttributeValue(Object value, Context cx)
{
XMLLib xmlLib = currentXMLLib(cx);
return xmlLib.escapeAttributeValue(value);
} | static String function(Object value, Context cx) { XMLLib xmlLib = currentXMLLib(cx); return xmlLib.escapeAttributeValue(value); } | /**
* Escapes the reserved characters in a value of an attribute
*
* @param value Unescaped text
* @return The escaped text
*/ | Escapes the reserved characters in a value of an attribute | escapeAttributeValue | {
"repo_name": "sam/htmlunit-rhino-fork",
"path": "src/org/mozilla/javascript/ScriptRuntime.java",
"license": "mpl-2.0",
"size": 156562
} | [
"org.mozilla.javascript.xml.XMLLib"
] | import org.mozilla.javascript.xml.XMLLib; | import org.mozilla.javascript.xml.*; | [
"org.mozilla.javascript"
] | org.mozilla.javascript; | 2,598,462 |
final TypeToken<T> rejectTypeVariables() {
checkArgument(!Types.containsTypeVariable(runtimeType),
"%s contains a type variable and is not safe for the operation");
return this;
} | final TypeToken<T> rejectTypeVariables() { checkArgument(!Types.containsTypeVariable(runtimeType), STR); return this; } | /**
* Ensures that this type token doesn't contain type variables, which can cause unchecked type
* errors for callers like {@link TypeToInstanceMap}.
*/ | Ensures that this type token doesn't contain type variables, which can cause unchecked type errors for callers like <code>TypeToInstanceMap</code> | rejectTypeVariables | {
"repo_name": "user234/setyon-guava-libraries-clone",
"path": "guava/src/com/google/common/reflect/TypeToken.java",
"license": "apache-2.0",
"size": 42920
} | [
"com.google.common.base.Preconditions"
] | import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 2,084,929 |
FieldType getFieldType(String fieldTypeName, String docTypeName, String batchInstanceIdentifier); | FieldType getFieldType(String fieldTypeName, String docTypeName, String batchInstanceIdentifier); | /**
* An API to get field type for a batch for a particular document.
*
* @param fieldTypeName String
* @param docTypeName String
* @param batchInstanceIdentifier String
* @return FieldType
*/ | An API to get field type for a batch for a particular document | getFieldType | {
"repo_name": "kuzavas/ephesoft",
"path": "dcma-data-access/src/main/java/com/ephesoft/dcma/da/dao/FieldTypeDao.java",
"license": "agpl-3.0",
"size": 4543
} | [
"com.ephesoft.dcma.da.domain.FieldType"
] | import com.ephesoft.dcma.da.domain.FieldType; | import com.ephesoft.dcma.da.domain.*; | [
"com.ephesoft.dcma"
] | com.ephesoft.dcma; | 2,807,826 |
public String addSession(Connection conn) throws SQLException {
WebSession session = createNewSession("local");
session.setShutdownServerOnDisconnect();
session.setConnection(conn);
session.put("url", conn.getMetaData().getURL());
String s = (String) session.get("sessionId");... | String function(Connection conn) throws SQLException { WebSession session = createNewSession("local"); session.setShutdownServerOnDisconnect(); session.setConnection(conn); session.put("url", conn.getMetaData().getURL()); String s = (String) session.get(STR); return url + STR + s; } private class TranslateThread extend... | /**
* Create a session with a given connection.
*
* @param conn the connection
* @return the URL of the web site to access this connection
*/ | Create a session with a given connection | addSession | {
"repo_name": "miloszpiglas/h2mod",
"path": "src/main/org/h2/server/web/WebServer.java",
"license": "mpl-2.0",
"size": 26151
} | [
"java.io.File",
"java.sql.Connection",
"java.sql.SQLException",
"java.util.Map"
] | import java.io.File; import java.sql.Connection; import java.sql.SQLException; import java.util.Map; | import java.io.*; import java.sql.*; import java.util.*; | [
"java.io",
"java.sql",
"java.util"
] | java.io; java.sql; java.util; | 2,097,062 |
EReference getStandardLoopCharacteristics_LoopMaximum(); | EReference getStandardLoopCharacteristics_LoopMaximum(); | /**
* Returns the meta object for the containment reference '{@link org.eclipse.bpmn2.StandardLoopCharacteristics#getLoopMaximum <em>Loop Maximum</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Loop Maximum</em>'.
* @see org... | Returns the meta object for the containment reference '<code>org.eclipse.bpmn2.StandardLoopCharacteristics#getLoopMaximum Loop Maximum</code>'. | getStandardLoopCharacteristics_LoopMaximum | {
"repo_name": "lqjack/fixflow",
"path": "modules/fixflow-core/src/main/java/org/eclipse/bpmn2/Bpmn2Package.java",
"license": "apache-2.0",
"size": 1014933
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,408,354 |
public static java.util.List extractColumnDetailList(ims.domain.ILightweightDomainFactory domainFactory, ims.emergency.vo.ColumnDetailVoCollection voCollection)
{
return extractColumnDetailList(domainFactory, voCollection, null, new HashMap());
}
| static java.util.List function(ims.domain.ILightweightDomainFactory domainFactory, ims.emergency.vo.ColumnDetailVoCollection voCollection) { return extractColumnDetailList(domainFactory, voCollection, null, new HashMap()); } | /**
* Create the ims.emergency.configuration.domain.objects.ColumnDetail list from the value object collection.
* @param domainFactory - used to create existing (persistent) domain objects.
* @param voCollection - the collection of value objects
*/ | Create the ims.emergency.configuration.domain.objects.ColumnDetail list from the value object collection | extractColumnDetailList | {
"repo_name": "open-health-hub/openmaxims-linux",
"path": "openmaxims_workspace/ValueObjects/src/ims/emergency/vo/domain/ColumnDetailVoAssembler.java",
"license": "agpl-3.0",
"size": 20295
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 2,915,287 |
protected BigDecimal calcVlrProd( BigDecimal arg0, BigDecimal arg1 ) {
BigDecimal bdRetorno = arg0.multiply( arg1 ).setScale( Aplicativo.casasDecPre, BigDecimal.ROUND_HALF_UP );
return bdRetorno;
} | BigDecimal function( BigDecimal arg0, BigDecimal arg1 ) { BigDecimal bdRetorno = arg0.multiply( arg1 ).setScale( Aplicativo.casasDecPre, BigDecimal.ROUND_HALF_UP ); return bdRetorno; } | /**
* Calcula o valor bruto do produto
*
* @param arg0
* preço do produto
* @param arg1
* quantidade do produto
* @return valor do produto
*/ | Calcula o valor bruto do produto | calcVlrProd | {
"repo_name": "cams7/erp",
"path": "freedom/src/main/java/org/freedom/modulos/std/view/frame/crud/detail/FVD.java",
"license": "gpl-3.0",
"size": 26869
} | [
"java.math.BigDecimal",
"org.freedom.library.swing.frame.Aplicativo"
] | import java.math.BigDecimal; import org.freedom.library.swing.frame.Aplicativo; | import java.math.*; import org.freedom.library.swing.frame.*; | [
"java.math",
"org.freedom.library"
] | java.math; org.freedom.library; | 2,436,852 |
protected String redirectView( HttpServletRequest request, String strView )
{
return redirect( request, getViewUrl( strView ) );
} | String function( HttpServletRequest request, String strView ) { return redirect( request, getViewUrl( strView ) ); } | /**
* Redirect to requested view
*
* @param request
* the http request
* @param strView
* the targeted view
* @return The redirection result
*/ | Redirect to requested view | redirectView | {
"repo_name": "rzara/lutece-core",
"path": "src/java/fr/paris/lutece/portal/util/mvc/admin/MVCAdminJspBean.java",
"license": "bsd-3-clause",
"size": 16837
} | [
"javax.servlet.http.HttpServletRequest"
] | import javax.servlet.http.HttpServletRequest; | import javax.servlet.http.*; | [
"javax.servlet"
] | javax.servlet; | 2,474,052 |
@Test
public void testBasicCheckout() {
String wugFileName = TESTING_DIR + "wug.txt";
String wugText = "This is a wug.";
createFile(wugFileName, wugText);
gitlet("init");
gitlet("add", wugFileName);
gitlet("commit", "added wug");
writeFile(wugFileName, "Th... | void function() { String wugFileName = TESTING_DIR + STR; String wugText = STR; createFile(wugFileName, wugText); gitlet("init"); gitlet("add", wugFileName); gitlet(STR, STR); writeFile(wugFileName, STR); gitlet(STR, wugFileName); assertEquals(wugText, getText(wugFileName)); } | /**
* Tests that checking out a file name will restore the version of the file
* from the previous commit. Involves init, add, commit, and checkout.
*/ | Tests that checking out a file name will restore the version of the file from the previous commit. Involves init, add, commit, and checkout | testBasicCheckout | {
"repo_name": "hardfist/skeleton",
"path": "proj2/src/GitletPublicTest.java",
"license": "mit",
"size": 7500
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,837,155 |
protected List<QName> getAspectsNotToCopy()
{
return Arrays.asList(new QName[] {ContentModel.ASPECT_RATEABLE,
ContentModel.ASPECT_LIKES_RATING_SCHEME_ROLLUPS,
ContentModel.ASPECT_FIVESTAR_RATING_SCHEME_ROLLUPS});
... | List<QName> function() { return Arrays.asList(new QName[] {ContentModel.ASPECT_RATEABLE, ContentModel.ASPECT_LIKES_RATING_SCHEME_ROLLUPS, ContentModel.ASPECT_FIVESTAR_RATING_SCHEME_ROLLUPS}); } | /**
* This method returns the default list of ratings-related aspects which should not be
* copied when a rated node is copied.
*
* @return a List of QNames of ratings-related aspects which should not be copied.
*/ | This method returns the default list of ratings-related aspects which should not be copied when a rated node is copied | getAspectsNotToCopy | {
"repo_name": "nguyentienlong/community-edition",
"path": "projects/repository/source/java/org/alfresco/repo/rating/RatingsRelatedAspectBehaviours.java",
"license": "lgpl-3.0",
"size": 4354
} | [
"java.util.Arrays",
"java.util.List",
"org.alfresco.model.ContentModel",
"org.alfresco.service.namespace.QName"
] | import java.util.Arrays; import java.util.List; import org.alfresco.model.ContentModel; import org.alfresco.service.namespace.QName; | import java.util.*; import org.alfresco.model.*; import org.alfresco.service.namespace.*; | [
"java.util",
"org.alfresco.model",
"org.alfresco.service"
] | java.util; org.alfresco.model; org.alfresco.service; | 312,649 |
public void beginSync(int syncMode, boolean resume) throws SyncException {
if (Log.isLoggable(Log.INFO)) {
Log.info(TAG_LOG, "Begin sync for source '" + getName() + "' with mode " + syncMode);
Log.info(TAG_LOG, "Resume = " + resume);
}
// Init lists
switch(sy... | void function(int syncMode, boolean resume) throws SyncException { if (Log.isLoggable(Log.INFO)) { Log.info(TAG_LOG, STR + getName() + STR + syncMode); Log.info(TAG_LOG, STR + resume); } switch(syncMode) { case FULL_SYNC: case FULL_UPLOAD: initAllItems(); allIndex = 0; clientItemsNumber = (allItems != null) ? allItems.... | /**
* Called after SyncManager preparation and initialization just before start
* the synchronization of the SyncSource.
*
* @param syncMode the synchronization type: one of the values in
* sync4j.framework.core.AlertCode
*
* @throws SyncException in case of error. Thi... | Called after SyncManager preparation and initialization just before start the synchronization of the SyncSource | beginSync | {
"repo_name": "zhangdakun/funasyn",
"path": "externals/java-sdk/sync/src/main/java/com/funambol/sync/client/BaseSyncSource.java",
"license": "agpl-3.0",
"size": 27040
} | [
"com.funambol.sync.SyncException",
"com.funambol.util.Log"
] | import com.funambol.sync.SyncException; import com.funambol.util.Log; | import com.funambol.sync.*; import com.funambol.util.*; | [
"com.funambol.sync",
"com.funambol.util"
] | com.funambol.sync; com.funambol.util; | 1,704,828 |
public void startSeriesPass(XYDataset dataset, int series,
int firstItem, int lastItem, int pass, int passCount) {
this.seriesPath.reset();
this.intervalPath.reset();
this.lastPointGood = false;
super.startSeriesPass(dataset, series, firstItem, las... | void function(XYDataset dataset, int series, int firstItem, int lastItem, int pass, int passCount) { this.seriesPath.reset(); this.intervalPath.reset(); this.lastPointGood = false; super.startSeriesPass(dataset, series, firstItem, lastItem, pass, passCount); } } | /**
* This method is called by the {@link XYPlot} at the start of each
* series pass. We reset the state for the current series.
*
* @param dataset the dataset.
* @param series the series index.
* @param firstItem the first item index for this pass.
* @... | This method is called by the <code>XYPlot</code> at the start of each series pass. We reset the state for the current series | startSeriesPass | {
"repo_name": "JSansalone/JFreeChart",
"path": "source/org/jfree/chart/renderer/xy/SamplingXYLineRenderer.java",
"license": "lgpl-2.1",
"size": 14080
} | [
"org.jfree.data.xy.XYDataset"
] | import org.jfree.data.xy.XYDataset; | import org.jfree.data.xy.*; | [
"org.jfree.data"
] | org.jfree.data; | 2,469,777 |
protected static Set<BindingSet> getQueryBindingSetValues(final FluoClient fluoClient, final String sparql) {
final Set<BindingSet> bindingSets = new HashSet<>();
try (Snapshot snapshot = fluoClient.newSnapshot()) {
final String queryId = snapshot.get(Bytes.of(sparql), FluoQueryColumns.... | static Set<BindingSet> function(final FluoClient fluoClient, final String sparql) { final Set<BindingSet> bindingSets = new HashSet<>(); try (Snapshot snapshot = fluoClient.newSnapshot()) { final String queryId = snapshot.get(Bytes.of(sparql), FluoQueryColumns.QUERY_ID).toString(); final QueryMetadata queryMetadata = n... | /**
* Fetches the binding sets that are the results of a specific SPARQL query
* from the Fluo table.
*
* @param fluoClient-
* A connection to the Fluo table where the results reside. (not
* null)
* @param sparql
* - This query's results will be f... | Fetches the binding sets that are the results of a specific SPARQL query from the Fluo table | getQueryBindingSetValues | {
"repo_name": "isper3at/incubator-rya",
"path": "extras/rya.pcj.fluo/pcj.fluo.integration/src/test/java/org/apache/rya/indexing/pcj/fluo/ITBase.java",
"license": "apache-2.0",
"size": 19285
} | [
"io.fluo.api.client.FluoClient",
"io.fluo.api.client.Snapshot",
"io.fluo.api.config.ScannerConfiguration",
"io.fluo.api.data.Bytes",
"io.fluo.api.iterator.ColumnIterator",
"io.fluo.api.iterator.RowIterator",
"java.util.HashSet",
"java.util.Map",
"java.util.Set",
"org.apache.rya.indexing.pcj.fluo.a... | import io.fluo.api.client.FluoClient; import io.fluo.api.client.Snapshot; import io.fluo.api.config.ScannerConfiguration; import io.fluo.api.data.Bytes; import io.fluo.api.iterator.ColumnIterator; import io.fluo.api.iterator.RowIterator; import java.util.HashSet; import java.util.Map; import java.util.Set; import org.a... | import io.fluo.api.client.*; import io.fluo.api.config.*; import io.fluo.api.data.*; import io.fluo.api.iterator.*; import java.util.*; import org.apache.rya.indexing.pcj.fluo.app.query.*; import org.apache.rya.indexing.pcj.storage.accumulo.*; import org.openrdf.query.*; | [
"io.fluo.api",
"java.util",
"org.apache.rya",
"org.openrdf.query"
] | io.fluo.api; java.util; org.apache.rya; org.openrdf.query; | 2,076,815 |
Map<Condition, ConditionStatus> getStatusPerConditions(); | Map<Condition, ConditionStatus> getStatusPerConditions(); | /**
* The status per condition of the quality gate (if there is a quality gate on the project).
*
* @throws IllegalStateException if status has not yet been set in the holder
* @see QualityGateHolder#getQualityGate()
*/ | The status per condition of the quality gate (if there is a quality gate on the project) | getStatusPerConditions | {
"repo_name": "Builders-SonarSource/sonarqube-bis",
"path": "server/sonar-server/src/main/java/org/sonar/server/computation/task/projectanalysis/qualitygate/QualityGateStatusHolder.java",
"license": "lgpl-3.0",
"size": 1548
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,479,485 |
public static MozuUrl deletePackageUrl(String orderId, String packageId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/packages/{packageId}");
formatter.formatUrl("orderId", orderId);
formatter.formatUrl("packageId", packageId);
return new MozuUrl(formatter.getResourceUrl(... | static MozuUrl function(String orderId, String packageId) { UrlFormatter formatter = new UrlFormatter(STR); formatter.formatUrl(STR, orderId); formatter.formatUrl(STR, packageId); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ; } | /**
* Get Resource Url for DeletePackage
* @param orderId Unique identifier of the order.
* @param packageId Unique identifier of the package for which to retrieve the label.
* @return String Resource Url
*/ | Get Resource Url for DeletePackage | deletePackageUrl | {
"repo_name": "johngatti/mozu-java",
"path": "mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/orders/PackageUrl.java",
"license": "mit",
"size": 4406
} | [
"com.mozu.api.MozuUrl",
"com.mozu.api.utils.UrlFormatter"
] | import com.mozu.api.MozuUrl; import com.mozu.api.utils.UrlFormatter; | import com.mozu.api.*; import com.mozu.api.utils.*; | [
"com.mozu.api"
] | com.mozu.api; | 2,031,895 |
private void configureDecoder() {
byte[] prefix = new byte[] {0x00,0x00,0x00,0x01};
ByteBuffer csd0 = ByteBuffer.allocate(4+mSPS.length+4+mPPS.length);
csd0.put(new byte[] {0x00,0x00,0x00,0x01});
csd0.put(mSPS);
csd0.put(new byte[] {0x00,0x00,0x00,0x01});
csd0.put(mPPS);
mDecoder = MediaCo... | void function() { byte[] prefix = new byte[] {0x00,0x00,0x00,0x01}; ByteBuffer csd0 = ByteBuffer.allocate(4+mSPS.length+4+mPPS.length); csd0.put(new byte[] {0x00,0x00,0x00,0x01}); csd0.put(mSPS); csd0.put(new byte[] {0x00,0x00,0x00,0x01}); csd0.put(mPPS); mDecoder = MediaCodec.createByCodecName(mDecoderName); MediaForm... | /**
* Instantiates and starts the decoder.
*/ | Instantiates and starts the decoder | configureDecoder | {
"repo_name": "procandi/spydroid-ipcamera",
"path": "src/net/majorkernelpanic/streaming/hw/EncoderDebugger.java",
"license": "gpl-3.0",
"size": 28399
} | [
"android.media.MediaCodec",
"android.media.MediaFormat",
"android.util.Log",
"java.nio.ByteBuffer"
] | import android.media.MediaCodec; import android.media.MediaFormat; import android.util.Log; import java.nio.ByteBuffer; | import android.media.*; import android.util.*; import java.nio.*; | [
"android.media",
"android.util",
"java.nio"
] | android.media; android.util; java.nio; | 531,171 |
public JComponent getViewComponent(); | JComponent function(); | /**
* Returns panel reflecting current component state
*/ | Returns panel reflecting current component state | getViewComponent | {
"repo_name": "otmarjr/jtreg-fork",
"path": "dist-with-aspectj/jtreg/lib/javatest/com/sun/javatest/exec/ET_RunTestControl.java",
"license": "gpl-2.0",
"size": 2173
} | [
"javax.swing.JComponent"
] | import javax.swing.JComponent; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 1,805,845 |
AuthenticationBuilder addFailures(Map<String, Class<? extends Exception>> failures); | AuthenticationBuilder addFailures(Map<String, Class<? extends Exception>> failures); | /**
* Adds failures.
*
* @param failures the failures
* @return the failures
* @since 4.2.0
*/ | Adds failures | addFailures | {
"repo_name": "PetrGasparik/cas",
"path": "cas-server-core-api-authentication/src/main/java/org/jasig/cas/authentication/AuthenticationBuilder.java",
"license": "apache-2.0",
"size": 4727
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,098,384 |
public void fillWithRain(World worldIn, BlockPos pos)
{
} | void function(World worldIn, BlockPos pos) { } | /**
* Called similar to random ticks, but only when it is raining.
*/ | Called similar to random ticks, but only when it is raining | fillWithRain | {
"repo_name": "aebert1/BigTransport",
"path": "build/tmp/recompileMc/sources/net/minecraft/block/Block.java",
"license": "gpl-3.0",
"size": 115325
} | [
"net.minecraft.util.math.BlockPos",
"net.minecraft.world.World"
] | import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; | import net.minecraft.util.math.*; import net.minecraft.world.*; | [
"net.minecraft.util",
"net.minecraft.world"
] | net.minecraft.util; net.minecraft.world; | 1,530,834 |
private void handleAuthenticationReponseFromFramework(HttpServletRequest req, HttpServletResponse resp,
String sessionId, SAMLSSOSessionDTO sessionDTO)
throws UserStoreException, IdentityException, IOException, ServletException {
String ... | void function(HttpServletRequest req, HttpServletResponse resp, String sessionId, SAMLSSOSessionDTO sessionDTO) throws UserStoreException, IdentityException, IOException, ServletException { String sessionDataKey = getSessionDataKey(req); AuthenticationResult authResult = getAuthenticationResult(req, sessionDataKey); if... | /**
* This method handles authentication and sends authentication Response message back to the
* Service Provider after successful authentication. In case of authentication failure the user
* is prompted back for authentication.
*
* @param req
* @param resp
* @param sessionId
* @... | This method handles authentication and sends authentication Response message back to the Service Provider after successful authentication. In case of authentication failure the user is prompted back for authentication | handleAuthenticationReponseFromFramework | {
"repo_name": "kesavany/carbon-identity",
"path": "components/sso-saml/org.wso2.carbon.identity.sso.saml/src/main/java/org/wso2/carbon/identity/sso/saml/servlet/SAMLSSOProviderServlet.java",
"license": "apache-2.0",
"size": 50671
} | [
"java.io.IOException",
"java.util.ArrayList",
"java.util.List",
"javax.servlet.ServletException",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"org.wso2.carbon.identity.application.authentication.framework.model.AuthenticationResult",
"org.wso2.carbon.identity.bas... | import java.io.IOException; import java.util.ArrayList; import java.util.List; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.wso2.carbon.identity.application.authentication.framework.model.AuthenticationResult; import org.w... | import java.io.*; import java.util.*; import javax.servlet.*; import javax.servlet.http.*; import org.wso2.carbon.identity.application.authentication.framework.model.*; import org.wso2.carbon.identity.base.*; import org.wso2.carbon.identity.sso.saml.*; import org.wso2.carbon.identity.sso.saml.dto.*; import org.wso2.car... | [
"java.io",
"java.util",
"javax.servlet",
"org.wso2.carbon"
] | java.io; java.util; javax.servlet; org.wso2.carbon; | 865,429 |
public void setInterest(final Vector3d interest)
{
if (interest == null)
throw new IllegalArgumentException("interest must not be null");
this.interest.set(interest);
} | void function(final Vector3d interest) { if (interest == null) throw new IllegalArgumentException(STR); this.interest.set(interest); } | /**
* Sets the position of the interest point.
*
* @param interest
* The interest point position to set. Must not be null.
*/ | Sets the position of the interest point | setInterest | {
"repo_name": "kayahr/jollada",
"path": "src/main/java/de/ailis/jollada/model/LookAtTransform.java",
"license": "mit",
"size": 2591
} | [
"de.ailis.gramath.Vector3d"
] | import de.ailis.gramath.Vector3d; | import de.ailis.gramath.*; | [
"de.ailis.gramath"
] | de.ailis.gramath; | 962,083 |
@Override
public String getStringVectorRepresentation() { return SerializationUtils.toString(vector); } | public String getStringVectorRepresentation() { return SerializationUtils.toString(vector); } | /**
* Returns the vector representation in byte[] format.
* @return the vector representation as a byte array.
*/ | Returns the vector representation in byte[] format | getByteVectorRepresentation | {
"repo_name": "HastyJ/LIRE",
"path": "src/main/java/net/semanticmetadata/lire/aggregators/VLAD.java",
"license": "gpl-2.0",
"size": 5264
} | [
"net.semanticmetadata.lire.utils.SerializationUtils"
] | import net.semanticmetadata.lire.utils.SerializationUtils; | import net.semanticmetadata.lire.utils.*; | [
"net.semanticmetadata.lire"
] | net.semanticmetadata.lire; | 2,085,369 |
public void setUpSourceEdge(boolean risingEdge, boolean fallingEdge) {
if (m_interrupt != 0) {
InterruptJNI.setInterruptUpSourceEdge(m_interrupt, risingEdge,
fallingEdge);
} else {
throw new IllegalArgumentException("You must call RequestInterrupts before setUpSourceEdge");
}
} | void function(boolean risingEdge, boolean fallingEdge) { if (m_interrupt != 0) { InterruptJNI.setInterruptUpSourceEdge(m_interrupt, risingEdge, fallingEdge); } else { throw new IllegalArgumentException(STR); } } | /**
* Set which edge to trigger interrupts on.
*
* @param risingEdge true to interrupt on rising edge
* @param fallingEdge true to interrupt on falling edge
*/ | Set which edge to trigger interrupts on | setUpSourceEdge | {
"repo_name": "pjreiniger/TempAllWpi",
"path": "wpilibj/src/main/java/edu/wpi/first/wpilibj/InterruptableSensorBase.java",
"license": "bsd-3-clause",
"size": 8012
} | [
"edu.wpi.first.wpilibj.hal.InterruptJNI"
] | import edu.wpi.first.wpilibj.hal.InterruptJNI; | import edu.wpi.first.wpilibj.hal.*; | [
"edu.wpi.first"
] | edu.wpi.first; | 1,267,604 |
public void testStartsWithName006() throws Exception {
LdapName ln = new LdapName("");
LdapName n = new LdapName("");
assertTrue(ln.startsWith(n));
} | void function() throws Exception { LdapName ln = new LdapName(STR"); assertTrue(ln.startsWith(n)); } | /**
* <p>
* Test method for 'javax.naming.ldap.LdapName.startsWith(Name)'
* </p>
* <p>
* Here we are testing if this method correctly returns true if an LdapName
* starts with the given prefix.
* </p>
* <p>
* The expected result is a false.
* </p>
*/ | Test method for 'javax.naming.ldap.LdapName.startsWith(Name)' Here we are testing if this method correctly returns true if an LdapName starts with the given prefix. The expected result is a false. | testStartsWithName006 | {
"repo_name": "freeVM/freeVM",
"path": "enhanced/java/classlib/modules/jndi/src/test/java/org/apache/harmony/jndi/tests/javax/naming/ldap/LdapNameTest.java",
"license": "apache-2.0",
"size": 119091
} | [
"javax.naming.ldap.LdapName"
] | import javax.naming.ldap.LdapName; | import javax.naming.ldap.*; | [
"javax.naming"
] | javax.naming; | 176,898 |
private static int getPressedColor(int color) {
float[] hsv = new float[3];
Color.colorToHSV(color, hsv);
hsv[2] *= PRESSED_STATE_MULTIPLIER; // set "value" (brightness) to a lower level
return Color.HSVToColor(hsv);
}
@Override
public boolean isStateful() { return true;... | static int function(int color) { float[] hsv = new float[3]; Color.colorToHSV(color, hsv); hsv[2] *= PRESSED_STATE_MULTIPLIER; return Color.HSVToColor(hsv); } public boolean isStateful() { return true; } | /**
* Given a particular color, adjust its value (brightness) by a multiplier.
*/ | Given a particular color, adjust its value (brightness) by a multiplier | getPressedColor | {
"repo_name": "iluxonchik/markitdown",
"path": "MarkItDown/colorpicker/src/main/java/io/github/iluxonchik/colorpicker/ColorStateDrawable.java",
"license": "mit",
"size": 2249
} | [
"android.graphics.Color"
] | import android.graphics.Color; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 94,168 |
public AirlineItineraryTemplateBuilder addPriceInfo(PriceInfo priceInfo) {
this.payload.addPriceInfo(priceInfo);
return this;
} | AirlineItineraryTemplateBuilder function(PriceInfo priceInfo) { this.payload.addPriceInfo(priceInfo); return this; } | /**
* Adds a {@link PriceInfo} object to this template. This field is optional.
* There can be at most 4 price info objects per template.
*
* @param priceInfo
* the price info object to add.
* @return this builder.
*/ | Adds a <code>PriceInfo</code> object to this template. This field is optional. There can be at most 4 price info objects per template | addPriceInfo | {
"repo_name": "Aurasphere/facebot",
"path": "src/main/java/co/aurasphere/botmill/fb/model/outcoming/factory/AirlineItineraryTemplateBuilder.java",
"license": "mit",
"size": 13737
} | [
"co.aurasphere.botmill.fb.model.outcoming.template.airline.PriceInfo"
] | import co.aurasphere.botmill.fb.model.outcoming.template.airline.PriceInfo; | import co.aurasphere.botmill.fb.model.outcoming.template.airline.*; | [
"co.aurasphere.botmill"
] | co.aurasphere.botmill; | 801,374 |
void setFontColor(Color c)
{
if (c == null) return;
fontColor = c;
} | void setFontColor(Color c) { if (c == null) return; fontColor = c; } | /**
* Sets the color of the font.
*
* @param c The color to set.
*/ | Sets the color of the font | setFontColor | {
"repo_name": "jballanc/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/util/ui/slider/TwoKnobsSliderUI.java",
"license": "gpl-2.0",
"size": 22559
} | [
"java.awt.Color"
] | import java.awt.Color; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,296,007 |
private static String[] getDefaultsFromFileContents(List<String> list) {
Optional<String> defaultSettings = list.stream().filter(line -> line.startsWith("default_options=")).findFirst();
if (defaultSettings.isPresent()) {
return defaultSettings.get().replace("default_options=", "").repl... | static String[] function(List<String> list) { Optional<String> defaultSettings = list.stream().filter(line -> line.startsWith(STR)).findFirst(); if (defaultSettings.isPresent()) { return defaultSettings.get().replace(STR, STR\STRSTR "); } return new String[]{}; } | /**
* Find the string in the list of strings which contains the default options
* settings and split it into an array of strings containing one element for
* each setting specified.
*
* @param list a list of string representing lines of a .conf file
*
* @return an array of strings for... | Find the string in the list of strings which contains the default options settings and split it into an array of strings containing one element for each setting specified | getDefaultsFromFileContents | {
"repo_name": "APriestman/autopsy",
"path": "Core/src/org/sleuthkit/autopsy/corecomponents/AutopsyOptionsPanel.java",
"license": "apache-2.0",
"size": 58199
} | [
"java.util.List",
"java.util.Optional"
] | import java.util.List; import java.util.Optional; | import java.util.*; | [
"java.util"
] | java.util; | 1,231,474 |
static private String getWebAgencyDbName() {
return DbSetupConfig.getDbName();
}
| static String function() { return DbSetupConfig.getDbName(); } | /**
* Specifies name of database to use for reading in the WebAgency objects.
* Currently using the command line option transitclock.core.agencyId .
*
* @return Name of db to retrieve WebAgency objects from
*/ | Specifies name of database to use for reading in the WebAgency objects. Currently using the command line option transitclock.core.agencyId | getWebAgencyDbName | {
"repo_name": "TheTransitClock/transitime",
"path": "transitclock/src/main/java/org/transitclock/db/webstructs/WebAgency.java",
"license": "gpl-3.0",
"size": 16451
} | [
"org.transitclock.configData.DbSetupConfig"
] | import org.transitclock.configData.DbSetupConfig; | import org.transitclock.*; | [
"org.transitclock"
] | org.transitclock; | 168,260 |
public List<Transaction> checkTransactions(List<Transaction> transactions) {
List<Transaction> transactionList = new ArrayList<Transaction>();
Session session = HibernateUtil.getSessionFactory().getCurrentSession();
try {
org.hibernate.Transaction hbtransaction = session.begi... | List<Transaction> function(List<Transaction> transactions) { List<Transaction> transactionList = new ArrayList<Transaction>(); Session session = HibernateUtil.getSessionFactory().getCurrentSession(); try { org.hibernate.Transaction hbtransaction = session.beginTransaction(); for(Transaction trans : transactions) { Quer... | /**
* Checks transactions for duplicates. A transaction is considered a
* duplicate if the transaction date, amount, vendor and account match a
* transaction already in the system.
*
* @param transactions a list of transactions to check for duplicates
* @return a list of transactio... | Checks transactions for duplicates. A transaction is considered a duplicate if the transaction date, amount, vendor and account match a transaction already in the system | checkTransactions | {
"repo_name": "n-nev/finance-java",
"path": "src/main/java/finance/repository/TransactionRepository.java",
"license": "mit",
"size": 9819
} | [
"java.util.ArrayList",
"java.util.List",
"org.hibernate.Query",
"org.hibernate.Session"
] | import java.util.ArrayList; import java.util.List; import org.hibernate.Query; import org.hibernate.Session; | import java.util.*; import org.hibernate.*; | [
"java.util",
"org.hibernate"
] | java.util; org.hibernate; | 340,314 |
public static String encodeBytes(byte[] source) {
// Since we're not going to have the GZIP encoding turned on,
// we're not going to have an IOException thrown, so
// we should not force the user to have to catch it.
String encoded = null;
try {
encoded = encodeBytes(source, source.length);
} catch (... | static String function(byte[] source) { String encoded = null; try { encoded = encodeBytes(source, source.length); } catch (IOException ex) { assert false : ex.getMessage(); } assert encoded != null; return encoded; } | /**
* Encodes a byte array into Base64 notation. Does not GZip-compress data.
*
* @param source
* The data to convert
* @return The data in Base64-encoded form
* @since 1.4
*/ | Encodes a byte array into Base64 notation. Does not GZip-compress data | encodeBytes | {
"repo_name": "mrpdaemon/encfs-java",
"path": "src/main/java/org/mrpdaemon/sec/encfs/EncFSBase64.java",
"license": "lgpl-3.0",
"size": 48662
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 926,732 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<DigitalTwinsDescriptionInner> createOrUpdateAsync(
String resourceGroupName, String resourceName, DigitalTwinsDescriptionInner digitalTwinsCreate) {
return beginCreateOrUpdateAsync(resourceGroupName, resourceName, digitalTwinsCreate)
... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<DigitalTwinsDescriptionInner> function( String resourceGroupName, String resourceName, DigitalTwinsDescriptionInner digitalTwinsCreate) { return beginCreateOrUpdateAsync(resourceGroupName, resourceName, digitalTwinsCreate) .last() .flatMap(this.client::getLroFinalResultO... | /**
* Create or update the metadata of a DigitalTwinsInstance. The usual pattern to modify a property is to retrieve
* the DigitalTwinsInstance and security metadata, and then combine them with the modified values in a new body to
* update the DigitalTwinsInstance.
*
* @param resourceGroupName ... | Create or update the metadata of a DigitalTwinsInstance. The usual pattern to modify a property is to retrieve the DigitalTwinsInstance and security metadata, and then combine them with the modified values in a new body to update the DigitalTwinsInstance | createOrUpdateAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/implementation/DigitalTwinsClientImpl.java",
"license": "mit",
"size": 93292
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.resourcemanager.digitaltwins.fluent.models.DigitalTwinsDescriptionInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.digitaltwins.fluent.models.DigitalTwinsDescriptionInner; | import com.azure.core.annotation.*; import com.azure.resourcemanager.digitaltwins.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,090,866 |
protected int getThreadState(int threadID) {
if (threadID <= 0 || threadID >= _nextThreadID)
return -1;
boolean error = false;
boolean inNormalList = false;
boolean inWaitList = false;
for (Iterator iter = _toVisit.iterator(); iter.hasNext();) {
Trav... | int function(int threadID) { if (threadID <= 0 threadID >= _nextThreadID) return -1; boolean error = false; boolean inNormalList = false; boolean inWaitList = false; for (Iterator iter = _toVisit.iterator(); iter.hasNext();) { TraversalVisit element = (TraversalVisit) iter.next(); if (element.getThreadID() == threadID)... | /**
* Returns the status of a certain thread.
*
* Given a ThreadID, returns: -2 thread sanity check error -1 if the thread never existed 0 if the thread is dead 1 if the thread is alive and running 2 if
* the thread is blocked in the waiting list
*
* @return the thread status
*/ | Returns the status of a certain thread. Given a ThreadID, returns: -2 thread sanity check error -1 if the thread never existed 0 if the thread is dead 1 if the thread is alive and running 2 if the thread is blocked in the waiting list | getThreadState | {
"repo_name": "McGill-DP-Group/seg.jUCMNav",
"path": "src/seg/jUCMNav/model/util/modelexplore/queries/scenarioTraversal/DefaultScenarioTraversalDataStructure.java",
"license": "epl-1.0",
"size": 12217
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 2,236,759 |
private void manageVolumeLevelUpdate(AvrResponse response) {
updateState(getChannelUID(PioneerAvrBindingConstants.VOLUME_DB_CHANNEL, response.getZone()), new DecimalType(
VolumeConverter.convertFromIpControlVolumeToDb(response.getParameterValue(), response.getZone())));
updateState(... | void function(AvrResponse response) { updateState(getChannelUID(PioneerAvrBindingConstants.VOLUME_DB_CHANNEL, response.getZone()), new DecimalType( VolumeConverter.convertFromIpControlVolumeToDb(response.getParameterValue(), response.getZone()))); updateState(getChannelUID(PioneerAvrBindingConstants.VOLUME_DIMMER_CHANN... | /**
* Notify an AVR volume level update to openHAB
*
* @param response
*/ | Notify an AVR volume level update to openHAB | manageVolumeLevelUpdate | {
"repo_name": "sebmarchand/openhab2-addons",
"path": "addons/binding/org.openhab.binding.pioneeravr/src/main/java/org/openhab/binding/pioneeravr/internal/handler/AbstractAvrHandler.java",
"license": "epl-1.0",
"size": 12824
} | [
"org.eclipse.smarthome.core.library.types.DecimalType",
"org.eclipse.smarthome.core.library.types.PercentType",
"org.openhab.binding.pioneeravr.PioneerAvrBindingConstants",
"org.openhab.binding.pioneeravr.protocol.AvrResponse",
"org.openhab.binding.pioneeravr.protocol.utils.VolumeConverter"
] | import org.eclipse.smarthome.core.library.types.DecimalType; import org.eclipse.smarthome.core.library.types.PercentType; import org.openhab.binding.pioneeravr.PioneerAvrBindingConstants; import org.openhab.binding.pioneeravr.protocol.AvrResponse; import org.openhab.binding.pioneeravr.protocol.utils.VolumeConverter; | import org.eclipse.smarthome.core.library.types.*; import org.openhab.binding.pioneeravr.*; import org.openhab.binding.pioneeravr.protocol.*; import org.openhab.binding.pioneeravr.protocol.utils.*; | [
"org.eclipse.smarthome",
"org.openhab.binding"
] | org.eclipse.smarthome; org.openhab.binding; | 274,023 |
public void setInfo(final JsonObject info) {
LOG.trace("Start AbstractResource#setInfo");
this.info = info;
LOG.trace("Complete AbstractResource#setInfo");
} | void function(final JsonObject info) { LOG.trace(STR); this.info = info; LOG.trace(STR); } | /**
* Sets the info.
*
* @param info
* the new info
*/ | Sets the info | setInfo | {
"repo_name": "opendaylight/vtn",
"path": "coordinator/java/vtn-javaapi/src/org/opendaylight/vtn/javaapi/resources/AbstractResource.java",
"license": "epl-1.0",
"size": 23968
} | [
"com.google.gson.JsonObject"
] | import com.google.gson.JsonObject; | import com.google.gson.*; | [
"com.google.gson"
] | com.google.gson; | 791,381 |
public static int getAbsListViewHeightBasedOnChildren(AbsListView view) {
ListAdapter adapter;
if (view == null || (adapter = view.getAdapter()) == null) {
return 0;
}
int height = 0;
for (int i = 0; i < adapter.getCount(); i++) {
View item = adapter.... | static int function(AbsListView view) { ListAdapter adapter; if (view == null (adapter = view.getAdapter()) == null) { return 0; } int height = 0; for (int i = 0; i < adapter.getCount(); i++) { View item = adapter.getView(i, null, view); if (item instanceof ViewGroup) { item.setLayoutParams(new LayoutParams(LayoutParam... | /**
* get AbsListView height according to every children
*
* @param view
* @return
*/ | get AbsListView height according to every children | getAbsListViewHeightBasedOnChildren | {
"repo_name": "hucaihua/cmssp",
"path": "client/ox/src/main/java/com/ox/utils/ViewUtils.java",
"license": "mit",
"size": 8580
} | [
"android.view.View",
"android.view.ViewGroup",
"android.widget.AbsListView",
"android.widget.ListAdapter",
"android.widget.RelativeLayout"
] | import android.view.View; import android.view.ViewGroup; import android.widget.AbsListView; import android.widget.ListAdapter; import android.widget.RelativeLayout; | import android.view.*; import android.widget.*; | [
"android.view",
"android.widget"
] | android.view; android.widget; | 1,850,870 |
public static void createHFileWithDataBlockEncoding(
Configuration configuration,
FileSystem fs, Path path, DataBlockEncoding encoding,
byte[] family, byte[] qualifier,
byte[] startKey, byte[] endKey, int numRows) throws IOException {
createHFile(configuration, fs, path, encoding, family... | static void function( Configuration configuration, FileSystem fs, Path path, DataBlockEncoding encoding, byte[] family, byte[] qualifier, byte[] startKey, byte[] endKey, int numRows) throws IOException { createHFile(configuration, fs, path, encoding, family, qualifier, startKey, endKey, numRows, false); } | /**
* Create an HFile with the given number of rows between a given
* start key and end key @ family:qualifier. The value will be the key value.
* This file will use certain data block encoding algorithm.
*/ | Create an HFile with the given number of rows between a given start key and end key @ family:qualifier. The value will be the key value. This file will use certain data block encoding algorithm | createHFileWithDataBlockEncoding | {
"repo_name": "vincentpoon/hbase",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/util/HFileTestUtil.java",
"license": "apache-2.0",
"size": 7153
} | [
"java.io.IOException",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.hbase.io.encoding.DataBlockEncoding"
] | import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.io.encoding.DataBlockEncoding; | import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hbase.io.encoding.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,741,566 |
public Timestamp getDateEntered() {
return (Timestamp) get(10);
} | Timestamp function() { return (Timestamp) get(10); } | /**
* Getter for <code>sugarcrm_4_12.upgrade_history.date_entered</code>.
*/ | Getter for <code>sugarcrm_4_12.upgrade_history.date_entered</code> | getDateEntered | {
"repo_name": "SmartMedicalServices/SpringJOOQ",
"path": "src/main/java/com/sms/sis/db/tables/records/UpgradeHistoryRecord.java",
"license": "gpl-3.0",
"size": 12320
} | [
"java.sql.Timestamp"
] | import java.sql.Timestamp; | import java.sql.*; | [
"java.sql"
] | java.sql; | 245,564 |
public MarketBettingType getBettingType(){
return bettingType;
} | MarketBettingType function(){ return bettingType; } | /**
* REQUIRED
* See MarketBettingType
*/ | REQUIRED See MarketBettingType | getBettingType | {
"repo_name": "paulo-santos/Betfair-APING-DTO-codeGen",
"path": "src/main/java/com/betfair/aping/betting/entities/MarketDescription.java",
"license": "mit",
"size": 6767
} | [
"com.betfair.aping.betting.enums.MarketBettingType"
] | import com.betfair.aping.betting.enums.MarketBettingType; | import com.betfair.aping.betting.enums.*; | [
"com.betfair.aping"
] | com.betfair.aping; | 1,891,805 |
void onDirectoryCreate(final File directory); | void onDirectoryCreate(final File directory); | /**
* Directory created Event.
*
* @param directory The directory created
*/ | Directory created Event | onDirectoryCreate | {
"repo_name": "sebastiansemmle/acio",
"path": "src/main/java/org/apache/commons/io/monitor/FileAlterationListener.java",
"license": "apache-2.0",
"size": 2353
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,961,301 |
void enterLibFunctionArgItem(@NotNull EsperEPL2GrammarParser.LibFunctionArgItemContext ctx);
void exitLibFunctionArgItem(@NotNull EsperEPL2GrammarParser.LibFunctionArgItemContext ctx); | void enterLibFunctionArgItem(@NotNull EsperEPL2GrammarParser.LibFunctionArgItemContext ctx); void exitLibFunctionArgItem(@NotNull EsperEPL2GrammarParser.LibFunctionArgItemContext ctx); | /**
* Exit a parse tree produced by {@link EsperEPL2GrammarParser#libFunctionArgItem}.
* @param ctx the parse tree
*/ | Exit a parse tree produced by <code>EsperEPL2GrammarParser#libFunctionArgItem</code> | exitLibFunctionArgItem | {
"repo_name": "georgenicoll/esper",
"path": "esper/src/main/java/com/espertech/esper/epl/generated/EsperEPL2GrammarListener.java",
"license": "gpl-2.0",
"size": 114105
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 2,637,149 |
public void testDefaultedTableBackedConfiguration() {
Dialect dialect = new TableDialect();
Properties props = new Properties();
SequenceStyleGenerator generator = new SequenceStyleGenerator();
generator.configure( Hibernate.LONG, props, dialect );
assertClassAssignability( TableStructure.class, generator... | void function() { Dialect dialect = new TableDialect(); Properties props = new Properties(); SequenceStyleGenerator generator = new SequenceStyleGenerator(); generator.configure( Hibernate.LONG, props, dialect ); assertClassAssignability( TableStructure.class, generator.getDatabaseStructure().getClass() ); assertClassA... | /**
* Test all params defaulted with a dialect which does not support sequences
*/ | Test all params defaulted with a dialect which does not support sequences | testDefaultedTableBackedConfiguration | {
"repo_name": "cacheonix/cacheonix-core",
"path": "3rdparty/hibernate-3.2/test/org/hibernate/test/idgen/enhanced/SequenceStyleConfigUnitTest.java",
"license": "lgpl-2.1",
"size": 8029
} | [
"java.util.Properties",
"org.hibernate.Hibernate",
"org.hibernate.dialect.Dialect",
"org.hibernate.id.enhanced.OptimizerFactory",
"org.hibernate.id.enhanced.SequenceStyleGenerator",
"org.hibernate.id.enhanced.TableStructure"
] | import java.util.Properties; import org.hibernate.Hibernate; import org.hibernate.dialect.Dialect; import org.hibernate.id.enhanced.OptimizerFactory; import org.hibernate.id.enhanced.SequenceStyleGenerator; import org.hibernate.id.enhanced.TableStructure; | import java.util.*; import org.hibernate.*; import org.hibernate.dialect.*; import org.hibernate.id.enhanced.*; | [
"java.util",
"org.hibernate",
"org.hibernate.dialect",
"org.hibernate.id"
] | java.util; org.hibernate; org.hibernate.dialect; org.hibernate.id; | 349,318 |
return null;
}
/**
* Collects initial information required for annotation. This method is called within read action during annotation pass.
* Default implementation returns the result of {@link ExternalAnnotator#collectInformation(PsiFile)} | return null; } /** * Collects initial information required for annotation. This method is called within read action during annotation pass. * Default implementation returns the result of {@link ExternalAnnotator#collectInformation(PsiFile)} | /**
* Collects initial information required for annotation. Expected to run within read action.
* See {@link ExternalAnnotator#collectInformation(PsiFile, Editor, boolean)} for details.
*
* @param file file to annotate
* @return see {@link ExternalAnnotator#collectInformation(PsiFile, Editor, boolean)}
... | Collects initial information required for annotation. Expected to run within read action. See <code>ExternalAnnotator#collectInformation(PsiFile, Editor, boolean)</code> for details | collectInformation | {
"repo_name": "consulo/consulo",
"path": "modules/base/analysis-api/src/main/java/com/intellij/lang/annotation/ExternalAnnotator.java",
"license": "apache-2.0",
"size": 3402
} | [
"com.intellij.psi.PsiFile"
] | import com.intellij.psi.PsiFile; | import com.intellij.psi.*; | [
"com.intellij.psi"
] | com.intellij.psi; | 1,006,991 |
public static @NonNull String format(final float value, final @NonNull NumberOptions options) {
return format(value, options, Locale.getDefault());
} | static @NonNull String function(final float value, final @NonNull NumberOptions options) { return format(value, options, Locale.getDefault()); } | /**
* Returns a formatted number for the user's locale. {@link NumberOptions} can control whether the number is
* used as a currency, if it is bucketed, and the precision.
*/ | Returns a formatted number for the user's locale. <code>NumberOptions</code> can control whether the number is used as a currency, if it is bucketed, and the precision | format | {
"repo_name": "kickstarter/android-oss",
"path": "app/src/main/java/com/kickstarter/libs/utils/NumberUtils.java",
"license": "apache-2.0",
"size": 5409
} | [
"androidx.annotation.NonNull",
"com.kickstarter.libs.NumberOptions",
"java.util.Locale"
] | import androidx.annotation.NonNull; import com.kickstarter.libs.NumberOptions; import java.util.Locale; | import androidx.annotation.*; import com.kickstarter.libs.*; import java.util.*; | [
"androidx.annotation",
"com.kickstarter.libs",
"java.util"
] | androidx.annotation; com.kickstarter.libs; java.util; | 2,877,027 |
public void wrap(final AtomicBuffer buffer, final int offset, final int length)
{
this.buffer.wrap(buffer, offset, length);
} | void function(final AtomicBuffer buffer, final int offset, final int length) { this.buffer.wrap(buffer, offset, length); } | /**
* Wrap a region of an underlying log buffer so can can represent a claimed space for use by a publisher.
*
* @param buffer to be wrapped.
* @param offset at which the claimed region begins including space for the header.
* @param length length of the underlying claimed region including spac... | Wrap a region of an underlying log buffer so can can represent a claimed space for use by a publisher | wrap | {
"repo_name": "oleksiyp/Aeron",
"path": "aeron-client/src/main/java/io/aeron/logbuffer/BufferClaim.java",
"license": "apache-2.0",
"size": 4793
} | [
"org.agrona.concurrent.AtomicBuffer"
] | import org.agrona.concurrent.AtomicBuffer; | import org.agrona.concurrent.*; | [
"org.agrona.concurrent"
] | org.agrona.concurrent; | 282,287 |
public LongOption getVeryVeryVeryLongNameOption() {
return this.veryVeryVeryLongName;
} | LongOption function() { return this.veryVeryVeryLongName; } | /**
* Returns very_very_very_long_name which may be represent <code>null</code>.
* @return very_very_very_long_name
*/ | Returns very_very_very_long_name which may be represent <code>null</code> | getVeryVeryVeryLongNameOption | {
"repo_name": "asakusafw/asakusafw",
"path": "testing-project/asakusa-test-moderator/src/test/java/com/asakusafw/testdriver/testing/model/Naming.java",
"license": "apache-2.0",
"size": 4900
} | [
"com.asakusafw.runtime.value.LongOption"
] | import com.asakusafw.runtime.value.LongOption; | import com.asakusafw.runtime.value.*; | [
"com.asakusafw.runtime"
] | com.asakusafw.runtime; | 2,374,365 |
protected void addThermostat_last_cycle_timePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_House_thermostat_last_cycle_time_feature"),
getS... | void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), VisGridPackage.eINSTANCE.getHouse_Thermostat_last_cycle_time(), true, false, false, ItemPropertyD... | /**
* This adds a property descriptor for the Thermostat last cycle time feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This adds a property descriptor for the Thermostat last cycle time feature. | addThermostat_last_cycle_timePropertyDescriptor | {
"repo_name": "mikesligo/visGrid",
"path": "ie.tcd.gmf.visGrid.edit/src/visGrid/provider/HouseItemProvider.java",
"license": "gpl-3.0",
"size": 120584
} | [
"org.eclipse.emf.edit.provider.ComposeableAdapterFactory",
"org.eclipse.emf.edit.provider.ItemPropertyDescriptor"
] | import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; | import org.eclipse.emf.edit.provider.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,019,268 |
public synchronized Job loadJob() throws IOException {
if(isOversized()) {
return new UnparsedJob(maxTasksForLoadedJob, jobIndexInfo, this);
} else {
return new CompletedJob(conf, jobIndexInfo.getJobId(), historyFile,
false, jobIndexInfo.getUser(), this, aclsMgr);
}
... | synchronized Job function() throws IOException { if(isOversized()) { return new UnparsedJob(maxTasksForLoadedJob, jobIndexInfo, this); } else { return new CompletedJob(conf, jobIndexInfo.getJobId(), historyFile, false, jobIndexInfo.getUser(), this, aclsMgr); } } | /**
* Parse a job from the JobHistoryFile, if the underlying file is not going
* to be deleted and the number of tasks associated with the job is not
* greater than maxTasksForLoadedJob.
*
* @return null if the underlying job history file was deleted, or
* an {@link UnparsedJob} o... | Parse a job from the JobHistoryFile, if the underlying file is not going to be deleted and the number of tasks associated with the job is not greater than maxTasksForLoadedJob | loadJob | {
"repo_name": "apurtell/hadoop",
"path": "hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-hs/src/main/java/org/apache/hadoop/mapreduce/v2/hs/HistoryFileManager.java",
"license": "apache-2.0",
"size": 44453
} | [
"java.io.IOException",
"org.apache.hadoop.mapreduce.v2.app.job.Job"
] | import java.io.IOException; import org.apache.hadoop.mapreduce.v2.app.job.Job; | import java.io.*; import org.apache.hadoop.mapreduce.v2.app.job.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,435,278 |
public DictCollectionFinder getDictCollectionFinder() {
return dictCollectionFinder;
} | DictCollectionFinder function() { return dictCollectionFinder; } | /**
* Returns the dictionary collection finder.
*
* @return the dictionary collection finder
*/ | Returns the dictionary collection finder | getDictCollectionFinder | {
"repo_name": "openegovplatform/OEPv2",
"path": "oep-datamgt-portlet/docroot/WEB-INF/src/org/oep/datamgt/service/base/DictDataServiceBaseImpl.java",
"license": "apache-2.0",
"size": 16021
} | [
"org.oep.datamgt.service.persistence.DictCollectionFinder"
] | import org.oep.datamgt.service.persistence.DictCollectionFinder; | import org.oep.datamgt.service.persistence.*; | [
"org.oep.datamgt"
] | org.oep.datamgt; | 439,756 |
public static PolygonDescription fromPerAligned(byte[] encodedBytes) {
PolygonDescription result = new PolygonDescription();
result.decodePerAligned(new BitStreamReader(encodedBytes));
return result;
} | static PolygonDescription function(byte[] encodedBytes) { PolygonDescription result = new PolygonDescription(); result.decodePerAligned(new BitStreamReader(encodedBytes)); return result; } | /**
* Creates a new PolygonDescription from encoded stream.
*/ | Creates a new PolygonDescription from encoded stream | fromPerAligned | {
"repo_name": "google/supl-client",
"path": "src/main/java/com/google/location/suplclient/asn1/supl2/ver2_ulp_components/PolygonDescription.java",
"license": "apache-2.0",
"size": 3467
} | [
"com.google.location.suplclient.asn1.base.BitStreamReader"
] | import com.google.location.suplclient.asn1.base.BitStreamReader; | import com.google.location.suplclient.asn1.base.*; | [
"com.google.location"
] | com.google.location; | 2,275,738 |
protected ConnectionRecord getObjectInstance(ConnectionRecordModel model) {
return new ModeledConnectionRecord(model);
} | ConnectionRecord function(ConnectionRecordModel model) { return new ModeledConnectionRecord(model); } | /**
* Returns a connection records object which is backed by the given model.
*
* @param model
* The model object to use to back the returned connection record
* object.
*
* @return
* A connection record object which is backed by the given model.
*/ | Returns a connection records object which is backed by the given model | getObjectInstance | {
"repo_name": "Calvin-CS/Agora",
"path": "guacamole-client/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/glyptodon/guacamole/auth/jdbc/connection/ConnectionService.java",
"license": "gpl-3.0",
"size": 18530
} | [
"org.glyptodon.guacamole.net.auth.ConnectionRecord"
] | import org.glyptodon.guacamole.net.auth.ConnectionRecord; | import org.glyptodon.guacamole.net.auth.*; | [
"org.glyptodon.guacamole"
] | org.glyptodon.guacamole; | 2,581,096 |
private void setEditTextFilter(final EditText edit, final int maxLength) {
InputFilter filter = new InputFilter.LengthFilter(maxLength) {
boolean mHasToasted = false;
private static final int VIBRATOR_TIME = 100; | void function(final EditText edit, final int maxLength) { InputFilter filter = new InputFilter.LengthFilter(maxLength) { boolean mHasToasted = false; private static final int VIBRATOR_TIME = 100; | /**
* This method is used to set filter to EditText which is used for user entering filename.
* This filter will ensure that the inputed filename wouldn't be too long. If so, the
* inputed info would be rejected.
*
* @param edit The EditText for filter to be registered.
... | This method is used to set filter to EditText which is used for user entering filename. This filter will ensure that the inputed filename wouldn't be too long. If so, the inputed info would be rejected | setEditTextFilter | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "mediatek/packages/apps/FileManager/src/com/mediatek/filemanager/AlertDialogFragment.java",
"license": "gpl-2.0",
"size": 23632
} | [
"android.text.InputFilter",
"android.widget.EditText"
] | import android.text.InputFilter; import android.widget.EditText; | import android.text.*; import android.widget.*; | [
"android.text",
"android.widget"
] | android.text; android.widget; | 1,544,758 |
public static java.util.Set extractProcedureHotlistSet(ims.domain.ILightweightDomainFactory domainFactory, ims.clinicaladmin.vo.ProcedureHotlistShortVoCollection voCollection)
{
return extractProcedureHotlistSet(domainFactory, voCollection, null, new HashMap());
}
| static java.util.Set function(ims.domain.ILightweightDomainFactory domainFactory, ims.clinicaladmin.vo.ProcedureHotlistShortVoCollection voCollection) { return extractProcedureHotlistSet(domainFactory, voCollection, null, new HashMap()); } | /**
* Create the ims.clinical.configuration.domain.objects.ProcedureHotlist set from the value object collection.
* @param domainFactory - used to create existing (persistent) domain objects.
* @param voCollection - the collection of value objects
*/ | Create the ims.clinical.configuration.domain.objects.ProcedureHotlist set from the value object collection | extractProcedureHotlistSet | {
"repo_name": "open-health-hub/openmaxims-linux",
"path": "openmaxims_workspace/ValueObjects/src/ims/clinicaladmin/vo/domain/ProcedureHotlistShortVoAssembler.java",
"license": "agpl-3.0",
"size": 19859
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 2,396,410 |
private Expression readWindowSpecification(int tokenT, Expression aggExpr) {
SortAndSlice sortAndSlice = null;
readThis(Tokens.OPENBRACKET);
List<Expression> partitionByList = new ArrayList<>();
if (token.tokenType == Tokens.PARTITION) {
read();
readThis(Tok... | Expression function(int tokenT, Expression aggExpr) { SortAndSlice sortAndSlice = null; readThis(Tokens.OPENBRACKET); List<Expression> partitionByList = new ArrayList<>(); if (token.tokenType == Tokens.PARTITION) { read(); readThis(Tokens.BY); while (true) { Expression partitionExpr = XreadValueExpression(); partitionB... | /**
* This is a minimal parsing of the Window Specification. We only use
* partition by and order by lists. There is a lot of complexity in the
* full SQL specification which we don't parse at all.
*
* @param tokenT
* @param aggExpr
* @return
*/ | This is a minimal parsing of the Window Specification. We only use partition by and order by lists. There is a lot of complexity in the full SQL specification which we don't parse at all | readWindowSpecification | {
"repo_name": "simonzhangsm/voltdb",
"path": "src/hsqldb19b3/org/hsqldb_voltpatches/ParserDQL.java",
"license": "agpl-3.0",
"size": 151482
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 281,874 |
public boolean useGazeCursorController() {
return cursorControllerTypes.contains(GVRControllerType.GAZE);
} | boolean function() { return cursorControllerTypes.contains(GVRControllerType.GAZE); } | /**
* Check if current app is using the gaze cursor controller
*
* @return if current app is using the gaze cursor controller
*/ | Check if current app is using the gaze cursor controller | useGazeCursorController | {
"repo_name": "Samsung/GearVRf",
"path": "GVRf/Framework/framework/src/main/java/org/gearvrf/utility/VrAppSettings.java",
"license": "apache-2.0",
"size": 23783
} | [
"org.gearvrf.io.GVRControllerType"
] | import org.gearvrf.io.GVRControllerType; | import org.gearvrf.io.*; | [
"org.gearvrf.io"
] | org.gearvrf.io; | 484,133 |
public void removeDuplicateMontage() {
List jobList = this.getTaskList();
for (Object jobList1 : jobList) {
Task node = (Task) jobList1;
String name = node.getType();
switch (name) {
case "mBackground":
//remove all of its pare... | void function() { List jobList = this.getTaskList(); for (Object jobList1 : jobList) { Task node = (Task) jobList1; String name = node.getType(); switch (name) { case STR: for (int j = 0; j < node.getParentList().size(); j++) { Task parent = (Task) node.getParentList().get(j); if (parent.getType().equals(STR)) { j--; n... | /**
* Remove duplicate just for Montage Set in reducer.method
*/ | Remove duplicate just for Montage Set in reducer.method | removeDuplicateMontage | {
"repo_name": "Nishi-Inc/WorkflowSim-1.0",
"path": "sources/org/workflowsim/clustering/VerticalClustering.java",
"license": "lgpl-3.0",
"size": 6398
} | [
"java.util.List",
"org.workflowsim.Task"
] | import java.util.List; import org.workflowsim.Task; | import java.util.*; import org.workflowsim.*; | [
"java.util",
"org.workflowsim"
] | java.util; org.workflowsim; | 1,775,723 |
public static boolean isEmpty(@Nullable EditText e) {
return e == null || isEmpty(getString(e));
} | static boolean function(@Nullable EditText e) { return e == null isEmpty(getString(e)); } | /**
* Is the EditText null or empty?
*
* @param e The EditText
* @return true if the edittext is null or empty
*/ | Is the EditText null or empty | isEmpty | {
"repo_name": "yajnesh/AndroidGeneralUtils",
"path": "generic/GenericUtil.java",
"license": "gpl-3.0",
"size": 11979
} | [
"android.support.annotation.Nullable",
"android.widget.EditText"
] | import android.support.annotation.Nullable; import android.widget.EditText; | import android.support.annotation.*; import android.widget.*; | [
"android.support",
"android.widget"
] | android.support; android.widget; | 2,577,426 |
private void checkXmlTypedef(AliasTypeSpec alias, XmlTypedefInfo info) {
TypeSpec orgType = alias.originalType();
if (orgType instanceof VectorType) {
info.isSequence = true;
// Continue by checking the type that we have a sequence of
VectorType vector = (VectorType) orgType;
orgType = vector.elemen... | void function(AliasTypeSpec alias, XmlTypedefInfo info) { TypeSpec orgType = alias.originalType(); if (orgType instanceof VectorType) { info.isSequence = true; VectorType vector = (VectorType) orgType; orgType = vector.elementTypeSpec(); } if (orgType instanceof AliasTypeSpec) { checkXmlTypedef((AliasTypeSpec)orgType, ... | /**
* TODO: Try to reuse this type printing code for the interface and struct code generation.
* Also remove code duplication with JacorbVisitor#isOrHasXmlEntityStruct
*/ | Also remove code duplication with JacorbVisitor#isOrHasXmlEntityStruct | checkXmlTypedef | {
"repo_name": "jbarriosc/ACSUFRO",
"path": "LGPL/CommonSoftware/XmlIdl/src/alma/tools/idlgen/AcsXmlNamingExpert.java",
"license": "lgpl-2.1",
"size": 10135
} | [
"org.jacorb.idl.AliasTypeSpec",
"org.jacorb.idl.ConstrTypeSpec",
"org.jacorb.idl.Interface",
"org.jacorb.idl.StructType",
"org.jacorb.idl.TypeDeclaration",
"org.jacorb.idl.TypeSpec",
"org.jacorb.idl.VectorType"
] | import org.jacorb.idl.AliasTypeSpec; import org.jacorb.idl.ConstrTypeSpec; import org.jacorb.idl.Interface; import org.jacorb.idl.StructType; import org.jacorb.idl.TypeDeclaration; import org.jacorb.idl.TypeSpec; import org.jacorb.idl.VectorType; | import org.jacorb.idl.*; | [
"org.jacorb.idl"
] | org.jacorb.idl; | 2,416,242 |
@Test
public void testTopSecondDegreeMetadataByCountWithSmallGraphWithEdgeRemoval() {
NodeMetadataLeftIndexedMultiSegmentBipartiteGraph bipartiteGraph =
BipartiteGraphTestHelper.buildTestNodeMetadataLeftIndexedMultiSegmentBipartiteGraphWithUnfavorite();
long queryNode = 1;
Long2DoubleMap seedsMap... | void function() { NodeMetadataLeftIndexedMultiSegmentBipartiteGraph bipartiteGraph = BipartiteGraphTestHelper.buildTestNodeMetadataLeftIndexedMultiSegmentBipartiteGraphWithUnfavorite(); long queryNode = 1; Long2DoubleMap seedsMap = new Long2DoubleArrayMap( new long[]{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14}, new ... | /**
* Test a small graph that contain favorite and unfavorite edges to make sure they are
* removed correctly.
*/ | Test a small graph that contain favorite and unfavorite edges to make sure they are removed correctly | testTopSecondDegreeMetadataByCountWithSmallGraphWithEdgeRemoval | {
"repo_name": "twitter/GraphJet",
"path": "graphjet-core/src/test/java/com/twitter/graphjet/algorithms/counting/TopSecondDegreeByCountForTweetTest.java",
"license": "apache-2.0",
"size": 25476
} | [
"com.google.common.collect.Lists",
"com.twitter.graphjet.algorithms.BipartiteGraphTestHelper",
"com.twitter.graphjet.algorithms.RecommendationInfo",
"com.twitter.graphjet.algorithms.RecommendationType",
"com.twitter.graphjet.algorithms.counting.tweet.TopSecondDegreeByCountForTweet",
"com.twitter.graphjet.... | import com.google.common.collect.Lists; import com.twitter.graphjet.algorithms.BipartiteGraphTestHelper; import com.twitter.graphjet.algorithms.RecommendationInfo; import com.twitter.graphjet.algorithms.RecommendationType; import com.twitter.graphjet.algorithms.counting.tweet.TopSecondDegreeByCountForTweet; import com.... | import com.google.common.collect.*; import com.twitter.graphjet.algorithms.*; import com.twitter.graphjet.algorithms.counting.tweet.*; import com.twitter.graphjet.algorithms.filters.*; import com.twitter.graphjet.bipartite.*; import com.twitter.graphjet.stats.*; import it.unimi.dsi.fastutil.longs.*; import java.util.*;... | [
"com.google.common",
"com.twitter.graphjet",
"it.unimi.dsi",
"java.util",
"org.junit"
] | com.google.common; com.twitter.graphjet; it.unimi.dsi; java.util; org.junit; | 984,003 |
public Builder withOutputDescription(@Nullable String outputDescription) {
this.outputDescription = outputDescription;
return this;
} | Builder function(@Nullable String outputDescription) { this.outputDescription = outputDescription; return this; } | /**
* The description to be used for job output resources. The description will be used as is for all output resources.
*
* @param outputDescription value of output description
* @return builder for convenient configuration
*/ | The description to be used for job output resources. The description will be used as is for all output resources | withOutputDescription | {
"repo_name": "Jaspersoft/js-android-sdk",
"path": "core/src/main/java/com/jaspersoft/android/sdk/service/data/schedule/RepositoryDestination.java",
"license": "lgpl-3.0",
"size": 13224
} | [
"org.jetbrains.annotations.Nullable"
] | import org.jetbrains.annotations.Nullable; | import org.jetbrains.annotations.*; | [
"org.jetbrains.annotations"
] | org.jetbrains.annotations; | 2,088,244 |
public void onUpdatedChannels(List<ChannelData> channels)
{
model.setChannels(channels);
}
public boolean canAnnotate() { return model.canAnnotate(); } | void function(List<ChannelData> channels) { model.setChannels(channels); } public boolean canAnnotate() { return model.canAnnotate(); } | /**
* Implemented as specified by the {@link Renderer} interface.
* @see Renderer#onUpdatedChannels(List)
*/ | Implemented as specified by the <code>Renderer</code> interface | onUpdatedChannels | {
"repo_name": "bramalingam/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/metadata/rnd/RendererComponent.java",
"license": "gpl-2.0",
"size": 36084
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,410,321 |
Subscriptions subscriptions(); | Subscriptions subscriptions(); | /**
* Entry point to subscription management APIs.
*
* @return Subscriptions interface providing access to subscription management
*/ | Entry point to subscription management APIs | subscriptions | {
"repo_name": "martinsawicki/azure-sdk-for-java",
"path": "azure/src/main/java/com/microsoft/azure/management/Azure.java",
"license": "mit",
"size": 27976
} | [
"com.microsoft.azure.management.resources.Subscriptions"
] | import com.microsoft.azure.management.resources.Subscriptions; | import com.microsoft.azure.management.resources.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 244,191 |
@Override
protected void render(Graphics2D graphics, SparklineGraph2DRenderer renderer, Point2DDataset data) {
renderer.draw(graphics, data);
} | void function(Graphics2D graphics, SparklineGraph2DRenderer renderer, Point2DDataset data) { renderer.draw(graphics, data); } | /**
* Draws the 2D point data in a sparkline graph.
* Primary method in the render loop.
* @param graphics where image draws to
* @param renderer what draws the image
* @param data the 2D point data being drawn
*/ | Draws the 2D point data in a sparkline graph. Primary method in the render loop | render | {
"repo_name": "ControlSystemStudio/diirt",
"path": "graphene/graphene-profile/src/main/java/org/diirt/graphene/profile/impl/ProfileSparklineGraph2D.java",
"license": "mit",
"size": 3304
} | [
"java.awt.Graphics2D",
"org.diirt.graphene.Point2DDataset",
"org.diirt.graphene.SparklineGraph2DRenderer"
] | import java.awt.Graphics2D; import org.diirt.graphene.Point2DDataset; import org.diirt.graphene.SparklineGraph2DRenderer; | import java.awt.*; import org.diirt.graphene.*; | [
"java.awt",
"org.diirt.graphene"
] | java.awt; org.diirt.graphene; | 1,762,303 |
public Condition collate(Collate collation) {
if (collation.equals(Collate.NONE)) {
mPostArgument = null;
} else {
collate(collation.name());
}
return this;
} | Condition function(Collate collation) { if (collation.equals(Collate.NONE)) { mPostArgument = null; } else { collate(collation.name()); } return this; } | /**
* Adds a COLLATE to the end of this condition using the {@link com.raizlabs.android.dbflow.annotation.Collate} enum.
*
* @param collation The SQLite collate function
* @return
*/ | Adds a COLLATE to the end of this condition using the <code>com.raizlabs.android.dbflow.annotation.Collate</code> enum | collate | {
"repo_name": "omegasoft7/DBFlow",
"path": "library/src/main/java/com/raizlabs/android/dbflow/sql/builder/Condition.java",
"license": "mit",
"size": 15610
} | [
"com.raizlabs.android.dbflow.annotation.Collate"
] | import com.raizlabs.android.dbflow.annotation.Collate; | import com.raizlabs.android.dbflow.annotation.*; | [
"com.raizlabs.android"
] | com.raizlabs.android; | 2,202,536 |
public static Metric<AbstractILMultiDimensional> createPrecisionMetric(boolean monotonic, double gsFactor, AggregateFunction function) {
return __MetricV2.createPrecisionMetric(monotonic, gsFactor, function);
} | static Metric<AbstractILMultiDimensional> function(boolean monotonic, double gsFactor, AggregateFunction function) { return __MetricV2.createPrecisionMetric(monotonic, gsFactor, function); } | /**
* Creates an instance of the precision metric.
* This metric will respect attribute weights defined in the configuration.
*
* @param monotonic If set to true, the monotonic variant of the metric will be created
* @param gsFactor A factor [0,1] weighting generalization and suppression.
... | Creates an instance of the precision metric. This metric will respect attribute weights defined in the configuration | createPrecisionMetric | {
"repo_name": "arx-deidentifier/arx",
"path": "src/main/org/deidentifier/arx/metric/Metric.java",
"license": "apache-2.0",
"size": 74297
} | [
"org.deidentifier.arx.metric.v2.AbstractILMultiDimensional"
] | import org.deidentifier.arx.metric.v2.AbstractILMultiDimensional; | import org.deidentifier.arx.metric.v2.*; | [
"org.deidentifier.arx"
] | org.deidentifier.arx; | 243,831 |
public int deleteBulk(String indexName, Map<String, String> ids) {
// bulk-delete the ids
if (ids == null || ids.size() == 0) return 0;
BulkRequestBuilder bulkRequest = elasticsearchClient.prepareBulk();
for (Map.Entry<String, String> id : ids.entrySet()) {
bulkRequest.ad... | int function(String indexName, Map<String, String> ids) { if (ids == null ids.size() == 0) return 0; BulkRequestBuilder bulkRequest = elasticsearchClient.prepareBulk(); for (Map.Entry<String, String> id : ids.entrySet()) { bulkRequest.add(new DeleteRequest().id(id.getKey()).index(indexName).type(id.getValue())); } bulk... | /**
* Delete a list of documents for a given set of ids
* ATTENTION: read about the time-out of version number checking in the method above.
*
* @param ids
* a map from the unique identifier of a document to the document type
* @return the number of deleted documents
*/ | Delete a list of documents for a given set of ids | deleteBulk | {
"repo_name": "shivenmian/loklak_server",
"path": "src/org/loklak/data/ElasticsearchClient.java",
"license": "lgpl-2.1",
"size": 44539
} | [
"java.util.Map",
"org.elasticsearch.action.bulk.BulkRequestBuilder",
"org.elasticsearch.action.delete.DeleteRequest"
] | import java.util.Map; import org.elasticsearch.action.bulk.BulkRequestBuilder; import org.elasticsearch.action.delete.DeleteRequest; | import java.util.*; import org.elasticsearch.action.bulk.*; import org.elasticsearch.action.delete.*; | [
"java.util",
"org.elasticsearch.action"
] | java.util; org.elasticsearch.action; | 52,455 |
public void getEmpty(String accountName) throws ErrorException, IOException, IllegalArgumentException {
getEmptyWithServiceResponseAsync(accountName).toBlocking().single().getBody();
} | void function(String accountName) throws ErrorException, IOException, IllegalArgumentException { getEmptyWithServiceResponseAsync(accountName).toBlocking().single().getBody(); } | /**
* Get a 200 to test a valid base uri.
*
* @param accountName Account Name
* @throws ErrorException exception thrown from REST call
* @throws IOException exception thrown from serialization/deserialization
* @throws IllegalArgumentException exception thrown from invalid parameters
... | Get a 200 to test a valid base uri | getEmpty | {
"repo_name": "tbombach/autorest",
"path": "src/generator/AutoRest.Java.Azure.Fluent.Tests/src/main/java/fixtures/custombaseuri/implementation/PathsInner.java",
"license": "mit",
"size": 5428
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,026,862 |
protected void removeSelectedElements()
{
Set<Object> elementsSet = new HashSet<Object>();
Object[] existingElements = contentProvider.getElements(null);
for (Object o : existingElements)
{
elementsSet.add(o);
}
Object[] removedElements = ((IStructuredSelection) listViewer.getSelection()).toArray();
... | void function() { Set<Object> elementsSet = new HashSet<Object>(); Object[] existingElements = contentProvider.getElements(null); for (Object o : existingElements) { elementsSet.add(o); } Object[] removedElements = ((IStructuredSelection) listViewer.getSelection()).toArray(); for (Object o : removedElements) { elements... | /**
* Remove the selected elements from the list
*/ | Remove the selected elements from the list | removeSelectedElements | {
"repo_name": "shakaran/studio3",
"path": "plugins/com.aptana.formatter.ui.epl/src/com/aptana/formatter/ui/preferences/AddRemoveList.java",
"license": "gpl-3.0",
"size": 9862
} | [
"java.util.HashSet",
"java.util.Set",
"org.eclipse.jface.viewers.IStructuredSelection"
] | import java.util.HashSet; import java.util.Set; import org.eclipse.jface.viewers.IStructuredSelection; | import java.util.*; import org.eclipse.jface.viewers.*; | [
"java.util",
"org.eclipse.jface"
] | java.util; org.eclipse.jface; | 591,536 |
public byte[] getHeaderBytes() {
return Arrays.copyOfRange(blockData, 0, BlockHeader.HEADER_SIZE);
} | byte[] function() { return Arrays.copyOfRange(blockData, 0, BlockHeader.HEADER_SIZE); } | /**
* Return the serialized block header
*
* @return Byte array containing just the block header
*/ | Return the serialized block header | getHeaderBytes | {
"repo_name": "Toporin/BitcoinCore",
"path": "src/main/java/org/ScripterRon/BitcoinCore/Block.java",
"license": "apache-2.0",
"size": 21066
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 2,379,349 |
@JsonIgnore
boolean possibleInDomain(Map<String, RangeSet<String>> domain); | boolean possibleInDomain(Map<String, RangeSet<String>> domain); | /**
* if given domain ranges are not possible in this shard, return false; otherwise return true;
* @return possibility of in domain
*/ | if given domain ranges are not possible in this shard, return false; otherwise return true | possibleInDomain | {
"repo_name": "gianm/druid",
"path": "core/src/main/java/org/apache/druid/timeline/partition/ShardSpec.java",
"license": "apache-2.0",
"size": 4782
} | [
"com.google.common.collect.RangeSet",
"java.util.Map"
] | import com.google.common.collect.RangeSet; import java.util.Map; | import com.google.common.collect.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 1,203,924 |
public static boolean containsFluid(ItemStack container, FluidStack fluid)
{
if (container == null || fluid == null)
{
return false;
}
FluidContainerData data = containerFluidMap.get(new ContainerKey(container));
return data == null ? false : data.fluid.conta... | static boolean function(ItemStack container, FluidStack fluid) { if (container == null fluid == null) { return false; } FluidContainerData data = containerFluidMap.get(new ContainerKey(container)); return data == null ? false : data.fluid.containsFluid(fluid); } | /**
* Determines if a container holds a specific fluid.
*/ | Determines if a container holds a specific fluid | containsFluid | {
"repo_name": "shadekiller666/MinecraftForge",
"path": "src/main/java/net/minecraftforge/fluids/FluidContainerRegistry.java",
"license": "lgpl-2.1",
"size": 13919
} | [
"net.minecraft.item.ItemStack"
] | import net.minecraft.item.ItemStack; | import net.minecraft.item.*; | [
"net.minecraft.item"
] | net.minecraft.item; | 1,378,404 |
private Object parse(String literalValue, Class<?> returnType) throws ClassNotFoundException
{
// Primitives
if (byte.class.equals(returnType))
{
return Byte.valueOf(literalValue);
}
if (short.class.equals(returnType))
{
return S... | Object function(String literalValue, Class<?> returnType) throws ClassNotFoundException { if (byte.class.equals(returnType)) { return Byte.valueOf(literalValue); } if (short.class.equals(returnType)) { return Short.valueOf(literalValue); } if (int.class.equals(returnType)) { return Integer.valueOf(literalValue); } if (... | /**
* Parses the given literal value into the given returnType. Supports all standard annotation types (JLS 9.7).
*/ | Parses the given literal value into the given returnType. Supports all standard annotation types (JLS 9.7) | parse | {
"repo_name": "forge/core",
"path": "javaee/scaffold-faces/src/main/java/org/jboss/forge/addon/scaffold/faces/metawidget/inspector/propertystyle/ForgePropertyStyle.java",
"license": "epl-1.0",
"size": 22784
} | [
"java.lang.annotation.Annotation",
"java.lang.reflect.Array",
"org.jboss.forge.roaster.model.source.JavaSource",
"org.metawidget.util.simple.StringUtils"
] | import java.lang.annotation.Annotation; import java.lang.reflect.Array; import org.jboss.forge.roaster.model.source.JavaSource; import org.metawidget.util.simple.StringUtils; | import java.lang.annotation.*; import java.lang.reflect.*; import org.jboss.forge.roaster.model.source.*; import org.metawidget.util.simple.*; | [
"java.lang",
"org.jboss.forge",
"org.metawidget.util"
] | java.lang; org.jboss.forge; org.metawidget.util; | 1,043,216 |
protected WebApplicationContext getWebApplicationContext(FacesContext facesContext) {
return FacesContextUtils.getRequiredWebApplicationContext(facesContext);
} | WebApplicationContext function(FacesContext facesContext) { return FacesContextUtils.getRequiredWebApplicationContext(facesContext); } | /**
* Retrieve the web application context to delegate bean name resolution to.
* Default implementation delegates to FacesContextUtils.
* @param facesContext the current JSF context
* @return the Spring web application context
* @see FacesContextUtils#getRequiredWebApplicationContext
*/ | Retrieve the web application context to delegate bean name resolution to. Default implementation delegates to FacesContextUtils | getWebApplicationContext | {
"repo_name": "dachengxi/spring1.1.1_source",
"path": "src/org/springframework/web/jsf/DelegatingVariableResolver.java",
"license": "mit",
"size": 5044
} | [
"javax.faces.context.FacesContext",
"org.springframework.web.context.WebApplicationContext"
] | import javax.faces.context.FacesContext; import org.springframework.web.context.WebApplicationContext; | import javax.faces.context.*; import org.springframework.web.context.*; | [
"javax.faces",
"org.springframework.web"
] | javax.faces; org.springframework.web; | 791,158 |
@POST
@Path("submitAndSchedule/{type}")
@Consumes({MediaType.TEXT_XML, MediaType.TEXT_PLAIN})
@Produces({MediaType.TEXT_XML, MediaType.TEXT_PLAIN, MediaType.APPLICATION_JSON})
@Monitored(event = "submitAndSchedule")
@Override
public APIResult submitAndSchedule(
@Context HttpServl... | @Path(STR) @Consumes({MediaType.TEXT_XML, MediaType.TEXT_PLAIN}) @Produces({MediaType.TEXT_XML, MediaType.TEXT_PLAIN, MediaType.APPLICATION_JSON}) @Monitored(event = STR) APIResult function( @Context HttpServletRequest request, @Dimension(STR) @PathParam("type") String type, @Dimension("colo") @QueryParam("colo") Strin... | /**
* Submits and schedules an entity.
* @param request Servlet Request
* @param type Valid options are feed or process.
* @param coloExpr Colo on which the query should be run.
* @param skipDryRun Optional query param, Falcon skips oozie dryrun when value is set to true.
* @return Result ... | Submits and schedules an entity | submitAndSchedule | {
"repo_name": "sriksun/falcon",
"path": "prism/src/main/java/org/apache/falcon/resource/proxy/SchedulableEntityManagerProxy.java",
"license": "apache-2.0",
"size": 39445
} | [
"java.util.HashMap",
"java.util.Map",
"javax.servlet.http.HttpServletRequest",
"javax.ws.rs.Consumes",
"javax.ws.rs.Path",
"javax.ws.rs.PathParam",
"javax.ws.rs.Produces",
"javax.ws.rs.QueryParam",
"javax.ws.rs.core.Context",
"javax.ws.rs.core.MediaType",
"org.apache.falcon.monitors.Dimension",
... | import java.util.HashMap; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.ws.rs.Consumes; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import org.apa... | import java.util.*; import javax.servlet.http.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.apache.falcon.monitors.*; import org.apache.falcon.resource.*; | [
"java.util",
"javax.servlet",
"javax.ws",
"org.apache.falcon"
] | java.util; javax.servlet; javax.ws; org.apache.falcon; | 2,041,594 |
private static List<String> normalize(final Object value, final boolean hasMultipleValues)
{
final List<String> retVal = new ArrayList<>();
if (value == null) {
retVal.add(null);
} else if (value instanceof String) {
retVal.add(NullHandling.emptyToNullIfNeeded(((String) value)));
} else... | static List<String> function(final Object value, final boolean hasMultipleValues) { final List<String> retVal = new ArrayList<>(); if (value == null) { retVal.add(null); } else if (value instanceof String) { retVal.add(NullHandling.emptyToNullIfNeeded(((String) value))); } else if (value instanceof List) { final List<S... | /**
* Normalize an input value the same way that IndexMerger is expected to do it.
*/ | Normalize an input value the same way that IndexMerger is expected to do it | normalize | {
"repo_name": "himanshug/druid",
"path": "processing/src/test/java/org/apache/druid/segment/IndexMergerNullHandlingTest.java",
"license": "apache-2.0",
"size": 10271
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.stream.Collectors",
"org.apache.druid.common.config.NullHandling"
] | import java.util.ArrayList; import java.util.List; import java.util.stream.Collectors; import org.apache.druid.common.config.NullHandling; | import java.util.*; import java.util.stream.*; import org.apache.druid.common.config.*; | [
"java.util",
"org.apache.druid"
] | java.util; org.apache.druid; | 2,229,979 |
public MetaProperty<ImmutableList<ResolvedFixedCouponBond>> deliveryBasket() {
return deliveryBasket;
} | MetaProperty<ImmutableList<ResolvedFixedCouponBond>> function() { return deliveryBasket; } | /**
* The meta-property for the {@code deliveryBasket} property.
* @return the meta-property, not null
*/ | The meta-property for the deliveryBasket property | deliveryBasket | {
"repo_name": "OpenGamma/Strata",
"path": "modules/product/src/main/java/com/opengamma/strata/product/bond/ResolvedBondFuture.java",
"license": "apache-2.0",
"size": 35094
} | [
"com.google.common.collect.ImmutableList",
"org.joda.beans.MetaProperty"
] | import com.google.common.collect.ImmutableList; import org.joda.beans.MetaProperty; | import com.google.common.collect.*; import org.joda.beans.*; | [
"com.google.common",
"org.joda.beans"
] | com.google.common; org.joda.beans; | 1,950,120 |
public Drawable getDropShadow() {
return mDropShadowDrawable;
} | Drawable function() { return mDropShadowDrawable; } | /**
* Returns the drawable of the drop shadow.
*/ | Returns the drawable of the drop shadow | getDropShadow | {
"repo_name": "0359xiaodong/serenity-android",
"path": "android-menudrawer/menudrawer/src/net/simonvt/menudrawer/MenuDrawer.java",
"license": "mit",
"size": 47631
} | [
"android.graphics.drawable.Drawable"
] | import android.graphics.drawable.Drawable; | import android.graphics.drawable.*; | [
"android.graphics"
] | android.graphics; | 2,047,548 |
public Map<String, String> getHeaders() {
return headers;
} | Map<String, String> function() { return headers; } | /**
* response headers
*
* @return response headers
*/ | response headers | getHeaders | {
"repo_name": "italoag/java-design-patterns",
"path": "serverless/src/main/java/com/iluwatar/serverless/faas/ApiGatewayResponse.java",
"license": "mit",
"size": 4668
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 106,297 |
private boolean checkRelationships() {
for (final String encodedRelationCheck : relationship) {
final String[] relationCheck = splitOnColon(encodedRelationCheck);
final GamePlayer p1 = getData().getPlayerList().getPlayerId(relationCheck[0]);
final GamePlayer p2 = getData().getPlayerList().getPla... | boolean function() { for (final String encodedRelationCheck : relationship) { final String[] relationCheck = splitOnColon(encodedRelationCheck); final GamePlayer p1 = getData().getPlayerList().getPlayerId(relationCheck[0]); final GamePlayer p2 = getData().getPlayerList().getPlayerId(relationCheck[1]); final int relatio... | /**
* Checks if all relationship requirements are set.
*
* @return whether all relationships as are required are set correctly.
*/ | Checks if all relationship requirements are set | checkRelationships | {
"repo_name": "DanVanAtta/triplea",
"path": "game-core/src/main/java/games/strategy/triplea/attachments/RulesAttachment.java",
"license": "gpl-3.0",
"size": 49986
} | [
"games.strategy.engine.data.GamePlayer",
"games.strategy.engine.data.RelationshipTracker",
"games.strategy.engine.data.RelationshipType",
"games.strategy.triplea.Constants",
"games.strategy.triplea.delegate.Matches"
] | import games.strategy.engine.data.GamePlayer; import games.strategy.engine.data.RelationshipTracker; import games.strategy.engine.data.RelationshipType; import games.strategy.triplea.Constants; import games.strategy.triplea.delegate.Matches; | import games.strategy.engine.data.*; import games.strategy.triplea.*; import games.strategy.triplea.delegate.*; | [
"games.strategy.engine",
"games.strategy.triplea"
] | games.strategy.engine; games.strategy.triplea; | 75,763 |
public ItemStack getItemInHand() {
return itemstack;
} | ItemStack function() { return itemstack; } | /**
* Gets the ItemStack for the item currently in the player's hand.
*
* @return The ItemStack for the item currently in the player's hand
*/ | Gets the ItemStack for the item currently in the player's hand | getItemInHand | {
"repo_name": "GlowstoneMC/Glowkit-Legacy",
"path": "src/main/java/org/bukkit/event/block/BlockDamageEvent.java",
"license": "gpl-3.0",
"size": 2234
} | [
"org.bukkit.inventory.ItemStack"
] | import org.bukkit.inventory.ItemStack; | import org.bukkit.inventory.*; | [
"org.bukkit.inventory"
] | org.bukkit.inventory; | 2,723,888 |
public SearchRequestBuilder addSort(SortBuilder sort) {
sourceBuilder().sort(sort);
return this;
} | SearchRequestBuilder function(SortBuilder sort) { sourceBuilder().sort(sort); return this; } | /**
* Adds a generic sort builder.
*
* @see org.elasticsearch.search.sort.SortBuilders
*/ | Adds a generic sort builder | addSort | {
"repo_name": "strapdata/elassandra5-rc",
"path": "core/src/main/java/org/elasticsearch/action/search/SearchRequestBuilder.java",
"license": "apache-2.0",
"size": 18363
} | [
"org.elasticsearch.search.sort.SortBuilder"
] | import org.elasticsearch.search.sort.SortBuilder; | import org.elasticsearch.search.sort.*; | [
"org.elasticsearch.search"
] | org.elasticsearch.search; | 2,801,016 |
public EncryptionScopeInner withSource(EncryptionScopeSource source) {
this.source = source;
return this;
} | EncryptionScopeInner function(EncryptionScopeSource source) { this.source = source; return this; } | /**
* Set the source property: The provider for the encryption scope. Possible values (case-insensitive):
* Microsoft.Storage, Microsoft.KeyVault.
*
* @param source the source value to set.
* @return the EncryptionScopeInner object itself.
*/ | Set the source property: The provider for the encryption scope. Possible values (case-insensitive): Microsoft.Storage, Microsoft.KeyVault | withSource | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-storage/src/main/java/com/azure/resourcemanager/storage/fluent/models/EncryptionScopeInner.java",
"license": "mit",
"size": 5218
} | [
"com.azure.resourcemanager.storage.models.EncryptionScopeSource"
] | import com.azure.resourcemanager.storage.models.EncryptionScopeSource; | import com.azure.resourcemanager.storage.models.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 1,723,896 |
public void setImageToWrapCropBoundsAnimDuration(@IntRange(from = 100) long imageToWrapCropBoundsAnimDuration) {
if (imageToWrapCropBoundsAnimDuration > 0) {
mImageToWrapCropBoundsAnimDuration = imageToWrapCropBoundsAnimDuration;
} else {
throw new IllegalArgumentException("A... | void function(@IntRange(from = 100) long imageToWrapCropBoundsAnimDuration) { if (imageToWrapCropBoundsAnimDuration > 0) { mImageToWrapCropBoundsAnimDuration = imageToWrapCropBoundsAnimDuration; } else { throw new IllegalArgumentException(STR); } } | /**
* This method sets animation duration for image to wrap the crop bounds
*
* @param imageToWrapCropBoundsAnimDuration - duration in milliseconds
*/ | This method sets animation duration for image to wrap the crop bounds | setImageToWrapCropBoundsAnimDuration | {
"repo_name": "ezhuwx/Picseler",
"path": "ucrop/src/main/java/com/ez/gallery/ucrop/view/CropImageView.java",
"license": "apache-2.0",
"size": 25571
} | [
"android.support.annotation.IntRange"
] | import android.support.annotation.IntRange; | import android.support.annotation.*; | [
"android.support"
] | android.support; | 2,589,728 |
public void setEmailAddresses(List<ItemAttribute> emailAddresses) {
this.emailAddresses = emailAddresses;
}
| void function(List<ItemAttribute> emailAddresses) { this.emailAddresses = emailAddresses; } | /**
* Set the email addresses
*
* @param emailAddresses The email addresses
*/ | Set the email addresses | setEmailAddresses | {
"repo_name": "anu-doi/metadata-stores",
"path": "store/src/main/java/au/edu/anu/metadatastores/store/people/PersonItem.java",
"license": "gpl-3.0",
"size": 12317
} | [
"au.edu.anu.metadatastores.datamodel.store.ItemAttribute",
"java.util.List"
] | import au.edu.anu.metadatastores.datamodel.store.ItemAttribute; import java.util.List; | import au.edu.anu.metadatastores.datamodel.store.*; import java.util.*; | [
"au.edu.anu",
"java.util"
] | au.edu.anu; java.util; | 379,507 |
public LineStyleEnum getStyle() {
return lineStyle;
} | LineStyleEnum function() { return lineStyle; } | /**
* return the style of the line (it can be DOTTED, DASHED, SOLID or DUBLE).
*/ | return the style of the line (it can be DOTTED, DASHED, SOLID or DUBLE) | getStyle | {
"repo_name": "OpenSoftwareSolutions/PDFReporter-Studio",
"path": "com.jaspersoft.studio/src/com/jaspersoft/studio/editor/action/border/TemplateBorder.java",
"license": "lgpl-3.0",
"size": 8161
} | [
"net.sf.jasperreports.engine.type.LineStyleEnum"
] | import net.sf.jasperreports.engine.type.LineStyleEnum; | import net.sf.jasperreports.engine.type.*; | [
"net.sf.jasperreports"
] | net.sf.jasperreports; | 1,654,415 |
public final boolean add(int index, E object) throws IndexOutOfBoundsException {
if ((index < 0) || (index > size())) {
throw new IndexOutOfBoundsException();
}
boolean added = false;
int removed = -1;
ListIterator<E> iter = $backingList.listIterator();
if (index == 0) {
iter.add(o... | final boolean function(int index, E object) throws IndexOutOfBoundsException { if ((index < 0) (index > size())) { throw new IndexOutOfBoundsException(); } boolean added = false; int removed = -1; ListIterator<E> iter = $backingList.listIterator(); if (index == 0) { iter.add(object); added = true; } while (iter.hasNext... | /**
* Puts {@code object} at {@code index} oin this ordered set. If {@code 'contains(object)},
* moves {@code object} to {@code index} in this ordered set, and moves all elements
* inbetween.
*
* @result contains(object);
* @result get(index) == object;
* @result ! 'contains(object) ? size() == 'si... | Puts object at index oin this ordered set. If 'contains(object), moves object to index in this ordered set, and moves all elements inbetween | add | {
"repo_name": "jandppw/ppwcode-recovered-from-google-code",
"path": "java/util/collections/trunk/src/main/java/org/ppwcode/util/collection_I/LinkedListOrderedSet.java",
"license": "apache-2.0",
"size": 10227
} | [
"java.util.ListIterator"
] | import java.util.ListIterator; | import java.util.*; | [
"java.util"
] | java.util; | 991,228 |
int read(ContentResolver cr) {
DebugPrint("PIMList.read(" + cr + ")");
// try to query for contacts
try {
listCursor = cr.query(Contacts.CONTENT_URI,
new String[] { Contacts._ID }, null, null, null);
} catch (Exception e) {
return throwError(MA_PIM_ERR_LIST_UNAVAILABLE,
PIMError.PANIC_LIST_UN... | int read(ContentResolver cr) { DebugPrint(STR + cr + ")"); try { listCursor = cr.query(Contacts.CONTENT_URI, new String[] { Contacts._ID }, null, null, null); } catch (Exception e) { return throwError(MA_PIM_ERR_LIST_UNAVAILABLE, PIMError.PANIC_LIST_UNAVAILABLE, PIMError.sStrListUnavailable); } if (listCursor == null) ... | /**
* Read the list
*/ | Read the list | read | {
"repo_name": "MoSync/MoSync",
"path": "runtimes/java/platforms/androidJNI/AndroidProject/src/com/mosync/pim/PIMList.java",
"license": "gpl-2.0",
"size": 3813
} | [
"android.content.ContentResolver",
"android.provider.ContactsContract",
"com.mosync.internal.android.MoSyncHelpers"
] | import android.content.ContentResolver; import android.provider.ContactsContract; import com.mosync.internal.android.MoSyncHelpers; | import android.content.*; import android.provider.*; import com.mosync.internal.android.*; | [
"android.content",
"android.provider",
"com.mosync.internal"
] | android.content; android.provider; com.mosync.internal; | 1,498,994 |
public VirtualNetworkInner withSubnetOverrides(List<SubnetOverride> subnetOverrides) {
this.subnetOverrides = subnetOverrides;
return this;
} | VirtualNetworkInner function(List<SubnetOverride> subnetOverrides) { this.subnetOverrides = subnetOverrides; return this; } | /**
* Set the subnetOverrides value.
*
* @param subnetOverrides the subnetOverrides value to set
* @return the VirtualNetworkInner object itself.
*/ | Set the subnetOverrides value | withSubnetOverrides | {
"repo_name": "martinsawicki/azure-sdk-for-java",
"path": "azure-mgmt-devtestlab/src/main/java/com/microsoft/azure/management/devtestlab/implementation/VirtualNetworkInner.java",
"license": "mit",
"size": 6100
} | [
"com.microsoft.azure.management.devtestlab.SubnetOverride",
"java.util.List"
] | import com.microsoft.azure.management.devtestlab.SubnetOverride; import java.util.List; | import com.microsoft.azure.management.devtestlab.*; import java.util.*; | [
"com.microsoft.azure",
"java.util"
] | com.microsoft.azure; java.util; | 2,444,695 |
MultiTaskSlot allocateMultiTaskSlot(SlotRequestId slotRequestId, AbstractID groupId) {
Preconditions.checkState(!super.contains(groupId));
LOG.debug("Create nested multi task slot [{}] in parent multi task slot [{}] for group [{}].", slotRequestId, getSlotRequestId(), groupId);
final MultiTaskSlot inner... | MultiTaskSlot allocateMultiTaskSlot(SlotRequestId slotRequestId, AbstractID groupId) { Preconditions.checkState(!super.contains(groupId)); LOG.debug(STR, slotRequestId, getSlotRequestId(), groupId); final MultiTaskSlot inner = new MultiTaskSlot( slotRequestId, groupId, this); children.put(groupId, inner); allTaskSlots.... | /**
* Allocates a MultiTaskSlot and registers it under the given groupId at
* this MultiTaskSlot.
*
* @param slotRequestId of the new multi task slot
* @param groupId under which the new multi task slot is registered
* @return the newly allocated MultiTaskSlot
*/ | Allocates a MultiTaskSlot and registers it under the given groupId at this MultiTaskSlot | allocateMultiTaskSlot | {
"repo_name": "fhueske/flink",
"path": "flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/SlotSharingManager.java",
"license": "apache-2.0",
"size": 27175
} | [
"org.apache.flink.runtime.jobmaster.SlotRequestId",
"org.apache.flink.util.AbstractID",
"org.apache.flink.util.Preconditions"
] | import org.apache.flink.runtime.jobmaster.SlotRequestId; import org.apache.flink.util.AbstractID; import org.apache.flink.util.Preconditions; | import org.apache.flink.runtime.jobmaster.*; import org.apache.flink.util.*; | [
"org.apache.flink"
] | org.apache.flink; | 360,929 |
EAttribute getGJoint_Id(); | EAttribute getGJoint_Id(); | /**
* Returns the meta object for the attribute '{@link de.tesis.dynaware.grapheditor.model.GJoint#getId <em>Id</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Id</em>'.
* @see de.tesis.dynaware.grapheditor.model.GJoint#getId()
* @see #getGJoint()
... | Returns the meta object for the attribute '<code>de.tesis.dynaware.grapheditor.model.GJoint#getId Id</code>'. | getGJoint_Id | {
"repo_name": "eckig/graph-editor",
"path": "model/src/main/java/de/tesis/dynaware/grapheditor/model/GraphPackage.java",
"license": "epl-1.0",
"size": 33067
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,817,574 |
public void saveProperties(CmsParameterConfiguration properties, String file, boolean backup, Set<String> forceWrite) {
if (new File(m_configRfsPath + file).isFile()) {
String backupFile = file + CmsConfigurationManager.POSTFIX_ORI;
String tempFile = file + ".tmp";
m_er... | void function(CmsParameterConfiguration properties, String file, boolean backup, Set<String> forceWrite) { if (new File(m_configRfsPath + file).isFile()) { String backupFile = file + CmsConfigurationManager.POSTFIX_ORI; String tempFile = file + ".tmp"; m_errors.clear(); if (backup) { copyFile(file, FOLDER_BACKUP + back... | /**
* Saves properties to specified file.<p>
*
* @param properties the properties to be saved
* @param file the file to save the properties to
* @param backup if true, create a backupfile
* @param forceWrite the keys for the properties which should always be written, even if they don... | Saves properties to specified file | saveProperties | {
"repo_name": "sbonoc/opencms-core",
"path": "src-setup/org/opencms/setup/CmsSetupBean.java",
"license": "lgpl-2.1",
"size": 115614
} | [
"java.io.File",
"java.util.Set",
"org.opencms.configuration.CmsConfigurationManager",
"org.opencms.configuration.CmsParameterConfiguration"
] | import java.io.File; import java.util.Set; import org.opencms.configuration.CmsConfigurationManager; import org.opencms.configuration.CmsParameterConfiguration; | import java.io.*; import java.util.*; import org.opencms.configuration.*; | [
"java.io",
"java.util",
"org.opencms.configuration"
] | java.io; java.util; org.opencms.configuration; | 654,498 |
public String submitCommitteeDecision(ProtocolForm protocolForm) throws Exception; | String function(ProtocolForm protocolForm) throws Exception; | /**
* This method is triggered when committee decision is made
* @param protocolForm
* @return
* @throws Exception
*/ | This method is triggered when committee decision is made | submitCommitteeDecision | {
"repo_name": "vivantech/kc_fixes",
"path": "src/main/java/org/kuali/kra/irb/actions/IrbProtocolActionRequestService.java",
"license": "apache-2.0",
"size": 17752
} | [
"org.kuali.kra.irb.ProtocolForm"
] | import org.kuali.kra.irb.ProtocolForm; | import org.kuali.kra.irb.*; | [
"org.kuali.kra"
] | org.kuali.kra; | 2,654,132 |
public Configuration getConfiguration() {
return configuration;
} | Configuration function() { return configuration; } | /**
* Returns the channel configuration
*
* @return channel configuration (not null)
*/ | Returns the channel configuration | getConfiguration | {
"repo_name": "smilzo-mobimesh/smarthome",
"path": "bundles/core/org.eclipse.smarthome.core.thing/src/main/java/org/eclipse/smarthome/core/thing/Channel.java",
"license": "epl-1.0",
"size": 4985
} | [
"org.eclipse.smarthome.config.core.Configuration"
] | import org.eclipse.smarthome.config.core.Configuration; | import org.eclipse.smarthome.config.core.*; | [
"org.eclipse.smarthome"
] | org.eclipse.smarthome; | 806,357 |
public static ActionBarBackground fadeOut(AppCompatActivity activity) {
ActionBarBackground abColor = new ActionBarBackground(activity);
abColor.fadeOut();
return abColor;
} | static ActionBarBackground function(AppCompatActivity activity) { ActionBarBackground abColor = new ActionBarBackground(activity); abColor.fadeOut(); return abColor; } | /**
* Fade the ActionBar background to zero opacity
*
* @param activity Activity where the ActionBar has to change
* @return Instance of this class
*/ | Fade the ActionBar background to zero opacity | fadeOut | {
"repo_name": "pacoalface/popcorn-android",
"path": "mobile/src/main/java/pct/droid/utils/ActionBarBackground.java",
"license": "gpl-3.0",
"size": 8865
} | [
"android.support.v7.app.AppCompatActivity"
] | import android.support.v7.app.AppCompatActivity; | import android.support.v7.app.*; | [
"android.support"
] | android.support; | 717,118 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.