method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public static File createTempFileWithBogusData(String prefix, String sufix, File dir, int nbytes) throws IOException {
File f = createTempFile(prefix, sufix, dir);
f.mkdirs();
fillFile( nbytes, f );
return f;
}
| static File function(String prefix, String sufix, File dir, int nbytes) throws IOException { File f = createTempFile(prefix, sufix, dir); f.mkdirs(); fillFile( nbytes, f ); return f; } | /**
* Creates a temp file with the format prefix???sufix in a specified dir
* with a specified amount of bogus data. (??? is a random long number.)
*
* @param prefix A prefix for the temp file.
* @param sufix A sufix for the temp file.
* @param dir The temp file directory
* @param nbytes The amount of bo... | Creates a temp file with the format prefix???sufix in a specified dir with a specified amount of bogus data. (??? is a random long number.) | createTempFileWithBogusData | {
"repo_name": "OurGrid/OurGrid",
"path": "src/main/java/org/ourgrid/common/util/TempFileManager.java",
"license": "lgpl-3.0",
"size": 4357
} | [
"java.io.File",
"java.io.IOException"
] | import java.io.File; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 12,059 |
void onException(ChannelHandlerContext ctx, Throwable cause); | void onException(ChannelHandlerContext ctx, Throwable cause); | /**
* Processes the given exception.
*/ | Processes the given exception | onException | {
"repo_name": "sunng87/netty",
"path": "codec-http2/src/main/java/io/netty/handler/codec/http2/Http2LifecycleManager.java",
"license": "apache-2.0",
"size": 2774
} | [
"io.netty.channel.ChannelHandlerContext"
] | import io.netty.channel.ChannelHandlerContext; | import io.netty.channel.*; | [
"io.netty.channel"
] | io.netty.channel; | 1,609,435 |
double[]{0.1, -0.05, 0.01, 0.05};
FunctionNtoS function = new FunctionNtoS() {
@Override public int getNumOfInputsN() {return 1;} | double[]{0.1, -0.05, 0.01, 0.05}; FunctionNtoS function = new FunctionNtoS() { @Override public int getNumOfInputsN() {return 1;} | /**
* Compare to numerical derivative. This is linear so it should be very accurate
*/ | Compare to numerical derivative. This is linear so it should be very accurate | polynomialDerivative | {
"repo_name": "lessthanoptimal/BoofCV",
"path": "main/boofcv-geo/src/test/java/boofcv/alg/distort/kanbra/TestKannalaBrandtUtils_F64.java",
"license": "apache-2.0",
"size": 2997
} | [
"org.ddogleg.optimization.functions.FunctionNtoS"
] | import org.ddogleg.optimization.functions.FunctionNtoS; | import org.ddogleg.optimization.functions.*; | [
"org.ddogleg.optimization"
] | org.ddogleg.optimization; | 2,798,145 |
@Test
public void largeRangeSmokeTest() {
final int log2m = 11;
final int m = (1 << log2m);
final int regwidth = 5;
// regwidth = 5, so hash space is
// log2m + (2^5 - 1 - 1), so L = log2m + 30
final int l = log2m + 30;
// all registers at large value
... | void function() { final int log2m = 11; final int m = (1 << log2m); final int regwidth = 5; final int l = log2m + 30; { final HLL hll = new HLL(log2m, regwidth, 128, m, HLLType.SPARSE); final int registerValue = 31; for(int i=0; i<m; i++) { hll.addRaw(ProbabilisticTestUtil.constructHLLValue(log2m, i, registerValue)); }... | /**
* Smoke test for {@link HLL#cardinality()} and the proper use of the large
* range correction.
*/ | Smoke test for <code>HLL#cardinality()</code> and the proper use of the large range correction | largeRangeSmokeTest | {
"repo_name": "stephenmcd/java-hll",
"path": "src/test/java/net/agkn/hll/SparseHLLTest.java",
"license": "apache-2.0",
"size": 20073
} | [
"net.agkn.hll.util.HLLUtil",
"org.testng.Assert"
] | import net.agkn.hll.util.HLLUtil; import org.testng.Assert; | import net.agkn.hll.util.*; import org.testng.*; | [
"net.agkn.hll",
"org.testng"
] | net.agkn.hll; org.testng; | 1,964,402 |
public static synchronized void init() throws IOException, MarshalException, ValidationException, ClassNotFoundException, SQLException, PropertyVetoException {
if (m_loaded) {
// init already called - return
// to reload, reload() will need to be called
return;
}... | static synchronized void function() throws IOException, MarshalException, ValidationException, ClassNotFoundException, SQLException, PropertyVetoException { if (m_loaded) { return; } DataSourceFactory.init(); File cfgFile = ConfigFileConstants.getFile(ConfigFileConstants.TRANSLATOR_CONFIG_FILE_NAME); m_singleton = new ... | /**
* Load the config from the default config file and create the singleton
* instance of this factory.
*
* @exception java.io.IOException
* Thrown if the specified config file cannot be read
* @exception org.exolab.castor.xml.MarshalException
* Thrown if... | Load the config from the default config file and create the singleton instance of this factory | init | {
"repo_name": "bugcy013/opennms-tmp-tools",
"path": "opennms-config/src/main/java/org/opennms/netmgt/config/EventTranslatorConfigFactory.java",
"license": "gpl-2.0",
"size": 28413
} | [
"java.beans.PropertyVetoException",
"java.io.File",
"java.io.IOException",
"java.sql.SQLException",
"org.exolab.castor.xml.MarshalException",
"org.exolab.castor.xml.ValidationException",
"org.opennms.core.db.DataSourceFactory",
"org.opennms.core.utils.ConfigFileConstants"
] | import java.beans.PropertyVetoException; import java.io.File; import java.io.IOException; import java.sql.SQLException; import org.exolab.castor.xml.MarshalException; import org.exolab.castor.xml.ValidationException; import org.opennms.core.db.DataSourceFactory; import org.opennms.core.utils.ConfigFileConstants; | import java.beans.*; import java.io.*; import java.sql.*; import org.exolab.castor.xml.*; import org.opennms.core.db.*; import org.opennms.core.utils.*; | [
"java.beans",
"java.io",
"java.sql",
"org.exolab.castor",
"org.opennms.core"
] | java.beans; java.io; java.sql; org.exolab.castor; org.opennms.core; | 2,289,234 |
public int quantityDropped(IBlockState state, int fortune, Random random)
{
return quantityDroppedWithBonus(fortune, random);
} | int function(IBlockState state, int fortune, Random random) { return quantityDroppedWithBonus(fortune, random); } | /**
* State and fortune sensitive version, this replaces the old (int meta, Random rand)
* version in 1.1.
*
* @param state Current state
* @param fortune Current item fortune level
* @param random Random number generator
* @return The number of items to drop
*/ | State and fortune sensitive version, this replaces the old (int meta, Random rand) version in 1.1 | quantityDropped | {
"repo_name": "aebert1/BigTransport",
"path": "build/tmp/recompileMc/sources/net/minecraft/block/Block.java",
"license": "gpl-3.0",
"size": 115325
} | [
"java.util.Random",
"net.minecraft.block.state.IBlockState"
] | import java.util.Random; import net.minecraft.block.state.IBlockState; | import java.util.*; import net.minecraft.block.state.*; | [
"java.util",
"net.minecraft.block"
] | java.util; net.minecraft.block; | 1,530,849 |
public static ResourceTransformationContext nextInChainResource(ResourceTransformationContext context, PlaceholderResolver placeholderResolver) {
assert context instanceof ResourceTransformationContextImpl : "Wrong type of context";
ResourceTransformationContextImpl ctx = (ResourceTransformationCont... | static ResourceTransformationContext function(ResourceTransformationContext context, PlaceholderResolver placeholderResolver) { assert context instanceof ResourceTransformationContextImpl : STR; ResourceTransformationContextImpl ctx = (ResourceTransformationContextImpl)context; ResourceTransformationContext copy = ctx.... | /**
* Call when transforming a new model version delta for a resource. This will copy the {@link ResourceTransformationContext} instance, using the extra resolver
* to resolve the children of the placeholder resource.
*
* @param context the context to copy. It should be at a chained placeholder
... | Call when transforming a new model version delta for a resource. This will copy the <code>ResourceTransformationContext</code> instance, using the extra resolver to resolve the children of the placeholder resource | nextInChainResource | {
"repo_name": "yersan/wildfly-core",
"path": "controller/src/main/java/org/jboss/as/controller/transform/ChainedTransformationTools.java",
"license": "lgpl-2.1",
"size": 4832
} | [
"org.jboss.as.controller.registry.OperationTransformerRegistry"
] | import org.jboss.as.controller.registry.OperationTransformerRegistry; | import org.jboss.as.controller.registry.*; | [
"org.jboss.as"
] | org.jboss.as; | 2,581,800 |
@WebMethod(operationName = "GetGeoIPContext")
@WebResult(name = "GeoIP", targetNamespace = "http://www.webservicex.net/", partName = "Body")
public GeoIP getGeoIPContext(); | @WebMethod(operationName = STR) @WebResult(name = "GeoIP", targetNamespace = "http: GeoIP function(); | /**
* GeoIPService - GetGeoIPContext enables you to easily look up countries by Context
*/ | GeoIPService - GetGeoIPContext enables you to easily look up countries by Context | getGeoIPContext | {
"repo_name": "sstazzzz/java_trainings",
"path": "soap-sample/src/main/java/net/webservicex/GeoIPServiceHttpPost.java",
"license": "apache-2.0",
"size": 1271
} | [
"javax.jws.WebMethod",
"javax.jws.WebResult"
] | import javax.jws.WebMethod; import javax.jws.WebResult; | import javax.jws.*; | [
"javax.jws"
] | javax.jws; | 1,952,312 |
PagedRequest<RepositoryResult> request = createSearchRequest(minStars);
return getAll(request);
} | PagedRequest<RepositoryResult> request = createSearchRequest(minStars); return getAll(request); } | /**
* Retrieve info on the Java repositories with a minimum number of stars.
*
* @param minStars minimum number of stars; null is equivalent to 0
* @return List of results
* @throws IOException if there is a problem connecting, or if the rate limit has been exceeded
*/ | Retrieve info on the Java repositories with a minimum number of stars | searchJavaRepositoriesByStars | {
"repo_name": "mikesaelim/nomenclature",
"path": "src/main/java/io/github/mikesaelim/nomenclature/SearchService.java",
"license": "mit",
"size": 2443
} | [
"org.eclipse.egit.github.core.client.PagedRequest"
] | import org.eclipse.egit.github.core.client.PagedRequest; | import org.eclipse.egit.github.core.client.*; | [
"org.eclipse.egit"
] | org.eclipse.egit; | 953,107 |
private AttributeHandler buildAttributeHandler(final Method method, String attributeName) {
final String loggerMethodName = "buildAttributeHandler";
final AttributeDetail attDetail = this.getAttDetail(method);
final String attName = attributeName;
// add the description of attribute when first handle it
i... | AttributeHandler function(final Method method, String attributeName) { final String loggerMethodName = STR; final AttributeDetail attDetail = this.getAttDetail(method); final String attName = attributeName; if (m_allAttList.containsKey(keyName)) { if (!m_allAttList.get(keyName).getAttDetailMap().containsKey(attName)) {... | /**
* build getter and setter handler for interface's attributes
*
* @param method
* @param attributeName
* @return
*/ | build getter and setter handler for interface's attributes | buildAttributeHandler | {
"repo_name": "yuwnloyblog/disconman",
"path": "src/main/java/com/yuwnloy/disconman/MBeanInvocationHandler.java",
"license": "apache-2.0",
"size": 22594
} | [
"com.yuwnloy.disconman.persistences.AttributeDetail",
"java.lang.reflect.Method",
"java.util.concurrent.ConcurrentHashMap"
] | import com.yuwnloy.disconman.persistences.AttributeDetail; import java.lang.reflect.Method; import java.util.concurrent.ConcurrentHashMap; | import com.yuwnloy.disconman.persistences.*; import java.lang.reflect.*; import java.util.concurrent.*; | [
"com.yuwnloy.disconman",
"java.lang",
"java.util"
] | com.yuwnloy.disconman; java.lang; java.util; | 1,922,771 |
@Test
public void testGetWFSRecords() throws Exception {
//make sure the data records are populated
testUpdateCSWRecords();
//in the response we loaded from the text file it contains 41 WFS records
Assert.assertEquals(41, this.cswService.getWFSRecords().length);
} | void function() throws Exception { testUpdateCSWRecords(); Assert.assertEquals(41, this.cswService.getWFSRecords().length); } | /**
* Test we return WFS records only
* @throws Exception
*/ | Test we return WFS records only | testGetWFSRecords | {
"repo_name": "AuScope/GeodesyWorkflow",
"path": "src/test/java/org/auscope/portal/server/web/service/TestCSWService.java",
"license": "gpl-3.0",
"size": 4426
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 218,174 |
public String encode(ByteBuffer aBuffer) {
byte [] buf = getBytes(aBuffer);
return encode(buf);
} | String function(ByteBuffer aBuffer) { byte [] buf = getBytes(aBuffer); return encode(buf); } | /**
* A 'streamless' version of encode that simply takes a ByteBuffer
* and returns a string containing the encoded buffer.
* <P>
* The ByteBuffer's position will be advanced to ByteBuffer's limit.
*/ | A 'streamless' version of encode that simply takes a ByteBuffer and returns a string containing the encoded buffer. The ByteBuffer's position will be advanced to ByteBuffer's limit | encode | {
"repo_name": "rokn/Count_Words_2015",
"path": "testing/openjdk2/jdk/src/share/classes/sun/misc/CharacterEncoder.java",
"license": "mit",
"size": 12126
} | [
"java.nio.ByteBuffer"
] | import java.nio.ByteBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 2,144,728 |
public void test_findActiveBuildConfigByName() {
BuildConfig conf = configManager.findActiveBuildConfigByName(TEST_BUILD_ID_1_NAME);
assertNotNull(conf);
conf = configManager.findActiveBuildConfigByName(TEST_BUILD_ID_1_NAME.toUpperCase());
assertNotNull(conf);
conf = configManager.findActiveBuildC... | void function() { BuildConfig conf = configManager.findActiveBuildConfigByName(TEST_BUILD_ID_1_NAME); assertNotNull(conf); conf = configManager.findActiveBuildConfigByName(TEST_BUILD_ID_1_NAME.toUpperCase()); assertNotNull(conf); conf = configManager.findActiveBuildConfigByName(TEST_BUILD_ID_1_NAME.toLowerCase()); asse... | /**
* Checks if search for build config by name is cases
* insensitive
*/ | Checks if search for build config by name is cases insensitive | test_findActiveBuildConfigByName | {
"repo_name": "simeshev/parabuild-ci",
"path": "test/src/org/parabuild/ci/build/SSTestConfigurationManager.java",
"license": "lgpl-3.0",
"size": 50709
} | [
"org.parabuild.ci.object.BuildConfig"
] | import org.parabuild.ci.object.BuildConfig; | import org.parabuild.ci.object.*; | [
"org.parabuild.ci"
] | org.parabuild.ci; | 440,346 |
@ManyToOne(optional = false, fetch = FetchType.LAZY)
@JoinColumn(name = "idCine")
public Cine getCine() {
return cine;
}
| @ManyToOne(optional = false, fetch = FetchType.LAZY) @JoinColumn(name = STR) Cine function() { return cine; } | /**
* Gets the cine.
*
* @return the cine
*/ | Gets the cine | getCine | {
"repo_name": "iago-suarez/pojo-cinema-app",
"path": "src/main/java/es/udc/pojo/model/sala/Sala.java",
"license": "gpl-2.0",
"size": 3061
} | [
"es.udc.pojo.model.cine.Cine",
"javax.persistence.FetchType",
"javax.persistence.JoinColumn",
"javax.persistence.ManyToOne"
] | import es.udc.pojo.model.cine.Cine; import javax.persistence.FetchType; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; | import es.udc.pojo.model.cine.*; import javax.persistence.*; | [
"es.udc.pojo",
"javax.persistence"
] | es.udc.pojo; javax.persistence; | 1,947,194 |
public boolean supports(Class<?> clazz) {
for (AccessDecisionVoter voter : this.decisionVoters) {
if (!voter.supports(clazz)) {
return false;
}
}
return true;
} | boolean function(Class<?> clazz) { for (AccessDecisionVoter voter : this.decisionVoters) { if (!voter.supports(clazz)) { return false; } } return true; } | /**
* Iterates through all <code>AccessDecisionVoter</code>s and ensures each can support the presented class.
* <p/>
* If one or more voters cannot support the presented class, <code>false</code> is returned.
* </p>
*
* @param clazz the type of secured object being presented
* @retur... | Iterates through all <code>AccessDecisionVoter</code>s and ensures each can support the presented class. If one or more voters cannot support the presented class, <code>false</code> is returned. | supports | {
"repo_name": "vitorgv/spring-security",
"path": "core/src/main/java/org/springframework/security/access/vote/AbstractAccessDecisionManager.java",
"license": "apache-2.0",
"size": 4465
} | [
"org.springframework.security.access.AccessDecisionVoter"
] | import org.springframework.security.access.AccessDecisionVoter; | import org.springframework.security.access.*; | [
"org.springframework.security"
] | org.springframework.security; | 1,229,843 |
PatternMatcher getMatcher(); | PatternMatcher getMatcher(); | /**
* Returns the matcher to use to know if an artifact match the current descriptor
*
* @return PatternMatcher
*/ | Returns the matcher to use to know if an artifact match the current descriptor | getMatcher | {
"repo_name": "apache/ant-ivy",
"path": "src/java/org/apache/ivy/core/module/descriptor/ExcludeRule.java",
"license": "apache-2.0",
"size": 1794
} | [
"org.apache.ivy.plugins.matcher.PatternMatcher"
] | import org.apache.ivy.plugins.matcher.PatternMatcher; | import org.apache.ivy.plugins.matcher.*; | [
"org.apache.ivy"
] | org.apache.ivy; | 2,512,958 |
void setMessage(@NotNull String message); | void setMessage(@NotNull String message); | /**
* Set error message
*
* @param message
* the message
*/ | Set error message | setMessage | {
"repo_name": "dhuebner/che",
"path": "plugins/plugin-machine/che-plugin-machine-ssh-client/src/main/java/org/eclipse/che/ide/ext/ssh/client/upload/UploadSshKeyView.java",
"license": "epl-1.0",
"size": 2799
} | [
"javax.validation.constraints.NotNull"
] | import javax.validation.constraints.NotNull; | import javax.validation.constraints.*; | [
"javax.validation"
] | javax.validation; | 1,780,146 |
void enterSub(@NotNull RParser.SubContext ctx);
void exitSub(@NotNull RParser.SubContext ctx); | void enterSub(@NotNull RParser.SubContext ctx); void exitSub(@NotNull RParser.SubContext ctx); | /**
* Exit a parse tree produced by {@link RParser#sub}.
* @param ctx the parse tree
*/ | Exit a parse tree produced by <code>RParser#sub</code> | exitSub | {
"repo_name": "IsThisThePayneResidence/intellidots",
"path": "src/main/java/ua/edu/hneu/ast/parsers/RListener.java",
"license": "gpl-3.0",
"size": 2513
} | [
"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; | 1,931,127 |
@Override
public void run() {
log.debug("ChunkCleanUpTask: Starting cleanup");
cleanup();
}
/**
* This method deletes chunks which are {@link #isEligibleForCleanUp(Resource)} | void function() { log.debug(STR); cleanup(); } /** * This method deletes chunks which are {@link #isEligibleForCleanUp(Resource)} | /**
* Executes the job. Is called for each triggered schedule point.
*/ | Executes the job. Is called for each triggered schedule point | run | {
"repo_name": "tmaret/sling",
"path": "bundles/servlets/post/src/main/java/org/apache/sling/servlets/post/impl/helper/ChunkCleanUpTask.java",
"license": "apache-2.0",
"size": 7633
} | [
"org.apache.sling.api.resource.Resource"
] | import org.apache.sling.api.resource.Resource; | import org.apache.sling.api.resource.*; | [
"org.apache.sling"
] | org.apache.sling; | 1,875,353 |
@Override
public SELF isNotCloseTo(Float expected, Percentage percentage) {
floats.assertIsNotCloseToPercentage(info, actual, expected, percentage);
return myself;
} | SELF function(Float expected, Percentage percentage) { floats.assertIsNotCloseToPercentage(info, actual, expected, percentage); return myself; } | /**
* Verifies that the actual number is not close to the given one within the given percentage.<br>
* If difference is equal to the percentage value, the assertion fails.
* <p>
* Example with float:
* <pre><code class='java'> // assertion will pass:
* assertThat(11.0f).isNotCloseTo(new Float(10.0f), ... | Verifies that the actual number is not close to the given one within the given percentage. If difference is equal to the percentage value, the assertion fails. Example with float: <code> // assertion will pass: assertThat(11.0f).isNotCloseTo(new Float(10.0f), withinPercentage(5f)); assertions will fail assertThat(11.0f... | isNotCloseTo | {
"repo_name": "ChrisCanCompute/assertj-core",
"path": "src/main/java/org/assertj/core/api/AbstractFloatAssert.java",
"license": "apache-2.0",
"size": 22452
} | [
"org.assertj.core.data.Percentage"
] | import org.assertj.core.data.Percentage; | import org.assertj.core.data.*; | [
"org.assertj.core"
] | org.assertj.core; | 1,713,994 |
@Test
public void failover_newTimestampRequested() throws Exception {
sleepUntilConnected(oserver);
int port2 = PortUtils.getRandomFreePort();
int port3 = PortUtils.getRandomFreePort();
TestOracle oserver2 = createExtraOracle(port2);
TestOracle oserver3 = createExtraOracle(port3);
oserve... | void function() throws Exception { sleepUntilConnected(oserver); int port2 = PortUtils.getRandomFreePort(); int port3 = PortUtils.getRandomFreePort(); TestOracle oserver2 = createExtraOracle(port2); TestOracle oserver3 = createExtraOracle(port3); oserver2.start(); sleepUntilConnected(oserver2); oserver3.start(); sleepU... | /**
* If multiple {@link org.apache.fluo.core.oracle.OracleServer} instances are competing leadership
* and fail, the {@link OracleClient} should failover to them as they go down and serve up new
* blocks of timestamps.
*/ | If multiple <code>org.apache.fluo.core.oracle.OracleServer</code> instances are competing leadership and fail, the <code>OracleClient</code> should failover to them as they go down and serve up new blocks of timestamps | failover_newTimestampRequested | {
"repo_name": "mikewalch/fluo",
"path": "modules/integration/src/test/java/org/apache/fluo/integration/impl/OracleIT.java",
"license": "apache-2.0",
"size": 9034
} | [
"org.apache.fluo.core.oracle.OracleClient",
"org.apache.fluo.core.util.PortUtils",
"org.junit.Assert"
] | import org.apache.fluo.core.oracle.OracleClient; import org.apache.fluo.core.util.PortUtils; import org.junit.Assert; | import org.apache.fluo.core.oracle.*; import org.apache.fluo.core.util.*; import org.junit.*; | [
"org.apache.fluo",
"org.junit"
] | org.apache.fluo; org.junit; | 2,848,172 |
public FeatureResultSet queryFeaturesForChunk(boolean distinct,
String[] columns, BoundingBox boundingBox, Projection projection,
Map<String, Object> fieldValues, int limit, long offset) {
return queryFeaturesForChunk(distinct, columns, boundingBox, projection,
fieldValues, getPkColumnName(), limit, offs... | FeatureResultSet function(boolean distinct, String[] columns, BoundingBox boundingBox, Projection projection, Map<String, Object> fieldValues, int limit, long offset) { return queryFeaturesForChunk(distinct, columns, boundingBox, projection, fieldValues, getPkColumnName(), limit, offset); } | /**
* Query for features within the bounding box in the provided projection
* ordered by id, starting at the offset and returning no more than the
* limit
*
* @param distinct
* distinct rows
* @param columns
* columns
* @param boundingBox
* bounding box
* @param p... | Query for features within the bounding box in the provided projection ordered by id, starting at the offset and returning no more than the limit | queryFeaturesForChunk | {
"repo_name": "ngageoint/geopackage-java",
"path": "src/main/java/mil/nga/geopackage/extension/rtree/RTreeIndexTableDao.java",
"license": "mit",
"size": 349361
} | [
"java.util.Map",
"mil.nga.geopackage.BoundingBox",
"mil.nga.geopackage.features.user.FeatureResultSet",
"mil.nga.proj.Projection"
] | import java.util.Map; import mil.nga.geopackage.BoundingBox; import mil.nga.geopackage.features.user.FeatureResultSet; import mil.nga.proj.Projection; | import java.util.*; import mil.nga.geopackage.*; import mil.nga.geopackage.features.user.*; import mil.nga.proj.*; | [
"java.util",
"mil.nga.geopackage",
"mil.nga.proj"
] | java.util; mil.nga.geopackage; mil.nga.proj; | 1,962,597 |
public static <T> Expiring<T> of(T... elements) {
return of(Arrays.asList(checkNotNull(elements)));
}
| static <T> Expiring<T> function(T... elements) { return of(Arrays.asList(checkNotNull(elements))); } | /**
* Returns a new Expiring instance
*
* @param targets
* @return
*/ | Returns a new Expiring instance | of | {
"repo_name": "jronrun/benayn",
"path": "benayn-ustyle/src/main/java/com/benayn/ustyle/Expiring.java",
"license": "apache-2.0",
"size": 10153
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 645,197 |
public static void assertWritable(Buffer[] buffers, int offs, int len) throws ReadOnlyBufferException {
for (int i = 0; i < len; i ++) {
if (buffers[i + offs].isReadOnly()) {
throw msg.readOnlyBuffer();
}
}
} | static void function(Buffer[] buffers, int offs, int len) throws ReadOnlyBufferException { for (int i = 0; i < len; i ++) { if (buffers[i + offs].isReadOnly()) { throw msg.readOnlyBuffer(); } } } | /**
* Assert the writability of the given buffers.
*
* @param buffers the buffers array
* @param offs the offset in the array to start searching
* @param len the number of buffers to check
* @throws ReadOnlyBufferException if any of the buffers are read-only
*/ | Assert the writability of the given buffers | assertWritable | {
"repo_name": "stuartwdouglas/xnio",
"path": "api/src/main/java/org/xnio/Buffers.java",
"license": "apache-2.0",
"size": 86113
} | [
"java.nio.Buffer",
"java.nio.ReadOnlyBufferException"
] | import java.nio.Buffer; import java.nio.ReadOnlyBufferException; | import java.nio.*; | [
"java.nio"
] | java.nio; | 864,606 |
public UploadToTablePreviewResult buildResult() throws IOException {
UploadToTablePreviewResult results = new UploadToTablePreviewResult();
// Process the header if present
processHeader();
// First gather data by scanning the rows
scanRows();
// fix the schema as needed
checkSchemaAfterScan();
... | UploadToTablePreviewResult function() throws IOException { UploadToTablePreviewResult results = new UploadToTablePreviewResult(); processHeader(); scanRows(); checkSchemaAfterScan(); applyHeadersToSchema(); makeColumnNamesUnique(); results.setSuggestedColumns(extractSuggestedColumns()); results.setRowsScanned(new Long(... | /**
* Build the preview.
*
* @return
* @throws IOException
*/ | Build the preview | buildResult | {
"repo_name": "xschildw/Synapse-Repository-Services",
"path": "services/workers/src/main/java/org/sagebionetworks/table/worker/UploadPreviewBuilder.java",
"license": "apache-2.0",
"size": 9962
} | [
"java.io.IOException",
"org.sagebionetworks.repo.model.table.UploadToTablePreviewResult"
] | import java.io.IOException; import org.sagebionetworks.repo.model.table.UploadToTablePreviewResult; | import java.io.*; import org.sagebionetworks.repo.model.table.*; | [
"java.io",
"org.sagebionetworks.repo"
] | java.io; org.sagebionetworks.repo; | 834,675 |
public void doAfterDelete(Serializable pk) throws DataAccException {
// Do nothing
} | void function(Serializable pk) throws DataAccException { } | /**
* This method is intended to be overriden in order to add specific behavior
* to be executed after delete an entity.
* @throws DataAccException
*/ | This method is intended to be overriden in order to add specific behavior to be executed after delete an entity | doAfterDelete | {
"repo_name": "autentia/TNTConcept",
"path": "tntconcept-core/src/main/java/com/autentia/tnt/dao/hibernate/HibernateManagerBase.java",
"license": "gpl-3.0",
"size": 18695
} | [
"com.autentia.tnt.dao.DataAccException",
"java.io.Serializable"
] | import com.autentia.tnt.dao.DataAccException; import java.io.Serializable; | import com.autentia.tnt.dao.*; import java.io.*; | [
"com.autentia.tnt",
"java.io"
] | com.autentia.tnt; java.io; | 1,677,403 |
static <K, V> MapValue.Mutable<K, V> mutableOf(Supplier<? extends Key<? extends MapValue<K, V>>> key, Map<K, V> element) {
return Value.mutableOf(key.get(), element);
} | static <K, V> MapValue.Mutable<K, V> mutableOf(Supplier<? extends Key<? extends MapValue<K, V>>> key, Map<K, V> element) { return Value.mutableOf(key.get(), element); } | /**
* Constructs a mutable {@link MapValue} of the appropriate type based
* on the given {@link Key} and the element.
*
* @param key The key
* @param element The element
* @param <K> The map key type
* @param <V> The map value type
* @return The constructed mutable value
*/ | Constructs a mutable <code>MapValue</code> of the appropriate type based on the given <code>Key</code> and the element | mutableOf | {
"repo_name": "SpongePowered/SpongeAPI",
"path": "src/main/java/org/spongepowered/api/data/value/Value.java",
"license": "mit",
"size": 19967
} | [
"java.util.Map",
"java.util.function.Supplier",
"org.spongepowered.api.data.Key"
] | import java.util.Map; import java.util.function.Supplier; import org.spongepowered.api.data.Key; | import java.util.*; import java.util.function.*; import org.spongepowered.api.data.*; | [
"java.util",
"org.spongepowered.api"
] | java.util; org.spongepowered.api; | 1,511,076 |
static public void checkQueryOutputsAfterSort(Iterator<Tuple> actualResultsIt,
List<Tuple> expectedResList) {
List<Tuple> actualResList = new ArrayList<Tuple>();
while(actualResultsIt.hasNext()){
actualResList.add(actualResultsIt.next());
... | static void function(Iterator<Tuple> actualResultsIt, List<Tuple> expectedResList) { List<Tuple> actualResList = new ArrayList<Tuple>(); while(actualResultsIt.hasNext()){ actualResList.add(actualResultsIt.next()); } checkQueryOutputsAfterSort(actualResList, expectedResList); } | /**
* Helper function to check if the result of a Pig Query is in line with
* expected results. It sorts actual and expected results before comparison
*
* @param actualResultsIt Result of the executed Pig query
* @param expectedResList Expected results to validate against
*/ | Helper function to check if the result of a Pig Query is in line with expected results. It sorts actual and expected results before comparison | checkQueryOutputsAfterSort | {
"repo_name": "Altiscale/pig",
"path": "test/org/apache/pig/test/Util.java",
"license": "apache-2.0",
"size": 51333
} | [
"java.util.ArrayList",
"java.util.Iterator",
"java.util.List",
"org.apache.pig.data.Tuple"
] | import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.apache.pig.data.Tuple; | import java.util.*; import org.apache.pig.data.*; | [
"java.util",
"org.apache.pig"
] | java.util; org.apache.pig; | 1,910,657 |
private void countDecommissionDatanodes() {
for (String dn : statusMap.keySet()) {
Map<String, String> nnStatus = statusMap.get(dn);
String status = nnStatus.get(OVERALL_STATUS);
if (status.equals(DecommissionStates.DECOMMISSIONED.toString())) {
decommissioned++;
} el... | void function() { for (String dn : statusMap.keySet()) { Map<String, String> nnStatus = statusMap.get(dn); String status = nnStatus.get(OVERALL_STATUS); if (status.equals(DecommissionStates.DECOMMISSIONED.toString())) { decommissioned++; } else if (status.equals(DecommissionStates.DECOMMISSION_INPROGRESS .toString())) ... | /**
* Count the total number of decommissioned/decommission_inprogress/
* partially decommissioned datanodes.
*/ | Count the total number of decommissioned/decommission_inprogress partially decommissioned datanodes | countDecommissionDatanodes | {
"repo_name": "yelshater/hadoop-2.3.0",
"path": "hadoop-hdfs-2.3.0-cdh5.1.0/src/main/java/org/apache/hadoop/hdfs/server/namenode/ClusterJspHelper.java",
"license": "apache-2.0",
"size": 33297
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,762,634 |
@Test
public void testCanMapFileSystemRoot() {
// create file system root
FilesystemRoot root = pluginFactory.createFilesystemRoot();
// configure root
String path = "/some-directory/another-directory";
root.setTargetPath(path);
// map values
mapper.mapVfsFilePropertiesTest(root, session, ... | void function() { FilesystemRoot root = pluginFactory.createFilesystemRoot(); String path = STR; root.setTargetPath(path); mapper.mapVfsFilePropertiesTest(root, session, context); assertEquals(path, context.get(TestVfsFilePropertiesCommand.PATH_KEY)); assertEquals(session, context.get(TestVfsFilePropertiesCommand.SESSI... | /**
* Test that file system root can be mapped.
*/ | Test that file system root can be mapped | testCanMapFileSystemRoot | {
"repo_name": "athrane/pineapple",
"path": "plugins/pineapple-filesystem-plugin/src/test/java/com/alpha/pineapple/plugin/filesystem/model/MapperTest.java",
"license": "gpl-3.0",
"size": 3743
} | [
"com.alpha.pineapple.plugin.filesystem.command.TestVfsFilePropertiesCommand",
"com.alpha.pineapple.plugin.filesystem.model.FilesystemRoot",
"org.junit.Assert"
] | import com.alpha.pineapple.plugin.filesystem.command.TestVfsFilePropertiesCommand; import com.alpha.pineapple.plugin.filesystem.model.FilesystemRoot; import org.junit.Assert; | import com.alpha.pineapple.plugin.filesystem.command.*; import com.alpha.pineapple.plugin.filesystem.model.*; import org.junit.*; | [
"com.alpha.pineapple",
"org.junit"
] | com.alpha.pineapple; org.junit; | 2,103,503 |
@Override
public void invalidateCache( Dn bindDn )
{
synchronized ( credentialCache )
{
credentialCache.remove( bindDn.getNormName() );
}
} | void function( Dn bindDn ) { synchronized ( credentialCache ) { credentialCache.remove( bindDn.getNormName() ); } } | /**
* Remove the principal form the cache. This is used when the user changes
* his password.
*/ | Remove the principal form the cache. This is used when the user changes his password | invalidateCache | {
"repo_name": "apache/directory-server",
"path": "interceptors/authn/src/main/java/org/apache/directory/server/core/authn/SimpleAuthenticator.java",
"license": "apache-2.0",
"size": 12963
} | [
"org.apache.directory.api.ldap.model.name.Dn"
] | import org.apache.directory.api.ldap.model.name.Dn; | import org.apache.directory.api.ldap.model.name.*; | [
"org.apache.directory"
] | org.apache.directory; | 777,344 |
@Test
public void contextReferencesNonExistingUser() {
KubeConfig kubeConfig = kubeConfig(//
clusterEntries( //
clusterEntry("cluster1", clusterCaCertPath("https://apiserver1", CA_CERT_PATH))),
userEntries( //
userEntry("use... | void function() { KubeConfig kubeConfig = kubeConfig( clusterEntry(STR, clusterCaCertPath(STRcluster1-contextSTRexpected to failSTRkubeconfig: context 'cluster1-context' references unknown user 'user-X'")); } } | /**
* A context must reference a user in the kubeconfig.
*/ | A context must reference a user in the kubeconfig | contextReferencesNonExistingUser | {
"repo_name": "elastisys/scale.cloudpool",
"path": "kubernetes/src/test/java/com/elastisys/scale/cloudpool/kubernetes/config/kubeconfig/TestKubeConfig.java",
"license": "apache-2.0",
"size": 16900
} | [
"com.elastisys.scale.cloudpool.kubernetes.config.kubeconfig.TestCluster",
"com.elastisys.scale.cloudpool.kubernetes.config.kubeconfig.TestClusterEntry"
] | import com.elastisys.scale.cloudpool.kubernetes.config.kubeconfig.TestCluster; import com.elastisys.scale.cloudpool.kubernetes.config.kubeconfig.TestClusterEntry; | import com.elastisys.scale.cloudpool.kubernetes.config.kubeconfig.*; | [
"com.elastisys.scale"
] | com.elastisys.scale; | 1,757,809 |
protected void removeDoneFiles(List<String> dataFileNames) {
for (String dataFileName : dataFileNames) {
String doneFileName = doneFileName(dataFileName);
File doneFile = new File(doneFileName);
if (doneFile.exists()) {
doneFile.delete();
... | void function(List<String> dataFileNames) { for (String dataFileName : dataFileNames) { String doneFileName = doneFileName(dataFileName); File doneFile = new File(doneFileName); if (doneFile.exists()) { doneFile.delete(); } } } | /**
* Clears out associated .done files for the processed data files.
*/ | Clears out associated .done files for the processed data files | removeDoneFiles | {
"repo_name": "ua-eas/ua-kfs-5.3",
"path": "work/src/org/kuali/kfs/module/ar/batch/service/impl/CustomerInvoiceWriteoffBatchServiceImpl.java",
"license": "agpl-3.0",
"size": 24270
} | [
"java.io.File",
"java.util.List"
] | import java.io.File; import java.util.List; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,037,258 |
protected RemoteCacheRequest<Serializable, Serializable> readRequest( final HttpServletRequest request )
{
RemoteCacheRequest<Serializable, Serializable> remoteRequest = null;
try (InputStream inputStream = request.getInputStream())
{
log.debug( "After getting input stream a... | RemoteCacheRequest<Serializable, Serializable> function( final HttpServletRequest request ) { RemoteCacheRequest<Serializable, Serializable> remoteRequest = null; try (InputStream inputStream = request.getInputStream()) { log.debug( STR ); remoteRequest = readRequestFromStream( inputStream ); } catch ( final IOExceptio... | /**
* Read the request from the input stream.
* <p>
* @param request
* @return RemoteHttpCacheRequest
*/ | Read the request from the input stream. | readRequest | {
"repo_name": "apache/commons-jcs",
"path": "commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/remote/http/server/RemoteHttpCacheServlet.java",
"license": "apache-2.0",
"size": 12944
} | [
"java.io.IOException",
"java.io.InputStream",
"java.io.Serializable",
"javax.servlet.http.HttpServletRequest",
"org.apache.commons.jcs3.auxiliary.remote.value.RemoteCacheRequest"
] | import java.io.IOException; import java.io.InputStream; import java.io.Serializable; import javax.servlet.http.HttpServletRequest; import org.apache.commons.jcs3.auxiliary.remote.value.RemoteCacheRequest; | import java.io.*; import javax.servlet.http.*; import org.apache.commons.jcs3.auxiliary.remote.value.*; | [
"java.io",
"javax.servlet",
"org.apache.commons"
] | java.io; javax.servlet; org.apache.commons; | 312,219 |
private int isSuitableFilter(
LoptMultiJoin multiJoin,
RexNode joinFilter,
int factIdx) {
// ignore non-equality filters where the operands are not
// RexInputRefs
switch (joinFilter.getKind()) {
case EQUALS:
break;
default:
return -1;
}
List<RexNode> operands... | int function( LoptMultiJoin multiJoin, RexNode joinFilter, int factIdx) { switch (joinFilter.getKind()) { case EQUALS: break; default: return -1; } List<RexNode> operands = ((RexCall) joinFilter).getOperands(); if (!(operands.get(0) instanceof RexInputRef) !(operands.get(1) instanceof RexInputRef)) { return -1; } Immut... | /**
* Determines if a join filter can be used with a semijoin against a
* specified fact table. A suitable filter is of the form "factable.col1 =
* dimTable.col2".
*
* @param multiJoin join factors being optimized
* @param joinFilter filter to be analyzed
* @param factIdx index corresponding to the... | Determines if a join filter can be used with a semijoin against a specified fact table. A suitable filter is of the form "factable.col1 = dimTable.col2" | isSuitableFilter | {
"repo_name": "sreev/incubator-calcite",
"path": "core/src/main/java/org/apache/calcite/rel/rules/LoptSemiJoinOptimizer.java",
"license": "apache-2.0",
"size": 29760
} | [
"java.util.List",
"org.apache.calcite.rex.RexCall",
"org.apache.calcite.rex.RexInputRef",
"org.apache.calcite.rex.RexNode",
"org.apache.calcite.util.ImmutableBitSet"
] | import java.util.List; import org.apache.calcite.rex.RexCall; import org.apache.calcite.rex.RexInputRef; import org.apache.calcite.rex.RexNode; import org.apache.calcite.util.ImmutableBitSet; | import java.util.*; import org.apache.calcite.rex.*; import org.apache.calcite.util.*; | [
"java.util",
"org.apache.calcite"
] | java.util; org.apache.calcite; | 2,767,236 |
public static Map.Entry<String, String> cutDirectoryInformation(final java.net.URL path) {
Map.Entry<String, String> ret = null;
String pre;
String suf;
String parse;
final StringBuffer tmp = new StringBuffer();
parse = path.toExternalForm();
if (parse.endsWith("/")) {
pre = parse;
... | static Map.Entry<String, String> function(final java.net.URL path) { Map.Entry<String, String> ret = null; String pre; String suf; String parse; final StringBuffer tmp = new StringBuffer(); parse = path.toExternalForm(); if (parse.endsWith("/")) { pre = parse; suf = STR/STR:STRSTR/"); } suf = pre; pre = tmp.toString();... | /**
* Cuts all path information of the String representation of the given URL.
* <p>
*
* <pre>
*
* "file//c:/work/programming/anyfile.jar" --> "anyfile.jar"
* "http://jamwg.de" --> "" // No file part.
* "ftp://files.co... | Cuts all path information of the String representation of the given URL. <code> "file//c:/work/programming/anyfile.jar" --> "anyfile.jar" "HREF --> "" // No file part. "ftp://files.com/directory2/" --> "" // File part of URL denotes a directory. </code> As... | cutDirectoryInformation | {
"repo_name": "blademainer/common_utils",
"path": "commons-file/src/main/java/info/monitorenter/util/FileUtil.java",
"license": "apache-2.0",
"size": 19837
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 271,253 |
void onFinish(T state, SessionImplementor session); | void onFinish(T state, SessionImplementor session); | /**
* Invoked by {@link EventContextManager} if an event cycle is finished.
*/ | Invoked by <code>EventContextManager</code> if an event cycle is finished | onFinish | {
"repo_name": "uugaa/hibernate-ogm",
"path": "core/src/main/java/org/hibernate/ogm/dialect/eventstate/impl/EventStateLifecycle.java",
"license": "lgpl-2.1",
"size": 1028
} | [
"org.hibernate.engine.spi.SessionImplementor"
] | import org.hibernate.engine.spi.SessionImplementor; | import org.hibernate.engine.spi.*; | [
"org.hibernate.engine"
] | org.hibernate.engine; | 335,436 |
public Period getPositiveDuration() throws ServiceException {
try {
Call<ResponseBody> call = service.getPositiveDuration();
ServiceResponse<Period> response = getPositiveDurationDelegate(call.execute(), null);
return response.getBody();
} catch (ServiceException ... | Period function() throws ServiceException { try { Call<ResponseBody> call = service.getPositiveDuration(); ServiceResponse<Period> response = getPositiveDurationDelegate(call.execute(), null); return response.getBody(); } catch (ServiceException ex) { throw ex; } catch (Exception ex) { throw new ServiceException(ex); }... | /**
* Get a positive duration value
*
* @return the Period object if successful.
* @throws ServiceException the exception wrapped in ServiceException if failed.
*/ | Get a positive duration value | getPositiveDuration | {
"repo_name": "BretJohnson/autorest",
"path": "AutoRest/Generators/Java/Java.Tests/src/main/java/fixtures/bodyduration/DurationImpl.java",
"license": "mit",
"size": 8830
} | [
"com.microsoft.rest.ServiceException",
"com.microsoft.rest.ServiceResponse",
"com.squareup.okhttp.ResponseBody",
"org.joda.time.Period"
] | import com.microsoft.rest.ServiceException; import com.microsoft.rest.ServiceResponse; import com.squareup.okhttp.ResponseBody; import org.joda.time.Period; | import com.microsoft.rest.*; import com.squareup.okhttp.*; import org.joda.time.*; | [
"com.microsoft.rest",
"com.squareup.okhttp",
"org.joda.time"
] | com.microsoft.rest; com.squareup.okhttp; org.joda.time; | 409,490 |
public static Date addMonths(Date date, int iMonths) {
Calendar dateTime = dateToCalendar(date);
dateTime.add(Calendar.MONTH, iMonths);
return dateTime.getTime();
} | static Date function(Date date, int iMonths) { Calendar dateTime = dateToCalendar(date); dateTime.add(Calendar.MONTH, iMonths); return dateTime.getTime(); } | /**
* Adds the specified (signed) amount of months to the given date. For
* example, to subtract 5 months from the current date, you can
* achieve it by calling: <code>addMonths(Date, -5)</code>.
*
* @param date The time.
* @param iMonths The amount of months to add.
*
* @return A new date wi... | Adds the specified (signed) amount of months to the given date. For example, to subtract 5 months from the current date, you can achieve it by calling: <code>addMonths(Date, -5)</code> | addMonths | {
"repo_name": "tcmoore32/sheer-madness",
"path": "gosu-core-api/src/main/java/gw/date/GosuDateUtil.java",
"license": "apache-2.0",
"size": 7501
} | [
"java.util.Calendar",
"java.util.Date"
] | import java.util.Calendar; import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 1,768,414 |
public ResultMatcher isResetContent() {
return matcher(HttpStatus.RESET_CONTENT);
} | ResultMatcher function() { return matcher(HttpStatus.RESET_CONTENT); } | /**
* Assert the response status code is {@code HttpStatus.RESET_CONTENT} (205).
*/ | Assert the response status code is HttpStatus.RESET_CONTENT (205) | isResetContent | {
"repo_name": "spring-projects/spring-framework",
"path": "spring-test/src/main/java/org/springframework/test/web/servlet/result/StatusResultMatchers.java",
"license": "apache-2.0",
"size": 17758
} | [
"org.springframework.http.HttpStatus",
"org.springframework.test.web.servlet.ResultMatcher"
] | import org.springframework.http.HttpStatus; import org.springframework.test.web.servlet.ResultMatcher; | import org.springframework.http.*; import org.springframework.test.web.servlet.*; | [
"org.springframework.http",
"org.springframework.test"
] | org.springframework.http; org.springframework.test; | 1,832,986 |
private void awaitCallApi(String apiName,
Map<String, String> params,
List<Map<String, Object>> bodies,
CheckedFunction<ClientYamlTestResponse, Boolean, IOException> success,
Supplier<String> erro... | void function(String apiName, Map<String, String> params, List<Map<String, Object>> bodies, CheckedFunction<ClientYamlTestResponse, Boolean, IOException> success, Supplier<String> error) { try { final AtomicReference<ClientYamlTestResponse> response = new AtomicReference<>(); assertBusy(() -> { response.set(callApi(api... | /**
* Executes an API call using the admin context, waiting for it to succeed.
*/ | Executes an API call using the admin context, waiting for it to succeed | awaitCallApi | {
"repo_name": "gingerwizard/elasticsearch",
"path": "x-pack/plugin/src/test/java/org/elasticsearch/xpack/test/rest/XPackRestIT.java",
"license": "apache-2.0",
"size": 12737
} | [
"java.io.IOException",
"java.util.List",
"java.util.Map",
"java.util.concurrent.atomic.AtomicReference",
"java.util.function.Supplier",
"org.apache.http.HttpStatus",
"org.elasticsearch.common.CheckedFunction",
"org.elasticsearch.test.rest.yaml.ClientYamlTestResponse"
] | import java.io.IOException; import java.util.List; import java.util.Map; import java.util.concurrent.atomic.AtomicReference; import java.util.function.Supplier; import org.apache.http.HttpStatus; import org.elasticsearch.common.CheckedFunction; import org.elasticsearch.test.rest.yaml.ClientYamlTestResponse; | import java.io.*; import java.util.*; import java.util.concurrent.atomic.*; import java.util.function.*; import org.apache.http.*; import org.elasticsearch.common.*; import org.elasticsearch.test.rest.yaml.*; | [
"java.io",
"java.util",
"org.apache.http",
"org.elasticsearch.common",
"org.elasticsearch.test"
] | java.io; java.util; org.apache.http; org.elasticsearch.common; org.elasticsearch.test; | 2,261,952 |
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
switch (notification.getFeatureID(Port.class)) {
case ForsydePackage.PORT__NAME:
case ForsydePackage.PORT__MOC:
case ForsydePackage.PORT__DATA_TYPE:
fireNotifyChanged(new ViewerNotification(notification,... | void function(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(Port.class)) { case ForsydePackage.PORT__NAME: case ForsydePackage.PORT__MOC: case ForsydePackage.PORT__DATA_TYPE: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true)); ... | /**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This handles model notifications by calling <code>#updateChildren</code> to update any cached children and by creating a viewer notification, which it passes to <code>#fireNotifyChanged</code>. | notifyChanged | {
"repo_name": "forsyde/ForSyDe-Eclipse",
"path": "plugins/se.kth.ict.forsyde.edit/src-gen/forsyde/provider/PortItemProvider.java",
"license": "bsd-3-clause",
"size": 6333
} | [
"org.eclipse.emf.common.notify.Notification",
"org.eclipse.emf.edit.provider.ViewerNotification"
] | import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.edit.provider.ViewerNotification; | import org.eclipse.emf.common.notify.*; import org.eclipse.emf.edit.provider.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 91,342 |
private boolean isEnabled() {
try {
Configuration configuration = configurationAdmin.getConfiguration(Configurations.NODE, null);
Dictionary<String, Object> properties = configuration.getProperties();
if (properties != null) {
String value = properties.get... | boolean function() { try { Configuration configuration = configurationAdmin.getConfiguration(Configurations.NODE, null); Dictionary<String, Object> properties = configuration.getProperties(); if (properties != null) { String value = properties.get(Constants.CATEGORY + Configurations.SEPARATOR + Configurations.LISTENER)... | /**
* Check if the local node feature listener is enabled in the etc/org.apache.karaf.cellar.groups.cfg.
*
* @return true if enabled, false else.
*/ | Check if the local node feature listener is enabled in the etc/org.apache.karaf.cellar.groups.cfg | isEnabled | {
"repo_name": "mcculls/karaf-cellar",
"path": "features/src/main/java/org/apache/karaf/cellar/features/LocalFeaturesListener.java",
"license": "apache-2.0",
"size": 10043
} | [
"java.util.Dictionary",
"org.apache.karaf.cellar.core.Configurations",
"org.osgi.service.cm.Configuration"
] | import java.util.Dictionary; import org.apache.karaf.cellar.core.Configurations; import org.osgi.service.cm.Configuration; | import java.util.*; import org.apache.karaf.cellar.core.*; import org.osgi.service.cm.*; | [
"java.util",
"org.apache.karaf",
"org.osgi.service"
] | java.util; org.apache.karaf; org.osgi.service; | 2,126,321 |
public void testPreferencesChange() throws Exception {
// Register two listeners
PreferencesUtils.setBoolean(context, R.string.report_speed_key, true);
PreferencesUtils.setString(
context, R.string.stats_units_key, PreferencesUtils.STATS_UNITS_DEFAULT);
PreferencesUtils.setInt(context, R.stri... | void function() throws Exception { PreferencesUtils.setBoolean(context, R.string.report_speed_key, true); PreferencesUtils.setString( context, R.string.stats_units_key, PreferencesUtils.STATS_UNITS_DEFAULT); PreferencesUtils.setInt(context, R.string.recording_gps_accuracy_key, PreferencesUtils.RECORDING_GPS_ACCURACY_DE... | /**
* Tests preferences change.
*/ | Tests preferences change | testPreferencesChange | {
"repo_name": "AdaDeb/septracks",
"path": "MyTracksTest/src/com/google/android/apps/mytracks/content/TrackDataHubTest.java",
"license": "gpl-2.0",
"size": 32014
} | [
"android.content.SharedPreferences",
"com.google.android.apps.mytracks.util.PreferencesUtils",
"com.google.android.testing.mocking.AndroidMock",
"java.util.EnumSet"
] | import android.content.SharedPreferences; import com.google.android.apps.mytracks.util.PreferencesUtils; import com.google.android.testing.mocking.AndroidMock; import java.util.EnumSet; | import android.content.*; import com.google.android.apps.mytracks.util.*; import com.google.android.testing.mocking.*; import java.util.*; | [
"android.content",
"com.google.android",
"java.util"
] | android.content; com.google.android; java.util; | 2,282,401 |
public void testRemovalNotSupported() throws Exception {
Iterable<PhoneNumberMatch> iterable = phoneUtil.findNumbers("+14156667777", RegionCode.ZZ);
Iterator<PhoneNumberMatch> iterator = iterable.iterator();
try {
iterator.remove();
fail("Iterator must not support remove.");
} catch (Unsu... | void function() throws Exception { Iterable<PhoneNumberMatch> iterable = phoneUtil.findNumbers(STR, RegionCode.ZZ); Iterator<PhoneNumberMatch> iterator = iterable.iterator(); try { iterator.remove(); fail(STR); } catch (UnsupportedOperationException e) { } assertTrue(iterator.hasNext()); try { iterator.remove(); fail(S... | /**
* Ensures that {@link Iterator#remove()} is not supported and that calling it does not
* change iteration behavior.
*/ | Ensures that <code>Iterator#remove()</code> is not supported and that calling it does not change iteration behavior | testRemovalNotSupported | {
"repo_name": "ThirdProject/android_external_libphonenumbergoogle",
"path": "java/libphonenumber/test/com/google/i18n/phonenumbers/PhoneNumberMatcherTest.java",
"license": "apache-2.0",
"size": 46819
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 1,504,367 |
@SuppressWarnings("unchecked")
public boolean updateDoc(Map<String, Object> jsonFields, String collName,
String docId) {
if (mCollections.containsKey(collName)) {
Map<String, Map<String,Object>> collection = mCollections.get(collName);
Map<String, Object> doc = collec... | @SuppressWarnings(STR) boolean function(Map<String, Object> jsonFields, String collName, String docId) { if (mCollections.containsKey(collName)) { Map<String, Map<String,Object>> collection = mCollections.get(collName); Map<String, Object> doc = collection.get(docId); if (doc != null) { Map<String, Object> fields = (Ma... | /**
* Handles updating a document in a collection.
* Override if you want to use your own collection data store.
* @param jsonFields fields for document
* @param collName collection name
* @param docId documement ID for update
* @return true if changed; false if document not found
*/ | Handles updating a document in a collection. Override if you want to use your own collection data store | updateDoc | {
"repo_name": "kenyee/android-ddp-client",
"path": "src/com/keysolutions/ddpclient/android/DDPStateSingleton.java",
"license": "apache-2.0",
"size": 33928
} | [
"com.keysolutions.ddpclient.DDPClient",
"java.util.List",
"java.util.Map"
] | import com.keysolutions.ddpclient.DDPClient; import java.util.List; import java.util.Map; | import com.keysolutions.ddpclient.*; import java.util.*; | [
"com.keysolutions.ddpclient",
"java.util"
] | com.keysolutions.ddpclient; java.util; | 2,820,542 |
public void request(com.alibaba.nacos.api.grpc.auto.Payload request,
io.grpc.stub.StreamObserver<com.alibaba.nacos.api.grpc.auto.Payload> responseObserver) {
asyncUnaryCall(
getChannel().newCall(getRequestMethod(), getCallOptions()), request, responseObserver);
}
}
public static ... | void function(com.alibaba.nacos.api.grpc.auto.Payload request, io.grpc.stub.StreamObserver<com.alibaba.nacos.api.grpc.auto.Payload> responseObserver) { asyncUnaryCall( getChannel().newCall(getRequestMethod(), getCallOptions()), request, responseObserver); } } public static final class RequestBlockingStub extends io.grp... | /**
* <pre>
* Sends a commonRequest
* </pre>
*/ | <code> Sends a commonRequest </code> | request | {
"repo_name": "alibaba/nacos",
"path": "api/src/main/java/com/alibaba/nacos/api/grpc/auto/RequestGrpc.java",
"license": "apache-2.0",
"size": 10935
} | [
"io.grpc.stub.ClientCalls",
"io.grpc.stub.ServerCalls"
] | import io.grpc.stub.ClientCalls; import io.grpc.stub.ServerCalls; | import io.grpc.stub.*; | [
"io.grpc.stub"
] | io.grpc.stub; | 1,082,434 |
public void focusGained(final FocusEvent e) {
if (e.getSource() instanceof JTextComponent) {
final JTextComponent tex = (JTextComponent) e.getSource();
tex.selectAll();
}
}
| void function(final FocusEvent e) { if (e.getSource() instanceof JTextComponent) { final JTextComponent tex = (JTextComponent) e.getSource(); tex.selectAll(); } } | /**
* Selects all the text when a field gains the focus.
*
* @param e the focus event.
*/ | Selects all the text when a field gains the focus | focusGained | {
"repo_name": "nologic/nabs",
"path": "client/trunk/shared/libraries/jcommon-1.0.10/source/org/jfree/ui/JTextObserver.java",
"license": "gpl-2.0",
"size": 3867
} | [
"java.awt.event.FocusEvent",
"javax.swing.text.JTextComponent"
] | import java.awt.event.FocusEvent; import javax.swing.text.JTextComponent; | import java.awt.event.*; import javax.swing.text.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 541,645 |
public static Resource[] listResources(Resource[] resources, ResourceFilter filter) {
int count = 0;
Resource[] children;
ArrayList<Resource[]> list = new ArrayList<Resource[]>();
for (int i = 0; i < resources.length; i++) {
children = filter == null ? resources[i].listResources() : resources[i].listResour... | static Resource[] function(Resource[] resources, ResourceFilter filter) { int count = 0; Resource[] children; ArrayList<Resource[]> list = new ArrayList<Resource[]>(); for (int i = 0; i < resources.length; i++) { children = filter == null ? resources[i].listResources() : resources[i].listResources(filter); if (children... | /**
* list children of all given resources
*
* @param resources
* @return
*/ | list children of all given resources | listResources | {
"repo_name": "jzuijlek/Lucee",
"path": "core/src/main/java/lucee/commons/io/res/util/ResourceUtil.java",
"license": "lgpl-2.1",
"size": 48568
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 1,871,464 |
public boolean containsDasu(String id) {
Objects.requireNonNull(id);
if (id.isEmpty()) {
throw new IllegalArgumentException("The ID of DASU can't be an empty string");
}
return dasusToDeploy.stream().filter(x -> x.getDasu().getId().equals(id)).count()>0;
}
| boolean function(String id) { Objects.requireNonNull(id); if (id.isEmpty()) { throw new IllegalArgumentException(STR); } return dasusToDeploy.stream().filter(x -> x.getDasu().getId().equals(id)).count()>0; } | /**
* Check if a DASU with the given key is already in the list
*
* @param id The ID of the DASU to check
* @return <code>true</code> if the the Supervisor contains the DASU with the give id,
* <code>false</code> otherwise
*/ | Check if a DASU with the given key is already in the list | containsDasu | {
"repo_name": "IntegratedAlarmSystem-Group/ias",
"path": "Cdb/src/main/java/org/eso/ias/cdb/pojos/SupervisorDao.java",
"license": "lgpl-3.0",
"size": 5668
} | [
"java.util.Objects"
] | import java.util.Objects; | import java.util.*; | [
"java.util"
] | java.util; | 2,573,045 |
public static List<TasksEntry> filterFindByGroupId(long groupId) {
return getPersistence().filterFindByGroupId(groupId);
} | static List<TasksEntry> function(long groupId) { return getPersistence().filterFindByGroupId(groupId); } | /**
* Returns all the tasks entries that the user has permission to view where groupId = ?.
*
* @param groupId the group ID
* @return the matching tasks entries that the user has permission to view
*/ | Returns all the tasks entries that the user has permission to view where groupId = ? | filterFindByGroupId | {
"repo_name": "gamerson/blade",
"path": "test-resources/projects/tasks-plugins-sdk/portlets/tasks-portlet/docroot/WEB-INF/service/com/liferay/tasks/service/persistence/TasksEntryUtil.java",
"license": "apache-2.0",
"size": 94635
} | [
"com.liferay.tasks.model.TasksEntry",
"java.util.List"
] | import com.liferay.tasks.model.TasksEntry; import java.util.List; | import com.liferay.tasks.model.*; import java.util.*; | [
"com.liferay.tasks",
"java.util"
] | com.liferay.tasks; java.util; | 75,537 |
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String networkInterfaceName); | @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) PollerFlux<PollResult<Void>, Void> beginDeleteAsync(String resourceGroupName, String networkInterfaceName); | /**
* Deletes the specified network interface.
*
* @param resourceGroupName The name of the resource group.
* @param networkInterfaceName The name of the network interface.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws com.azure.core.management.exce... | Deletes the specified network interface | beginDeleteAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/NetworkInterfacesClient.java",
"license": "mit",
"size": 71039
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.management.polling.PollResult",
"com.azure.core.util.polling.PollerFlux"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.management.polling.PollResult; import com.azure.core.util.polling.PollerFlux; | import com.azure.core.annotation.*; import com.azure.core.management.polling.*; import com.azure.core.util.polling.*; | [
"com.azure.core"
] | com.azure.core; | 1,861,947 |
public ComponentBuilder color(ChatColor color) {
getCurrent().setColor(color);
return this;
} | ComponentBuilder function(ChatColor color) { getCurrent().setColor(color); return this; } | /**
* Sets the color of the current part.
*
* @param color the new color
* @return this ComponentBuilder for chaining
*/ | Sets the color of the current part | color | {
"repo_name": "Relicum/Ipsum",
"path": "src/main/java/com/relicum/ipsum/Chat/ComponentBuilder.java",
"license": "gpl-3.0",
"size": 5418
} | [
"org.bukkit.ChatColor"
] | import org.bukkit.ChatColor; | import org.bukkit.*; | [
"org.bukkit"
] | org.bukkit; | 175,772 |
private void scheduleNext(Context context, Intent intent) {
int type = intent.getIntExtra(Pacemaker.KEY_TYPE, Pacemaker.TYPE_LINEAR);
if (type == Pacemaker.TYPE_EXPONENTIAL) {
int delay = intent.getIntExtra(Pacemaker.KEY_DELAY, 5);
delay = delay*2;
int max = inten... | void function(Context context, Intent intent) { int type = intent.getIntExtra(Pacemaker.KEY_TYPE, Pacemaker.TYPE_LINEAR); if (type == Pacemaker.TYPE_EXPONENTIAL) { int delay = intent.getIntExtra(Pacemaker.KEY_DELAY, 5); delay = delay*2; int max = intent.getIntExtra(Pacemaker.KEY_MAX, 60); if (delay > max){ Log.d(STR, S... | /**
* Schedules the next heartbeat when required
* @param context Context from the broadcast receiver onReceive
* @param intent Intent from the broadcast receiver onReceive
*/ | Schedules the next heartbeat when required | scheduleNext | {
"repo_name": "raveeshbhalla/Pacemaker",
"path": "pacemaker/src/main/java/in/raveesh/pacemaker/HeartbeatReceiver.java",
"license": "apache-2.0",
"size": 1728
} | [
"android.content.Context",
"android.content.Intent",
"android.util.Log"
] | import android.content.Context; import android.content.Intent; import android.util.Log; | import android.content.*; import android.util.*; | [
"android.content",
"android.util"
] | android.content; android.util; | 2,594,900 |
static public Allocation createCubemapFromBitmap(RenderScript rs, Bitmap b,
MipmapControl mips,
int usage) {
rs.validate();
int height = b.getHeight();
int width = b.getWidth();
... | static Allocation function(RenderScript rs, Bitmap b, MipmapControl mips, int usage) { rs.validate(); int height = b.getHeight(); int width = b.getWidth(); if (width % 6 != 0) { throw new RSIllegalArgumentException(STR); } if (width / 6 != height) { throw new RSIllegalArgumentException(STR); } boolean isPow2 = (height ... | /**
* Creates a cubemap allocation from a bitmap containing the
* horizontal list of cube faces. Each individual face must be
* the same size and power of 2
*
* @param rs Context to which the allocation will belong.
* @param b bitmap with cubemap faces layed out in the following
* ... | Creates a cubemap allocation from a bitmap containing the horizontal list of cube faces. Each individual face must be the same size and power of 2 | createCubemapFromBitmap | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "frameworks/base/graphics/java/android/renderscript/Allocation.java",
"license": "gpl-2.0",
"size": 52804
} | [
"android.graphics.Bitmap"
] | import android.graphics.Bitmap; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 1,143,234 |
private JTextField getValueToAdd() {
if (valueToAdd == null) {
valueToAdd = new JTextField();
}
return valueToAdd;
} | JTextField function() { if (valueToAdd == null) { valueToAdd = new JTextField(); } return valueToAdd; } | /**
* This method initializes valueToAdd
*
* @return javax.swing.JTextField
*/ | This method initializes valueToAdd | getValueToAdd | {
"repo_name": "NCIP/cagrid",
"path": "cagrid/Software/core/caGrid/projects/grape/src/org/cagrid/grape/GeneralConfigurationPropertyEditor.java",
"license": "bsd-3-clause",
"size": 14544
} | [
"javax.swing.JTextField"
] | import javax.swing.JTextField; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 848,542 |
default BlobEndpointProducerBuilder timeout(Duration timeout) {
doSetProperty("timeout", timeout);
return this;
} | default BlobEndpointProducerBuilder timeout(Duration timeout) { doSetProperty(STR, timeout); return this; } | /**
* An optional timeout value beyond which a RuntimeException will be
* raised.
*
* The option is a: <code>java.time.Duration</code> type.
*
* Group: common
*
* @param timeout the value to set
* @return the dsl builder
... | An optional timeout value beyond which a RuntimeException will be raised. The option is a: <code>java.time.Duration</code> type. Group: common | timeout | {
"repo_name": "pax95/camel",
"path": "core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/BlobEndpointBuilderFactory.java",
"license": "apache-2.0",
"size": 102068
} | [
"java.time.Duration"
] | import java.time.Duration; | import java.time.*; | [
"java.time"
] | java.time; | 2,706,053 |
public Element pairing(Point P, Point Q) {
Point f = pairing.Fq2.newOneElement();
Point u = pairing.Fq2.newElement();
JacobPoint V = new JacobPoint(P.getX(), P.getY(), P.getX().getField().newOneElement());
Point nP = (Point) P.duplicate().negate();
Element a = pairing.Fp.ne... | Element function(Point P, Point Q) { Point f = pairing.Fq2.newOneElement(); Point u = pairing.Fq2.newElement(); JacobPoint V = new JacobPoint(P.getX(), P.getY(), P.getX().getField().newOneElement()); Point nP = (Point) P.duplicate().negate(); Element a = pairing.Fp.newElement(); Element b = pairing.Fp.newElement(); Ele... | /**
* in1, in2 are from E(F_q), out from F_q^2
*/ | in1, in2 are from E(F_q), out from F_q^2 | pairing | {
"repo_name": "Bysmyyr/cpabe",
"path": "jpbc/jpbc-plaf/src/main/java/it/unisa/dia/gas/plaf/jpbc/pairing/a1/TypeA1TateNafProjectiveMillerPairingMap.java",
"license": "gpl-2.0",
"size": 9518
} | [
"it.unisa.dia.gas.jpbc.Element",
"it.unisa.dia.gas.jpbc.Point",
"it.unisa.dia.gas.plaf.jpbc.field.gt.GTFiniteElement",
"it.unisa.dia.gas.plaf.jpbc.field.gt.GTFiniteField"
] | import it.unisa.dia.gas.jpbc.Element; import it.unisa.dia.gas.jpbc.Point; import it.unisa.dia.gas.plaf.jpbc.field.gt.GTFiniteElement; import it.unisa.dia.gas.plaf.jpbc.field.gt.GTFiniteField; | import it.unisa.dia.gas.jpbc.*; import it.unisa.dia.gas.plaf.jpbc.field.gt.*; | [
"it.unisa.dia"
] | it.unisa.dia; | 1,303,633 |
private void extractMessageFrom(
Builder builder, Node valueNode, Node docNode)
throws MalformedException {
maybeInitMetaDataFromJsDoc(builder, docNode);
extractFromCallNode(builder, valueNode);
} | void function( Builder builder, Node valueNode, Node docNode) throws MalformedException { maybeInitMetaDataFromJsDoc(builder, docNode); extractFromCallNode(builder, valueNode); } | /**
* Creates a {@link JsMessage} for a JS message defined using an assignment to
* a qualified name (e.g <code>a.b.MSG_X = goog.getMsg(...);</code>).
*
* @param builder the message builder
* @param valueNode a node in a JS message value
* @param docNode the node containing the jsdoc.
* @throws Mal... | Creates a <code>JsMessage</code> for a JS message defined using an assignment to a qualified name (e.g <code>a.b.MSG_X = goog.getMsg(...);</code>) | extractMessageFrom | {
"repo_name": "maio/closure-compiler",
"path": "src/com/google/javascript/jscomp/JsMessageVisitor.java",
"license": "apache-2.0",
"size": 32750
} | [
"com.google.javascript.jscomp.JsMessage",
"com.google.javascript.rhino.Node"
] | import com.google.javascript.jscomp.JsMessage; import com.google.javascript.rhino.Node; | import com.google.javascript.jscomp.*; import com.google.javascript.rhino.*; | [
"com.google.javascript"
] | com.google.javascript; | 414,546 |
public static boolean isIntLiteral(final RexNode rexNode)
{
return rexNode instanceof RexLiteral && SqlTypeName.INT_TYPES.contains(rexNode.getType().getSqlTypeName());
} | static boolean function(final RexNode rexNode) { return rexNode instanceof RexLiteral && SqlTypeName.INT_TYPES.contains(rexNode.getType().getSqlTypeName()); } | /**
* Checks if a RexNode is a literal int or not. If this returns true, then {@code RexLiteral.intValue(literal)} can be
* used to get the value of the literal.
*
* @param rexNode the node
*
* @return true if this is an int
*/ | Checks if a RexNode is a literal int or not. If this returns true, then RexLiteral.intValue(literal) can be used to get the value of the literal | isIntLiteral | {
"repo_name": "deltaprojects/druid",
"path": "sql/src/main/java/org/apache/druid/sql/calcite/planner/Calcites.java",
"license": "apache-2.0",
"size": 14066
} | [
"org.apache.calcite.rex.RexLiteral",
"org.apache.calcite.rex.RexNode",
"org.apache.calcite.sql.type.SqlTypeName"
] | import org.apache.calcite.rex.RexLiteral; import org.apache.calcite.rex.RexNode; import org.apache.calcite.sql.type.SqlTypeName; | import org.apache.calcite.rex.*; import org.apache.calcite.sql.type.*; | [
"org.apache.calcite"
] | org.apache.calcite; | 813,165 |
EReference getRequireModelParameter_Model(); | EReference getRequireModelParameter_Model(); | /**
* Returns the meta object for the reference '{@link org.eclectic.frontend.core.RequireModelParameter#getModel <em>Model</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Model</em>'.
* @see org.eclectic.frontend.core.RequireModelParameter#getModel()... | Returns the meta object for the reference '<code>org.eclectic.frontend.core.RequireModelParameter#getModel Model</code>'. | getRequireModelParameter_Model | {
"repo_name": "jesusc/eclectic",
"path": "plugins/org.eclectic.frontend.asm/src-gen/org/eclectic/frontend/core/CorePackage.java",
"license": "gpl-3.0",
"size": 187193
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,635,875 |
public Region getReplaceRegion() {
return replaceRegion;
} | Region function() { return replaceRegion; } | /**
* The region in the document that will be replaced by a new completion proposal.
*/ | The region in the document that will be replaced by a new completion proposal | getReplaceRegion | {
"repo_name": "JKatzwinkel/bts",
"path": "org.eclipse.xtext.ui/src/org/eclipse/xtext/ui/editor/contentassist/ContentAssistContext.java",
"license": "lgpl-3.0",
"size": 9794
} | [
"org.eclipse.jface.text.Region"
] | import org.eclipse.jface.text.Region; | import org.eclipse.jface.text.*; | [
"org.eclipse.jface"
] | org.eclipse.jface; | 2,716,138 |
public Mono<ServiceBusTransactionContext> createTransaction() {
if (isDisposed.get()) {
return monoError(logger, new IllegalStateException(
String.format(INVALID_OPERATION_DISPOSED_SENDER, "createTransaction")));
}
return connectionProcessor
.flatMap(... | Mono<ServiceBusTransactionContext> function() { if (isDisposed.get()) { return monoError(logger, new IllegalStateException( String.format(INVALID_OPERATION_DISPOSED_SENDER, STR))); } return connectionProcessor .flatMap(connection -> connection.createSession(TRANSACTION_LINK_NAME)) .flatMap(transactionSession -> transac... | /**
* Starts a new transaction on Service Bus. The {@link ServiceBusTransactionContext} should be passed along with
* {@link ServiceBusReceivedMessage} all operations that needs to be in this transaction.
*
* @return A new {@link ServiceBusTransactionContext}.
*
* @throws IllegalStateExcep... | Starts a new transaction on Service Bus. The <code>ServiceBusTransactionContext</code> should be passed along with <code>ServiceBusReceivedMessage</code> all operations that needs to be in this transaction | createTransaction | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/servicebus/azure-messaging-servicebus/src/main/java/com/azure/messaging/servicebus/ServiceBusSenderAsyncClient.java",
"license": "mit",
"size": 44735
} | [
"com.azure.core.util.FluxUtil"
] | import com.azure.core.util.FluxUtil; | import com.azure.core.util.*; | [
"com.azure.core"
] | com.azure.core; | 2,721,647 |
public void addPropertyChangeListener(PropertyChangeListener l) {
AccessibleContext ac = getCurrentAccessibleContext();
if (ac != null) {
ac.addPropertyChangeListener(l);
} else {
super.addPropertyChangeListener(l);
... | void function(PropertyChangeListener l) { AccessibleContext ac = getCurrentAccessibleContext(); if (ac != null) { ac.addPropertyChangeListener(l); } else { super.addPropertyChangeListener(l); } } | /**
* Add a PropertyChangeListener to the listener list.
* The listener is registered for all properties.
*
* @param l The PropertyChangeListener to be added
*/ | Add a PropertyChangeListener to the listener list. The listener is registered for all properties | addPropertyChangeListener | {
"repo_name": "mirkosertic/Bytecoder",
"path": "classlib/java.desktop/src/main/resources/META-INF/modules/java.desktop/classes/javax/swing/JTree.java",
"license": "apache-2.0",
"size": 215008
} | [
"java.beans.PropertyChangeListener",
"javax.accessibility.AccessibleContext"
] | import java.beans.PropertyChangeListener; import javax.accessibility.AccessibleContext; | import java.beans.*; import javax.accessibility.*; | [
"java.beans",
"javax.accessibility"
] | java.beans; javax.accessibility; | 1,403,511 |
public boolean canMateWith(EntityAnimal otherAnimal)
{
if (otherAnimal == this)
{
return false;
}
else if (!this.isTamed())
{
return false;
}
else if (!(otherAnimal instanceof EntityRatel))
{
return false;
... | boolean function(EntityAnimal otherAnimal) { if (otherAnimal == this) { return false; } else if (!this.isTamed()) { return false; } else if (!(otherAnimal instanceof EntityRatel)) { return false; } else { EntityRatel entitywolf = (EntityRatel)otherAnimal; return !entitywolf.isTamed() ? false : (entitywolf.isSitting() ?... | /**
* Returns true if the mob is currently able to mate with the specified mob.
*/ | Returns true if the mob is currently able to mate with the specified mob | canMateWith | {
"repo_name": "lukamas2/SerengetiCraft",
"path": "src/main/java/com/africacraft/mob/EntityRatel.java",
"license": "lgpl-2.1",
"size": 21253
} | [
"net.minecraft.entity.passive.EntityAnimal"
] | import net.minecraft.entity.passive.EntityAnimal; | import net.minecraft.entity.passive.*; | [
"net.minecraft.entity"
] | net.minecraft.entity; | 1,236,289 |
public Object getValue() {
try {
if ( initialized == false ) {
initialized = true;
return computeInitialValue();
}
return computeRegularValue();
} catch ( final InvalidReportStateException e ) {
throw e;
}
} | Object function() { try { if ( initialized == false ) { initialized = true; return computeInitialValue(); } return computeRegularValue(); } catch ( final InvalidReportStateException e ) { throw e; } } | /**
* Return the computed value of the formula. The first call will return the initial-value instead.
*
* @return the value of the function.
*/ | Return the computed value of the formula. The first call will return the initial-value instead | getValue | {
"repo_name": "mbatchelor/pentaho-reporting",
"path": "engine/core/src/main/java/org/pentaho/reporting/engine/classic/core/function/FormulaFunction.java",
"license": "lgpl-2.1",
"size": 13337
} | [
"org.pentaho.reporting.engine.classic.core.InvalidReportStateException"
] | import org.pentaho.reporting.engine.classic.core.InvalidReportStateException; | import org.pentaho.reporting.engine.classic.core.*; | [
"org.pentaho.reporting"
] | org.pentaho.reporting; | 2,740,623 |
public static ChannelFuture bind(Channel channel, SocketAddress localAddress) {
if (localAddress == null) {
throw new NullPointerException("localAddress");
}
ChannelFuture future = future(channel);
channel.getPipeline().sendDownstream(new DownstreamChannelStateEvent(
... | static ChannelFuture function(Channel channel, SocketAddress localAddress) { if (localAddress == null) { throw new NullPointerException(STR); } ChannelFuture future = future(channel); channel.getPipeline().sendDownstream(new DownstreamChannelStateEvent( channel, future, ChannelState.BOUND, localAddress)); return future... | /**
* Sends a {@code "bind"} request to the last
* {@link ChannelDownstreamHandler} in the {@link ChannelPipeline} of
* the specified {@link Channel}.
*
* @param channel the channel to bind
* @param localAddress the local address to bind to
*
* @return the {@link ChannelFuture}... | Sends a "bind" request to the last <code>ChannelDownstreamHandler</code> in the <code>ChannelPipeline</code> of the specified <code>Channel</code> | bind | {
"repo_name": "codefollower/Open-Source-Research",
"path": "Douyu-0.7.1/douyu-netty/src/main/java/com/codefollower/douyu/netty/channel/Channels.java",
"license": "apache-2.0",
"size": 28973
} | [
"java.net.SocketAddress"
] | import java.net.SocketAddress; | import java.net.*; | [
"java.net"
] | java.net; | 1,971,724 |
@Test
public void testTransformDocRetrieveResp2AuditMsg() {
LogDocRetrieveResultRequestType logMessage = new LogDocRetrieveResultRequestType();
DocRetrieveResponseMessageType docRespMessage = new DocRetrieveResponseMessageType();
AssertionType assertion = new AssertionType();
Re... | void function() { LogDocRetrieveResultRequestType logMessage = new LogDocRetrieveResultRequestType(); DocRetrieveResponseMessageType docRespMessage = new DocRetrieveResponseMessageType(); AssertionType assertion = new AssertionType(); RetrieveDocumentSetResponseType message = new RetrieveDocumentSetResponseType(); Docu... | /**
* Test of transformDocRetrieveResp2AuditMsg method, of class DocumentRetrieveTransforms.
*/ | Test of transformDocRetrieveResp2AuditMsg method, of class DocumentRetrieveTransforms | testTransformDocRetrieveResp2AuditMsg | {
"repo_name": "beiyuxinke/CONNECT",
"path": "Product/Production/Common/CONNECTCoreLib/src/test/java/gov/hhs/fha/nhinc/transform/audit/DocumentRetrieveTransformsTest.java",
"license": "bsd-3-clause",
"size": 10197
} | [
"com.services.nhinc.schema.auditmessage.AuditMessageType",
"com.services.nhinc.schema.auditmessage.AuditSourceIdentificationType",
"com.services.nhinc.schema.auditmessage.EventIdentificationType",
"com.services.nhinc.schema.auditmessage.ParticipantObjectIdentificationType",
"gov.hhs.fha.nhinc.common.auditlo... | import com.services.nhinc.schema.auditmessage.AuditMessageType; import com.services.nhinc.schema.auditmessage.AuditSourceIdentificationType; import com.services.nhinc.schema.auditmessage.EventIdentificationType; import com.services.nhinc.schema.auditmessage.ParticipantObjectIdentificationType; import gov.hhs.fha.nhinc.... | import com.services.nhinc.schema.auditmessage.*; import gov.hhs.fha.nhinc.common.auditlog.*; import gov.hhs.fha.nhinc.common.nhinccommon.*; import org.junit.*; | [
"com.services.nhinc",
"gov.hhs.fha",
"org.junit"
] | com.services.nhinc; gov.hhs.fha; org.junit; | 2,873,243 |
protected List<HostResources> getClusterIdleHosts(ClusterVO cluster) {
List<HostResources> hosts = getClusterUpHosts(cluster);
List<HostResources> hostsIdle = new ArrayList<>();
for (HostResources currentHost : hosts) {
if (CollectionUtils.isEmpty(currentHost.getVmsResources())) ... | List<HostResources> function(ClusterVO cluster) { List<HostResources> hosts = getClusterUpHosts(cluster); List<HostResources> hostsIdle = new ArrayList<>(); for (HostResources currentHost : hosts) { if (CollectionUtils.isEmpty(currentHost.getVmsResources())) { hostsIdle.add(currentHost); } } return hostsIdle; } | /**
* Returns a list of hosts ({@link HostResources} {@link List}) that are
* idle (the host has no VM allocated).
*/ | Returns a list of hosts (<code>HostResources</code> <code>List</code>) that are idle (the host has no VM allocated) | getClusterIdleHosts | {
"repo_name": "Autonomiccs/autonomiccs-platform",
"path": "autonomic-administration-plugin/src/main/java/br/com/autonomiccs/autonomic/administration/plugin/AdministrationAgent.java",
"license": "apache-2.0",
"size": 19414
} | [
"br.com.autonomiccs.autonomic.algorithms.commons.beans.HostResources",
"com.cloud.dc.ClusterVO",
"java.util.ArrayList",
"java.util.List",
"org.apache.commons.collections.CollectionUtils"
] | import br.com.autonomiccs.autonomic.algorithms.commons.beans.HostResources; import com.cloud.dc.ClusterVO; import java.util.ArrayList; import java.util.List; import org.apache.commons.collections.CollectionUtils; | import br.com.autonomiccs.autonomic.algorithms.commons.beans.*; import com.cloud.dc.*; import java.util.*; import org.apache.commons.collections.*; | [
"br.com.autonomiccs",
"com.cloud.dc",
"java.util",
"org.apache.commons"
] | br.com.autonomiccs; com.cloud.dc; java.util; org.apache.commons; | 1,523,436 |
public void setPerUserTestOnBorrow(final String username, final Boolean value) {
assertInitializationAllowed();
if (perUserTestOnBorrow == null) {
perUserTestOnBorrow = new HashMap<>();
}
perUserTestOnBorrow.put(username, value);
} | void function(final String username, final Boolean value) { assertInitializationAllowed(); if (perUserTestOnBorrow == null) { perUserTestOnBorrow = new HashMap<>(); } perUserTestOnBorrow.put(username, value); } | /**
* Sets a user specific value for
* {@link GenericObjectPool#getTestOnBorrow()} for the specified
* user's pool.
* @param username The user
* @param value The value
*/ | Sets a user specific value for <code>GenericObjectPool#getTestOnBorrow()</code> for the specified user's pool | setPerUserTestOnBorrow | {
"repo_name": "Nickname0806/Test_Q4",
"path": "java/org/apache/tomcat/dbcp/dbcp2/datasources/PerUserPoolDataSource.java",
"license": "apache-2.0",
"size": 40987
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 2,808,270 |
public String getShowExplorerFileType() {
return getExplorerSetting(CmsUserSettings.FILELIST_TYPE);
} | String function() { return getExplorerSetting(CmsUserSettings.FILELIST_TYPE); } | /**
* Gets if the file type should be shown in explorer view.<p>
*
* @return <code>"true"</code> if the file type should be shown, otherwise <code>"false"</code>
*/ | Gets if the file type should be shown in explorer view | getShowExplorerFileType | {
"repo_name": "serrapos/opencms-core",
"path": "src/org/opencms/configuration/CmsDefaultUserSettings.java",
"license": "lgpl-2.1",
"size": 33724
} | [
"org.opencms.db.CmsUserSettings"
] | import org.opencms.db.CmsUserSettings; | import org.opencms.db.*; | [
"org.opencms.db"
] | org.opencms.db; | 2,383,295 |
public boolean isInodeIndexed(String inode, int secondsToWait);
public boolean UpdateContentWithSystemHost(String hostIdentifier)throws DotDataException;
public boolean removeUserReferences(String userId)throws DotDataException; | boolean isInodeIndexed(String inode, int secondsToWait); public boolean UpdateContentWithSystemHost(String hostIdentifier)throws DotDataException; public boolean function(String userId)throws DotDataException; | /**
* Method will remove User References of the given userId in Contentlet
* @param userId
*/ | Method will remove User References of the given userId in Contentlet | removeUserReferences | {
"repo_name": "jtesser/core-2.x",
"path": "src/com/dotmarketing/portlets/contentlet/business/ContentletAPIPreHook.java",
"license": "gpl-3.0",
"size": 46259
} | [
"com.dotmarketing.exception.DotDataException"
] | import com.dotmarketing.exception.DotDataException; | import com.dotmarketing.exception.*; | [
"com.dotmarketing.exception"
] | com.dotmarketing.exception; | 2,427,095 |
public boolean addNewTickPrice(String stock, Tick tick) {
Connection connection = dcf.getConnection();
Statement s;
try {
s = connection.createStatement ();
logger.debug("INSERT INTO tickprices VALUES((?), '" + stock + "','" + tick.getField()
+ "','" + tick.getPrice() +"')");
PreparedStatemen... | boolean function(String stock, Tick tick) { Connection connection = dcf.getConnection(); Statement s; try { s = connection.createStatement (); logger.debug(STR + stock + "','" + tick.getField() + "','" + tick.getPrice() +"')"); PreparedStatement ps = connection.prepareStatement(STR + stock + "','" + tick.getField() + "... | /**
* Add a new tick price to the database.
*
* @param stock - stock the tick belongs to
* @param tick - tick object
* @return
*/ | Add a new tick price to the database | addNewTickPrice | {
"repo_name": "sgrotz/myopentrader",
"path": "MyOpenTraderCommon/src/main/java/org/mot/common/db/TickPriceDAO.java",
"license": "gpl-3.0",
"size": 21588
} | [
"java.sql.Connection",
"java.sql.PreparedStatement",
"java.sql.SQLException",
"java.sql.Statement",
"org.mot.common.objects.Tick"
] | import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; import java.sql.Statement; import org.mot.common.objects.Tick; | import java.sql.*; import org.mot.common.objects.*; | [
"java.sql",
"org.mot.common"
] | java.sql; org.mot.common; | 2,659,827 |
public void processZipContent(String zipFilePath, InputStream zipIn, ViewHandlerConfig viewHandlerConfig, HttpServletRequest req, HttpServletResponse resp)
{
try
{
File tempFile = File.createTempFile("webfilesys", null);
String tempDir = tempFile.getParent()... | void function(String zipFilePath, InputStream zipIn, ViewHandlerConfig viewHandlerConfig, HttpServletRequest req, HttpServletResponse resp) { try { File tempFile = File.createTempFile(STR, null); String tempDir = tempFile.getParent(); String fileName = zipFilePath.replace('\\', '/'); if (fileName.indexOf('/') >= 0) { f... | /**
* Create the HTML response for viewing the given file contained in a ZIP archive..
*
* @param zipFilePath path of the ZIP entry
* @param zipIn the InputStream for the file extracted from a ZIP archive
* @param req the servlet request
* @param resp the servlet response
*/ | Create the HTML response for viewing the given file contained in a ZIP archive. | processZipContent | {
"repo_name": "LeoFCardoso/webfilesys",
"path": "src/main/java/de/webfilesys/viewhandler/JavaClassViewHandler.java",
"license": "gpl-3.0",
"size": 6219
} | [
"de.webfilesys.ViewHandlerConfig",
"de.webfilesys.WebFileSys",
"java.io.File",
"java.io.FileOutputStream",
"java.io.IOException",
"java.io.InputStream",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"org.apache.log4j.Logger"
] | import de.webfilesys.ViewHandlerConfig; import de.webfilesys.WebFileSys; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.log4j.Logger; | import de.webfilesys.*; import java.io.*; import javax.servlet.http.*; import org.apache.log4j.*; | [
"de.webfilesys",
"java.io",
"javax.servlet",
"org.apache.log4j"
] | de.webfilesys; java.io; javax.servlet; org.apache.log4j; | 403,138 |
@Test
public void testBadDirectory() {
String name = Long.toHexString(Double.doubleToLongBits(Math.random()));
String path = Paths.get(BaseTester.getBaseDirectory(), name).toString();
Driver.main(new String[] {"-d", path, "-i", "invertedindex-baddir.txt"});
} | void function() { String name = Long.toHexString(Double.doubleToLongBits(Math.random())); String path = Paths.get(BaseTester.getBaseDirectory(), name).toString(); Driver.main(new String[] {"-d", path, "-i", STR}); } | /**
* Tests if code runs without exceptions an in invalid directory is
* provided.
*/ | Tests if code runs without exceptions an in invalid directory is provided | testBadDirectory | {
"repo_name": "bjherger/search-engine-and-web-scraper",
"path": "tests/IndexTester.java",
"license": "mit",
"size": 5079
} | [
"java.nio.file.Paths"
] | import java.nio.file.Paths; | import java.nio.file.*; | [
"java.nio"
] | java.nio; | 926,612 |
public void setIndexProperties(Properties indexSettings) {
setIndexSettings(indexSettings);
} | void function(Properties indexSettings) { setIndexSettings(indexSettings); } | /**
* Sets the additional cloned compass index settings. The settings can
* override existing settings used to create the Compass instance. Can be
* used to define different connection string for example.
*/ | Sets the additional cloned compass index settings. The settings can override existing settings used to create the Compass instance. Can be used to define different connection string for example | setIndexProperties | {
"repo_name": "baboune/compass",
"path": "src/main/src/org/compass/gps/impl/SingleCompassGps.java",
"license": "apache-2.0",
"size": 9667
} | [
"java.util.Properties"
] | import java.util.Properties; | import java.util.*; | [
"java.util"
] | java.util; | 966,117 |
private Optional<String> createResourceEntityAndSubmitFlight(
Pool pool, TransactionStatus status) {
ResourceId resourceId = ResourceId.create(UUID.randomUUID());
bufferDao.createResource(
Resource.builder()
.id(resourceId)
.poolId(pool.id())
.creation(Instant... | Optional<String> function( Pool pool, TransactionStatus status) { ResourceId resourceId = ResourceId.create(UUID.randomUUID()); bufferDao.createResource( Resource.builder() .id(resourceId) .poolId(pool.id()) .creation(Instant.now()) .state(ResourceState.CREATING) .build()); return submitToStairway( flightSubmissionFact... | /**
* Create entity in resource table with CREATING and submit creation flight.
*
* <p>If the Stairway submission fails, the transaction will be rolled back. If the Stairway
* submission succeeds but the DB update transaction fails, the flight checks the DB state and
* aborts if the state is bad.
*/ | Create entity in resource table with CREATING and submit creation flight. If the Stairway submission fails, the transaction will be rolled back. If the Stairway submission succeeds but the DB update transaction fails, the flight checks the DB state and aborts if the state is bad | createResourceEntityAndSubmitFlight | {
"repo_name": "DataBiosphere/terra-resource-buffer",
"path": "src/main/java/bio/terra/buffer/service/resource/FlightManager.java",
"license": "bsd-3-clause",
"size": 4561
} | [
"bio.terra.buffer.common.Pool",
"bio.terra.buffer.common.Resource",
"bio.terra.buffer.common.ResourceId",
"bio.terra.buffer.common.ResourceState",
"java.time.Instant",
"java.util.Optional",
"java.util.UUID",
"org.springframework.transaction.TransactionStatus"
] | import bio.terra.buffer.common.Pool; import bio.terra.buffer.common.Resource; import bio.terra.buffer.common.ResourceId; import bio.terra.buffer.common.ResourceState; import java.time.Instant; import java.util.Optional; import java.util.UUID; import org.springframework.transaction.TransactionStatus; | import bio.terra.buffer.common.*; import java.time.*; import java.util.*; import org.springframework.transaction.*; | [
"bio.terra.buffer",
"java.time",
"java.util",
"org.springframework.transaction"
] | bio.terra.buffer; java.time; java.util; org.springframework.transaction; | 828,257 |
// <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
private void initComponents() {
detailModeButtonGroup = new ButtonGroup();
aliasesPanel = new JPanel();
typeLabel = new JLabel();
typeTextField = new JTextField();
nameLabel ... | void function() { detailModeButtonGroup = new ButtonGroup(); aliasesPanel = new JPanel(); typeLabel = new JLabel(); typeTextField = new JTextField(); nameLabel = new JLabel(); nameTextField = new JTextField(); aliasesSplitPane = new JSplitPane(); detailScrollPane = new JScrollPane(); detailTextPane = new JTextPane(); a... | /** This method is called from within the constructor to
* initialize the form.
* WARNING: Do NOT modify this code. The content of this method is
* always regenerated by the Form Editor.
*/ | This method is called from within the constructor to initialize the form. always regenerated by the Form Editor | initComponents | {
"repo_name": "bernhardhuber/netbeansplugins",
"path": "nb-keytool/src/org/huber/keytool/KeyStoreTopComponent.java",
"license": "apache-2.0",
"size": 17469
} | [
"java.awt.BorderLayout",
"javax.swing.ButtonGroup",
"javax.swing.JLabel",
"javax.swing.JPanel",
"javax.swing.JRadioButton",
"javax.swing.JScrollPane",
"javax.swing.JSplitPane",
"javax.swing.JTable",
"javax.swing.JTextField",
"javax.swing.JTextPane",
"org.huber.keytool.ui.KeyStoreEntryTableModel"... | import java.awt.BorderLayout; import javax.swing.ButtonGroup; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JRadioButton; import javax.swing.JScrollPane; import javax.swing.JSplitPane; import javax.swing.JTable; import javax.swing.JTextField; import javax.swing.JTextPane; import org.huber.key... | import java.awt.*; import javax.swing.*; import org.huber.keytool.ui.*; | [
"java.awt",
"javax.swing",
"org.huber.keytool"
] | java.awt; javax.swing; org.huber.keytool; | 2,236,579 |
void writeSmsToSim(int status, String smsc, String pdu, Message response); | void writeSmsToSim(int status, String smsc, String pdu, Message response); | /**
* Writes an SMS message to SIM memory (EF_SMS).
*
* @param status status of message on SIM. One of:
* SmsManger.STATUS_ON_ICC_READ
* SmsManger.STATUS_ON_ICC_UNREAD
* SmsManger.STATUS_ON_ICC_SENT
* SmsManger.STATU... | Writes an SMS message to SIM memory (EF_SMS) | writeSmsToSim | {
"repo_name": "indashnet/InDashNet.Open.UN2000",
"path": "android/frameworks/opt/telephony/src/java/com/android/internal/telephony/CommandsInterface.java",
"license": "apache-2.0",
"size": 60442
} | [
"android.os.Message"
] | import android.os.Message; | import android.os.*; | [
"android.os"
] | android.os; | 1,621,223 |
private long d2ts(int date, int millis) {
return date * DateTimeUtils.MILLIS_PER_DAY + millis;
} | long function(int date, int millis) { return date * DateTimeUtils.MILLIS_PER_DAY + millis; } | /** Converts a date (days since epoch) and milliseconds (since midnight)
* into a timestamp (milliseconds since epoch). */ | Converts a date (days since epoch) and milliseconds (since midnight) | d2ts | {
"repo_name": "xhoong/incubator-calcite",
"path": "core/src/test/java/org/apache/calcite/test/SqlFunctionsTest.java",
"license": "apache-2.0",
"size": 42470
} | [
"org.apache.calcite.avatica.util.DateTimeUtils"
] | import org.apache.calcite.avatica.util.DateTimeUtils; | import org.apache.calcite.avatica.util.*; | [
"org.apache.calcite"
] | org.apache.calcite; | 917,572 |
public void ignoreOverriddenEqualsForFieldsMatchingRegexes(String... regexes) {
ignoredOverriddenEqualsForFieldsMatchingRegexes.addAll(Stream.of(regexes)
.map(Pattern::compile)
.collec... | void function(String... regexes) { ignoredOverriddenEqualsForFieldsMatchingRegexes.addAll(Stream.of(regexes) .map(Pattern::compile) .collect(toList())); } | /**
* Adds the given regexes to the list of regexes used find the fields to force a recursive comparison on.
* <p>
* See {@link RecursiveComparisonAssert#ignoringOverriddenEqualsForFieldsMatchingRegexes(String...) RecursiveComparisonAssert#ignoringOverriddenEqualsForFieldsMatchingRegexes(String...)} for exampl... | Adds the given regexes to the list of regexes used find the fields to force a recursive comparison on. See <code>RecursiveComparisonAssert#ignoringOverriddenEqualsForFieldsMatchingRegexes(String...) RecursiveComparisonAssert#ignoringOverriddenEqualsForFieldsMatchingRegexes(String...)</code> for examples | ignoreOverriddenEqualsForFieldsMatchingRegexes | {
"repo_name": "joel-costigliola/assertj-core",
"path": "src/main/java/org/assertj/core/api/recursive/comparison/RecursiveComparisonConfiguration.java",
"license": "apache-2.0",
"size": 56001
} | [
"java.util.regex.Pattern",
"java.util.stream.Stream"
] | import java.util.regex.Pattern; import java.util.stream.Stream; | import java.util.regex.*; import java.util.stream.*; | [
"java.util"
] | java.util; | 315,922 |
private final String attributeMatches(XmlLite.Tag tag) {
String result = null;
final String string = attr.getString();
if (string != null) {
// efficiency shortcut
result = tag.getAttribute(string);
}
else { // use pattern
// walk through all attributes
... | final String function(XmlLite.Tag tag) { String result = null; final String string = attr.getString(); if (string != null) { result = tag.getAttribute(string); } else { for (Map.Entry<String, String> attrEntry : tag.getAttributeEntries()) { if (attr.matches(attrEntry.getKey())) { result = attrEntry.getValue(); break; }... | /**
* Find a matching attribute, returning its value.
*
* @return the matching attribute's value or null if nothing matches.
*/ | Find a matching attribute, returning its value | attributeMatches | {
"repo_name": "KoehlerSB747/sd-tools",
"path": "src/main/java/org/sd/xml/XmlDataMatcher.java",
"license": "apache-2.0",
"size": 9255
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,525,125 |
public SuiteRoleMembership forStudies(Object... studyObjects) {
return forStudies(Arrays.asList(studyObjects));
} | SuiteRoleMembership function(Object... studyObjects) { return forStudies(Arrays.asList(studyObjects)); } | /**
* Scope this membership to the specified application study objects.
* @return this (for chaining)
*/ | Scope this membership to the specified application study objects | forStudies | {
"repo_name": "NCIP/ctms-commons",
"path": "suite/authorization/src/main/java/gov/nih/nci/cabig/ctms/suite/authorization/SuiteRoleMembership.java",
"license": "bsd-3-clause",
"size": 28555
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 2,658,611 |
public static void getBoolean(String key){
Preferences.getInstance().getBoolean(key, false);
} | static void function(String key){ Preferences.getInstance().getBoolean(key, false); } | /**
* Receives the value from cRIO
* Default is false if no boolean value is found with the key
* @param key Value name
*/ | Receives the value from cRIO Default is false if no boolean value is found with the key | getBoolean | {
"repo_name": "TechnoTitans/TitanWare2013",
"path": "src/edu/wpi/first/wpilibj/templates/DriverStation.java",
"license": "bsd-3-clause",
"size": 5591
} | [
"edu.wpi.first.wpilibj.Preferences"
] | import edu.wpi.first.wpilibj.Preferences; | import edu.wpi.first.wpilibj.*; | [
"edu.wpi.first"
] | edu.wpi.first; | 2,669,218 |
private void consumePendingUpdateOperations() {
if (!mFirstLayoutComplete) {
// a layout request will happen, we should not do layout here.
return;
}
if (mDataSetHasChangedAfterLayout) {
TraceCompat.beginSection(TRACE_ON_DATA_SET_CHANGE_LAYOUT_TAG);
... | void function() { if (!mFirstLayoutComplete) { return; } if (mDataSetHasChangedAfterLayout) { TraceCompat.beginSection(TRACE_ON_DATA_SET_CHANGE_LAYOUT_TAG); dispatchLayout(); TraceCompat.endSection(); return; } if (!mAdapterHelper.hasPendingUpdates()) { return; } if (mAdapterHelper.hasAnyUpdateTypes(UpdateOp.UPDATE) &&... | /**
* Helper method reflect data changes to the state.
* <p>
* Adapter changes during a scroll may trigger a crash because scroll assumes no data change
* but data actually changed.
* <p>
* This method consumes all deferred changes to avoid that case.
*/ | Helper method reflect data changes to the state. Adapter changes during a scroll may trigger a crash because scroll assumes no data change but data actually changed. This method consumes all deferred changes to avoid that case | consumePendingUpdateOperations | {
"repo_name": "AylaGene/testRepo_Public",
"path": "TMessagesProj/src/main/java/org/telegram/messenger/support/widget/RecyclerView.java",
"license": "gpl-2.0",
"size": 480719
} | [
"android.support.v4.os.TraceCompat",
"org.telegram.messenger.support.widget.AdapterHelper"
] | import android.support.v4.os.TraceCompat; import org.telegram.messenger.support.widget.AdapterHelper; | import android.support.v4.os.*; import org.telegram.messenger.support.widget.*; | [
"android.support",
"org.telegram.messenger"
] | android.support; org.telegram.messenger; | 180,494 |
public static void createXML(Vector<Expression> ve, String file)
{
// Set the root node
Element root = new Element("expressions");
root.setAttribute(new Attribute("count", ve.size()+"")); // Save the number of expressions
// Save all expressions as in createXML(Expression, String)
for (Expression e:... | static void function(Vector<Expression> ve, String file) { Element root = new Element(STR); root.setAttribute(new Attribute("count", ve.size()+STRexpressionSTRwidthSTRSTRheightSTRSTR STR\r\n"); outputter.setFormat(f); outputter.output(doc, new FileWriter(new File(FileManager.get().getWorkspace()+file))); } catch (IOExc... | /**
* Create an XML file to save a set of expressions.
*
* @param ve : Set of expressions
* @param file : path to the file
* @see createXML(Expression, String)
*/ | Create an XML file to save a set of expressions | createXML | {
"repo_name": "tbluche/MERStructure",
"path": "src/tools/XMLCreator.java",
"license": "gpl-3.0",
"size": 22587
} | [
"java.io.File",
"java.io.FileWriter",
"java.io.IOException",
"java.util.Vector",
"org.jdom.Attribute",
"org.jdom.Element"
] | import java.io.File; import java.io.FileWriter; import java.io.IOException; import java.util.Vector; import org.jdom.Attribute; import org.jdom.Element; | import java.io.*; import java.util.*; import org.jdom.*; | [
"java.io",
"java.util",
"org.jdom"
] | java.io; java.util; org.jdom; | 2,911,970 |
switch (state) {
case EMPTY:
if (optimize) {
fragment = msg;
msg = null;
}
else {
if (fragment == null) {
fragment = allocator.allocate(msg.capacity());
}
else {
fragment.clear();
fragment = allocator.ensure(fragment, msg.position(), minCapacity, maxCapacity);
}
m... | switch (state) { case EMPTY: if (optimize) { fragment = msg; msg = null; } else { if (fragment == null) { fragment = allocator.allocate(msg.capacity()); } else { fragment.clear(); fragment = allocator.ensure(fragment, msg.position(), minCapacity, maxCapacity); } msg.flip(); fragment.put(msg); msg.clear(); } this.fragme... | /**
* Stores incomplete buffer
*
* @param fragmentKey stream number
* @param msg input buffer (not flipped yet)
* @return input buffer (can be null)
*/ | Stores incomplete buffer | store | {
"repo_name": "snf4j/snf4j",
"path": "snf4j-sctp/src/main/java/org/snf4j/core/SctpFragments.java",
"license": "mit",
"size": 5316
} | [
"java.nio.ByteBuffer",
"java.util.HashMap"
] | import java.nio.ByteBuffer; import java.util.HashMap; | import java.nio.*; import java.util.*; | [
"java.nio",
"java.util"
] | java.nio; java.util; | 1,508,808 |
public Collection<Integer> getUnfrozenIndices(Formula subformula) {
Set<Integer> target = unfrozen.get(subformula);
if (target == null) {
throw new IllegalArgumentException("Given formula is not a subformula of the root formula.");
}
return Collections.unmodifiableCollect... | Collection<Integer> function(Formula subformula) { Set<Integer> target = unfrozen.get(subformula); if (target == null) { throw new IllegalArgumentException(STR); } return Collections.unmodifiableCollection(target); } | /**
* Return the collection of indices which are not frozen at the subformula
* (i.e. their associated frozen-time values have to be distinguished).
*
* @param subformula Subformula whose unfrozen indices should be returned.
* @return Set of unfrozen indices.
*/ | Return the collection of indices which are not frozen at the subformula (i.e. their associated frozen-time values have to be distinguished) | getUnfrozenIndices | {
"repo_name": "VojtechBruza/parasim",
"path": "model/verification/src/main/java/org/sybila/parasim/model/verification/stlstar/FormulaStarInfo.java",
"license": "gpl-3.0",
"size": 4465
} | [
"java.util.Collection",
"java.util.Collections",
"java.util.Set",
"org.sybila.parasim.model.verification.stl.Formula"
] | import java.util.Collection; import java.util.Collections; import java.util.Set; import org.sybila.parasim.model.verification.stl.Formula; | import java.util.*; import org.sybila.parasim.model.verification.stl.*; | [
"java.util",
"org.sybila.parasim"
] | java.util; org.sybila.parasim; | 635,769 |
public final MetaProperty<U> baseU() {
return baseU;
} | final MetaProperty<U> function() { return baseU; } | /**
* The meta-property for the {@code baseU} property.
* @return the meta-property, not null
*/ | The meta-property for the baseU property | baseU | {
"repo_name": "fengshao0907/joda-beans",
"path": "src/test/java/org/joda/beans/gen/DoubleGenericsSimpleSuper.java",
"license": "apache-2.0",
"size": 11675
} | [
"org.joda.beans.MetaProperty"
] | import org.joda.beans.MetaProperty; | import org.joda.beans.*; | [
"org.joda.beans"
] | org.joda.beans; | 1,188,005 |
@Override
public MethodBuilder constructor(Control control) {
String title = "\"" + getShellTitle() + "\"";
return MethodBuilder.method().returnType("DefaultShell").get("Shell" + WidgetUtils.cleanText(title))
.returnCommand("new DefaultShell(" + title + ")").type(MethodsPage.GETTER)
.rule(CodeGenRules.S... | MethodBuilder function(Control control) { String title = "\"STR\STRDefaultShellSTRShellSTRnew DefaultShell(STR)").type(MethodsPage.GETTER) .rule(CodeGenRules.SHELL_SUFFIX); } | /**
* Create constructor method
*
* @param control
* SWT widget
* @return MethodBuilder instance
*/ | Create constructor method | constructor | {
"repo_name": "jboss-reddeer/reddeer",
"path": "plugins/org.eclipse.reddeer.codegen/src/org/eclipse/reddeer/codegen/rules/simple/ShellCodeGenRule.java",
"license": "epl-1.0",
"size": 2571
} | [
"org.eclipse.reddeer.codegen.builder.MethodBuilder",
"org.eclipse.reddeer.codegen.rules.CodeGenRules",
"org.eclipse.reddeer.codegen.wizards.MethodsPage",
"org.eclipse.swt.widgets.Control"
] | import org.eclipse.reddeer.codegen.builder.MethodBuilder; import org.eclipse.reddeer.codegen.rules.CodeGenRules; import org.eclipse.reddeer.codegen.wizards.MethodsPage; import org.eclipse.swt.widgets.Control; | import org.eclipse.reddeer.codegen.builder.*; import org.eclipse.reddeer.codegen.rules.*; import org.eclipse.reddeer.codegen.wizards.*; import org.eclipse.swt.widgets.*; | [
"org.eclipse.reddeer",
"org.eclipse.swt"
] | org.eclipse.reddeer; org.eclipse.swt; | 1,279,466 |
public interface DirectoryStrategy
{
File getExpectedDirectory(Class<?> testClass); | interface DirectoryStrategy { File function(Class<?> testClass); | /**
* Returns the expected results directory for a given test class.
* @param testClass the test class
* @return the expected results directory
*/ | Returns the expected results directory for a given test class | getExpectedDirectory | {
"repo_name": "goldmansachs/tablasco",
"path": "tablasco-junit/src/main/java/com/gs/tablasco/files/DirectoryStrategy.java",
"license": "apache-2.0",
"size": 1481
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 46,835 |
//@author A0119504L
@Test
public void deleteExistTask() throws IOException {
ArrayList<ViewCommand.ViewFilter> viewChoice =
new ArrayList<ViewCommand.ViewFilter>();
viewChoice.add(ViewCommand.ViewFilter.DEADLINE);
viewChoice.add(ViewCommand.ViewFilter.SCHEDULE);
v... | void function() throws IOException { ArrayList<ViewCommand.ViewFilter> viewChoice = new ArrayList<ViewCommand.ViewFilter>(); viewChoice.add(ViewCommand.ViewFilter.DEADLINE); viewChoice.add(ViewCommand.ViewFilter.SCHEDULE); viewChoice.add(ViewCommand.ViewFilter.FLOATING); ViewCommand viewCommand = new ViewCommand(ViewCo... | /**
* Delete exist task
*/ | Delete exist task | deleteExistTask | {
"repo_name": "cs2103aug2014-w11-4j/main",
"path": "test/rubberduck/logic/command/CommandTest.java",
"license": "gpl-2.0",
"size": 47212
} | [
"java.io.IOException",
"java.util.ArrayList",
"org.junit.Assert"
] | import java.io.IOException; import java.util.ArrayList; import org.junit.Assert; | import java.io.*; import java.util.*; import org.junit.*; | [
"java.io",
"java.util",
"org.junit"
] | java.io; java.util; org.junit; | 2,572,576 |
@Override
public Request<ResetImageAttributeRequest> getDryRunRequest() {
Request<ResetImageAttributeRequest> request = new ResetImageAttributeRequestMarshaller().marshall(this);
request.addParameter("DryRun", Boolean.toString(true));
return request;
} | Request<ResetImageAttributeRequest> function() { Request<ResetImageAttributeRequest> request = new ResetImageAttributeRequestMarshaller().marshall(this); request.addParameter(STR, Boolean.toString(true)); return request; } | /**
* This method is intended for internal use only. Returns the marshaled request configured with additional
* parameters to enable operation dry-run.
*/ | This method is intended for internal use only. Returns the marshaled request configured with additional parameters to enable operation dry-run | getDryRunRequest | {
"repo_name": "aws/aws-sdk-java",
"path": "aws-java-sdk-ec2/src/main/java/com/amazonaws/services/ec2/model/ResetImageAttributeRequest.java",
"license": "apache-2.0",
"size": 8112
} | [
"com.amazonaws.Request",
"com.amazonaws.services.ec2.model.transform.ResetImageAttributeRequestMarshaller"
] | import com.amazonaws.Request; import com.amazonaws.services.ec2.model.transform.ResetImageAttributeRequestMarshaller; | import com.amazonaws.*; import com.amazonaws.services.ec2.model.transform.*; | [
"com.amazonaws",
"com.amazonaws.services"
] | com.amazonaws; com.amazonaws.services; | 170,816 |
public void query(QueueQuery queueQuery)
{
UiThreadContext.assertUiThread();
for(PersistedTask pendingTask : addingTasks)
{
queueQuery.query(this, pendingTask);
}
for(PersistedTask pendingTask : pendingTasks)
{
queueQuery.query(this, pend... | void function(QueueQuery queueQuery) { UiThreadContext.assertUiThread(); for(PersistedTask pendingTask : addingTasks) { queueQuery.query(this, pendingTask); } for(PersistedTask pendingTask : pendingTasks) { queueQuery.query(this, pendingTask); } super.query(queueQuery); } | /**
* Query existing tasks. Call on main thread only.
*
* @param queueQuery
*/ | Query existing tasks. Call on main thread only | query | {
"repo_name": "touchlab/MagicThreads",
"path": "library/src/main/java/co/touchlab/android/threading/tasks/persisted/PersistedTaskQueue.java",
"license": "mit",
"size": 14948
} | [
"co.touchlab.android.threading.utils.UiThreadContext"
] | import co.touchlab.android.threading.utils.UiThreadContext; | import co.touchlab.android.threading.utils.*; | [
"co.touchlab.android"
] | co.touchlab.android; | 1,271,204 |
private String getS3Glob() {
List<String> fileNames = new ArrayList<>(configuration.getS3UploaderAdditionalFiles());
fileNames.add(taskDefinition.getServiceLogOutPath().getFileName().toString());
return String.format("{%s}*.gz*", Joiner.on(",").join(fileNames));
} | String function() { List<String> fileNames = new ArrayList<>(configuration.getS3UploaderAdditionalFiles()); fileNames.add(taskDefinition.getServiceLogOutPath().getFileName().toString()); return String.format(STR, Joiner.on(",").join(fileNames)); } | /**
* Return a String for generating a PathMatcher.
* The matching files are caught by the S3 Uploader and pushed to S3.
* @return file glob String.
*/ | Return a String for generating a PathMatcher. The matching files are caught by the S3 Uploader and pushed to S3 | getS3Glob | {
"repo_name": "stevenschlansker/Singularity",
"path": "SingularityExecutor/src/main/java/com/hubspot/singularity/executor/task/SingularityExecutorTaskLogManager.java",
"license": "apache-2.0",
"size": 7842
} | [
"com.google.common.base.Joiner",
"java.util.ArrayList",
"java.util.List"
] | import com.google.common.base.Joiner; import java.util.ArrayList; import java.util.List; | import com.google.common.base.*; import java.util.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 1,156,589 |
@Override
public void initialize(URL url, ResourceBundle rb)
{
// TODO
} | void function(URL url, ResourceBundle rb) { } | /**
* Initializes the controller class.
*/ | Initializes the controller class | initialize | {
"repo_name": "thomaskrause/graphANNIS",
"path": "graphannis-utils/src/main/java/org/corpus_tools/annis/benchmark/generator/MainController.java",
"license": "apache-2.0",
"size": 1203
} | [
"java.util.ResourceBundle"
] | import java.util.ResourceBundle; | import java.util.*; | [
"java.util"
] | java.util; | 258,165 |
private void initialize() {
String userDefinedLineBreaks = null;
Parameter[] params = getParameters();
if (params != null) {
for (int i = 0; i < params.length; i++) {
if (LINE_BREAKS_KEY.equals(params[i].getName())) {
userDefinedLineBreaks = pa... | void function() { String userDefinedLineBreaks = null; Parameter[] params = getParameters(); if (params != null) { for (int i = 0; i < params.length; i++) { if (LINE_BREAKS_KEY.equals(params[i].getName())) { userDefinedLineBreaks = params[i].getValue(); break; } } } if (userDefinedLineBreaks != null) { lineBreaks = use... | /**
* Parses the parameters to set the line-breaking characters.
*/ | Parses the parameters to set the line-breaking characters | initialize | {
"repo_name": "Mayo-WE01051879/mayosapp",
"path": "Build/src/main/org/apache/tools/ant/filters/StripLineBreaks.java",
"license": "mit",
"size": 4621
} | [
"org.apache.tools.ant.types.Parameter"
] | import org.apache.tools.ant.types.Parameter; | import org.apache.tools.ant.types.*; | [
"org.apache.tools"
] | org.apache.tools; | 606,920 |
@Test
public final void testReadBytesNegativeNumberOfBytes() {
// Setup the resources for the test.
ByteArrayInputStream in = new ByteArrayInputStream(new byte[0]);
exception.expect(IllegalArgumentException.class);
exception.expectMessage(is(equalTo("Number of bytes to read must be equal or greater than ... | final void function() { ByteArrayInputStream in = new ByteArrayInputStream(new byte[0]); exception.expect(IllegalArgumentException.class); exception.expectMessage(is(equalTo(STR))); ByteUtils.readBytes(-5, in); } | /**
* Test method for {@link com.digi.xbee.api.utils.ByteUtils#readBytes(int, java.io.ByteArrayInputStream)}.
*/ | Test method for <code>com.digi.xbee.api.utils.ByteUtils#readBytes(int, java.io.ByteArrayInputStream)</code> | testReadBytesNegativeNumberOfBytes | {
"repo_name": "digidotcom/XBeeJavaLibrary",
"path": "library/src/test/java/com/digi/xbee/api/utils/ByteUtilsTest.java",
"license": "mpl-2.0",
"size": 36318
} | [
"java.io.ByteArrayInputStream"
] | import java.io.ByteArrayInputStream; | import java.io.*; | [
"java.io"
] | java.io; | 379,649 |
private static Collection<Intent> getMediaActivityIntents(final @NonNull PackageManager packageManager,
final @NonNull Uri captureFileURI,
final @NonNull String mimeType) {
final Inte... | static Collection<Intent> function(final @NonNull PackageManager packageManager, final @NonNull Uri captureFileURI, final @NonNull String mimeType) { final Intent typeCamera = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE) .putExtra(MediaStore.EXTRA_OUTPUT, captureFileURI) .addFlags(Intent.FLAG_GRANT_WRIT... | /**
* Find a collection of all matching media intents on the device.
*
* @param packageManager Device {@link PackageManager}.
* @param captureFileURI Capture result URI for camera.
*
* @return Collection of media activity intents.
*/ | Find a collection of all matching media intents on the device | getMediaActivityIntents | {
"repo_name": "mrkcsc/android-media-picker",
"path": "media-picker/src/main/java/com/miguelgaeta/media_picker/MediaPickerChooser.java",
"license": "apache-2.0",
"size": 5129
} | [
"android.content.Intent",
"android.content.pm.PackageManager",
"android.net.Uri",
"android.provider.MediaStore",
"android.support.annotation.NonNull",
"java.util.Collection",
"java.util.LinkedHashMap",
"java.util.Map"
] | import android.content.Intent; import android.content.pm.PackageManager; import android.net.Uri; import android.provider.MediaStore; import android.support.annotation.NonNull; import java.util.Collection; import java.util.LinkedHashMap; import java.util.Map; | import android.content.*; import android.content.pm.*; import android.net.*; import android.provider.*; import android.support.annotation.*; import java.util.*; | [
"android.content",
"android.net",
"android.provider",
"android.support",
"java.util"
] | android.content; android.net; android.provider; android.support; java.util; | 1,722,600 |
public Tensor umin(Tensor lhs) throws ParseException {
Tensor res = new Tensor(lhs);
return (Tensor) calcValue(res, lhs);
} | Tensor function(Tensor lhs) throws ParseException { Tensor res = new Tensor(lhs); return (Tensor) calcValue(res, lhs); } | /**
* negate a tensor.
*/ | negate a tensor | umin | {
"repo_name": "xicmiah/jep-decimal",
"path": "src/java/org/lsmp/djep/vectorJep/function/MUMinus.java",
"license": "gpl-3.0",
"size": 2025
} | [
"org.lsmp.djep.vectorJep.values.Tensor",
"org.nfunk.jep.ParseException"
] | import org.lsmp.djep.vectorJep.values.Tensor; import org.nfunk.jep.ParseException; | import org.lsmp.djep.*; import org.nfunk.jep.*; | [
"org.lsmp.djep",
"org.nfunk.jep"
] | org.lsmp.djep; org.nfunk.jep; | 2,187,585 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.