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 LoggerRepository getLoggerRepository() {
return LoggerFactory.loggerRepository;
} | static LoggerRepository function() { return LoggerFactory.loggerRepository; } | /**
* Get the <code>LoggerRepository</code> that is used for the
* <code>LoggerFactory</code>.
*
* @return the <code>LoggerRepository</code>.
*/ | Get the <code>LoggerRepository</code> that is used for the <code>LoggerFactory</code> | getLoggerRepository | {
"repo_name": "smargav/android-api-library",
"path": "src/main/java/com/google/code/microlog4android/LoggerFactory.java",
"license": "apache-2.0",
"size": 2670
} | [
"com.google.code.microlog4android.repository.LoggerRepository"
] | import com.google.code.microlog4android.repository.LoggerRepository; | import com.google.code.microlog4android.repository.*; | [
"com.google.code"
] | com.google.code; | 239,568 |
private boolean evolveFormatInternal(Format oldFormat) {
if (Format.isPredefined(oldFormat) || oldFormat.isDeleted()) {
return true;
}
String oldName = oldFormat.getClassName();
int oldVersion = oldFormat.getVersion();
Renamer renamer = mutatio... | boolean function(Format oldFormat) { if (Format.isPredefined(oldFormat) oldFormat.isDeleted()) { return true; } String oldName = oldFormat.getClassName(); int oldVersion = oldFormat.getVersion(); Renamer renamer = mutations.getRenamer(oldName, oldVersion, null); Deleter deleter = mutations.getDeleter(oldName, oldVersio... | /**
* Tries to evolve a given existing format to the current version of the
* class and returns false if an invalid mutation is encountered or the
* configured mutations are not sufficient.
*/ | Tries to evolve a given existing format to the current version of the class and returns false if an invalid mutation is encountered or the configured mutations are not sufficient | evolveFormatInternal | {
"repo_name": "EvilMcJerkface/jessy",
"path": "lib/berkeleydb_core/src/com/sleepycat/persist/impl/Evolver.java",
"license": "mit",
"size": 29247
} | [
"com.sleepycat.persist.evolve.Converter",
"com.sleepycat.persist.evolve.Deleter",
"com.sleepycat.persist.evolve.Mutation",
"com.sleepycat.persist.evolve.Renamer"
] | import com.sleepycat.persist.evolve.Converter; import com.sleepycat.persist.evolve.Deleter; import com.sleepycat.persist.evolve.Mutation; import com.sleepycat.persist.evolve.Renamer; | import com.sleepycat.persist.evolve.*; | [
"com.sleepycat.persist"
] | com.sleepycat.persist; | 13,611 |
@ParameterizedTest
@ArgumentsSource(SslTransportLayerArgumentsProvider.class)
public void testInvalidKeyPassword(Args args) throws Exception {
args.sslServerConfigs.put(SslConfigs.SSL_KEY_PASSWORD_CONFIG, new Password("invalid"));
if (args.useInlinePem) {
// We fail fast for PEM
... | @ArgumentsSource(SslTransportLayerArgumentsProvider.class) void function(Args args) throws Exception { args.sslServerConfigs.put(SslConfigs.SSL_KEY_PASSWORD_CONFIG, new Password(STR)); if (args.useInlinePem) { assertThrows(InvalidConfigurationException.class, () -> createEchoServer(args, SecurityProtocol.SSL)); return;... | /**
* Tests that client connections cannot be created to a server
* if key password is invalid
*/ | Tests that client connections cannot be created to a server if key password is invalid | testInvalidKeyPassword | {
"repo_name": "TiVo/kafka",
"path": "clients/src/test/java/org/apache/kafka/common/network/SslTransportLayerTest.java",
"license": "apache-2.0",
"size": 74796
} | [
"org.apache.kafka.common.config.SslConfigs",
"org.apache.kafka.common.config.types.Password",
"org.apache.kafka.common.errors.InvalidConfigurationException",
"org.apache.kafka.common.security.auth.SecurityProtocol",
"org.junit.jupiter.api.Assertions",
"org.junit.jupiter.params.provider.ArgumentsSource"
] | import org.apache.kafka.common.config.SslConfigs; import org.apache.kafka.common.config.types.Password; import org.apache.kafka.common.errors.InvalidConfigurationException; import org.apache.kafka.common.security.auth.SecurityProtocol; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.params.provider.Ar... | import org.apache.kafka.common.config.*; import org.apache.kafka.common.config.types.*; import org.apache.kafka.common.errors.*; import org.apache.kafka.common.security.auth.*; import org.junit.jupiter.api.*; import org.junit.jupiter.params.provider.*; | [
"org.apache.kafka",
"org.junit.jupiter"
] | org.apache.kafka; org.junit.jupiter; | 200,587 |
@Test
public void meta_result_set_float_02() throws SQLException {
MetaResultSet results = new MetaResultSet(new ColumnInfo[] { new FloatColumn("Test", ResultSetMetaData.columnNullable) },
new Object[][] { { null } });
Assert.assertTrue(results.next());
float value = res... | void function() throws SQLException { MetaResultSet results = new MetaResultSet(new ColumnInfo[] { new FloatColumn("Test", ResultSetMetaData.columnNullable) }, new Object[][] { { null } }); Assert.assertTrue(results.next()); float value = results.getFloat(1); Assert.assertEquals(0f, value, 0f); Assert.assertTrue(result... | /**
* Test retrieving meta column values
*
* @throws SQLException
*/ | Test retrieving meta column values | meta_result_set_float_02 | {
"repo_name": "samaitra/jena",
"path": "jena-jdbc/jena-jdbc-core/src/test/java/org/apache/jena/jdbc/metadata/results/TestMetaResultSet.java",
"license": "apache-2.0",
"size": 21597
} | [
"java.sql.ResultSetMetaData",
"java.sql.SQLException",
"org.apache.jena.jdbc.metadata.results.MetaResultSet",
"org.apache.jena.jdbc.results.metadata.columns.ColumnInfo",
"org.apache.jena.jdbc.results.metadata.columns.FloatColumn",
"org.junit.Assert",
"org.junit.Test"
] | import java.sql.ResultSetMetaData; import java.sql.SQLException; import org.apache.jena.jdbc.metadata.results.MetaResultSet; import org.apache.jena.jdbc.results.metadata.columns.ColumnInfo; import org.apache.jena.jdbc.results.metadata.columns.FloatColumn; import org.junit.Assert; import org.junit.Test; | import java.sql.*; import org.apache.jena.jdbc.metadata.results.*; import org.apache.jena.jdbc.results.metadata.columns.*; import org.junit.*; | [
"java.sql",
"org.apache.jena",
"org.junit"
] | java.sql; org.apache.jena; org.junit; | 1,467,252 |
public EAttribute getLoadResponseCharacteristic_ExponentModel() {
return (EAttribute)getLoadResponseCharacteristic().getEStructuralFeatures().get(2);
} | EAttribute function() { return (EAttribute)getLoadResponseCharacteristic().getEStructuralFeatures().get(2); } | /**
* Returns the meta object for the attribute '{@link CIM15.IEC61970.LoadModel.LoadResponseCharacteristic#isExponentModel <em>Exponent Model</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Exponent Model</em>'.
* @see CIM15.IEC61970.LoadModel.LoadRe... | Returns the meta object for the attribute '<code>CIM15.IEC61970.LoadModel.LoadResponseCharacteristic#isExponentModel Exponent Model</code>'. | getLoadResponseCharacteristic_ExponentModel | {
"repo_name": "SES-fortiss/SmartGridCoSimulation",
"path": "core/cim15/src/CIM15/IEC61970/LoadModel/LoadModelPackage.java",
"license": "apache-2.0",
"size": 161452
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 407,985 |
@Test
public void testNextPoisson() {
try {
randomData.nextPoisson(0);
Assert.fail("zero mean -- expecting MathIllegalArgumentException");
} catch (MathIllegalArgumentException ex) {
// ignored
}
Frequency f = new Frequency();
for (int ... | void function() { try { randomData.nextPoisson(0); Assert.fail(STR); } catch (MathIllegalArgumentException ex) { } Frequency f = new Frequency(); for (int i = 0; i < largeSampleSize; i++) { f.addValue(randomData.nextPoisson(4.0d)); } long cumFreq = f.getCount(0) + f.getCount(1) + f.getCount(2) + f.getCount(3) + f.getCo... | /**
* Make sure that empirical distribution of random Poisson(4)'s has P(X <=
* 5) close to actual cumulative Poisson probability and that nextPoisson
* fails when mean is non-positive TODO: replace with statistical test,
* adding test stat to TestStatistic
*/ | Make sure that empirical distribution of random Poisson(4)'s has P(X <= 5) close to actual cumulative Poisson probability and that nextPoisson adding test stat to TestStatistic | testNextPoisson | {
"repo_name": "SpoonLabs/astor",
"path": "examples/math_50v2/src/test/java/org/apache/commons/math/random/RandomDataTest.java",
"license": "gpl-2.0",
"size": 42597
} | [
"org.apache.commons.math.exception.MathIllegalArgumentException",
"org.apache.commons.math.stat.Frequency",
"org.junit.Assert"
] | import org.apache.commons.math.exception.MathIllegalArgumentException; import org.apache.commons.math.stat.Frequency; import org.junit.Assert; | import org.apache.commons.math.exception.*; import org.apache.commons.math.stat.*; import org.junit.*; | [
"org.apache.commons",
"org.junit"
] | org.apache.commons; org.junit; | 721,618 |
private boolean seekInsideBufferUs(long positionUs) {
int sampleQueueCount = sampleQueues.length;
for (int i = 0; i < sampleQueueCount; i++) {
SampleQueue sampleQueue = sampleQueues[i];
sampleQueue.rewind();
boolean seekInsideQueue = sampleQueue.advanceTo(positionUs, true, false)
!... | boolean function(long positionUs) { int sampleQueueCount = sampleQueues.length; for (int i = 0; i < sampleQueueCount; i++) { SampleQueue sampleQueue = sampleQueues[i]; sampleQueue.rewind(); boolean seekInsideQueue = sampleQueue.advanceTo(positionUs, true, false) != SampleQueue.ADVANCE_FAILED; if (!seekInsideQueue && (s... | /**
* Attempts to seek to the specified position within the sample queues.
*
* @param positionUs The seek position in microseconds.
* @return Whether the in-buffer seek was successful.
*/ | Attempts to seek to the specified position within the sample queues | seekInsideBufferUs | {
"repo_name": "KiminRyu/ExoPlayer",
"path": "library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsSampleStreamWrapper.java",
"license": "apache-2.0",
"size": 38379
} | [
"com.google.android.exoplayer2.source.SampleQueue"
] | import com.google.android.exoplayer2.source.SampleQueue; | import com.google.android.exoplayer2.source.*; | [
"com.google.android"
] | com.google.android; | 99,439 |
CommitRequest withFiles(List<String> files); | CommitRequest withFiles(List<String> files); | /**
* Set the files to be commited (ignoring index).
*
* @param files the files to commit
* @return this object
*/ | Set the files to be commited (ignoring index) | withFiles | {
"repo_name": "akervern/che",
"path": "wsagent/che-core-api-git-shared/src/main/java/org/eclipse/che/api/git/shared/CommitRequest.java",
"license": "epl-1.0",
"size": 1561
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 174,518 |
public NormalizedResourceOffer getTotalAvailableResources() {
if (sup != null) {
NormalizedResourceOffer availableResources = new NormalizedResourceOffer(sup.getTotalResources());
if (availableResources.remove(cluster.getAllScheduledResourcesForNode(sup.getId()))) {
i... | NormalizedResourceOffer function() { if (sup != null) { NormalizedResourceOffer availableResources = new NormalizedResourceOffer(sup.getTotalResources()); if (availableResources.remove(cluster.getAllScheduledResourcesForNode(sup.getId()))) { if (!loggedUnderageUsage) { LOG.error(STR, hostname, availableResources); logg... | /**
* Gets all available resources for this node.
*
* @return All of the available resources.
*/ | Gets all available resources for this node | getTotalAvailableResources | {
"repo_name": "erikdw/storm",
"path": "storm-server/src/main/java/org/apache/storm/scheduler/resource/RAS_Node.java",
"license": "apache-2.0",
"size": 16814
} | [
"org.apache.storm.scheduler.resource.normalization.NormalizedResourceOffer"
] | import org.apache.storm.scheduler.resource.normalization.NormalizedResourceOffer; | import org.apache.storm.scheduler.resource.normalization.*; | [
"org.apache.storm"
] | org.apache.storm; | 609,226 |
private boolean isOverloadingMethod(final MethodSymbol method) {
try{
// interfaces have a different way to work
if(method.owner.isInterface())
return overloaded(method, method.owner.type.tsym, types);
// Exception has a pretend supertype of Objec... | boolean function(final MethodSymbol method) { try{ if(method.owner.isInterface()) return overloaded(method, method.owner.type.tsym, types); if(method.owner.type.tsym.getQualifiedName().toString().equals(STR)) return false; for (Type superType = types.supertype(method.owner.type); superType.tsym != null; superType = typ... | /**
* Returns true if the given method is overloading an inherited method (from super class or interfaces).
*/ | Returns true if the given method is overloading an inherited method (from super class or interfaces) | isOverloadingMethod | {
"repo_name": "gijsleussink/ceylon",
"path": "compiler-java/src/com/redhat/ceylon/compiler/java/loader/CeylonModelLoader.java",
"license": "apache-2.0",
"size": 36070
} | [
"com.redhat.ceylon.langtools.tools.javac.code.Scope",
"com.redhat.ceylon.langtools.tools.javac.code.Symbol",
"com.redhat.ceylon.langtools.tools.javac.code.Type"
] | import com.redhat.ceylon.langtools.tools.javac.code.Scope; import com.redhat.ceylon.langtools.tools.javac.code.Symbol; import com.redhat.ceylon.langtools.tools.javac.code.Type; | import com.redhat.ceylon.langtools.tools.javac.code.*; | [
"com.redhat.ceylon"
] | com.redhat.ceylon; | 1,200,494 |
@Override public void removeLayoutComponent(Component parent)
{
throw new IllegalArgumentException("Do not use this method");
}
| @Override void function(Component parent) { throw new IllegalArgumentException(STR); } | /**
* Do not remove components via the parent container's
* {@link Container#remove(Component)} method; removing components from a
* DesignGridLayout-managed container is not supported.
*/ | Do not remove components via the parent container's <code>Container#remove(Component)</code> method; removing components from a DesignGridLayout-managed container is not supported | removeLayoutComponent | {
"repo_name": "pgdurand/jGAF",
"path": "src/com/plealog/prefs4j/implem/ui/tools/DesignGridLayoutManager.java",
"license": "apache-2.0",
"size": 21995
} | [
"java.awt.Component"
] | import java.awt.Component; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,163,487 |
default String getETag(InternalActionContext ac) {
Stream<String> referencedUuids = StreamSupport.stream(getReferencedNodes().spliterator(), false)
.map(HibNode::getUuid);
int hashcode = Stream.concat(Stream.of(getUuid()), referencedUuids)
.collect(Collectors.toSet())
.hashCode();
return ETag.hash(h... | default String getETag(InternalActionContext ac) { Stream<String> referencedUuids = StreamSupport.stream(getReferencedNodes().spliterator(), false) .map(HibNode::getUuid); int hashcode = Stream.concat(Stream.of(getUuid()), referencedUuids) .collect(Collectors.toSet()) .hashCode(); return ETag.hash(hashcode); } | /**
* Return the ETag for the field container.
*
* @param ac
* @return Generated entity tag
*/ | Return the ETag for the field container | getETag | {
"repo_name": "gentics/mesh",
"path": "mdm/api/src/main/java/com/gentics/mesh/core/data/HibNodeFieldContainer.java",
"license": "apache-2.0",
"size": 3695
} | [
"com.gentics.mesh.context.InternalActionContext",
"com.gentics.mesh.core.data.node.HibNode",
"com.gentics.mesh.util.ETag",
"java.util.stream.Collectors",
"java.util.stream.Stream",
"java.util.stream.StreamSupport"
] | import com.gentics.mesh.context.InternalActionContext; import com.gentics.mesh.core.data.node.HibNode; import com.gentics.mesh.util.ETag; import java.util.stream.Collectors; import java.util.stream.Stream; import java.util.stream.StreamSupport; | import com.gentics.mesh.context.*; import com.gentics.mesh.core.data.node.*; import com.gentics.mesh.util.*; import java.util.stream.*; | [
"com.gentics.mesh",
"java.util"
] | com.gentics.mesh; java.util; | 1,137,546 |
public static String toMapString(Map self, int maxSize) {
return (self == null) ? "null" : InvokerHelper.toMapString(self, maxSize);
} | static String function(Map self, int maxSize) { return (self == null) ? "null" : InvokerHelper.toMapString(self, maxSize); } | /**
* Returns the string representation of this map. The string displays the
* contents of the map, i.e. <code>[one:1, two:2, three:3]</code>.
*
* @param self a Map
* @param maxSize stop after approximately this many characters and append '...'
* @return the string representation
* @... | Returns the string representation of this map. The string displays the contents of the map, i.e. <code>[one:1, two:2, three:3]</code> | toMapString | {
"repo_name": "mv2a/yajsw",
"path": "src/groovy-patch/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java",
"license": "apache-2.0",
"size": 704164
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,565,695 |
public T json() {
return dataFormat(new JsonDataFormat());
} | T function() { return dataFormat(new JsonDataFormat()); } | /**
* Uses the JSON data format using the XStream json library
*/ | Uses the JSON data format using the XStream json library | json | {
"repo_name": "shuliangtao/apache-camel-2.13.0-src",
"path": "camel-core/src/main/java/org/apache/camel/builder/DataFormatClause.java",
"license": "apache-2.0",
"size": 24636
} | [
"org.apache.camel.model.dataformat.JsonDataFormat"
] | import org.apache.camel.model.dataformat.JsonDataFormat; | import org.apache.camel.model.dataformat.*; | [
"org.apache.camel"
] | org.apache.camel; | 1,496,663 |
public void testSetBitBug1331() {
BigInteger result = BigInteger.valueOf(0L).setBit(191);
assertEquals("incorrect value", "3138550867693340381917894711603833208051177722232017256448", result.toString());
assertEquals("incorrect sign", 1, result.signum());
} | void function() { BigInteger result = BigInteger.valueOf(0L).setBit(191); assertEquals(STR, STR, result.toString()); assertEquals(STR, 1, result.signum()); } | /**
* setBit: check the case when the number of bit to be set can be
* represented as n * 32 + 31, where n is an arbitrary integer.
* Here 191 = 5 * 32 + 31
*/ | setBit: check the case when the number of bit to be set can be represented as n * 32 + 31, where n is an arbitrary integer. Here 191 = 5 * 32 + 31 | testSetBitBug1331 | {
"repo_name": "JSDemos/android-sdk-20",
"path": "src/org/apache/harmony/tests/java/math/BigIntegerOperateBitsTest.java",
"license": "apache-2.0",
"size": 50548
} | [
"java.math.BigInteger"
] | import java.math.BigInteger; | import java.math.*; | [
"java.math"
] | java.math; | 1,930,561 |
private void onHandshake(GridNioSession ses, byte[] msg) {
BinaryInputStream stream = new BinaryHeapInputStream(msg);
BinaryReaderExImpl reader = new BinaryReaderExImpl(null, stream, null, true);
byte cmd = reader.readByte();
if (cmd != ClientListenerRequest.HANDSHAKE) {
... | void function(GridNioSession ses, byte[] msg) { BinaryInputStream stream = new BinaryHeapInputStream(msg); BinaryReaderExImpl reader = new BinaryReaderExImpl(null, stream, null, true); byte cmd = reader.readByte(); if (cmd != ClientListenerRequest.HANDSHAKE) { U.warn(log, STR + ses.remoteAddress()); ses.close(); return... | /**
* Perform handshake.
*
* @param ses Session.
* @param msg Message bytes.
*/ | Perform handshake | onHandshake | {
"repo_name": "ptupitsyn/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/odbc/ClientListenerNioListener.java",
"license": "apache-2.0",
"size": 12712
} | [
"org.apache.ignite.IgniteCheckedException",
"org.apache.ignite.internal.binary.BinaryReaderExImpl",
"org.apache.ignite.internal.binary.BinaryWriterExImpl",
"org.apache.ignite.internal.binary.streams.BinaryHeapInputStream",
"org.apache.ignite.internal.binary.streams.BinaryHeapOutputStream",
"org.apache.ign... | import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.binary.BinaryReaderExImpl; import org.apache.ignite.internal.binary.BinaryWriterExImpl; import org.apache.ignite.internal.binary.streams.BinaryHeapInputStream; import org.apache.ignite.internal.binary.streams.BinaryHeapOutputStream; impo... | import org.apache.ignite.*; import org.apache.ignite.internal.binary.*; import org.apache.ignite.internal.binary.streams.*; import org.apache.ignite.internal.processors.authentication.*; import org.apache.ignite.internal.processors.platform.client.*; import org.apache.ignite.internal.util.nio.*; import org.apache.ignit... | [
"org.apache.ignite"
] | org.apache.ignite; | 1,568,093 |
@Override
public CompressionInputStream createInputStream(InputStream in)
throws IOException {
return createInputStream(in, createDecompressor());
} | CompressionInputStream function(InputStream in) throws IOException { return createInputStream(in, createDecompressor()); } | /**
* Create a {@link CompressionInputStream} that will read from the given
* input stream.
*
* @param in
* the stream to read compressed bytes from
* @return a stream to read uncompressed bytes from
* @throws IOException
*/ | Create a <code>CompressionInputStream</code> that will read from the given input stream | createInputStream | {
"repo_name": "iVCE/RDFS",
"path": "src/core/org/apache/hadoop/io/compress/SnappyCodec.java",
"license": "apache-2.0",
"size": 7155
} | [
"java.io.IOException",
"java.io.InputStream"
] | import java.io.IOException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 2,812,593 |
public static boolean availableForMedia(SupportsMedia mediaSupporter, MediaTypeEnum mediaType)
{
if (mediaSupporter == null)
{
return false;
}
List supportedMedia = mediaSupporter.getSupportedMedia();
if (supportedMedia == null)
{
return ... | static boolean function(SupportsMedia mediaSupporter, MediaTypeEnum mediaType) { if (mediaSupporter == null) { return false; } List supportedMedia = mediaSupporter.getSupportedMedia(); if (supportedMedia == null) { return true; } return supportedMedia.contains(mediaType); } | /**
* Is this media supporter configured for the media type? (Background: Factored from ColumnTag)
* @param mediaSupporter An object that supports various media.
* @param mediaType The currentMedia type
* @return true if the media supporter should be displayed for this request
*/ | Is this media supporter configured for the media type? (Background: Factored from ColumnTag) | availableForMedia | {
"repo_name": "9fevrier/displaytag",
"path": "displaytag/src/main/java/org/displaytag/util/MediaUtil.java",
"license": "artistic-2.0",
"size": 4038
} | [
"java.util.List",
"org.displaytag.properties.MediaTypeEnum"
] | import java.util.List; import org.displaytag.properties.MediaTypeEnum; | import java.util.*; import org.displaytag.properties.*; | [
"java.util",
"org.displaytag.properties"
] | java.util; org.displaytag.properties; | 577,108 |
public static void writeUCINET_DLMatrix(Graph g, PrintStream out) {
out.println("DL\nN=" + g.size() + "\nDATA:");
for (int i = 0; i < g.size(); ++i) {
BitSet bs = new BitSet(g.size());
g.neighborsOut(i).forEach(bs::set);
for (int j = 0; j < g.size(); ++j) {
... | static void function(Graph g, PrintStream out) { out.println(STR + g.size() + STR); for (int i = 0; i < g.size(); ++i) { BitSet bs = new BitSet(g.size()); g.neighborsOut(i).forEach(bs::set); for (int j = 0; j < g.size(); ++j) { out.print(bs.get(j) ? STR : STR); } out.println(); } out.println(); } | /**
* Saves the given graph to
* the given stream in UCINET DL matrix format.
*/ | Saves the given graph to the given stream in UCINET DL matrix format | writeUCINET_DLMatrix | {
"repo_name": "automenta/narchy",
"path": "util/src/main/java/jcog/data/graph/GraphIO.java",
"license": "agpl-3.0",
"size": 7701
} | [
"java.io.PrintStream",
"java.util.BitSet"
] | import java.io.PrintStream; import java.util.BitSet; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 1,209,412 |
protected IFigure setupContentPane(IFigure nodeShape) {
return nodeShape; // use nodeShape itself as contentPane
} | IFigure function(IFigure nodeShape) { return nodeShape; } | /**
* Default implementation treats passed figure as content pane.
* Respects layout one may have set for generated figure.
* @param nodeShape instance of generated figure class
* @generated
*/ | Default implementation treats passed figure as content pane. Respects layout one may have set for generated figure | setupContentPane | {
"repo_name": "splinter/developer-studio",
"path": "data-mapper/org.wso2.developerstudio.visualdatamapper.diagram/src/dataMapper/diagram/edit/parts/InNode3EditPart.java",
"license": "apache-2.0",
"size": 6425
} | [
"org.eclipse.draw2d.IFigure"
] | import org.eclipse.draw2d.IFigure; | import org.eclipse.draw2d.*; | [
"org.eclipse.draw2d"
] | org.eclipse.draw2d; | 2,695,504 |
public void testAsin() throws Throwable
{
final Random rand = new Random( 4444 );
for( int cnt = 0 ; cnt < 10000 ; cnt++ )
{
System.out.println( cnt );
final double x = 2.0 * ( rand.nextDouble() ) - 1.0;
final BigFixedPointElem<LrgPrecision> xd = new BigFixedPointElem<LrgPrecision>( x , lrgPrecision ... | void function() throws Throwable { final Random rand = new Random( 4444 ); for( int cnt = 0 ; cnt < 10000 ; cnt++ ) { System.out.println( cnt ); final double x = 2.0 * ( rand.nextDouble() ) - 1.0; final BigFixedPointElem<LrgPrecision> xd = new BigFixedPointElem<LrgPrecision>( x , lrgPrecision ); final BigFixedPointElem... | /**
* Tests the ability to calculate arcsines.
* @throws Throwable
*/ | Tests the ability to calculate arcsines | testAsin | {
"repo_name": "viridian1138/SimpleAlgebra_V2",
"path": "src/test_simplealgebra/TestAtan2BigFixed.java",
"license": "gpl-3.0",
"size": 18390
} | [
"java.util.Random",
"junit.framework.Assert"
] | import java.util.Random; import junit.framework.Assert; | import java.util.*; import junit.framework.*; | [
"java.util",
"junit.framework"
] | java.util; junit.framework; | 1,796,448 |
public FoldManager getFoldManager() {
return foldManager;
}
| FoldManager function() { return foldManager; } | /**
* Returns the fold manager for this text area.
*
* @return The fold manager.
*/ | Returns the fold manager for this text area | getFoldManager | {
"repo_name": "Thecarisma/powertext",
"path": "Power Text/src/com/power/text/ui/pteditor/RSyntaxTextArea.java",
"license": "gpl-3.0",
"size": 102040
} | [
"com.power.text.pteditor.folding.FoldManager"
] | import com.power.text.pteditor.folding.FoldManager; | import com.power.text.pteditor.folding.*; | [
"com.power.text"
] | com.power.text; | 1,717,456 |
public ArrayList<Actor> getMovieActors(INotifiableManager manager) {
StringBuilder sb = new StringBuilder();
sb.append("SELECT DISTINCT actors.idActor, strActor, art.url");
sb.append(" FROM actors LEFT OUTER JOIN art ON art.media_id=actors.idActor AND art.media_type='actor' and art.type='thumb', actorlinkmovie... | ArrayList<Actor> function(INotifiableManager manager) { StringBuilder sb = new StringBuilder(); sb.append(STR); sb.append(STR); sb.append(STR); sb.append(STR); return parseActors(mConnection.query(STR, sb.toString(), manager)); } | /**
* Gets all movie actors from database
* @return All movie actors
*/ | Gets all movie actors from database | getMovieActors | {
"repo_name": "murat8505/android-xbmcremote-1",
"path": "src/org/xbmc/httpapi/client/VideoClient.java",
"license": "gpl-2.0",
"size": 20029
} | [
"java.util.ArrayList",
"org.xbmc.api.business.INotifiableManager",
"org.xbmc.api.object.Actor"
] | import java.util.ArrayList; import org.xbmc.api.business.INotifiableManager; import org.xbmc.api.object.Actor; | import java.util.*; import org.xbmc.api.business.*; import org.xbmc.api.object.*; | [
"java.util",
"org.xbmc.api"
] | java.util; org.xbmc.api; | 1,144,961 |
int getColumnSequenceIndex()
{
if (columnSequenceIndex == PlateData.ASCENDING_LETTER)
return PlateGrid.ASCENDING_LETTER;
return PlateGrid.ASCENDING_NUMBER;
}
| int getColumnSequenceIndex() { if (columnSequenceIndex == PlateData.ASCENDING_LETTER) return PlateGrid.ASCENDING_LETTER; return PlateGrid.ASCENDING_NUMBER; } | /**
* Indicates how to display a column.
*
* @return See above.
*/ | Indicates how to display a column | getColumnSequenceIndex | {
"repo_name": "hflynn/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/dataBrowser/view/WellsModel.java",
"license": "gpl-2.0",
"size": 20759
} | [
"org.openmicroscopy.shoola.util.ui.PlateGrid"
] | import org.openmicroscopy.shoola.util.ui.PlateGrid; | import org.openmicroscopy.shoola.util.ui.*; | [
"org.openmicroscopy.shoola"
] | org.openmicroscopy.shoola; | 2,603,823 |
@Override
public void reduceTaskCompleted(ReduceTask reduceTask) throws RemoteException {
MasterNode localNode = (MasterNode) node;
localNode.removeReducerTask(reduceTask);
} | void function(ReduceTask reduceTask) throws RemoteException { MasterNode localNode = (MasterNode) node; localNode.removeReducerTask(reduceTask); } | /**
* reduceTaskCompleted: Notify the masterNode that a reducer task is completed
* @param reduceTask: reduceTask that got completed
* @throws RemoteException
*/ | reduceTaskCompleted: Notify the masterNode that a reducer task is completed | reduceTaskCompleted | {
"repo_name": "swapnil-pimpale/Map-Reduce-Engine",
"path": "framework-src/Communicator.java",
"license": "gpl-2.0",
"size": 21736
} | [
"java.rmi.RemoteException"
] | import java.rmi.RemoteException; | import java.rmi.*; | [
"java.rmi"
] | java.rmi; | 2,054,659 |
if(!jugando) {
partida = new Game(j1, j2, j1Turn);
partida.addGameListener(this);
partida.addGameListener(tablero);
tablero.setScore(j1.getName() + " " + j1Score + " - " + j2Score + " " + j2.getName());
time = System.currentTimeMillis();
jugando = true;
j1Turn = !j1Turn;
| if(!jugando) { partida = new Game(j1, j2, j1Turn); partida.addGameListener(this); partida.addGameListener(tablero); tablero.setScore(j1.getName() + " " + j1Score + STR + j2Score + " " + j2.getName()); time = System.currentTimeMillis(); jugando = true; j1Turn = !j1Turn; | /**
* Comienza la partida
*/ | Comienza la partida | play | {
"repo_name": "polypiel/superpalitos",
"path": "desktop-app/src/main/java/com/angelcalvo/superpalitos/PartidaManager.java",
"license": "gpl-2.0",
"size": 3203
} | [
"com.angelcalvo.palitos.Game"
] | import com.angelcalvo.palitos.Game; | import com.angelcalvo.palitos.*; | [
"com.angelcalvo.palitos"
] | com.angelcalvo.palitos; | 1,355,963 |
void sendNotice(@Nonnull MessageReceiver target, @Nonnull String message); | void sendNotice(@Nonnull MessageReceiver target, @Nonnull String message); | /**
* Sends a notice to a target user or channel.
*
* @param target the destination of the message
* @param message the message to send
* @throws IllegalArgumentException for null parameters
*/ | Sends a notice to a target user or channel | sendNotice | {
"repo_name": "ammaraskar/KittehIRCClientLib",
"path": "src/main/java/org/kitteh/irc/client/library/Client.java",
"license": "mit",
"size": 10050
} | [
"javax.annotation.Nonnull",
"org.kitteh.irc.client.library.element.MessageReceiver"
] | import javax.annotation.Nonnull; import org.kitteh.irc.client.library.element.MessageReceiver; | import javax.annotation.*; import org.kitteh.irc.client.library.element.*; | [
"javax.annotation",
"org.kitteh.irc"
] | javax.annotation; org.kitteh.irc; | 2,037,066 |
@Test
public void test016GetUserAttributes() throws Exception {
String regionName = "testGetUserAttributes";
PartitionedRegion pr = (PartitionedRegion) PartitionedRegionTestHelper
.createPartitionedRegion(regionName, String.valueOf(200), 0);
String s = "DUMMY";
pr.setUserAttribute(s);
O... | void function() throws Exception { String regionName = STR; PartitionedRegion pr = (PartitionedRegion) PartitionedRegionTestHelper .createPartitionedRegion(regionName, String.valueOf(200), 0); String s = "DUMMY"; pr.setUserAttribute(s); Object o = pr.getUserAttribute(); if (!o.equals(s)) { fail(STR); } pr.close(); asse... | /**
* This method is used to test the getUserAttributes functionality. It verifies that it gets the
* UserAttributes on an open PR without throwing any exception. It also verifies that it throws
* RegionDestroyedException on a closed PR.
*
*/ | This method is used to test the getUserAttributes functionality. It verifies that it gets the UserAttributes on an open PR without throwing any exception. It also verifies that it throws RegionDestroyedException on a closed PR | test016GetUserAttributes | {
"repo_name": "davebarnes97/geode",
"path": "geode-core/src/integrationTest/java/org/apache/geode/internal/cache/PartitionedRegionSingleNodeOperationsJUnitTest.java",
"license": "apache-2.0",
"size": 51308
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 544,987 |
@VisibleForTesting
public void touch(final boolean includeMembershipResource, final Calendar createdDate, final String createdUser,
final Calendar modifiedDate, final String modifyingUser) throws RepositoryException {
FedoraTypesUtils.touch(getNode(), createdDate, createdUser, modi... | void function(final boolean includeMembershipResource, final Calendar createdDate, final String createdUser, final Calendar modifiedDate, final String modifyingUser) throws RepositoryException { FedoraTypesUtils.touch(getNode(), createdDate, createdUser, modifiedDate, modifyingUser); if (includeMembershipResource) { to... | /**
* Touches a resource to ensure that the implicitly updated properties are updated if
* not explicitly set.
* @param includeMembershipResource true if this touch should propagate through to
* ldp membership resources
* @param createdDate the date to which the... | Touches a resource to ensure that the implicitly updated properties are updated if not explicitly set | touch | {
"repo_name": "lsitu/fcrepo4",
"path": "fcrepo-kernel-modeshape/src/main/java/org/fcrepo/kernel/modeshape/FedoraResourceImpl.java",
"license": "apache-2.0",
"size": 56278
} | [
"java.util.Calendar",
"javax.jcr.RepositoryException",
"org.fcrepo.kernel.modeshape.utils.FedoraTypesUtils"
] | import java.util.Calendar; import javax.jcr.RepositoryException; import org.fcrepo.kernel.modeshape.utils.FedoraTypesUtils; | import java.util.*; import javax.jcr.*; import org.fcrepo.kernel.modeshape.utils.*; | [
"java.util",
"javax.jcr",
"org.fcrepo.kernel"
] | java.util; javax.jcr; org.fcrepo.kernel; | 1,892,498 |
private MBand getSummaryBand(INode root){
if (root != null){
List<INode> children = root.getChildren();
for(INode node : children){
if (node instanceof MReport)
return searchSummaryBand(node.getChildren());
}
}
return null;
}
| MBand function(INode root){ if (root != null){ List<INode> children = root.getChildren(); for(INode node : children){ if (node instanceof MReport) return searchSummaryBand(node.getChildren()); } } return null; } | /**
* Search the summary band from the root of the document
* @param root root node of the document
* @return summary band if found, null otherwise
*/ | Search the summary band from the root of the document | getSummaryBand | {
"repo_name": "OpenSoftwareSolutions/PDFReporter-Studio",
"path": "com.jaspersoft.studio.components/src/com/jaspersoft/studio/components/chart/model/command/NewChartWizardHandler.java",
"license": "lgpl-3.0",
"size": 2772
} | [
"com.jaspersoft.studio.model.INode",
"com.jaspersoft.studio.model.MReport",
"com.jaspersoft.studio.model.band.MBand",
"java.util.List"
] | import com.jaspersoft.studio.model.INode; import com.jaspersoft.studio.model.MReport; import com.jaspersoft.studio.model.band.MBand; import java.util.List; | import com.jaspersoft.studio.model.*; import com.jaspersoft.studio.model.band.*; import java.util.*; | [
"com.jaspersoft.studio",
"java.util"
] | com.jaspersoft.studio; java.util; | 1,397,685 |
Vector<Option> result = new Vector<Option>();
result.addElement(new Option("\tRandom number seed.\n" + "\t(default "
+ m_SeedDefault + ")", "S", 1, "-S <num>"));
result.addAll(Collections.list(super.listOptions()));
return result.elements();
} | Vector<Option> result = new Vector<Option>(); result.addElement(new Option(STR + STR + m_SeedDefault + ")", "S", 1, STR)); result.addAll(Collections.list(super.listOptions())); return result.elements(); } | /**
* Returns an enumeration describing the available options.
*
* @return an enumeration of all the available options.
*/ | Returns an enumeration describing the available options | listOptions | {
"repo_name": "mydzigear/weka.kmeanspp.silhouette_score",
"path": "src/weka/clusterers/RandomizableDensityBasedClusterer.java",
"license": "gpl-3.0",
"size": 3568
} | [
"java.util.Collections",
"java.util.Vector"
] | import java.util.Collections; import java.util.Vector; | import java.util.*; | [
"java.util"
] | java.util; | 1,846,100 |
JComponent getObjectView(TreePath selected_path); | JComponent getObjectView(TreePath selected_path); | /**
* Returns a JComponent that displays details of the selected item.
*/ | Returns a JComponent that displays details of the selected item | getObjectView | {
"repo_name": "Mckoi/mckoiddb",
"path": "src/main/java/com/mckoi/gui/PathViewer.java",
"license": "apache-2.0",
"size": 1838
} | [
"javax.swing.JComponent",
"javax.swing.tree.TreePath"
] | import javax.swing.JComponent; import javax.swing.tree.TreePath; | import javax.swing.*; import javax.swing.tree.*; | [
"javax.swing"
] | javax.swing; | 2,757,321 |
public boolean removeHighTextContrastStateChangeListener(
@NonNull HighTextContrastChangeListener listener) {
return true;
} | boolean function( @NonNull HighTextContrastChangeListener listener) { return true; } | /**
* Unregisters a {@link HighTextContrastChangeListener}.
*
* @param listener The listener.
* @return True if successfully unregistered.
*
*/ | Unregisters a <code>HighTextContrastChangeListener</code> | removeHighTextContrastStateChangeListener | {
"repo_name": "Ant-Droid/android_frameworks_base_OLD",
"path": "tools/layoutlib/bridge/src/android/view/accessibility/AccessibilityManager.java",
"license": "apache-2.0",
"size": 8533
} | [
"android.annotation.NonNull"
] | import android.annotation.NonNull; | import android.annotation.*; | [
"android.annotation"
] | android.annotation; | 1,546,241 |
public void sortArray(Object array, int fromIndex, int toIndex) {
switch (this) {
case BOOLEAN:
// there is no Arrays.sort(boolean[], int, int)
sortBooleanArray((boolean[]) array, fromIndex, toIndex);
return;
case BYTE:
Arrays.sort((byte[]) array, fromIndex, toIndex);
return;... | void function(Object array, int fromIndex, int toIndex) { switch (this) { case BOOLEAN: sortBooleanArray((boolean[]) array, fromIndex, toIndex); return; case BYTE: Arrays.sort((byte[]) array, fromIndex, toIndex); return; case CHAR: Arrays.sort((char[]) array, fromIndex, toIndex); return; case DOUBLE: Arrays.sort((doubl... | /**
* Sorts a specified range of an array of this primitive type.
*
* @param array Array of this primitive type
* @param fromIndex the index of the first element, inclusive, to be sorted
* @param toIndex the index of the last element, exclusive, to be sorted
*/ | Sorts a specified range of an array of this primitive type | sortArray | {
"repo_name": "arina-ielchiieva/calcite",
"path": "linq4j/src/main/java/org/apache/calcite/linq4j/tree/Primitive.java",
"license": "apache-2.0",
"size": 27669
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 413,390 |
void repaint(final Animation cmp){
impl.repaint(cmp);
} | void repaint(final Animation cmp){ impl.repaint(cmp); } | /**
* Causes the given component to repaint, used internally by Form
*
* @param cmp the given component to repaint
*/ | Causes the given component to repaint, used internally by Form | repaint | {
"repo_name": "sannysanoff/CodenameOne",
"path": "CodenameOne/src/com/codename1/ui/Display.java",
"license": "gpl-2.0",
"size": 148611
} | [
"com.codename1.ui.animations.Animation"
] | import com.codename1.ui.animations.Animation; | import com.codename1.ui.animations.*; | [
"com.codename1.ui"
] | com.codename1.ui; | 2,508,331 |
public static SecretKeys generateKey() throws GeneralSecurityException {
fixPrng();
KeyGenerator keyGen = KeyGenerator.getInstance(CIPHER);
// No need to provide a SecureRandom or set a seed since that will
// happen automatically.
keyGen.init(AES_KEY_LENGTH_BITS);
Se... | static SecretKeys function() throws GeneralSecurityException { fixPrng(); KeyGenerator keyGen = KeyGenerator.getInstance(CIPHER); keyGen.init(AES_KEY_LENGTH_BITS); SecretKey confidentialityKey = keyGen.generateKey(); byte[] integrityKeyBytes = randomBytes(HMAC_KEY_LENGTH_BITS / 8); SecretKey integrityKey = new SecretKe... | /**
* A function that generates random AES & HMAC keys and prints out exceptions but
* doesn't throw them since none should be encountered. If they are
* encountered, the return value is null.
*
* @return The AES & HMAC keys.
* @throws GeneralSecurityException if AES is not implemented on ... | A function that generates random AES & HMAC keys and prints out exceptions but doesn't throw them since none should be encountered. If they are encountered, the return value is null | generateKey | {
"repo_name": "Suxsem/Domo-Android",
"path": "app/src/main/java/com/suxsem/domo/AesCbcWithIntegrity.java",
"license": "mit",
"size": 35989
} | [
"java.security.GeneralSecurityException",
"javax.crypto.KeyGenerator",
"javax.crypto.SecretKey",
"javax.crypto.spec.SecretKeySpec"
] | import java.security.GeneralSecurityException; import javax.crypto.KeyGenerator; import javax.crypto.SecretKey; import javax.crypto.spec.SecretKeySpec; | import java.security.*; import javax.crypto.*; import javax.crypto.spec.*; | [
"java.security",
"javax.crypto"
] | java.security; javax.crypto; | 2,899,858 |
ClientChannel create(ServiceReference serviceReference); | ClientChannel create(ServiceReference serviceReference); | /**
* Creates {@link ClientChannel} ready for communication with remote service endpoint.
*
* @param serviceReference target serviceReference
* @return {@code ClientChannel} instance
*/ | Creates <code>ClientChannel</code> ready for communication with remote service endpoint | create | {
"repo_name": "servicefabric/servicefabric",
"path": "services-api/src/main/java/io/scalecube/services/transport/api/ClientTransport.java",
"license": "apache-2.0",
"size": 394
} | [
"io.scalecube.services.ServiceReference"
] | import io.scalecube.services.ServiceReference; | import io.scalecube.services.*; | [
"io.scalecube.services"
] | io.scalecube.services; | 1,742,341 |
public DTMIterator iter()
{
try
{
if(hasCache())
return cloneWithReset();
else
return this; // don't bother to clone... won't do any good!
}
catch (CloneNotSupportedException cnse)
{
throw new RuntimeException(cnse.getMessage());
}
} | DTMIterator function() { try { if(hasCache()) return cloneWithReset(); else return this; } catch (CloneNotSupportedException cnse) { throw new RuntimeException(cnse.getMessage()); } } | /**
* Cast result object to a nodelist.
*
* @return The nodeset as a nodelist
*/ | Cast result object to a nodelist | iter | {
"repo_name": "YouDiSN/OpenJDK-Research",
"path": "jdk9/jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/objects/XNodeSet.java",
"license": "gpl-2.0",
"size": 23481
} | [
"com.sun.org.apache.xml.internal.dtm.DTMIterator"
] | import com.sun.org.apache.xml.internal.dtm.DTMIterator; | import com.sun.org.apache.xml.internal.dtm.*; | [
"com.sun.org"
] | com.sun.org; | 2,158,260 |
public RequestHandle post(Context context, String url, RequestParams params, ResponseHandlerInterface responseHandler) {
return post(context, url, paramsToEntity(params, responseHandler), null, responseHandler);
} | RequestHandle function(Context context, String url, RequestParams params, ResponseHandlerInterface responseHandler) { return post(context, url, paramsToEntity(params, responseHandler), null, responseHandler); } | /**
* Perform a HTTP POST request and track the Android Context which initiated the request.
*
* @param context the Android Context which initiated the request.
* @param url the URL to send the request to.
* @param params additional POST parameters or files to send ... | Perform a HTTP POST request and track the Android Context which initiated the request | post | {
"repo_name": "lookwhatlook/WeiboWeiBaTong",
"path": "libs/LoginBeebo-android-async-http/src/com/loopj/android/http/AsyncHttpClient.java",
"license": "gpl-3.0",
"size": 65767
} | [
"android.content.Context"
] | import android.content.Context; | import android.content.*; | [
"android.content"
] | android.content; | 1,182,917 |
public static IsColumnExpressed greaterThan(Matcher<?> matcher) {
return IsColumnExpressed.expressed(ComparisonOperator.GREATER_THAN, matcher);
}
| static IsColumnExpressed function(Matcher<?> matcher) { return IsColumnExpressed.expressed(ComparisonOperator.GREATER_THAN, matcher); } | /**
* Creates a matcher that matches when the examined column has
* GREATER_THAN condition with value matched with the specified {@code matcher}.
* <p>Example:
* <pre>{@code
* cb.query.setMemberName_GreaterThan("John Doe");
* assertThat(cb, hasCondition("memberName", greaterThan(star... | Creates a matcher that matches when the examined column has GREATER_THAN condition with value matched with the specified matcher. Example: <code>cb.query.setMemberName_GreaterThan("John Doe"); assertThat(cb, hasCondition("memberName", greaterThan(startsWith("J")))); </code> | greaterThan | {
"repo_name": "taktos/dbflute-hamcrest",
"path": "src/main/java/org/dbflute/testing/DBFluteMatchers.java",
"license": "apache-2.0",
"size": 19196
} | [
"org.dbflute.testing.matcher.ComparisonOperator",
"org.dbflute.testing.matcher.IsColumnExpressed",
"org.hamcrest.Matcher"
] | import org.dbflute.testing.matcher.ComparisonOperator; import org.dbflute.testing.matcher.IsColumnExpressed; import org.hamcrest.Matcher; | import org.dbflute.testing.matcher.*; import org.hamcrest.*; | [
"org.dbflute.testing",
"org.hamcrest"
] | org.dbflute.testing; org.hamcrest; | 2,243,464 |
@Deprecated
Pointer getHostPointer(); | Pointer getHostPointer(); | /**
* THe pointer for the buffer
*
* @return the pointer for this buffer
*/ | THe pointer for the buffer | getHostPointer | {
"repo_name": "drlebedev/nd4j",
"path": "nd4j-backends/nd4j-backend-impls/nd4j-cuda-7.5/src/main/java/org/nd4j/linalg/jcublas/buffer/JCudaBuffer.java",
"license": "apache-2.0",
"size": 1580
} | [
"org.bytedeco.javacpp.Pointer"
] | import org.bytedeco.javacpp.Pointer; | import org.bytedeco.javacpp.*; | [
"org.bytedeco.javacpp"
] | org.bytedeco.javacpp; | 936,078 |
protected WebApplicationContext findWebApplicationContext() {
String attrName = getContextAttributeName();
if (attrName == null) {
return null;
}
WebApplicationContext wac =
WebApplicationContextUtils.getWebApplicationContext(getServletContext(), attrName);
// if (wac == null) {
// throw ne... | WebApplicationContext function() { String attrName = getContextAttributeName(); if (attrName == null) { return null; } WebApplicationContext wac = WebApplicationContextUtils.getWebApplicationContext(getServletContext(), attrName); return wac; } | /**
* Retrieve a <code>WebApplicationContext</code> from the <code>ServletContext</code>
* attribute with the {@link #setContextAttribute configured name}. The
* <code>WebApplicationContext</code> must have already been loaded and stored in the
* <code>ServletContext</code> before this servlet gets initiali... | Retrieve a <code>WebApplicationContext</code> from the <code>ServletContext</code> attribute with the <code>#setContextAttribute configured name</code>. The <code>WebApplicationContext</code> must have already been loaded and stored in the <code>ServletContext</code> before this servlet gets initialized (or invoked). S... | findWebApplicationContext | {
"repo_name": "shufudong/bboss",
"path": "bboss-mvc/src/org/frameworkset/web/servlet/DispatchServlet.java",
"license": "apache-2.0",
"size": 72693
} | [
"org.frameworkset.web.servlet.context.WebApplicationContext",
"org.frameworkset.web.servlet.support.WebApplicationContextUtils"
] | import org.frameworkset.web.servlet.context.WebApplicationContext; import org.frameworkset.web.servlet.support.WebApplicationContextUtils; | import org.frameworkset.web.servlet.context.*; import org.frameworkset.web.servlet.support.*; | [
"org.frameworkset.web"
] | org.frameworkset.web; | 922,267 |
public int getWrapIndex (Array<Glyph> glyphs, int start) {
int i = start - 1;
for (; i >= 1; i--)
if (!isWhitespace((char)glyphs.get(i).id)) break;
for (; i >= 1; i--) {
char ch = (char)glyphs.get(i).id;
if (isWhitespace(ch) || isBreakChar(ch)) return i + 1;
}
return 0;
} | int function (Array<Glyph> glyphs, int start) { int i = start - 1; for (; i >= 1; i--) if (!isWhitespace((char)glyphs.get(i).id)) break; for (; i >= 1; i--) { char ch = (char)glyphs.get(i).id; if (isWhitespace(ch) isBreakChar(ch)) return i + 1; } return 0; } | /** Returns the first valid glyph index to use to wrap to the next line, starting at the specified start index and
* (typically) moving toward the beginning of the glyphs array. */ | Returns the first valid glyph index to use to wrap to the next line, starting at the specified start index and | getWrapIndex | {
"repo_name": "xpenatan/libgdx-LWJGL3",
"path": "gdx/src/com/badlogic/gdx/graphics/g2d/BitmapFont.java",
"license": "apache-2.0",
"size": 34300
} | [
"com.badlogic.gdx.utils.Array"
] | import com.badlogic.gdx.utils.Array; | import com.badlogic.gdx.utils.*; | [
"com.badlogic.gdx"
] | com.badlogic.gdx; | 614,621 |
public void addCollectionTags(Collection<String> tlist) {
if (tlist == null) {
return;
}
if (tags == null) {
tags = new HashMap<>();
}
for (String t : tlist) {
tags.put(t, DEFAULT_STATE_VAL);
}
} | void function(Collection<String> tlist) { if (tlist == null) { return; } if (tags == null) { tags = new HashMap<>(); } for (String t : tlist) { tags.put(t, DEFAULT_STATE_VAL); } } | /**
* Parses the given "a;b;c;..." format of tags into a Set.
*
* @param tlist list of tags
*/ | Parses the given "a;b;c;..." format of tags into a Set | addCollectionTags | {
"repo_name": "OpenSextant/Xponents",
"path": "Core/src/main/java/org/opensextant/annotations/Record.java",
"license": "apache-2.0",
"size": 6081
} | [
"java.util.Collection",
"java.util.HashMap"
] | import java.util.Collection; import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 2,901,213 |
static HashedEntityId fromHBaseRowKey(byte[] hbaseRowKey, RowKeyFormat format) {
// TODO Validate that hbaseRowKey has the characteristics of the hashing method
// specified in format
// kijiRowKey is null: there is no (known) way to reverse the hash
return new HashedEntityId(null, hbaseRowKey, format... | static HashedEntityId fromHBaseRowKey(byte[] hbaseRowKey, RowKeyFormat format) { return new HashedEntityId(null, hbaseRowKey, format); } | /**
* Creates a HashedEntityId from the specified HBase row key.
*
* @param hbaseRowKey HBase row key.
* @param format Row key hashing specification.
* @return a new HashedEntityId with the specified HBase row key.
*/ | Creates a HashedEntityId from the specified HBase row key | fromHBaseRowKey | {
"repo_name": "rpinzon/kiji-schema",
"path": "kiji-schema/src/main/java/org/kiji/schema/HashedEntityId.java",
"license": "apache-2.0",
"size": 4909
} | [
"org.kiji.schema.avro.RowKeyFormat"
] | import org.kiji.schema.avro.RowKeyFormat; | import org.kiji.schema.avro.*; | [
"org.kiji.schema"
] | org.kiji.schema; | 2,877,799 |
public ScriptMode getScriptMode(String lang, ScriptType scriptType, ScriptContext scriptContext) {
//native scripts are always on as they are static by definition
if (NativeScriptEngineService.NAME.equals(lang)) {
return ScriptMode.ON;
}
ScriptMode scriptMode = scriptMode... | ScriptMode function(String lang, ScriptType scriptType, ScriptContext scriptContext) { if (NativeScriptEngineService.NAME.equals(lang)) { return ScriptMode.ON; } ScriptMode scriptMode = scriptModes.get(ENGINE_SETTINGS_PREFIX + "." + lang + "." + scriptType + "." + scriptContext.getKey()); if (scriptMode == null) { thro... | /**
* Returns the script mode for a script of a certain written in a certain language,
* of a certain type and executing as part of a specific operation/api.
*
* @param lang the language that the script is written in
* @param scriptType the type of the script
* @param scriptContext the ope... | Returns the script mode for a script of a certain written in a certain language, of a certain type and executing as part of a specific operation/api | getScriptMode | {
"repo_name": "weipinghe/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/script/ScriptModes.java",
"license": "apache-2.0",
"size": 9797
} | [
"org.elasticsearch.script.ScriptService"
] | import org.elasticsearch.script.ScriptService; | import org.elasticsearch.script.*; | [
"org.elasticsearch.script"
] | org.elasticsearch.script; | 2,569,823 |
private JComboBox getStatus() {
if (status == null) {
status = new StatusComboBox();
if (state == VIEW) {
this.status.setEnabled(false);
}
}
return status;
} | JComboBox function() { if (status == null) { status = new StatusComboBox(); if (state == VIEW) { this.status.setEnabled(false); } } return status; } | /**
* This method initializes status
*
* @return javax.swing.JComboBox
*/ | This method initializes status | getStatus | {
"repo_name": "NCIP/cagrid-core",
"path": "caGrid/projects/gaards-ui/src/org/cagrid/gaards/ui/gts/TrustedAuthorityWindow.java",
"license": "bsd-3-clause",
"size": 33893
} | [
"javax.swing.JComboBox"
] | import javax.swing.JComboBox; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 1,101,876 |
if (event.isStartElement()) {
final StartElement startElement = event.asStartElement();
// All following logic requires an ID attribute, ignore any element without one
final Attribute idAttribute =
startElement.getAttributeByName(IUserLayoutManager.ID_ATTR_NAME);... | if (event.isStartElement()) { final StartElement startElement = event.asStartElement(); final Attribute idAttribute = startElement.getAttributeByName(IUserLayoutManager.ID_ATTR_NAME); if (idAttribute == null) { return null; } final String subscribeId = this.userLayoutManager.getFocusedId(); if (this.rootFolderId.equals... | /**
* Examines the current token and when appropriate creates and returns dynamically created
* content. If dynamic content is not created, return null.
*
* @param event The current event
* @return Dynamic content to inject into document, else null if no additional dynamic content
* wa... | Examines the current token and when appropriate creates and returns dynamically created content. If dynamic content is not created, return null | getAdditionalEvents | {
"repo_name": "ChristianMurphy/uPortal",
"path": "uPortal-layout/uPortal-layout-impl/src/main/java/org/apereo/portal/layout/TransientUserLayoutXMLEventReader.java",
"license": "apache-2.0",
"size": 11604
} | [
"javax.xml.stream.events.Attribute",
"javax.xml.stream.events.StartElement"
] | import javax.xml.stream.events.Attribute; import javax.xml.stream.events.StartElement; | import javax.xml.stream.events.*; | [
"javax.xml"
] | javax.xml; | 1,360,207 |
EClass getWMLMacroDefine(); | EClass getWMLMacroDefine(); | /**
* Returns the meta object for class '{@link org.wesnoth.wml.WMLMacroDefine <em>WML Macro Define</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>WML Macro Define</em>'.
* @see org.wesnoth.wml.WMLMacroDefine
* @generated
*/ | Returns the meta object for class '<code>org.wesnoth.wml.WMLMacroDefine WML Macro Define</code>'. | getWMLMacroDefine | {
"repo_name": "jstitch/wesnoth",
"path": "utils/umc_dev/org.wesnoth/src-gen/org/wesnoth/wml/WmlPackage.java",
"license": "gpl-2.0",
"size": 61552
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 541,336 |
Pair<Long, NavigableMap<String, Long>> getValidSizePerLogSegment(Long referenceTimeInMS) {
NavigableMap<String, Long> validSizePerLogSegment = new TreeMap<>(logSegmentBuckets.firstEntry().getValue());
NavigableMap<Long, NavigableMap<String, Long>> subMap =
logSegmentBuckets.subMap(logSegmentBuckets.fi... | Pair<Long, NavigableMap<String, Long>> getValidSizePerLogSegment(Long referenceTimeInMS) { NavigableMap<String, Long> validSizePerLogSegment = new TreeMap<>(logSegmentBuckets.firstEntry().getValue()); NavigableMap<Long, NavigableMap<String, Long>> subMap = logSegmentBuckets.subMap(logSegmentBuckets.firstKey(), false, r... | /**
* Given a reference time in milliseconds return the corresponding valid data size per log segment map by aggregating
* all buckets whose end time is less than or equal to the reference time.
* @param referenceTimeInMS the reference time in ms until which deletes and expiration are relevant
* @return a {... | Given a reference time in milliseconds return the corresponding valid data size per log segment map by aggregating all buckets whose end time is less than or equal to the reference time | getValidSizePerLogSegment | {
"repo_name": "xiahome/ambry",
"path": "ambry-store/src/main/java/com.github.ambry.store/ScanResults.java",
"license": "apache-2.0",
"size": 10385
} | [
"com.github.ambry.utils.Pair",
"java.util.Map",
"java.util.NavigableMap",
"java.util.TreeMap"
] | import com.github.ambry.utils.Pair; import java.util.Map; import java.util.NavigableMap; import java.util.TreeMap; | import com.github.ambry.utils.*; import java.util.*; | [
"com.github.ambry",
"java.util"
] | com.github.ambry; java.util; | 1,285,734 |
private void checkSecurityGroups(AmazonEC2Client client,
Configured configuration,
PluginExceptionConditionAccumulator accumulator,
LocalizationContext localizationContext) {
List<String> securityGroupIds = EC2InstanceTemplate.CSV_SPLITTER.splitToList(
configuration.getConfigurationValue... | void function(AmazonEC2Client client, Configured configuration, PluginExceptionConditionAccumulator accumulator, LocalizationContext localizationContext) { List<String> securityGroupIds = EC2InstanceTemplate.CSV_SPLITTER.splitToList( configuration.getConfigurationValue(SECURITY_GROUP_IDS, localizationContext)); List<Se... | /**
* Validates the actual security group permissions against the pre-defined network rules.
*
* @param client the EC2 client
* @param configuration the configuration to be validated
* @param accumulator the exception condition accumulator
* @param localizationContext the lo... | Validates the actual security group permissions against the pre-defined network rules | checkSecurityGroups | {
"repo_name": "cloudera/director-aws-plugin",
"path": "provider/src/main/java/com/cloudera/director/aws/ec2/provider/EC2NetworkValidator.java",
"license": "apache-2.0",
"size": 20460
} | [
"com.amazonaws.AmazonServiceException",
"com.amazonaws.services.ec2.AmazonEC2Client",
"com.amazonaws.services.ec2.model.DescribeSecurityGroupsRequest",
"com.amazonaws.services.ec2.model.DescribeSecurityGroupsResult",
"com.amazonaws.services.ec2.model.SecurityGroup",
"com.cloudera.director.aws.ec2.EC2Insta... | import com.amazonaws.AmazonServiceException; import com.amazonaws.services.ec2.AmazonEC2Client; import com.amazonaws.services.ec2.model.DescribeSecurityGroupsRequest; import com.amazonaws.services.ec2.model.DescribeSecurityGroupsResult; import com.amazonaws.services.ec2.model.SecurityGroup; import com.cloudera.director... | import com.amazonaws.*; import com.amazonaws.services.ec2.*; import com.amazonaws.services.ec2.model.*; import com.cloudera.director.aws.ec2.*; import com.cloudera.director.aws.network.*; import com.cloudera.director.spi.v2.model.*; import com.cloudera.director.spi.v2.model.exception.*; import com.google.common.base.*;... | [
"com.amazonaws",
"com.amazonaws.services",
"com.cloudera.director",
"com.google.common",
"java.util"
] | com.amazonaws; com.amazonaws.services; com.cloudera.director; com.google.common; java.util; | 682,779 |
public boolean renameTo(Folder folder)
throws MessagingException
{
try
{
String filename = folder.getFullName();
if (filename!=null)
{
if (!maildir.renameTo(new File(filename)))
return false;
notifyFolderRenamedListeners(folder);
return true;
... | boolean function(Folder folder) throws MessagingException { try { String filename = folder.getFullName(); if (filename!=null) { if (!maildir.renameTo(new File(filename))) return false; notifyFolderRenamedListeners(folder); return true; } else throw new MessagingException(STR); } catch (SecurityException e) { throw new ... | /**
* Renames this folder.
*/ | Renames this folder | renameTo | {
"repo_name": "imoseyon/leanKernel-d2usc-deprecated",
"path": "vendor/samsung/common/packages/apps/Email/lib_Src/mail-1.1.2/source/gnu/mail/providers/maildir/MaildirFolder.java",
"license": "gpl-2.0",
"size": 21707
} | [
"java.io.File",
"javax.mail.Folder",
"javax.mail.MessagingException"
] | import java.io.File; import javax.mail.Folder; import javax.mail.MessagingException; | import java.io.*; import javax.mail.*; | [
"java.io",
"javax.mail"
] | java.io; javax.mail; | 1,050,006 |
private double interpolateXAtY(WeightedObservedPoint[] points,
int startIdx,
int idxStep,
double y)
throws OutOfRangeException {
if (idxStep == 0) {
throw ... | double function(WeightedObservedPoint[] points, int startIdx, int idxStep, double y) throws OutOfRangeException { if (idxStep == 0) { throw new ZeroException(); } final WeightedObservedPoint[] twoPoints = getInterpolationPointsForY(points, startIdx, idxStep, y); final WeightedObservedPoint p1 = twoPoints[0]; final Weig... | /**
* Interpolates using the specified points to determine X at the
* specified Y.
*
* @param points Points to use for interpolation.
* @param startIdx Index within points from which to start the search for
* interpolation bounds points.
* @param idxStep In... | Interpolates using the specified points to determine X at the specified Y | interpolateXAtY | {
"repo_name": "tbepler/seq-svm",
"path": "src/org/apache/commons/math3/fitting/GaussianCurveFitter.java",
"license": "mit",
"size": 16894
} | [
"org.apache.commons.math3.exception.OutOfRangeException",
"org.apache.commons.math3.exception.ZeroException"
] | import org.apache.commons.math3.exception.OutOfRangeException; import org.apache.commons.math3.exception.ZeroException; | import org.apache.commons.math3.exception.*; | [
"org.apache.commons"
] | org.apache.commons; | 45,033 |
@SuppressWarnings("unchecked")
public void inject(Object object, String propertyName, Object propertyValue, String propertyType)
throws NoSuchMethodException, IllegalAccessException, InvocationTargetException
{
inject(object, propertyName, propertyValue, propertyType, false);
} | @SuppressWarnings(STR) void function(Object object, String propertyName, Object propertyValue, String propertyType) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException { inject(object, propertyName, propertyValue, propertyType, false); } | /**
* Inject a value into an object property
* @param object The object
* @param propertyName The property name
* @param propertyValue The property value
* @param propertyType The property type as a fully quilified class name
* @exception NoSuchMethodException If the property method cannot be fo... | Inject a value into an object property | inject | {
"repo_name": "lamsfoundation/lams",
"path": "3rdParty_sources/ironjacamar/org/jboss/jca/core/util/Injection.java",
"license": "gpl-2.0",
"size": 19064
} | [
"java.lang.reflect.InvocationTargetException"
] | import java.lang.reflect.InvocationTargetException; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 927,950 |
private void loadDeployedRegions() throws IOException, InterruptedException {
// From the master, get a list of all known live region servers
Collection<ServerName> regionServers = status.getServers();
errors.print("Number of live region servers: " + regionServers.size());
if (details) {
for (Se... | void function() throws IOException, InterruptedException { Collection<ServerName> regionServers = status.getServers(); errors.print(STR + regionServers.size()); if (details) { for (ServerName rsinfo: regionServers) { errors.print(" " + rsinfo.getServerName()); } } Collection<ServerName> deadRegionServers = status.getDe... | /**
* Get deployed regions according to the region servers.
*/ | Get deployed regions according to the region servers | loadDeployedRegions | {
"repo_name": "drewpope/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/util/HBaseFsck.java",
"license": "apache-2.0",
"size": 166061
} | [
"java.io.IOException",
"java.util.Collection",
"java.util.Map",
"org.apache.hadoop.hbase.ServerName",
"org.apache.hadoop.hbase.master.RegionState"
] | import java.io.IOException; import java.util.Collection; import java.util.Map; import org.apache.hadoop.hbase.ServerName; import org.apache.hadoop.hbase.master.RegionState; | import java.io.*; import java.util.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.master.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 2,262,133 |
private int doMapReduce(final FileSystem fs, final Set<Path> toCompactDirs,
final boolean compactOnce, final boolean major) throws Exception {
Configuration conf = getConf();
conf.setBoolean(CONF_COMPACT_ONCE, compactOnce);
conf.setBoolean(CONF_COMPACT_MAJOR, major);
Job job = new Job(conf);
... | int function(final FileSystem fs, final Set<Path> toCompactDirs, final boolean compactOnce, final boolean major) throws Exception { Configuration conf = getConf(); conf.setBoolean(CONF_COMPACT_ONCE, compactOnce); conf.setBoolean(CONF_COMPACT_MAJOR, major); Job job = new Job(conf); job.setJobName(STR); job.setJarByClass... | /**
* Execute compaction, using a Map-Reduce job.
*/ | Execute compaction, using a Map-Reduce job | doMapReduce | {
"repo_name": "ZhangXFeng/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/CompactionTool.java",
"license": "apache-2.0",
"size": 18333
} | [
"java.util.Set",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.hbase.mapreduce.JobUtil",
"org.apache.hadoop.hbase.mapreduce.TableMapReduceUtil",
"org.apache.hadoop.hbase.util.EnvironmentEdgeManager",
"org.apache.hadoop.mapred... | import java.util.Set; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.mapreduce.JobUtil; import org.apache.hadoop.hbase.mapreduce.TableMapReduceUtil; import org.apache.hadoop.hbase.util.EnvironmentEdgeManager; import o... | import java.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hbase.mapreduce.*; import org.apache.hadoop.hbase.util.*; import org.apache.hadoop.mapreduce.*; import org.apache.hadoop.mapreduce.lib.output.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 515,544 |
void setValues(String attributeName, List<String> value) throws ValueStorageException, InvalidValueException; | void setValues(String attributeName, List<String> value) throws ValueStorageException, InvalidValueException; | /**
* Sets value.
* The method should also takes care about creating persistent storage for values if needed.
* For instance create file for attributes if not found etc.
*
**/ | Sets value. The method should also takes care about creating persistent storage for values if needed. For instance create file for attributes if not found etc | setValues | {
"repo_name": "aljiru/che-core",
"path": "platform-api/che-core-api-project/src/main/java/org/eclipse/che/api/project/server/ValueProvider.java",
"license": "epl-1.0",
"size": 1160
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,513,169 |
public void addState(String key, State state) {
if (!states.containsKey(key)) {
states.add(key, state);
// If no state has been added yet, make it active.
if (actStateId.equals("")) {
setActiveState(key);
}
}
} | void function(String key, State state) { if (!states.containsKey(key)) { states.add(key, state); if (actStateId.equals("")) { setActiveState(key); } } } | /**
* Adds a {@link State} object into the {@link StateMachine#states} list.
*
* @param key
* The key identifier of the {@link State} to be added.
* @param state
* The {@link State} to be added.
*/ | Adds a <code>State</code> object into the <code>StateMachine#states</code> list | addState | {
"repo_name": "mzinelli/space-Lamsa",
"path": "src/com/mpu/spinv/engine/StateMachine.java",
"license": "mit",
"size": 3258
} | [
"com.mpu.spinv.engine.model.State"
] | import com.mpu.spinv.engine.model.State; | import com.mpu.spinv.engine.model.*; | [
"com.mpu.spinv"
] | com.mpu.spinv; | 927,672 |
private CollectTweaksResult collectTweaks(Node root) {
CollectTweaks pass = new CollectTweaks();
NodeTraversal.traverseEs6(compiler, root, pass);
Map<String, TweakInfo> tweakInfos = pass.allTweaks;
for (TweakInfo tweakInfo : tweakInfos.values()) {
tweakInfo.emitAllWarnings();
}
return n... | CollectTweaksResult function(Node root) { CollectTweaks pass = new CollectTweaks(); NodeTraversal.traverseEs6(compiler, root, pass); Map<String, TweakInfo> tweakInfos = pass.allTweaks; for (TweakInfo tweakInfo : tweakInfos.values()) { tweakInfo.emitAllWarnings(); } return new CollectTweaksResult(tweakInfos, pass.getOve... | /**
* Finds all calls to goog.tweak functions and emits warnings/errors if any
* of the calls have issues.
* @return A map of {@link TweakInfo} structures, keyed by tweak ID.
*/ | Finds all calls to goog.tweak functions and emits warnings/errors if any of the calls have issues | collectTweaks | {
"repo_name": "thurday/closure-compiler",
"path": "src/com/google/javascript/jscomp/ProcessTweaks.java",
"license": "apache-2.0",
"size": 19460
} | [
"com.google.javascript.jscomp.NodeTraversal",
"com.google.javascript.rhino.Node",
"java.util.ArrayList",
"java.util.HashMap",
"java.util.List",
"java.util.Map"
] | import com.google.javascript.jscomp.NodeTraversal; import com.google.javascript.rhino.Node; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; | import com.google.javascript.jscomp.*; import com.google.javascript.rhino.*; import java.util.*; | [
"com.google.javascript",
"java.util"
] | com.google.javascript; java.util; | 720,932 |
protected void startStreamViewer(InetSocketAddress addr, File keyFile) {
log.debug("Starting stream viewer with: connectAddr={} keyFile={}", addr, keyFile);
Intent intent = new Intent(this, StreamViewerActivity.class);
intent.putExtra("connectAddr", addr);
intent.putExtra("keyFile", ... | void function(InetSocketAddress addr, File keyFile) { log.debug(STR, addr, keyFile); Intent intent = new Intent(this, StreamViewerActivity.class); intent.putExtra(STR, addr); intent.putExtra(STR, keyFile); startActivity(intent); } | /**
* Starts the {@link StreamViewerActivity} to process the stream after
* the key file was chosen.
*
* @param addr The socket address.
* @param keyFile The key file.
*/ | Starts the <code>StreamViewerActivity</code> to process the stream after the key file was chosen | startStreamViewer | {
"repo_name": "niklasb/pse-broadcast-encryption",
"path": "modules/client/src/main/java/cryptocast/client/MainActivity.java",
"license": "gpl-3.0",
"size": 7886
} | [
"android.content.Intent",
"java.io.File",
"java.net.InetSocketAddress"
] | import android.content.Intent; import java.io.File; import java.net.InetSocketAddress; | import android.content.*; import java.io.*; import java.net.*; | [
"android.content",
"java.io",
"java.net"
] | android.content; java.io; java.net; | 677,884 |
if(!(message instanceof TopicMessage)) {
throw new MessageQueueInvalidMessageException();
}
super.addMessage(message);
} | if(!(message instanceof TopicMessage)) { throw new MessageQueueInvalidMessageException(); } super.addMessage(message); } | /**
* addMessage adds the given IMessage to the queue.
* <p>
* Execution falls under the monitor lock to ensure thread-safety.
* @throws MessageQueueInvalidMessageException if the provided IMessage is
* not a subclass of TopicMessage.
*/ | addMessage adds the given IMessage to the queue. Execution falls under the monitor lock to ensure thread-safety | addMessage | {
"repo_name": "aznashwan/jmqp",
"path": "jmqp/src/org/bajetii/messageserver/server/queues/TopicMessageQueue.java",
"license": "gpl-2.0",
"size": 6122
} | [
"org.bajetii.messageserver.server.messages.TopicMessage",
"org.bajetii.messageserver.server.queues.exceptions.MessageQueueInvalidMessageException"
] | import org.bajetii.messageserver.server.messages.TopicMessage; import org.bajetii.messageserver.server.queues.exceptions.MessageQueueInvalidMessageException; | import org.bajetii.messageserver.server.messages.*; import org.bajetii.messageserver.server.queues.exceptions.*; | [
"org.bajetii.messageserver"
] | org.bajetii.messageserver; | 2,761,963 |
private void setStateOfJComponents(JComponent[] comp, boolean b) {
for (JComponent aComp : comp) {
aComp.setEnabled(b);
}
} | void function(JComponent[] comp, boolean b) { for (JComponent aComp : comp) { aComp.setEnabled(b); } } | /**
* Calls the SetEnabled Method of every Component in the Array
*
* @param comp the Component Array
* @param b the State
*/ | Calls the SetEnabled Method of every Component in the Array | setStateOfJComponents | {
"repo_name": "HALive/VisualSort",
"path": "application/src/main/java/halive/visualsort/gui/VisualSortUI.java",
"license": "apache-2.0",
"size": 35975
} | [
"javax.swing.JComponent"
] | import javax.swing.JComponent; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 2,081,226 |
public InternalRunner create(Class<?> klass, Supplier<MockitoTestListener> listenerSupplier)
throws InvocationTargetException {
try {
String runnerClassName = "org.mockito.internal.runners.DefaultInternalRunner";
// Warning: I'm using String literal on purpose!
... | InternalRunner function(Class<?> klass, Supplier<MockitoTestListener> listenerSupplier) throws InvocationTargetException { try { String runnerClassName = STR; return new RunnerProvider().newInstance(runnerClassName, klass, listenerSupplier); } catch (InvocationTargetException e) { if (!hasTestMethods(klass)) { throw ne... | /**
* Creates runner implementation with provided listener supplier
*/ | Creates runner implementation with provided listener supplier | create | {
"repo_name": "mockito/mockito",
"path": "src/main/java/org/mockito/internal/runners/RunnerFactory.java",
"license": "mit",
"size": 4236
} | [
"java.lang.reflect.InvocationTargetException",
"org.mockito.exceptions.base.MockitoException",
"org.mockito.internal.junit.MockitoTestListener",
"org.mockito.internal.runners.util.RunnerProvider",
"org.mockito.internal.util.Supplier"
] | import java.lang.reflect.InvocationTargetException; import org.mockito.exceptions.base.MockitoException; import org.mockito.internal.junit.MockitoTestListener; import org.mockito.internal.runners.util.RunnerProvider; import org.mockito.internal.util.Supplier; | import java.lang.reflect.*; import org.mockito.exceptions.base.*; import org.mockito.internal.junit.*; import org.mockito.internal.runners.util.*; import org.mockito.internal.util.*; | [
"java.lang",
"org.mockito.exceptions",
"org.mockito.internal"
] | java.lang; org.mockito.exceptions; org.mockito.internal; | 1,197,065 |
public DynamicLinker createLinker() {
// Treat nulls appropriately
if(prioritizedLinkers == null) {
prioritizedLinkers = Collections.emptyList();
}
if(fallbackLinkers == null) {
fallbackLinkers = Collections.singletonList(new BeansLinker());
}
... | DynamicLinker function() { if(prioritizedLinkers == null) { prioritizedLinkers = Collections.emptyList(); } if(fallbackLinkers == null) { fallbackLinkers = Collections.singletonList(new BeansLinker()); } final Set<Class<? extends GuardingDynamicLinker>> knownLinkerClasses = new HashSet<>(); addClasses(knownLinkerClasse... | /**
* Creates a new dynamic linker consisting of all the prioritized, autodiscovered, and fallback linkers as well as
* the pre-link filter.
*
* @return the new dynamic Linker
*/ | Creates a new dynamic linker consisting of all the prioritized, autodiscovered, and fallback linkers as well as the pre-link filter | createLinker | {
"repo_name": "hazzik/nashorn",
"path": "src/jdk/internal/dynalink/DynamicLinkerFactory.java",
"license": "gpl-2.0",
"size": 16737
} | [
"java.util.ArrayList",
"java.util.Collections",
"java.util.HashSet",
"java.util.LinkedList",
"java.util.List",
"java.util.Set"
] | import java.util.ArrayList; import java.util.Collections; import java.util.HashSet; import java.util.LinkedList; import java.util.List; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,698,535 |
@Test(enabled = true, groups = { "restclienttest", "rolerest", "projectrest" })
public void createProject() throws Exception {
SslUtil.trustSelfSignedSSL();
final WifProject wifProject = new WifProject();
wifProject.setName("ProjectServiceRestIT");
wifProject.setOriginalUnits("m.k.s.");
wifProje... | @Test(enabled = true, groups = { STR, STR, STR }) void function() throws Exception { SslUtil.trustSelfSignedSSL(); final WifProject wifProject = new WifProject(); wifProject.setName(STR); wifProject.setOriginalUnits(STR); wifProject.setAnalysisOption(STR); wifProject.setUazDataStoreURI(integrationTestConfig.getUazDemoD... | /**
* Creates the project.
*
* @throws Exception
* the exception
*/ | Creates the project | createProject | {
"repo_name": "tosseto/online-whatif",
"path": "src/test/java/au/org/aurin/wif/restclient/ProjectServiceRestIT.java",
"license": "mit",
"size": 8753
} | [
"au.org.aurin.wif.io.SslUtil",
"au.org.aurin.wif.model.WifProject",
"au.org.aurin.wif.svc.WifKeys",
"java.util.HashMap",
"org.testng.Assert",
"org.testng.annotations.Test"
] | import au.org.aurin.wif.io.SslUtil; import au.org.aurin.wif.model.WifProject; import au.org.aurin.wif.svc.WifKeys; import java.util.HashMap; import org.testng.Assert; import org.testng.annotations.Test; | import au.org.aurin.wif.io.*; import au.org.aurin.wif.model.*; import au.org.aurin.wif.svc.*; import java.util.*; import org.testng.*; import org.testng.annotations.*; | [
"au.org.aurin",
"java.util",
"org.testng",
"org.testng.annotations"
] | au.org.aurin; java.util; org.testng; org.testng.annotations; | 1,971,799 |
public SipSession getSessionFor(Intent incomingCallIntent)
throws SipException {
try {
String callId = getCallId(incomingCallIntent);
ISipSession s = mSipService.getPendingSession(callId);
return ((s == null) ? null : new SipSession(s));
} catch (Remot... | SipSession function(Intent incomingCallIntent) throws SipException { try { String callId = getCallId(incomingCallIntent); ISipSession s = mSipService.getPendingSession(callId); return ((s == null) ? null : new SipSession(s)); } catch (RemoteException e) { throw new SipException(STR, e); } } | /**
* Gets the {@link SipSession} that handles the incoming call. For audio
* calls, consider to use {@link SipAudioCall} to handle the incoming call.
* See {@link #takeAudioCall}. Note that the method may be called only once
* for the same intent. For subsequent calls on the same intent, the method... | Gets the <code>SipSession</code> that handles the incoming call. For audio calls, consider to use <code>SipAudioCall</code> to handle the incoming call. See <code>#takeAudioCall</code>. Note that the method may be called only once for the same intent. For subsequent calls on the same intent, the method returns null | getSessionFor | {
"repo_name": "s20121035/rk3288_android5.1_repo",
"path": "frameworks/opt/net/voip/src/java/android/net/sip/SipManager.java",
"license": "gpl-3.0",
"size": 25361
} | [
"android.content.Intent",
"android.os.RemoteException"
] | import android.content.Intent; import android.os.RemoteException; | import android.content.*; import android.os.*; | [
"android.content",
"android.os"
] | android.content; android.os; | 1,414,250 |
Map<String, Object> getGroup(String site, String group) throws GroupNotFoundException, SiteNotFoundException; | Map<String, Object> getGroup(String site, String group) throws GroupNotFoundException, SiteNotFoundException; | /**
* Get group for given site with given name
*
* @param site site id
* @param group group name
* @return group details
*/ | Get group for given site with given name | getGroup | {
"repo_name": "sumerjabri/studio",
"path": "src/main/java/org/craftercms/studio/api/v1/service/security/SecurityService.java",
"license": "gpl-3.0",
"size": 10782
} | [
"java.util.Map",
"org.craftercms.studio.api.v1.exception.SiteNotFoundException",
"org.craftercms.studio.api.v1.exception.security.GroupNotFoundException"
] | import java.util.Map; import org.craftercms.studio.api.v1.exception.SiteNotFoundException; import org.craftercms.studio.api.v1.exception.security.GroupNotFoundException; | import java.util.*; import org.craftercms.studio.api.v1.exception.*; import org.craftercms.studio.api.v1.exception.security.*; | [
"java.util",
"org.craftercms.studio"
] | java.util; org.craftercms.studio; | 1,959,263 |
public static void keepBright(Activity activity) {
//需在setContentView前调用
int keepScreenOn = WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON;
activity.getWindow().setFlags(keepScreenOn, keepScreenOn);
} | static void function(Activity activity) { int keepScreenOn = WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON; activity.getWindow().setFlags(keepScreenOn, keepScreenOn); } | /**
* Keep bright.
*
* @param activity the activity
*/ | Keep bright | keepBright | {
"repo_name": "florent37/ViewAnimator",
"path": "sample2/src/main/java/cn/qqtheme/AnimatorSample/ScreenUtils.java",
"license": "apache-2.0",
"size": 2890
} | [
"android.app.Activity",
"android.view.WindowManager"
] | import android.app.Activity; import android.view.WindowManager; | import android.app.*; import android.view.*; | [
"android.app",
"android.view"
] | android.app; android.view; | 909,169 |
@Test
public void shouldCreateStartRepositoryWithValidButUnusableSequencerPathExpression() throws Exception {
EditableDocument doc = Schematic.newDocument();
addSequencer(doc, "seq1", TestSequencersHolder.DefaultSequencer.class.getName(), "## valid but unusable");
startRepositoryWithConf... | void function() throws Exception { EditableDocument doc = Schematic.newDocument(); addSequencer(doc, "seq1", TestSequencersHolder.DefaultSequencer.class.getName(), STR); startRepositoryWithConfiguration(doc); } | /**
* Sequencer path expressions are matching expressions, and therefore we cannot verify that they actually represent paths. So,
* even though this is an valid path expression, it won't match any real paths.
*
* @throws Exception
*/ | Sequencer path expressions are matching expressions, and therefore we cannot verify that they actually represent paths. So, even though this is an valid path expression, it won't match any real paths | shouldCreateStartRepositoryWithValidButUnusableSequencerPathExpression | {
"repo_name": "mdrillin/modeshape",
"path": "modeshape-jcr/src/test/java/org/modeshape/jcr/SequencingTest.java",
"license": "apache-2.0",
"size": 9290
} | [
"org.modeshape.schematic.Schematic",
"org.modeshape.schematic.document.EditableDocument"
] | import org.modeshape.schematic.Schematic; import org.modeshape.schematic.document.EditableDocument; | import org.modeshape.schematic.*; import org.modeshape.schematic.document.*; | [
"org.modeshape.schematic"
] | org.modeshape.schematic; | 2,375,380 |
private void startThread(ArrayList<Communication> commands, OnCompleteListener listener, boolean keepLock) {
surroundLock(commands);
surroundStartAndEnd(commands);
// TODO: Check how useful unsetting is (in EVERY case). Write a Updater, get commands work without block/lock.
// TODO:... | void function(ArrayList<Communication> commands, OnCompleteListener listener, boolean keepLock) { surroundLock(commands); surroundStartAndEnd(commands); while (blocker != null) { if(listener != null) listener.onError(STR); Log.e(STR, STR); unsetNotificationLight(null); try { Thread.sleep(1000); } catch (InterruptedExce... | /**
* Starts an executor to execute a list of commands on the prismatik server.
* @param commands List of commands.
* @param listener gets called after each command and if errors occurs.
* @param keepLock boolean indicating wether the lock should be kept until a specific condition is met (e.g. unloc... | Starts an executor to execute a list of commands on the prismatik server | startThread | {
"repo_name": "Hatzen/PrismatikRemote",
"path": "app/src/main/java/de/prismatikremote/hartz/prismatikremote/backend/Communicator.java",
"license": "gpl-3.0",
"size": 11338
} | [
"android.util.Log",
"de.prismatikremote.hartz.prismatikremote.backend.commands.Communication",
"java.util.ArrayList"
] | import android.util.Log; import de.prismatikremote.hartz.prismatikremote.backend.commands.Communication; import java.util.ArrayList; | import android.util.*; import de.prismatikremote.hartz.prismatikremote.backend.commands.*; import java.util.*; | [
"android.util",
"de.prismatikremote.hartz",
"java.util"
] | android.util; de.prismatikremote.hartz; java.util; | 802,675 |
public static Parser<LocalDateTime> ofLocalDateTime(DateTimeFormatter format) {
return new ParserOfLocalDateTime(defaultNullCheck, () -> format);
} | static Parser<LocalDateTime> function(DateTimeFormatter format) { return new ParserOfLocalDateTime(defaultNullCheck, () -> format); } | /**
* Returns a newly created Parser for LocalDateTime
* @param format the date time format
* @return newly created Parser
*/ | Returns a newly created Parser for LocalDateTime | ofLocalDateTime | {
"repo_name": "zavtech/morpheus-core",
"path": "src/main/java/com/zavtech/morpheus/util/text/parser/Parser.java",
"license": "apache-2.0",
"size": 14565
} | [
"java.time.LocalDateTime",
"java.time.format.DateTimeFormatter"
] | import java.time.LocalDateTime; import java.time.format.DateTimeFormatter; | import java.time.*; import java.time.format.*; | [
"java.time"
] | java.time; | 1,304,177 |
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<BlockBlobsStageBlockResponse> stageBlockWithResponseAsync(
String containerName,
String blob,
String blockId,
long contentLength,
Flux<ByteBuffer> body,
byte[] transactionalContentMD5,... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<BlockBlobsStageBlockResponse> function( String containerName, String blob, String blockId, long contentLength, Flux<ByteBuffer> body, byte[] transactionalContentMD5, byte[] transactionalContentCrc64, Integer timeout, String leaseId, String requestId, CpkInfo cpkInfo, Enc... | /**
* The Stage Block operation creates a new block to be committed as part of a blob.
*
* @param containerName The container name.
* @param blob The blob name.
* @param blockId A valid Base64 string value that identifies the block. Prior to encoding, the string must be less
* than or ... | The Stage Block operation creates a new block to be committed as part of a blob | stageBlockWithResponseAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/BlockBlobsImpl.java",
"license": "mit",
"size": 56937
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.util.Base64Util",
"com.azure.core.util.Context",
"com.azure.storage.blob.implementation.models.BlockBlobsStageBlockResponse",
"com.azure.storage.blob.implementation.models.EncryptionScope",
"com.azure.stor... | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.util.Base64Util; import com.azure.core.util.Context; import com.azure.storage.blob.implementation.models.BlockBlobsStageBlockResponse; import com.azure.storage.blob.implementation.models.EncryptionScope; i... | import com.azure.core.annotation.*; import com.azure.core.util.*; import com.azure.storage.blob.implementation.models.*; import com.azure.storage.blob.models.*; import java.nio.*; | [
"com.azure.core",
"com.azure.storage",
"java.nio"
] | com.azure.core; com.azure.storage; java.nio; | 1,374,009 |
protected static Integer registerWakeLock(TracingWakeLock wakeLock) {
// Get a new wake lock ID
Integer tmpWakeLockId = sWakeLockSeq.getAndIncrement();
// Store the wake lock in the registry
sWakeLocks.put(tmpWakeLockId, wakeLock);
return tmpWakeLockId;
} | static Integer function(TracingWakeLock wakeLock) { Integer tmpWakeLockId = sWakeLockSeq.getAndIncrement(); sWakeLocks.put(tmpWakeLockId, wakeLock); return tmpWakeLockId; } | /**
* Registers a wake lock with the wake lock registry.
*
* @param wakeLock
* The {@link TracingWakeLock} instance that should be registered with the wake lock
* registry. Never {@code null}.
*
* @return The ID that identifies this wake lock in the registry.
*/ | Registers a wake lock with the wake lock registry | registerWakeLock | {
"repo_name": "1037704496/ZywxEmail",
"path": "src/com/fsck/zywxMailk9/service/CoreService.java",
"license": "bsd-3-clause",
"size": 16827
} | [
"com.fsck.zywxMailk9.helper.power.TracingPowerManager"
] | import com.fsck.zywxMailk9.helper.power.TracingPowerManager; | import com.fsck.*; | [
"com.fsck"
] | com.fsck; | 160,457 |
private void updateScores(Element element, Operation operation){
for (Scorer<Element> scorer :
elementScorers) {
assert this.currentScores.containsKey(scorer.getScoreLabel());
int currentScore = this.currentScores.get(scorer.getScoreLabel())... | void function(Element element, Operation operation){ for (Scorer<Element> scorer : elementScorers) { assert this.currentScores.containsKey(scorer.getScoreLabel()); int currentScore = this.currentScores.get(scorer.getScoreLabel()); int elementScore = scorer.score(element); int newScore; switch (operation){ case HEAD: ne... | /**
* Apply each member of {@link #elementScorers} to the specified element
* @param element the element to score
* @param operation at the top level, the type of operation being performed by this visitor
*/ | Apply each member of <code>#elementScorers</code> to the specified element | updateScores | {
"repo_name": "grayben/10K-item-extractor",
"path": "src/main/java/com/grayben/riskExtractor/htmlScorer/ScoringAndFlatteningNodeVisitor.java",
"license": "mit",
"size": 6404
} | [
"com.grayben.riskExtractor.htmlScorer.partScorers.Scorer",
"org.jsoup.nodes.Element"
] | import com.grayben.riskExtractor.htmlScorer.partScorers.Scorer; import org.jsoup.nodes.Element; | import com.grayben.*; import org.jsoup.nodes.*; | [
"com.grayben",
"org.jsoup.nodes"
] | com.grayben; org.jsoup.nodes; | 2,105,561 |
protected void buildLargeProjectDescriptor() {
org.eclipse.persistence.descriptors.RelationalDescriptor descriptor =
new org.eclipse.persistence.descriptors.RelationalDescriptor();
// SECTION: DESCRIPTOR
descriptor.setJavaClass(org.eclipse.persistence.testing.models.empl... | void function() { org.eclipse.persistence.descriptors.RelationalDescriptor descriptor = new org.eclipse.persistence.descriptors.RelationalDescriptor(); descriptor.setJavaClass(org.eclipse.persistence.testing.models.employee.domain.LargeProject.class); Vector vector = new Vector(); vector.addElement(STR); descriptor.set... | /**
* TopLink generated method.
* <b>WARNING</b>: This code was generated by an automated tool.
* Any changes will be lost when the code is re-generated
*/ | TopLink generated method. WARNING: This code was generated by an automated tool. Any changes will be lost when the code is re-generated | buildLargeProjectDescriptor | {
"repo_name": "bfg-repo-cleaner-demos/eclipselink.runtime-bfg-strip-big-blobs",
"path": "foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/sessionbroker/EmployeeProject2.java",
"license": "epl-1.0",
"size": 15801
} | [
"java.util.Vector",
"org.eclipse.persistence.descriptors.RelationalDescriptor"
] | import java.util.Vector; import org.eclipse.persistence.descriptors.RelationalDescriptor; | import java.util.*; import org.eclipse.persistence.descriptors.*; | [
"java.util",
"org.eclipse.persistence"
] | java.util; org.eclipse.persistence; | 1,100,360 |
@Test(expectedExceptions = { LDAPException.class })
public void testDecodeValueNotSequence()
throws Exception
{
new ConsumeSingleUseTokenExtendedRequest(new ExtendedRequest(
"1.3.6.1.4.1.30221.2.6.51", new ASN1OctetString("not a sequence")));
} | @Test(expectedExceptions = { LDAPException.class }) void function() throws Exception { new ConsumeSingleUseTokenExtendedRequest(new ExtendedRequest( STR, new ASN1OctetString(STR))); } | /**
* Tests the behavior when trying to decode an extended request with a
* value that cannot be decoded as an ASN.1 sequence.
*
* @throws Exception If an unexpected problem occurs.
*/ | Tests the behavior when trying to decode an extended request with a value that cannot be decoded as an ASN.1 sequence | testDecodeValueNotSequence | {
"repo_name": "UnboundID/ldapsdk",
"path": "tests/unit/src/com/unboundid/ldap/sdk/unboundidds/extensions/ConsumeSingleUseTokenExtendedRequestTestCase.java",
"license": "gpl-2.0",
"size": 4930
} | [
"com.unboundid.asn1.ASN1OctetString",
"com.unboundid.ldap.sdk.ExtendedRequest",
"com.unboundid.ldap.sdk.LDAPException",
"org.testng.annotations.Test"
] | import com.unboundid.asn1.ASN1OctetString; import com.unboundid.ldap.sdk.ExtendedRequest; import com.unboundid.ldap.sdk.LDAPException; import org.testng.annotations.Test; | import com.unboundid.asn1.*; import com.unboundid.ldap.sdk.*; import org.testng.annotations.*; | [
"com.unboundid.asn1",
"com.unboundid.ldap",
"org.testng.annotations"
] | com.unboundid.asn1; com.unboundid.ldap; org.testng.annotations; | 821,884 |
private void registerListenerService(final ComponentName name, final int userid) {
checkCallerIsSystem();
if (DBG) Slog.v(TAG, "registerListenerService: " + name + " u=" + userid);
synchronized (mNotificationList) {
final String servicesBindingTag = name.toString() + "/" + user... | void function(final ComponentName name, final int userid) { checkCallerIsSystem(); if (DBG) Slog.v(TAG, STR + name + STR + userid); synchronized (mNotificationList) { final String servicesBindingTag = name.toString() + "/" + userid; if (mServicesBinding.contains(servicesBindingTag)) { return; } mServicesBinding.add(ser... | /**
* Version of registerListener that takes the name of a
* {@link android.service.notification.NotificationListenerService} to bind to.
*
* This is the mechanism by which third parties may subscribe to notifications.
*/ | Version of registerListener that takes the name of a <code>android.service.notification.NotificationListenerService</code> to bind to. This is the mechanism by which third parties may subscribe to notifications | registerListenerService | {
"repo_name": "indashnet/InDashNet.Open.UN2000",
"path": "android/frameworks/base/services/java/com/android/server/NotificationManagerService.java",
"license": "apache-2.0",
"size": 99025
} | [
"android.app.PendingIntent",
"android.content.ComponentName",
"android.content.Intent",
"android.provider.Settings",
"android.service.notification.NotificationListenerService",
"android.util.Slog"
] | import android.app.PendingIntent; import android.content.ComponentName; import android.content.Intent; import android.provider.Settings; import android.service.notification.NotificationListenerService; import android.util.Slog; | import android.app.*; import android.content.*; import android.provider.*; import android.service.notification.*; import android.util.*; | [
"android.app",
"android.content",
"android.provider",
"android.service",
"android.util"
] | android.app; android.content; android.provider; android.service; android.util; | 184,051 |
EList<ComponentInstance> getComponentInstances(); | EList<ComponentInstance> getComponentInstances(); | /**
* Returns the value of the '<em><b>Component Instances</b></em>' containment reference list.
* The list contents are of type {@link analysismetamodel.ComponentInstance}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Component Instances</em>' containment reference list isn't clear,
* there... | Returns the value of the 'Component Instances' containment reference list. The list contents are of type <code>analysismetamodel.ComponentInstance</code>. If the meaning of the 'Component Instances' containment reference list isn't clear, there really should be more of a description here... | getComponentInstances | {
"repo_name": "CodePhill/DEECo-Timing-Analysis",
"path": "src/cz.cuni.mff.d3s.jdeeco.analysis.metamodel/src-gen/analysismetamodel/Model.java",
"license": "mit",
"size": 6694
} | [
"org.eclipse.emf.common.util.EList"
] | import org.eclipse.emf.common.util.EList; | import org.eclipse.emf.common.util.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 252,093 |
boolean forceServicePropagation(PerunSession perunSession, Service service) throws ServiceNotExistsException, InternalErrorException, PrivilegeException; | boolean forceServicePropagation(PerunSession perunSession, Service service) throws ServiceNotExistsException, InternalErrorException, PrivilegeException; | /**
* Forces service propagation on all facilities where the service is defined on.
*
* @param perunSession
* @param service
* @return true if it is possible, false if not
*
* @throws ServiceNotExistsException
* @throws InternalErrorException
* @throws PrivilegeException
*/ | Forces service propagation on all facilities where the service is defined on | forceServicePropagation | {
"repo_name": "dsarman/perun",
"path": "perun-controller/src/main/java/cz/metacentrum/perun/controller/service/GeneralServiceManager.java",
"license": "bsd-2-clause",
"size": 13122
} | [
"cz.metacentrum.perun.core.api.PerunSession",
"cz.metacentrum.perun.core.api.Service",
"cz.metacentrum.perun.core.api.exceptions.InternalErrorException",
"cz.metacentrum.perun.core.api.exceptions.PrivilegeException",
"cz.metacentrum.perun.core.api.exceptions.ServiceNotExistsException"
] | import cz.metacentrum.perun.core.api.PerunSession; import cz.metacentrum.perun.core.api.Service; import cz.metacentrum.perun.core.api.exceptions.InternalErrorException; import cz.metacentrum.perun.core.api.exceptions.PrivilegeException; import cz.metacentrum.perun.core.api.exceptions.ServiceNotExistsException; | import cz.metacentrum.perun.core.api.*; import cz.metacentrum.perun.core.api.exceptions.*; | [
"cz.metacentrum.perun"
] | cz.metacentrum.perun; | 1,906,965 |
public OHLC[] getHistoricalData(Contract contract, Date endDate, int numPeriods, PeriodUnit periodUnit) throws IOException;
//public OHLC[] getHistoricalData(String symbol, Date startDate, Date endDate, int period) throws IOException; | OHLC[] function(Contract contract, Date endDate, int numPeriods, PeriodUnit periodUnit) throws IOException; | /**
* Retrieves historical prices for the given symbol over the given number
* of periods prior to the given start date.
*
* @param contract symbol for which to retrieve historical price data.
* @param endDate date of the last period for which to retrieve price data.
* @param numPeriods number of periods b... | Retrieves historical prices for the given symbol over the given number of periods prior to the given start date | getHistoricalData | {
"repo_name": "amage/amnesia",
"path": "src/main/java/org/playstat/amnesia/HistoricalDataSource.java",
"license": "apache-2.0",
"size": 1856
} | [
"java.io.IOException",
"java.util.Date"
] | import java.io.IOException; import java.util.Date; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,827,665 |
public void setEthnicity(final ClientEthnicityEnum ethnicity) {
this.ethnicity = ethnicity;
} | void function(final ClientEthnicityEnum ethnicity) { this.ethnicity = ethnicity; } | /**
* Set the value related to the column: ethnicity.
* @param ethnicity the ethnicity value you wish to set
*/ | Set the value related to the column: ethnicity | setEthnicity | {
"repo_name": "servinglynk/servinglynk-hmis",
"path": "base-model/src/main/java/com/servinglynk/hmis/warehouse/model/base/Client.java",
"license": "mpl-2.0",
"size": 23726
} | [
"com.servinglynk.hmis.warehouse.enums.ClientEthnicityEnum"
] | import com.servinglynk.hmis.warehouse.enums.ClientEthnicityEnum; | import com.servinglynk.hmis.warehouse.enums.*; | [
"com.servinglynk.hmis"
] | com.servinglynk.hmis; | 2,633,757 |
@Named("health_monitor:delete")
@DELETE
@Path("/health_monitors/{id}")
@Fallback(FalseOnNotFoundOr404.class)
boolean deleteHealthMonitor(@PathParam("id") String id); | @Named(STR) @Path(STR) @Fallback(FalseOnNotFoundOr404.class) boolean deleteHealthMonitor(@PathParam("id") String id); | /**
* Deletes the specified Health Monitor.
*
* @param id the id of the Health Monitor to delete.
* @return true if delete successful, false if not.
*/ | Deletes the specified Health Monitor | deleteHealthMonitor | {
"repo_name": "asankasanjaya/stratos",
"path": "dependencies/jclouds/apis/openstack-neutron/1.8.1-stratos/src/main/java/org/jclouds/openstack/neutron/v2/extensions/lbaas/v1/LBaaSApi.java",
"license": "apache-2.0",
"size": 14416
} | [
"javax.inject.Named",
"javax.ws.rs.Path",
"javax.ws.rs.PathParam",
"org.jclouds.Fallbacks",
"org.jclouds.rest.annotations.Fallback"
] | import javax.inject.Named; import javax.ws.rs.Path; import javax.ws.rs.PathParam; import org.jclouds.Fallbacks; import org.jclouds.rest.annotations.Fallback; | import javax.inject.*; import javax.ws.rs.*; import org.jclouds.*; import org.jclouds.rest.annotations.*; | [
"javax.inject",
"javax.ws",
"org.jclouds",
"org.jclouds.rest"
] | javax.inject; javax.ws; org.jclouds; org.jclouds.rest; | 2,603,917 |
public JsonElement getLowWatermark() {
if (!contains(ConfigurationKeys.WATERMARK_INTERVAL_VALUE_KEY)) {
return null;
}
return JSON_PARSER.parse(getProp(ConfigurationKeys.WATERMARK_INTERVAL_VALUE_KEY)).getAsJsonObject()
.get(WatermarkInterval.LOW_WATERMARK_TO_JSON_KEY);
} | JsonElement function() { if (!contains(ConfigurationKeys.WATERMARK_INTERVAL_VALUE_KEY)) { return null; } return JSON_PARSER.parse(getProp(ConfigurationKeys.WATERMARK_INTERVAL_VALUE_KEY)).getAsJsonObject() .get(WatermarkInterval.LOW_WATERMARK_TO_JSON_KEY); } | /**
* Get the low {@link Watermark} as a {@link JsonElement}.
*
* @return a {@link JsonElement} representing the low {@link Watermark} or
* {@code null} if the low {@link Watermark} is not set.
*/ | Get the low <code>Watermark</code> as a <code>JsonElement</code> | getLowWatermark | {
"repo_name": "sahooamit/bigdata",
"path": "gobblin-api/src/main/java/gobblin/source/workunit/WorkUnit.java",
"license": "apache-2.0",
"size": 8485
} | [
"com.google.gson.JsonElement"
] | import com.google.gson.JsonElement; | import com.google.gson.*; | [
"com.google.gson"
] | com.google.gson; | 777,820 |
public static float[] tubeProjection(float[] positions, BoundingTube bt) {
float[] uvCoordinates = new float[positions.length / 3 * 2];
Vector3f v = new Vector3f();
float cx = bt.getCenter().x, cz = bt.getCenter().z;
Vector3f uBase = new Vector3f(0, 0, -1);
float vBase = bt.... | static float[] function(float[] positions, BoundingTube bt) { float[] uvCoordinates = new float[positions.length / 3 * 2]; Vector3f v = new Vector3f(); float cx = bt.getCenter().x, cz = bt.getCenter().z; Vector3f uBase = new Vector3f(0, 0, -1); float vBase = bt.getCenter().y - bt.getHeight() * 0.5f; for (int i = 0, j =... | /**
* Tube projection for 2D textures.
*
* @param positions
* points to be projected
* @param bt
* the bounding tube for projecting
* @return UV coordinates after the projection
*/ | Tube projection for 2D textures | tubeProjection | {
"repo_name": "PlanetWaves/clockworkengine",
"path": "trunk/jme3-blender/src/main/java/com/jme3/scene/plugins/blender/textures/UVProjectionGenerator.java",
"license": "apache-2.0",
"size": 11074
} | [
"com.jme3.math.FastMath",
"com.jme3.math.Triangle",
"com.jme3.math.Vector3f",
"com.jme3.scene.plugins.blender.textures.UVCoordinatesGenerator"
] | import com.jme3.math.FastMath; import com.jme3.math.Triangle; import com.jme3.math.Vector3f; import com.jme3.scene.plugins.blender.textures.UVCoordinatesGenerator; | import com.jme3.math.*; import com.jme3.scene.plugins.blender.textures.*; | [
"com.jme3.math",
"com.jme3.scene"
] | com.jme3.math; com.jme3.scene; | 1,487,298 |
listenerList.add(ChangeListener.class, l);
}
| listenerList.add(ChangeListener.class, l); } | /**
* Adds a <code>ChangeListener</code> to this tabbedpane.
*
* @param l the <code>ChangeListener</code> to add
* @see #fireStateChanged
* @see #removeChangeListener
*/ | Adds a <code>ChangeListener</code> to this tabbedpane | addChangeListener | {
"repo_name": "Creativa3d/box3d",
"path": "paquetesGUIx/src/utilesGUIx/tabPane/JTabPaneCZ.java",
"license": "gpl-2.0",
"size": 11878
} | [
"javax.swing.event.ChangeListener"
] | import javax.swing.event.ChangeListener; | import javax.swing.event.*; | [
"javax.swing"
] | javax.swing; | 2,846,962 |
public List<SecurityRuleInner> securityRules() {
return this.securityRules;
} | List<SecurityRuleInner> function() { return this.securityRules; } | /**
* Get collection of custom security rules.
*
* @return the securityRules value
*/ | Get collection of custom security rules | securityRules | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/network/v2019_06_01/NetworkInterfaceAssociation.java",
"license": "mit",
"size": 1572
} | [
"com.microsoft.azure.management.network.v2019_06_01.implementation.SecurityRuleInner",
"java.util.List"
] | import com.microsoft.azure.management.network.v2019_06_01.implementation.SecurityRuleInner; import java.util.List; | import com.microsoft.azure.management.network.v2019_06_01.implementation.*; import java.util.*; | [
"com.microsoft.azure",
"java.util"
] | com.microsoft.azure; java.util; | 2,449,379 |
public TeamMemberDetail get(Integer teamMemberDetailId) {
logger.debug("get - START ");
TeamMemberDetail teamMemberDetail = (TeamMemberDetail)getHibernateTemplate().get(IModelConstant.teamMemberDetailEntity, teamMemberDetailId);
logger.debug("get - END ");
return teamMemberDetail;
}
| TeamMemberDetail function(Integer teamMemberDetailId) { logger.debug(STR); TeamMemberDetail teamMemberDetail = (TeamMemberDetail)getHibernateTemplate().get(IModelConstant.teamMemberDetailEntity, teamMemberDetailId); logger.debug(STR); return teamMemberDetail; } | /**
* Returns a TeamMemerDetail entity for the corresponding teamMemberDetailId
*
* @author Adelina
*
* @param teamMemberDetailId
* @return
*/ | Returns a TeamMemerDetail entity for the corresponding teamMemberDetailId | get | {
"repo_name": "CodeSphere/termitaria",
"path": "TermitariaTS/src/ro/cs/ts/model/dao/impl/DaoPersonDetailImpl.java",
"license": "agpl-3.0",
"size": 6199
} | [
"ro.cs.ts.common.IModelConstant",
"ro.cs.ts.entity.TeamMemberDetail"
] | import ro.cs.ts.common.IModelConstant; import ro.cs.ts.entity.TeamMemberDetail; | import ro.cs.ts.common.*; import ro.cs.ts.entity.*; | [
"ro.cs.ts"
] | ro.cs.ts; | 2,252,142 |
ImmutableSet<Path> getFilesUnderPath(
Path pathRelativeToProjectRoot, Predicate<Path> filter, EnumSet<FileVisitOption> visitOptions)
throws IOException; | ImmutableSet<Path> getFilesUnderPath( Path pathRelativeToProjectRoot, Predicate<Path> filter, EnumSet<FileVisitOption> visitOptions) throws IOException; | /**
* Returns a list of files under the given path relative to the root of this view, filtered both
* blacklist and the given filter. The returned paths are also relative to the root of this view.
*/ | Returns a list of files under the given path relative to the root of this view, filtered both blacklist and the given filter. The returned paths are also relative to the root of this view | getFilesUnderPath | {
"repo_name": "Addepar/buck",
"path": "src/com/facebook/buck/io/filesystem/ProjectFilesystemView.java",
"license": "apache-2.0",
"size": 5300
} | [
"com.google.common.base.Predicate",
"com.google.common.collect.ImmutableSet",
"java.io.IOException",
"java.nio.file.FileVisitOption",
"java.nio.file.Path",
"java.util.EnumSet"
] | import com.google.common.base.Predicate; import com.google.common.collect.ImmutableSet; import java.io.IOException; import java.nio.file.FileVisitOption; import java.nio.file.Path; import java.util.EnumSet; | import com.google.common.base.*; import com.google.common.collect.*; import java.io.*; import java.nio.file.*; import java.util.*; | [
"com.google.common",
"java.io",
"java.nio",
"java.util"
] | com.google.common; java.io; java.nio; java.util; | 156,354 |
private void startNewTask(TaskInProgress tip) {
try {
localizeJob(tip);
} catch (Throwable e) {
String msg = ("Error initializing " + tip.getTask().getTaskID() +
":\n" + StringUtils.stringifyException(e));
LOG.warn(msg);
tip.reportDiagnosticInfo(msg);
try {
... | void function(TaskInProgress tip) { try { localizeJob(tip); } catch (Throwable e) { String msg = (STR + tip.getTask().getTaskID() + ":\n" + StringUtils.stringifyException(e)); LOG.warn(msg); tip.reportDiagnosticInfo(msg); try { tip.kill(true); tip.cleanup(true); } catch (IOException ie2) { LOG.info(STR + tip.getTask().... | /**
* Start a new task.
* All exceptions are handled locally, so that we don't mess up the
* task tracker.
*/ | Start a new task. All exceptions are handled locally, so that we don't mess up the task tracker | startNewTask | {
"repo_name": "koichi626/hadoop-gpu",
"path": "hadoop-gpu-0.20.1/src/mapred/org/apache/hadoop/mapred/TaskTracker.java",
"license": "apache-2.0",
"size": 118099
} | [
"java.io.IOException",
"org.apache.hadoop.util.StringUtils"
] | import java.io.IOException; import org.apache.hadoop.util.StringUtils; | import java.io.*; import org.apache.hadoop.util.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 774,184 |
public void getPixels(byte[] dst, Rectangle bounds, ImageIndex imageIndex)
{
if(dst == null)
throw new IllegalArgumentException("dst cannot be null.");
if(bounds == null)
throw new IllegalArgumentException("bounds cannot be null.");
if(imageIndex == null)
throw new IllegalArgumentException("imageIn... | void function(byte[] dst, Rectangle bounds, ImageIndex imageIndex) { if(dst == null) throw new IllegalArgumentException(STR); if(bounds == null) throw new IllegalArgumentException(STR); if(imageIndex == null) throw new IllegalArgumentException(STR); if(!imageIndex.isValid(this)) throw new IllegalArgumentException(STR);... | /**
* Reads pixels from specified region.
*
* If the pixels are in RGB format, the layout of pixels in returned data is always RGBRGB...
*
* @param dst Preallocated buffer where the pixels will be stored.
* @param bounds The bounds of region from which the pixels will be read.
* @param resIndex T... | Reads pixels from specified region. If the pixels are in RGB format, the layout of pixels in returned data is always RGBRGB.. | getPixels | {
"repo_name": "Strachu/VirtualSlideViewer",
"path": "src/virtualslideviewer/core/VirtualSlideImage.java",
"license": "gpl-3.0",
"size": 7107
} | [
"java.awt.Dimension",
"java.awt.Rectangle"
] | import java.awt.Dimension; import java.awt.Rectangle; | import java.awt.*; | [
"java.awt"
] | java.awt; | 252,565 |
public synchronized List<Throwable> getCauses() {
return causes;
} | synchronized List<Throwable> function() { return causes; } | /**
* Returns the list of causes of this AggregateException
* @return list of causes
*/ | Returns the list of causes of this AggregateException | getCauses | {
"repo_name": "lpellegr/programming",
"path": "programming-util/src/main/java/org/objectweb/proactive/utils/AggregateException.java",
"license": "agpl-3.0",
"size": 6338
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,089,248 |
public void setReportTermTo(Calendar reportTermTo)
{
this.reportTermTo = reportTermTo;
}
| void function(Calendar reportTermTo) { this.reportTermTo = reportTermTo; } | /**
* set ReportTermTo of reportData
* @param reportTermTo
*/ | set ReportTermTo of reportData | setReportTermTo | {
"repo_name": "ryokato/ENdoSnipe",
"path": "ENdoSnipeReportCommand/src/main/java/jp/co/acroquest/endosnipe/report/ReportData.java",
"license": "mit",
"size": 3638
} | [
"java.util.Calendar"
] | import java.util.Calendar; | import java.util.*; | [
"java.util"
] | java.util; | 2,660,904 |
public List<ScalingHostPoolReference> hostPoolReferences() {
return this.innerProperties() == null ? null : this.innerProperties().hostPoolReferences();
} | List<ScalingHostPoolReference> function() { return this.innerProperties() == null ? null : this.innerProperties().hostPoolReferences(); } | /**
* Get the hostPoolReferences property: List of ScalingHostPoolReference definitions.
*
* @return the hostPoolReferences value.
*/ | Get the hostPoolReferences property: List of ScalingHostPoolReference definitions | hostPoolReferences | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/desktopvirtualization/azure-resourcemanager-desktopvirtualization/src/main/java/com/azure/resourcemanager/desktopvirtualization/fluent/models/ScalingPlanInner.java",
"license": "mit",
"size": 9386
} | [
"com.azure.resourcemanager.desktopvirtualization.models.ScalingHostPoolReference",
"java.util.List"
] | import com.azure.resourcemanager.desktopvirtualization.models.ScalingHostPoolReference; import java.util.List; | import com.azure.resourcemanager.desktopvirtualization.models.*; import java.util.*; | [
"com.azure.resourcemanager",
"java.util"
] | com.azure.resourcemanager; java.util; | 2,418,835 |
@Override
public Adapter createBTSTranslationsAdapter() {
if (btsTranslationsItemProvider == null) {
btsTranslationsItemProvider = new BTSTranslationsItemProvider(this);
}
return btsTranslationsItemProvider;
}
protected BTSConfigItemItemProvider btsConfigItemItemProvider;
| Adapter function() { if (btsTranslationsItemProvider == null) { btsTranslationsItemProvider = new BTSTranslationsItemProvider(this); } return btsTranslationsItemProvider; } protected BTSConfigItemItemProvider btsConfigItemItemProvider; | /**
* This creates an adapter for a {@link org.bbaw.bts.btsmodel.BTSTranslations}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This creates an adapter for a <code>org.bbaw.bts.btsmodel.BTSTranslations</code>. | createBTSTranslationsAdapter | {
"repo_name": "JKatzwinkel/bts",
"path": "org.bbaw.bts.model.edit/src/org/bbaw/bts/btsmodel/provider/BtsmodelItemProviderAdapterFactory.java",
"license": "lgpl-3.0",
"size": 27124
} | [
"org.eclipse.emf.common.notify.Adapter"
] | import org.eclipse.emf.common.notify.Adapter; | import org.eclipse.emf.common.notify.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,644,568 |
public List getFeedback()
{
List<?> messages = new ArrayList();
for ( ValueSource vs : valueSources )
{
List feedback = vs.getFeedback();
if ( feedback != null && !feedback.isEmpty() )
{
messages.addAll( feedback );
... | List function() { List<?> messages = new ArrayList(); for ( ValueSource vs : valueSources ) { List feedback = vs.getFeedback(); if ( feedback != null && !feedback.isEmpty() ) { messages.addAll( feedback ); } } return messages; } | /**
* Return any feedback messages and errors that were generated - but
* suppressed - during the interpolation process. Since unresolvable
* expressions will be left in the source string as-is, this feedback is
* optional, and will only be useful for debugging interpolation problems.
*
... | Return any feedback messages and errors that were generated - but suppressed - during the interpolation process. Since unresolvable expressions will be left in the source string as-is, this feedback is optional, and will only be useful for debugging interpolation problems | getFeedback | {
"repo_name": "mojohaus/flatten-maven-plugin",
"path": "src/main/java/org/codehaus/mojo/flatten/cifriendly/CiInterpolatorImpl.java",
"license": "apache-2.0",
"size": 11970
} | [
"java.util.ArrayList",
"java.util.List",
"org.codehaus.plexus.interpolation.ValueSource"
] | import java.util.ArrayList; import java.util.List; import org.codehaus.plexus.interpolation.ValueSource; | import java.util.*; import org.codehaus.plexus.interpolation.*; | [
"java.util",
"org.codehaus.plexus"
] | java.util; org.codehaus.plexus; | 1,950,379 |
protected void sequence_nTwFAM2Sh6(EObject context, nTwFAM2Sh6 semanticObject) {
if(errorAcceptor != null) {
if(transientValues.isValueTransient(semanticObject, FasttwrPackage.Literals.NTW_FAM2_SH6__VALUE) == ValueTransient.YES)
errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObjec... | void function(EObject context, nTwFAM2Sh6 semanticObject) { if(errorAcceptor != null) { if(transientValues.isValueTransient(semanticObject, FasttwrPackage.Literals.NTW_FAM2_SH6__VALUE) == ValueTransient.YES) errorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, FasttwrPackage.Literals.NTW_FA... | /**
* Constraint:
* (value=tNUMBER name='TwFAM2Sh(6)')
*/ | Constraint: (value=tNUMBER name='TwFAM2Sh(6)') | sequence_nTwFAM2Sh6 | {
"repo_name": "cooked/NDT",
"path": "sc.ndt.editor.fast.twr/src-gen/sc/ndt/editor/fast/serializer/FasttwrSemanticSequencer.java",
"license": "gpl-3.0",
"size": 49546
} | [
"org.eclipse.emf.ecore.EObject",
"org.eclipse.xtext.serializer.acceptor.SequenceFeeder",
"org.eclipse.xtext.serializer.sequencer.ISemanticNodeProvider",
"org.eclipse.xtext.serializer.sequencer.ITransientValueService",
"sc.ndt.editor.fast.fasttwr.FasttwrPackage"
] | import org.eclipse.emf.ecore.EObject; import org.eclipse.xtext.serializer.acceptor.SequenceFeeder; import org.eclipse.xtext.serializer.sequencer.ISemanticNodeProvider; import org.eclipse.xtext.serializer.sequencer.ITransientValueService; import sc.ndt.editor.fast.fasttwr.FasttwrPackage; | import org.eclipse.emf.ecore.*; import org.eclipse.xtext.serializer.acceptor.*; import org.eclipse.xtext.serializer.sequencer.*; import sc.ndt.editor.fast.fasttwr.*; | [
"org.eclipse.emf",
"org.eclipse.xtext",
"sc.ndt.editor"
] | org.eclipse.emf; org.eclipse.xtext; sc.ndt.editor; | 128,593 |
public void removeDevice(Ip4Address routerId) {
String key = "device:" + routerId;
this.deviceInformationMap.remove(key);
} | void function(Ip4Address routerId) { String key = STR + routerId; this.deviceInformationMap.remove(key); } | /**
* Removes Device from DeviceInformationMap.
*
* @param routerId router id
*/ | Removes Device from DeviceInformationMap | removeDevice | {
"repo_name": "sonu283304/onos",
"path": "protocols/ospf/ctl/src/main/java/org/onosproject/ospf/controller/impl/TopologyForDeviceAndLinkImpl.java",
"license": "apache-2.0",
"size": 26464
} | [
"org.onlab.packet.Ip4Address"
] | import org.onlab.packet.Ip4Address; | import org.onlab.packet.*; | [
"org.onlab.packet"
] | org.onlab.packet; | 65,303 |
try (SignalSessionLock.Lock unused = ReentrantSessionLock.INSTANCE.acquire()) {
ApplicationDependencies.getProtocolStore().aci().senderKeys().deleteAllFor(Recipient.self().requireServiceId(), distributionId);
SignalDatabase.senderKeyShared().deleteAllFor(distributionId);
}
} | try (SignalSessionLock.Lock unused = ReentrantSessionLock.INSTANCE.acquire()) { ApplicationDependencies.getProtocolStore().aci().senderKeys().deleteAllFor(Recipient.self().requireServiceId(), distributionId); SignalDatabase.senderKeyShared().deleteAllFor(distributionId); } } | /**
* Clears the state for a sender key session we created. It will naturally get re-created when it is next needed, rotating the key.
*/ | Clears the state for a sender key session we created. It will naturally get re-created when it is next needed, rotating the key | rotateOurKey | {
"repo_name": "AsamK/TextSecure",
"path": "app/src/main/java/org/thoughtcrime/securesms/crypto/SenderKeyUtil.java",
"license": "gpl-3.0",
"size": 2138
} | [
"org.thoughtcrime.securesms.database.SignalDatabase",
"org.thoughtcrime.securesms.dependencies.ApplicationDependencies",
"org.thoughtcrime.securesms.recipients.Recipient",
"org.whispersystems.signalservice.api.SignalSessionLock"
] | import org.thoughtcrime.securesms.database.SignalDatabase; import org.thoughtcrime.securesms.dependencies.ApplicationDependencies; import org.thoughtcrime.securesms.recipients.Recipient; import org.whispersystems.signalservice.api.SignalSessionLock; | import org.thoughtcrime.securesms.database.*; import org.thoughtcrime.securesms.dependencies.*; import org.thoughtcrime.securesms.recipients.*; import org.whispersystems.signalservice.api.*; | [
"org.thoughtcrime.securesms",
"org.whispersystems.signalservice"
] | org.thoughtcrime.securesms; org.whispersystems.signalservice; | 1,743,979 |
void resourceCopyMove(XmldbURI destCollectionUri, String newName, Mode mode) throws EXistException {
if (LOG.isDebugEnabled()) {
LOG.debug(String.format("%s %s to %s named %s", mode, xmldbUri, destCollectionUri, newName));
}
XmldbURI newNameUri = null;
try {
... | void resourceCopyMove(XmldbURI destCollectionUri, String newName, Mode mode) throws EXistException { if (LOG.isDebugEnabled()) { LOG.debug(String.format(STR, mode, xmldbUri, destCollectionUri, newName)); } XmldbURI newNameUri = null; try { newNameUri = XmldbURI.xmldbUriFor(newName); } catch (URISyntaxException ex) { LO... | /**
* Copy document or collection in database.
*/ | Copy document or collection in database | resourceCopyMove | {
"repo_name": "joewiz/exist",
"path": "extensions/webdav/src/org/exist/webdav/ExistDocument.java",
"license": "lgpl-2.1",
"size": 23955
} | [
"java.io.IOException",
"java.net.URISyntaxException",
"java.util.Optional",
"org.exist.EXistException",
"org.exist.collections.Collection",
"org.exist.collections.triggers.TriggerException",
"org.exist.dom.persistent.DocumentImpl",
"org.exist.security.PermissionDeniedException",
"org.exist.storage.D... | import java.io.IOException; import java.net.URISyntaxException; import java.util.Optional; import org.exist.EXistException; import org.exist.collections.Collection; import org.exist.collections.triggers.TriggerException; import org.exist.dom.persistent.DocumentImpl; import org.exist.security.PermissionDeniedException; ... | import java.io.*; import java.net.*; import java.util.*; import org.exist.*; import org.exist.collections.*; import org.exist.collections.triggers.*; import org.exist.dom.persistent.*; import org.exist.security.*; import org.exist.storage.*; import org.exist.storage.lock.*; import org.exist.storage.txn.*; import org.ex... | [
"java.io",
"java.net",
"java.util",
"org.exist",
"org.exist.collections",
"org.exist.dom",
"org.exist.security",
"org.exist.storage",
"org.exist.util",
"org.exist.xmldb"
] | java.io; java.net; java.util; org.exist; org.exist.collections; org.exist.dom; org.exist.security; org.exist.storage; org.exist.util; org.exist.xmldb; | 1,954,974 |
public void activateClientContext(){
if (clientContext != null){
AstroboaClientContextHolder.registerClientContext(clientContext, true);
}
else if (authenticationToken != null){
//We have authentication token. Use that
AstroboaClientContextHolder.activateClientContextForAuthenticationToken(authenticat... | void function(){ if (clientContext != null){ AstroboaClientContextHolder.registerClientContext(clientContext, true); } else if (authenticationToken != null){ AstroboaClientContextHolder.activateClientContextForAuthenticationToken(authenticationToken); } } | /**
* Used to activate this client's context in current Thread
*/ | Used to activate this client's context in current Thread | activateClientContext | {
"repo_name": "BetaCONCEPT/astroboa",
"path": "astroboa-java-client/src/main/java/org/betaconceptframework/astroboa/client/AstroboaClient.java",
"license": "gpl-3.0",
"size": 21565
} | [
"org.betaconceptframework.astroboa.context.AstroboaClientContextHolder"
] | import org.betaconceptframework.astroboa.context.AstroboaClientContextHolder; | import org.betaconceptframework.astroboa.context.*; | [
"org.betaconceptframework.astroboa"
] | org.betaconceptframework.astroboa; | 935,630 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.