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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
protected void checkFragmentation(Txn transaction, DocumentSet docs) throws EXistException {
int fragmentationLimit = -1;
final Object property = broker.getBrokerPool().getConfiguration().getProperty(DBBroker.PROPERTY_XUPDATE_FRAGMENTATION_FACTOR);
if (property != null)
{fragmentatio... | void function(Txn transaction, DocumentSet docs) throws EXistException { int fragmentationLimit = -1; final Object property = broker.getBrokerPool().getConfiguration().getProperty(DBBroker.PROPERTY_XUPDATE_FRAGMENTATION_FACTOR); if (property != null) {fragmentationLimit = (Integer) property;} for(final Iterator<Documen... | /**
* Check if any of the modified documents needs defragmentation.
*
* Defragmentation will take place if the number of split pages in the
* document exceeds the limit defined in the configuration file.
*
* @param transaction the database transaction.
* @param docs the documents
*
* @throws EXistExc... | Check if any of the modified documents needs defragmentation. Defragmentation will take place if the number of split pages in the document exceeds the limit defined in the configuration file | checkFragmentation | {
"repo_name": "windauer/exist",
"path": "exist-core/src/main/java/org/exist/xupdate/Modification.java",
"license": "lgpl-2.1",
"size": 13040
} | [
"java.util.Iterator",
"org.exist.EXistException",
"org.exist.dom.persistent.DocumentImpl",
"org.exist.dom.persistent.DocumentSet",
"org.exist.storage.DBBroker",
"org.exist.storage.txn.Txn"
] | import java.util.Iterator; import org.exist.EXistException; import org.exist.dom.persistent.DocumentImpl; import org.exist.dom.persistent.DocumentSet; import org.exist.storage.DBBroker; import org.exist.storage.txn.Txn; | import java.util.*; import org.exist.*; import org.exist.dom.persistent.*; import org.exist.storage.*; import org.exist.storage.txn.*; | [
"java.util",
"org.exist",
"org.exist.dom",
"org.exist.storage"
] | java.util; org.exist; org.exist.dom; org.exist.storage; | 2,287,234 |
public Presence addParticipant(JID fullJID, String reason, MUCRole senderRole)
throws NotAllowedException, ForbiddenException; | Presence function(JID fullJID, String reason, MUCRole senderRole) throws NotAllowedException, ForbiddenException; | /**
* Changes the role of the user within the room to participant. A participant is allowed to send
* messages to the room (i.e. has voice) and may change the room's subject.
*
* @param fullJID The full JID of the occupant to give participant privileges.
* @param reason The reason why participa... | Changes the role of the user within the room to participant. A participant is allowed to send messages to the room (i.e. has voice) and may change the room's subject | addParticipant | {
"repo_name": "AndrewChanChina/pps1",
"path": "src/java/org/jivesoftware/openfire/muc/MUCRoom.java",
"license": "apache-2.0",
"size": 44866
} | [
"org.xmpp.packet.Presence"
] | import org.xmpp.packet.Presence; | import org.xmpp.packet.*; | [
"org.xmpp.packet"
] | org.xmpp.packet; | 829,419 |
public Calendar getDate() throws RepositoryException {
return getValue().getDate();
} | Calendar function() throws RepositoryException { return getValue().getDate(); } | /**
* Returns the date value of this property.
* <p>
* The default implementation forwards the method call to the
* {@link Value} instance returned by the generic
* {@link Property#getValue()} method.
*
* @return date value
* @throws RepositoryException if an error occurs
*/ | Returns the date value of this property. The default implementation forwards the method call to the <code>Value</code> instance returned by the generic <code>Property#getValue()</code> method | getDate | {
"repo_name": "sdmcraft/jackrabbit",
"path": "jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/AbstractProperty.java",
"license": "apache-2.0",
"size": 21156
} | [
"java.util.Calendar",
"javax.jcr.RepositoryException"
] | import java.util.Calendar; import javax.jcr.RepositoryException; | import java.util.*; import javax.jcr.*; | [
"java.util",
"javax.jcr"
] | java.util; javax.jcr; | 813,646 |
@Nullable
IElementType getPrefixExpressionElementType(); | IElementType getPrefixExpressionElementType(); | /**
* Provides element types to finish prefix element marker
* @return IElementType
*/ | Provides element types to finish prefix element marker | getPrefixExpressionElementType | {
"repo_name": "android-ia/platform_tools_idea",
"path": "platform/lang-impl/src/com/intellij/indentation/OperationParserHelper.java",
"license": "apache-2.0",
"size": 6386
} | [
"com.intellij.psi.tree.IElementType"
] | import com.intellij.psi.tree.IElementType; | import com.intellij.psi.tree.*; | [
"com.intellij.psi"
] | com.intellij.psi; | 145,099 |
private int getBitNumber(String privilegeName)
{
PrivilegeLocator instance = PrivilegeLocator.getInstance();
edu.wustl.security.privilege.Privilege privilege = instance
.getPrivilegeByName(privilegeName);
return privilege.getBitNumber();
}
| int function(String privilegeName) { PrivilegeLocator instance = PrivilegeLocator.getInstance(); edu.wustl.security.privilege.Privilege privilege = instance .getPrivilegeByName(privilegeName); return privilege.getBitNumber(); } | /**
* This method gets Bit Number of privilege Name.
* @param privilegeName privilegeName privilege Name.
* @return bit number of given privilege.
*/ | This method gets Bit Number of privilege Name | getBitNumber | {
"repo_name": "NCIP/catissue-security-manager",
"path": "software/SecurityManager/src/main/java/edu/wustl/security/privilege/PrivilegeCache.java",
"license": "bsd-3-clause",
"size": 11786
} | [
"edu.wustl.security.locator.PrivilegeLocator",
"gov.nih.nci.security.authorization.domainobjects.Privilege"
] | import edu.wustl.security.locator.PrivilegeLocator; import gov.nih.nci.security.authorization.domainobjects.Privilege; | import edu.wustl.security.locator.*; import gov.nih.nci.security.authorization.domainobjects.*; | [
"edu.wustl.security",
"gov.nih.nci"
] | edu.wustl.security; gov.nih.nci; | 1,109,384 |
ForwardingRule create(Context context);
} | ForwardingRule create(Context context); } | /**
* Executes the create request.
*
* @param context The context to associate with this operation.
* @return the created resource.
*/ | Executes the create request | create | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/dnsresolver/azure-resourcemanager-dnsresolver/src/main/java/com/azure/resourcemanager/dnsresolver/models/ForwardingRule.java",
"license": "mit",
"size": 11278
} | [
"com.azure.core.util.Context"
] | import com.azure.core.util.Context; | import com.azure.core.util.*; | [
"com.azure.core"
] | com.azure.core; | 1,861,870 |
public void checkDescriptor(AbstractSession session) throws QueryException {
if (this.descriptor == null) {
if (getReferenceClass() == null) {
throw QueryException.referenceClassMissing(this);
}
ClassDescriptor referenceDescriptor;
//Bug#394771... | void function(AbstractSession session) throws QueryException { if (this.descriptor == null) { if (getReferenceClass() == null) { throw QueryException.referenceClassMissing(this); } ClassDescriptor referenceDescriptor; if (getSelectionObject() != null && session.getProject().hasProxyIndirection()) { referenceDescriptor ... | /**
* INTERNAL:
* Ensure that the descriptor has been set.
*/ | Ensure that the descriptor has been set | checkDescriptor | {
"repo_name": "RallySoftware/eclipselink.runtime",
"path": "foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/queries/ReadObjectQuery.java",
"license": "epl-1.0",
"size": 48630
} | [
"org.eclipse.persistence.descriptors.ClassDescriptor",
"org.eclipse.persistence.exceptions.QueryException",
"org.eclipse.persistence.internal.sessions.AbstractSession"
] | import org.eclipse.persistence.descriptors.ClassDescriptor; import org.eclipse.persistence.exceptions.QueryException; import org.eclipse.persistence.internal.sessions.AbstractSession; | import org.eclipse.persistence.descriptors.*; import org.eclipse.persistence.exceptions.*; import org.eclipse.persistence.internal.sessions.*; | [
"org.eclipse.persistence"
] | org.eclipse.persistence; | 1,201,491 |
public void getRefs(Commit commit, Set<Ref> refs) {
HeadSet.Head[] heads = hsb.select(commit.getHeads());
for (HeadSet.Head head : heads) {
refs.addAll(this.refs.byId(head));
}
}
public static class GroupByRefMap {
private final HashMap<AnyObjectId, HeadSet.... | void function(Commit commit, Set<Ref> refs) { HeadSet.Head[] heads = hsb.select(commit.getHeads()); for (HeadSet.Head head : heads) { refs.addAll(this.refs.byId(head)); } } public static class GroupByRefMap { private final HashMap<AnyObjectId, HeadSet.Head> total = new HashMap<>(); private final HashMap<AnyObjectId, He... | /**
* Find all refs that the specified commit is reachable from.
*
* <p>The specified commit must be taken from this list by some index.
* If commit origins from some other list, the behaviour of this method
* is unknown.</p>
*
* @param commit Find all refs that contain this commit.
... | Find all refs that the specified commit is reachable from. The specified commit must be taken from this list by some index. If commit origins from some other list, the behaviour of this method is unknown | getRefs | {
"repo_name": "aradzie/git-roadmap",
"path": "src/main/java/roadmap/graph/CommitList.java",
"license": "gpl-2.0",
"size": 27881
} | [
"java.util.HashMap",
"java.util.Set",
"org.eclipse.jgit.lib.AnyObjectId"
] | import java.util.HashMap; import java.util.Set; import org.eclipse.jgit.lib.AnyObjectId; | import java.util.*; import org.eclipse.jgit.lib.*; | [
"java.util",
"org.eclipse.jgit"
] | java.util; org.eclipse.jgit; | 2,477,837 |
public List<String> getIDsByNames(List<String> namesList, String tenantDomain)
throws IdentityRoleManagementException {
List<String> usersIDList = new ArrayList<>();
for (String name : namesList) {
usersIDList.add(getIDByName(name, tenantDomain));
}
return us... | List<String> function(List<String> namesList, String tenantDomain) throws IdentityRoleManagementException { List<String> usersIDList = new ArrayList<>(); for (String name : namesList) { usersIDList.add(getIDByName(name, tenantDomain)); } return usersIDList; } | /**
* Retrieve the user IDs for the given names list.
*
* @param namesList User names list.
* @param tenantDomain Tenant domain.
* @return List of user IDs.
* @throws IdentityRoleManagementException IdentityRoleManagementException.
*/ | Retrieve the user IDs for the given names list | getIDsByNames | {
"repo_name": "wso2/carbon-identity-framework",
"path": "components/role-mgt/org.wso2.carbon.identity.role.mgt.core/src/main/java/org/wso2/carbon/identity/role/mgt/core/util/UserIDResolver.java",
"license": "apache-2.0",
"size": 7428
} | [
"java.util.ArrayList",
"java.util.List",
"org.wso2.carbon.identity.role.mgt.core.IdentityRoleManagementException"
] | import java.util.ArrayList; import java.util.List; import org.wso2.carbon.identity.role.mgt.core.IdentityRoleManagementException; | import java.util.*; import org.wso2.carbon.identity.role.mgt.core.*; | [
"java.util",
"org.wso2.carbon"
] | java.util; org.wso2.carbon; | 765,010 |
public static boolean validateToken( String token, User user ) {
return sha256( user.getUserName() ).equals( token );
} | static boolean function( String token, User user ) { return sha256( user.getUserName() ).equals( token ); } | /**
* Returns true if the given token is valid.
* @param token
* @param user
* @return
*/ | Returns true if the given token is valid | validateToken | {
"repo_name": "milleniu/JavaForWeb.CandiesForAll",
"path": "candies-for-all-backend/src/main/java/fr/intech/s5/candiesforall/backend/util/security/Cryptography.java",
"license": "mit",
"size": 912
} | [
"fr.intech.s5.candiesforall.backend.entity.User"
] | import fr.intech.s5.candiesforall.backend.entity.User; | import fr.intech.s5.candiesforall.backend.entity.*; | [
"fr.intech.s5"
] | fr.intech.s5; | 2,147,328 |
@Nullable
public ServerServiceDefinition addService(BindableService bindableService) {
return addService(bindableService.bindService());
} | ServerServiceDefinition function(BindableService bindableService) { return addService(bindableService.bindService()); } | /**
* Registers a service.
*
* @return the previously registered service with the same service descriptor name if exists,
* otherwise {@code null}.
*/ | Registers a service | addService | {
"repo_name": "anuraaga/grpc-java",
"path": "core/src/main/java/io/grpc/util/MutableHandlerRegistry.java",
"license": "bsd-3-clause",
"size": 4195
} | [
"io.grpc.BindableService",
"io.grpc.ServerServiceDefinition"
] | import io.grpc.BindableService; import io.grpc.ServerServiceDefinition; | import io.grpc.*; | [
"io.grpc"
] | io.grpc; | 572,170 |
public SimpleMapRefSetMemberList findSimpleMapRefSetMembers(String refsetId,
String terminology, String version, PfsParameter pfs) throws Exception; | SimpleMapRefSetMemberList function(String refsetId, String terminology, String version, PfsParameter pfs) throws Exception; | /**
* Returns the simple map ref set members for the specified refset id.
*
* @param refsetId the refset id
* @param terminology the terminology
* @param version the version
* @param pfs the pfs
* @return the simple map ref set members
* @throws Exception the exception
*/ | Returns the simple map ref set members for the specified refset id | findSimpleMapRefSetMembers | {
"repo_name": "WestCoastInformatics/SNOMED-Terminology-Server",
"path": "services/src/main/java/org/ihtsdo/otf/ts/services/ContentService.java",
"license": "apache-2.0",
"size": 38037
} | [
"org.ihtsdo.otf.ts.helpers.PfsParameter",
"org.ihtsdo.otf.ts.helpers.SimpleMapRefSetMemberList"
] | import org.ihtsdo.otf.ts.helpers.PfsParameter; import org.ihtsdo.otf.ts.helpers.SimpleMapRefSetMemberList; | import org.ihtsdo.otf.ts.helpers.*; | [
"org.ihtsdo.otf"
] | org.ihtsdo.otf; | 784,369 |
@Test
public void buildsFoldedBlockScalarNoNewLines() {
final Scalar scalar = new RtYamlScalarBuilder()
.addLine("a folded scalar")
.addLine("that will be on the same line")
.buildPlainScalar();
MatcherAssert.assertThat(
scalar.value(), Matchers.eq... | void function() { final Scalar scalar = new RtYamlScalarBuilder() .addLine(STR) .addLine(STR) .buildPlainScalar(); MatcherAssert.assertThat( scalar.value(), Matchers.equalTo(STR) ); } | /**
* RtYamlScalarBuilder can build a folded block scalar with multiple lines.
* @checkstyle LineLength (30 lines)
*/ | RtYamlScalarBuilder can build a folded block scalar with multiple lines | buildsFoldedBlockScalarNoNewLines | {
"repo_name": "decorators-squad/camel",
"path": "src/test/java/com/amihaiemil/eoyaml/RtYamlScalarBuilderTest.java",
"license": "bsd-3-clause",
"size": 7010
} | [
"org.hamcrest.MatcherAssert",
"org.hamcrest.Matchers"
] | import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; | import org.hamcrest.*; | [
"org.hamcrest"
] | org.hamcrest; | 1,870,036 |
public void testUnconfigurableExecutorService() {
ExecutorService e = Executors.unconfigurableExecutorService(Executors.newFixedThreadPool(2));
e.execute(new NoOpRunnable());
e.execute(new NoOpRunnable());
e.execute(new NoOpRunnable());
joinPool(e);
} | void function() { ExecutorService e = Executors.unconfigurableExecutorService(Executors.newFixedThreadPool(2)); e.execute(new NoOpRunnable()); e.execute(new NoOpRunnable()); e.execute(new NoOpRunnable()); joinPool(e); } | /**
* An unconfigurable newFixedThreadPool can execute runnables
*/ | An unconfigurable newFixedThreadPool can execute runnables | testUnconfigurableExecutorService | {
"repo_name": "AdmireTheDistance/android_libcore",
"path": "jsr166-tests/src/test/java/jsr166/ExecutorsTest.java",
"license": "gpl-2.0",
"size": 22307
} | [
"java.util.concurrent.ExecutorService",
"java.util.concurrent.Executors"
] | import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 1,340,107 |
if (!(buf instanceof DirectBuffer)) {
return 0;
}
return ((DirectBuffer) buf).getEffectiveAddress().toInt();
} | if (!(buf instanceof DirectBuffer)) { return 0; } return ((DirectBuffer) buf).getEffectiveAddress().toInt(); } | /**
* Gets the start address of a direct buffer.
* <p>
* This method corresponds to the JNI function:
*
* <pre>
* void* GetDirectBufferAddress(JNIEnv* env, jobject buf);
* </pre>
*
* @param buf
* the direct buffer whose address shall be returned must not be
* <code>null<... | Gets the start address of a direct buffer. This method corresponds to the JNI function: <code> void* GetDirectBufferAddress(JNIEnv* env, jobject buf); </code> | getDirectBufferAddress | {
"repo_name": "webos21/xi",
"path": "java/jcl/src/java/org/apache/harmony/nio/AddressUtil.java",
"license": "apache-2.0",
"size": 1707
} | [
"org.apache.harmony.nio.internal.DirectBuffer"
] | import org.apache.harmony.nio.internal.DirectBuffer; | import org.apache.harmony.nio.internal.*; | [
"org.apache.harmony"
] | org.apache.harmony; | 1,958,583 |
protected void unregisterClusterValve() {
for (Valve v : valves) {
ClusterValve valve = (ClusterValve) v;
if (log.isDebugEnabled()) {
log.debug("Invoking removeValve on " + getContainer()
+ " with class=" + valve.getClass().getName());
... | void function() { for (Valve v : valves) { ClusterValve valve = (ClusterValve) v; if (log.isDebugEnabled()) { log.debug(STR + getContainer() + STR + valve.getClass().getName()); } if (valve != null) { container.getPipeline().removeValve(valve); valve.setCluster(null); } } } | /**
* unregister all cluster valve to host or engine
*/ | unregister all cluster valve to host or engine | unregisterClusterValve | {
"repo_name": "apache/tomcat",
"path": "java/org/apache/catalina/ha/tcp/SimpleTcpCluster.java",
"license": "apache-2.0",
"size": 28893
} | [
"org.apache.catalina.Valve",
"org.apache.catalina.ha.ClusterValve"
] | import org.apache.catalina.Valve; import org.apache.catalina.ha.ClusterValve; | import org.apache.catalina.*; import org.apache.catalina.ha.*; | [
"org.apache.catalina"
] | org.apache.catalina; | 2,428,861 |
protected static long unpackDatetime(long packedDatetime) {
int second = (int)(packedDatetime % 100);
packedDatetime /= 100;
int minute = (int)(packedDatetime % 100);
packedDatetime /= 100;
int hour = (int)(packedDatetime % 100);
packedDatetime /= 100;
int day... | static long function(long packedDatetime) { int second = (int)(packedDatetime % 100); packedDatetime /= 100; int minute = (int)(packedDatetime % 100); packedDatetime /= 100; int hour = (int)(packedDatetime % 100); packedDatetime /= 100; int day = (int)(packedDatetime % 100); packedDatetime /= 100; int month = (int)(pac... | /** Unpack a Datetime from its packed long representation.
* The Datetime contains a long packed as
* YYYYx10000000000 + MMx100000000 + DDx1000000 + HHx10000 + MMx100 + SS
* Calendar month is 0 origin so subtract 1 from packed month
* @param packedDatetime the packed representation
* @return t... | Unpack a Datetime from its packed long representation. The Datetime contains a long packed as YYYYx10000000000 + MMx100000000 + DDx1000000 + HHx10000 + MMx100 + SS Calendar month is 0 origin so subtract 1 from packed month | unpackDatetime | {
"repo_name": "ForcerKing/ShaoqunXu-mysql5.7",
"path": "storage/ndb/clusterj/clusterj-tie/src/main/java/com/mysql/clusterj/tie/Utility.java",
"license": "gpl-2.0",
"size": 105463
} | [
"java.util.Calendar"
] | import java.util.Calendar; | import java.util.*; | [
"java.util"
] | java.util; | 2,651,754 |
void removeMember(KiiGroup group, KiiUser user, GroupCallback<KiiGroup> callback); | void removeMember(KiiGroup group, KiiUser user, GroupCallback<KiiGroup> callback); | /**
* Removes user from target group.
* @param group Target group.
* @param user User to be removed.
* @param callback Callback object.
*/ | Removes user from target group | removeMember | {
"repo_name": "fkmhrk/KiiLib-Java",
"path": "group/src/main/java/jp/fkmsoft/libs/kiilib/apis/GroupAPI.java",
"license": "apache-2.0",
"size": 2733
} | [
"jp.fkmsoft.libs.kiilib.entities.KiiGroup",
"jp.fkmsoft.libs.kiilib.entities.KiiUser"
] | import jp.fkmsoft.libs.kiilib.entities.KiiGroup; import jp.fkmsoft.libs.kiilib.entities.KiiUser; | import jp.fkmsoft.libs.kiilib.entities.*; | [
"jp.fkmsoft.libs"
] | jp.fkmsoft.libs; | 845,793 |
public void testMSSQLUniqueIdentifierType()
{
if (!vendorID.equals("sqlserver"))
{
return;
}
MSSQLTypes types;
Object id = null;
PersistenceManager pm = pmf.getPersistenceManager();
Transaction tx = pm.currentTransaction();
tr... | void function() { if (!vendorID.equals(STR)) { return; } MSSQLTypes types; Object id = null; PersistenceManager pm = pmf.getPersistenceManager(); Transaction tx = pm.currentTransaction(); try { tx.begin(); types = new MSSQLTypes(); types.setSimpleString(STR); pm.makePersistent(types); id = JDOHelper.getObjectId(types);... | /**
* Test for MSSQL datastore "UNIQUEIDENTIFIER" type.
*/ | Test for MSSQL datastore "UNIQUEIDENTIFIER" type | testMSSQLUniqueIdentifierType | {
"repo_name": "hopecee/texsts",
"path": "jdo/rdbms/src/test/org/datanucleus/tests/TypesMappingTest.java",
"license": "apache-2.0",
"size": 12324
} | [
"javax.jdo.JDOHelper",
"javax.jdo.PersistenceManager",
"javax.jdo.Transaction",
"org.jpox.samples.rdbms.types.MSSQLTypes"
] | import javax.jdo.JDOHelper; import javax.jdo.PersistenceManager; import javax.jdo.Transaction; import org.jpox.samples.rdbms.types.MSSQLTypes; | import javax.jdo.*; import org.jpox.samples.rdbms.types.*; | [
"javax.jdo",
"org.jpox.samples"
] | javax.jdo; org.jpox.samples; | 1,855,800 |
EClass getButton(); | EClass getButton(); | /**
* Returns the meta object for class '{@link fr.obeo.dsl.game.Button <em>Button</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Button</em>'.
* @see fr.obeo.dsl.game.Button
* @generated
*/ | Returns the meta object for class '<code>fr.obeo.dsl.game.Button Button</code>'. | getButton | {
"repo_name": "Obeo/Game-Designer",
"path": "plugins/fr.obeo.dsl.game/src-gen/fr/obeo/dsl/game/GamePackage.java",
"license": "epl-1.0",
"size": 149639
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,371,728 |
private synchronized void setStatus(final DriverStatus toStatus) {
if (this.driverStatus.isLegalTransition(toStatus)) {
this.driverStatus = toStatus;
} else {
LOG.log(Level.WARNING, "Illegal state transition: {0} -> {1}", new Object[] {this.driverStatus, toStatus});
}
} | synchronized void function(final DriverStatus toStatus) { if (this.driverStatus.isLegalTransition(toStatus)) { this.driverStatus = toStatus; } else { LOG.log(Level.WARNING, STR, new Object[] {this.driverStatus, toStatus}); } } | /**
* Helper method to set the status.
* This also checks whether the transition from the current status to the new one is legal.
* @param toStatus Driver status to transition to.
*/ | Helper method to set the status. This also checks whether the transition from the current status to the new one is legal | setStatus | {
"repo_name": "markusweimer/incubator-reef",
"path": "lang/java/reef-common/src/main/java/org/apache/reef/runtime/common/driver/DriverStatusManager.java",
"license": "apache-2.0",
"size": 9875
} | [
"java.util.logging.Level"
] | import java.util.logging.Level; | import java.util.logging.*; | [
"java.util"
] | java.util; | 2,326,927 |
@Override
public void writeNodeData(ByteArrayDataBuffer dataOutput, DataTarget dataTarget) {
switch (dataTarget) {
case EXTERNAL:
final PropertyPatternImplicationNodeWithUuids externalForm = new PropertyPatternImplicationNodeWithUuids(this);
externalForm.writ... | void function(ByteArrayDataBuffer dataOutput, DataTarget dataTarget) { switch (dataTarget) { case EXTERNAL: final PropertyPatternImplicationNodeWithUuids externalForm = new PropertyPatternImplicationNodeWithUuids(this); externalForm.writeNodeData(dataOutput, dataTarget); break; case INTERNAL: dataOutput.putNidArray(thi... | /**
* Write node data.
*
* @param dataOutput the data output
* @param dataTarget the data target
*/ | Write node data | writeNodeData | {
"repo_name": "OSEHRA/ISAAC",
"path": "core/model/src/main/java/sh/isaac/model/logic/node/internal/PropertyPatternImplicationWithNids.java",
"license": "apache-2.0",
"size": 9405
} | [
"sh.isaac.api.DataTarget",
"sh.isaac.api.externalizable.ByteArrayDataBuffer",
"sh.isaac.model.logic.node.external.PropertyPatternImplicationNodeWithUuids"
] | import sh.isaac.api.DataTarget; import sh.isaac.api.externalizable.ByteArrayDataBuffer; import sh.isaac.model.logic.node.external.PropertyPatternImplicationNodeWithUuids; | import sh.isaac.api.*; import sh.isaac.api.externalizable.*; import sh.isaac.model.logic.node.external.*; | [
"sh.isaac.api",
"sh.isaac.model"
] | sh.isaac.api; sh.isaac.model; | 1,170,553 |
void eachArtifact(Action<? super ArtifactResolutionControl> rule); | void eachArtifact(Action<? super ArtifactResolutionControl> rule); | /**
* Apply a rule to control resolution of artifacts.
* @param rule the rule to apply
*/ | Apply a rule to control resolution of artifacts | eachArtifact | {
"repo_name": "gstevey/gradle",
"path": "subprojects/core-api/src/main/java/org/gradle/api/artifacts/cache/ResolutionRules.java",
"license": "apache-2.0",
"size": 1550
} | [
"org.gradle.api.Action"
] | import org.gradle.api.Action; | import org.gradle.api.*; | [
"org.gradle.api"
] | org.gradle.api; | 1,959,912 |
@Test
public void test_toString() {
SoccerPlayer c1 = new SoccerPlayer(23,"David Beckham");
assertEquals("David Beckham, 23",c1.toString());
} | void function() { SoccerPlayer c1 = new SoccerPlayer(23,STR); assertEquals(STR,c1.toString()); } | /** Test case for toString
@see SoccerPlayer#toString
*/ | Test case for toString | test_toString | {
"repo_name": "UCSB-CS56-W14/W14-lab05",
"path": "src/edu/ucsb/cs56/w14/lab05/dmhartsook/SoccerPlayerTest.java",
"license": "mit",
"size": 2214
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,728,822 |
public FeEdition replace(FeEdition container, FeRangeElement contained, int index, int count) {
throw new PasseException();
} | FeEdition function(FeEdition container, FeRangeElement contained, int index, int count) { throw new PasseException(); } | /**
* Replace what is in the container at my path after index with contained.
* @deprecated
*/ | Replace what is in the container at my path after index with contained | replace | {
"repo_name": "jonesd/udanax-gold2java",
"path": "abora-gold/src/generated-sources/translator/info/dgjones/abora/gold/nlinks/FePath.java",
"license": "mit",
"size": 9031
} | [
"info.dgjones.abora.gold.java.exception.PasseException",
"info.dgjones.abora.gold.nkernel.FeEdition",
"info.dgjones.abora.gold.nkernel.FeRangeElement"
] | import info.dgjones.abora.gold.java.exception.PasseException; import info.dgjones.abora.gold.nkernel.FeEdition; import info.dgjones.abora.gold.nkernel.FeRangeElement; | import info.dgjones.abora.gold.java.exception.*; import info.dgjones.abora.gold.nkernel.*; | [
"info.dgjones.abora"
] | info.dgjones.abora; | 1,152,715 |
public List<Group> getRegularGroups()
{
return Collections.unmodifiableList(this._groups.subList(1, this._groups.size()));
}
| List<Group> function() { return Collections.unmodifiableList(this._groups.subList(1, this._groups.size())); } | /**
* Gets the regular groups defined in this archive.
*
* Note: the list omits the special Identities group.
* For a list that includes it, see getGroups()
*
* @return An (immutable) list of groups
* @see getGroups()
*/ | Gets the regular groups defined in this archive. Note: the list omits the special Identities group. For a list that includes it, see getGroups() | getRegularGroups | {
"repo_name": "goc9000/UniArchive",
"path": "src/uniarchive/models/archive/IMArchive.java",
"license": "gpl-3.0",
"size": 62960
} | [
"java.util.Collections",
"java.util.List"
] | import java.util.Collections; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 250,007 |
public Radio getRegisteredRadio(int index) {
return getRegisteredRadios()[index];
} | Radio function(int index) { return getRegisteredRadios()[index]; } | /**
* Returns radio at given index.
*
* @param index Index of registered radio.
* @return Radio at given index
*/ | Returns radio at given index | getRegisteredRadio | {
"repo_name": "OrestisEv/Zolertia",
"path": "tools/cooja/apps/mrm/java/org/contikios/mrm/MRM.java",
"license": "apache-2.0",
"size": 17917
} | [
"org.contikios.cooja.interfaces.Radio"
] | import org.contikios.cooja.interfaces.Radio; | import org.contikios.cooja.interfaces.*; | [
"org.contikios.cooja"
] | org.contikios.cooja; | 247,277 |
public JwkSetUriJwtDecoderBuilder restOperations(RestOperations restOperations) {
Assert.notNull(restOperations, "restOperations cannot be null");
this.restOperations = restOperations;
return this;
} | JwkSetUriJwtDecoderBuilder function(RestOperations restOperations) { Assert.notNull(restOperations, STR); this.restOperations = restOperations; return this; } | /**
* Use the given {@link RestOperations} to coordinate with the authorization
* servers indicated in the
* <a href="https://tools.ietf.org/html/rfc7517#section-5">JWK Set</a> uri as well
* as the <a href=
* "https://openid.net/specs/openid-connect-core-1_0.html#IssuerIdentifier">Issuer</a>.
* @param... | Use the given <code>RestOperations</code> to coordinate with the authorization servers indicated in the JWK Set uri as well as the Issuer | restOperations | {
"repo_name": "spring-projects/spring-security",
"path": "oauth2/oauth2-jose/src/main/java/org/springframework/security/oauth2/jwt/NimbusJwtDecoder.java",
"license": "apache-2.0",
"size": 21942
} | [
"org.springframework.util.Assert",
"org.springframework.web.client.RestOperations"
] | import org.springframework.util.Assert; import org.springframework.web.client.RestOperations; | import org.springframework.util.*; import org.springframework.web.client.*; | [
"org.springframework.util",
"org.springframework.web"
] | org.springframework.util; org.springframework.web; | 893,860 |
public void testBTreeForwardScan_fetchRows_resumeScanAfterCompress()
throws Exception {
setAutoCommit(false);
// Create a table and an index and populate them
Statement s1 = createStatement();
s1.executeUpdate("create table t (x int)");
s1.executeUpdate("create ... | void function() throws Exception { setAutoCommit(false); Statement s1 = createStatement(); s1.executeUpdate(STR); s1.executeUpdate(STR); PreparedStatement ins = prepareStatement(STR); for (int i = 0; i < 1000; i++) { ins.setInt(1, i); ins.executeUpdate(); } commit(); assertEquals(STR, ResultSet.HOLD_CURSORS_OVER_COMMIT... | /**
* Test that we can reposition on a holdable cursor after a commit and
* a compress that removes the leaf page of the current position. This
* tests the second call to reposition() in BTreeForwardScan.fetchRows().
*/ | Test that we can reposition on a holdable cursor after a commit and a compress that removes the leaf page of the current position. This tests the second call to reposition() in BTreeForwardScan.fetchRows() | testBTreeForwardScan_fetchRows_resumeScanAfterCompress | {
"repo_name": "trejkaz/derby",
"path": "java/testing/org/apache/derbyTesting/functionTests/tests/store/IndexSplitDeadlockTest.java",
"license": "apache-2.0",
"size": 34932
} | [
"java.sql.PreparedStatement",
"java.sql.ResultSet",
"java.sql.Statement"
] | import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.Statement; | import java.sql.*; | [
"java.sql"
] | java.sql; | 6,996 |
@Override
public void write(byte[] buffer, int offset, int size) throws IOException {
lock.lock();
try {
int ret = I2C.i2cWriteBytesDirect(bus.getFileDescriptor(), deviceAddress, size, offset, buffer);
if (ret < 0) {
throw new IOException("Error writing to... | void function(byte[] buffer, int offset, int size) throws IOException { lock.lock(); try { int ret = I2C.i2cWriteBytesDirect(bus.getFileDescriptor(), deviceAddress, size, offset, buffer); if (ret < 0) { throw new IOException(STR + makeDescription() + STR + ret + "."); } } finally { lock.unlock(); } } | /**
* This method writes several bytes to the i2c device from given buffer at given offset.
*
* @param buffer buffer of data to be written to the i2c device in one go
* @param offset offset in buffer
* @param size number of bytes to be written
*
* @throws IOException thrown in cas... | This method writes several bytes to the i2c device from given buffer at given offset | write | {
"repo_name": "curvejumper/pi4j",
"path": "pi4j-core/src/main/java/com/pi4j/io/i2c/impl/I2CDeviceImpl.java",
"license": "lgpl-3.0",
"size": 11070
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,800,349 |
public boolean resourceUpdate(WSResourceValue value) throws IhcExecption {
boolean retval = false;
if (value instanceof WSFloatingPointValue) {
retval = resourceUpdate((WSFloatingPointValue) value);
}
else if (value instanceof WSBooleanValue) {
retval = res... | boolean function(WSResourceValue value) throws IhcExecption { boolean retval = false; if (value instanceof WSFloatingPointValue) { retval = resourceUpdate((WSFloatingPointValue) value); } else if (value instanceof WSBooleanValue) { retval = resourceUpdate((WSBooleanValue) value); } else if (value instanceof WSIntegerVa... | /**
* Update resource value to controller.
*
*
* @param value
* Resource value.
* @return True if value is successfully updated.
*/ | Update resource value to controller | resourceUpdate | {
"repo_name": "computergeek1507/openhab",
"path": "bundles/binding/org.openhab.binding.ihc/src/main/java/org/openhab/binding/ihc/ws/IhcResourceInteractionService.java",
"license": "epl-1.0",
"size": 25062
} | [
"org.openhab.binding.ihc.ws.datatypes.WSBooleanValue",
"org.openhab.binding.ihc.ws.datatypes.WSDateValue",
"org.openhab.binding.ihc.ws.datatypes.WSEnumValue",
"org.openhab.binding.ihc.ws.datatypes.WSFloatingPointValue",
"org.openhab.binding.ihc.ws.datatypes.WSIntegerValue",
"org.openhab.binding.ihc.ws.dat... | import org.openhab.binding.ihc.ws.datatypes.WSBooleanValue; import org.openhab.binding.ihc.ws.datatypes.WSDateValue; import org.openhab.binding.ihc.ws.datatypes.WSEnumValue; import org.openhab.binding.ihc.ws.datatypes.WSFloatingPointValue; import org.openhab.binding.ihc.ws.datatypes.WSIntegerValue; import org.openhab.b... | import org.openhab.binding.ihc.ws.datatypes.*; | [
"org.openhab.binding"
] | org.openhab.binding; | 2,372,706 |
public static AuthenticationMode checkAuthenticationMode(MotuCasBadRequestException e) throws MotuCasException {
String wwwAuthenticate = e.getHeaderField(RestUtil.WWW_AUTHENTICATE_HTTP_HEADER_KEY);
if (RestUtil.isNullOrEmpty(wwwAuthenticate)) {
return AuthenticationMode.NONE;
... | static AuthenticationMode function(MotuCasBadRequestException e) throws MotuCasException { String wwwAuthenticate = e.getHeaderField(RestUtil.WWW_AUTHENTICATE_HTTP_HEADER_KEY); if (RestUtil.isNullOrEmpty(wwwAuthenticate)) { return AuthenticationMode.NONE; } String wwwAuthenticateUpperCase = wwwAuthenticate.toUpperCase(... | /**
* Check authentication mode.
*
* @param e the exception that contains request headers to check authentication
* @return the authentication mode
* @throws MotuCasException the motu cas exception
*/ | Check authentication mode | checkAuthenticationMode | {
"repo_name": "clstoulouse/motu",
"path": "motu-library-cas/src/main/java/fr/cls/atoll/motu/library/cas/util/RestUtil.java",
"license": "lgpl-3.0",
"size": 34394
} | [
"fr.cls.atoll.motu.api.message.AuthenticationMode",
"fr.cls.atoll.motu.library.cas.exception.MotuCasBadRequestException",
"fr.cls.atoll.motu.library.cas.exception.MotuCasException"
] | import fr.cls.atoll.motu.api.message.AuthenticationMode; import fr.cls.atoll.motu.library.cas.exception.MotuCasBadRequestException; import fr.cls.atoll.motu.library.cas.exception.MotuCasException; | import fr.cls.atoll.motu.api.message.*; import fr.cls.atoll.motu.library.cas.exception.*; | [
"fr.cls.atoll"
] | fr.cls.atoll; | 2,480,711 |
@Test
public void completionService() throws Exception {
int size = 20000; // 2w
//
CompletionService<Object> completionService = new ExecutorCompletionService<Object>(
Executors.newFixedThreadPool(100));
//
long start = System.currentTimeMillis();
for (int i = 0; i < size; i++) {
//
Runner ru... | void function() throws Exception { int size = 20000; Executors.newFixedThreadPool(100)); for (int i = 0; i < size; i++) { completionService.submit(runner, null); System.out.println(STR + i); } long end = System.currentTimeMillis(); System.out.println(STR + (end - start) + STR); } | /**
* Completion service.
*
* #fix 2
*
* @throws Exception
* the exception
*/ | Completion service. #fix 2 | completionService | {
"repo_name": "mixaceh/openyu-java",
"path": "src/test/java/org/openyu/java/memoryleak/MemoryLeakThreadTest.java",
"license": "gpl-2.0",
"size": 3163
} | [
"java.util.concurrent.Executors"
] | import java.util.concurrent.Executors; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 726,649 |
String extractVolume(ExtractVolumeCmd cmd); | String extractVolume(ExtractVolumeCmd cmd); | /**
* Extracts the volume to a particular location.
*
* @param cmd
* the command specifying url (where the volume needs to be extracted to), zoneId (zone where the volume exists),
* id (the id of the volume)
*/ | Extracts the volume to a particular location | extractVolume | {
"repo_name": "GabrielBrascher/cloudstack",
"path": "api/src/main/java/com/cloud/storage/VolumeApiService.java",
"license": "apache-2.0",
"size": 6259
} | [
"org.apache.cloudstack.api.command.user.volume.ExtractVolumeCmd"
] | import org.apache.cloudstack.api.command.user.volume.ExtractVolumeCmd; | import org.apache.cloudstack.api.command.user.volume.*; | [
"org.apache.cloudstack"
] | org.apache.cloudstack; | 2,469,596 |
EList<BehaviorTerm> getBehaviorTerm();
| EList<BehaviorTerm> getBehaviorTerm(); | /**
* Returns the value of the '<em><b>Behavior Term</b></em>' containment reference list.
* The list contents are of type {@link au.edu.swin.ict.road.designer.smc.BehaviorTerm}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Behavior Term</em>' containment reference list isn't clear,
* ... | Returns the value of the 'Behavior Term' containment reference list. The list contents are of type <code>au.edu.swin.ict.road.designer.smc.BehaviorTerm</code>. If the meaning of the 'Behavior Term' containment reference list isn't clear, there really should be more of a description here... | getBehaviorTerm | {
"repo_name": "road-framework/ROADDesigner",
"path": "au.edu.swin.ict.road.designer/src/au/edu/swin/ict/road/designer/smc/SMC.java",
"license": "apache-2.0",
"size": 10771
} | [
"org.eclipse.emf.common.util.EList"
] | import org.eclipse.emf.common.util.EList; | import org.eclipse.emf.common.util.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,732,357 |
protected void sequence_PragmaList_RelationalExp(ISerializationContext context, RelationalExp semanticObject) {
genericSequencer.createSequence(context, semanticObject);
}
| void function(ISerializationContext context, RelationalExp semanticObject) { genericSequencer.createSequence(context, semanticObject); } | /**
* Contexts:
* Statement returns RelationalExp
*
* Constraint:
* (lhs=RelationalExp_RelationalExp_1_0 (operator='<' | operator='>' | operator='<=' | operator='>=') rhs=AdditiveExp pragmas+=Pragma*)
*/ | Contexts: Statement returns RelationalExp Constraint: (lhs=RelationalExp_RelationalExp_1_0 (operator='' | operator='=') rhs=AdditiveExp pragmas+=Pragma*) | sequence_PragmaList_RelationalExp | {
"repo_name": "perojonsson/bridgepoint",
"path": "src/org.xtuml.bp.xtext.masl.parent/org.xtuml.bp.xtext.masl/src-gen/org/xtuml/bp/xtext/masl/serializer/MASLSemanticSequencer.java",
"license": "apache-2.0",
"size": 376780
} | [
"org.eclipse.xtext.serializer.ISerializationContext",
"org.xtuml.bp.xtext.masl.masl.behavior.RelationalExp"
] | import org.eclipse.xtext.serializer.ISerializationContext; import org.xtuml.bp.xtext.masl.masl.behavior.RelationalExp; | import org.eclipse.xtext.serializer.*; import org.xtuml.bp.xtext.masl.masl.behavior.*; | [
"org.eclipse.xtext",
"org.xtuml.bp"
] | org.eclipse.xtext; org.xtuml.bp; | 1,452,226 |
private void createModelSelectionGroup(Composite parent) {
Composite modelSelectionGroup;
Label explanationText;
GridLayout layout;
GridData layoutData;
GridData modelViewerData;
modelSelectionGroup = new Composite(parent, SWT.NONE);
modelSelectionGroup.setFont(parent.getFont());
... | void function(Composite parent) { Composite modelSelectionGroup; Label explanationText; GridLayout layout; GridData layoutData; GridData modelViewerData; modelSelectionGroup = new Composite(parent, SWT.NONE); modelSelectionGroup.setFont(parent.getFont()); layoutData = new GridData(SWT.FILL, SWT.FILL, true, true); model... | /**
* <p>
* Creates the model selection part of this WizardPage.
* </p>
*
* @param parent
* The parent of the model selection part.
*/ | Creates the model selection part of this WizardPage. | createModelSelectionGroup | {
"repo_name": "dresden-ocl/dresdenocl",
"path": "plugins/org.dresdenocl.modelbus.ui/src/org/dresdenocl/modelbus/ui/internal/wizards/LoadModelInstancePage.java",
"license": "lgpl-3.0",
"size": 21850
} | [
"org.dresdenocl.modelbus.ModelBusPlugin",
"org.dresdenocl.modelbus.ui.internal.ModelBusUIMessages",
"org.dresdenocl.modelbus.ui.internal.wizards.util.ModelLabelProvider",
"org.dresdenocl.modelbus.ui.internal.wizards.util.ModelViewerListener",
"org.eclipse.jface.viewers.ArrayContentProvider",
"org.eclipse.... | import org.dresdenocl.modelbus.ModelBusPlugin; import org.dresdenocl.modelbus.ui.internal.ModelBusUIMessages; import org.dresdenocl.modelbus.ui.internal.wizards.util.ModelLabelProvider; import org.dresdenocl.modelbus.ui.internal.wizards.util.ModelViewerListener; import org.eclipse.jface.viewers.ArrayContentProvider; im... | import org.dresdenocl.modelbus.*; import org.dresdenocl.modelbus.ui.internal.*; import org.dresdenocl.modelbus.ui.internal.wizards.util.*; import org.eclipse.jface.viewers.*; import org.eclipse.swt.layout.*; import org.eclipse.swt.widgets.*; | [
"org.dresdenocl.modelbus",
"org.eclipse.jface",
"org.eclipse.swt"
] | org.dresdenocl.modelbus; org.eclipse.jface; org.eclipse.swt; | 832,284 |
@Ignore // broken, because ReformedSingleRule matches child traits strictly
@Test public void testRemoveSingleReformed() {
VolcanoPlanner planner = new VolcanoPlanner();
planner.ambitious = true;
planner.addRelTraitDef(ConventionTraitDef.INSTANCE);
planner.addRule(new PhysLeafRule());
planner.a... | @Ignore @Test void function() { VolcanoPlanner planner = new VolcanoPlanner(); planner.ambitious = true; planner.addRelTraitDef(ConventionTraitDef.INSTANCE); planner.addRule(new PhysLeafRule()); planner.addRule(new ReformedRemoveSingleRule()); RelOptCluster cluster = newCluster(planner); NoneLeafRel leafRel = new NoneL... | /**
* Previously, this didn't work because ReformedRemoveSingleRule uses a
* pattern which spans calling conventions.
*/ | Previously, this didn't work because ReformedRemoveSingleRule uses a pattern which spans calling conventions | testRemoveSingleReformed | {
"repo_name": "arina-ielchiieva/calcite",
"path": "core/src/test/java/org/apache/calcite/plan/volcano/VolcanoPlannerTest.java",
"license": "apache-2.0",
"size": 19488
} | [
"org.apache.calcite.plan.ConventionTraitDef",
"org.apache.calcite.plan.RelOptCluster",
"org.apache.calcite.plan.volcano.PlannerTests",
"org.apache.calcite.rel.RelNode",
"org.junit.Assert",
"org.junit.Ignore",
"org.junit.Test"
] | import org.apache.calcite.plan.ConventionTraitDef; import org.apache.calcite.plan.RelOptCluster; import org.apache.calcite.plan.volcano.PlannerTests; import org.apache.calcite.rel.RelNode; import org.junit.Assert; import org.junit.Ignore; import org.junit.Test; | import org.apache.calcite.plan.*; import org.apache.calcite.plan.volcano.*; import org.apache.calcite.rel.*; import org.junit.*; | [
"org.apache.calcite",
"org.junit"
] | org.apache.calcite; org.junit; | 1,841,068 |
public Writer write(Writer writer) throws JSONException {
return this.write(writer, 0, 0);
} | Writer function(Writer writer) throws JSONException { return this.write(writer, 0, 0); } | /**
* Write the contents of the JSONObject as JSON text to a writer. For
* compactness, no whitespace is added.
* <p>
* Warning: This method assumes that the data structure is acyclical.
*
* @return The writer.
* @throws JSONException
*/ | Write the contents of the JSONObject as JSON text to a writer. For compactness, no whitespace is added. Warning: This method assumes that the data structure is acyclical | write | {
"repo_name": "sapphon/minecraftpython",
"path": "src/main/java/org/json/JSONObject.java",
"license": "gpl-3.0",
"size": 57497
} | [
"java.io.Writer"
] | import java.io.Writer; | import java.io.*; | [
"java.io"
] | java.io; | 326,689 |
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
setSupportActionBar(toolbar);
mTriedNewAuthToken = false;
mHostListLoader = new... | void function(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar); setSupportActionBar(toolbar); mTriedNewAuthToken = false; mHostListLoader = new HostListLoader(); | /**
* Called when the activity is first created. Loads the native library and requests an
* authentication token from the system.
*/ | Called when the activity is first created. Loads the native library and requests an authentication token from the system | onCreate | {
"repo_name": "Chilledheart/chromium",
"path": "remoting/android/java/src/org/chromium/chromoting/Chromoting.java",
"license": "bsd-3-clause",
"size": 20689
} | [
"android.os.Bundle",
"android.support.v7.widget.Toolbar"
] | import android.os.Bundle; import android.support.v7.widget.Toolbar; | import android.os.*; import android.support.v7.widget.*; | [
"android.os",
"android.support"
] | android.os; android.support; | 235,808 |
public Color getColorAtPoint(final int x, final int y) {
final BufferedImage image = methods.env.takeScreenshot(false);
return new Color(image.getRGB(x, y));
} | Color function(final int x, final int y) { final BufferedImage image = methods.env.takeScreenshot(false); return new Color(image.getRGB(x, y)); } | /**
* Gets a color corresponding to x and y coordinates from the current game screen.
*
* @param x The x coordinate at which to get the color.
* @param y The y coordinate at which to get the color.
* @return Color
* @see java.awt.color
*/ | Gets a color corresponding to x and y coordinates from the current game screen | getColorAtPoint | {
"repo_name": "Latency/UtopianBot",
"path": "src/org/rsbot/script/methods/Game.java",
"license": "lgpl-3.0",
"size": 18783
} | [
"java.awt.Color",
"java.awt.image.BufferedImage"
] | import java.awt.Color; import java.awt.image.BufferedImage; | import java.awt.*; import java.awt.image.*; | [
"java.awt"
] | java.awt; | 1,249,895 |
void setStoragePolicy(DistributedFileSystem dfs) throws Exception {
for (Map.Entry<Path, BlockStoragePolicy> entry : policyMap.entrySet()) {
dfs.setStoragePolicy(entry.getKey(), entry.getValue().getName());
}
}
}
static class ClusterScheme {
final Configuration conf;
final in... | void setStoragePolicy(DistributedFileSystem dfs) throws Exception { for (Map.Entry<Path, BlockStoragePolicy> entry : policyMap.entrySet()) { dfs.setStoragePolicy(entry.getKey(), entry.getValue().getName()); } } } static class ClusterScheme { final Configuration conf; final int numDataNodes; final short repl; final Stor... | /**
* Set storage policies according to the corresponding scheme.
*/ | Set storage policies according to the corresponding scheme | setStoragePolicy | {
"repo_name": "mapr/hadoop-common",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/mover/TestStorageMover.java",
"license": "apache-2.0",
"size": 27522
} | [
"java.util.Map",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.fs.StorageType",
"org.apache.hadoop.hdfs.DistributedFileSystem",
"org.apache.hadoop.hdfs.MiniDFSCluster",
"org.apache.hadoop.hdfs.protocol.BlockStoragePolicy",
"org.apache.hadoop.hdfs.server.blockm... | import java.util.Map; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.StorageType; import org.apache.hadoop.hdfs.DistributedFileSystem; import org.apache.hadoop.hdfs.MiniDFSCluster; import org.apache.hadoop.hdfs.protocol.BlockStoragePolicy; import org.apache.ha... | import java.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.server.blockmanagement.*; import org.apache.hadoop.util.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 616,824 |
@Test
public void testGetId() {
Assert.assertEquals(0, new IpAddress().getId());
} | void function() { Assert.assertEquals(0, new IpAddress().getId()); } | /**
* Test getId.
*/ | Test getId | testGetId | {
"repo_name": "eltonnuness/unison",
"path": "src/test/java/uk/co/sleonard/unison/datahandling/DAO/IpAddressTest.java",
"license": "apache-2.0",
"size": 1892
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,262,675 |
public List<String> providers() {
return this.providers;
} | List<String> function() { return this.providers; } | /**
* Get a list of Internet service providers.
*
* @return the providers value
*/ | Get a list of Internet service providers | providers | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/network/v2019_04_01/AvailableProvidersListCountry.java",
"license": "mit",
"size": 2385
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 499,145 |
public static final Document loadXMLFile(InputStream inputStream, String systemID, boolean ignoreEntities, boolean namespaceAware) throws KettleXMLException
{
DocumentBuilderFactory dbf;
DocumentBuilder db;
Document doc;
try
{
// Check and... | static final Document function(InputStream inputStream, String systemID, boolean ignoreEntities, boolean namespaceAware) throws KettleXMLException { DocumentBuilderFactory dbf; DocumentBuilder db; Document doc; try { dbf.setIgnoringComments(true); dbf.setNamespaceAware(namespaceAware); db = dbf.newDocumentBuilder(); if... | /**
* Load a file into an XML document
* @param inputStream The stream to load a document from
* @param systemId Provide a base for resolving relative URIs.
* @param ignoreEntities Ignores external entities and returns an empty dummy.
* @param namespaceAware support XML namespaces.
* @r... | Load a file into an XML document | loadXMLFile | {
"repo_name": "jjeb/kettle-trunk",
"path": "core/src/org/pentaho/di/core/xml/XMLHandler.java",
"license": "apache-2.0",
"size": 36084
} | [
"java.io.FileNotFoundException",
"java.io.InputStream",
"javax.xml.parsers.DocumentBuilder",
"javax.xml.parsers.DocumentBuilderFactory",
"org.pentaho.di.core.Const",
"org.pentaho.di.core.exception.KettleXMLException",
"org.w3c.dom.Document"
] | import java.io.FileNotFoundException; import java.io.InputStream; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import org.pentaho.di.core.Const; import org.pentaho.di.core.exception.KettleXMLException; import org.w3c.dom.Document; | import java.io.*; import javax.xml.parsers.*; import org.pentaho.di.core.*; import org.pentaho.di.core.exception.*; import org.w3c.dom.*; | [
"java.io",
"javax.xml",
"org.pentaho.di",
"org.w3c.dom"
] | java.io; javax.xml; org.pentaho.di; org.w3c.dom; | 2,205,774 |
List<SchemaTableName> listViews(ConnectorSession session, String schemaNameOrNull); | List<SchemaTableName> listViews(ConnectorSession session, String schemaNameOrNull); | /**
* List view names, possibly filtered by schema. An empty list is returned if none match.
*/ | List view names, possibly filtered by schema. An empty list is returned if none match | listViews | {
"repo_name": "kaschaeffer/presto",
"path": "presto-spi/src/main/java/com/facebook/presto/spi/ConnectorMetadata.java",
"license": "apache-2.0",
"size": 7026
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 534,410 |
public void remove(FilterMap filterMap) {
synchronized (lock) {
// Make sure this filter mapping is currently present
int n = -1;
for (int i = 0; i < array.length; i++) {
if (array[i] == filterMap) {
n = i;
... | void function(FilterMap filterMap) { synchronized (lock) { int n = -1; for (int i = 0; i < array.length; i++) { if (array[i] == filterMap) { n = i; break; } } if (n < 0) return; FilterMap results[] = new FilterMap[array.length - 1]; System.arraycopy(array, 0, results, 0, n); System.arraycopy(array, n + 1, results, n, (... | /**
* Remove a filter mapping.
*
* @param filterMap The filter mapping to be removed
*/ | Remove a filter mapping | remove | {
"repo_name": "Nickname0806/Test_Q4",
"path": "java/org/apache/catalina/core/StandardContext.java",
"license": "apache-2.0",
"size": 209298
} | [
"org.apache.tomcat.util.descriptor.web.FilterMap"
] | import org.apache.tomcat.util.descriptor.web.FilterMap; | import org.apache.tomcat.util.descriptor.web.*; | [
"org.apache.tomcat"
] | org.apache.tomcat; | 736,259 |
@Message(id = 51, value = "Password must have at least %s non-alphanumeric symbol.")
String passwordMustHaveSymbol(int minSymbol); | @Message(id = 51, value = STR) String passwordMustHaveSymbol(int minSymbol); | /**
* The error message for password which has not enough symbol.
* @param minSymbol - minimum symbol values.
* @return a {@link String} for the message.
*/ | The error message for password which has not enough symbol | passwordMustHaveSymbol | {
"repo_name": "aloubyansky/wildfly-core",
"path": "domain-management/src/main/java/org/jboss/as/domain/management/logging/DomainManagementLogger.java",
"license": "lgpl-2.1",
"size": 66389
} | [
"org.jboss.logging.annotations.Message"
] | import org.jboss.logging.annotations.Message; | import org.jboss.logging.annotations.*; | [
"org.jboss.logging"
] | org.jboss.logging; | 1,817,662 |
public List<SkillDTO> findAll() {
log.debug("Request to get all Skills");
List<SkillDTO> result = skillRepository.findAll().stream()
.map(skillMapper::skillToSkillDTO)
.collect(Collectors.toCollection(LinkedList::new));
return result;
} | List<SkillDTO> function() { log.debug(STR); List<SkillDTO> result = skillRepository.findAll().stream() .map(skillMapper::skillToSkillDTO) .collect(Collectors.toCollection(LinkedList::new)); return result; } | /**
* get all the skills.
* @return the list of entities
*/ | get all the skills | findAll | {
"repo_name": "sandor-balazs/nosql-java",
"path": "mongodb/src/main/java/com/github/sandor_balazs/nosql_java/service/impl/SkillServiceImpl.java",
"license": "bsd-2-clause",
"size": 2206
} | [
"com.github.sandor_balazs.nosql_java.web.rest.dto.SkillDTO",
"java.util.LinkedList",
"java.util.List",
"java.util.stream.Collectors"
] | import com.github.sandor_balazs.nosql_java.web.rest.dto.SkillDTO; import java.util.LinkedList; import java.util.List; import java.util.stream.Collectors; | import com.github.sandor_balazs.nosql_java.web.rest.dto.*; import java.util.*; import java.util.stream.*; | [
"com.github.sandor_balazs",
"java.util"
] | com.github.sandor_balazs; java.util; | 424,576 |
public void displayForTeamA(int score) {
TextView scoreView = (TextView) findViewById(R.id.team_a_score);
scoreView.setText(String.valueOf(score));
} | void function(int score) { TextView scoreView = (TextView) findViewById(R.id.team_a_score); scoreView.setText(String.valueOf(score)); } | /**
* Displays the given score for Team A.
*/ | Displays the given score for Team A | displayForTeamA | {
"repo_name": "vpw/AndroidForBeginners",
"path": "CourtCounter/app/src/main/java/com/example/android/courtcounter/MainActivity.java",
"license": "apache-2.0",
"size": 1790
} | [
"android.widget.TextView"
] | import android.widget.TextView; | import android.widget.*; | [
"android.widget"
] | android.widget; | 2,829,565 |
public void handle(Runnable onSuccess, Consumer<Throwable> onFailure) {
if (failure == null) {
onSuccess.run();
} else {
onFailure.accept(failure);
}
}
} | void function(Runnable onSuccess, Consumer<Throwable> onFailure) { if (failure == null) { onSuccess.run(); } else { onFailure.accept(failure); } } } | /**
* Handle the execution result with the provided consumers
* @param onSuccess handler to invoke on success
* @param onFailure handler to invoke on failure; the throwable passed through will not be null
*/ | Handle the execution result with the provided consumers | handle | {
"repo_name": "danielmitterdorfer/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/cluster/ClusterStateTaskExecutor.java",
"license": "apache-2.0",
"size": 5074
} | [
"java.util.function.Consumer"
] | import java.util.function.Consumer; | import java.util.function.*; | [
"java.util"
] | java.util; | 1,229,314 |
T visitIdentifierNot(@NotNull CQLParser.IdentifierNotContext ctx); | T visitIdentifierNot(@NotNull CQLParser.IdentifierNotContext ctx); | /**
* Visit a parse tree produced by {@link CQLParser#identifierNot}.
*/ | Visit a parse tree produced by <code>CQLParser#identifierNot</code> | visitIdentifierNot | {
"repo_name": "HuaweiBigData/StreamCQL",
"path": "cql/src/main/java/com/huawei/streaming/cql/semanticanalyzer/parser/CQLParserVisitor.java",
"license": "apache-2.0",
"size": 29279
} | [
"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,161,074 |
private Point2D isExportedToTop(PortInst pi, VarContext context)
{
while (context != VarContext.globalContext)
{
if (pi.getExports().hasNext())
{
Export e = pi.getExports().next();
Nodable no = context.getNodable();
if (no i... | Point2D function(PortInst pi, VarContext context) { while (context != VarContext.globalContext) { if (pi.getExports().hasNext()) { Export e = pi.getExports().next(); Nodable no = context.getNodable(); if (no instanceof NodeInst) { NodeInst ni = (NodeInst)no; pi = ni.findPortInstFromProto(e); context = context.pop(); } ... | /**
* See if the portinst is exported all the way to the top level of the var context.
* @param pi the port inst
* @param context context
* @return true if exported to the top level, false otherwise
*/ | See if the portinst is exported all the way to the top level of the var context | isExportedToTop | {
"repo_name": "imr/Electric8",
"path": "com/sun/electric/tool/routing/AutoStitch.java",
"license": "gpl-3.0",
"size": 116435
} | [
"com.sun.electric.database.geometry.Poly",
"com.sun.electric.database.hierarchy.Export",
"com.sun.electric.database.hierarchy.HierarchyEnumerator",
"com.sun.electric.database.hierarchy.Nodable",
"com.sun.electric.database.topology.ArcInst",
"com.sun.electric.database.topology.NodeInst",
"com.sun.electri... | import com.sun.electric.database.geometry.Poly; import com.sun.electric.database.hierarchy.Export; import com.sun.electric.database.hierarchy.HierarchyEnumerator; import com.sun.electric.database.hierarchy.Nodable; import com.sun.electric.database.topology.ArcInst; import com.sun.electric.database.topology.NodeInst; im... | import com.sun.electric.database.geometry.*; import com.sun.electric.database.hierarchy.*; import com.sun.electric.database.topology.*; import com.sun.electric.database.variable.*; import java.awt.geom.*; | [
"com.sun.electric",
"java.awt"
] | com.sun.electric; java.awt; | 293,104 |
public void fastFinishTx(GridNearTxLocal tx, boolean commit) {
assert tx != null;
assert tx.writeMap().isEmpty();
assert tx.optimistic() || tx.readMap().isEmpty();
ConcurrentMap<GridCacheVersion, IgniteInternalTx> txIdMap = transactionMap(tx);
if (txIdMap.remove(tx.xidVersi... | void function(GridNearTxLocal tx, boolean commit) { assert tx != null; assert tx.writeMap().isEmpty(); assert tx.optimistic() tx.readMap().isEmpty(); ConcurrentMap<GridCacheVersion, IgniteInternalTx> txIdMap = transactionMap(tx); if (txIdMap.remove(tx.xidVersion(), tx)) { notifyEvictions(tx); if (!tx.readMap().isEmpty(... | /**
* Fast finish transaction. Can be used only if no locks were acquired.
*
* @param tx Transaction to finish.
* @param commit {@code True} if transaction is committed, {@code false} if rolled back.
*/ | Fast finish transaction. Can be used only if no locks were acquired | fastFinishTx | {
"repo_name": "pperalta/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteTxManager.java",
"license": "apache-2.0",
"size": 89721
} | [
"java.util.concurrent.ConcurrentMap",
"org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal",
"org.apache.ignite.internal.processors.cache.version.GridCacheVersion"
] | import java.util.concurrent.ConcurrentMap; import org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal; import org.apache.ignite.internal.processors.cache.version.GridCacheVersion; | import java.util.concurrent.*; import org.apache.ignite.internal.processors.cache.distributed.near.*; import org.apache.ignite.internal.processors.cache.version.*; | [
"java.util",
"org.apache.ignite"
] | java.util; org.apache.ignite; | 1,457,602 |
public Iterable<String> registerView(View view);
class NoOp implements CreateViewListener { | Iterable<String> function(View view); class NoOp implements CreateViewListener { | /**
* Called during {@link ViewChangesDeploymentHelper#createView(View)}.
*
* @param view View being created.
* @return Should return statements to be part of view creation, after the view has been created.
*/ | Called during <code>ViewChangesDeploymentHelper#createView(View)</code> | registerView | {
"repo_name": "alfasoftware/morf",
"path": "morf-core/src/main/java/org/alfasoftware/morf/upgrade/CreateViewListener.java",
"license": "apache-2.0",
"size": 893
} | [
"org.alfasoftware.morf.metadata.View"
] | import org.alfasoftware.morf.metadata.View; | import org.alfasoftware.morf.metadata.*; | [
"org.alfasoftware.morf"
] | org.alfasoftware.morf; | 456,773 |
public KualiDecimal getCreditMemoItemTaxAmount() {
return creditMemoItemTaxAmount;
} | KualiDecimal function() { return creditMemoItemTaxAmount; } | /**
* Gets the creditMemoItemTaxAmount attribute.
*
* @return Returns the creditMemoItemTaxAmount.
*/ | Gets the creditMemoItemTaxAmount attribute | getCreditMemoItemTaxAmount | {
"repo_name": "quikkian-ua-devops/will-financials",
"path": "kfs-ar/src/main/java/org/kuali/kfs/module/ar/report/util/CustomerCreditMemoDetailReportDataHolder.java",
"license": "agpl-3.0",
"size": 5910
} | [
"org.kuali.rice.core.api.util.type.KualiDecimal"
] | import org.kuali.rice.core.api.util.type.KualiDecimal; | import org.kuali.rice.core.api.util.type.*; | [
"org.kuali.rice"
] | org.kuali.rice; | 2,847,204 |
EReference getCheckGroup_Items(); | EReference getCheckGroup_Items(); | /**
* Returns the meta object for the containment reference list '{@link lasser.sketch.CheckGroup#getItems <em>Items</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference list '<em>Items</em>'.
* @see lasser.sketch.CheckGroup#getItems()
* @see #get... | Returns the meta object for the containment reference list '<code>lasser.sketch.CheckGroup#getItems Items</code>'. | getCheckGroup_Items | {
"repo_name": "osanchezUM/guizmo",
"path": "src/lasser/sketch/SketchPackage.java",
"license": "apache-2.0",
"size": 90672
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,765,136 |
void logCommandResult(CommandResult commandResult); | void logCommandResult(CommandResult commandResult); | /**
* Log that the supplied {@link CommandResult} was returned.
* @param commandResult The {@link CommandResult} to log.
*/ | Log that the supplied <code>CommandResult</code> was returned | logCommandResult | {
"repo_name": "opencredo/concourse",
"path": "concursus-domain/src/main/java/com/opencredo/concursus/domain/commands/dispatching/CommandLog.java",
"license": "mit",
"size": 1986
} | [
"com.opencredo.concursus.domain.commands.CommandResult"
] | import com.opencredo.concursus.domain.commands.CommandResult; | import com.opencredo.concursus.domain.commands.*; | [
"com.opencredo.concursus"
] | com.opencredo.concursus; | 223,990 |
public Builder validationVariables(@NonNull SDVariable... variables) {
return requireVariables(Operation.TRAINING_VALIDATION, variables);
} | Builder function(@NonNull SDVariable... variables) { return requireVariables(Operation.TRAINING_VALIDATION, variables); } | /**
* Add required variables for validation
*/ | Add required variables for validation | validationVariables | {
"repo_name": "deeplearning4j/deeplearning4j",
"path": "nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/autodiff/listeners/ListenerVariables.java",
"license": "apache-2.0",
"size": 7621
} | [
"org.nd4j.autodiff.samediff.SDVariable"
] | import org.nd4j.autodiff.samediff.SDVariable; | import org.nd4j.autodiff.samediff.*; | [
"org.nd4j.autodiff"
] | org.nd4j.autodiff; | 1,455,139 |
private boolean copyBytes(InputStream in, OutputStream out) {
try {
if (in == null || out == null)
return false;
byte[] buffer = new byte[1024];
int read;
while ((read = in.read(buffer)) != -1) {
out.write(buffer, 0, read);
... | boolean function(InputStream in, OutputStream out) { try { if (in == null out == null) return false; byte[] buffer = new byte[1024]; int read; while ((read = in.read(buffer)) != -1) { out.write(buffer, 0, read); } return true; } catch (Exception e) { return false; } } | /**
* Copies the <code>InputStream</code> to the <code>OutputStream</code>.
* @param in Input
* @param out Output
* @return Whether the operation was successful.
*/ | Copies the <code>InputStream</code> to the <code>OutputStream</code> | copyBytes | {
"repo_name": "MD2Korg/mCerebrum-Utilities",
"path": "utilities/src/main/java/org/md2k/utilities/storage/StorageReadWrite.java",
"license": "bsd-2-clause",
"size": 16312
} | [
"java.io.InputStream",
"java.io.OutputStream"
] | import java.io.InputStream; import java.io.OutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,692,339 |
public void paint(Graphics g, JComponent c)
{
Iterator iterator = uis.iterator();
while (iterator.hasNext())
{
ComponentUI ui = (ComponentUI) iterator.next();
ui.paint(g, c);
}
} | void function(Graphics g, JComponent c) { Iterator iterator = uis.iterator(); while (iterator.hasNext()) { ComponentUI ui = (ComponentUI) iterator.next(); ui.paint(g, c); } } | /**
* Calls the <code>paint(Graphics, JComponent)</code> method for all the UI
* delegates managed by this <code>MultiViewportUI</code>.
*
* @param g the graphics device.
* @param c the component.
*/ | Calls the <code>paint(Graphics, JComponent)</code> method for all the UI delegates managed by this <code>MultiViewportUI</code> | paint | {
"repo_name": "shaotuanchen/sunflower_exp",
"path": "tools/source/gcc-4.2.4/libjava/classpath/javax/swing/plaf/multi/MultiViewportUI.java",
"license": "bsd-3-clause",
"size": 11212
} | [
"java.awt.Graphics",
"java.util.Iterator",
"javax.swing.JComponent",
"javax.swing.plaf.ComponentUI"
] | import java.awt.Graphics; import java.util.Iterator; import javax.swing.JComponent; import javax.swing.plaf.ComponentUI; | import java.awt.*; import java.util.*; import javax.swing.*; import javax.swing.plaf.*; | [
"java.awt",
"java.util",
"javax.swing"
] | java.awt; java.util; javax.swing; | 1,294,245 |
public static <T, V, R extends Collection<V>> R collect(
Iterable<T> iterable,
Function<? super T, V> function,
R target,
boolean allowReorderedResult)
{
return FJIterate.collect(
iterable,
function,
target,
... | static <T, V, R extends Collection<V>> R function( Iterable<T> iterable, Function<? super T, V> function, R target, boolean allowReorderedResult) { return FJIterate.collect( iterable, function, target, FJIterate.DEFAULT_MIN_FORK_SIZE, FJIterate.FORK_JOIN_POOL, allowReorderedResult); } | /**
* Same effect as {@link Iterate#collect(Iterable, Function)}, but executed in parallel batches,
* and writing output into the specified collection.
*
* @param target Where to write the output.
* @param allowReorderedResult If the result can be in a different order.
* ... | Same effect as <code>Iterate#collect(Iterable, Function)</code>, but executed in parallel batches, and writing output into the specified collection | collect | {
"repo_name": "g-votte/eclipse-collections",
"path": "eclipse-collections-forkjoin/src/main/java/org/eclipse/collections/impl/forkjoin/FJIterate.java",
"license": "bsd-3-clause",
"size": 47347
} | [
"java.util.Collection",
"org.eclipse.collections.api.block.function.Function"
] | import java.util.Collection; import org.eclipse.collections.api.block.function.Function; | import java.util.*; import org.eclipse.collections.api.block.function.*; | [
"java.util",
"org.eclipse.collections"
] | java.util; org.eclipse.collections; | 775,350 |
Element render(N node, String domID, Joint joint, int depth); | Element render(N node, String domID, Joint joint, int depth); | /**
* Render whole node container with descendants.
*
* @param node
* node to render which
* @param domID
* registered dom id
* @param joint
* joint state
* @param depth
* depth to adjust indent
* @return rendered node element
*... | Render whole node container with descendants | render | {
"repo_name": "kaloyan-raev/che",
"path": "ide/che-core-ide-ui/src/main/java/org/eclipse/che/ide/ui/smartTree/presentation/PresentationRenderer.java",
"license": "epl-1.0",
"size": 3054
} | [
"com.google.gwt.dom.client.Element",
"org.eclipse.che.ide.ui.smartTree.Tree"
] | import com.google.gwt.dom.client.Element; import org.eclipse.che.ide.ui.smartTree.Tree; | import com.google.gwt.dom.client.*; import org.eclipse.che.ide.ui.*; | [
"com.google.gwt",
"org.eclipse.che"
] | com.google.gwt; org.eclipse.che; | 803,984 |
public Calibration getCalibration() {
if (calibration == null) {
return null;
}
final CalibrationWriter calibrationWriter = new CalibrationWriter(this.calibration);
if (hasIntensityConverter()) {
calibrationWriter.setIntensityUnit(getIntensityConverter().to());
}
if (hasDistanceCo... | Calibration function() { if (calibration == null) { return null; } final CalibrationWriter calibrationWriter = new CalibrationWriter(this.calibration); if (hasIntensityConverter()) { calibrationWriter.setIntensityUnit(getIntensityConverter().to()); } if (hasDistanceConverter()) { calibrationWriter.setDistanceUnit(getDi... | /**
* Gets the calibration, updated with the current output units of the converters.
*
* @return the calibration
*/ | Gets the calibration, updated with the current output units of the converters | getCalibration | {
"repo_name": "aherbert/GDSC-SMLM",
"path": "src/main/java/uk/ac/sussex/gdsc/smlm/results/PeakResultConversionHelper.java",
"license": "gpl-3.0",
"size": 12242
} | [
"uk.ac.sussex.gdsc.smlm.data.config.CalibrationProtos",
"uk.ac.sussex.gdsc.smlm.data.config.CalibrationWriter"
] | import uk.ac.sussex.gdsc.smlm.data.config.CalibrationProtos; import uk.ac.sussex.gdsc.smlm.data.config.CalibrationWriter; | import uk.ac.sussex.gdsc.smlm.data.config.*; | [
"uk.ac.sussex"
] | uk.ac.sussex; | 2,860,714 |
private void addActivationHandler() {
if (m_activationHandlerRegistration == null) {
m_activationHandlerRegistration = addMouseDownHandler(new MouseDownHandler() {
| void function() { if (m_activationHandlerRegistration == null) { m_activationHandlerRegistration = addMouseDownHandler(new MouseDownHandler() { | /**
* Adds a mouse down handler to activate the editing widget.<p>
*/ | Adds a mouse down handler to activate the editing widget | addActivationHandler | {
"repo_name": "ggiudetti/opencms-core",
"path": "src-gwt/org/opencms/acacia/client/ui/CmsAttributeValueView.java",
"license": "lgpl-2.1",
"size": 37316
} | [
"com.google.gwt.event.dom.client.MouseDownHandler"
] | import com.google.gwt.event.dom.client.MouseDownHandler; | import com.google.gwt.event.dom.client.*; | [
"com.google.gwt"
] | com.google.gwt; | 2,723,225 |
EList<JvmTypeReference> getFiredEvents(); | EList<JvmTypeReference> getFiredEvents(); | /**
* Returns the value of the '<em><b>Fired Events</b></em>' containment reference list.
* The list contents are of type {@link org.eclipse.xtext.common.types.JvmTypeReference}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Fired Events</em>' containment reference list.
... | Returns the value of the 'Fired Events' containment reference list. The list contents are of type <code>org.eclipse.xtext.common.types.JvmTypeReference</code>. | getFiredEvents | {
"repo_name": "sarl/sarl",
"path": "main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/sarl/SarlAction.java",
"license": "apache-2.0",
"size": 1107
} | [
"org.eclipse.emf.common.util.EList",
"org.eclipse.xtext.common.types.JvmTypeReference"
] | import org.eclipse.emf.common.util.EList; import org.eclipse.xtext.common.types.JvmTypeReference; | import org.eclipse.emf.common.util.*; import org.eclipse.xtext.common.types.*; | [
"org.eclipse.emf",
"org.eclipse.xtext"
] | org.eclipse.emf; org.eclipse.xtext; | 454,784 |
private void addItem(ApplicationModel applicationModel) {
addItem(Integer.MAX_VALUE, applicationModel);
}
/**
* Adds an item at {@code position} to the list in {@link android.content.SharedPreferences} | void function(ApplicationModel applicationModel) { addItem(Integer.MAX_VALUE, applicationModel); } /** * Adds an item at {@code position} to the list in {@link android.content.SharedPreferences} | /**
* Adds an item at the end of the list in {@link android.content.SharedPreferences} and calls
* the {@link MainView} to also add it to the shown list.
*/ | Adds an item at the end of the list in <code>android.content.SharedPreferences</code> and calls the <code>MainView</code> to also add it to the shown list | addItem | {
"repo_name": "mchllngr/QuickOpen",
"path": "app/src/main/java/de/mchllngr/quickopen/module/main/MainPresenter.java",
"license": "apache-2.0",
"size": 17422
} | [
"de.mchllngr.quickopen.model.ApplicationModel"
] | import de.mchllngr.quickopen.model.ApplicationModel; | import de.mchllngr.quickopen.model.*; | [
"de.mchllngr.quickopen"
] | de.mchllngr.quickopen; | 756,161 |
public ArrayList<TemplateState> modifyQualityBasedOnHistory( ArrayList<TemplateState> states )
{
for( TemplateState state : states ) {
String id = state.getTemplate().getId();
if( recentRunTemplates.contains(id) ) {
int index = recentRunTemplates.indexOf(id);
... | ArrayList<TemplateState> function( ArrayList<TemplateState> states ) { for( TemplateState state : states ) { String id = state.getTemplate().getId(); if( recentRunTemplates.contains(id) ) { int index = recentRunTemplates.indexOf(id); state.setQuality(state.getQuality() - ((index+1)*HISTORY_MODIFIER)); } } return states... | /**
* Modifies the quality-value of the given TemplateStates based on the behaviour history.
* The more recent a certain Behaviour was executed, the more its quality-value will be decreased.
*
* @param states
* @return
*/ | Modifies the quality-value of the given TemplateStates based on the behaviour history. The more recent a certain Behaviour was executed, the more its quality-value will be decreased | modifyQualityBasedOnHistory | {
"repo_name": "ARIA-VALUSPA/Flipper",
"path": "src/main/java/hmi/flipper/behaviourselection/TemplateController.java",
"license": "bsd-3-clause",
"size": 13493
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 1,632,335 |
protected void draw () {
if (surfaceHolder.getSurface().isValid()) {
canvas = surfaceHolder.lockCanvas();
canvas.drawColor(backgroundColor);
drawPaint.setColor(ContextCompat.getColor(context, R.color.secondaryBackground));
canvas.drawRect(0, gameAreaHeight, sc... | void function () { if (surfaceHolder.getSurface().isValid()) { canvas = surfaceHolder.lockCanvas(); canvas.drawColor(backgroundColor); drawPaint.setColor(ContextCompat.getColor(context, R.color.secondaryBackground)); canvas.drawRect(0, gameAreaHeight, screenWidth, gameAreaHeight + textAreaHeight, drawPaint); drawPaint.... | /**
* Draws the drawables. For sprites, a foreach loop is used as no changes to the sprite values
* takes place. This method should be called after {@link #update()}.
*/ | Draws the drawables. For sprites, a foreach loop is used as no changes to the sprite values takes place. This method should be called after <code>#update()</code> | draw | {
"repo_name": "barrett-chris/BubbleCount",
"path": "app/src/main/java/ca/chrisbarrett/bubblecount/view/GameView.java",
"license": "mit",
"size": 15480
} | [
"android.support.v4.content.ContextCompat",
"ca.chrisbarrett.bubblecount.util.TextFormat",
"ca.chrisbarrett.bubblecount.view.game.model.Sprite"
] | import android.support.v4.content.ContextCompat; import ca.chrisbarrett.bubblecount.util.TextFormat; import ca.chrisbarrett.bubblecount.view.game.model.Sprite; | import android.support.v4.content.*; import ca.chrisbarrett.bubblecount.util.*; import ca.chrisbarrett.bubblecount.view.game.model.*; | [
"android.support",
"ca.chrisbarrett.bubblecount"
] | android.support; ca.chrisbarrett.bubblecount; | 605,814 |
public void removeLogLogisticServiceList(List<LogLogisticService> logLogisticServiceList); | void function(List<LogLogisticService> logLogisticServiceList); | /**
* removeLogLogisticServiceList - removes a list of LogLogisticService
*
* @param logLogisticServiceList
*/ | removeLogLogisticServiceList - removes a list of LogLogisticService | removeLogLogisticServiceList | {
"repo_name": "yauritux/venice-legacy",
"path": "Venice/Venice-Interface-Model/src/main/java/com/gdn/venice/facade/LogLogisticServiceSessionEJBRemote.java",
"license": "apache-2.0",
"size": 2780
} | [
"com.gdn.venice.persistence.LogLogisticService",
"java.util.List"
] | import com.gdn.venice.persistence.LogLogisticService; import java.util.List; | import com.gdn.venice.persistence.*; import java.util.*; | [
"com.gdn.venice",
"java.util"
] | com.gdn.venice; java.util; | 2,587,276 |
@ApiModelProperty(
required = true,
value =
"Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names")
public String getName() {
return name;
} | @ApiModelProperty( required = true, value = "Name of the referent; More info: http: String function() { return name; } | /**
* Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names
*
* @return name
*/ | Name of the referent; More info: HREF | getName | {
"repo_name": "kubernetes-client/java",
"path": "kubernetes/src/main/java/io/kubernetes/client/openapi/models/V2beta2CrossVersionObjectReference.java",
"license": "apache-2.0",
"size": 4535
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 2,771,947 |
public void tableCaption(String attr, String value, Tags.Generator body) {
tag(_tableCaption, attr, value, null, null, body);
} | void function(String attr, String value, Tags.Generator body) { tag(_tableCaption, attr, value, null, null, body); } | /**
* Create a @code{fo:table-caption} tag with one attribute
* @param attr name of the attribute.
* @param value value of the attribute.
* @param body the body generator for the tag.
*/ | Create a @code{fo:table-caption} tag with one attribute | tableCaption | {
"repo_name": "bckfnn/taggersty",
"path": "xslfo/src/main/java/io/github/bckfnn/xslfo/XslfoTags.java",
"license": "apache-2.0",
"size": 171836
} | [
"io.github.bckfnn.taggersty.Tags"
] | import io.github.bckfnn.taggersty.Tags; | import io.github.bckfnn.taggersty.*; | [
"io.github.bckfnn"
] | io.github.bckfnn; | 1,749,372 |
@Deprecated
public String getFileType(AbstractFile file) throws TskCoreException {
String fileType = getMIMEType(file);
file.setMIMEType(fileType);
file.save();
return fileType;
} | String function(AbstractFile file) throws TskCoreException { String fileType = getMIMEType(file); file.setMIMEType(fileType); file.save(); return fileType; } | /**
* Gets the MIME type of a file, detecting it if it is not already known. If
* detection is necessary, the result is added to the case database.
*
* @param file The file.
*
* @return A MIME type name. If file type could not be detected or results
* were uncertain, octet-str... | Gets the MIME type of a file, detecting it if it is not already known. If detection is necessary, the result is added to the case database | getFileType | {
"repo_name": "eugene7646/autopsy",
"path": "Core/src/org/sleuthkit/autopsy/modules/filetypeid/FileTypeDetector.java",
"license": "apache-2.0",
"size": 19041
} | [
"org.sleuthkit.datamodel.AbstractFile",
"org.sleuthkit.datamodel.TskCoreException"
] | import org.sleuthkit.datamodel.AbstractFile; import org.sleuthkit.datamodel.TskCoreException; | import org.sleuthkit.datamodel.*; | [
"org.sleuthkit.datamodel"
] | org.sleuthkit.datamodel; | 316,533 |
public static ObjectType valueOf(short objectType) {
for (ObjectType v : ObjectType.values()) {
if (v.objectType == objectType) {
return v;
}
}
throw new IllegalArgumentException(
MessageFormat.format(bundle.getString("TskData.objectTypeEnum.exception.msg1.text"), objectTy... | static ObjectType function(short objectType) { for (ObjectType v : ObjectType.values()) { if (v.objectType == objectType) { return v; } } throw new IllegalArgumentException( MessageFormat.format(bundle.getString(STR), objectType)); } } public enum TSK_DB_FILES_TYPE_ENUM { FS(0, STR), CARVED(1, STR), DERIVED(2, STR), LO... | /**
* Convert object type short value to the enum type
* @param objectType long value to convert
* @return the enum type
*/ | Convert object type short value to the enum type | valueOf | {
"repo_name": "ForensicTools/Hotaru-475_2141-Edwards",
"path": "sleuthkit-develop/bindings/java/src/org/sleuthkit/datamodel/TskData.java",
"license": "mit",
"size": 22581
} | [
"java.text.MessageFormat"
] | import java.text.MessageFormat; | import java.text.*; | [
"java.text"
] | java.text; | 255,737 |
public void setPlatform(Platform platform) {
checkNotNull(platform);
this.platform = platform;
} | void function(Platform platform) { checkNotNull(platform); this.platform = platform; } | /**
* Sets the platform for the command line interface to use.
*
* @param platform the platform to use
* @see Platform
*/ | Sets the platform for the command line interface to use | setPlatform | {
"repo_name": "tsauerwein/geogig",
"path": "src/cli/src/main/java/org/locationtech/geogig/cli/GeogigCLI.java",
"license": "bsd-3-clause",
"size": 30766
} | [
"com.google.common.base.Preconditions",
"org.locationtech.geogig.api.Platform"
] | import com.google.common.base.Preconditions; import org.locationtech.geogig.api.Platform; | import com.google.common.base.*; import org.locationtech.geogig.api.*; | [
"com.google.common",
"org.locationtech.geogig"
] | com.google.common; org.locationtech.geogig; | 798,944 |
public void init( ServletConfig config ) throws ServletException {
try{
ConfigurationHelper.preConfigureConfigPathFromServletContext(config.getServletContext());
UserCredentialsDao.preCheckTableExistence();
// check if API is enabled
CloudStackConfigurationDao csDao = new CloudStackConfi... | void function( ServletConfig config ) throws ServletException { try{ ConfigurationHelper.preConfigureConfigPathFromServletContext(config.getServletContext()); UserCredentialsDao.preCheckTableExistence(); CloudStackConfigurationDao csDao = new CloudStackConfigurationDao(); String value = csDao.getConfigValue(ENABLE_EC2_... | /**
* We build the path to where the keystore holding the WS-Security X509 certificates
* are stored.
*/ | We build the path to where the keystore holding the WS-Security X509 certificates are stored | init | {
"repo_name": "argv0/cloudstack",
"path": "awsapi/src/com/cloud/bridge/service/EC2MainServlet.java",
"license": "apache-2.0",
"size": 4626
} | [
"com.cloud.bridge.persist.PersistContext",
"com.cloud.bridge.persist.dao.CloudStackConfigurationDao",
"com.cloud.bridge.persist.dao.UserCredentialsDao",
"com.cloud.bridge.util.ConfigurationHelper",
"javax.servlet.ServletConfig",
"javax.servlet.ServletException"
] | import com.cloud.bridge.persist.PersistContext; import com.cloud.bridge.persist.dao.CloudStackConfigurationDao; import com.cloud.bridge.persist.dao.UserCredentialsDao; import com.cloud.bridge.util.ConfigurationHelper; import javax.servlet.ServletConfig; import javax.servlet.ServletException; | import com.cloud.bridge.persist.*; import com.cloud.bridge.persist.dao.*; import com.cloud.bridge.util.*; import javax.servlet.*; | [
"com.cloud.bridge",
"javax.servlet"
] | com.cloud.bridge; javax.servlet; | 818,044 |
@Override
void remove(Quad quad);
/**
* Remove a concrete pattern of quads from the default graph of the dataset.
*
* @param graphName
* The graph the quad belongs to, wrapped as an {@link Optional} | void remove(Quad quad); /** * Remove a concrete pattern of quads from the default graph of the dataset. * * @param graphName * The graph the quad belongs to, wrapped as an {@link Optional} | /**
* Remove a concrete quad from the dataset.
*
* @param quad
* quad to remove
*/ | Remove a concrete quad from the dataset | remove | {
"repo_name": "apache/incubator-commonsrdf",
"path": "api/src/main/java/org/apache/commons/rdf/api/Dataset.java",
"license": "apache-2.0",
"size": 14013
} | [
"java.util.Optional"
] | import java.util.Optional; | import java.util.*; | [
"java.util"
] | java.util; | 934,211 |
public void removedService(ServiceReference arg0, Object arg1) {
try {
m_onDeparture.call(new Object[] {arg0});
} catch (NoSuchMethodException e) {
m_handler.error("The onDeparture method " + m_onDeparture.getMethod() + " does not exist in the class", e);
m_handle... | void function(ServiceReference arg0, Object arg1) { try { m_onDeparture.call(new Object[] {arg0}); } catch (NoSuchMethodException e) { m_handler.error(STR + m_onDeparture.getMethod() + STR, e); m_handler.getInstanceManager().stop(); } catch (IllegalAccessException e) { m_handler.error(STR + m_onDeparture.getMethod() + ... | /**
* A service disappears.
* @param arg0 the service reference
* @param arg1 the service object (if already get)
* @see org.apache.felix.ipojo.util.TrackerCustomizer#removedService(org.osgi.framework.ServiceReference, java.lang.Object)
*/ | A service disappears | removedService | {
"repo_name": "boneman1231/org.apache.felix",
"path": "trunk/ipojo/handler/whiteboard/src/main/java/org/apache/felix/ipojo/handler/wbp/WhiteBoardManager.java",
"license": "apache-2.0",
"size": 6672
} | [
"java.lang.reflect.InvocationTargetException",
"org.osgi.framework.ServiceReference"
] | import java.lang.reflect.InvocationTargetException; import org.osgi.framework.ServiceReference; | import java.lang.reflect.*; import org.osgi.framework.*; | [
"java.lang",
"org.osgi.framework"
] | java.lang; org.osgi.framework; | 2,033,446 |
public void setSpaceAfter(int spaceAfter) {
this.spaceAfter = spaceAfter;
}
/**
* Returns the value of the break before the element whose
* {@link LayoutManager#getNextKnuthElements(LayoutContext, int)} method has just been
* called.
*
* @return one of {@link Constants#EN_A... | void function(int spaceAfter) { this.spaceAfter = spaceAfter; } /** * Returns the value of the break before the element whose * {@link LayoutManager#getNextKnuthElements(LayoutContext, int)} method has just been * called. * * @return one of {@link Constants#EN_AUTO}, {@link Constants#EN_COLUMN}, * {@link Constants#EN_P... | /**
* Set the amount of space after / end
* @param spaceAfter the amount of space after / end
*/ | Set the amount of space after / end | setSpaceAfter | {
"repo_name": "Distrotech/fop",
"path": "src/java/org/apache/fop/layoutmgr/LayoutContext.java",
"license": "apache-2.0",
"size": 22718
} | [
"org.apache.fop.fo.Constants"
] | import org.apache.fop.fo.Constants; | import org.apache.fop.fo.*; | [
"org.apache.fop"
] | org.apache.fop; | 1,021,873 |
public String readDefaultTemplate()
throws LocalizedException {
ClassLoader loader = this.getClass().getClassLoader();
InputStream input = loader.getResourceAsStream(DEFAULT_TEMPLATE);
if (input == null) {
throw new LocalizedException(this, "reading.nodefault",... | String function() throws LocalizedException { ClassLoader loader = this.getClass().getClassLoader(); InputStream input = loader.getResourceAsStream(DEFAULT_TEMPLATE); if (input == null) { throw new LocalizedException(this, STR, STR); } else try { return read(input); } catch (IOException exception) { throw new Localized... | /**
* <p>Read the default template shipped with this plugin.</p>
*
* @return a <b>non-null</b> string with the template contents (escaped).
*/ | Read the default template shipped with this plugin | readDefaultTemplate | {
"repo_name": "dkulp/couldit-autoexport",
"path": "src/main/java/it/could/confluence/autoexport/TemplatesManager.java",
"license": "bsd-3-clause",
"size": 12485
} | [
"it.could.confluence.localization.LocalizedException",
"java.io.IOException",
"java.io.InputStream"
] | import it.could.confluence.localization.LocalizedException; import java.io.IOException; import java.io.InputStream; | import it.could.confluence.localization.*; import java.io.*; | [
"it.could.confluence",
"java.io"
] | it.could.confluence; java.io; | 2,088,965 |
@Test
public void testDouble2String() {
try {
Message message = senderSession.createMessage();
message.setDoubleProperty("prop", 127.0);
Assert.assertEquals("127.0", message.getStringProperty("prop"));
} catch (JMSException e) {
fail(e);
}
} | void function() { try { Message message = senderSession.createMessage(); message.setDoubleProperty("prop", 127.0); Assert.assertEquals("127.0", message.getStringProperty("prop")); } catch (JMSException e) { fail(e); } } | /**
* if a property is set as a <code>double</code>,
* it can also be read as a <code>java.lang.String</code>.
*/ | if a property is set as a <code>double</code>, it can also be read as a <code>java.lang.String</code> | testDouble2String | {
"repo_name": "cshannon/activemq-artemis",
"path": "tests/joram-tests/src/test/java/org/objectweb/jtests/jms/conform/message/properties/MessagePropertyConversionTest.java",
"license": "apache-2.0",
"size": 43771
} | [
"javax.jms.JMSException",
"javax.jms.Message",
"org.junit.Assert"
] | import javax.jms.JMSException; import javax.jms.Message; import org.junit.Assert; | import javax.jms.*; import org.junit.*; | [
"javax.jms",
"org.junit"
] | javax.jms; org.junit; | 11,418 |
private static Iterable<? extends TransitiveInfoCollection> getPrerequisites(
RuleContext ruleContext, String attributeName) {
if (ruleContext.getRule().isAttrDefined(attributeName, BuildType.LABEL_LIST)) {
return ruleContext.getPrerequisites(attributeName);
} else {
return Colle... | static Iterable<? extends TransitiveInfoCollection> function( RuleContext ruleContext, String attributeName) { if (ruleContext.getRule().isAttrDefined(attributeName, BuildType.LABEL_LIST)) { return ruleContext.getPrerequisites(attributeName); } else { return Collections.emptyList(); } } } | /**
* For the specified attribute "attributeName" (which must be of type list(label)), resolves all
* the labels into ConfiguredTargets (for the same configuration as this one) and returns them
* as a list.
*
* <p>If the rule does not have the specified attribute, returns the empty list.
*... | For the specified attribute "attributeName" (which must be of type list(label)), resolves all the labels into ConfiguredTargets (for the same configuration as this one) and returns them as a list. If the rule does not have the specified attribute, returns the empty list | getPrerequisites | {
"repo_name": "twitter-forks/bazel",
"path": "src/main/java/com/google/devtools/build/lib/analysis/Runfiles.java",
"license": "apache-2.0",
"size": 45422
} | [
"com.google.devtools.build.lib.packages.BuildType",
"java.util.Collections"
] | import com.google.devtools.build.lib.packages.BuildType; import java.util.Collections; | import com.google.devtools.build.lib.packages.*; import java.util.*; | [
"com.google.devtools",
"java.util"
] | com.google.devtools; java.util; | 595,783 |
public RepeatedFieldBuilderV3<MType, BType, IType> addAllMessages(
Iterable<? extends MType> values) {
for (final MType value : values) {
checkNotNull(value);
}
// If we can inspect the size, we can more efficiently add messages.
int size = -1;
if (values instanceof Collection) {
... | RepeatedFieldBuilderV3<MType, BType, IType> function( Iterable<? extends MType> values) { for (final MType value : values) { checkNotNull(value); } int size = -1; if (values instanceof Collection) { @SuppressWarnings(STR) final Collection<MType> collection = (Collection<MType>) values; if (collection.size() == 0) { ret... | /**
* Appends all of the messages in the specified collection to the end of this list, in the order
* that they are returned by the specified collection's iterator.
*
* @param values the messages to add
* @return the builder
*/ | Appends all of the messages in the specified collection to the end of this list, in the order that they are returned by the specified collection's iterator | addAllMessages | {
"repo_name": "endlessm/chromium-browser",
"path": "third_party/protobuf/java/core/src/main/java/com/google/protobuf/RepeatedFieldBuilderV3.java",
"license": "bsd-3-clause",
"size": 22670
} | [
"com.google.protobuf.Internal",
"java.util.ArrayList",
"java.util.Collection"
] | import com.google.protobuf.Internal; import java.util.ArrayList; import java.util.Collection; | import com.google.protobuf.*; import java.util.*; | [
"com.google.protobuf",
"java.util"
] | com.google.protobuf; java.util; | 1,761,473 |
final private ServiceItem handleCacheMiss(final ServiceID serviceId) {
ServiceItem item = null;
try {
final ServiceTemplate template = new ServiceTemplate(serviceId,
null, null);
item = serviceDiscoveryManager.lookup(template, filter,
cacheMis... | final ServiceItem function(final ServiceID serviceId) { ServiceItem item = null; try { final ServiceTemplate template = new ServiceTemplate(serviceId, null, null); item = serviceDiscoveryManager.lookup(template, filter, cacheMissTimeout); } catch (RemoteException ex) { log.error(ex); return null; } catch (InterruptedEx... | /**
* Handles a cache miss by a remote query on the managed set of service
* registrars.
*/ | Handles a cache miss by a remote query on the managed set of service registrars | handleCacheMiss | {
"repo_name": "rac021/blazegraph_1_5_3_cluster_2_nodes",
"path": "bigdata-jini/src/main/java/com/bigdata/service/jini/lookup/AbstractCachingServiceClient.java",
"license": "gpl-2.0",
"size": 28981
} | [
"java.rmi.RemoteException",
"net.jini.core.lookup.ServiceID",
"net.jini.core.lookup.ServiceItem",
"net.jini.core.lookup.ServiceTemplate"
] | import java.rmi.RemoteException; import net.jini.core.lookup.ServiceID; import net.jini.core.lookup.ServiceItem; import net.jini.core.lookup.ServiceTemplate; | import java.rmi.*; import net.jini.core.lookup.*; | [
"java.rmi",
"net.jini.core"
] | java.rmi; net.jini.core; | 2,137,143 |
private int getVtunnelExpands(final IpcDataUnit[] responsePacket,
int index, JsonArray vtunnelExpands) {
JsonObject vtunnelExpand = null;
IpcStruct valvtunnelExpandStruct = null;
byte validBit = (byte)UncStructIndexEnum.Valid.UNC_VF_INVALID.ordinal();
long size = ((IpcUint32) (responsePacket[index])).long... | int function(final IpcDataUnit[] responsePacket, int index, JsonArray vtunnelExpands) { JsonObject vtunnelExpand = null; IpcStruct valvtunnelExpandStruct = null; byte validBit = (byte)UncStructIndexEnum.Valid.UNC_VF_INVALID.ordinal(); long size = ((IpcUint32) (responsePacket[index])).longValue(); for (int i = 0; i < si... | /**
* Get vtnunel expand from IPC
*
* @param responsePacket
* @param index
* @param vtunnelExpands
* @return int
*/ | Get vtnunel expand from IPC | getVtunnelExpands | {
"repo_name": "opendaylight/vtn",
"path": "coordinator/java/vtn-javaapi/src/org/opendaylight/vtn/javaapi/ipc/conversion/IpcLogicalResponseFactory.java",
"license": "epl-1.0",
"size": 506141
} | [
"com.google.gson.JsonArray",
"com.google.gson.JsonObject",
"org.opendaylight.vtn.core.ipc.IpcDataUnit",
"org.opendaylight.vtn.core.ipc.IpcStruct",
"org.opendaylight.vtn.core.ipc.IpcUint32",
"org.opendaylight.vtn.javaapi.constants.VtnServiceIpcConsts",
"org.opendaylight.vtn.javaapi.constants.VtnServiceJs... | import com.google.gson.JsonArray; import com.google.gson.JsonObject; import org.opendaylight.vtn.core.ipc.IpcDataUnit; import org.opendaylight.vtn.core.ipc.IpcStruct; import org.opendaylight.vtn.core.ipc.IpcUint32; import org.opendaylight.vtn.javaapi.constants.VtnServiceIpcConsts; import org.opendaylight.vtn.javaapi.co... | import com.google.gson.*; import org.opendaylight.vtn.core.ipc.*; import org.opendaylight.vtn.javaapi.constants.*; import org.opendaylight.vtn.javaapi.ipc.enums.*; | [
"com.google.gson",
"org.opendaylight.vtn"
] | com.google.gson; org.opendaylight.vtn; | 1,015,611 |
private Set<ObjectName> getRootBeans(Set<ObjectName> childRbeOns, final String string, final int keyListSize) {
return Sets.newHashSet(Collections2.filter(childRbeOns, new Predicate<ObjectName>() { | Set<ObjectName> function(Set<ObjectName> childRbeOns, final String string, final int keyListSize) { return Sets.newHashSet(Collections2.filter(childRbeOns, new Predicate<ObjectName>() { | /**
* Finds next level root runtime beans, beans that have the same properties
* as current root + one additional
*/ | Finds next level root runtime beans, beans that have the same properties as current root + one additional | getRootBeans | {
"repo_name": "my76128/controller",
"path": "opendaylight/netconf/config-netconf-connector/src/main/java/org/opendaylight/controller/netconf/confignetconfconnector/mapping/runtime/InstanceRuntime.java",
"license": "epl-1.0",
"size": 4923
} | [
"com.google.common.base.Predicate",
"com.google.common.collect.Collections2",
"com.google.common.collect.Sets",
"java.util.Set",
"javax.management.ObjectName"
] | import com.google.common.base.Predicate; import com.google.common.collect.Collections2; import com.google.common.collect.Sets; import java.util.Set; import javax.management.ObjectName; | import com.google.common.base.*; import com.google.common.collect.*; import java.util.*; import javax.management.*; | [
"com.google.common",
"java.util",
"javax.management"
] | com.google.common; java.util; javax.management; | 2,532,533 |
private void actionUp(int xCoord, int yCoord)
{
outTouch_coord.setCoordinates(xCoord, yCoord);
String word= CaptureWord.controlCaptureWord(inTouch_coord, outTouch_coord);
Log.i("LineDrawView - onTouch", "action up: y["+ yCoord +"], x[" +xCoord +']' + ", word "+ word);
//if support is into the wor... | void function(int xCoord, int yCoord) { outTouch_coord.setCoordinates(xCoord, yCoord); String word= CaptureWord.controlCaptureWord(inTouch_coord, outTouch_coord); Log.i(STR, STR+ yCoord +STR +xCoord +']' + STR+ word); if(word!=null) { CaptureWord.strikeWord(word); Line newWordStriked= new Line (inTouch_coord, outTouch_... | /**
* The actionUp method take the last cell touched from the finger, control if from the first touch
* to the last, the player have found a word. If the player have found a word, strike the word into
* the word list.
* @param x_Coord x cordinate of the touch in the grid
* @param y_Coord y cordinate of the ... | The actionUp method take the last cell touched from the finger, control if from the first touch to the last, the player have found a word. If the player have found a word, strike the word into the word list | actionUp | {
"repo_name": "sarettasarda/FindYourWords",
"path": "find_your_words/src/main/java/grid/LineDrawView.java",
"license": "apache-2.0",
"size": 6248
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 2,623,099 |
public static double[][] calculatePercentile(double[] distribution) {
double[][] result = new double[100][100];
Percentile pecentile = new Percentile();
pecentile.setData(distribution);
for (int i = 1; i <= 100; i++) {
int j = 0;
result[i - 1][j] = i - 1;
result[i - 1][j + 1] = pecentile.evaluate(i)... | static double[][] function(double[] distribution) { double[][] result = new double[100][100]; Percentile pecentile = new Percentile(); pecentile.setData(distribution); for (int i = 1; i <= 100; i++) { int j = 0; result[i - 1][j] = i - 1; result[i - 1][j + 1] = pecentile.evaluate(i); } return result; } | /**
* Calculates the percentile values for a given set of values.
*
* @param distribution
* @return - array of values and percentile values.
*/ | Calculates the percentile values for a given set of values | calculatePercentile | {
"repo_name": "tmtsoftware/es-perftest",
"path": "mbsuite-utilities/src/com/persistent/bcsuite/charts/utils/ReportUtils.java",
"license": "mit",
"size": 8340
} | [
"org.apache.commons.math3.stat.descriptive.rank.Percentile"
] | import org.apache.commons.math3.stat.descriptive.rank.Percentile; | import org.apache.commons.math3.stat.descriptive.rank.*; | [
"org.apache.commons"
] | org.apache.commons; | 181,007 |
public NdefRecord createTextRecord(String payload)
{
String language = "en";
boolean encodeInUtf8 = true;
byte[] langBytes = language.getBytes(Charset.forName("US-ASCII"));
Charset utfEncoding = encodeInUtf8 ? Charset.forName("UTF-8") : Charset.forName("UTF-16");
byte[] textBy... | NdefRecord function(String payload) { String language = "en"; boolean encodeInUtf8 = true; byte[] langBytes = language.getBytes(Charset.forName(STR)); Charset utfEncoding = encodeInUtf8 ? Charset.forName("UTF-8") : Charset.forName(STR); byte[] textBytes = payload.getBytes(utfEncoding); int utfBit = encodeInUtf8 ? 0 : (... | /**
* Create the record with the message passed in in the payload.
* The card id in sector 1. THere will be an en and byte info there also.
* @param payload
* @return
*/ | Create the record with the message passed in in the payload. The card id in sector 1. THere will be an en and byte info there also | createTextRecord | {
"repo_name": "timofeysie/wherewithal",
"path": "src/com/curchod/wherewithal/CardPlayerWordsActivity.java",
"license": "gpl-3.0",
"size": 87365
} | [
"android.nfc.NdefRecord",
"java.nio.charset.Charset"
] | import android.nfc.NdefRecord; import java.nio.charset.Charset; | import android.nfc.*; import java.nio.charset.*; | [
"android.nfc",
"java.nio"
] | android.nfc; java.nio; | 1,055,912 |
public void setIssuerKeyID(boolean isCritical, long keyID)
{
list.add(new IssuerKeyID(isCritical, keyID));
} | void function(boolean isCritical, long keyID) { list.add(new IssuerKeyID(isCritical, keyID)); } | /**
* Sets issuer key sub packe
*/ | Sets issuer key sub packe | setIssuerKeyID | {
"repo_name": "sake/bouncycastle-java",
"path": "src/org/bouncycastle/openpgp/PGPSignatureSubpacketGenerator.java",
"license": "mit",
"size": 6182
} | [
"org.bouncycastle.bcpg.sig.IssuerKeyID"
] | import org.bouncycastle.bcpg.sig.IssuerKeyID; | import org.bouncycastle.bcpg.sig.*; | [
"org.bouncycastle.bcpg"
] | org.bouncycastle.bcpg; | 1,391,663 |
public Iterator<String> getOrganizations();
| Iterator<String> function(); | /**
* <p>Returns an iterator of all organizations.</p>
*
* @return {@link Iterator}<String>
*/ | Returns an iterator of all organizations | getOrganizations | {
"repo_name": "FullMetal210/milton2",
"path": "external/cardme/src/main/java/info/ineighborhood/cardme/vcard/features/OrganizationFeature.java",
"license": "agpl-3.0",
"size": 4375
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 1,849,803 |
static int init(Path tmpFile) throws Throwable {
if (Constants.LINUX) {
return linuxImpl();
} else if (Constants.MAC_OS_X) {
macImpl(tmpFile);
return 1;
} else if (Constants.SUN_OS) {
solarisImpl();
return 1;
} else {
... | static int init(Path tmpFile) throws Throwable { if (Constants.LINUX) { return linuxImpl(); } else if (Constants.MAC_OS_X) { macImpl(tmpFile); return 1; } else if (Constants.SUN_OS) { solarisImpl(); return 1; } else { throw new UnsupportedOperationException(STR + Constants.OS_NAME + "'"); } } | /**
* Attempt to drop the capability to execute for the process.
* <p>
* This is best effort and OS and architecture dependent. It may throw any Throwable.
* @return 0 if we can do this for application threads, 1 for the entire process
*/ | Attempt to drop the capability to execute for the process. This is best effort and OS and architecture dependent. It may throw any Throwable | init | {
"repo_name": "drewr/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/bootstrap/Seccomp.java",
"license": "apache-2.0",
"size": 23470
} | [
"java.nio.file.Path",
"org.apache.lucene.util.Constants"
] | import java.nio.file.Path; import org.apache.lucene.util.Constants; | import java.nio.file.*; import org.apache.lucene.util.*; | [
"java.nio",
"org.apache.lucene"
] | java.nio; org.apache.lucene; | 1,881,779 |
@Override
public Response apisApiIdPoliciesMediationGet(String apiId, Integer limit, Integer offset,
String query, String accept, String ifNoneMatch) {
//pre-processing
//setting default limit and offset values if they are not set
limit =... | Response function(String apiId, Integer limit, Integer offset, String query, String accept, String ifNoneMatch) { limit = limit != null ? limit : RestApiConstants.PAGINATION_LIMIT_DEFAULT; offset = offset != null ? offset : RestApiConstants.PAGINATION_OFFSET_DEFAULT; APIIdentifier apiIdentifier; try { APIProvider apiPr... | /**
* Returns list of API specific Mediation policies
*
* @param apiId uuid of the api
* @param limit maximum number of mediation returns
* @param offset starting index
* @param query search condition
* @param accept accept header value
* @param ifNone... | Returns list of API specific Mediation policies | apisApiIdPoliciesMediationGet | {
"repo_name": "nuwand/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.rest.api.publisher/src/main/java/org/wso2/carbon/apimgt/rest/api/publisher/impl/ApisApiServiceImpl.java",
"license": "apache-2.0",
"size": 106859
} | [
"java.util.List",
"javax.ws.rs.core.Response",
"org.wso2.carbon.apimgt.api.APIManagementException",
"org.wso2.carbon.apimgt.api.APIProvider",
"org.wso2.carbon.apimgt.api.model.APIIdentifier",
"org.wso2.carbon.apimgt.api.model.Mediation",
"org.wso2.carbon.apimgt.rest.api.publisher.dto.MediationListDTO",
... | import java.util.List; import javax.ws.rs.core.Response; import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.api.APIProvider; import org.wso2.carbon.apimgt.api.model.APIIdentifier; import org.wso2.carbon.apimgt.api.model.Mediation; import org.wso2.carbon.apimgt.rest.api.publisher.dto... | import java.util.*; import javax.ws.rs.core.*; import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.api.model.*; import org.wso2.carbon.apimgt.rest.api.publisher.dto.*; import org.wso2.carbon.apimgt.rest.api.publisher.utils.mappings.*; import org.wso2.carbon.apimgt.rest.api.util.*; import org.wso2.carbon.... | [
"java.util",
"javax.ws",
"org.wso2.carbon"
] | java.util; javax.ws; org.wso2.carbon; | 1,454,679 |
public static Calendar truncateToMidnight(Calendar calendar) {
return DateUtils.truncate(calendar, Calendar.DAY_OF_MONTH);
} | static Calendar function(Calendar calendar) { return DateUtils.truncate(calendar, Calendar.DAY_OF_MONTH); } | /**
* Truncates the time from the calendar object.
*/ | Truncates the time from the calendar object | truncateToMidnight | {
"repo_name": "AchimHentschel/smarthome",
"path": "extensions/binding/org.eclipse.smarthome.binding.astro/src/main/java/org/eclipse/smarthome/binding/astro/internal/util/DateTimeUtils.java",
"license": "epl-1.0",
"size": 8088
} | [
"java.util.Calendar",
"org.apache.commons.lang.time.DateUtils"
] | import java.util.Calendar; import org.apache.commons.lang.time.DateUtils; | import java.util.*; import org.apache.commons.lang.time.*; | [
"java.util",
"org.apache.commons"
] | java.util; org.apache.commons; | 675,292 |
protected List<String> getListOfNamespaces(String property) throws Exception {
List<String> namespaces = Lists.newArrayList();
// First get the list of cluster nodes
log.info("Children of {} : {}", path(POLICIES, property),
globalZk().getChildren(path(POLICIES, property), nul... | List<String> function(String property) throws Exception { List<String> namespaces = Lists.newArrayList(); log.info(STR, path(POLICIES, property), globalZk().getChildren(path(POLICIES, property), null)); for (String cluster : globalZk().getChildren(path(POLICIES, property), false)) { try { for (String namespace : global... | /**
* Get the list of namespaces (on every cluster) for a given property
*
* @param property
* the property name
* @return the list of namespaces
*/ | Get the list of namespaces (on every cluster) for a given property | getListOfNamespaces | {
"repo_name": "tkb77/pulsar",
"path": "pulsar-broker/src/main/java/org/apache/pulsar/broker/admin/AdminResource.java",
"license": "apache-2.0",
"size": 14980
} | [
"com.google.common.collect.Lists",
"java.util.List",
"org.apache.zookeeper.KeeperException"
] | import com.google.common.collect.Lists; import java.util.List; import org.apache.zookeeper.KeeperException; | import com.google.common.collect.*; import java.util.*; import org.apache.zookeeper.*; | [
"com.google.common",
"java.util",
"org.apache.zookeeper"
] | com.google.common; java.util; org.apache.zookeeper; | 2,626,167 |
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
switch (notification.getFeatureID(CyberPhysicalSystem.class)) {
case CyberPhysicalSystemPackage.CYBER_PHYSICAL_SYSTEM__IDENTIFIER:
case CyberPhysicalSystemPackage.CYBER_PHYSICAL_SYSTEM__DB_URL:
fireNotifyCh... | void function(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(CyberPhysicalSystem.class)) { case CyberPhysicalSystemPackage.CYBER_PHYSICAL_SYSTEM__IDENTIFIER: case CyberPhysicalSystemPackage.CYBER_PHYSICAL_SYSTEM__DB_URL: fireNotifyChanged(new ViewerNotification(notification... | /**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This handles model notifications by calling <code>#updateChildren</code> to update any cached children and by creating a viewer notification, which it passes to <code>#fireNotifyChanged</code>. | notifyChanged | {
"repo_name": "IncQueryLabs/incquery-examples-cps",
"path": "domains/org.eclipse.viatra.examples.cps.model.edit/src/org/eclipse/viatra/examples/cps/cyberPhysicalSystem/provider/CyberPhysicalSystemItemProvider.java",
"license": "epl-1.0",
"size": 10632
} | [
"org.eclipse.emf.common.notify.Notification",
"org.eclipse.emf.edit.provider.ViewerNotification",
"org.eclipse.viatra.examples.cps.cyberPhysicalSystem.CyberPhysicalSystem",
"org.eclipse.viatra.examples.cps.cyberPhysicalSystem.CyberPhysicalSystemPackage"
] | import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.edit.provider.ViewerNotification; import org.eclipse.viatra.examples.cps.cyberPhysicalSystem.CyberPhysicalSystem; import org.eclipse.viatra.examples.cps.cyberPhysicalSystem.CyberPhysicalSystemPackage; | import org.eclipse.emf.common.notify.*; import org.eclipse.emf.edit.provider.*; import org.eclipse.viatra.examples.cps.*; | [
"org.eclipse.emf",
"org.eclipse.viatra"
] | org.eclipse.emf; org.eclipse.viatra; | 2,681,448 |
void throwIfCurrentThreadHadExpiredLease() throws LeaseExpiredException {
if (this.expiredLeases == null) {
return;
}
if (this.expiredLeases.containsKey(Thread.currentThread())) {
this.expiredLeases.remove(Thread.currentThread());
throw new LeaseExpiredException(
LocalizedStrin... | void throwIfCurrentThreadHadExpiredLease() throws LeaseExpiredException { if (this.expiredLeases == null) { return; } if (this.expiredLeases.containsKey(Thread.currentThread())) { this.expiredLeases.remove(Thread.currentThread()); throw new LeaseExpiredException( LocalizedStrings.DLockToken_THIS_THREADS_LEASE_EXPIRED_F... | /**
* Throws LeaseExpiredException if the calling thread's lease on this lock previously expired. The
* expired lease will no longer be tracked after throwing LeaseExpiredException. Caller must
* synchronize on this lock token.
*
* @throws LeaseExpiredException if calling thread's lease expired
*/ | Throws LeaseExpiredException if the calling thread's lease on this lock previously expired. The expired lease will no longer be tracked after throwing LeaseExpiredException. Caller must synchronize on this lock token | throwIfCurrentThreadHadExpiredLease | {
"repo_name": "smanvi-pivotal/geode",
"path": "geode-core/src/main/java/org/apache/geode/distributed/internal/locks/DLockToken.java",
"license": "apache-2.0",
"size": 17808
} | [
"org.apache.geode.distributed.LeaseExpiredException",
"org.apache.geode.internal.i18n.LocalizedStrings"
] | import org.apache.geode.distributed.LeaseExpiredException; import org.apache.geode.internal.i18n.LocalizedStrings; | import org.apache.geode.distributed.*; import org.apache.geode.internal.i18n.*; | [
"org.apache.geode"
] | org.apache.geode; | 157,876 |
protected void addStaticReferenceKeyPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_Sequence_staticReferenceKey_feature"),
getString("_UI_Pr... | void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), EsbPackage.Literals.SEQUENCE__STATIC_REFERENCE_KEY, true, false, false, null, null, null)); } | /**
* This adds a property descriptor for the Static Reference Key feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This adds a property descriptor for the Static Reference Key feature. | addStaticReferenceKeyPropertyDescriptor | {
"repo_name": "chanakaudaya/developer-studio",
"path": "esb/org.wso2.developerstudio.eclipse.gmf.esb.edit/src/org/wso2/developerstudio/eclipse/gmf/esb/provider/SequenceItemProvider.java",
"license": "apache-2.0",
"size": 19589
} | [
"org.eclipse.emf.edit.provider.ComposeableAdapterFactory",
"org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage"
] | import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage; | import org.eclipse.emf.edit.provider.*; import org.wso2.developerstudio.eclipse.gmf.esb.*; | [
"org.eclipse.emf",
"org.wso2.developerstudio"
] | org.eclipse.emf; org.wso2.developerstudio; | 1,510,766 |
public static SparkNameFunction fromConfig(Config config, String key, Registry registry) {
return fromPatternList(config.getConfigList(key), registry);
} | static SparkNameFunction function(Config config, String key, Registry registry) { return fromPatternList(config.getConfigList(key), registry); } | /**
* Create a name function based on a config.
*/ | Create a name function based on a config | fromConfig | {
"repo_name": "pstout/spectator",
"path": "spectator-ext-spark/src/main/java/com/netflix/spectator/spark/SparkNameFunction.java",
"license": "apache-2.0",
"size": 3518
} | [
"com.netflix.spectator.api.Registry",
"com.typesafe.config.Config"
] | import com.netflix.spectator.api.Registry; import com.typesafe.config.Config; | import com.netflix.spectator.api.*; import com.typesafe.config.*; | [
"com.netflix.spectator",
"com.typesafe.config"
] | com.netflix.spectator; com.typesafe.config; | 2,554,447 |
private Map<String, List<Integer>> generateOptionRanksMapping(List<FeedbackResponseAttributes> responses) {
Map<FeedbackResponseAttributes, Integer> normalisedRankOfResponse = getNormalisedRankForEachResponse(responses);
Map<String, List<Integer>> optionRanks = new HashMap<>();
for (Feedba... | Map<String, List<Integer>> function(List<FeedbackResponseAttributes> responses) { Map<FeedbackResponseAttributes, Integer> normalisedRankOfResponse = getNormalisedRankForEachResponse(responses); Map<String, List<Integer>> optionRanks = new HashMap<>(); for (FeedbackResponseAttributes response : responses) { updateOptio... | /**
* From the feedback responses, generate a mapping of the option to a list of
* ranks received for that option.
* The key of the map returned is the recipient's participant identifier.
* The values of the map are list of ranks received by the recipient.
* @param responses a list of response... | From the feedback responses, generate a mapping of the option to a list of ranks received for that option. The key of the map returned is the recipient's participant identifier. The values of the map are list of ranks received by the recipient | generateOptionRanksMapping | {
"repo_name": "thenaesh/teammates",
"path": "src/main/java/teammates/common/datatransfer/questions/FeedbackRankRecipientsQuestionDetails.java",
"license": "gpl-2.0",
"size": 16671
} | [
"java.util.HashMap",
"java.util.List",
"java.util.Map"
] | import java.util.HashMap; import java.util.List; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 484,298 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.