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 Set<ThingTypeUID> getSupportedThingTypeUIDs(); | Set<ThingTypeUID> function(); | /**
* Defines the list of thing types that this participant can identify
*
* @return a set of thing type UIDs for which results can be created
*/ | Defines the list of thing types that this participant can identify | getSupportedThingTypeUIDs | {
"repo_name": "vilchev/eclipse-smarthome",
"path": "bundles/config/org.eclipse.smarthome.config.discovery/src/main/java/org/eclipse/smarthome/config/discovery/UpnpDiscoveryParticipant.java",
"license": "epl-1.0",
"size": 1912
} | [
"java.util.Set",
"org.eclipse.smarthome.core.thing.ThingTypeUID"
] | import java.util.Set; import org.eclipse.smarthome.core.thing.ThingTypeUID; | import java.util.*; import org.eclipse.smarthome.core.thing.*; | [
"java.util",
"org.eclipse.smarthome"
] | java.util; org.eclipse.smarthome; | 1,369,145 |
public static Type getType(final Method m) {
return getType(getMethodDescriptor(m));
} | static Type function(final Method m) { return getType(getMethodDescriptor(m)); } | /**
* Returns the Java method type corresponding to the given method.
*
* @param m
* a {@link Method Method} object.
* @return the Java method type corresponding to the given method.
*/ | Returns the Java method type corresponding to the given method | getType | {
"repo_name": "frohoff/jdk8u-jdk",
"path": "src/share/classes/jdk/internal/org/objectweb/asm/Type.java",
"license": "gpl-2.0",
"size": 30700
} | [
"java.lang.reflect.Method"
] | import java.lang.reflect.Method; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 2,051,900 |
LL1Analyzer anal = new LL1Analyzer(this);
IntervalSet next = anal.LOOK(s, ctx);
return next;
} | LL1Analyzer anal = new LL1Analyzer(this); IntervalSet next = anal.LOOK(s, ctx); return next; } | /** Compute the set of valid tokens that can occur starting in state {@code s}.
* If {@code ctx} is null, the set of tokens will not include what can follow
* the rule surrounding {@code s}. In other words, the set will be
* restricted to tokens reachable staying within {@code s}'s rule.
*/ | Compute the set of valid tokens that can occur starting in state s. If ctx is null, the set of tokens will not include what can follow the rule surrounding s. In other words, the set will be restricted to tokens reachable staying within s's rule | nextTokens | {
"repo_name": "Pursuit92/antlr4",
"path": "runtime/Java/src/org/antlr/v4/runtime/atn/ATN.java",
"license": "bsd-3-clause",
"size": 6600
} | [
"org.antlr.v4.runtime.misc.IntervalSet"
] | import org.antlr.v4.runtime.misc.IntervalSet; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 1,261,035 |
public void bind(SocketAddress endpoint) throws IOException {
bind(endpoint, 50);
} | void function(SocketAddress endpoint) throws IOException { bind(endpoint, 50); } | /**
*
* Binds the {@code ServerSocket} to a specific address
* (IP address and port number).
* <p>
* If the address is {@code null}, then the system will pick up
* an ephemeral port and a valid local address to bind the socket.
*
* @param endpoint The IP address and port... | Binds the ServerSocket to a specific address (IP address and port number). If the address is null, then the system will pick up an ephemeral port and a valid local address to bind the socket | bind | {
"repo_name": "google/desugar_jdk_libs",
"path": "jdk11/src/java.base/share/classes/java/net/ServerSocket.java",
"license": "gpl-2.0",
"size": 41520
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 777,845 |
CachePoolInfo getInfo(boolean fullInfo) {
CachePoolInfo info = new CachePoolInfo(poolName);
if (!fullInfo) {
return info;
}
return info.setOwnerName(ownerName).
setGroupName(groupName).
setMode(new FsPermission(mode)).
setLimit(limit).
setMaxRelativeExpiryMs(maxRe... | CachePoolInfo getInfo(boolean fullInfo) { CachePoolInfo info = new CachePoolInfo(poolName); if (!fullInfo) { return info; } return info.setOwnerName(ownerName). setGroupName(groupName). setMode(new FsPermission(mode)). setLimit(limit). setMaxRelativeExpiryMs(maxRelativeExpiryMs); } | /**
* Get either full or partial information about this CachePool.
*
* @param fullInfo
* If true, only the name will be returned (i.e., what you
* would get if you didn't have read permission for this pool.)
* @return
* Cache pool information.
*/ | Get either full or partial information about this CachePool | getInfo | {
"repo_name": "jsrudani/HadoopHDFSProject",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/CachePool.java",
"license": "apache-2.0",
"size": 9298
} | [
"org.apache.hadoop.fs.permission.FsPermission",
"org.apache.hadoop.hdfs.protocol.CachePoolInfo"
] | import org.apache.hadoop.fs.permission.FsPermission; import org.apache.hadoop.hdfs.protocol.CachePoolInfo; | import org.apache.hadoop.fs.permission.*; import org.apache.hadoop.hdfs.protocol.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,012,603 |
private void dfsPruning(Prefix prefix, Bitmap prefixBitmap, List<Integer> sn, List<Integer> in, int hasToBeGreaterThanForIStep, int m, Integer lastAppendedItem) throws IOException {
// System.out.println(prefix.toString());
// ====== S-STEPS ======
// Temporary variables (as described in... | void function(Prefix prefix, Bitmap prefixBitmap, List<Integer> sn, List<Integer> in, int hasToBeGreaterThanForIStep, int m, Integer lastAppendedItem) throws IOException { List<Integer> sTemp = new ArrayList<Integer>(); List<Bitmap> sTempBitmaps = new ArrayList<Bitmap>(); Map<Integer, Integer> mapSupportItemsAfter = co... | /**
* This is the dfsPruning method as described in the SPAM paper.
*
* @param prefix the current prefix
* @param prefixBitmap the bitmap corresponding to the current prefix
* @param sn a list of items to be considered for i-steps
* @param in a list of items to be considered for s-st... | This is the dfsPruning method as described in the SPAM paper | dfsPruning | {
"repo_name": "aocalderon/PhD",
"path": "Y2Q2/Research/Code/SPMF/src/ca/pfv/spmf/algorithms/sequentialpatterns/spam/AlgoCMSPAM.java",
"license": "lgpl-3.0",
"size": 28580
} | [
"ca.pfv.spmf.patterns.itemset_list_integers_without_support.Itemset",
"ca.pfv.spmf.tools.MemoryLogger",
"java.io.IOException",
"java.util.ArrayList",
"java.util.List",
"java.util.Map"
] | import ca.pfv.spmf.patterns.itemset_list_integers_without_support.Itemset; import ca.pfv.spmf.tools.MemoryLogger; import java.io.IOException; import java.util.ArrayList; import java.util.List; import java.util.Map; | import ca.pfv.spmf.patterns.itemset_list_integers_without_support.*; import ca.pfv.spmf.tools.*; import java.io.*; import java.util.*; | [
"ca.pfv.spmf",
"java.io",
"java.util"
] | ca.pfv.spmf; java.io; java.util; | 1,269,408 |
EAttribute getOpenAttrs_AnyAttribute(); | EAttribute getOpenAttrs_AnyAttribute(); | /**
* Returns the meta object for the attribute list '{@link org.w3._2001.schema.OpenAttrs#getAnyAttribute <em>Any Attribute</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute list '<em>Any Attribute</em>'.
* @see org.w3._2001.schema.OpenAttrs#getAnyAttribute... | Returns the meta object for the attribute list '<code>org.w3._2001.schema.OpenAttrs#getAnyAttribute Any Attribute</code>'. | getOpenAttrs_AnyAttribute | {
"repo_name": "geotools/geotools",
"path": "modules/ogc/net.opengis.wps/src/org/w3/_2001/schema/SchemaPackage.java",
"license": "lgpl-2.1",
"size": 433240
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,878,542 |
private void getLastChild() {
final NodeCursor cursor = getCursor();
// Nodekey of the root of the current subtree.
final long parent = cursor.getNodeKey();
if (cursor.hasFirstChild()) {
while (cursor.hasFirstChild()) {
mStack.push(cursor.getNodeKey());
cursor.moveToFirstC... | void function() { final NodeCursor cursor = getCursor(); final long parent = cursor.getNodeKey(); if (cursor.hasFirstChild()) { while (cursor.hasFirstChild()) { mStack.push(cursor.getNodeKey()); cursor.moveToFirstChild(); } while (cursor.hasRightSibling()) { mStack.push(cursor.getNodeKey()); cursor.moveToRightSibling()... | /**
* Moves the transaction to the node in the current subtree, that is last in document order and
* pushes all other node key on a stack. At the end the stack contains all node keys except for
* the last one in reverse document order.
*/ | Moves the transaction to the node in the current subtree, that is last in document order and pushes all other node key on a stack. At the end the stack contains all node keys except for the last one in reverse document order | getLastChild | {
"repo_name": "sirixdb/sirix",
"path": "bundles/sirix-core/src/main/java/org/sirix/axis/PrecedingAxis.java",
"license": "bsd-3-clause",
"size": 5690
} | [
"org.sirix.api.NodeCursor"
] | import org.sirix.api.NodeCursor; | import org.sirix.api.*; | [
"org.sirix.api"
] | org.sirix.api; | 1,977,103 |
public void testSetBitPositiveOutside2() {
byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26};
int aSign = 1;
int number = 223;
byte rBytes[] = {
0, -128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -128, 56, 100,
-2, -76, 89, 45, 91, 3, -15, 35, 26};
BigInteg... | void function() { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = 1; int number = 223; byte rBytes[] = { 0, -128, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; BigInteger aNumber = new BigInteger(aSign, aBytes); BigInteger result =... | /**
* setBit(int n) outside a positive number.
*/ | setBit(int n) outside a positive number | testSetBitPositiveOutside2 | {
"repo_name": "google/j2cl",
"path": "jre/javatests/com/google/gwt/emultest/java/math/BigIntegerOperateBitsTest.java",
"license": "apache-2.0",
"size": 47597
} | [
"java.math.BigInteger"
] | import java.math.BigInteger; | import java.math.*; | [
"java.math"
] | java.math; | 936,681 |
public ITableRendererSource getColumnRendererSource()
{
return m_objColumnRendererSource;
} | ITableRendererSource function() { return m_objColumnRendererSource; } | /**
* Returns the columnRendererSource.
* @return ITableColumnRendererSource
*/ | Returns the columnRendererSource | getColumnRendererSource | {
"repo_name": "apache/tapestry4",
"path": "contrib/src/java/org/apache/tapestry/contrib/table/model/common/AbstractTableColumn.java",
"license": "apache-2.0",
"size": 7108
} | [
"org.apache.tapestry.contrib.table.model.ITableRendererSource"
] | import org.apache.tapestry.contrib.table.model.ITableRendererSource; | import org.apache.tapestry.contrib.table.model.*; | [
"org.apache.tapestry"
] | org.apache.tapestry; | 290,989 |
public EndpointFactory getEndpointFactory() {
return endpointFactory;
} | EndpointFactory function() { return endpointFactory; } | /**
* Obtains the endpointFactory.
* @return
*/ | Obtains the endpointFactory | getEndpointFactory | {
"repo_name": "christophd/citrus",
"path": "core/citrus-base/src/main/java/com/consol/citrus/CitrusContext.java",
"license": "apache-2.0",
"size": 16973
} | [
"com.consol.citrus.endpoint.EndpointFactory"
] | import com.consol.citrus.endpoint.EndpointFactory; | import com.consol.citrus.endpoint.*; | [
"com.consol.citrus"
] | com.consol.citrus; | 1,860,423 |
void remove(String id) throws NotFoundException, ServerException, ConflictException; | void remove(String id) throws NotFoundException, ServerException, ConflictException; | /**
* Removes account from persistent layer
*
* @param id
* account identifier
*/ | Removes account from persistent layer | remove | {
"repo_name": "dhuebner/che",
"path": "core/platform-api/che-core-api-account/src/main/java/org/eclipse/che/api/account/server/dao/AccountDao.java",
"license": "epl-1.0",
"size": 6721
} | [
"org.eclipse.che.api.core.ConflictException",
"org.eclipse.che.api.core.NotFoundException",
"org.eclipse.che.api.core.ServerException"
] | import org.eclipse.che.api.core.ConflictException; import org.eclipse.che.api.core.NotFoundException; import org.eclipse.che.api.core.ServerException; | import org.eclipse.che.api.core.*; | [
"org.eclipse.che"
] | org.eclipse.che; | 1,968,099 |
@edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "NP_OPTIONAL_RETURN_NULL", justification = "Intentional behavior")
public Optional<Entity> get(String entityTypeId, Object id, EntityType entityType)
{
CombinedEntityCache cache = caches.get();
if (cache == null)
{
return null;
}
Optional<Entit... | @edu.umd.cs.findbugs.annotations.SuppressWarnings(value = STR, justification = STR) Optional<Entity> function(String entityTypeId, Object id, EntityType entityType) { CombinedEntityCache cache = caches.get(); if (cache == null) { return null; } Optional<Entity> result = cache.getIfPresent(entityType, id); if (result !=... | /**
* Retrieves an entity from the L1 cache based on a combination of entity name and entity id.
*
* @param entityTypeId name of the entity to retrieve
* @param id id value of the entity to retrieve
* @return the retrieved {@link Entity} or Optional.empty() if deletion of this entity is stored in th... | Retrieves an entity from the L1 cache based on a combination of entity name and entity id | get | {
"repo_name": "npklein/molgenis",
"path": "molgenis-data-cache/src/main/java/org/molgenis/data/cache/l1/L1Cache.java",
"license": "lgpl-3.0",
"size": 4552
} | [
"java.util.Optional",
"org.molgenis.data.Entity",
"org.molgenis.data.cache.utils.CombinedEntityCache",
"org.molgenis.data.meta.model.EntityType"
] | import java.util.Optional; import org.molgenis.data.Entity; import org.molgenis.data.cache.utils.CombinedEntityCache; import org.molgenis.data.meta.model.EntityType; | import java.util.*; import org.molgenis.data.*; import org.molgenis.data.cache.utils.*; import org.molgenis.data.meta.model.*; | [
"java.util",
"org.molgenis.data"
] | java.util; org.molgenis.data; | 2,863,029 |
private List<List<IMethodBinding>> groupOverrideEquivalentMethods(List<IMethodBinding> methods) {
List<List<IMethodBinding>> groups = Lists.newArrayList();
for (IMethodBinding method : methods) {
List<IMethodBinding> group = null;
for (List<IMethodBinding> candidate : groups) {
IMethodBind... | List<List<IMethodBinding>> function(List<IMethodBinding> methods) { List<List<IMethodBinding>> groups = Lists.newArrayList(); for (IMethodBinding method : methods) { List<IMethodBinding> group = null; for (List<IMethodBinding> candidate : groups) { IMethodBinding first = candidate.get(0); if (isSubsignature(method, fir... | /**
* Group a list of methods by override-equivalency, as defined by JLS3, section 8.4.2.
*/ | Group a list of methods by override-equivalency, as defined by JLS3, section 8.4.2 | groupOverrideEquivalentMethods | {
"repo_name": "rwl/j2objc",
"path": "src/main/java/com/google/devtools/j2objc/translate/DeadCodeEliminator.java",
"license": "apache-2.0",
"size": 34319
} | [
"com.google.common.collect.Lists",
"java.util.List",
"org.eclipse.jdt.core.dom.IMethodBinding"
] | import com.google.common.collect.Lists; import java.util.List; import org.eclipse.jdt.core.dom.IMethodBinding; | import com.google.common.collect.*; import java.util.*; import org.eclipse.jdt.core.dom.*; | [
"com.google.common",
"java.util",
"org.eclipse.jdt"
] | com.google.common; java.util; org.eclipse.jdt; | 280,800 |
@Test
public void testImmutability() {
assertThatClassIsImmutable(MplsPathIntent.class);
} | void function() { assertThatClassIsImmutable(MplsPathIntent.class); } | /**
* Checks that the MplsPathIntent class is immutable.
*/ | Checks that the MplsPathIntent class is immutable | testImmutability | {
"repo_name": "maxkondr/onos-porta",
"path": "core/api/src/test/java/org/onosproject/net/intent/MplsPathIntentTest.java",
"license": "apache-2.0",
"size": 3493
} | [
"org.onlab.junit.ImmutableClassChecker"
] | import org.onlab.junit.ImmutableClassChecker; | import org.onlab.junit.*; | [
"org.onlab.junit"
] | org.onlab.junit; | 316,784 |
private InputMethod getIMInstance(Iterator<InputMethodDescriptor> descriptors,
Locale locale) throws Exception {
while (descriptors.hasNext()) {
InputMethodDescriptor desc = descriptors.next();
Locale[] locs = desc.getAvailableLocales();
... | InputMethod function(Iterator<InputMethodDescriptor> descriptors, Locale locale) throws Exception { while (descriptors.hasNext()) { InputMethodDescriptor desc = descriptors.next(); Locale[] locs = desc.getAvailableLocales(); for (Locale element : locs) { if (locale.equals(element)) { return getIMInstance(desc); } } } r... | /**
* Gets input method instance for the given
* locale from the given list of descriptors
* @param descriptors iterator of the list of IM descriptors
* @param locale the locale to be supported by the IM
* @return input method instance
* @throws Exception
*/ | Gets input method instance for the given locale from the given list of descriptors | getIMInstance | {
"repo_name": "freeVM/freeVM",
"path": "enhanced/archive/classlib/java6/modules/awt/src/main/java/common/org/apache/harmony/awt/im/InputMethodContext.java",
"license": "apache-2.0",
"size": 17520
} | [
"java.awt.im.spi.InputMethod",
"java.awt.im.spi.InputMethodDescriptor",
"java.util.Iterator",
"java.util.Locale"
] | import java.awt.im.spi.InputMethod; import java.awt.im.spi.InputMethodDescriptor; import java.util.Iterator; import java.util.Locale; | import java.awt.im.spi.*; import java.util.*; | [
"java.awt",
"java.util"
] | java.awt; java.util; | 2,238,846 |
@Override
public synchronized void afterLast() throws SQLException {
super.afterLast();
} | synchronized void function() throws SQLException { super.afterLast(); } | /**
* JDBC 2.0
*
* <p>
* Moves to the end of the result set, just after the last row. Has no effect if the result set contains no rows.
* </p>
*
* @exception SQLException
* if a database-access error occurs, or result set type is
* TYPE_FORWAR... | JDBC 2.0 Moves to the end of the result set, just after the last row. Has no effect if the result set contains no rows. | afterLast | {
"repo_name": "slockhart/sql-app",
"path": "mysql-connector-java-5.1.34/src/com/mysql/jdbc/UpdatableResultSet.java",
"license": "gpl-2.0",
"size": 93047
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,284,214 |
void setPlane(int z, int t)
{
currentPlane = new Coord3D(z, t);
}
| void setPlane(int z, int t) { currentPlane = new Coord3D(z, t); } | /**
* Sets the selected z-section and timepoint.
*
* @param z The selected z-section.
* @param t The selected timepoint.
*/ | Sets the selected z-section and timepoint | setPlane | {
"repo_name": "chris-allan/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/measurement/view/MeasurementViewerModel.java",
"license": "gpl-2.0",
"size": 50154
} | [
"org.openmicroscopy.shoola.util.roi.model.util.Coord3D"
] | import org.openmicroscopy.shoola.util.roi.model.util.Coord3D; | import org.openmicroscopy.shoola.util.roi.model.util.*; | [
"org.openmicroscopy.shoola"
] | org.openmicroscopy.shoola; | 2,202,898 |
// TODO(b/138456686): make detailedExitCode non-nullable
void handleError(
QueryExpression expression, String message, @Nullable DetailedExitCode detailedExitCode)
throws QueryException; | void handleError( QueryExpression expression, String message, @Nullable DetailedExitCode detailedExitCode) throws QueryException; | /**
* Handle an error during evaluation of {@code expression} by either throwing {@link
* QueryException} or emitting an event, depending on whether the evaluation is running in a "keep
* going" mode.
*/ | Handle an error during evaluation of expression by either throwing <code>QueryException</code> or emitting an event, depending on whether the evaluation is running in a "keep going" mode | handleError | {
"repo_name": "werkt/bazel",
"path": "src/main/java/com/google/devtools/build/lib/query2/engine/QueryEnvironment.java",
"license": "apache-2.0",
"size": 26694
} | [
"com.google.devtools.build.lib.util.DetailedExitCode",
"javax.annotation.Nullable"
] | import com.google.devtools.build.lib.util.DetailedExitCode; import javax.annotation.Nullable; | import com.google.devtools.build.lib.util.*; import javax.annotation.*; | [
"com.google.devtools",
"javax.annotation"
] | com.google.devtools; javax.annotation; | 933,780 |
public void remove() {
if (_expectedSize != _hash.size()) {
throw new ConcurrentModificationException();
}
// Disable auto compaction during the remove. This is a workaround for bug 1642768.
try {
_hash.tempDisableAutoCompaction();
_hash.removeAt(... | void function() { if (_expectedSize != _hash.size()) { throw new ConcurrentModificationException(); } try { _hash.tempDisableAutoCompaction(); _hash.removeAt(_index); } finally { _hash.reenableAutoCompaction( false ); } _expectedSize--; } | /**
* Removes the last entry returned by the iterator.
* Invoking this method more than once for a single entry
* will leave the underlying data structure in a confused
* state.
*/ | Removes the last entry returned by the iterator. Invoking this method more than once for a single entry will leave the underlying data structure in a confused state | remove | {
"repo_name": "achraftriki/test2",
"path": "src/main/java/gnu/trove/impl/hash/THashPrimitiveIterator.java",
"license": "gpl-3.0",
"size": 4483
} | [
"java.util.ConcurrentModificationException"
] | import java.util.ConcurrentModificationException; | import java.util.*; | [
"java.util"
] | java.util; | 2,822,292 |
List<User> getAllowedUsers(PerunSession sess, Resource resource); | List<User> getAllowedUsers(PerunSession sess, Resource resource); | /**
* Returns all users who are allowed on the defined resource.
*
* @param sess
* @param resource
* @return list of users
* @throws InternalErrorException
*/ | Returns all users who are allowed on the defined resource | getAllowedUsers | {
"repo_name": "mvocu/perun",
"path": "perun-core/src/main/java/cz/metacentrum/perun/core/implApi/ResourcesManagerImplApi.java",
"license": "bsd-2-clause",
"size": 29312
} | [
"cz.metacentrum.perun.core.api.PerunSession",
"cz.metacentrum.perun.core.api.Resource",
"cz.metacentrum.perun.core.api.User",
"java.util.List"
] | import cz.metacentrum.perun.core.api.PerunSession; import cz.metacentrum.perun.core.api.Resource; import cz.metacentrum.perun.core.api.User; import java.util.List; | import cz.metacentrum.perun.core.api.*; import java.util.*; | [
"cz.metacentrum.perun",
"java.util"
] | cz.metacentrum.perun; java.util; | 1,475,985 |
@Test
public void testMultipleStartSingleReplicator() {
Replicator mockReplicator = mock(Replicator.class);
EventBus mockEventBus = mock(EventBus.class);
when(mockReplicator.getEventBus()).thenReturn(mockEventBus);
TestPolicy replicationPolicy = new TestPolicy();
replicat... | void function() { Replicator mockReplicator = mock(Replicator.class); EventBus mockEventBus = mock(EventBus.class); when(mockReplicator.getEventBus()).thenReturn(mockEventBus); TestPolicy replicationPolicy = new TestPolicy(); replicationPolicy.addReplicators(mockReplicator); verify(mockReplicator, never()).start(); rep... | /**
* Check that when the {@link ReplicationPolicyManager} is setup with a single
* {@link Replicator}, when the replication policy is started
* more than once before the {@link Replicator} has completed replication,
* the {@link Replicator#start()} method is called only once the {@link Replicator}.... | Check that when the <code>ReplicationPolicyManager</code> is setup with a single <code>Replicator</code>, when the replication policy is started more than once before the <code>Replicator</code> has completed replication, the <code>Replicator#start()</code> method is called only once the <code>Replicator</code> | testMultipleStartSingleReplicator | {
"repo_name": "cloudant/sync-android",
"path": "cloudant-sync-datastore-core/src/test/java/com/cloudant/sync/internal/replication/ReplicationPolicyManagerTest.java",
"license": "apache-2.0",
"size": 19909
} | [
"com.cloudant.sync.event.EventBus",
"com.cloudant.sync.replication.Replicator",
"org.mockito.Mockito"
] | import com.cloudant.sync.event.EventBus; import com.cloudant.sync.replication.Replicator; import org.mockito.Mockito; | import com.cloudant.sync.event.*; import com.cloudant.sync.replication.*; import org.mockito.*; | [
"com.cloudant.sync",
"org.mockito"
] | com.cloudant.sync; org.mockito; | 2,690,746 |
public void setRestConfiguration(RestConfiguration restConfiguration)
{
this.restConfiguration = restConfiguration;
} | void function(RestConfiguration restConfiguration) { this.restConfiguration = restConfiguration; } | /**
* set REST configuration
* @param restConfiguration
*/ | set REST configuration | setRestConfiguration | {
"repo_name": "harfalm/Sakai-10.1",
"path": "help/help-component/src/java/org/sakaiproject/component/app/help/HelpManagerImpl.java",
"license": "apache-2.0",
"size": 39700
} | [
"org.sakaiproject.api.app.help.RestConfiguration"
] | import org.sakaiproject.api.app.help.RestConfiguration; | import org.sakaiproject.api.app.help.*; | [
"org.sakaiproject.api"
] | org.sakaiproject.api; | 836,424 |
public static long getFilesizeOnHDFS( Path path )
throws IOException
{
FileSystem fs = IOUtilFunctions.getFileSystem(path);
long ret = 0; //in bytes
if( fs.isDirectory(path) )
ret = fs.getContentSummary(path).getLength();
else
ret = fs.getFileStatus(path).getLen();
//note: filestatus would return... | static long function( Path path ) throws IOException { FileSystem fs = IOUtilFunctions.getFileSystem(path); long ret = 0; if( fs.isDirectory(path) ) ret = fs.getContentSummary(path).getLength(); else ret = fs.getFileStatus(path).getLen(); return ret; } | /**
* Returns the size of a file or directory on hdfs in bytes.
*
* @param path file system path
* @return file size
* @throws IOException if IOException occurs
*/ | Returns the size of a file or directory on hdfs in bytes | getFilesizeOnHDFS | {
"repo_name": "deroneriksson/incubator-systemml",
"path": "src/main/java/org/apache/sysml/runtime/util/MapReduceTool.java",
"license": "apache-2.0",
"size": 23017
} | [
"java.io.IOException",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path",
"org.apache.sysml.runtime.io.IOUtilFunctions"
] | import java.io.IOException; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.sysml.runtime.io.IOUtilFunctions; | import java.io.*; import org.apache.hadoop.fs.*; import org.apache.sysml.runtime.io.*; | [
"java.io",
"org.apache.hadoop",
"org.apache.sysml"
] | java.io; org.apache.hadoop; org.apache.sysml; | 154,302 |
public void addObject(Resource resource, Object entity)
throws RepositoryException {
if (entity instanceof RDFObjectBehaviour) {
RDFObjectBehaviour support = (RDFObjectBehaviour) entity;
Object delegate = support.getBehaviourDelegate();
if (delegate != entity) {
addObject(resource, delegate);
r... | void function(Resource resource, Object entity) throws RepositoryException { if (entity instanceof RDFObjectBehaviour) { RDFObjectBehaviour support = (RDFObjectBehaviour) entity; Object delegate = support.getBehaviourDelegate(); if (delegate != entity) { addObject(resource, delegate); return; } } synchronized (merged) ... | /**
* Imports the entity into the RDF store using the given handle.
*/ | Imports the entity into the RDF store using the given handle | addObject | {
"repo_name": "stain/alibaba",
"path": "object-repository/src/main/java/org/openrdf/repository/object/ObjectConnection.java",
"license": "bsd-3-clause",
"size": 22203
} | [
"java.util.HashSet",
"java.util.Set",
"org.openrdf.model.Resource",
"org.openrdf.repository.RepositoryException",
"org.openrdf.repository.object.traits.Mergeable",
"org.openrdf.repository.object.traits.RDFObjectBehaviour"
] | import java.util.HashSet; import java.util.Set; import org.openrdf.model.Resource; import org.openrdf.repository.RepositoryException; import org.openrdf.repository.object.traits.Mergeable; import org.openrdf.repository.object.traits.RDFObjectBehaviour; | import java.util.*; import org.openrdf.model.*; import org.openrdf.repository.*; import org.openrdf.repository.object.traits.*; | [
"java.util",
"org.openrdf.model",
"org.openrdf.repository"
] | java.util; org.openrdf.model; org.openrdf.repository; | 1,984,280 |
Doc generateFilename(Element element); | Doc generateFilename(Element element); | /**
* Generates the result filename for the generated document
*/ | Generates the result filename for the generated document | generateFilename | {
"repo_name": "jmuk/toolkit",
"path": "src/main/java/com/google/api/codegen/go/GoSnippetSet.java",
"license": "apache-2.0",
"size": 1411
} | [
"com.google.api.tools.framework.snippet.Doc"
] | import com.google.api.tools.framework.snippet.Doc; | import com.google.api.tools.framework.snippet.*; | [
"com.google.api"
] | com.google.api; | 328,151 |
@RequestMapping(method = RequestMethod.POST, value = "/shareWithUsersViaEmail")
@Transactional
public ShareResponse shareWithUsersViaEmail(@RequestBody ShareRequest request) {
String resText = emailService.shareWithUsers(request.getSendTo(), constructUrl(request.getDocId()),
request.getSentFrom());
ShareRe... | @RequestMapping(method = RequestMethod.POST, value = STR) ShareResponse function(@RequestBody ShareRequest request) { String resText = emailService.shareWithUsers(request.getSendTo(), constructUrl(request.getDocId()), request.getSentFrom()); ShareResponse response = new ShareResponse(); response.setResponseText(resText... | /**
* Responsible for sharing the document url with the given list of users through email
* @param request
* @return ShareResponse
*/ | Responsible for sharing the document url with the given list of users through email | shareWithUsersViaEmail | {
"repo_name": "aroychoudhury/innovista",
"path": "sharing-services/src/main/java/org/verizon/sharingservices/web/SharingServiceController.java",
"license": "mit",
"size": 6384
} | [
"org.springframework.web.bind.annotation.RequestBody",
"org.springframework.web.bind.annotation.RequestMapping",
"org.springframework.web.bind.annotation.RequestMethod",
"org.verizon.sharingservices.dataobject.ShareRequest",
"org.verizon.sharingservices.dataobject.ShareResponse"
] | import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.verizon.sharingservices.dataobject.ShareRequest; import org.verizon.sharingservices.dataobject.ShareResponse; | import org.springframework.web.bind.annotation.*; import org.verizon.sharingservices.dataobject.*; | [
"org.springframework.web",
"org.verizon.sharingservices"
] | org.springframework.web; org.verizon.sharingservices; | 651,246 |
private Product generateProduct(PTProductEntity productEntity)
throws RequiredFieldNotFoundException, InvalidProductTypeException {
this.context = "Product.";
Product product = new Product();
product.setProductType(this.validateString("ProductType", this.getProductType(productEn... | Product function(PTProductEntity productEntity) throws RequiredFieldNotFoundException, InvalidProductTypeException { this.context = STR; Product product = new Product(); product.setProductType(this.validateString(STR, this.getProductType(productEntity.getType()), this.MAX_LENGTH_1, true)); product.setProductCode( this.... | /**
* Generates an instance of Product to be inserted in the table 2.4
* (Product)
*
* @param productEntity
* - the product/service
* @return an instance of Product
* @throws RequiredFieldNotFoundException
* @throws InvalidProductTypeException
*/ | Generates an instance of Product to be inserted in the table 2.4 (Product) | generateProduct | {
"repo_name": "premium-minds/billy",
"path": "billy-portugal/src/main/java/com/premiumminds/billy/portugal/services/export/saftpt/v1_02_01/PTSAFTFileGenerator.java",
"license": "lgpl-3.0",
"size": 69667
} | [
"com.premiumminds.billy.portugal.persistence.entities.PTProductEntity",
"com.premiumminds.billy.portugal.services.export.exceptions.InvalidProductTypeException",
"com.premiumminds.billy.portugal.services.export.exceptions.RequiredFieldNotFoundException",
"com.premiumminds.billy.portugal.services.export.saftpt... | import com.premiumminds.billy.portugal.persistence.entities.PTProductEntity; import com.premiumminds.billy.portugal.services.export.exceptions.InvalidProductTypeException; import com.premiumminds.billy.portugal.services.export.exceptions.RequiredFieldNotFoundException; import com.premiumminds.billy.portugal.services.ex... | import com.premiumminds.billy.portugal.persistence.entities.*; import com.premiumminds.billy.portugal.services.export.exceptions.*; import com.premiumminds.billy.portugal.services.export.saftpt.v1_02_01.schema.*; | [
"com.premiumminds.billy"
] | com.premiumminds.billy; | 2,653,263 |
public HighlightOptions addField(String... fieldnames) {
Assert.notNull(fieldnames);
for (String fieldname : fieldnames) {
addField(fieldname);
}
return this;
} | HighlightOptions function(String... fieldnames) { Assert.notNull(fieldnames); for (String fieldname : fieldnames) { addField(fieldname); } return this; } | /**
* Add names of fields to highlight on
*
* @param fieldnames
* @return
*/ | Add names of fields to highlight on | addField | {
"repo_name": "learningtcc/dubbox",
"path": "dubbo-solr/dubbo-solr-server/src/main/java/com/frank/search/solr/core/query/HighlightOptions.java",
"license": "apache-2.0",
"size": 9395
} | [
"org.springframework.util.Assert"
] | import org.springframework.util.Assert; | import org.springframework.util.*; | [
"org.springframework.util"
] | org.springframework.util; | 2,814,014 |
@Override
@Column(name = "ACTV_IND", nullable = false, length = 1)
public boolean isActive() {
return active;
}
| @Column(name = STR, nullable = false, length = 1) boolean function() { return active; } | /**
* Gets the active attribute.
*
* @return Returns the active.
*/ | Gets the active attribute | isActive | {
"repo_name": "ua-eas/ua-kfs-5.3",
"path": "work/src/org/kuali/kfs/module/tem/businessobject/TemProfileAccount.java",
"license": "agpl-3.0",
"size": 7409
} | [
"javax.persistence.Column"
] | import javax.persistence.Column; | import javax.persistence.*; | [
"javax.persistence"
] | javax.persistence; | 1,868,768 |
void setBreakPoints(Set<BreakpointAddress> addresses, BreakpointType type) throws DebugExceptionWrapper; | void setBreakPoints(Set<BreakpointAddress> addresses, BreakpointType type) throws DebugExceptionWrapper; | /**
* Sets a list of breakpoints.
*
* @param addresses The addresses of the breakpoints.
* @param type The type of the breakpoints.
*
* @throws DebugExceptionWrapper Thrown if the message could not be sent to the debug client.
*/ | Sets a list of breakpoints | setBreakPoints | {
"repo_name": "guiquanz/binnavi",
"path": "src/main/java/com/google/security/zynamics/binnavi/debug/debugger/interfaces/IDebugger.java",
"license": "apache-2.0",
"size": 13711
} | [
"com.google.security.zynamics.binnavi.debug.debugger.DebugExceptionWrapper",
"com.google.security.zynamics.binnavi.debug.models.breakpoints.BreakpointAddress",
"com.google.security.zynamics.binnavi.debug.models.breakpoints.enums.BreakpointType",
"java.util.Set"
] | import com.google.security.zynamics.binnavi.debug.debugger.DebugExceptionWrapper; import com.google.security.zynamics.binnavi.debug.models.breakpoints.BreakpointAddress; import com.google.security.zynamics.binnavi.debug.models.breakpoints.enums.BreakpointType; import java.util.Set; | import com.google.security.zynamics.binnavi.debug.debugger.*; import com.google.security.zynamics.binnavi.debug.models.breakpoints.*; import com.google.security.zynamics.binnavi.debug.models.breakpoints.enums.*; import java.util.*; | [
"com.google.security",
"java.util"
] | com.google.security; java.util; | 1,746,006 |
public IndexData getIndex(IndexType indexType, String[] definitions,
CompiledValue indexedExpression, ExecutionContext context)
throws AmbiguousNameException, TypeMismatchException, NameResolutionException {
IndexData indxData = null;
int qItrSize = definitions.length;
Iterator it = this.index... | IndexData function(IndexType indexType, String[] definitions, CompiledValue indexedExpression, ExecutionContext context) throws AmbiguousNameException, TypeMismatchException, NameResolutionException { IndexData indxData = null; int qItrSize = definitions.length; Iterator it = this.indexes.values().iterator(); StringBui... | /**
* Get the Index with the specified indexType, fromClause, indexedExpression TODO: Asif :Check if
* synchronization is needed while obtaining Array of Indexes as similar to what we have used
* during index updates. This function will get the exact index , if available, else will return
* null
*
* @... | synchronization is needed while obtaining Array of Indexes as similar to what we have used during index updates. This function will get the exact index , if available, else will return null | getIndex | {
"repo_name": "davinash/geode",
"path": "geode-core/src/main/java/org/apache/geode/cache/query/internal/index/IndexManager.java",
"license": "apache-2.0",
"size": 67140
} | [
"java.util.Iterator",
"org.apache.geode.cache.query.AmbiguousNameException",
"org.apache.geode.cache.query.Index",
"org.apache.geode.cache.query.IndexType",
"org.apache.geode.cache.query.NameResolutionException",
"org.apache.geode.cache.query.TypeMismatchException",
"org.apache.geode.cache.query.interna... | import java.util.Iterator; import org.apache.geode.cache.query.AmbiguousNameException; import org.apache.geode.cache.query.Index; import org.apache.geode.cache.query.IndexType; import org.apache.geode.cache.query.NameResolutionException; import org.apache.geode.cache.query.TypeMismatchException; import org.apache.geode... | import java.util.*; import org.apache.geode.cache.query.*; import org.apache.geode.cache.query.internal.*; | [
"java.util",
"org.apache.geode"
] | java.util; org.apache.geode; | 255,993 |
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof CompositeTitle)) {
return false;
}
CompositeTitle that = (CompositeTitle) obj;
if (!this.container.equals(that.container)) {
return false;
... | boolean function(Object obj) { if (obj == this) { return true; } if (!(obj instanceof CompositeTitle)) { return false; } CompositeTitle that = (CompositeTitle) obj; if (!this.container.equals(that.container)) { return false; } if (!PaintUtilities.equal(this.backgroundPaint, that.backgroundPaint)) { return false; } retu... | /**
* Tests this title for equality with an arbitrary object.
*
* @param obj the object (<code>null</code> permitted).
*
* @return A boolean.
*/ | Tests this title for equality with an arbitrary object | equals | {
"repo_name": "JSansalone/JFreeChart",
"path": "source/org/jfree/chart/title/CompositeTitle.java",
"license": "lgpl-2.1",
"size": 7988
} | [
"org.jfree.util.PaintUtilities"
] | import org.jfree.util.PaintUtilities; | import org.jfree.util.*; | [
"org.jfree.util"
] | org.jfree.util; | 2,011,461 |
private static int avcLevelToMaxFrameSize(int avcLevel) {
switch (avcLevel) {
case CodecProfileLevel.AVCLevel1: return 99 * 16 * 16;
case CodecProfileLevel.AVCLevel1b: return 99 * 16 * 16;
case CodecProfileLevel.AVCLevel12: return 396 * 16 * 16;
case CodecProfileLevel.AVCLevel13: return 39... | static int function(int avcLevel) { switch (avcLevel) { case CodecProfileLevel.AVCLevel1: return 99 * 16 * 16; case CodecProfileLevel.AVCLevel1b: return 99 * 16 * 16; case CodecProfileLevel.AVCLevel12: return 396 * 16 * 16; case CodecProfileLevel.AVCLevel13: return 396 * 16 * 16; case CodecProfileLevel.AVCLevel2: retur... | /**
* Conversion values taken from ISO 14496-10 Table A-1.
*
* @param avcLevel one of CodecProfileLevel.AVCLevel* constants.
* @return maximum frame size that can be decoded by a decoder with the specified avc level
* (or {@code -1} if the level is not recognized)
*/ | Conversion values taken from ISO 14496-10 Table A-1 | avcLevelToMaxFrameSize | {
"repo_name": "DigitalLabApp/Gramy",
"path": "Telegram-master/TMessagesProj/src/main/java/org/telegram/messenger/exoplayer/MediaCodecUtil.java",
"license": "gpl-2.0",
"size": 19636
} | [
"android.media.MediaCodecInfo"
] | import android.media.MediaCodecInfo; | import android.media.*; | [
"android.media"
] | android.media; | 2,109,149 |
public COSDictionary getDictionary() {
return dictionary;
} | COSDictionary function() { return dictionary; } | /**
* Convert this standard java object to a COS dictionary.
*
* @return The COS dictionary that matches this Java object.
*/ | Convert this standard java object to a COS dictionary | getDictionary | {
"repo_name": "sencko/NALB",
"path": "nalb2013/src/org/apache/pdfbox/pdmodel/interactive/digitalsignature/PDSignature.java",
"license": "gpl-2.0",
"size": 10554
} | [
"org.apache.pdfbox.cos.COSDictionary"
] | import org.apache.pdfbox.cos.COSDictionary; | import org.apache.pdfbox.cos.*; | [
"org.apache.pdfbox"
] | org.apache.pdfbox; | 48,555 |
public void addCppDirectory(@NotNull String path) {
File directory = myFileStructure.createProjectDir(path);
myCppDirectories.add(directory);
} | void function(@NotNull String path) { File directory = myFileStructure.createProjectDir(path); myCppDirectories.add(directory); } | /**
* Adds the given path to the list of 'Cpp' directories. It also creates the directory in the file system.
*
* @param path path of the 'Cpp' directory to add, relative to the root directory of the Android project.
*/ | Adds the given path to the list of 'Cpp' directories. It also creates the directory in the file system | addCppDirectory | {
"repo_name": "consulo/consulo-android",
"path": "android/android/testSrc/com/android/tools/idea/gradle/stubs/android/SourceProviderStub.java",
"license": "apache-2.0",
"size": 6597
} | [
"java.io.File",
"org.jetbrains.annotations.NotNull"
] | import java.io.File; import org.jetbrains.annotations.NotNull; | import java.io.*; import org.jetbrains.annotations.*; | [
"java.io",
"org.jetbrains.annotations"
] | java.io; org.jetbrains.annotations; | 2,808,464 |
public boolean add(@NonNull T listener, int index) {
final String METHOD_NAME = "add()";
if (listener == null) {
throw new IllegalArgumentException("can not specify null for the listener");
}
verifyIsNotReleased(METHOD_NAME);
verifyIsNotPerformingClearMethod(MET... | boolean function(@NonNull T listener, int index) { final String METHOD_NAME = "add()"; if (listener == null) { throw new IllegalArgumentException(STR); } verifyIsNotReleased(METHOD_NAME); verifyIsNotPerformingClearMethod(METHOD_NAME); if (mListeners == null) { mListeners = new ArrayList<>(); } if (!mListeners.contains(... | /**
* Add a {@link T} listener to the chain at the specified position.
*
* @param listener The {@link T} instance
* @param index Position in the listener chain to insert this listener at. (< 0: tail of the chain)
*
* @return True if the listener object successfully added, otherwise fa... | Add a <code>T</code> listener to the chain at the specified position | add | {
"repo_name": "vinayak-garg/android-advancedrecyclerview",
"path": "library/src/main/java/com/h6ah4i/android/widget/advrecyclerview/event/BaseRecyclerViewEventDistributor.java",
"license": "apache-2.0",
"size": 7498
} | [
"android.support.annotation.NonNull",
"java.util.ArrayList"
] | import android.support.annotation.NonNull; import java.util.ArrayList; | import android.support.annotation.*; import java.util.*; | [
"android.support",
"java.util"
] | android.support; java.util; | 1,550,497 |
public static Date parseDate(String dateValue, Collection dateFormats)
throws DateParseException
{
return parseDate(dateValue, dateFormats, null);
} | static Date function(String dateValue, Collection dateFormats) throws DateParseException { return parseDate(dateValue, dateFormats, null); } | /**
* Parses the date value using the given date formats.
*
* @param dateValue the date value to parse
* @param dateFormats the date formats to use
* @return the parsed date
* @throws DateParseException if none of the dataFormats could parse the dateValue
*/ | Parses the date value using the given date formats | parseDate | {
"repo_name": "kabir/re-play",
"path": "resteasy-jaxrs/src/main/java/org/jboss/resteasy/util/DateUtil.java",
"license": "apache-2.0",
"size": 6423
} | [
"java.util.Collection",
"java.util.Date"
] | import java.util.Collection; import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 1,505,887 |
public void setComponentJS (String componentJS) throws JSONException {
log.info("setCompomentJS \"#0\"", componentJS);
if (componentJS.startsWith("\"")) {
// hack to fix the doubly-jsoned string
componentJS = (new JSONArray("[" + componentJS + "]")).getString(0);
}
JSONArray array = new JSONAr... | void function (String componentJS) throws JSONException { log.info(STR#0\STR\STR[STR]STRsetLinksJS wrong format: #0STRSTRbnode::STRuri::STR STRSTRbnode::STRuri::STR STRSTRbnode::STRuri::STRSTR STRSTR".equals(componentTitle)) { Suggestion suggestion = state.getSuggestion(fragmentId); if (suggestion != null) { componentT... | /**
* Sets the currently edited component values. Updates the selected values to those new component values.
* @param componentJS "contextKiwiId componentKiwiId relationKiwiId classKiwiId"
* @throws JSONException
*/ | Sets the currently edited component values. Updates the selected values to those new component values | setComponentJS | {
"repo_name": "fregaham/KiWi",
"path": "extensions/wiki/src/kiwi/wiki/action/KiwirdfaAction.java",
"license": "bsd-3-clause",
"size": 43502
} | [
"kiwi.model.informationextraction.Suggestion",
"kiwi.model.kbase.KiWiResource",
"org.json.JSONException"
] | import kiwi.model.informationextraction.Suggestion; import kiwi.model.kbase.KiWiResource; import org.json.JSONException; | import kiwi.model.informationextraction.*; import kiwi.model.kbase.*; import org.json.*; | [
"kiwi.model.informationextraction",
"kiwi.model.kbase",
"org.json"
] | kiwi.model.informationextraction; kiwi.model.kbase; org.json; | 1,541,334 |
public static final SourceModel.Expr CaseDataCons(SourceModel.Expr value) {
return
SourceModel.Expr.Application.make(
new SourceModel.Expr[] {SourceModel.Expr.DataCons.make(DataConstructors.CaseDataCons), value});
}
public static final QualifiedName CaseDataCons =
QualifiedName.make... | static final SourceModel.Expr function(SourceModel.Expr value) { return SourceModel.Expr.Application.make( new SourceModel.Expr[] {SourceModel.Expr.DataCons.make(DataConstructors.CaseDataCons), value}); } static final QualifiedName function = QualifiedName.make( CAL_Optimizer_Expression_internal.MODULE_NAME, STR); stat... | /**
* Binding for DataConstructor: Cal.Internal.Optimizer_Expression.CaseDataCons.
* @param value
* @return the SourceModule.Expr representing an application of Cal.Internal.Optimizer_Expression.CaseDataCons
*/ | Binding for DataConstructor: Cal.Internal.Optimizer_Expression.CaseDataCons | CaseDataCons | {
"repo_name": "levans/Open-Quark",
"path": "src/CAL_Platform/src/org/openquark/cal/internal/module/Cal/Internal/CAL_Optimizer_Expression_internal.java",
"license": "bsd-3-clause",
"size": 265925
} | [
"org.openquark.cal.compiler.QualifiedName",
"org.openquark.cal.compiler.SourceModel"
] | import org.openquark.cal.compiler.QualifiedName; import org.openquark.cal.compiler.SourceModel; | import org.openquark.cal.compiler.*; | [
"org.openquark.cal"
] | org.openquark.cal; | 1,092,189 |
public List<IPConfigurationProfile> ipConfigurationProfiles() {
return this.ipConfigurationProfiles;
} | List<IPConfigurationProfile> function() { return this.ipConfigurationProfiles; } | /**
* Get array of IP configuration profiles which reference this subnet.
*
* @return the ipConfigurationProfiles value
*/ | Get array of IP configuration profiles which reference this subnet | ipConfigurationProfiles | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_09_01/src/main/java/com/microsoft/azure/management/network/v2019_09_01/implementation/SubnetInner.java",
"license": "mit",
"size": 13592
} | [
"com.microsoft.azure.management.network.v2019_09_01.IPConfigurationProfile",
"java.util.List"
] | import com.microsoft.azure.management.network.v2019_09_01.IPConfigurationProfile; import java.util.List; | import com.microsoft.azure.management.network.v2019_09_01.*; import java.util.*; | [
"com.microsoft.azure",
"java.util"
] | com.microsoft.azure; java.util; | 1,718,485 |
private void TypeDefsAnalyzeOk(String... typeDefs) {
for (String typeDefStr: typeDefs) {
ParseNode stmt = AnalyzesOk(String.format("CREATE TABLE t (i %s)", typeDefStr));
AnalyzesOk(String.format("CREATE TABLE t (i ARRAY<%s>)", typeDefStr));
AnalyzesOk(String.format("CREATE TABLE t (i STRUCT<f:%s... | void function(String... typeDefs) { for (String typeDefStr: typeDefs) { ParseNode stmt = AnalyzesOk(String.format(STR, typeDefStr)); AnalyzesOk(String.format(STR, typeDefStr)); AnalyzesOk(String.format(STR, typeDefStr)); Preconditions.checkState(stmt instanceof CreateTableStmt); CreateTableStmt createTableStmt = (Creat... | /**
* Wraps the given typeDefs in a CREATE TABLE stmt and runs AnalyzesOk().
* Also tests that the type is analyzes correctly in ARRAY, MAP, and STRUCT types.
*/ | Wraps the given typeDefs in a CREATE TABLE stmt and runs AnalyzesOk(). Also tests that the type is analyzes correctly in ARRAY, MAP, and STRUCT types | TypeDefsAnalyzeOk | {
"repo_name": "scalingdata/Impala",
"path": "fe/src/test/java/com/cloudera/impala/analysis/AnalyzeDDLTest.java",
"license": "apache-2.0",
"size": 112770
} | [
"com.cloudera.impala.catalog.Type",
"com.google.common.base.Preconditions"
] | import com.cloudera.impala.catalog.Type; import com.google.common.base.Preconditions; | import com.cloudera.impala.catalog.*; import com.google.common.base.*; | [
"com.cloudera.impala",
"com.google.common"
] | com.cloudera.impala; com.google.common; | 2,573,426 |
private void installApplication(JSONObject data, org.wso2.emm.agent.beans.Operation operation) throws AndroidAgentException {
String appUrl;
String type;
String name;
String operationType;
try {
if (!data.isNull(resources.getString(R.string.app_type))) {
type = data.getString(resources.getString(R.... | void function(JSONObject data, org.wso2.emm.agent.beans.Operation operation) throws AndroidAgentException { String appUrl; String type; String name; String operationType; try { if (!data.isNull(resources.getString(R.string.app_type))) { type = data.getString(resources.getString(R.string.app_type)); if (type.equalsIgnor... | /**
* Install an Application.
*
* @param operation - Operation object.
*/ | Install an Application | installApplication | {
"repo_name": "jeradrutnam/product-mdm",
"path": "modules/mobile-agents/android/client/client/src/main/java/org/wso2/emm/agent/services/Operation.java",
"license": "apache-2.0",
"size": 45337
} | [
"android.util.Log",
"org.json.JSONException",
"org.json.JSONObject",
"org.wso2.emm.agent.AndroidAgentException",
"org.wso2.emm.agent.utils.Constants"
] | import android.util.Log; import org.json.JSONException; import org.json.JSONObject; import org.wso2.emm.agent.AndroidAgentException; import org.wso2.emm.agent.utils.Constants; | import android.util.*; import org.json.*; import org.wso2.emm.agent.*; import org.wso2.emm.agent.utils.*; | [
"android.util",
"org.json",
"org.wso2.emm"
] | android.util; org.json; org.wso2.emm; | 2,143,457 |
public void test_createSocket_wrapping() throws Exception {
try {
Socket underlying = new Socket(TEST_CREATE_SOCKET_HOST, TEST_CREATE_SOCKET_PORT);
mFactory.createSocket(
underlying, TEST_CREATE_SOCKET_HOST, TEST_CREATE_SOCKET_PORT, true);
fail();
... | void function() throws Exception { try { Socket underlying = new Socket(TEST_CREATE_SOCKET_HOST, TEST_CREATE_SOCKET_PORT); mFactory.createSocket( underlying, TEST_CREATE_SOCKET_HOST, TEST_CREATE_SOCKET_PORT, true); fail(); } catch (SSLPeerUnverifiedException expected) { } } | /**
* b/2807618 Make sure that hostname verifcation in cases were it
* is documented to be included by various
* SSLCertificateSocketFactory.createSocket messages.
*
* NOTE: Test will fail if external server is not available.
*/ | b/2807618 Make sure that hostname verifcation in cases were it is documented to be included by various SSLCertificateSocketFactory.createSocket messages | test_createSocket_wrapping | {
"repo_name": "wiki2014/Learning-Summary",
"path": "alps/cts/tests/tests/net/src/android/net/cts/SSLCertificateSocketFactoryTest.java",
"license": "gpl-3.0",
"size": 5098
} | [
"java.net.Socket",
"javax.net.ssl.SSLPeerUnverifiedException"
] | import java.net.Socket; import javax.net.ssl.SSLPeerUnverifiedException; | import java.net.*; import javax.net.ssl.*; | [
"java.net",
"javax.net"
] | java.net; javax.net; | 635,750 |
public void checkName(String name) {
OpenCms.getValidationHandler().checkGroupName(name);
}
| void function(String name) { OpenCms.getValidationHandler().checkGroupName(name); } | /**
* Checks if the provided group name is valid and can be used as an argument value
* for {@link #setName(String)}.<p>
*
* A group name must not be empty or whitespace only.<p>
*
* @param name the group name to check
*
* @see org.opencms.security.I_CmsValidationHan... | Checks if the provided group name is valid and can be used as an argument value for <code>#setName(String)</code>. A group name must not be empty or whitespace only | checkName | {
"repo_name": "comundus/opencms-comundus",
"path": "src/main/java/org/opencms/file/CmsGroup.java",
"license": "lgpl-2.1",
"size": 7590
} | [
"org.opencms.main.OpenCms"
] | import org.opencms.main.OpenCms; | import org.opencms.main.*; | [
"org.opencms.main"
] | org.opencms.main; | 2,434,879 |
@Test(expectedExceptions = { LDAPException.class })
public void testConstructor3ValueSequenceInvalidElementCount()
throws Exception
{
new PostReadResponseControl("1.3.6.1.1.13.2", false,
new ASN1OctetString(new ASN1Sequence().encode()));
} | @Test(expectedExceptions = { LDAPException.class }) void function() throws Exception { new PostReadResponseControl(STR, false, new ASN1OctetString(new ASN1Sequence().encode())); } | /**
* Tests the third constructor with a value sequence with an invalid number of
* elements.
*
* @throws Exception If an unexpected problem occurs.
*/ | Tests the third constructor with a value sequence with an invalid number of elements | testConstructor3ValueSequenceInvalidElementCount | {
"repo_name": "UnboundID/ldapsdk",
"path": "tests/unit/src/com/unboundid/ldap/sdk/controls/PostReadResponseControlTestCase.java",
"license": "gpl-2.0",
"size": 9867
} | [
"com.unboundid.asn1.ASN1OctetString",
"com.unboundid.asn1.ASN1Sequence",
"com.unboundid.ldap.sdk.LDAPException",
"org.testng.annotations.Test"
] | import com.unboundid.asn1.ASN1OctetString; import com.unboundid.asn1.ASN1Sequence; 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; | 628,589 |
public Boolean getUpDownAvailable() {
return (Boolean) store.get( Names.upDownAvailable);
}
| Boolean function() { return (Boolean) store.get( Names.upDownAvailable); } | /**
* get the button supports "button down" and "button up".
* @return the button supports "button down" and "button up".
*/ | get the button supports "button down" and "button up" | getUpDownAvailable | {
"repo_name": "Luxoft/SDLP2",
"path": "SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/SoftButtonCapabilities.java",
"license": "lgpl-2.1",
"size": 4730
} | [
"com.smartdevicelink.proxy.constants.Names"
] | import com.smartdevicelink.proxy.constants.Names; | import com.smartdevicelink.proxy.constants.*; | [
"com.smartdevicelink.proxy"
] | com.smartdevicelink.proxy; | 1,942,299 |
@Override public void enterFunType(@NotNull ErlangParser.FunTypeContext ctx) { } | @Override public void enterFunType(@NotNull ErlangParser.FunTypeContext ctx) { } | /**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/ | The default implementation does nothing | exitTypeSpec | {
"repo_name": "lyskouski/erlang-netbeans",
"path": "src/by/creativity/erlang/lexer/ErlangBaseListener.java",
"license": "gpl-2.0",
"size": 35296
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 2,291,944 |
public IPackageDescriptor getPackageDescriptor(); | IPackageDescriptor function(); | /**
* Return package descriptor related to this
* plugin
* @return
*/ | Return package descriptor related to this plugin | getPackageDescriptor | {
"repo_name": "nikelin/Redshape-AS",
"path": "plugins/src/main/java/com/redshape/plugins/meta/IPluginInfo.java",
"license": "apache-2.0",
"size": 2207
} | [
"com.redshape.plugins.packagers.IPackageDescriptor"
] | import com.redshape.plugins.packagers.IPackageDescriptor; | import com.redshape.plugins.packagers.*; | [
"com.redshape.plugins"
] | com.redshape.plugins; | 613,843 |
public RelNode createNewProject(RelNode projChild, int[] adjustments) {
final List<Pair<RexNode, String>> projects = new ArrayList<>();
if (origProj != null) {
for (Pair<RexNode, String> p : origProj.getNamedProjects()) {
projects.add(
Pair.of(
convertRefsAndExprs(
... | RelNode function(RelNode projChild, int[] adjustments) { final List<Pair<RexNode, String>> projects = new ArrayList<>(); if (origProj != null) { for (Pair<RexNode, String> p : origProj.getNamedProjects()) { projects.add( Pair.of( convertRefsAndExprs( p.left, projChild.getRowType().getFieldList(), adjustments), p.right)... | /**
* Creates a new projection based on the original projection, adjusting all
* input refs using an adjustment array passed in. If there was no original
* projection, create a new one that selects every field from the underlying
* rel.
*
* <p>If the resulting projection would be trivial, return the c... | Creates a new projection based on the original projection, adjusting all input refs using an adjustment array passed in. If there was no original projection, create a new one that selects every field from the underlying rel. If the resulting projection would be trivial, return the child | createNewProject | {
"repo_name": "datametica/calcite",
"path": "core/src/main/java/org/apache/calcite/rel/rules/PushProjector.java",
"license": "apache-2.0",
"size": 30457
} | [
"java.util.ArrayList",
"java.util.BitSet",
"java.util.List",
"org.apache.calcite.linq4j.Ord",
"org.apache.calcite.plan.Strong",
"org.apache.calcite.rel.RelNode",
"org.apache.calcite.rel.type.RelDataTypeField",
"org.apache.calcite.rex.RexNode",
"org.apache.calcite.rex.RexVisitorImpl",
"org.apache.c... | import java.util.ArrayList; import java.util.BitSet; import java.util.List; import org.apache.calcite.linq4j.Ord; import org.apache.calcite.plan.Strong; import org.apache.calcite.rel.RelNode; import org.apache.calcite.rel.type.RelDataTypeField; import org.apache.calcite.rex.RexNode; import org.apache.calcite.rex.RexVis... | import java.util.*; import org.apache.calcite.linq4j.*; import org.apache.calcite.plan.*; import org.apache.calcite.rel.*; import org.apache.calcite.rel.type.*; import org.apache.calcite.rex.*; import org.apache.calcite.util.*; import org.checkerframework.checker.nullness.qual.*; | [
"java.util",
"org.apache.calcite",
"org.checkerframework.checker"
] | java.util; org.apache.calcite; org.checkerframework.checker; | 1,746,720 |
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
private static boolean relaunchTask(boolean incognito, String url) {
if (TextUtils.isEmpty(url)) return false;
Context context = ApplicationStatus.getApplicationContext();
ActivityManager manager =
(ActivityManager) context.getSys... | @TargetApi(Build.VERSION_CODES.LOLLIPOP) static boolean function(boolean incognito, String url) { if (TextUtils.isEmpty(url)) return false; Context context = ApplicationStatus.getApplicationContext(); ActivityManager manager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); for (AppTask task : man... | /**
* Bring the task matching the given URL to the front if the task is retargetable.
* @param incognito Whether or not the tab is incognito.
* @param url URL that the tab would have been created for. If null, this param is ignored.
* @return Whether the task was successfully brought back.
*/ | Bring the task matching the given URL to the front if the task is retargetable | relaunchTask | {
"repo_name": "TheTypoMaster/chromium-crosswalk",
"path": "chrome/android/java/src/org/chromium/chrome/browser/document/ChromeLauncherActivity.java",
"license": "bsd-3-clause",
"size": 35055
} | [
"android.annotation.TargetApi",
"android.app.ActivityManager",
"android.content.Context",
"android.os.Build",
"android.text.TextUtils",
"org.chromium.base.ApplicationStatus",
"org.chromium.chrome.browser.ChromeApplication",
"org.chromium.chrome.browser.tabmodel.document.ActivityDelegate",
"org.chrom... | import android.annotation.TargetApi; import android.app.ActivityManager; import android.content.Context; import android.os.Build; import android.text.TextUtils; import org.chromium.base.ApplicationStatus; import org.chromium.chrome.browser.ChromeApplication; import org.chromium.chrome.browser.tabmodel.document.Activity... | import android.annotation.*; import android.app.*; import android.content.*; import android.os.*; import android.text.*; import org.chromium.base.*; import org.chromium.chrome.browser.*; import org.chromium.chrome.browser.tabmodel.document.*; | [
"android.annotation",
"android.app",
"android.content",
"android.os",
"android.text",
"org.chromium.base",
"org.chromium.chrome"
] | android.annotation; android.app; android.content; android.os; android.text; org.chromium.base; org.chromium.chrome; | 632,569 |
public List<VideoEditInfo> queryCutList(Channel channel, Date recStartTs) throws IOException; | List<VideoEditInfo> function(Channel channel, Date recStartTs) throws IOException; | /**
* Retrieve the list of cut list marks found for the the recording at the
* given channel and start time.
*
* @param channel
* the channel on which the program aired
* @param recStartTs
* the actual (not scheduled) start time of the program
* @return the... | Retrieve the list of cut list marks found for the the recording at the given channel and start time | queryCutList | {
"repo_name": "syphr42/libmythtv-java",
"path": "protocol/src/main/java/org/syphr/mythtv/protocol/Protocol.java",
"license": "apache-2.0",
"size": 50355
} | [
"java.io.IOException",
"java.util.Date",
"java.util.List",
"org.syphr.mythtv.data.Channel",
"org.syphr.mythtv.data.VideoEditInfo"
] | import java.io.IOException; import java.util.Date; import java.util.List; import org.syphr.mythtv.data.Channel; import org.syphr.mythtv.data.VideoEditInfo; | import java.io.*; import java.util.*; import org.syphr.mythtv.data.*; | [
"java.io",
"java.util",
"org.syphr.mythtv"
] | java.io; java.util; org.syphr.mythtv; | 112,683 |
protected final Property parseVendorExtensionContent( String vendorExtension ) {
Matcher matcher = VENDOR_PATTERN.matcher(vendorExtension);
if (!matcher.find()) return null;
String vendorName = removeQuotes(matcher.group(1));
String vendorValue = removeQuotes(matcher.group(3));
... | final Property function( String vendorExtension ) { Matcher matcher = VENDOR_PATTERN.matcher(vendorExtension); if (!matcher.find()) return null; String vendorName = removeQuotes(matcher.group(1)); String vendorValue = removeQuotes(matcher.group(3)); assert vendorName != null; assert vendorValue != null; assert vendorNa... | /**
* Parse the content of the vendor extension excluding the curly braces in the CND content.
*
* @param vendorExtension the vendor extension string; never null
* @return the property representing the vendor extension, or null if the vendor extension is incomplete
*/ | Parse the content of the vendor extension excluding the curly braces in the CND content | parseVendorExtensionContent | {
"repo_name": "phantomjinx/modeshape",
"path": "modeshape-jcr/src/main/java/org/modeshape/jcr/CndImporter.java",
"license": "apache-2.0",
"size": 38876
} | [
"java.util.regex.Matcher",
"org.modeshape.jcr.value.Property"
] | import java.util.regex.Matcher; import org.modeshape.jcr.value.Property; | import java.util.regex.*; import org.modeshape.jcr.value.*; | [
"java.util",
"org.modeshape.jcr"
] | java.util; org.modeshape.jcr; | 1,294,186 |
public ActionForward unselectall(Map paramsIn) {
User user = requestContext.getCurrentUser();
this.setDecl.clear(user);
paramsIn.put("setupdated", "true");
return strutsDelegate.forwardParams(mapping.findForward(forward), paramsIn);
} | ActionForward function(Map paramsIn) { User user = requestContext.getCurrentUser(); this.setDecl.clear(user); paramsIn.put(STR, "true"); return strutsDelegate.forwardParams(mapping.findForward(forward), paramsIn); } | /**
* Clears set for the user.
* @param paramsIn Map of request parameters you want to forward
* along with the ActionForward
* @return The ActionForward to go to next.
*/ | Clears set for the user | unselectall | {
"repo_name": "dmacvicar/spacewalk",
"path": "java/code/src/com/redhat/rhn/frontend/struts/RhnSetHelper.java",
"license": "gpl-2.0",
"size": 6630
} | [
"com.redhat.rhn.domain.user.User",
"java.util.Map",
"org.apache.struts.action.ActionForward"
] | import com.redhat.rhn.domain.user.User; import java.util.Map; import org.apache.struts.action.ActionForward; | import com.redhat.rhn.domain.user.*; import java.util.*; import org.apache.struts.action.*; | [
"com.redhat.rhn",
"java.util",
"org.apache.struts"
] | com.redhat.rhn; java.util; org.apache.struts; | 1,838,102 |
public List<WebElement> getRows() {
return rowList;
}
/**
* Grabs the specified column inside a specified row.
*
* @param rowNo The row number.
* @param colNo The column number.
* @return a {@link WebElement} | List<WebElement> function() { return rowList; } /** * Grabs the specified column inside a specified row. * * @param rowNo The row number. * @param colNo The column number. * @return a {@link WebElement} | /**
* Returns the row list.
*
* @return a {@List} of {@link WebElement]
*/ | Returns the row list | getRows | {
"repo_name": "tolis-e/continuous-integration-of-mobile-web-applications-on-android",
"path": "src/test/java/org/jboss/as/quickstarts/kitchensink/html5/mobile/demo/pages/MembersPage.java",
"license": "apache-2.0",
"size": 5696
} | [
"java.util.List",
"org.openqa.selenium.WebElement"
] | import java.util.List; import org.openqa.selenium.WebElement; | import java.util.*; import org.openqa.selenium.*; | [
"java.util",
"org.openqa.selenium"
] | java.util; org.openqa.selenium; | 133,581 |
private static int modeToMode(String mode) {
int modeBits;
if ("r".equals(mode)) {
modeBits = ParcelFileDescriptor.MODE_READ_ONLY;
} else if ("w".equals(mode) || "wt".equals(mode)) {
modeBits = ParcelFileDescriptor.MODE_WRITE_ONLY
| ParcelFileDescriptor.MODE_CREATE
| ParcelFileDescriptor.MODE_TRUNC... | static int function(String mode) { int modeBits; if ("r".equals(mode)) { modeBits = ParcelFileDescriptor.MODE_READ_ONLY; } else if ("w".equals(mode) "wt".equals(mode)) { modeBits = ParcelFileDescriptor.MODE_WRITE_ONLY ParcelFileDescriptor.MODE_CREATE ParcelFileDescriptor.MODE_TRUNCATE; } else if ("wa".equals(mode)) { m... | /**
* Copied from ContentResolver.java
*/ | Copied from ContentResolver.java | modeToMode | {
"repo_name": "Jaden-J/androidbible",
"path": "Alkitab/src/main/java/yuku/alkitab/base/cp/FileProvider.java",
"license": "apache-2.0",
"size": 5026
} | [
"android.os.ParcelFileDescriptor"
] | import android.os.ParcelFileDescriptor; | import android.os.*; | [
"android.os"
] | android.os; | 111,064 |
synchronized void notifyModelReplacement(M oldModel, M newModel) {
List<IModelListener<M>> oldListeners = modelListeners.get(oldModel);
if (null != oldListeners) {
// are listeners registered (if not, do nothing)
// inform listeners
for (int l = 0; l < oldListener... | synchronized void notifyModelReplacement(M oldModel, M newModel) { List<IModelListener<M>> oldListeners = modelListeners.get(oldModel); if (null != oldListeners) { for (int l = 0; l < oldListeners.size(); l++) { oldListeners.get(l).notifyReplaced(oldModel, newModel); } if (oldModel != newModel) { updateListeners(modelL... | /**
* Notifies registered listeners about replacing a model instance. Changes
* the listener registrations accordingly.
*
* @param oldModel the old model being replaced
* @param newModel the new model replacing <code>oldModel</code>
*/ | Notifies registered listeners about replacing a model instance. Changes the listener registrations accordingly | notifyModelReplacement | {
"repo_name": "SSEHUB/EASyProducer",
"path": "Plugins/VarModel/Utils/src/net/ssehub/easy/basics/modelManagement/ModelEvents.java",
"license": "apache-2.0",
"size": 9949
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,686,541 |
@Override
public void onDragFloatView(View floatView, Point position, Point touch) {
if (mRemoveEnabled && mIsRemoving) {
mPositionX = position.x;
}
} | void function(View floatView, Point position, Point touch) { if (mRemoveEnabled && mIsRemoving) { mPositionX = position.x; } } | /**
* Overrides to provide fading when slide removal is enabled.
*/ | Overrides to provide fading when slide removal is enabled | onDragFloatView | {
"repo_name": "vanilla-music/vanilla",
"path": "app/src/main/java/com/mobeta/android/dslv/DragSortController.java",
"license": "gpl-3.0",
"size": 15740
} | [
"android.graphics.Point",
"android.view.View"
] | import android.graphics.Point; import android.view.View; | import android.graphics.*; import android.view.*; | [
"android.graphics",
"android.view"
] | android.graphics; android.view; | 748,813 |
public static void requestExchangeForwardCancellation(Channel channel, String exchangeName,
Collection<String> bindings) {
try {
sendCommandMessage(channel,exchangeName,Command.UNPUBLISH,EndpointType.FANOUT, bindings, true);
} catch (IOException e) {
System.err.println("Error w... | static void function(Channel channel, String exchangeName, Collection<String> bindings) { try { sendCommandMessage(channel,exchangeName,Command.UNPUBLISH,EndpointType.FANOUT, bindings, true); } catch (IOException e) { System.err.println(STR + exchangeName +"':"); e.printStackTrace(); } } | /**
* Cancel forwarding of a local exchange to the remote AMQP instance
* @param channel A channel used to submit the cancellation request.
* @param queueName The name of the exchange which should no longer be forwarded.
*/ | Cancel forwarding of a local exchange to the remote AMQP instance | requestExchangeForwardCancellation | {
"repo_name": "rapid7/harp",
"path": "harp-amqp-relay-lib/src/main/java/com/rapid7/component/messaging/relay/amqp/MessageRelayControl.java",
"license": "bsd-3-clause",
"size": 7366
} | [
"com.rabbitmq.client.Channel",
"com.rapid7.component.messaging.relay.encoding.MessageRelayEncoding",
"java.io.IOException",
"java.util.Collection"
] | import com.rabbitmq.client.Channel; import com.rapid7.component.messaging.relay.encoding.MessageRelayEncoding; import java.io.IOException; import java.util.Collection; | import com.rabbitmq.client.*; import com.rapid7.component.messaging.relay.encoding.*; import java.io.*; import java.util.*; | [
"com.rabbitmq.client",
"com.rapid7.component",
"java.io",
"java.util"
] | com.rabbitmq.client; com.rapid7.component; java.io; java.util; | 1,534,796 |
PagedIterable<PrivateDnsRecordSet> listRecordSets(int pageSize); | PagedIterable<PrivateDnsRecordSet> listRecordSets(int pageSize); | /**
* Lists all the record sets in this zone with each entries in each page limited to the given size.
*
* @param pageSize the maximum number of record sets in a page
* @return the record sets
*/ | Lists all the record sets in this zone with each entries in each page limited to the given size | listRecordSets | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-privatedns/src/main/java/com/azure/resourcemanager/privatedns/models/PrivateDnsZone.java",
"license": "mit",
"size": 24638
} | [
"com.azure.core.http.rest.PagedIterable"
] | import com.azure.core.http.rest.PagedIterable; | import com.azure.core.http.rest.*; | [
"com.azure.core"
] | com.azure.core; | 341,633 |
public SocketChannel getSocketChannelByPlayer(NetPlayerInfo pInfo) {
synchronized(channelList) {
for(SocketChannel ch: channelList) {
NetPlayerInfo p = playerInfoMap.get(ch);
if((p != null) && (p.uid == pInfo.uid)) {
return ch;
}
}
}
return null;
}
| SocketChannel function(NetPlayerInfo pInfo) { synchronized(channelList) { for(SocketChannel ch: channelList) { NetPlayerInfo p = playerInfoMap.get(ch); if((p != null) && (p.uid == pInfo.uid)) { return ch; } } } return null; } | /**
* Get SocketChannel from NetPlayerInfo
* @param pInfo Player
* @return SocketChannel (null if not found)
*/ | Get SocketChannel from NetPlayerInfo | getSocketChannelByPlayer | {
"repo_name": "sammymax/nullpomino",
"path": "src/mu/nu/nullpo/game/net/NetServer.java",
"license": "bsd-3-clause",
"size": 118621
} | [
"java.nio.channels.SocketChannel"
] | import java.nio.channels.SocketChannel; | import java.nio.channels.*; | [
"java.nio"
] | java.nio; | 20,410 |
public DistinctOperator<T> distinct(int... fields) {
return new DistinctOperator<>(
this, new Keys.ExpressionKeys<>(fields, getType()), Utils.getCallLocationName());
} | DistinctOperator<T> function(int... fields) { return new DistinctOperator<>( this, new Keys.ExpressionKeys<>(fields, getType()), Utils.getCallLocationName()); } | /**
* Returns a distinct set of a {@link Tuple} {@link DataSet} using field position keys.
*
* <p>The field position keys specify the fields of Tuples on which the decision is made if two
* Tuples are distinct or not.
*
* <p>Note: Field position keys can only be specified for Tuple DataSet... | Returns a distinct set of a <code>Tuple</code> <code>DataSet</code> using field position keys. The field position keys specify the fields of Tuples on which the decision is made if two Tuples are distinct or not. Note: Field position keys can only be specified for Tuple DataSets | distinct | {
"repo_name": "apache/flink",
"path": "flink-java/src/main/java/org/apache/flink/api/java/DataSet.java",
"license": "apache-2.0",
"size": 87622
} | [
"org.apache.flink.api.common.operators.Keys",
"org.apache.flink.api.java.operators.DistinctOperator"
] | import org.apache.flink.api.common.operators.Keys; import org.apache.flink.api.java.operators.DistinctOperator; | import org.apache.flink.api.common.operators.*; import org.apache.flink.api.java.operators.*; | [
"org.apache.flink"
] | org.apache.flink; | 2,007,418 |
public List<UserIdentityProvider> getUserIdProviders(int userId) throws RMapAuthException; | List<UserIdentityProvider> function(int userId) throws RMapAuthException; | /**
* Get a list of ID provider details associated with a User Id.
*
* @param userId the user id
* @return the user's id providers
* @throws RMapAuthException the RMap Auth exception
*/ | Get a list of ID provider details associated with a User Id | getUserIdProviders | {
"repo_name": "rmap-project/rmap",
"path": "auth/src/main/java/info/rmapproject/auth/dao/UserIdProviderDao.java",
"license": "apache-2.0",
"size": 2577
} | [
"info.rmapproject.auth.exception.RMapAuthException",
"info.rmapproject.auth.model.UserIdentityProvider",
"java.util.List"
] | import info.rmapproject.auth.exception.RMapAuthException; import info.rmapproject.auth.model.UserIdentityProvider; import java.util.List; | import info.rmapproject.auth.exception.*; import info.rmapproject.auth.model.*; import java.util.*; | [
"info.rmapproject.auth",
"java.util"
] | info.rmapproject.auth; java.util; | 1,744,678 |
@Test
public void testCreateErrorResponseIntObject() throws Exception {
Response result = Whitebox.invokeMethod(target, "createErrorResponse",
Response.INTERNAL_SERVER_ERROR, "Body");
assertThat(result.statusCode, is(Response.INTERNAL_SERVER_ERROR));
assertThat(result.getBody(String.... | void function() throws Exception { Response result = Whitebox.invokeMethod(target, STR, Response.INTERNAL_SERVER_ERROR, "Body"); assertThat(result.statusCode, is(Response.INTERNAL_SERVER_ERROR)); assertThat(result.getBody(String.class), is("Body")); } | /**
* Test method for {@link org.o3project.odenos.core.component.network.Network#createErrorResponse(int, Object)}.
*
* @throws Exception throws Exception in targets
*/ | Test method for <code>org.o3project.odenos.core.component.network.Network#createErrorResponse(int, Object)</code> | testCreateErrorResponseIntObject | {
"repo_name": "haizawa/odenos",
"path": "src/test/java/org/o3project/odenos/core/component/network/NetworkTest.java",
"license": "apache-2.0",
"size": 112118
} | [
"org.hamcrest.CoreMatchers",
"org.junit.Assert",
"org.o3project.odenos.remoteobject.message.Response",
"org.powermock.reflect.Whitebox"
] | import org.hamcrest.CoreMatchers; import org.junit.Assert; import org.o3project.odenos.remoteobject.message.Response; import org.powermock.reflect.Whitebox; | import org.hamcrest.*; import org.junit.*; import org.o3project.odenos.remoteobject.message.*; import org.powermock.reflect.*; | [
"org.hamcrest",
"org.junit",
"org.o3project.odenos",
"org.powermock.reflect"
] | org.hamcrest; org.junit; org.o3project.odenos; org.powermock.reflect; | 990,850 |
@WebMethod
@WebResult(name = "registerPassengerResponse", targetNamespace = "http://pad.polito.it/FDS", partName = "parameters")
@Action(input = "http://pad.polito.it/FDSControl/Control/registerPassengerRequest", output = "http://pad.polito.it/FDSControl/Control/registerPassengerResponse", fault = {
... | @WebResult(name = STR, targetNamespace = STRhttp: @FaultAction(className = UnknownFlightInstance_Exception.class, value = STRhttp: @FaultAction(className = InvalidArgument_Exception.class, value = STRhttp: @FaultAction(className = Monitor_Exception.class, value = STRregisterPassengerSTRhttp: RegisterPassenger parameter... | /**
*
* This operation lets the user to register a checked-in
* passenger on a
* boarding flight instance.
*
*
* @param parameters
* @return
* returns it.polito.dp2.FDS.sol4.server.jaxws.RegisterPassengerResponse
* @throws NotBoarding_Exception
... | This operation lets the user to register a checked-in passenger on a boarding flight instance | registerPassenger | {
"repo_name": "emdotzed/FinalTestSample",
"path": "src/it/polito/dp2/FDS/sol4/server/jaxws/Control.java",
"license": "mit",
"size": 12420
} | [
"javax.jws.WebResult",
"javax.xml.ws.FaultAction"
] | import javax.jws.WebResult; import javax.xml.ws.FaultAction; | import javax.jws.*; import javax.xml.ws.*; | [
"javax.jws",
"javax.xml"
] | javax.jws; javax.xml; | 59,442 |
private void verifyMetadata() {
verifyNotNull(metadata.getName(), "Cluster name must be specified");
verifyNotNull(metadata.getNodes(), "Cluster nodes must be specified");
verifyNotNull(metadata.getPartitions(), "Cluster partitions must be specified");
verify(!met... | void function() { verifyNotNull(metadata.getName(), STR); verifyNotNull(metadata.getNodes(), STR); verifyNotNull(metadata.getPartitions(), STR); verify(!metadata.getNodes().isEmpty(), STR); verify(!metadata.getPartitions().isEmpty(), STR); boolean validPartitions = Collections2.transform(metadata.getNodes(), Controller... | /**
* Validates the constructed metadata for semantic correctness.
* @throws VerifyException if the metadata is misconfigured.
*/ | Validates the constructed metadata for semantic correctness | verifyMetadata | {
"repo_name": "planoAccess/clonedONOS",
"path": "core/api/src/main/java/org/onosproject/cluster/ClusterMetadata.java",
"license": "apache-2.0",
"size": 6393
} | [
"com.google.common.base.Verify",
"com.google.common.collect.Collections2",
"java.util.stream.Collectors"
] | import com.google.common.base.Verify; import com.google.common.collect.Collections2; import java.util.stream.Collectors; | import com.google.common.base.*; import com.google.common.collect.*; import java.util.stream.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 166,656 |
public boolean anyRecoverable(ECBlockGroup blockGroup) {
int erasedCount = blockGroup.getErasedCount();
return erasedCount > 0 && erasedCount <= getRequiredNumParityBlocks();
} | boolean function(ECBlockGroup blockGroup) { int erasedCount = blockGroup.getErasedCount(); return erasedCount > 0 && erasedCount <= getRequiredNumParityBlocks(); } | /**
* Given a BlockGroup, tell if any of the missing blocks can be recovered,
* to be called by ECManager
* @param blockGroup a blockGroup that may contain erased blocks but not sure
* recoverable or not
* @return true if any erased block recoverable, false otherwise
*/ | Given a BlockGroup, tell if any of the missing blocks can be recovered, to be called by ECManager | anyRecoverable | {
"repo_name": "PHILO-HE/SSM",
"path": "smart-hadoop-support/smart-erasurecodec/src/main/java/org/smartdata/erasurecode/grouper/BlockGrouper.java",
"license": "apache-2.0",
"size": 2851
} | [
"org.smartdata.erasurecode.ECBlockGroup"
] | import org.smartdata.erasurecode.ECBlockGroup; | import org.smartdata.erasurecode.*; | [
"org.smartdata.erasurecode"
] | org.smartdata.erasurecode; | 2,217,048 |
public void testCombiningScheduling3() throws Exception {
FreeStyleProject fs = createFreeStyleProject("freestyle");
// scheduleBuild2 returns null if request is combined into an existing item. (no new item added to queue)
Future b1 = fs.scheduleBuild2(3);
Future b2 = fs.scheduleBu... | void function() throws Exception { FreeStyleProject fs = createFreeStyleProject(STR); Future b1 = fs.scheduleBuild2(3); Future b2 = fs.scheduleBuild2(3, null, Collections.singletonList(new RevisionParameterAction(STR))); assertNotNull(b1); assertNotNull(b2); waitUntilNoActivity(); assertEquals(fs.getBuilds().size(),2);... | /** test when there is no revision on the item in the queue
*/ | test when there is no revision on the item in the queue | testCombiningScheduling3 | {
"repo_name": "ialbors/git-plugin",
"path": "src/test/java/hudson/plugins/git/RevisionParameterActionTest.java",
"license": "mit",
"size": 8660
} | [
"hudson.model.FreeStyleProject",
"java.util.Collections",
"java.util.concurrent.Future"
] | import hudson.model.FreeStyleProject; import java.util.Collections; import java.util.concurrent.Future; | import hudson.model.*; import java.util.*; import java.util.concurrent.*; | [
"hudson.model",
"java.util"
] | hudson.model; java.util; | 2,039,253 |
public Map<String, TaskDef> getTaskDefs();
| Map<String, TaskDef> function(); | /**
* Get a copy of all {@code TaskDef}s of this Job.
* @return a map of TaskDef.
*/ | Get a copy of all TaskDefs of this Job | getTaskDefs | {
"repo_name": "nugraviton/chao-open",
"path": "chao-core/src/main/java/com/nugraviton/chao/job/JobContainer.java",
"license": "apache-2.0",
"size": 1235
} | [
"com.nugraviton.chao.job.rmi.TaskDef",
"java.util.Map"
] | import com.nugraviton.chao.job.rmi.TaskDef; import java.util.Map; | import com.nugraviton.chao.job.rmi.*; import java.util.*; | [
"com.nugraviton.chao",
"java.util"
] | com.nugraviton.chao; java.util; | 206,877 |
void addViewToHistory(ModelAndView view, boolean updatePreviousView, HttpSession session);
| void addViewToHistory(ModelAndView view, boolean updatePreviousView, HttpSession session); | /**
* Add view to history.
*
* @param view
* View to add.
* @param updatePreviousView
* Update previous view flag.
* @param session
* HTTP session.
*/ | Add view to history | addViewToHistory | {
"repo_name": "oswa/bianccoAdmin",
"path": "BianccoAdministrator/src/main/java/com/biancco/admin/service/CommonService.java",
"license": "apache-2.0",
"size": 2095
} | [
"javax.servlet.http.HttpSession",
"org.springframework.web.servlet.ModelAndView"
] | import javax.servlet.http.HttpSession; import org.springframework.web.servlet.ModelAndView; | import javax.servlet.http.*; import org.springframework.web.servlet.*; | [
"javax.servlet",
"org.springframework.web"
] | javax.servlet; org.springframework.web; | 1,760,321 |
public List<String> getSupportedSceneModes() {
String str = get(KEY_SCENE_MODE + SUPPORTED_VALUES_SUFFIX);
return split(str);
} | List<String> function() { String str = get(KEY_SCENE_MODE + SUPPORTED_VALUES_SUFFIX); return split(str); } | /**
* Gets the supported scene modes.
*
* @return a list of supported scene modes. null if scene mode setting
* is not supported.
* @see #getSceneMode()
*/ | Gets the supported scene modes | getSupportedSceneModes | {
"repo_name": "OmniEvo/android_frameworks_base",
"path": "core/java/android/hardware/Camera.java",
"license": "gpl-3.0",
"size": 224245
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,223,255 |
private DatanodeID pickSrcDatanode(LocatedBlocks blks, HdfsFileStatus i)
throws IOException {
if (i.getLen() == 0 || blks.getLocatedBlocks().size() <= 0) {
// pick a random datanode
NameNode nn = (NameNode)getServletContext().getAttribute("name.node");
return nn.getNamesystem().getRandomDa... | DatanodeID function(LocatedBlocks blks, HdfsFileStatus i) throws IOException { if (i.getLen() == 0 blks.getLocatedBlocks().size() <= 0) { NameNode nn = (NameNode)getServletContext().getAttribute(STR); return nn.getNamesystem().getRandomDatanode(); } return JspHelper.bestNode(blks); } /** * Service a GET request as desc... | /** Select a datanode to service this request.
* Currently, this looks at no more than the first five blocks of a file,
* selecting a datanode randomly from the most represented.
*/ | Select a datanode to service this request. Currently, this looks at no more than the first five blocks of a file, selecting a datanode randomly from the most represented | pickSrcDatanode | {
"repo_name": "steveloughran/hadoop-hdfs",
"path": "src/java/org/apache/hadoop/hdfs/server/namenode/FileDataServlet.java",
"license": "apache-2.0",
"size": 5420
} | [
"java.io.IOException",
"org.apache.hadoop.hdfs.protocol.DatanodeID",
"org.apache.hadoop.hdfs.protocol.HdfsFileStatus",
"org.apache.hadoop.hdfs.protocol.LocatedBlocks",
"org.apache.hadoop.hdfs.server.common.JspHelper"
] | import java.io.IOException; import org.apache.hadoop.hdfs.protocol.DatanodeID; import org.apache.hadoop.hdfs.protocol.HdfsFileStatus; import org.apache.hadoop.hdfs.protocol.LocatedBlocks; import org.apache.hadoop.hdfs.server.common.JspHelper; | import java.io.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.server.common.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,071,260 |
public void write(CWExporter ex) throws IOException {
OutputCapsule oc = (OutputCapsule) ex.getCapsule(this);
oc.write(name, "name", "");
oc.write(type, "type", "");
oc.write(nameSpace, "nameSpace", "");
oc.write(condition, "condition", null);
oc.write(shaderOutput, "... | void function(CWExporter ex) throws IOException { OutputCapsule oc = (OutputCapsule) ex.getCapsule(this); oc.write(name, "name", STRtypeSTRSTRnameSpaceSTRSTRconditionSTRshaderOutputSTRmultiplicity", null); } | /**
* CW seralization (not used)
*
* @param ex the exporter
* @throws IOException
*/ | CW seralization (not used) | write | {
"repo_name": "PlanetWaves/clockworkengine",
"path": "branches/3.0/engine/src/core/com/clockwork/shader/ShaderNodeVariable.java",
"license": "apache-2.0",
"size": 6183
} | [
"com.clockwork.export.CWExporter",
"com.clockwork.export.OutputCapsule",
"java.io.IOException"
] | import com.clockwork.export.CWExporter; import com.clockwork.export.OutputCapsule; import java.io.IOException; | import com.clockwork.export.*; import java.io.*; | [
"com.clockwork.export",
"java.io"
] | com.clockwork.export; java.io; | 685,328 |
public void output(XMLStreamWriter writer) throws XMLStreamException {
output(writer,null);
}
| void function(XMLStreamWriter writer) throws XMLStreamException { output(writer,null); } | /**
* outputs all files in the filesec
* @param writer
* @throws XMLStreamException
*/ | outputs all files in the filesec | output | {
"repo_name": "opf-labs/ots-schema",
"path": "src/edu/harvard/hul/ois/ots/schemas/METS/StructMap.java",
"license": "gpl-3.0",
"size": 4352
} | [
"javax.xml.stream.XMLStreamException",
"javax.xml.stream.XMLStreamWriter"
] | import javax.xml.stream.XMLStreamException; import javax.xml.stream.XMLStreamWriter; | import javax.xml.stream.*; | [
"javax.xml"
] | javax.xml; | 185,941 |
protected static boolean parsePartHeaders(ByteArrayInputStream pduDataStream,
PduPart part, int length) {
assert(null != pduDataStream);
assert(null != part);
assert(length > 0);
int startPos = pduDataStream.available();
int tempPos = 0;
int last... | static boolean function(ByteArrayInputStream pduDataStream, PduPart part, int length) { assert(null != pduDataStream); assert(null != part); assert(length > 0); int startPos = pduDataStream.available(); int tempPos = 0; int lastLen = length; while(0 < lastLen) { int header = pduDataStream.read(); assert(-1 != header); ... | /**
* Parse part's headers.
*
* @param pduDataStream pdu data input stream
* @param part to store the header informations of the part
* @param length length of the headers
* @return true if parse successfully, false otherwise
*/ | Parse part's headers | parsePartHeaders | {
"repo_name": "mateor/pdroid",
"path": "android-4.0.3_r1/trunk/frameworks/base/core/java/com/google/android/mms/pdu/PduParser.java",
"license": "gpl-3.0",
"size": 75489
} | [
"android.content.res.Resources",
"android.util.Log",
"java.io.ByteArrayInputStream"
] | import android.content.res.Resources; import android.util.Log; import java.io.ByteArrayInputStream; | import android.content.res.*; import android.util.*; import java.io.*; | [
"android.content",
"android.util",
"java.io"
] | android.content; android.util; java.io; | 1,554,385 |
@RequiresPermission(Manifest.permission.CAMERA)
public CameraSource start(SurfaceHolder surfaceHolder) throws IOException {
synchronized (mCameraLock) {
if (mCamera != null) {
return this;
}
mCamera = createCamera();
mCamera.setPreviewDisp... | @RequiresPermission(Manifest.permission.CAMERA) CameraSource function(SurfaceHolder surfaceHolder) throws IOException { synchronized (mCameraLock) { if (mCamera != null) { return this; } mCamera = createCamera(); mCamera.setPreviewDisplay(surfaceHolder); mCamera.startPreview(); mProcessingThread = new Thread(mFrameProc... | /**
* Opens the camera and starts sending preview frames to the underlying detector. The supplied
* surface holder is used for the preview so frames can be displayed to the user.
*
* @param surfaceHolder the surface holder to use for the preview frames
* @throws IOException if the supplied sur... | Opens the camera and starts sending preview frames to the underlying detector. The supplied surface holder is used for the preview so frames can be displayed to the user | start | {
"repo_name": "emoncms/AndroidApp",
"path": "app/src/main/java/org/emoncms/myapps/barcodescanner/camera/CameraSource.java",
"license": "agpl-3.0",
"size": 48638
} | [
"android.support.annotation.RequiresPermission",
"android.view.SurfaceHolder",
"java.io.IOException"
] | import android.support.annotation.RequiresPermission; import android.view.SurfaceHolder; import java.io.IOException; | import android.support.annotation.*; import android.view.*; import java.io.*; | [
"android.support",
"android.view",
"java.io"
] | android.support; android.view; java.io; | 502,714 |
protected File root = null;
protected FileFilter filter = new DummyFilter();
protected boolean done = false;
protected int maxCount = 2000;
public int getMaxCount() {
return maxCount;
}
| File root = null; protected FileFilter filter = new DummyFilter(); protected boolean done = false; protected int maxCount = 2000; public int function() { return maxCount; } | /**
* Getter for {@link #maxCount} property.
* @return value of property
*/ | Getter for <code>#maxCount</code> property | getMaxCount | {
"repo_name": "BradleyRoss/bradleyross-examples",
"path": "src/bradleyross/library/helpers/DirWalker.java",
"license": "lgpl-3.0",
"size": 14229
} | [
"java.io.File",
"java.io.FileFilter"
] | import java.io.File; import java.io.FileFilter; | import java.io.*; | [
"java.io"
] | java.io; | 2,191,805 |
public static String oneAuthorPlusIni(String authorField) {
String fixedAuthorField = AuthorList.fixAuthorForAlphabetization(authorField);
String[] tokens = fixedAuthorField.split("\\s+\\band\\b\\s+");
if (tokens.length == 0) {
return "";
}
String firstAuthor = t... | static String function(String authorField) { String fixedAuthorField = AuthorList.fixAuthorForAlphabetization(authorField); String[] tokens = fixedAuthorField.split(STR); if (tokens.length == 0) { return STR,")[0]; StringBuilder authorSB = new StringBuilder(); authorSB.append(firstAuthor.substring(0, Math.min(CHARS_OF_... | /**
* Gets the first part of the last name of the first
* author/editor, and appends the last name initial of the
* remaining authors/editors.
* Maximum 5 characters
* @param authorField a <code>String</code>
* @return the surname of all authors/editors
*/ | Gets the first part of the last name of the first author/editor, and appends the last name initial of the remaining authors/editors. Maximum 5 characters | oneAuthorPlusIni | {
"repo_name": "mairdl/jabref",
"path": "src/main/java/net/sf/jabref/logic/bibtexkeypattern/BibtexKeyPatternUtil.java",
"license": "mit",
"size": 51274
} | [
"net.sf.jabref.model.entry.AuthorList"
] | import net.sf.jabref.model.entry.AuthorList; | import net.sf.jabref.model.entry.*; | [
"net.sf.jabref"
] | net.sf.jabref; | 2,759,376 |
public static boolean getFastPreviewEnabled() {
if ( mEnableFastPreview == null ) {
boolean value = false;
if ( containsValue( EXTRA_EFFECTS_ENABLE_FAST_PREVIEW ) ) {
value = getValueFromIntent( EXTRA_EFFECTS_ENABLE_FAST_PREVIEW, false );
} else {
int mhz = SystemUtils.getCpuMhz();
if ( mhz ... | static boolean function() { if ( mEnableFastPreview == null ) { boolean value = false; if ( containsValue( EXTRA_EFFECTS_ENABLE_FAST_PREVIEW ) ) { value = getValueFromIntent( EXTRA_EFFECTS_ENABLE_FAST_PREVIEW, false ); } else { int mhz = SystemUtils.getCpuMhz(); if ( mhz > 0 ) { value = mhz >= MHZ_CPU_FAST; } else { fl... | /**
* Get if the fast preview mode is enabled. If the 'effect-enable-fast-preview' intent-extra has been passed within the original
* intent the intent value will be used, otherwise the device cpu speed will be used to determine the return value
*
* @return
*/ | Get if the fast preview mode is enabled. If the 'effect-enable-fast-preview' intent-extra has been passed within the original intent the intent value will be used, otherwise the device cpu speed will be used to determine the return value | getFastPreviewEnabled | {
"repo_name": "photo/mobile-android",
"path": "submodules/Android-Feather/src/com/aviary/android/feather/Constants.java",
"license": "apache-2.0",
"size": 10987
} | [
"com.aviary.android.feather.library.utils.SystemUtils"
] | import com.aviary.android.feather.library.utils.SystemUtils; | import com.aviary.android.feather.library.utils.*; | [
"com.aviary.android"
] | com.aviary.android; | 245,937 |
private void writePoint(MixedEndianDataOutputStream mos, GeoPoint geoPoint)
throws IOException {
this.writeRecordHeader(mos, 20);
final double x = geoPoint.getX();
final double y = geoPoint.getY();
mos.writeLittleEndianInt(POINT_SHAPE_TYPE); // shape type
mos.writeLittle... | void function(MixedEndianDataOutputStream mos, GeoPoint geoPoint) throws IOException { this.writeRecordHeader(mos, 20); final double x = geoPoint.getX(); final double y = geoPoint.getY(); mos.writeLittleEndianInt(POINT_SHAPE_TYPE); mos.writeLittleEndianDouble(x); mos.writeLittleEndianDouble(y); } | /**
* Writes a point to a stream.
*/ | Writes a point to a stream | writePoint | {
"repo_name": "berniejenny/MapAnalyst",
"path": "src/ika/geoexport/ShapeGeometryExporter.java",
"license": "gpl-2.0",
"size": 15105
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,313,277 |
public String getCommand() {
StringBuilder sb = new StringBuilder();
for (String i : command) {
// redirect stderr to stdout
sb.append(i);
sb.append(" 2>&1");
sb.append('\n');
}
Log.d(RootCommands.TAG, "Sending command(s): " + sb.toStri... | String function() { StringBuilder sb = new StringBuilder(); for (String i : command) { sb.append(i); sb.append(STR); sb.append('\n'); } Log.d(RootCommands.TAG, STR + sb.toString()); return sb.toString(); } | /**
* Gets command string executed on the shell
*
* @return
*/ | Gets command string executed on the shell | getCommand | {
"repo_name": "WtfJoke/Rashr",
"path": "root-commands/src/main/java/org/sufficientlysecure/rootcommands/command/Command.java",
"license": "gpl-3.0",
"size": 5322
} | [
"org.sufficientlysecure.rootcommands.RootCommands",
"org.sufficientlysecure.rootcommands.util.Log"
] | import org.sufficientlysecure.rootcommands.RootCommands; import org.sufficientlysecure.rootcommands.util.Log; | import org.sufficientlysecure.rootcommands.*; import org.sufficientlysecure.rootcommands.util.*; | [
"org.sufficientlysecure.rootcommands"
] | org.sufficientlysecure.rootcommands; | 2,687,510 |
public Object getCompactionMetric(String metricName)
{
try
{
switch(metricName)
{
case "BytesCompacted":
return JMX.newMBeanProxy(mbeanServerConn,
new ObjectName("org.apache.cassandra.metrics:type=Compaction,... | Object function(String metricName) { try { switch(metricName) { case STR: return JMX.newMBeanProxy(mbeanServerConn, new ObjectName(STR + metricName), JmxReporter.CounterMBean.class); case STR: case STR: return JMX.newMBeanProxy(mbeanServerConn, new ObjectName(STR + metricName), JmxReporter.GaugeMBean.class).getValue();... | /**
* Retrieve Proxy metrics
* @param metricName CompletedTasks, PendingTasks, BytesCompacted or TotalCompactionsCompleted.
*/ | Retrieve Proxy metrics | getCompactionMetric | {
"repo_name": "iburmistrov/Cassandra",
"path": "src/java/org/apache/cassandra/tools/NodeProbe.java",
"license": "apache-2.0",
"size": 50637
} | [
"com.yammer.metrics.reporting.JmxReporter",
"javax.management.JMX",
"javax.management.MalformedObjectNameException",
"javax.management.ObjectName"
] | import com.yammer.metrics.reporting.JmxReporter; import javax.management.JMX; import javax.management.MalformedObjectNameException; import javax.management.ObjectName; | import com.yammer.metrics.reporting.*; import javax.management.*; | [
"com.yammer.metrics",
"javax.management"
] | com.yammer.metrics; javax.management; | 1,148,997 |
private void replaceThemeAttribute(String attributeName, String oldPrefix,
String newPrefix) {
// Find all "attributeName=" which start with "oldPrefix" using e.g.
// [^src='http://oldpath']
NodeList<Element> elements = querySelectorAll("[" + attributeName
+ "^='"... | void function(String attributeName, String oldPrefix, String newPrefix) { NodeList<Element> elements = querySelectorAll("[" + attributeName + "^='" + oldPrefix + "']"); for (int i = 0; i < elements.getLength(); i++) { Element element = elements.getItem(i); element.setAttribute( attributeName, element.getAttribute(attri... | /**
* Finds any attribute of the given type where theme:// urls have possibly
* been used and replaces any old theme url with a new one
*
* @param attributeName
* The name of the attribute, e.g. "src"
* @param oldPrefix
* The start of the old theme URL
* @p... | Finds any attribute of the given type where theme:// urls have possibly been used and replaces any old theme url with a new one | replaceThemeAttribute | {
"repo_name": "udayinfy/vaadin",
"path": "client/src/com/vaadin/client/ui/ui/UIConnector.java",
"license": "apache-2.0",
"size": 43468
} | [
"com.google.gwt.dom.client.Element",
"com.google.gwt.dom.client.NodeList"
] | import com.google.gwt.dom.client.Element; import com.google.gwt.dom.client.NodeList; | import com.google.gwt.dom.client.*; | [
"com.google.gwt"
] | com.google.gwt; | 1,386,928 |
void send(JmsOutboundMessageDispatch envelope, AsyncResult request) throws IOException, JMSException; | void send(JmsOutboundMessageDispatch envelope, AsyncResult request) throws IOException, JMSException; | /**
* Sends the JmsMessage contained in the outbound dispatch envelope.
*
* @param envelope
* the message envelope containing the JmsMessage to send.
* @param request
* The request object that should be signaled when this operation completes.
*
* @throws IOException... | Sends the JmsMessage contained in the outbound dispatch envelope | send | {
"repo_name": "avranju/qpid-jms",
"path": "qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/Provider.java",
"license": "apache-2.0",
"size": 14970
} | [
"java.io.IOException",
"javax.jms.JMSException",
"org.apache.qpid.jms.message.JmsOutboundMessageDispatch"
] | import java.io.IOException; import javax.jms.JMSException; import org.apache.qpid.jms.message.JmsOutboundMessageDispatch; | import java.io.*; import javax.jms.*; import org.apache.qpid.jms.message.*; | [
"java.io",
"javax.jms",
"org.apache.qpid"
] | java.io; javax.jms; org.apache.qpid; | 738,604 |
public TreeMap getGroupsForSite(){
String siteId = ToolManager.getCurrentPlacement().getContext();
return getGroupsForSite(siteId);
}
| TreeMap function(){ String siteId = ToolManager.getCurrentPlacement().getContext(); return getGroupsForSite(siteId); } | /**
* Returns all groups for site
* @return
*/ | Returns all groups for site | getGroupsForSite | {
"repo_name": "puramshetty/sakai",
"path": "samigo/samigo-services/src/java/org/sakaiproject/tool/assessment/facade/PublishedAssessmentFacadeQueries.java",
"license": "apache-2.0",
"size": 137829
} | [
"java.util.TreeMap",
"org.sakaiproject.tool.cover.ToolManager"
] | import java.util.TreeMap; import org.sakaiproject.tool.cover.ToolManager; | import java.util.*; import org.sakaiproject.tool.cover.*; | [
"java.util",
"org.sakaiproject.tool"
] | java.util; org.sakaiproject.tool; | 1,591,840 |
public Item getItemDropped(IBlockState state, Random rand, int fortune)
{
return Item.getItemFromBlock(this);
} | Item function(IBlockState state, Random rand, int fortune) { return Item.getItemFromBlock(this); } | /**
* Get the Item that this Block should drop when harvested.
*/ | Get the Item that this Block should drop when harvested | getItemDropped | {
"repo_name": "aebert1/BigTransport",
"path": "build/tmp/recompileMc/sources/net/minecraft/block/Block.java",
"license": "gpl-3.0",
"size": 115325
} | [
"java.util.Random",
"net.minecraft.block.state.IBlockState",
"net.minecraft.item.Item"
] | import java.util.Random; import net.minecraft.block.state.IBlockState; import net.minecraft.item.Item; | import java.util.*; import net.minecraft.block.state.*; import net.minecraft.item.*; | [
"java.util",
"net.minecraft.block",
"net.minecraft.item"
] | java.util; net.minecraft.block; net.minecraft.item; | 1,530,811 |
ExternalRepositorySyncRevisionService getExternalRepositorySyncRevisionService() throws RepositoryException; | ExternalRepositorySyncRevisionService getExternalRepositorySyncRevisionService() throws RepositoryException; | /**
* Provides access to the ExternalRepositorySyncRevisionService for this repository.
* @return the ExternalRepositorySyncRevisionService for this repository
* @throws RepositoryException
*/ | Provides access to the ExternalRepositorySyncRevisionService for this repository | getExternalRepositorySyncRevisionService | {
"repo_name": "canhnt/hippo-repo-xacml",
"path": "hippo-repository-3.1.x-xacml/engine/src/main/java/org/onehippo/repository/InternalHippoRepository.java",
"license": "apache-2.0",
"size": 1261
} | [
"javax.jcr.RepositoryException",
"org.onehippo.repository.journal.ExternalRepositorySyncRevisionService"
] | import javax.jcr.RepositoryException; import org.onehippo.repository.journal.ExternalRepositorySyncRevisionService; | import javax.jcr.*; import org.onehippo.repository.journal.*; | [
"javax.jcr",
"org.onehippo.repository"
] | javax.jcr; org.onehippo.repository; | 1,257,274 |
public void mouseReleased(MouseEvent e)
{
if (e.getClickCount() == 2) {
if (selectedItemsListbox.isFocusOwner())
removeItem();
}
}
});
IconManager icons = IconManager.getInstance();
ad... | void function(MouseEvent e) { if (e.getClickCount() == 2) { if (selectedItemsListbox.isFocusOwner()) removeItem(); } } }); IconManager icons = IconManager.getInstance(); addButton = new JButton(icons.getIcon(IconManager.RIGHT_ARROW)); removeButton = new JButton(icons.getIcon(IconManager.LEFT_ARROW)); addAllButton = new... | /**
* Removes the selected elements from the selected list.
* @see MouseListener#mouseReleased(MouseEvent)
*/ | Removes the selected elements from the selected list | mouseReleased | {
"repo_name": "stelfrich/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/util/SelectionWizardUI.java",
"license": "gpl-2.0",
"size": 52439
} | [
"java.awt.event.MouseEvent",
"javax.swing.JButton",
"org.openmicroscopy.shoola.util.ui.IconManager"
] | import java.awt.event.MouseEvent; import javax.swing.JButton; import org.openmicroscopy.shoola.util.ui.IconManager; | import java.awt.event.*; import javax.swing.*; import org.openmicroscopy.shoola.util.ui.*; | [
"java.awt",
"javax.swing",
"org.openmicroscopy.shoola"
] | java.awt; javax.swing; org.openmicroscopy.shoola; | 1,424,896 |
public ForwardCursor<PK> keys(Transaction txn, CursorConfig config)
throws DatabaseException {
return new JoinForwardCursor<PK>(txn, config, true);
}
private static class Condition {
private Database db;
private DatabaseEntry key;
Condition(Database db, DatabaseEn... | ForwardCursor<PK> function(Transaction txn, CursorConfig config) throws DatabaseException { return new JoinForwardCursor<PK>(txn, config, true); } private static class Condition { private Database db; private DatabaseEntry key; Condition(Database db, DatabaseEntry key) { this.db = db; this.key = key; } | /**
* Opens a cursor that returns the primary keys of entities qualifying for
* the join. The join operation is performed as the returned cursor is
* accessed.
*
* @param txn the transaction used to protect all operations performed with
* the cursor, or null if the operations should not b... | Opens a cursor that returns the primary keys of entities qualifying for the join. The join operation is performed as the returned cursor is accessed | keys | {
"repo_name": "plast-lab/DelphJ",
"path": "examples/berkeleydb/com/sleepycat/persist/EntityJoin.java",
"license": "mit",
"size": 10830
} | [
"com.sleepycat.je.CursorConfig",
"com.sleepycat.je.Database",
"com.sleepycat.je.DatabaseEntry",
"com.sleepycat.je.DatabaseException",
"com.sleepycat.je.Transaction"
] | import com.sleepycat.je.CursorConfig; import com.sleepycat.je.Database; import com.sleepycat.je.DatabaseEntry; import com.sleepycat.je.DatabaseException; import com.sleepycat.je.Transaction; | import com.sleepycat.je.*; | [
"com.sleepycat.je"
] | com.sleepycat.je; | 1,392,297 |
boolean mayBrowsePortlet(IAuthorizationPrincipal principal, IPortletDefinition portletDefinition); | boolean mayBrowsePortlet(IAuthorizationPrincipal principal, IPortletDefinition portletDefinition); | /**
* Answers whether the given user may browse the portlet marketplace entry for the given portlet definition.
*
* @param principal A non-null IPerson who might be permitted to browse the entry
* @param portletDefinition A non-null portlet definition the Marketplace entry of which the user might br... | Answers whether the given user may browse the portlet marketplace entry for the given portlet definition | mayBrowsePortlet | {
"repo_name": "kole9273/uPortal",
"path": "uportal-war/src/main/java/org/jasig/portal/portlet/marketplace/IMarketplaceService.java",
"license": "apache-2.0",
"size": 4545
} | [
"org.jasig.portal.portlet.om.IPortletDefinition",
"org.jasig.portal.security.IAuthorizationPrincipal"
] | import org.jasig.portal.portlet.om.IPortletDefinition; import org.jasig.portal.security.IAuthorizationPrincipal; | import org.jasig.portal.portlet.om.*; import org.jasig.portal.security.*; | [
"org.jasig.portal"
] | org.jasig.portal; | 721,531 |
private String extractDoc(JsonNode node) {
if (node != null) {
if (node.has(DOC)) {
return node.get(DOC).asText();
} else if (node.has(DESCRIPTION)) {
// This is to support older standards of cwl which use description instead of doc
ret... | String function(JsonNode node) { if (node != null) { if (node.has(DOC)) { return node.get(DOC).asText(); } else if (node.has(DESCRIPTION)) { return node.get(DESCRIPTION).asText(); } } return null; } | /**
* Extract the doc or description from a node
* @param node The node to have the doc/description extracted from
* @return The string for the doc/description of the node
*/ | Extract the doc or description from a node | extractDoc | {
"repo_name": "common-workflow-language/cwlviewer",
"path": "src/main/java/org/commonwl/view/cwl/CWLService.java",
"license": "apache-2.0",
"size": 40945
} | [
"com.fasterxml.jackson.databind.JsonNode"
] | import com.fasterxml.jackson.databind.JsonNode; | import com.fasterxml.jackson.databind.*; | [
"com.fasterxml.jackson"
] | com.fasterxml.jackson; | 2,426,262 |
public void shutdown() {
// -------------------- BEGIN CRITICAL SECTION -------------------
synchronized (lock) {
if (!isShutDown) {
// mark as shutdown and release memory
isShutDown = true;
numNonAllocatedPages = 0;
// go over all allocated segments and release them
for (Set<MemorySegmen... | void function() { synchronized (lock) { if (!isShutDown) { isShutDown = true; numNonAllocatedPages = 0; for (Set<MemorySegment> segments : allocatedSegments.values()) { for (MemorySegment seg : segments) { seg.free(); } } memoryPool.clear(); } } } | /**
* Shuts the memory manager down, trying to release all the memory it managed. Depending
* on implementation details, the memory does not necessarily become reclaimable by the
* garbage collector, because there might still be references to allocated segments in the
* code that allocated them from the memory ... | Shuts the memory manager down, trying to release all the memory it managed. Depending on implementation details, the memory does not necessarily become reclaimable by the garbage collector, because there might still be references to allocated segments in the code that allocated them from the memory manager | shutdown | {
"repo_name": "zimmermatt/flink",
"path": "flink-runtime/src/main/java/org/apache/flink/runtime/memory/MemoryManager.java",
"license": "apache-2.0",
"size": 23339
} | [
"java.util.Set",
"org.apache.flink.core.memory.MemorySegment"
] | import java.util.Set; import org.apache.flink.core.memory.MemorySegment; | import java.util.*; import org.apache.flink.core.memory.*; | [
"java.util",
"org.apache.flink"
] | java.util; org.apache.flink; | 2,463,015 |
@Override
protected void process(ClusterDistributionManager dm) {
SearchLoadAndWriteProcessor processor = null;
processor = (SearchLoadAndWriteProcessor) getProcessorKeeper().retrieve(processorId);
if (processor == null) {
if (logger.isDebugEnabled()) {
logger.debug("NetLoadR... | void function(ClusterDistributionManager dm) { SearchLoadAndWriteProcessor processor = null; processor = (SearchLoadAndWriteProcessor) getProcessorKeeper().retrieve(processorId); if (processor == null) { if (logger.isDebugEnabled()) { logger.debug(STR); } return; } processor.incomingNetLoadReply(this.result, 0, this.aC... | /**
* Invoked on the receiver - which, in this case, was the initiator of the
* NetLoadRequestMessage. This concludes the net request, by communicating an object value.
*/ | Invoked on the receiver - which, in this case, was the initiator of the NetLoadRequestMessage. This concludes the net request, by communicating an object value | process | {
"repo_name": "davinash/geode",
"path": "geode-core/src/main/java/org/apache/geode/internal/cache/SearchLoadAndWriteProcessor.java",
"license": "apache-2.0",
"size": 97036
} | [
"org.apache.geode.distributed.internal.ClusterDistributionManager"
] | import org.apache.geode.distributed.internal.ClusterDistributionManager; | import org.apache.geode.distributed.internal.*; | [
"org.apache.geode"
] | org.apache.geode; | 2,746,780 |
public ISphinxClient getDelegate() {
if (delegate == null) throw new IllegalStateException("The underlying sphinx client has been closed.");
return delegate;
} | ISphinxClient function() { if (delegate == null) throw new IllegalStateException(STR); return delegate; } | /**
* Returns the underlying sphinx client instance wrapped by this proxy instance. This method will
* throw an exception if the client has been closed and returned to the pool.
*
* @return wrapped client instance
* @throws IllegalStateException if client is closed
*/ | Returns the underlying sphinx client instance wrapped by this proxy instance. This method will throw an exception if the client has been closed and returned to the pool | getDelegate | {
"repo_name": "bcowdery/sphinx-api-pool",
"path": "src/main/java/org/sphinx/pool/SphinxClientProxy.java",
"license": "mit",
"size": 8885
} | [
"org.sphinx.api.ISphinxClient"
] | import org.sphinx.api.ISphinxClient; | import org.sphinx.api.*; | [
"org.sphinx.api"
] | org.sphinx.api; | 2,105,631 |
private Map<String, BigdataURIImpl> getXSDMap() {
final Map<String, BigdataURIImpl> map = new LinkedHashMap<String, BigdataURIImpl>();
final BigdataURIImpl[] a = new BigdataURIImpl[] { xsd_string,
xsd_dateTime, xsd_date, xsd_long, xsd_int, xsd_byte, xsd_short,
xsd_double, xsd_float, xsd_boolean };
for... | Map<String, BigdataURIImpl> function() { final Map<String, BigdataURIImpl> map = new LinkedHashMap<String, BigdataURIImpl>(); final BigdataURIImpl[] a = new BigdataURIImpl[] { xsd_string, xsd_dateTime, xsd_date, xsd_long, xsd_int, xsd_byte, xsd_short, xsd_double, xsd_float, xsd_boolean }; for (BigdataURIImpl x : a) { m... | /**
* Populate and return a map for fast resolution of XSD URIs.
*/ | Populate and return a map for fast resolution of XSD URIs | getXSDMap | {
"repo_name": "rac021/blazegraph_1_5_3_cluster_2_nodes",
"path": "bigdata-rdf/src/java/com/bigdata/rdf/model/BigdataValueFactoryImpl.java",
"license": "gpl-2.0",
"size": 20758
} | [
"java.util.LinkedHashMap",
"java.util.Map"
] | import java.util.LinkedHashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,252,130 |
public E sample(Random rand) {
double total = totalCount();
if (total <= 0.0) {
throw new RuntimeException(String.format(
"Attempting to sample() with totalCount() %.3f\n", total));
}
double sum = 0.0;
double r = rand.nextDouble();
for (Map.Entry<E, Double> entry : entries.entrySet()) {
double... | E function(Random rand) { double total = totalCount(); if (total <= 0.0) { throw new RuntimeException(String.format( STR, total)); } double sum = 0.0; double r = rand.nextDouble(); for (Map.Entry<E, Double> entry : entries.entrySet()) { double count = entry.getValue(); double frac = count / total; sum += frac; if (r < ... | /**
* Will return a sample from the counter, will throw exception if any of the
* counts are < 0.0 or if the totalCount() <= 0.0
*
* @return
*
* @author aria42
*/ | Will return a sample from the counter, will throw exception if any of the counts are < 0.0 or if the totalCount() <= 0.0 | sample | {
"repo_name": "jpatanooga/Metronome",
"path": "src/main/java/tv/floe/metronome/berkley/Counter.java",
"license": "apache-2.0",
"size": 14013
} | [
"java.util.Map",
"java.util.Random"
] | import java.util.Map; import java.util.Random; | import java.util.*; | [
"java.util"
] | java.util; | 424,905 |
public Dimension getPreferredSize()
{
return new Dimension(350,400);
} | Dimension function() { return new Dimension(350,400); } | /**
* Returns the desired size of the display, for use by layout manager.
* @return preferred size
*/ | Returns the desired size of the display, for use by layout manager | getPreferredSize | {
"repo_name": "fazerlicourice7/botWorld",
"path": "RatBots16_0/src/gui/RatBotsScoreBoard.java",
"license": "gpl-3.0",
"size": 8644
} | [
"java.awt.Dimension"
] | import java.awt.Dimension; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,792,047 |
@Override
@SafeVarargs
public final PCollectionContentsAssert<T> containsInAnyOrder(T... expectedElements) {
return containsInAnyOrder(Arrays.asList(expectedElements));
} | final PCollectionContentsAssert<T> function(T... expectedElements) { return containsInAnyOrder(Arrays.asList(expectedElements)); } | /**
* Checks that the {@code Iterable} contains the expected elements, in any order.
*
* <p>Returns this {@code IterableAssert}.
*/ | Checks that the Iterable contains the expected elements, in any order. Returns this IterableAssert | containsInAnyOrder | {
"repo_name": "eljefe6a/incubator-beam",
"path": "sdks/java/core/src/main/java/org/apache/beam/sdk/testing/PAssert.java",
"license": "apache-2.0",
"size": 58752
} | [
"java.util.Arrays",
"org.hamcrest.Matchers"
] | import java.util.Arrays; import org.hamcrest.Matchers; | import java.util.*; import org.hamcrest.*; | [
"java.util",
"org.hamcrest"
] | java.util; org.hamcrest; | 2,396,167 |
public StorageAccountUpdateParameters withSku(SkuInner sku) {
this.sku = sku;
return this;
} | StorageAccountUpdateParameters function(SkuInner sku) { this.sku = sku; return this; } | /**
* Set gets or sets the SKU name. Note that the SKU name cannot be updated to Standard_ZRS, Premium_LRS or Premium_ZRS, nor can accounts of those SKU names be updated to any other value.
*
* @param sku the sku value to set
* @return the StorageAccountUpdateParameters object itself.
*/ | Set gets or sets the SKU name. Note that the SKU name cannot be updated to Standard_ZRS, Premium_LRS or Premium_ZRS, nor can accounts of those SKU names be updated to any other value | withSku | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/storage/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/storage/v2019_04_01/StorageAccountUpdateParameters.java",
"license": "mit",
"size": 14066
} | [
"com.microsoft.azure.management.storage.v2019_04_01.implementation.SkuInner"
] | import com.microsoft.azure.management.storage.v2019_04_01.implementation.SkuInner; | import com.microsoft.azure.management.storage.v2019_04_01.implementation.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 1,286,021 |
public static Element toXML(Document doc, AbstractConfigurator<? extends Configurable> configurator,
Configurable configurable) {
Element element = doc.createElement(configurator.getTypeId());
element.setAttribute("name", configurable.getName());
if (configurable.getId() != -1) {
element.setAttribu... | static Element function(Document doc, AbstractConfigurator<? extends Configurable> configurator, Configurable configurable) { Element element = doc.createElement(configurator.getTypeId()); element.setAttribute("name", configurable.getName()); if (configurable.getId() != -1) { element.setAttribute("id", String.valueOf(c... | /**
* Creates an XML-element where the tag name equals {@link Configurator#getTypeId()}. This tag
* has name and id attributes corresponding to {@link Configurable#getName()} and
* {@link Configurable#getId()}. The parameters are encoded as tags whose name matches
* {@link ParameterType#getKey()} and the text-c... | Creates an XML-element where the tag name equals <code>Configurator#getTypeId()</code>. This tag has name and id attributes corresponding to <code>Configurable#getName()</code> and <code>Configurable#getId()</code>. The parameters are encoded as tags whose name matches <code>ParameterType#getKey()</code> and the text-c... | toXML | {
"repo_name": "boob-sbcm/3838438",
"path": "src/main/java/com/rapidminer/tools/config/ConfigurationManager.java",
"license": "agpl-3.0",
"size": 46118
} | [
"com.rapidminer.tools.container.ComparablePair",
"java.security.Key",
"java.util.Map",
"java.util.Set",
"org.w3c.dom.Document",
"org.w3c.dom.Element"
] | import com.rapidminer.tools.container.ComparablePair; import java.security.Key; import java.util.Map; import java.util.Set; import org.w3c.dom.Document; import org.w3c.dom.Element; | import com.rapidminer.tools.container.*; import java.security.*; import java.util.*; import org.w3c.dom.*; | [
"com.rapidminer.tools",
"java.security",
"java.util",
"org.w3c.dom"
] | com.rapidminer.tools; java.security; java.util; org.w3c.dom; | 1,511,659 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.