method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
@Override
public void visitEnd()
{
if (metaTags == null)
metaTags = new IMetaTag[0];
if (definition instanceof ClassDefinition)
{
ClassDefinition classDef = (ClassDefinition)definition;
IFunctionDefinition constructor = classDef.getConstructor();
... | void function() { if (metaTags == null) metaTags = new IMetaTag[0]; if (definition instanceof ClassDefinition) { ClassDefinition classDef = (ClassDefinition)definition; IFunctionDefinition constructor = classDef.getConstructor(); if (constructor != null) { IMetaTag ctorGotoDefHelpTag = findMetaTag(IMetaAttributeConstan... | /**
* Store the meta tags in the definition object.
*/ | Store the meta tags in the definition object | visitEnd | {
"repo_name": "adufilie/flex-falcon",
"path": "compiler/src/org/apache/flex/compiler/internal/abc/CollectMetadataTraitVisitor.java",
"license": "apache-2.0",
"size": 5553
} | [
"org.apache.flex.compiler.constants.IMetaAttributeConstants",
"org.apache.flex.compiler.definitions.IFunctionDefinition",
"org.apache.flex.compiler.definitions.metadata.IMetaTag",
"org.apache.flex.compiler.internal.definitions.ClassDefinition"
] | import org.apache.flex.compiler.constants.IMetaAttributeConstants; import org.apache.flex.compiler.definitions.IFunctionDefinition; import org.apache.flex.compiler.definitions.metadata.IMetaTag; import org.apache.flex.compiler.internal.definitions.ClassDefinition; | import org.apache.flex.compiler.constants.*; import org.apache.flex.compiler.definitions.*; import org.apache.flex.compiler.definitions.metadata.*; import org.apache.flex.compiler.internal.definitions.*; | [
"org.apache.flex"
] | org.apache.flex; | 1,581,911 |
public static void submit(Optional<EventSubmitter> submitter, String name, String... metadataEls) {
if (submitter.isPresent()) {
submitter.get().submit(name, metadataEls);
}
} | static void function(Optional<EventSubmitter> submitter, String name, String... metadataEls) { if (submitter.isPresent()) { submitter.get().submit(name, metadataEls); } } | /**
* Calls submit on submitter if present.
*/ | Calls submit on submitter if present | submit | {
"repo_name": "pldash/gobblin-1",
"path": "gobblin-metrics/src/main/java/gobblin/metrics/event/EventSubmitter.java",
"license": "apache-2.0",
"size": 5092
} | [
"com.google.common.base.Optional"
] | import com.google.common.base.Optional; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 2,265,167 |
public void run() {
while (!isInterrupted()) {
try {
// accept incoming connections and build channel endpoints
// for them
remoting.createEndpoint(new TCPChannel(socket.accept()));
} catch (final IOException ioe) {
ioe.printStackTrace();
}
}
}
} | void function() { while (!isInterrupted()) { try { remoting.createEndpoint(new TCPChannel(socket.accept())); } catch (final IOException ioe) { ioe.printStackTrace(); } } } } | /**
* thread loop.
*
* @see java.lang.Thread#run()
*/ | thread loop | run | {
"repo_name": "bdaum/zoraPD",
"path": "ch.ethz.iks.r_osgi.remote/src/ch/ethz/iks/r_osgi/impl/TCPChannelFactory.java",
"license": "gpl-2.0",
"size": 10600
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 695,832 |
Description addDescription(); | Description addDescription(); | /**
* Adds new child to the list of description children.
*
* @return created child
*/ | Adds new child to the list of description children | addDescription | {
"repo_name": "consulo/consulo-javaee",
"path": "javaee-api/src/main/java/com/intellij/javaee/model/xml/application/JavaeeApplication.java",
"license": "apache-2.0",
"size": 5008
} | [
"com.intellij.javaee.model.xml.Description"
] | import com.intellij.javaee.model.xml.Description; | import com.intellij.javaee.model.xml.*; | [
"com.intellij.javaee"
] | com.intellij.javaee; | 1,604,899 |
public boolean isInMyContact(String userId) throws SocialNetworkException {
try {
int id = Integer.parseInt(userId);
return relationShipService.isInRelationShip(Integer.parseInt(this.getUserId()), id);
} catch (SQLException ex) {
throw new SocialNetworkException("ProfilSessionController.isIn... | boolean function(String userId) throws SocialNetworkException { try { int id = Integer.parseInt(userId); return relationShipService.isInRelationShip(Integer.parseInt(this.getUserId()), id); } catch (SQLException ex) { throw new SocialNetworkException(STR, SilverpeasException.ERROR, STR, ex); } } | /**
* this userId is in my Contacts
* @return true if this user in my Contacts
* @param userId : int userId
*/ | this userId is in my Contacts | isInMyContact | {
"repo_name": "ebonnet/Silverpeas-Core",
"path": "core-war/src/main/java/org/silverpeas/web/socialnetwork/mycontactprofil/control/MyContactProfilSessionController.java",
"license": "agpl-3.0",
"size": 4259
} | [
"java.sql.SQLException",
"org.silverpeas.core.exception.SilverpeasException",
"org.silverpeas.core.socialnetwork.SocialNetworkException"
] | import java.sql.SQLException; import org.silverpeas.core.exception.SilverpeasException; import org.silverpeas.core.socialnetwork.SocialNetworkException; | import java.sql.*; import org.silverpeas.core.exception.*; import org.silverpeas.core.socialnetwork.*; | [
"java.sql",
"org.silverpeas.core"
] | java.sql; org.silverpeas.core; | 2,223,483 |
void setAriaActivedescendantProperty(Element element, Id value); | void setAriaActivedescendantProperty(Element element, Id value); | /**
* Sets the <a href="http://www.w3.org/TR/wai-aria/states_and_properties#aria-activedescendant">
* aria-activedescendant</a> attribute for the {@code element} to the given {@code value}.
*/ | Sets the aria-activedescendant attribute for the element to the given value | setAriaActivedescendantProperty | {
"repo_name": "gwtproject/gwt-aria",
"path": "gwt-aria/src/main/java/org/gwtproject/aria/client/GroupRole.java",
"license": "apache-2.0",
"size": 1900
} | [
"org.gwtproject.dom.client.Element"
] | import org.gwtproject.dom.client.Element; | import org.gwtproject.dom.client.*; | [
"org.gwtproject.dom"
] | org.gwtproject.dom; | 685,130 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<Response<Flux<ByteBuffer>>> deleteWithResponseAsync(
String resourceGroupName, String circuitName, String authorizationName, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<Flux<ByteBuffer>>> function( String resourceGroupName, String circuitName, String authorizationName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (resourceGroupName == null) { return Mo... | /**
* Deletes the specified authorization from the specified express route circuit.
*
* @param resourceGroupName The name of the resource group.
* @param circuitName The name of the express route circuit.
* @param authorizationName The name of the authorization.
* @param context The contex... | Deletes the specified authorization from the specified express route circuit | deleteWithResponseAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteCircuitAuthorizationsClientImpl.java",
"license": "mit",
"size": 59982
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.core.util.Context",
"java.nio.ByteBuffer"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import java.nio.ByteBuffer; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import java.nio.*; | [
"com.azure.core",
"java.nio"
] | com.azure.core; java.nio; | 1,277,398 |
public void firePersonalDataSent(PIIType pii, String sharedWith) {
LOGGER.info("Triggering event 'Personal Data Sent' for PII #" + pii.getHjid());
writeToFile("["+getDate()+"]: "+pii.getAttributeValue()+" for pii name "+pii.getAttributeName()+" with id "+ pii.getHjid()+" was shared with " + sharedWith +"\n");
... | void function(PIIType pii, String sharedWith) { LOGGER.info(STR + pii.getHjid()); writeToFile("["+getDate()+STR+pii.getAttributeValue()+STR+pii.getAttributeName()+STR+ pii.getHjid()+STR + sharedWith +"\n"); OEEStatus oeeStatus = oeeDao.consumeEvent(getPiiUniqueId(pii),STRTrigger for PII(STR) sent will trigger action sh... | /**
* Triggers <strong>Personal Data Sent</strong>
* @param pii the PII associated
* @param sharedWith SubjectId
*/ | Triggers Personal Data Sent | firePersonalDataSent | {
"repo_name": "fdicerbo/fiware-ppl",
"path": "ppl-engine-dc/src/main/java/com/sap/research/primelife/dc/event/EventHandler.java",
"license": "bsd-3-clause",
"size": 9991
} | [
"com.sap.research.primelife.dc.entity.OEEStatus",
"eu.primelife.ppl.pii.impl.PIIType"
] | import com.sap.research.primelife.dc.entity.OEEStatus; import eu.primelife.ppl.pii.impl.PIIType; | import com.sap.research.primelife.dc.entity.*; import eu.primelife.ppl.pii.impl.*; | [
"com.sap.research",
"eu.primelife.ppl"
] | com.sap.research; eu.primelife.ppl; | 749,716 |
private SurveyOnEEODocument getSurveyOnEEO() {
SurveyOnEEODocument surveyOnEEODocument = SurveyOnEEODocument.Factory.newInstance();
SurveyOnEEO surveyOnEEO = SurveyOnEEO.Factory.newInstance();
surveyOnEEO.setFormVersion(FormVersion.v1_2.getVersion());
OrganizationContract organizat... | SurveyOnEEODocument function() { SurveyOnEEODocument surveyOnEEODocument = SurveyOnEEODocument.Factory.newInstance(); SurveyOnEEO surveyOnEEO = SurveyOnEEO.Factory.newInstance(); surveyOnEEO.setFormVersion(FormVersion.v1_2.getVersion()); OrganizationContract organization = null; if (pdDoc.getDevelopmentProposal().getAp... | /**
*
* This method returns SurveyOnEEODocument object based on proposal development document which contains the SurveyOnEEODocument
* informations OrganizationName,DUNSID,OpportunityTitle,CFDANumber for a particular proposal
*
* @return surveyOnEEODocument(SurveyOnEEODocument) {@link XmlObje... | This method returns SurveyOnEEODocument object based on proposal development document which contains the SurveyOnEEODocument informations OrganizationName,DUNSID,OpportunityTitle,CFDANumber for a particular proposal | getSurveyOnEEO | {
"repo_name": "UniversityOfHawaiiORS/kc-s2sgen",
"path": "coeus-s2sgen-impl/src/main/java/org/kuali/coeus/s2sgen/impl/generate/support/FaithBasedSurveyOnEEOV1_2Generator.java",
"license": "agpl-3.0",
"size": 6206
} | [
"gov.grants.apply.forms.faithBasedSurveyOnEEOV12.SurveyOnEEODocument",
"org.apache.xmlbeans.XmlObject",
"org.kuali.coeus.common.api.org.OrganizationContract",
"org.kuali.coeus.propdev.api.core.ProposalDevelopmentDocumentContract",
"org.kuali.coeus.propdev.api.s2s.S2sOpportunityContract",
"org.kuali.coeus.... | import gov.grants.apply.forms.faithBasedSurveyOnEEOV12.SurveyOnEEODocument; import org.apache.xmlbeans.XmlObject; import org.kuali.coeus.common.api.org.OrganizationContract; import org.kuali.coeus.propdev.api.core.ProposalDevelopmentDocumentContract; import org.kuali.coeus.propdev.api.s2s.S2sOpportunityContract; import... | import gov.grants.apply.forms.*; import org.apache.xmlbeans.*; import org.kuali.coeus.common.api.org.*; import org.kuali.coeus.propdev.api.core.*; import org.kuali.coeus.propdev.api.s2s.*; import org.kuali.coeus.s2sgen.impl.generate.*; | [
"gov.grants.apply",
"org.apache.xmlbeans",
"org.kuali.coeus"
] | gov.grants.apply; org.apache.xmlbeans; org.kuali.coeus; | 908,157 |
public ResponseAPDU sendInvalidate() throws CardServiceException {
return null; // TODO
} | ResponseAPDU function() throws CardServiceException { return null; } | /**
* Described in 9.2.14 of ETSI TS 100 977.
*
* @throws CardServiceException
* if something goes wrong.
*/ | Described in 9.2.14 of ETSI TS 100 977 | sendInvalidate | {
"repo_name": "credentials/smartcardjs",
"path": "ext/scuba/simservice/src/net/sourceforge/scuba/simservice/SIMAPDUService.java",
"license": "gpl-3.0",
"size": 8819
} | [
"javax.smartcardio.ResponseAPDU",
"net.sourceforge.scuba.smartcards.CardServiceException"
] | import javax.smartcardio.ResponseAPDU; import net.sourceforge.scuba.smartcards.CardServiceException; | import javax.smartcardio.*; import net.sourceforge.scuba.smartcards.*; | [
"javax.smartcardio",
"net.sourceforge.scuba"
] | javax.smartcardio; net.sourceforge.scuba; | 39,662 |
public BufferedReader reader (int bufferSize) {
return new BufferedReader(reader(), bufferSize);
} | BufferedReader function (int bufferSize) { return new BufferedReader(reader(), bufferSize); } | /** Returns a buffered reader for reading this file as characters.
* @throw GdxRuntimeException if the file handle represents a directory, doesn't exist, or could not be read. */ | Returns a buffered reader for reading this file as characters | reader | {
"repo_name": "alex-dorokhov/libgdx",
"path": "backends/gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/GwtFileHandle.java",
"license": "apache-2.0",
"size": 18342
} | [
"java.io.BufferedReader"
] | import java.io.BufferedReader; | import java.io.*; | [
"java.io"
] | java.io; | 2,341,705 |
@Override
public final void removeMouseListener(MouseListener listener) {
mouseListeners.remove(listener);
}
// DragSource implementation | final void function(MouseListener listener) { mouseListeners.remove(listener); } | /**
* Removes the specified mouse-listener from this component's widget.
*/ | Removes the specified mouse-listener from this component's widget | removeMouseListener | {
"repo_name": "mit-dig/punya",
"path": "appinventor/appengine/src/com/google/appinventor/client/editor/simple/components/MockComponent.java",
"license": "apache-2.0",
"size": 32537
} | [
"com.google.gwt.user.client.ui.MouseListener"
] | import com.google.gwt.user.client.ui.MouseListener; | import com.google.gwt.user.client.ui.*; | [
"com.google.gwt"
] | com.google.gwt; | 825,231 |
@Column(name = "meddra_term")
public String getMeddraTerm() {
return meddraTerm;
}
| @Column(name = STR) String function() { return meddraTerm; } | /**
* Gets the meddra term.
*
* @return the meddra term
*/ | Gets the meddra term | getMeddraTerm | {
"repo_name": "CBIIT/caaers",
"path": "caAERS/software/core/src/main/java/gov/nih/nci/cabig/caaers/domain/meddra/AbstractMeddraDomainObject.java",
"license": "bsd-3-clause",
"size": 7732
} | [
"javax.persistence.Column"
] | import javax.persistence.Column; | import javax.persistence.*; | [
"javax.persistence"
] | javax.persistence; | 622,867 |
public void doReset(IPortletWindowId portletWindowId, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse); | void function(IPortletWindowId portletWindowId, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse); | /**
* Resets a portlet's window data to the defaults and clears all portlet scoped session data
*
* @param portletWindowId Portlet to target with the render
* @param httpServletRequest The portal's request
* @param httpServletResponse The portal's response (nothing will be written to the respo... | Resets a portlet's window data to the defaults and clears all portlet scoped session data | doReset | {
"repo_name": "vbonamy/esup-uportal",
"path": "uportal-war/src/main/java/org/jasig/portal/portlet/rendering/IPortletRenderer.java",
"license": "apache-2.0",
"size": 8451
} | [
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"org.jasig.portal.portlet.om.IPortletWindowId"
] | import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.jasig.portal.portlet.om.IPortletWindowId; | import javax.servlet.http.*; import org.jasig.portal.portlet.om.*; | [
"javax.servlet",
"org.jasig.portal"
] | javax.servlet; org.jasig.portal; | 2,590,799 |
public java.util.List<fr.lip6.move.pnml.hlpn.integers.hlapi.GreaterThanOrEqualHLAPI> getSubterm_integers_GreaterThanOrEqualHLAPI(){
java.util.List<fr.lip6.move.pnml.hlpn.integers.hlapi.GreaterThanOrEqualHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.integers.hlapi.GreaterThanOrEqualHLAPI>();
for (Term ... | java.util.List<fr.lip6.move.pnml.hlpn.integers.hlapi.GreaterThanOrEqualHLAPI> function(){ java.util.List<fr.lip6.move.pnml.hlpn.integers.hlapi.GreaterThanOrEqualHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.integers.hlapi.GreaterThanOrEqualHLAPI>(); for (Term elemnt : getSubterm()) { if(elemnt.getClass().equals(... | /**
* This accessor return a list of encapsulated subelement, only of GreaterThanOrEqualHLAPI kind.
* WARNING : this method can creates a lot of new object in memory.
*/ | This accessor return a list of encapsulated subelement, only of GreaterThanOrEqualHLAPI kind. WARNING : this method can creates a lot of new object in memory | getSubterm_integers_GreaterThanOrEqualHLAPI | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-HLPN/src/fr/lip6/move/pnml/hlpn/lists/hlapi/SublistHLAPI.java",
"license": "epl-1.0",
"size": 111755
} | [
"fr.lip6.move.pnml.hlpn.terms.Term",
"java.util.ArrayList",
"java.util.List"
] | import fr.lip6.move.pnml.hlpn.terms.Term; import java.util.ArrayList; import java.util.List; | import fr.lip6.move.pnml.hlpn.terms.*; import java.util.*; | [
"fr.lip6.move",
"java.util"
] | fr.lip6.move; java.util; | 283,798 |
public boolean removeEntryWithPosition(final long iPosition) throws IOException {
// BROWSE IN ASCENDING ORDER UNTIL THE REQUESTED POSITION IS FOUND
boolean canShrink = true;
for (int pos = getHoles() - 1; pos >= 0; --pos) {
final long recycledPosition = file.readLong(pos * RECORD_SIZE);
if (recyc... | boolean function(final long iPosition) throws IOException { boolean canShrink = true; for (int pos = getHoles() - 1; pos >= 0; --pos) { final long recycledPosition = file.readLong(pos * RECORD_SIZE); if (recycledPosition == iPosition) { if (OLogManager.instance().isDebugEnabled()) OLogManager.instance().debug(this, STR... | /**
* Remove a hole. Called on transaction recover to invalidate a delete for a record. Try to shrink the file if the invalidated
* entry is not in the middle of valid entries.
*
* @param iPosition
* Record position to find and invalidate
* @return
* @throws IOException
*/ | Remove a hole. Called on transaction recover to invalidate a delete for a record. Try to shrink the file if the invalidated entry is not in the middle of valid entries | removeEntryWithPosition | {
"repo_name": "cloudsmith/orientdb",
"path": "core/src/main/java/com/orientechnologies/orient/core/storage/impl/local/OClusterLocalHole.java",
"license": "apache-2.0",
"size": 5732
} | [
"com.orientechnologies.common.log.OLogManager",
"java.io.IOException"
] | import com.orientechnologies.common.log.OLogManager; import java.io.IOException; | import com.orientechnologies.common.log.*; import java.io.*; | [
"com.orientechnologies.common",
"java.io"
] | com.orientechnologies.common; java.io; | 243,702 |
public NumericSummary getNumericSummary(PathQuery query, String path) {
String summaryPath = path;
try {
if (!summaryPath.startsWith(query.getRootClass())) {
summaryPath = query.getRootClass() + "." + summaryPath;
}
} catch (PathException e) {
... | NumericSummary function(PathQuery query, String path) { String summaryPath = path; try { if (!summaryPath.startsWith(query.getRootClass())) { summaryPath = query.getRootClass() + "." + summaryPath; } } catch (PathException e) { throw new ServiceException(STR, e); } Path p = null; try { p = query.makePath(summaryPath); ... | /**
* Get a summary for the values in column of a query.
*
* The column must represent a column of numeric values.
*
* @param query The query to summarise.
* @param path The column to summarise.
* @return A summary.
*/ | Get a summary for the values in column of a query. The column must represent a column of numeric values | getNumericSummary | {
"repo_name": "elsiklab/intermine",
"path": "intermine/webservice/client/main/src/org/intermine/webservice/client/services/QueryService.java",
"license": "lgpl-2.1",
"size": 22047
} | [
"org.intermine.metadata.AttributeDescriptor",
"org.intermine.metadata.FieldDescriptor",
"org.intermine.pathquery.Path",
"org.intermine.pathquery.PathException",
"org.intermine.pathquery.PathQuery",
"org.intermine.webservice.client.core.ContentType",
"org.intermine.webservice.client.core.Request",
"org... | import org.intermine.metadata.AttributeDescriptor; import org.intermine.metadata.FieldDescriptor; import org.intermine.pathquery.Path; import org.intermine.pathquery.PathException; import org.intermine.pathquery.PathQuery; import org.intermine.webservice.client.core.ContentType; import org.intermine.webservice.client.c... | import org.intermine.metadata.*; import org.intermine.pathquery.*; import org.intermine.webservice.client.core.*; import org.intermine.webservice.client.exceptions.*; import org.intermine.webservice.client.results.*; import org.json.*; | [
"org.intermine.metadata",
"org.intermine.pathquery",
"org.intermine.webservice",
"org.json"
] | org.intermine.metadata; org.intermine.pathquery; org.intermine.webservice; org.json; | 2,606,613 |
public static void copyCurrentStructure(XContentGenerator destination, XContentParser parser) throws IOException {
XContentParser.Token token = parser.currentToken();
// Let's handle field-name separately first
if (token == XContentParser.Token.FIELD_NAME) {
destination.writeFie... | static void function(XContentGenerator destination, XContentParser parser) throws IOException { XContentParser.Token token = parser.currentToken(); if (token == XContentParser.Token.FIELD_NAME) { destination.writeFieldName(parser.currentName()); token = parser.nextToken(); } switch (token) { case START_ARRAY: destinati... | /**
* Low level implementation detail of {@link XContentGenerator#copyCurrentStructure(XContentParser)}.
*/ | Low level implementation detail of <code>XContentGenerator#copyCurrentStructure(XContentParser)</code> | copyCurrentStructure | {
"repo_name": "strapdata/elassandra5-rc",
"path": "core/src/main/java/org/elasticsearch/common/xcontent/XContentHelper.java",
"license": "apache-2.0",
"size": 21931
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,445,906 |
// ************************************************************************
// Overridden XMLDocumentHandler methods
// ************************************************************************
public void comment(XMLString text, Augmentations augs) throws XNIException {
if (!isChildFragmentRes... | void function(XMLString text, Augmentations augs) throws XNIException { if (!isChildFragmentResolved()) { return; } super.comment(text, augs); } | /**
* If the comment is a child of a matched element, then pass else return.
*
* @param text The text in the comment.
* @param augs Additional information that may include infoset augmentations
*
* @exception XNIException
* Thrown by application to signal an erro... | If the comment is a child of a matched element, then pass else return | comment | {
"repo_name": "wangsongpeng/jdk-src",
"path": "src/main/java/com/sun/org/apache/xerces/internal/xpointer/XPointerHandler.java",
"license": "apache-2.0",
"size": 46302
} | [
"com.sun.org.apache.xerces.internal.xni.Augmentations",
"com.sun.org.apache.xerces.internal.xni.XMLString",
"com.sun.org.apache.xerces.internal.xni.XNIException"
] | import com.sun.org.apache.xerces.internal.xni.Augmentations; import com.sun.org.apache.xerces.internal.xni.XMLString; import com.sun.org.apache.xerces.internal.xni.XNIException; | import com.sun.org.apache.xerces.internal.xni.*; | [
"com.sun.org"
] | com.sun.org; | 1,807,081 |
private String getUsePrecompiledHeader(final CommandLineCompilerConfiguration compilerConfig) {
String usePCH = "0";
final String[] args = compilerConfig.getPreArguments();
for (final String arg : args) {
if ("/Yc".equals(arg)) {
usePCH = "1";
}
if ("/Yu".equals(arg)) {
u... | String function(final CommandLineCompilerConfiguration compilerConfig) { String usePCH = "0"; final String[] args = compilerConfig.getPreArguments(); for (final String arg : args) { if ("/Yc".equals(arg)) { usePCH = "1"; } if ("/Yu".equals(arg)) { usePCH = "2"; } } return usePCH; } | /**
* Get value of UsePrecompiledHeader property.
*
* @param compilerConfig
* compiler configuration.
* @return value of UsePrecompiledHeader property.
*/ | Get value of UsePrecompiledHeader property | getUsePrecompiledHeader | {
"repo_name": "diyessi/nar-maven-plugin",
"path": "src/main/java/com/github/maven_nar/cpptasks/msvc/VisualStudioNETProjectWriter.java",
"license": "apache-2.0",
"size": 29196
} | [
"com.github.maven_nar.cpptasks.compiler.CommandLineCompilerConfiguration"
] | import com.github.maven_nar.cpptasks.compiler.CommandLineCompilerConfiguration; | import com.github.maven_nar.cpptasks.compiler.*; | [
"com.github.maven_nar"
] | com.github.maven_nar; | 1,777,867 |
@Test
public void testEmptyDir() throws IOException {
TestCaseDescription tc = new TestCaseDescription();
tc.addRoot("/foo1", NameNodeDirType.IMAGE_AND_EDITS);
runTest(tc);
} | void function() throws IOException { TestCaseDescription tc = new TestCaseDescription(); tc.addRoot("/foo1", NameNodeDirType.IMAGE_AND_EDITS); runTest(tc); } | /**
* Check for edge case with no logs or images present at all.
*/ | Check for edge case with no logs or images present at all | testEmptyDir | {
"repo_name": "moreus/hadoop",
"path": "hadoop-0.23.10/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestNNStorageRetentionManager.java",
"license": "apache-2.0",
"size": 11744
} | [
"java.io.IOException",
"org.apache.hadoop.hdfs.server.namenode.NNStorage"
] | import java.io.IOException; import org.apache.hadoop.hdfs.server.namenode.NNStorage; | import java.io.*; import org.apache.hadoop.hdfs.server.namenode.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 2,215,595 |
private void createAndSendNodeGainedInterfaceEvent(int nodeId, InetAddress ipAddr) {
EventBuilder bldr = createEventBuilder(EventConstants.NODE_GAINED_INTERFACE_EVENT_UEI);
bldr.setNodeid(nodeId);
bldr.setInterface(ipAddr);
bldr.addParam(EventConstants.PARM_IP_HOSTNAME, ipAd... | void function(int nodeId, InetAddress ipAddr) { EventBuilder bldr = createEventBuilder(EventConstants.NODE_GAINED_INTERFACE_EVENT_UEI); bldr.setNodeid(nodeId); bldr.setInterface(ipAddr); bldr.addParam(EventConstants.PARM_IP_HOSTNAME, ipAddr.getHostName()); bldr.addParam(EventConstants.PARM_METHOD, "icmp"); sendEvent(bl... | /**
* This method is responsible for creating and sending a
* 'nodeGainedInterface' event to Eventd
*
* @param nodeId
* Interface's parent node identifier.
* @param ipAddr
* Interface's IP address
*/ | This method is responsible for creating and sending a 'nodeGainedInterface' event to Eventd | createAndSendNodeGainedInterfaceEvent | {
"repo_name": "qoswork/opennmszh",
"path": "opennms-services/src/main/java/org/opennms/netmgt/capsd/SuspectEventProcessor.java",
"license": "gpl-2.0",
"size": 81579
} | [
"java.net.InetAddress",
"org.opennms.netmgt.EventConstants",
"org.opennms.netmgt.model.events.EventBuilder"
] | import java.net.InetAddress; import org.opennms.netmgt.EventConstants; import org.opennms.netmgt.model.events.EventBuilder; | import java.net.*; import org.opennms.netmgt.*; import org.opennms.netmgt.model.events.*; | [
"java.net",
"org.opennms.netmgt"
] | java.net; org.opennms.netmgt; | 595,864 |
List<BenefitType> findAll(); | List<BenefitType> findAll(); | /**
* Returns a list of all instances of BenefitType entity.
* @return
*/ | Returns a list of all instances of BenefitType entity | findAll | {
"repo_name": "Vodorohelios/career-levels",
"path": "src/main/java/com/inthergroup/internship/services/BenefitService.java",
"license": "mit",
"size": 2570
} | [
"com.inthergroup.internship.models.BenefitType",
"java.util.List"
] | import com.inthergroup.internship.models.BenefitType; import java.util.List; | import com.inthergroup.internship.models.*; import java.util.*; | [
"com.inthergroup.internship",
"java.util"
] | com.inthergroup.internship; java.util; | 902,439 |
private void updatePractice(int id, String startDate, String endDate) {
try {
ContentValues values = new ContentValues();
values.put(DBHelper.START_DATE_2_FIELD_NAME, startDate);
values.put(DBHelper.END_DATE_2_FIELD_NAME, endDate);
db.update(DBHelper.PRACTICE_TBL_NAME, values,
DBHelper.... | void function(int id, String startDate, String endDate) { try { ContentValues values = new ContentValues(); values.put(DBHelper.START_DATE_2_FIELD_NAME, startDate); values.put(DBHelper.END_DATE_2_FIELD_NAME, endDate); db.update(DBHelper.PRACTICE_TBL_NAME, values, DBHelper.ID_FIELD_NAME + "=" + id, null); } catch(SQLExc... | /**
* Update a practice.
*
* @param id
* @param startDate
* @param endDate
*/ | Update a practice | updatePractice | {
"repo_name": "rgmf/LTN",
"path": "src/es/rgmf/ltn/db/DBAdapter.java",
"license": "gpl-3.0",
"size": 69648
} | [
"android.content.ContentValues",
"android.database.SQLException"
] | import android.content.ContentValues; import android.database.SQLException; | import android.content.*; import android.database.*; | [
"android.content",
"android.database"
] | android.content; android.database; | 252,614 |
public void addBundleStyleSheet(String bundleIdentifier , String url, String media){
IWBundle iwb = getIWMainApplication().getBundle(bundleIdentifier);
String cssRealUrl = iwb.getResourceURIWithoutContextPath(url);
if (cssRealUrl != null && !containsStyleSheet(cssRealUrl)) {
addStyleSheet(cssRealUrl, media)... | void function(String bundleIdentifier , String url, String media){ IWBundle iwb = getIWMainApplication().getBundle(bundleIdentifier); String cssRealUrl = iwb.getResourceURIWithoutContextPath(url); if (cssRealUrl != null && !containsStyleSheet(cssRealUrl)) { addStyleSheet(cssRealUrl, media); } } | /**
* Adds a stylesheet where the bundleIdentifier is a reference to the bundle where the stylesheet file is located.
* @param bundleIdentifier the bundle where the stylesheet is located
* @param url the URL within the bundle (relative to the resources subfolder)
*/ | Adds a stylesheet where the bundleIdentifier is a reference to the bundle where the stylesheet file is located | addBundleStyleSheet | {
"repo_name": "idega/com.idega.core",
"path": "src/java/com/idega/idegaweb/include/GlobalIncludeManager.java",
"license": "gpl-3.0",
"size": 3672
} | [
"com.idega.idegaweb.IWBundle"
] | import com.idega.idegaweb.IWBundle; | import com.idega.idegaweb.*; | [
"com.idega.idegaweb"
] | com.idega.idegaweb; | 1,423,579 |
public static List<String> readLines(InputStream stream) throws IOException {
return readLines(newReader(stream));
} | static List<String> function(InputStream stream) throws IOException { return readLines(newReader(stream)); } | /**
* Reads the stream into a list, with one element for each line.
*
* @param stream a stream
* @return a List of lines
* @throws IOException if an IOException occurs.
* @see #readLines(java.io.Reader)
* @since 1.0
*/ | Reads the stream into a list, with one element for each line | readLines | {
"repo_name": "xien777/yajsw",
"path": "yajsw/wrapper/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java",
"license": "lgpl-2.1",
"size": 704150
} | [
"java.io.IOException",
"java.io.InputStream",
"java.util.List"
] | import java.io.IOException; import java.io.InputStream; import java.util.List; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,416,087 |
public void saveAndFinish() {
saveAccount();
Intent intent = getIntent();
setResult(RESULT_OK, intent);
finish();
} | void function() { saveAccount(); Intent intent = getIntent(); setResult(RESULT_OK, intent); finish(); } | /**
* Save account and end the activity
*/ | Save account and end the activity | saveAndFinish | {
"repo_name": "caihongwang/ChatMe",
"path": "src/com/csipsimple/wizards/BasePrefsWizard.java",
"license": "lgpl-3.0",
"size": 10542
} | [
"android.content.Intent"
] | import android.content.Intent; | import android.content.*; | [
"android.content"
] | android.content; | 211,030 |
public boolean canExecute() {
if (false == getElementToEdit() instanceof Line) {
return false;
}
if (reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) {
return canReorientSource();
}
if (reorientDirection == ReorientRelationshipRequest.REORIENT_TARGET) {
return canReorientT... | boolean function() { if (false == getElementToEdit() instanceof Line) { return false; } if (reorientDirection == ReorientRelationshipRequest.REORIENT_SOURCE) { return canReorientSource(); } if (reorientDirection == ReorientRelationshipRequest.REORIENT_TARGET) { return canReorientTarget(); } return false; } | /**
* Can execute.
*
* @return true, if successful
* @generated
*/ | Can execute | canExecute | {
"repo_name": "albertfdp/petrinet",
"path": "src/dk.dtu.se2.geometry.diagram/src/geometry/diagram/edit/commands/LineReorientCommand.java",
"license": "mit",
"size": 5086
} | [
"org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest"
] | import org.eclipse.gmf.runtime.emf.type.core.requests.ReorientRelationshipRequest; | import org.eclipse.gmf.runtime.emf.type.core.requests.*; | [
"org.eclipse.gmf"
] | org.eclipse.gmf; | 1,024,765 |
public static TypeInfo getTypeInfoFromObjectInspector(ObjectInspector oi) {
// OPTIMIZATION for later.
// if (oi instanceof TypeInfoBasedObjectInspector) {
// TypeInfoBasedObjectInspector typeInfoBasedObjectInspector = (ObjectInspector)oi;
// return typeInfoBasedObjectInspector.getTypeInfo();
// ... | static TypeInfo function(ObjectInspector oi) { TypeInfo result = null; switch (oi.getCategory()) { case PRIMITIVE: { PrimitiveObjectInspector poi =(PrimitiveObjectInspector)oi; result = TypeInfoFactory.getPrimitiveTypeInfo(poi.getPrimitiveClass()); break; } case LIST: { ListObjectInspector loi = (ListObjectInspector)oi... | /**
* Get the TypeInfo object from the ObjectInspector object by recursively going into the
* ObjectInspector structure.
*/ | Get the TypeInfo object from the ObjectInspector object by recursively going into the ObjectInspector structure | getTypeInfoFromObjectInspector | {
"repo_name": "sbyoun/i-mapreduce",
"path": "src/contrib/hive/ql/src/java/org/apache/hadoop/hive/ql/typeinfo/TypeInfoUtils.java",
"license": "apache-2.0",
"size": 4895
} | [
"java.util.ArrayList",
"java.util.List",
"org.apache.hadoop.hive.serde2.objectinspector.ListObjectInspector",
"org.apache.hadoop.hive.serde2.objectinspector.MapObjectInspector",
"org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector",
"org.apache.hadoop.hive.serde2.objectinspector.PrimitiveObjectI... | import java.util.ArrayList; import java.util.List; import org.apache.hadoop.hive.serde2.objectinspector.ListObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.MapObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector; import org.apache.hadoop.hive.serde2.objectinspector... | import java.util.*; import org.apache.hadoop.hive.serde2.objectinspector.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 2,258,445 |
public void monitorExit() {
this.mv.visitInsn( Opcodes.MONITOREXIT );
}
// ------------------------------------------------------------------------
// Non instructions
// ------------------------------------------------------------------------
| void function() { this.mv.visitInsn( Opcodes.MONITOREXIT ); } | /**
* Generates the instruction to release the monitor of the top stack value.
*/ | Generates the instruction to release the monitor of the top stack value | monitorExit | {
"repo_name": "bobmcwhirter/drools",
"path": "drools-core/src/main/java/org/drools/asm/commons/GeneratorAdapter.java",
"license": "apache-2.0",
"size": 52159
} | [
"org.drools.asm.Opcodes"
] | import org.drools.asm.Opcodes; | import org.drools.asm.*; | [
"org.drools.asm"
] | org.drools.asm; | 2,781,176 |
public void setEntityName(String entityName) {
if ((this.entityName == null)) {
if ((entityName == null)) {
return;
}
this.entityName = new Name();
}
this.entityName.setValue(entityName);
}
| void function(String entityName) { if ((this.entityName == null)) { if ((entityName == null)) { return; } this.entityName = new Name(); } this.entityName.setValue(entityName); } | /**
* Name of the Entity
*
* @param entityName the String.
*/ | Name of the Entity | setEntityName | {
"repo_name": "NABUCCO/org.nabucco.framework.base",
"path": "org.nabucco.framework.base.facade.datatype/src/main/gen/org/nabucco/framework/base/facade/datatype/monitor/PersistenceMonitorEntry.java",
"license": "epl-1.0",
"size": 12391
} | [
"org.nabucco.framework.base.facade.datatype.Name"
] | import org.nabucco.framework.base.facade.datatype.Name; | import org.nabucco.framework.base.facade.datatype.*; | [
"org.nabucco.framework"
] | org.nabucco.framework; | 2,593,567 |
public ServiceFuture<Void> postOptionalStringHeaderAsync(String bodyParameter, final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromResponse(postOptionalStringHeaderWithServiceResponseAsync(bodyParameter), serviceCallback);
} | ServiceFuture<Void> function(String bodyParameter, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(postOptionalStringHeaderWithServiceResponseAsync(bodyParameter), serviceCallback); } | /**
* Test explicitly optional string. Please put a header 'headerParameter' => null.
*
* @param bodyParameter the String value
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown if parameters fail the valid... | Test explicitly optional string. Please put a header 'headerParameter' => null | postOptionalStringHeaderAsync | {
"repo_name": "lmazuel/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/requiredoptional/implementation/ExplicitsImpl.java",
"license": "mit",
"size": 119470
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 254,283 |
protected static File getGitDirectory(String uri, String directory) throws GitProjectAnalysisException {
return new File(directory, getGitProjectName(uri));
} | static File function(String uri, String directory) throws GitProjectAnalysisException { return new File(directory, getGitProjectName(uri)); } | /**
* Creates the directory for the repository given the URI and the base
* directory to store all repositories.
*
* @param uri The uri (e.g., https://github.com/karma-runner/karma.git)
* @param directory The directory for the repositories.
* @return The folder to clone the project into.
* @throws GitProj... | Creates the directory for the repository given the URI and the base directory to store all repositories | getGitDirectory | {
"repo_name": "saltlab/Pangor",
"path": "core/src/ca/ubc/ece/salt/pangor/git/GitProject.java",
"license": "apache-2.0",
"size": 12422
} | [
"ca.ubc.ece.salt.pangor.batch.GitProjectAnalysisException",
"java.io.File"
] | import ca.ubc.ece.salt.pangor.batch.GitProjectAnalysisException; import java.io.File; | import ca.ubc.ece.salt.pangor.batch.*; import java.io.*; | [
"ca.ubc.ece",
"java.io"
] | ca.ubc.ece; java.io; | 2,828,101 |
private static RhoScannerClass getRhoScannerClass(com.symbol.emdk.barcode.ScannerInfo.DeviceType deviceType)
{
Logger.D(TAG, "getRhoScannerClass(EMDK3)");
try{
switch(deviceType)
{
case IMAGER: return RhoScannerClass.SCANNER_CLASS_IMAGER;
case LASER: return RhoScannerClass.SCANNER_CLASS_LASER;
case... | static RhoScannerClass function(com.symbol.emdk.barcode.ScannerInfo.DeviceType deviceType) { Logger.D(TAG, STR); try{ switch(deviceType) { case IMAGER: return RhoScannerClass.SCANNER_CLASS_IMAGER; case LASER: return RhoScannerClass.SCANNER_CLASS_LASER; case CAMERA: return RhoScannerClass.SCANNER_CLASS_CAMERA; default: ... | /**
* Converts an (EMDK3) DeviceType to a RhoScannerClass.
* @param deviceType the DeviceType to convert
* @return the equivalent RhoScannerClass
* @author Ben Kennedy (NCVT73)
*/ | Converts an (EMDK3) DeviceType to a RhoScannerClass | getRhoScannerClass | {
"repo_name": "tauplatform/tau",
"path": "lib/commonAPI/barcode/ext/platform/android/src/com/rho/barcode/emdk3/EMDK3ScannerInfo.java",
"license": "mit",
"size": 1508
} | [
"android.util.Log",
"com.rhomobile.rhodes.Logger"
] | import android.util.Log; import com.rhomobile.rhodes.Logger; | import android.util.*; import com.rhomobile.rhodes.*; | [
"android.util",
"com.rhomobile.rhodes"
] | android.util; com.rhomobile.rhodes; | 701,075 |
public Date getLastEdit() {
return lastEdit;
} | Date function() { return lastEdit; } | /**
* Date the user last edited the note.
* @return lastEdit
**/ | Date the user last edited the note | getLastEdit | {
"repo_name": "daflockinger/poppynotes",
"path": "notes-service/src/main/java/com/flockinger/poppynotes/notesService/dto/CompleteNote.java",
"license": "mit",
"size": 5362
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 1,663,060 |
public void setHibernateSession(final Session hibernateSession) {
this.hibernateSession = hibernateSession;
} | void function(final Session hibernateSession) { this.hibernateSession = hibernateSession; } | /**
* Sets the hibernate session.
*
* @param hibernateSession
* the new hibernate session
*/ | Sets the hibernate session | setHibernateSession | {
"repo_name": "alarulrajan/CodeFest",
"path": "src/com/technoetic/xplanner/actions/Continuer.java",
"license": "gpl-2.0",
"size": 13273
} | [
"org.hibernate.Session"
] | import org.hibernate.Session; | import org.hibernate.*; | [
"org.hibernate"
] | org.hibernate; | 2,670,612 |
private void postPlugin(final boolean isPing) throws IOException {
// Server software specific section
PluginDescriptionFile description = plugin.getDescription();
String pluginName = description.getName();
boolean onlineMode = Bukkit.getServer().getOnlineMode(); // TRUE if online mo... | void function(final boolean isPing) throws IOException { PluginDescriptionFile description = plugin.getDescription(); String pluginName = description.getName(); boolean onlineMode = Bukkit.getServer().getOnlineMode(); String pluginVersion = description.getVersion(); String serverVersion = Bukkit.getVersion(); int playe... | /**
* Generic method that posts a plugin to the metrics website
*/ | Generic method that posts a plugin to the metrics website | postPlugin | {
"repo_name": "Sablednah/MobHealth",
"path": "src/main/java/me/sablednah/MobHealth/Metrics.java",
"license": "gpl-3.0",
"size": 24835
} | [
"java.io.BufferedReader",
"java.io.IOException",
"java.io.InputStreamReader",
"java.io.OutputStream",
"java.net.Proxy",
"java.net.URLConnection",
"java.util.Iterator",
"org.bukkit.Bukkit",
"org.bukkit.plugin.PluginDescriptionFile"
] | import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStream; import java.net.Proxy; import java.net.URLConnection; import java.util.Iterator; import org.bukkit.Bukkit; import org.bukkit.plugin.PluginDescriptionFile; | import java.io.*; import java.net.*; import java.util.*; import org.bukkit.*; import org.bukkit.plugin.*; | [
"java.io",
"java.net",
"java.util",
"org.bukkit",
"org.bukkit.plugin"
] | java.io; java.net; java.util; org.bukkit; org.bukkit.plugin; | 2,547,996 |
public Timestamp getUpdated();
public static final String COLUMNNAME_UpdatedBy = "UpdatedBy"; | Timestamp function(); public static final String COLUMNNAME_UpdatedBy = STR; | /** Get Updated.
* Date this record was updated
*/ | Get Updated. Date this record was updated | getUpdated | {
"repo_name": "armenrz/adempiere",
"path": "base/src/org/compiere/model/I_C_BP_Customer_Acct.java",
"license": "gpl-2.0",
"size": 5796
} | [
"java.sql.Timestamp"
] | import java.sql.Timestamp; | import java.sql.*; | [
"java.sql"
] | java.sql; | 558,485 |
void influenceSteering(Vector2f linearInfluence);
| void influenceSteering(Vector2f linearInfluence); | /** Invoked to send the influence to the environment.
*
* @param linearInfluence is the linear influence to apply on the object.
*/ | Invoked to send the influence to the environment | influenceSteering | {
"repo_name": "trollmcqueen/eurock_vi51",
"path": "EuroSim/src/main/sarl/fr/utbm/info/vi51/framework/environment/Body.java",
"license": "gpl-2.0",
"size": 2810
} | [
"fr.utbm.info.vi51.framework.math.Vector2f"
] | import fr.utbm.info.vi51.framework.math.Vector2f; | import fr.utbm.info.vi51.framework.math.*; | [
"fr.utbm.info"
] | fr.utbm.info; | 846,249 |
private BaseDescr lhsForall( CEDescrBuilder< ? , ? > ce ) throws RecognitionException {
ForallDescrBuilder< ? > forall = helper.start( ce,
ForallDescrBuilder.class,
null );
try {
... | BaseDescr function( CEDescrBuilder< ? , ? > ce ) throws RecognitionException { ForallDescrBuilder< ? > forall = helper.start( ce, ForallDescrBuilder.class, null ); try { match( input, DRLLexer.ID, DroolsSoftKeywords.FORALL, null, DroolsEditorType.KEYWORD ); if ( state.failed ) return null; match( input, DRLLexer.LEFT_P... | /**
* lhsForall := FORALL LEFT_PAREN lhsPatternBind+ RIGHT_PAREN
*
* @param ce
* @return
* @throws RecognitionException
*/ | lhsForall := FORALL LEFT_PAREN lhsPatternBind+ RIGHT_PAREN | lhsForall | {
"repo_name": "mswiderski/drools",
"path": "drools-compiler/src/main/java/org/drools/lang/DRLParser.java",
"license": "apache-2.0",
"size": 161879
} | [
"org.antlr.runtime.RecognitionException",
"org.drools.lang.api.CEDescrBuilder",
"org.drools.lang.api.ForallDescrBuilder",
"org.drools.lang.descr.BaseDescr"
] | import org.antlr.runtime.RecognitionException; import org.drools.lang.api.CEDescrBuilder; import org.drools.lang.api.ForallDescrBuilder; import org.drools.lang.descr.BaseDescr; | import org.antlr.runtime.*; import org.drools.lang.api.*; import org.drools.lang.descr.*; | [
"org.antlr.runtime",
"org.drools.lang"
] | org.antlr.runtime; org.drools.lang; | 680,339 |
public void init(ServletConfig config)
throws ServletException
{
super.init(config);
if (!WebEnv.initWeb(config))
throw new ServletException("EMailServlet.init");
} // init
| void function(ServletConfig config) throws ServletException { super.init(config); if (!WebEnv.initWeb(config)) throw new ServletException(STR); } | /**
* Initialize global variables
*
* @param config servlet config
* @throws ServletException
*/ | Initialize global variables | init | {
"repo_name": "erpcya/adempierePOS",
"path": "serverApps/src/main/servlet/org/compiere/wstore/EMailServlet.java",
"license": "gpl-2.0",
"size": 4528
} | [
"javax.servlet.ServletConfig",
"javax.servlet.ServletException",
"org.compiere.util.WebEnv"
] | import javax.servlet.ServletConfig; import javax.servlet.ServletException; import org.compiere.util.WebEnv; | import javax.servlet.*; import org.compiere.util.*; | [
"javax.servlet",
"org.compiere.util"
] | javax.servlet; org.compiere.util; | 104,035 |
public static PactDslJsonRootValue date(String format, Date example) {
FastDateFormat instance = FastDateFormat.getInstance(format);
PactDslJsonRootValue value = new PactDslJsonRootValue();
value.setValue(instance.format(example));
value.setMatcher(value.matchDate(format));
return value;
} | static PactDslJsonRootValue function(String format, Date example) { FastDateFormat instance = FastDateFormat.getInstance(format); PactDslJsonRootValue value = new PactDslJsonRootValue(); value.setValue(instance.format(example)); value.setMatcher(value.matchDate(format)); return value; } | /**
* Value that must match the provided date format
* @param format date format to match
* @param example example date to use for generated values
*/ | Value that must match the provided date format | date | {
"repo_name": "Fitzoh/pact-jvm",
"path": "pact-jvm-consumer/src/main/java/au/com/dius/pact/consumer/dsl/PactDslJsonRootValue.java",
"license": "apache-2.0",
"size": 21979
} | [
"java.util.Date",
"org.apache.commons.lang3.time.FastDateFormat"
] | import java.util.Date; import org.apache.commons.lang3.time.FastDateFormat; | import java.util.*; import org.apache.commons.lang3.time.*; | [
"java.util",
"org.apache.commons"
] | java.util; org.apache.commons; | 960,565 |
@Override
public Bitmap getBitmap() {
mAdapterThreadChecker.assertOnValidThread();
TraceEvent.begin("ViewResourceAdapter:getBitmap");
super.getBitmap();
if (mLastGetBitmapTimestamp > 0) {
RecordHistogram.recordLongTimesHistogram("ViewResourceAdapter.GetBitmapInterval... | Bitmap function() { mAdapterThreadChecker.assertOnValidThread(); TraceEvent.begin(STR); super.getBitmap(); if (mLastGetBitmapTimestamp > 0) { RecordHistogram.recordLongTimesHistogram(STR, SystemClock.elapsedRealtime() - mLastGetBitmapTimestamp); } if (mUseHardwareBitmapDraw) { captureWithHardwareDraw(); } else if (vali... | /**
* If this resource is dirty ({@link #isDirty()} returned {@code true}), it will recapture a
* {@link Bitmap} of the {@link View}.
* @see DynamicResource#getBitmap()
* @return A {@link Bitmap} representing the {@link View}.
*/ | If this resource is dirty (<code>#isDirty()</code> returned true), it will recapture a <code>Bitmap</code> of the <code>View</code> | getBitmap | {
"repo_name": "chromium/chromium",
"path": "ui/android/java/src/org/chromium/ui/resources/dynamics/ViewResourceAdapter.java",
"license": "bsd-3-clause",
"size": 23363
} | [
"android.graphics.Bitmap",
"android.graphics.Color",
"android.os.SystemClock",
"org.chromium.base.TraceEvent",
"org.chromium.base.metrics.RecordHistogram"
] | import android.graphics.Bitmap; import android.graphics.Color; import android.os.SystemClock; import org.chromium.base.TraceEvent; import org.chromium.base.metrics.RecordHistogram; | import android.graphics.*; import android.os.*; import org.chromium.base.*; import org.chromium.base.metrics.*; | [
"android.graphics",
"android.os",
"org.chromium.base"
] | android.graphics; android.os; org.chromium.base; | 589,199 |
@Override
public String getText(Object object) {
ActuateType labelValue = ((TargetPropertyType)object).getActuate();
String label = labelValue == null ? null : labelValue.toString();
return label == null || label.length() == 0 ?
getString("_UI_TargetPropertyType_type") :
getString("_UI_TargetPropertyTyp... | String function(Object object) { ActuateType labelValue = ((TargetPropertyType)object).getActuate(); String label = labelValue == null ? null : labelValue.toString(); return label == null label.length() == 0 ? getString(STR) : getString(STR) + " " + label; } | /**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This returns the label text for the adapted class. | getText | {
"repo_name": "markus1978/citygml4emf",
"path": "de.hub.citygml.emf.ecore.edit/src/net/opengis/gml/provider/TargetPropertyTypeItemProvider.java",
"license": "apache-2.0",
"size": 44254
} | [
"net.opengis.gml.TargetPropertyType",
"org.w3._1999.xlink.ActuateType"
] | import net.opengis.gml.TargetPropertyType; import org.w3._1999.xlink.ActuateType; | import net.opengis.gml.*; import org.w3.*; | [
"net.opengis.gml",
"org.w3"
] | net.opengis.gml; org.w3; | 2,634,114 |
public void testPostalAdrressForDoCoMo_1() {
mVerifier.initForExportTest(VCardConfig.VCARD_TYPE_DOCOMO, "Shift_JIS");
ContactEntry entry = mVerifier.addInputEntry();
entry.addContentValues(StructuredPostal.CONTENT_ITEM_TYPE)
.put(StructuredPostal.TYPE, StructuredPostal.TYPE_W... | void function() { mVerifier.initForExportTest(VCardConfig.VCARD_TYPE_DOCOMO, STR); ContactEntry entry = mVerifier.addInputEntry(); entry.addContentValues(StructuredPostal.CONTENT_ITEM_TYPE) .put(StructuredPostal.TYPE, StructuredPostal.TYPE_WORK) .put(StructuredPostal.POBOX, "1"); entry.addContentValues(StructuredPostal... | /**
* Verifies that only one address field is emitted toward DoCoMo phones.
* Prefered type must (should?) be: HOME > WORK > OTHER > CUSTOM
*/ | Verifies that only one address field is emitted toward DoCoMo phones. Prefered type must (should?) be: HOME > WORK > OTHER > CUSTOM | testPostalAdrressForDoCoMo_1 | {
"repo_name": "mateor/PDroidHistory",
"path": "frameworks/base/core/tests/coretests/src/android/pim/vcard/VCardJapanizationTests.java",
"license": "gpl-3.0",
"size": 23236
} | [
"android.pim.vcard.test_utils.ContactEntry",
"android.provider.ContactsContract"
] | import android.pim.vcard.test_utils.ContactEntry; import android.provider.ContactsContract; | import android.pim.vcard.test_utils.*; import android.provider.*; | [
"android.pim",
"android.provider"
] | android.pim; android.provider; | 2,725,954 |
Options opt = new OptionsBuilder()
.include(this.getClass().getName() + ".*")
.addProfiler(StackProfiler.class)
.build();
new Runner(opt).run();
} | Options opt = new OptionsBuilder() .include(this.getClass().getName() + ".*") .addProfiler(StackProfiler.class) .build(); new Runner(opt).run(); } | /**
* BenchmarkRunner - runs all benchmark tests in the concrete test class.
*
* @throws RunnerException
* if the benchmark failed
*/ | BenchmarkRunner - runs all benchmark tests in the concrete test class | benchmark | {
"repo_name": "jenkinsci/analysis-model",
"path": "src/test/java/edu/hm/hafner/analysis/AbstractBenchmark.java",
"license": "mit",
"size": 1168
} | [
"org.openjdk.jmh.profile.StackProfiler",
"org.openjdk.jmh.runner.Runner",
"org.openjdk.jmh.runner.options.Options",
"org.openjdk.jmh.runner.options.OptionsBuilder"
] | import org.openjdk.jmh.profile.StackProfiler; import org.openjdk.jmh.runner.Runner; import org.openjdk.jmh.runner.options.Options; import org.openjdk.jmh.runner.options.OptionsBuilder; | import org.openjdk.jmh.profile.*; import org.openjdk.jmh.runner.*; import org.openjdk.jmh.runner.options.*; | [
"org.openjdk.jmh"
] | org.openjdk.jmh; | 2,913,908 |
public CustomListener getCustomEvent()
{
return _cacheEventListener;
} | CustomListener function() { return _cacheEventListener; } | /**
* Does what the name says
*
* @return CacheListener it holds
*/ | Does what the name says | getCustomEvent | {
"repo_name": "joseananio/TayzGrid",
"path": "src/tgclient/src/com/alachisoft/tayzgrid/web/caching/CustomListenerWrapper.java",
"license": "apache-2.0",
"size": 1816
} | [
"com.alachisoft.tayzgrid.event.CustomListener"
] | import com.alachisoft.tayzgrid.event.CustomListener; | import com.alachisoft.tayzgrid.event.*; | [
"com.alachisoft.tayzgrid"
] | com.alachisoft.tayzgrid; | 639,741 |
Teacher teacher = new Teacher("Malcolm");
Pupil pupil = new Pupil("Tracey");
String result = teacher.ask(pupil, "Some question");
String expected = "Answer";
Assert.assertThat(result, is(expected));
} | Teacher teacher = new Teacher(STR); Pupil pupil = new Pupil(STR); String result = teacher.ask(pupil, STR); String expected = STR; Assert.assertThat(result, is(expected)); } | /**
* Test when Teacher asking pupil then pupil reply "Answer"
*/ | Test when Teacher asking pupil then pupil reply "Answer" | whenTeacherAskPupilThenAnswer | {
"repo_name": "dpopov93/popovd",
"path": "chapter_002/src/test/java/ru/job4j/professions/TeacherTest.java",
"license": "apache-2.0",
"size": 601
} | [
"org.hamcrest.core.Is",
"org.junit.Assert"
] | import org.hamcrest.core.Is; import org.junit.Assert; | import org.hamcrest.core.*; import org.junit.*; | [
"org.hamcrest.core",
"org.junit"
] | org.hamcrest.core; org.junit; | 2,677,677 |
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedFlux<JobExecutionInner> listByJobExecutionAsync(
String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId); | @ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux<JobExecutionInner> listByJobExecutionAsync( String resourceGroupName, String serverName, String jobAgentName, String jobName, UUID jobExecutionId); | /**
* Lists target executions for all steps of a job execution.
*
* @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
* from the Azure Resource Manager API or the portal.
* @param serverName The name of the server.
* @param jo... | Lists target executions for all steps of a job execution | listByJobExecutionAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/fluent/JobTargetExecutionsClient.java",
"license": "mit",
"size": 18032
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedFlux",
"com.azure.resourcemanager.sql.fluent.models.JobExecutionInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedFlux; import com.azure.resourcemanager.sql.fluent.models.JobExecutionInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.sql.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 2,727,545 |
public Date getModifiedDate(); | Date function(); | /**
* Returns the modified date of this event.
*
* @return the modified date of this event
*/ | Returns the modified date of this event | getModifiedDate | {
"repo_name": "bnguyen82/stuff-projects",
"path": "PortletInAction/event-listing-portlet/event-listing-portlet-portlet-service/src/main/java/com/nosester/portlet/eventlisting/model/EventModel.java",
"license": "mit",
"size": 6253
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 402,759 |
List<Long> filterFileIdsByRepo(String uuid, List<Long> fileIds); | List<Long> filterFileIdsByRepo(String uuid, List<Long> fileIds); | /**
* Find the original file IDs among those given that are in the given repository.
* @param uuid a repository UUID
* @param fileIds IDs of original files
* @return those IDs among those given whose original files are in the given repository
*/ | Find the original file IDs among those given that are in the given repository | filterFileIdsByRepo | {
"repo_name": "dominikl/openmicroscopy",
"path": "components/model/src/ome/util/SqlAction.java",
"license": "gpl-2.0",
"size": 43659
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,721,500 |
private void blockAndCheckIfStopped(ZooKeeperNodeTracker tracker)
throws IOException, InterruptedException {
while (tracker.blockUntilAvailable(this.msgInterval, false) == null) {
if (this.stopped) {
throw new IOException("Received the shutdown message while waiting.");
}
}
} | void function(ZooKeeperNodeTracker tracker) throws IOException, InterruptedException { while (tracker.blockUntilAvailable(this.msgInterval, false) == null) { if (this.stopped) { throw new IOException(STR); } } } | /**
* Utilty method to wait indefinitely on a znode availability while checking
* if the region server is shut down
* @param tracker znode tracker to use
* @throws IOException any IO exception, plus if the RS is stopped
* @throws InterruptedException
*/ | Utilty method to wait indefinitely on a znode availability while checking if the region server is shut down | blockAndCheckIfStopped | {
"repo_name": "zshao/hbase-1.0.0-cdh5.4.1",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java",
"license": "apache-2.0",
"size": 119105
} | [
"java.io.IOException",
"org.apache.hadoop.hbase.zookeeper.ZooKeeperNodeTracker"
] | import java.io.IOException; import org.apache.hadoop.hbase.zookeeper.ZooKeeperNodeTracker; | import java.io.*; import org.apache.hadoop.hbase.zookeeper.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 618,130 |
public boolean addPostTerm(final long postId, final TaxonomyTerm taxonomyTerm) throws SQLException {
List<TaxonomyTerm> currTerms = selectPostTerms(postId, taxonomyTerm.taxonomy);
for(TaxonomyTerm currTerm : currTerms) {
if(currTerm.term.name.equals(taxonomyTerm.term.name)) {
return... | boolean function(final long postId, final TaxonomyTerm taxonomyTerm) throws SQLException { List<TaxonomyTerm> currTerms = selectPostTerms(postId, taxonomyTerm.taxonomy); for(TaxonomyTerm currTerm : currTerms) { if(currTerm.term.name.equals(taxonomyTerm.term.name)) { return false; } } Connection conn = null; PreparedSta... | /**
* Adds a term at the end of the current terms if it does not already exist.
* @param postId The post id.
* @param taxonomyTerm The taxonomy term to add.
* @return Was the term added?
* @throws SQLException on database error.
*/ | Adds a term at the end of the current terms if it does not already exist | addPostTerm | {
"repo_name": "attribyte/wpdb",
"path": "src/main/java/org/attribyte/wp/db/DB.java",
"license": "apache-2.0",
"size": 100265
} | [
"com.codahale.metrics.Timer",
"java.sql.Connection",
"java.sql.PreparedStatement",
"java.sql.SQLException",
"java.util.List",
"org.attribyte.util.SQLUtil",
"org.attribyte.wp.model.TaxonomyTerm"
] | import com.codahale.metrics.Timer; import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; import java.util.List; import org.attribyte.util.SQLUtil; import org.attribyte.wp.model.TaxonomyTerm; | import com.codahale.metrics.*; import java.sql.*; import java.util.*; import org.attribyte.util.*; import org.attribyte.wp.model.*; | [
"com.codahale.metrics",
"java.sql",
"java.util",
"org.attribyte.util",
"org.attribyte.wp"
] | com.codahale.metrics; java.sql; java.util; org.attribyte.util; org.attribyte.wp; | 1,187,424 |
@Nullable public static <T> T firstNotNull(@Nullable T... vals) {
if (vals == null)
return null;
for (T val : vals) {
if (val != null)
return val;
}
return null;
} | @Nullable static <T> T function(@Nullable T... vals) { if (vals == null) return null; for (T val : vals) { if (val != null) return val; } return null; } | /**
* Returns a first non-null value in a given array, if such is present.
*
* @param vals Input array.
* @return First non-null value, or {@code null}, if array is empty or contains
* only nulls.
*/ | Returns a first non-null value in a given array, if such is present | firstNotNull | {
"repo_name": "pperalta/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java",
"license": "apache-2.0",
"size": 314980
} | [
"org.jetbrains.annotations.Nullable"
] | import org.jetbrains.annotations.Nullable; | import org.jetbrains.annotations.*; | [
"org.jetbrains.annotations"
] | org.jetbrains.annotations; | 1,151,898 |
public void registerScript(String fileName) throws IOException {
registerScript(fileName, null, null);
} | void function(String fileName) throws IOException { registerScript(fileName, null, null); } | /**
* Register a query with the Pig runtime. The query will be read from the indicated file.
* @param fileName file to read query from.
* @throws IOException
*/ | Register a query with the Pig runtime. The query will be read from the indicated file | registerScript | {
"repo_name": "apache/pig",
"path": "src/org/apache/pig/PigServer.java",
"license": "apache-2.0",
"size": 77089
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 892,063 |
private void macosFocusWorkaround(int x, int y) {
// macos focus handling work around. Macos displays focus based on the
// the last thing to recieve focus gained - LWJGL on macos expects it's
// canvas
// to always be the focused entity
Component comp = SwingUtilities.getDeepestComponentAt(getContent... | void function(int x, int y) { Component comp = SwingUtilities.getDeepestComponentAt(getContentPane(), x - getContentPane().getX(), y - getContentPane().getY()); if (originalFocus == null) { originalFocus = KeyboardFocusManager .getCurrentKeyboardFocusManager().getFocusOwner(); } setFocusableWindowState(true); Component... | /**
* MacOSX focus handling in Swing is dependent on the focused element
* recieving all input. However LWJGL uses a normal AWT window on OSX so
* this doesn't work with focus. Instead this method manually manages focus
* back and forth between the component in focus and the LWJGL canvas
*
* @param x... | MacOSX focus handling in Swing is dependent on the focused element recieving all input. However LWJGL uses a normal AWT window on OSX so this doesn't work with focus. Instead this method manually manages focus back and forth between the component in focus and the LWJGL canvas | macosFocusWorkaround | {
"repo_name": "SenshiSentou/SourceFight",
"path": "slick_dev/trunk/Swingle/src/org/newdawn/swingle/HeadlessFrame.java",
"license": "bsd-2-clause",
"size": 21723
} | [
"java.awt.Component",
"java.awt.KeyboardFocusManager",
"java.awt.event.FocusEvent",
"javax.swing.SwingUtilities",
"javax.swing.text.JTextComponent"
] | import java.awt.Component; import java.awt.KeyboardFocusManager; import java.awt.event.FocusEvent; import javax.swing.SwingUtilities; import javax.swing.text.JTextComponent; | import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.text.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 2,381,734 |
void spawnNativeControllers(final Environment environment, final boolean inheritIo) throws IOException {
if (spawned.compareAndSet(false, true) == false) {
throw new IllegalStateException("native controllers already spawned");
}
if (Files.exists(environment.modulesFile()) == fals... | void spawnNativeControllers(final Environment environment, final boolean inheritIo) throws IOException { if (spawned.compareAndSet(false, true) == false) { throw new IllegalStateException(STR); } if (Files.exists(environment.modulesFile()) == false) { throw new IllegalStateException(STR + environment.modulesFile() + ST... | /**
* Spawns the native controllers for each module.
*
* @param environment The node environment
* @param inheritIo Should the stdout and stderr of the spawned process inherit the
* stdout and stderr of the JVM spawning it?
* @throws IOException if an I/O error occurs ... | Spawns the native controllers for each module | spawnNativeControllers | {
"repo_name": "GlenRSmith/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/bootstrap/Spawner.java",
"license": "apache-2.0",
"size": 5944
} | [
"java.io.IOException",
"java.nio.file.Files",
"java.nio.file.Path",
"java.util.List",
"java.util.Locale",
"org.elasticsearch.env.Environment",
"org.elasticsearch.plugins.Platforms",
"org.elasticsearch.plugins.PluginInfo",
"org.elasticsearch.plugins.PluginsService"
] | import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.util.List; import java.util.Locale; import org.elasticsearch.env.Environment; import org.elasticsearch.plugins.Platforms; import org.elasticsearch.plugins.PluginInfo; import org.elasticsearch.plugins.PluginsService; | import java.io.*; import java.nio.file.*; import java.util.*; import org.elasticsearch.env.*; import org.elasticsearch.plugins.*; | [
"java.io",
"java.nio",
"java.util",
"org.elasticsearch.env",
"org.elasticsearch.plugins"
] | java.io; java.nio; java.util; org.elasticsearch.env; org.elasticsearch.plugins; | 2,657,005 |
@NotNull
private static String getLongFromShort(@NotNull String id) {
return id.substring(0, 8) + "-" + id.substring(8, 12) + "-" + id.substring(12, 16) + "-" +
id.substring(16, 20) + "-" + id.substring(20, 32);
} | static String function(@NotNull String id) { return id.substring(0, 8) + "-" + id.substring(8, 12) + "-" + id.substring(12, 16) + "-" + id.substring(16, 20) + "-" + id.substring(20, 32); } | /**
* Convert the given short UUID {@link String} to a long UUID String.
* @param id Short UUID String to convert.
* @return Long UUID String.
*/ | Convert the given short UUID <code>String</code> to a long UUID String | getLongFromShort | {
"repo_name": "rlf/uSkyBlock",
"path": "uSkyBlock-Core/src/main/java/us/talabrek/ultimateskyblock/util/UUIDUtil.java",
"license": "gpl-3.0",
"size": 1808
} | [
"org.jetbrains.annotations.NotNull"
] | import org.jetbrains.annotations.NotNull; | import org.jetbrains.annotations.*; | [
"org.jetbrains.annotations"
] | org.jetbrains.annotations; | 35,174 |
public Style[] convertStyleSheets(String rawSelectors, String rawDefinitions) {
// Extract Selectors
StringTokenizer selectors = new StringTokenizer(rawSelectors, ",");
int numSelectors = selectors.countTokens();
Style[] styles = new Style[numSelectors];
for (int i = 0; i < numSelectors; ++i) {
... | Style[] function(String rawSelectors, String rawDefinitions) { StringTokenizer selectors = new StringTokenizer(rawSelectors, ","); int numSelectors = selectors.countTokens(); Style[] styles = new Style[numSelectors]; for (int i = 0; i < numSelectors; ++i) { StyleSelector previousStyleSelector = null; StringTokenizer co... | /**
* Extract {@link Style} definitions from raw datas and returns an array of
* {@link Style} instances.
*
* @param rawSelectors
* @param rawDefinitions
* @return A list of {@link Style} instance.
*/ | Extract <code>Style</code> definitions from raw datas and returns an array of <code>Style</code> instances | convertStyleSheets | {
"repo_name": "mariotaku/twidere.j2me",
"path": "src/org/kalmeo/kuix/core/KuixConverter.java",
"license": "gpl-3.0",
"size": 36554
} | [
"org.kalmeo.kuix.core.style.Style",
"org.kalmeo.kuix.core.style.StyleProperty",
"org.kalmeo.kuix.core.style.StyleSelector",
"org.kalmeo.util.StringTokenizer"
] | import org.kalmeo.kuix.core.style.Style; import org.kalmeo.kuix.core.style.StyleProperty; import org.kalmeo.kuix.core.style.StyleSelector; import org.kalmeo.util.StringTokenizer; | import org.kalmeo.kuix.core.style.*; import org.kalmeo.util.*; | [
"org.kalmeo.kuix",
"org.kalmeo.util"
] | org.kalmeo.kuix; org.kalmeo.util; | 663,594 |
@Override
public String getLabelForId(Integer id) {
List<String> list = findObjects(String.class, "select n.label from OnmsNode as n where n.id = ?", id);
return list == null || list.isEmpty() ? null : list.get(0);
} | String function(Integer id) { List<String> list = findObjects(String.class, STR, id); return list == null list.isEmpty() ? null : list.get(0); } | /**
* Test the ability to simply retrieve a String object (node label) without
* having to return a bulky Node object.
*/ | Test the ability to simply retrieve a String object (node label) without having to return a bulky Node object | getLabelForId | {
"repo_name": "rfdrake/opennms",
"path": "opennms-dao/src/main/java/org/opennms/netmgt/dao/hibernate/NodeDaoHibernate.java",
"license": "gpl-2.0",
"size": 17324
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,593,677 |
public void setSlotState(long startMessageId, long endMessageId, SlotState slotState)
throws AndesException; | void function(long startMessageId, long endMessageId, SlotState slotState) throws AndesException; | /**
* Set slots states
* @param startMessageId start message id of slot
* @param endMessageId end message id of slot
* @param slotState state of slot
* @throws AndesException
*/ | Set slots states | setSlotState | {
"repo_name": "abeykoon/andes",
"path": "modules/andes-core/broker/src/main/java/org/wso2/andes/kernel/AndesContextStore.java",
"license": "apache-2.0",
"size": 13771
} | [
"org.wso2.andes.kernel.slot.SlotState"
] | import org.wso2.andes.kernel.slot.SlotState; | import org.wso2.andes.kernel.slot.*; | [
"org.wso2.andes"
] | org.wso2.andes; | 988,385 |
public MultiChunkId getMultiChunkId(ChunkChecksum chunkChecksum) {
try (PreparedStatement preparedStatement = getStatement("multichunk.select.all.getMultiChunkIdForChunk.sql")) {
preparedStatement.setString(1, chunkChecksum.toString());
try (ResultSet resultSet = preparedStatement.executeQuery()) {
... | MultiChunkId function(ChunkChecksum chunkChecksum) { try (PreparedStatement preparedStatement = getStatement(STR)) { preparedStatement.setString(1, chunkChecksum.toString()); try (ResultSet resultSet = preparedStatement.executeQuery()) { if (resultSet.next()) { return MultiChunkId.parseMultiChunkId(resultSet.getString(... | /**
* Note: This method selects also {@link DatabaseVersionStatus#DIRTY DIRTY}.
*/ | Note: This method selects also <code>DatabaseVersionStatus#DIRTY DIRTY</code> | getMultiChunkId | {
"repo_name": "syncany/syncany-plugin-dropbox",
"path": "core/syncany-lib/src/main/java/org/syncany/database/dao/MultiChunkSqlDao.java",
"license": "gpl-3.0",
"size": 11974
} | [
"java.sql.PreparedStatement",
"java.sql.ResultSet",
"java.sql.SQLException",
"org.syncany.database.ChunkEntry",
"org.syncany.database.MultiChunkEntry"
] | import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import org.syncany.database.ChunkEntry; import org.syncany.database.MultiChunkEntry; | import java.sql.*; import org.syncany.database.*; | [
"java.sql",
"org.syncany.database"
] | java.sql; org.syncany.database; | 132,101 |
@SuppressWarnings("unchecked")
public <T> T loadAs(InputStream input, Class<T> type) {
return (T) loadFromReader(new StreamReader(new UnicodeReader(input)), type);
} | @SuppressWarnings(STR) <T> T function(InputStream input, Class<T> type) { return (T) loadFromReader(new StreamReader(new UnicodeReader(input)), type); } | /**
* Parse the only YAML document in a stream and produce the corresponding
* Java object.
*
* @param <T>
* Class is defined by the second argument
* @param input
* data to load from (BOM is respected and removed)
* @param type
* Class of t... | Parse the only YAML document in a stream and produce the corresponding Java object | loadAs | {
"repo_name": "lsst-camera-dh/snakeyaml",
"path": "src/main/java/org/yaml/snakeyaml/Yaml.java",
"license": "apache-2.0",
"size": 22906
} | [
"java.io.InputStream",
"org.yaml.snakeyaml.reader.StreamReader",
"org.yaml.snakeyaml.reader.UnicodeReader"
] | import java.io.InputStream; import org.yaml.snakeyaml.reader.StreamReader; import org.yaml.snakeyaml.reader.UnicodeReader; | import java.io.*; import org.yaml.snakeyaml.reader.*; | [
"java.io",
"org.yaml.snakeyaml"
] | java.io; org.yaml.snakeyaml; | 2,634,220 |
public void write (ByteBuf buffer) throws PacketException;
| void function (ByteBuf buffer) throws PacketException; | /**
* Serializes the packet data.
* @param buffer The packet buffer.
*/ | Serializes the packet data | write | {
"repo_name": "LordAkkarin/rcon",
"path": "common/src/main/java/org/evilco/network/rcon/common/packet/IPacket.java",
"license": "apache-2.0",
"size": 1086
} | [
"io.netty.buffer.ByteBuf",
"org.evilco.network.rcon.common.error.PacketException"
] | import io.netty.buffer.ByteBuf; import org.evilco.network.rcon.common.error.PacketException; | import io.netty.buffer.*; import org.evilco.network.rcon.common.error.*; | [
"io.netty.buffer",
"org.evilco.network"
] | io.netty.buffer; org.evilco.network; | 343,969 |
@SideOnly(Side.CLIENT)
public void getSubItems(Item itemIn, CreativeTabs tab, List<ItemStack> subItems)
{
this.block.getSubBlocks(itemIn, tab, subItems);
} | @SideOnly(Side.CLIENT) void function(Item itemIn, CreativeTabs tab, List<ItemStack> subItems) { this.block.getSubBlocks(itemIn, tab, subItems); } | /**
* returns a list of items with the same ID, but different meta (eg: dye returns 16 items)
*/ | returns a list of items with the same ID, but different meta (eg: dye returns 16 items) | getSubItems | {
"repo_name": "aebert1/BigTransport",
"path": "build/tmp/recompileMc/sources/net/minecraft/item/ItemBlock.java",
"license": "gpl-3.0",
"size": 7161
} | [
"java.util.List",
"net.minecraft.creativetab.CreativeTabs",
"net.minecraftforge.fml.relauncher.Side",
"net.minecraftforge.fml.relauncher.SideOnly"
] | import java.util.List; import net.minecraft.creativetab.CreativeTabs; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; | import java.util.*; import net.minecraft.creativetab.*; import net.minecraftforge.fml.relauncher.*; | [
"java.util",
"net.minecraft.creativetab",
"net.minecraftforge.fml"
] | java.util; net.minecraft.creativetab; net.minecraftforge.fml; | 2,465,217 |
public V put(K key, V value) {
checkNotNullParamWithNullPointerException("value", value);
int hash = hashOf(key);
return segmentFor(hash).put(key, hash, value, false);
}
/**
* {@inheritDoc} | V function(K key, V value) { checkNotNullParamWithNullPointerException("value", value); int hash = hashOf(key); return segmentFor(hash).put(key, hash, value, false); } /** * {@inheritDoc} | /**
* Maps the specified key to the specified value in this table.
* Neither the key nor the value can be null.
*
* <p> The value can be retrieved by calling the <tt>get</tt> method
* with a key that is equal to the original key.
*
* @param key key with which the specified value is to... | Maps the specified key to the specified value in this table. Neither the key nor the value can be null. The value can be retrieved by calling the get method with a key that is equal to the original key | put | {
"repo_name": "jstourac/wildfly",
"path": "web-common/src/main/java/org/jboss/as/web/common/ConcurrentReferenceHashMap.java",
"license": "lgpl-2.1",
"size": 64355
} | [
"org.wildfly.common.Assert"
] | import org.wildfly.common.Assert; | import org.wildfly.common.*; | [
"org.wildfly.common"
] | org.wildfly.common; | 2,065,545 |
private boolean generateSDK(RestAPIStoreImpl restAPIStore, String tenantAwareUserName, String password,
String apiId, String language, String tenant, String crossTenant) throws Exception {
if (restAPIStore == null) {
restAPIStore = new RestAPIStoreImpl(tenantAwareUserName, password,... | boolean function(RestAPIStoreImpl restAPIStore, String tenantAwareUserName, String password, String apiId, String language, String tenant, String crossTenant) throws Exception { if (restAPIStore == null) { restAPIStore = new RestAPIStoreImpl(tenantAwareUserName, password, tenant, storeURLHttps); } try { restAPIStore.ge... | /**
* This method generates SDK for a given API for a given programming language
*
* @param tenantAwareUserName username of the user who will log into store
* @param password password of the user who will log into store
* @param language programming language for the SDK
... | This method generates SDK for a given API for a given programming language | generateSDK | {
"repo_name": "jaadds/product-apim",
"path": "modules/integration/tests-integration/tests-backend/src/test/java/org/wso2/am/integration/tests/api/sdk/SDKGenerationTestCase.java",
"license": "apache-2.0",
"size": 10512
} | [
"java.io.File",
"org.apache.commons.io.FileUtils",
"org.apache.commons.io.output.ByteArrayOutputStream",
"org.apache.commons.lang.RandomStringUtils",
"org.codehaus.plexus.util.StringUtils",
"org.wso2.am.integration.clients.store.api.ApiException",
"org.wso2.am.integration.clients.store.api.ApiResponse",... | import java.io.File; import org.apache.commons.io.FileUtils; import org.apache.commons.io.output.ByteArrayOutputStream; import org.apache.commons.lang.RandomStringUtils; import org.codehaus.plexus.util.StringUtils; import org.wso2.am.integration.clients.store.api.ApiException; import org.wso2.am.integration.clients.sto... | import java.io.*; import org.apache.commons.io.*; import org.apache.commons.io.output.*; import org.apache.commons.lang.*; import org.codehaus.plexus.util.*; import org.wso2.am.integration.clients.store.api.*; import org.wso2.am.integration.test.impl.*; | [
"java.io",
"org.apache.commons",
"org.codehaus.plexus",
"org.wso2.am"
] | java.io; org.apache.commons; org.codehaus.plexus; org.wso2.am; | 785,434 |
@Override
public int transferTo(ByteBuf buf) throws IOException {
Preconditions.checkState(!mClosed);
if (mUnderFileSystemInputStream == null) {
return -1;
}
if (mBlockMeta.getBlockSize() <= mInStreamPos) {
return -1;
}
// Make a copy of the state to keep track of what we have rea... | int function(ByteBuf buf) throws IOException { Preconditions.checkState(!mClosed); if (mUnderFileSystemInputStream == null) { return -1; } if (mBlockMeta.getBlockSize() <= mInStreamPos) { return -1; } ByteBuf bufCopy = null; if (mBlockWriter != null) { bufCopy = buf.duplicate(); bufCopy.readerIndex(bufCopy.writerIndex(... | /**
* This interface is supposed to be used for sequence block reads.
*
* @param buf the byte buffer
* @return the number of bytes read, -1 if it reaches EOF and none was read
*/ | This interface is supposed to be used for sequence block reads | transferTo | {
"repo_name": "madanadit/alluxio",
"path": "core/server/worker/src/main/java/alluxio/worker/block/UnderFileSystemBlockReader.java",
"license": "apache-2.0",
"size": 13856
} | [
"com.google.common.base.Preconditions",
"io.netty.buffer.ByteBuf",
"java.io.IOException"
] | import com.google.common.base.Preconditions; import io.netty.buffer.ByteBuf; import java.io.IOException; | import com.google.common.base.*; import io.netty.buffer.*; import java.io.*; | [
"com.google.common",
"io.netty.buffer",
"java.io"
] | com.google.common; io.netty.buffer; java.io; | 613,942 |
public static boolean isParseableDateString( String str )
{
// fix problem with timestamps tagged on end
if( str.indexOf( " " ) > 0 )
{
str = str.substring( 0, str.indexOf( " " ) );
}
try
{
java.sql.Date d1 = java.sql.Date.valueOf( str );
getXLSDateVal( d1 );
return true;
}
catch( Illega... | static boolean function( String str ) { if( str.indexOf( " " ) > 0 ) { str = str.substring( 0, str.indexOf( " " ) ); } try { java.sql.Date d1 = java.sql.Date.valueOf( str ); getXLSDateVal( d1 ); return true; } catch( IllegalArgumentException e ) { return false; } } | /**
* returns whether this method will work with your input string
*/ | returns whether this method will work with your input string | isParseableDateString | {
"repo_name": "Maxels88/openxls",
"path": "src/main/java/org/openxls/ExtenXLS/DateConverter.java",
"license": "gpl-3.0",
"size": 25935
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 326,801 |
protected E getEntity(long id) {
final CriteriaBuilder cb = entityManager.getCriteriaBuilder();
final CriteriaQuery<E> criteriaQuery = cb.createQuery(entityClass);
Root<E> root = criteriaQuery.from(entityClass);
List<Predicate> predicates = getPredicates(null, cb, root);
pred... | E function(long id) { final CriteriaBuilder cb = entityManager.getCriteriaBuilder(); final CriteriaQuery<E> criteriaQuery = cb.createQuery(entityClass); Root<E> root = criteriaQuery.from(entityClass); List<Predicate> predicates = getPredicates(null, cb, root); predicates.add(cb.equal(root.get("id"), id)); criteriaQuery... | /**
* Get a single entity matching the given ID.
*
* @param id
* @return
*/ | Get a single entity matching the given ID | getEntity | {
"repo_name": "AndreasArvidsson/Rest-App",
"path": "src/main/java/com/andreas/restapp/rest/base/BaseDomainEntityResource.java",
"license": "mit",
"size": 9697
} | [
"java.util.List",
"javax.persistence.NoResultException",
"javax.persistence.criteria.CriteriaBuilder",
"javax.persistence.criteria.CriteriaQuery",
"javax.persistence.criteria.Predicate",
"javax.persistence.criteria.Root",
"javax.ws.rs.WebApplicationException",
"javax.ws.rs.core.Response"
] | import java.util.List; import javax.persistence.NoResultException; import javax.persistence.criteria.CriteriaBuilder; import javax.persistence.criteria.CriteriaQuery; import javax.persistence.criteria.Predicate; import javax.persistence.criteria.Root; import javax.ws.rs.WebApplicationException; import javax.ws.rs.core.... | import java.util.*; import javax.persistence.*; import javax.persistence.criteria.*; import javax.ws.rs.*; import javax.ws.rs.core.*; | [
"java.util",
"javax.persistence",
"javax.ws"
] | java.util; javax.persistence; javax.ws; | 1,435,945 |
@Test
public void checkFindFifthElement() {
int expectedIndex = 5;
assertEquals(expectedIndex, tree.findNearestIndex(46.0));
assertEquals(expectedIndex, tree.findNearestIndex(49.0));
assertEquals(expectedIndex, tree.findNearestIndex(50.0));
assertEquals(expectedIndex, tree.findNearestIndex(51.0));
... | void function() { int expectedIndex = 5; assertEquals(expectedIndex, tree.findNearestIndex(46.0)); assertEquals(expectedIndex, tree.findNearestIndex(49.0)); assertEquals(expectedIndex, tree.findNearestIndex(50.0)); assertEquals(expectedIndex, tree.findNearestIndex(51.0)); assertEquals(expectedIndex, tree.findNearestInd... | /**
* Checks that the element at index 5 in the tree can be found with the
* appropriate search values (anything between 45.0--exclusive--to
* 55.0--inclusive).
*/ | Checks that the element at index 5 in the tree can be found with the appropriate search values (anything between 45.0--exclusive--to 55.0--inclusive) | checkFindFifthElement | {
"repo_name": "eclipse/eavp",
"path": "org.eclipse.eavp.tests.viz.service/src/org/eclipse/eavp/tests/viz/service/widgets/BinarySearchTreeTester.java",
"license": "epl-1.0",
"size": 16019
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 1,524,554 |
private void initCompressor(final int pressureSwitchSlot,
final int pressureSwitchChannel,
final int compresssorRelaySlot,
final int compressorRelayChannel,
final int victorRelaySlot,
final int victorRelayChannel) {
m_enabled = false;
... | void function(final int pressureSwitchSlot, final int pressureSwitchChannel, final int compresssorRelaySlot, final int compressorRelayChannel, final int victorRelaySlot, final int victorRelayChannel) { m_enabled = false; m_pressureSwitch = new DigitalInput(pressureSwitchSlot, pressureSwitchChannel); m_relay = new Relay... | /**
* Initialize the Compressor object.
* This method is the common initialization code for all the constructors for the Compressor
* object. It takes the relay channel and pressure switch channel and spawns a task that polls the
* compressor and sensor.
*
* You MUST start the compre... | Initialize the Compressor object. This method is the common initialization code for all the constructors for the Compressor object. It takes the relay channel and pressure switch channel and spawns a task that polls the compressor and sensor. You MUST start the compressor by calling the start() method | initCompressor | {
"repo_name": "discobots2587/2014-AerialAssist",
"path": "src/org/discobots/aerialassist/utils/BetterCompressor.java",
"license": "bsd-3-clause",
"size": 7989
} | [
"edu.wpi.first.wpilibj.DigitalInput",
"edu.wpi.first.wpilibj.Relay",
"edu.wpi.first.wpilibj.Victor",
"edu.wpi.first.wpilibj.communication.UsageReporting"
] | import edu.wpi.first.wpilibj.DigitalInput; import edu.wpi.first.wpilibj.Relay; import edu.wpi.first.wpilibj.Victor; import edu.wpi.first.wpilibj.communication.UsageReporting; | import edu.wpi.first.wpilibj.*; import edu.wpi.first.wpilibj.communication.*; | [
"edu.wpi.first"
] | edu.wpi.first; | 2,682,562 |
@WebMethod(operationName = "PlayedAtWorldCup")
@WebResult(name = "PlayedAtWorldCupResult", targetNamespace = "http://footballpool.dataaccess.eu")
@RequestWrapper(localName = "PlayedAtWorldCup", targetNamespace = "http://footballpool.dataaccess.eu", className = "support.PlayedAtWorldCup")
@ResponseWrappe... | @WebMethod(operationName = STR) @WebResult(name = STR, targetNamespace = "http: @RequestWrapper(localName = STR, targetNamespace = "http: @ResponseWrapper(localName = "PlayedAtWorldCupResponseSTRhttp: int function( @WebParam(name = "sTeamNameSTRhttp: String sTeamName); | /**
* Returns a number on how many times the given team competed at a worldcup football
*
* @param sTeamName
* @return
* returns int
*/ | Returns a number on how many times the given team competed at a worldcup football | playedAtWorldCup | {
"repo_name": "pietrodn/middleware-exe",
"path": "webservices/TestFootballService/src/support/InfoSoapType.java",
"license": "gpl-3.0",
"size": 32295
} | [
"javax.jws.WebMethod",
"javax.jws.WebParam",
"javax.jws.WebResult",
"javax.xml.ws.RequestWrapper",
"javax.xml.ws.ResponseWrapper"
] | import javax.jws.WebMethod; import javax.jws.WebParam; import javax.jws.WebResult; import javax.xml.ws.RequestWrapper; import javax.xml.ws.ResponseWrapper; | import javax.jws.*; import javax.xml.ws.*; | [
"javax.jws",
"javax.xml"
] | javax.jws; javax.xml; | 843,109 |
public StretchedRightArmMatch getOneArbitraryMatch(final Body pB, final RightHand pRH, final RightElbow pRE, final RightShoulder pRS) {
return rawGetOneArbitraryMatch(new Object[]{pB, pRH, pRE, pRS});
} | StretchedRightArmMatch function(final Body pB, final RightHand pRH, final RightElbow pRE, final RightShoulder pRS) { return rawGetOneArbitraryMatch(new Object[]{pB, pRH, pRE, pRS}); } | /**
* Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
* Neither determinism nor randomness of selection is guaranteed.
* @param pB the fixed value of pattern parameter B, or null if not bound.
* @param pRH the fixed value of pattern parameter RH... | Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. Neither determinism nor randomness of selection is guaranteed | getOneArbitraryMatch | {
"repo_name": "FTSRG/viatra-cep-examples",
"path": "jnect/queries/bodymodel.incquery/src-gen/bodymodel/ymca/StretchedRightArmMatcher.java",
"license": "epl-1.0",
"size": 19836
} | [
"org.jnect.bodymodel.Body",
"org.jnect.bodymodel.RightElbow",
"org.jnect.bodymodel.RightHand",
"org.jnect.bodymodel.RightShoulder"
] | import org.jnect.bodymodel.Body; import org.jnect.bodymodel.RightElbow; import org.jnect.bodymodel.RightHand; import org.jnect.bodymodel.RightShoulder; | import org.jnect.bodymodel.*; | [
"org.jnect.bodymodel"
] | org.jnect.bodymodel; | 2,734,778 |
@Test
public void testRequiredColDefault() throws Exception {
String tableName = "missingReq";
String tablePath = buildTable(tableName, multi3Contents);
try {
enableSchemaSupport();
String schemaSql = SCHEMA_SQL.replace("id int not null", "id int not null default '-1'");
run(schemaSql... | void function() throws Exception { String tableName = STR; String tablePath = buildTable(tableName, multi3Contents); try { enableSchemaSupport(); String schemaSql = SCHEMA_SQL.replace(STR, STR); run(schemaSql, tablePath); String sql = STR + tablePath; RowSet actual = client.queryBuilder().sql(sql).rowSet(); TupleMetada... | /**
* Use a user-provided default value for a missing required column.
*/ | Use a user-provided default value for a missing required column | testRequiredColDefault | {
"repo_name": "Agirish/drill",
"path": "exec/java-exec/src/test/java/org/apache/drill/exec/store/easy/text/compliant/TestCsvWithSchema.java",
"license": "apache-2.0",
"size": 43937
} | [
"org.apache.drill.common.types.TypeProtos",
"org.apache.drill.exec.physical.rowSet.RowSet",
"org.apache.drill.exec.physical.rowSet.RowSetBuilder",
"org.apache.drill.exec.record.metadata.SchemaBuilder",
"org.apache.drill.exec.record.metadata.TupleMetadata",
"org.apache.drill.test.rowSet.RowSetUtilities",
... | import org.apache.drill.common.types.TypeProtos; import org.apache.drill.exec.physical.rowSet.RowSet; import org.apache.drill.exec.physical.rowSet.RowSetBuilder; import org.apache.drill.exec.record.metadata.SchemaBuilder; import org.apache.drill.exec.record.metadata.TupleMetadata; import org.apache.drill.test.rowSet.Ro... | import org.apache.drill.common.types.*; import org.apache.drill.exec.physical.*; import org.apache.drill.exec.record.metadata.*; import org.apache.drill.test.*; import org.joda.time.*; | [
"org.apache.drill",
"org.joda.time"
] | org.apache.drill; org.joda.time; | 1,727,263 |
boolean hasBranchPermission(long branchId, BranchPermission permission); | boolean hasBranchPermission(long branchId, BranchPermission permission); | /**
* Checks whether current user has a specified branch permission for the specified branch. Note, that you can use
* other hasXxx() methods, but this one is convenient short-hand.
*
* @param branchId the id of the branch to check permission for
* @param permission the permission to check wh... | Checks whether current user has a specified branch permission for the specified branch. Note, that you can use other hasXxx() methods, but this one is convenient short-hand | hasBranchPermission | {
"repo_name": "offn/Myrelease",
"path": "jcommune-service/src/main/java/org/jtalks/jcommune/service/security/PermissionService.java",
"license": "lgpl-2.1",
"size": 3596
} | [
"org.jtalks.common.model.permissions.BranchPermission"
] | import org.jtalks.common.model.permissions.BranchPermission; | import org.jtalks.common.model.permissions.*; | [
"org.jtalks.common"
] | org.jtalks.common; | 2,757,188 |
EReference getSelectiveAnnotation_Annotation(); | EReference getSelectiveAnnotation_Annotation(); | /**
* Returns the meta object for the containment reference '{@link info.limpet.stackedcharts.model.SelectiveAnnotation#getAnnotation <em>Annotation</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Annotation</em>'.
* @see info.limpet.... | Returns the meta object for the containment reference '<code>info.limpet.stackedcharts.model.SelectiveAnnotation#getAnnotation Annotation</code>'. | getSelectiveAnnotation_Annotation | {
"repo_name": "pecko/limpet",
"path": "info.limpet.stackedcharts.model/src/info/limpet/stackedcharts/model/StackedchartsPackage.java",
"license": "epl-1.0",
"size": 92511
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,004,351 |
EReference getExternalOperation_Demands(); | EReference getExternalOperation_Demands(); | /**
* Returns the meta object for the reference list '{@link ucm.performance.ExternalOperation#getDemands <em>Demands</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Demands</em>'.
* @see ucm.performance.ExternalOperation#getDemands()
* @see #g... | Returns the meta object for the reference list '<code>ucm.performance.ExternalOperation#getDemands Demands</code>'. | getExternalOperation_Demands | {
"repo_name": "McGill-DP-Group/seg.jUCMNav",
"path": "src/ucm/performance/PerformancePackage.java",
"license": "epl-1.0",
"size": 47378
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 277,433 |
private void checkArmorContents() {
assertArrayEquals("Mismatch in armor contents", TEST_ARMOR, inventory.getArmorContents());
assertEquals("Mismatch in boots slot", TEST_BOOTS, inventory.getBoots());
assertEquals("Mismatch in leggings slot", TEST_LEGGINGS, inventory.getLeggings());
... | void function() { assertArrayEquals(STR, TEST_ARMOR, inventory.getArmorContents()); assertEquals(STR, TEST_BOOTS, inventory.getBoots()); assertEquals(STR, TEST_LEGGINGS, inventory.getLeggings()); assertEquals(STR, TEST_CHESTPLATE, inventory.getChestplate()); assertEquals(STR, TEST_HELMET, inventory.getHelmet()); } | /**
* Check that the armor contents match the test armor contents.
*/ | Check that the armor contents match the test armor contents | checkArmorContents | {
"repo_name": "LukBukkit/GlowstonePlusPlus",
"path": "src/test/java/net/glowstone/inventory/PlayerInventoryTest.java",
"license": "mit",
"size": 3481
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 2,547,425 |
public static Uri eventsSound() {
return getSound(R.string.events_sound_key,
Settings.System.DEFAULT_NOTIFICATION_URI,
R.string.events_sound_default);
} | static Uri function() { return getSound(R.string.events_sound_key, Settings.System.DEFAULT_NOTIFICATION_URI, R.string.events_sound_default); } | /**
* Gets event sound. It will save DEFAULT_NOTIFICATION_URI if value is
* default.
*
* @return {@link Uri} or <code>null</code>.
*/ | Gets event sound. It will save DEFAULT_NOTIFICATION_URI if value is default | eventsSound | {
"repo_name": "bigbugbb/iTracker",
"path": "app/src/main/java/com/itracker/android/data/SettingsManager.java",
"license": "apache-2.0",
"size": 28234
} | [
"android.net.Uri",
"android.provider.Settings"
] | import android.net.Uri; import android.provider.Settings; | import android.net.*; import android.provider.*; | [
"android.net",
"android.provider"
] | android.net; android.provider; | 2,781,514 |
@Nullable
public static File getSupportJarFile() {
File supportDir = getSupportPackageDir();
if (supportDir != null) {
File path = new File(supportDir, FD_V4 + File.separator + ANDROID_SUPPORT_V4_JAR);
if (path.exists()) {
return path;
}
... | static File function() { File supportDir = getSupportPackageDir(); if (supportDir != null) { File path = new File(supportDir, FD_V4 + File.separator + ANDROID_SUPPORT_V4_JAR); if (path.exists()) { return path; } } return null; } | /**
* Returns a path to the installed jar file for the support library,
* or null if it does not exist
*
* @return a path to the v4.jar or null
*/ | Returns a path to the installed jar file for the support library, or null if it does not exist | getSupportJarFile | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "sdk/eclipse/plugins/com.android.ide.eclipse.adt/src/com/android/ide/eclipse/adt/internal/actions/AddSupportJarAction.java",
"license": "gpl-2.0",
"size": 21908
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,883,025 |
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<RoleAssignmentInner> createByIdAsync(
String roleAssignmentId, RoleAssignmentCreateParameters parameters) {
return createByIdWithResponseAsync(roleAssignmentId, parameters)
.flatMap(
(Response<RoleAssignmentInner... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<RoleAssignmentInner> function( String roleAssignmentId, RoleAssignmentCreateParameters parameters) { return createByIdWithResponseAsync(roleAssignmentId, parameters) .flatMap( (Response<RoleAssignmentInner> res) -> { if (res.getValue() != null) { return Mono.just(res.get... | /**
* Creates a role assignment by ID.
*
* @param roleAssignmentId The fully qualified ID of the role assignment, including the scope, resource name and
* resource type. Use the format,
* /{scope}/providers/Microsoft.Authorization/roleAssignments/{roleAssignmentName}. Example:
* ... | Creates a role assignment by ID | createByIdAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanagerhybrid/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/implementation/RoleAssignmentsClientImpl.java",
"license": "mit",
"size": 111188
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.Response",
"com.azure.resourcemanager.authorization.fluent.models.RoleAssignmentInner",
"com.azure.resourcemanager.authorization.models.RoleAssignmentCreateParameters"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.resourcemanager.authorization.fluent.models.RoleAssignmentInner; import com.azure.resourcemanager.authorization.models.RoleAssignmentCreateParameters; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.authorization.fluent.models.*; import com.azure.resourcemanager.authorization.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,787,228 |
private String getSubsystem(
final CommandLineLinkerConfiguration linkerConfig) {
String subsystem = "0";
String[] args = linkerConfig.getPreArguments();
for (int i = 0; i < args.length; i++) {
if ("/SUBSYSTEM:CONSOLE".equals(args[i])) {
subsystem = "1... | String function( final CommandLineLinkerConfiguration linkerConfig) { String subsystem = "0"; String[] args = linkerConfig.getPreArguments(); for (int i = 0; i < args.length; i++) { if (STR.equals(args[i])) { subsystem = "1"; } if (STR.equals(args[i])) { subsystem = "2"; } if (STR.equals(args[i])) { subsystem = "9"; } ... | /**
* Get value of Subsystem property.
* @param linkerConfig linker configuration.
* @return value of Subsystem property
*/ | Get value of Subsystem property | getSubsystem | {
"repo_name": "maven-nar/cpptasks-parallel",
"path": "src/main/java/com/github/maven_nar/cpptasks/devstudio/VisualStudioNETProjectWriter.java",
"license": "apache-2.0",
"size": 32661
} | [
"com.github.maven_nar.cpptasks.compiler.CommandLineLinkerConfiguration"
] | import com.github.maven_nar.cpptasks.compiler.CommandLineLinkerConfiguration; | import com.github.maven_nar.cpptasks.compiler.*; | [
"com.github.maven_nar"
] | com.github.maven_nar; | 814,555 |
public List<Object> getPossibleValues() {
String className = "";
if (path.isRootPath()) {
className = path.getStartClassDescriptor().getType().getCanonicalName();
} else {
className = path.getLastClassDescriptor().getType().getCanonicalName();
}
// if... | List<Object> function() { String className = ""; if (path.isRootPath()) { className = path.getStartClassDescriptor().getType().getCanonicalName(); } else { className = path.getLastClassDescriptor().getType().getCanonicalName(); } if (templateSummary != null && !templateSummary.isEmpty()) { return templateSummary; } Lis... | /**
* Values to populate a dropdown for the path if possible values are available.
* @return possible values to populate a dropdown
*/ | Values to populate a dropdown for the path if possible values are available | getPossibleValues | {
"repo_name": "drhee/toxoMine",
"path": "intermine/web/main/src/org/intermine/web/logic/query/DisplayConstraint.java",
"license": "lgpl-2.1",
"size": 33874
} | [
"java.util.ArrayList",
"java.util.Date",
"java.util.List",
"org.intermine.pathquery.ConstraintValueParser"
] | import java.util.ArrayList; import java.util.Date; import java.util.List; import org.intermine.pathquery.ConstraintValueParser; | import java.util.*; import org.intermine.pathquery.*; | [
"java.util",
"org.intermine.pathquery"
] | java.util; org.intermine.pathquery; | 1,143,486 |
private void translateEvents(UsbIoBuf b) {
// System.out.println("buf has "+b.BytesTransferred+" bytes");
synchronized (aePacketRawPool) {
AEPacketRaw buffer = aePacketRawPool.writeBuffer();
if (buffer.overrunOccuredFlag) {
return; // don't bother if there... | void function(UsbIoBuf b) { synchronized (aePacketRawPool) { AEPacketRaw buffer = aePacketRawPool.writeBuffer(); if (buffer.overrunOccuredFlag) { return; } int shortts; byte[] aeBuffer = b.BufferMem; int bytesSent = b.BytesTransferred; if ((bytesSent % 4) != 0) { log.warning(STR + bytesSent + STR); bytesSent = (bytesSe... | /** Does the translation, timestamp unwrapping and reset
* @param b the raw buffer
*/ | Does the translation, timestamp unwrapping and reset | translateEvents | {
"repo_name": "viktorbahr/jaer",
"path": "src/net/sf/jaer/hardwareinterface/usb/silabs/SiLabsC8051F320_USBIO_DVS128.java",
"license": "lgpl-2.1",
"size": 38444
} | [
"de.thesycon.usbio.UsbIoBuf",
"net.sf.jaer.aemonitor.AEPacketRaw"
] | import de.thesycon.usbio.UsbIoBuf; import net.sf.jaer.aemonitor.AEPacketRaw; | import de.thesycon.usbio.*; import net.sf.jaer.aemonitor.*; | [
"de.thesycon.usbio",
"net.sf.jaer"
] | de.thesycon.usbio; net.sf.jaer; | 1,259,705 |
private int computeDragPosition(int y)
{
// This assumes uniform height for all non-header rows
int firstVisible = getFirstVisiblePosition();
int topPos = Math.max(getHeaderViewsCount(), firstVisible);
int dragHeight = mRowHeight;
View view = getChildAt(topPos - firstVisible);
int viewMiddle = view.getT... | int function(int y) { int firstVisible = getFirstVisiblePosition(); int topPos = Math.max(getHeaderViewsCount(), firstVisible); int dragHeight = mRowHeight; View view = getChildAt(topPos - firstVisible); int viewMiddle = view.getTop() + dragHeight / 2; int dragPos = Math.min(getCount() - 1, topPos + Math.max(0, y - vie... | /**
* Computes the drag position based on where the drag view is hovering.
* Expands views and updates scrolling when this position changes.
*
* @param y The y coordinate of the top of the drag view.
* @return The scrolling speed in pixels
*/ | Computes the drag position based on where the drag view is hovering. Expands views and updates scrolling when this position changes | computeDragPosition | {
"repo_name": "Lsync/vanilindy",
"path": "StudioProject/app/src/main/java/ch/blinkenlights/android/vanilla/DragListView.java",
"license": "apache-2.0",
"size": 12640
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 1,815,294 |
@Beta
Map<String, WorkflowNodeState> getNodeStates(); | Map<String, WorkflowNodeState> getNodeStates(); | /**
* Return an immutable {@link Map} of node ids to {@link WorkflowNodeState}. This can be used
* from {@link AbstractWorkflow#destroy} method to determine the status of all nodes
* executed by the Workflow in the current run.
*/ | Return an immutable <code>Map</code> of node ids to <code>WorkflowNodeState</code>. This can be used from <code>AbstractWorkflow#destroy</code> method to determine the status of all nodes executed by the Workflow in the current run | getNodeStates | {
"repo_name": "caskdata/cdap",
"path": "cdap-api/src/main/java/co/cask/cdap/api/workflow/WorkflowContext.java",
"license": "apache-2.0",
"size": 3208
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 633,906 |
private void removeLogicalRouters(IResource resource, VCPENetworkModel desiredScenario) throws ResourceException {
Router phy1 = (Router) VCPENetworkModelHelper.getElementByTemplateName(desiredScenario, SPTemplateConstants.CPE1_PHY_ROUTER);
Router lr1 = (Router) VCPENetworkModelHelper.getElementByTemplateName(de... | void function(IResource resource, VCPENetworkModel desiredScenario) throws ResourceException { Router phy1 = (Router) VCPENetworkModelHelper.getElementByTemplateName(desiredScenario, SPTemplateConstants.CPE1_PHY_ROUTER); Router lr1 = (Router) VCPENetworkModelHelper.getElementByTemplateName(desiredScenario, SPTemplateCo... | /**
* Remove the logical routers from the physical router configuration
*
* @param resource
* @param desiredScenario
* @throws ResourceException
*/ | Remove the logical routers from the physical router configuration | removeLogicalRouters | {
"repo_name": "dana-i2cat/opennaas-routing-nfv",
"path": "extensions/bundles/vcpe/src/main/java/org/opennaas/extensions/vcpe/capability/builder/builders/sp/VCPESingleProvider.java",
"license": "lgpl-3.0",
"size": 20806
} | [
"org.opennaas.core.resources.IResource",
"org.opennaas.core.resources.ResourceException",
"org.opennaas.extensions.vcpe.capability.builder.builders.helpers.LogicalRouterHelper",
"org.opennaas.extensions.vcpe.manager.templates.sp.SPTemplateConstants",
"org.opennaas.extensions.vcpe.model.Router",
"org.openn... | import org.opennaas.core.resources.IResource; import org.opennaas.core.resources.ResourceException; import org.opennaas.extensions.vcpe.capability.builder.builders.helpers.LogicalRouterHelper; import org.opennaas.extensions.vcpe.manager.templates.sp.SPTemplateConstants; import org.opennaas.extensions.vcpe.model.Router;... | import org.opennaas.core.resources.*; import org.opennaas.extensions.vcpe.capability.builder.builders.helpers.*; import org.opennaas.extensions.vcpe.manager.templates.sp.*; import org.opennaas.extensions.vcpe.model.*; import org.opennaas.extensions.vcpe.model.helper.*; | [
"org.opennaas.core",
"org.opennaas.extensions"
] | org.opennaas.core; org.opennaas.extensions; | 1,724,603 |
public void updateContent(UpstreamSession session, CachedWindow window); | void function(UpstreamSession session, CachedWindow window); | /**
* Update a window's content.
* @param session
* @param window
*/ | Update a window's content | updateContent | {
"repo_name": "WeaveMN/DragonProxy",
"path": "src/main/java/org/dragonet/proxy/network/translator/InventoryTranslator.java",
"license": "gpl-3.0",
"size": 1174
} | [
"org.dragonet.proxy.network.UpstreamSession",
"org.dragonet.proxy.network.cache.CachedWindow"
] | import org.dragonet.proxy.network.UpstreamSession; import org.dragonet.proxy.network.cache.CachedWindow; | import org.dragonet.proxy.network.*; import org.dragonet.proxy.network.cache.*; | [
"org.dragonet.proxy"
] | org.dragonet.proxy; | 148,093 |
List<ExperimenterData> copyExperimenters(GroupData group,
Collection experimenters)
throws DSOutOfServiceException, DSAccessException
{
isSessionAlive();
List<ExperimenterData> r = new ArrayList<ExperimenterData>();
IAdminPrx svc = getAdminService();
if (svc == null) svc = getAdminService();
Iterato... | List<ExperimenterData> copyExperimenters(GroupData group, Collection experimenters) throws DSOutOfServiceException, DSAccessException { isSessionAlive(); List<ExperimenterData> r = new ArrayList<ExperimenterData>(); IAdminPrx svc = getAdminService(); if (svc == null) svc = getAdminService(); Iterator<ExperimenterData> ... | /**
* Copies the experimenter to the specified group.
* Returns the experimenters that could not be copied.
*
* @param group The group to add the experimenters to.
* @param experimenters The experimenters to add.
* @return See above.
* @throws DSOutOfServiceException If the connection is broken, or logg... | Copies the experimenter to the specified group. Returns the experimenters that could not be copied | copyExperimenters | {
"repo_name": "joshmoore/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/env/data/OMEROGateway.java",
"license": "gpl-2.0",
"size": 264705
} | [
"java.util.ArrayList",
"java.util.Collection",
"java.util.Iterator",
"java.util.List"
] | import java.util.ArrayList; import java.util.Collection; import java.util.Iterator; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 854,332 |
public static void setInitialSystemStatus(List<Long> systemSelectIds, Long userId) {
Connection con = null;
try {
con = DBUtils.getConn();
//deletes all old systems
deleteAllSystemStatus(con,userId);
for (Long hostSystemId : systemSelectIds) {
... | static void function(List<Long> systemSelectIds, Long userId) { Connection con = null; try { con = DBUtils.getConn(); deleteAllSystemStatus(con,userId); for (Long hostSystemId : systemSelectIds) { HostSystem hostSystem= new HostSystem(); hostSystem.setId(hostSystemId); hostSystem.setStatusCd(HostSystem.INITIAL_STATUS);... | /**
* set the initial status for selected systems
*
* @param systemSelectIds systems ids to set initial status
* @param userId user id
*/ | set the initial status for selected systems | setInitialSystemStatus | {
"repo_name": "skavanagh/KeyBox-OpenShift",
"path": "src/main/java/com/keybox/manage/db/SystemStatusDB.java",
"license": "apache-2.0",
"size": 9247
} | [
"com.keybox.manage.model.HostSystem",
"com.keybox.manage.util.DBUtils",
"java.sql.Connection",
"java.util.List"
] | import com.keybox.manage.model.HostSystem; import com.keybox.manage.util.DBUtils; import java.sql.Connection; import java.util.List; | import com.keybox.manage.model.*; import com.keybox.manage.util.*; import java.sql.*; import java.util.*; | [
"com.keybox.manage",
"java.sql",
"java.util"
] | com.keybox.manage; java.sql; java.util; | 1,562,341 |
private void dialogQueryBestellung() throws Throwable {
Integer besIId = null;
if (bestellungDto != null) {
besIId = bestellungDto.getIId();
}
FilterKriterium[] fk;
if (getTabbedPane().getLieferantDto() != null) {
fk = BestellungFilterFactory.getInstance()
.getFKBestellungenEinesLieferanten(
... | void function() throws Throwable { Integer besIId = null; if (bestellungDto != null) { besIId = bestellungDto.getIId(); } FilterKriterium[] fk; if (getTabbedPane().getLieferantDto() != null) { fk = BestellungFilterFactory.getInstance() .getFKBestellungenEinesLieferanten( getTabbedPane().getLieferantDto().getIId()); } e... | /**
* Dialogfenster zur Bestellungauswahl.
*
* @throws Throwable
*/ | Dialogfenster zur Bestellungauswahl | dialogQueryBestellung | {
"repo_name": "erdincay/lpclientpc",
"path": "src/com/lp/client/eingangsrechnung/PanelEingangsrechnungKopfdaten.java",
"license": "agpl-3.0",
"size": 86936
} | [
"com.lp.client.bestellung.BestellungFilterFactory",
"com.lp.client.frame.component.DialogQuery",
"com.lp.client.system.SystemFilterFactory",
"com.lp.server.util.fastlanereader.service.query.FilterKriterium"
] | import com.lp.client.bestellung.BestellungFilterFactory; import com.lp.client.frame.component.DialogQuery; import com.lp.client.system.SystemFilterFactory; import com.lp.server.util.fastlanereader.service.query.FilterKriterium; | import com.lp.client.bestellung.*; import com.lp.client.frame.component.*; import com.lp.client.system.*; import com.lp.server.util.fastlanereader.service.query.*; | [
"com.lp.client",
"com.lp.server"
] | com.lp.client; com.lp.server; | 1,430,588 |
public void setPlaylist(Vector<Song> playlist) {
this.playlist = playlist;
} | void function(Vector<Song> playlist) { this.playlist = playlist; } | /**
* Sets the current playlist.
* @param playlist A Vector of Song objects.
*/ | Sets the current playlist | setPlaylist | {
"repo_name": "Raven24/AutoDJ",
"path": "src/AutoDJ/AutoDJModel.java",
"license": "gpl-3.0",
"size": 4855
} | [
"java.util.Vector"
] | import java.util.Vector; | import java.util.*; | [
"java.util"
] | java.util; | 309,212 |
private long calculateOrderIndexCost(ArrayList<FromItem> costItems,
ArrayList<Expr> andProduct)
{
long cost = Long.MAX_VALUE;
int count = 0;
for (int k = 0; k < andProduct.size(); k++) {
Expr expr = andProduct.get(k);
long subCost = expr.indexCost... | long function(ArrayList<FromItem> costItems, ArrayList<Expr> andProduct) { long cost = Long.MAX_VALUE; int count = 0; for (int k = 0; k < andProduct.size(); k++) { Expr expr = andProduct.get(k); long subCost = expr.indexCost(costItems); if (subCost < cost) { cost = subCost; count = 0; } else if (subCost == cost) { coun... | /**
* Calculates index bonus costs.
*/ | Calculates index bonus costs | calculateOrderIndexCost | {
"repo_name": "WelcomeHUME/svn-caucho-com-resin",
"path": "modules/resin/src/com/caucho/db/sql/Query.java",
"license": "gpl-2.0",
"size": 24095
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 2,910,701 |
@ServiceMethod(returns = ReturnType.COLLECTION)
private PagedFlux<ReservationSummaryInner> listAsync(String scope, Datagrain grain) {
final String startDate = null;
final String endDate = null;
final String filter = null;
final String reservationId = null;
final String re... | @ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux<ReservationSummaryInner> function(String scope, Datagrain grain) { final String startDate = null; final String endDate = null; final String filter = null; final String reservationId = null; final String reservationOrderId = null; return new PagedFlux<>( () -> li... | /**
* Lists the reservations summaries for the defined scope daily or monthly grain.
*
* @param scope The scope associated with reservations summaries operations. This includes
* '/providers/Microsoft.Billing/billingAccounts/{billingAccountId}' for BillingAccount scope (legacy), and
* '... | Lists the reservations summaries for the defined scope daily or monthly grain | listAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/consumption/azure-resourcemanager-consumption/src/main/java/com/azure/resourcemanager/consumption/implementation/ReservationsSummariesClientImpl.java",
"license": "mit",
"size": 53960
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedFlux",
"com.azure.resourcemanager.consumption.fluent.models.ReservationSummaryInner",
"com.azure.resourcemanager.consumption.models.Datagrain"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedFlux; import com.azure.resourcemanager.consumption.fluent.models.ReservationSummaryInner; import com.azure.resourcemanager.consumption.models.Datagrain; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.consumption.fluent.models.*; import com.azure.resourcemanager.consumption.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 589,490 |
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
BulkRecipientsUpdateResponse bulkRecipientsUpdateResponse = (BulkRecipientsUpdateResponse) o;
return Objects.equals(this.signer, bu... | boolean function(java.lang.Object o) { if (this == o) { return true; } if (o == null getClass() != o.getClass()) { return false; } BulkRecipientsUpdateResponse bulkRecipientsUpdateResponse = (BulkRecipientsUpdateResponse) o; return Objects.equals(this.signer, bulkRecipientsUpdateResponse.signer); } | /**
* Compares objects.
*
* @return true or false depending on comparison result.
*/ | Compares objects | equals | {
"repo_name": "docusign/docusign-java-client",
"path": "src/main/java/com/docusign/esign/model/BulkRecipientsUpdateResponse.java",
"license": "mit",
"size": 2127
} | [
"java.util.Objects"
] | import java.util.Objects; | import java.util.*; | [
"java.util"
] | java.util; | 1,138,628 |
byte[] getWSDL() throws APIMgtWSDLException; | byte[] getWSDL() throws APIMgtWSDLException; | /**
* This method will be called after initialization of the processor by {@link #init(byte[])}.
* Retrieves the current WSDL's content bytes.
*
* @return Content bytes of the current state of the WSDL
* @throws APIMgtWSDLException error while reading WSDL content
*/ | This method will be called after initialization of the processor by <code>#init(byte[])</code>. Retrieves the current WSDL's content bytes | getWSDL | {
"repo_name": "dewmini/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.core/src/main/java/org/wso2/carbon/apimgt/core/api/WSDLProcessor.java",
"license": "apache-2.0",
"size": 4059
} | [
"org.wso2.carbon.apimgt.core.exception.APIMgtWSDLException"
] | import org.wso2.carbon.apimgt.core.exception.APIMgtWSDLException; | import org.wso2.carbon.apimgt.core.exception.*; | [
"org.wso2.carbon"
] | org.wso2.carbon; | 2,878,107 |
public static SilverpeasLook getSilverpeasLook() {
return ServiceProvider.getService(SilverpeasLook.class);
} | static SilverpeasLook function() { return ServiceProvider.getService(SilverpeasLook.class); } | /**
* Gets the look of Silverpeas.
* @return an instance representing the current look of the Silverpeas application.
*/ | Gets the look of Silverpeas | getSilverpeasLook | {
"repo_name": "SilverDav/Silverpeas-Core",
"path": "core-web/src/main/java/org/silverpeas/core/web/look/SilverpeasLook.java",
"license": "agpl-3.0",
"size": 8964
} | [
"org.silverpeas.core.util.ServiceProvider"
] | import org.silverpeas.core.util.ServiceProvider; | import org.silverpeas.core.util.*; | [
"org.silverpeas.core"
] | org.silverpeas.core; | 1,035,041 |
public static <E extends Enum<E>> Set<E> asUnmodifiableEnumSet( E... values )
{
Objects.requireNonNull( values );
return Collections.unmodifiableSet( EnumSet.<E>of( values[0], Arrays.copyOfRange( values, 1, values.length ) ) );
} | static <E extends Enum<E>> Set<E> function( E... values ) { Objects.requireNonNull( values ); return Collections.unmodifiableSet( EnumSet.<E>of( values[0], Arrays.copyOfRange( values, 1, values.length ) ) ); } | /**
* Return an unmodifiable set of enum values
* <p>
* @param <E>
* @param values
* <p>
* @return
*/ | Return an unmodifiable set of enum values | asUnmodifiableEnumSet | {
"repo_name": "peter-mount/opendata-common",
"path": "core/src/main/java/uk/trainwatch/util/CollectionUtils.java",
"license": "apache-2.0",
"size": 15855
} | [
"java.util.Arrays",
"java.util.Collections",
"java.util.EnumSet",
"java.util.Objects",
"java.util.Set"
] | import java.util.Arrays; import java.util.Collections; import java.util.EnumSet; import java.util.Objects; import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,658,341 |
protected native static long LASPoint_GetRawZ(@Ptr long hPoint);
public static IntValuedEnum<LiblasLibrary.LASError > LASPoint_SetRawZ(LiblasLibrary.LASPointH hPoint, @CLong long value) {
return FlagSet.fromValue(LASPoint_SetRawZ(Pointer.getPeer(hPoint), value), LiblasLibrary.LASError.class);
} | native static long LASPoint_GetRawZ(@Ptr long hPoint); public static IntValuedEnum<LiblasLibrary.LASError > function(LiblasLibrary.LASPointH hPoint, @CLong long value) { return FlagSet.fromValue(LASPoint_SetRawZ(Pointer.getPeer(hPoint), value), LiblasLibrary.LASError.class); } | /**
* Sets the raw Z value for the point. This value will be scaled and offset <br>
* by any header values to get interpreted values (double GetZ())<br>
* @param hPoint the opaque pointer to the LASPointH instance<br>
* @param value the double value to set for the raw Z value of the point<br>
* @return a... | Sets the raw Z value for the point. This value will be scaled and offset by any header values to get interpreted values (double GetZ()) | LASPoint_SetRawZ | {
"repo_name": "petvana/las-bridj",
"path": "src/main/java/com/github/petvana/liblas/jna/LiblasLibrary.java",
"license": "bsd-3-clause",
"size": 116212
} | [
"org.bridj.FlagSet",
"org.bridj.IntValuedEnum",
"org.bridj.Pointer",
"org.bridj.ann.CLong",
"org.bridj.ann.Ptr"
] | import org.bridj.FlagSet; import org.bridj.IntValuedEnum; import org.bridj.Pointer; import org.bridj.ann.CLong; import org.bridj.ann.Ptr; | import org.bridj.*; import org.bridj.ann.*; | [
"org.bridj",
"org.bridj.ann"
] | org.bridj; org.bridj.ann; | 1,558,039 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.