method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
protected void attachSortClause(SolrQuery query, ProductSearchCriteria searchCriteria, String defaultSort) { Map<String, String> solrFieldKeyMap = getSolrFieldKeyMap(searchCriteria); String sortQuery = searchCriteria.getSortQuery(); if (StringUtils.isBlank(sortQuery)) { sortQuer...
void function(SolrQuery query, ProductSearchCriteria searchCriteria, String defaultSort) { Map<String, String> solrFieldKeyMap = getSolrFieldKeyMap(searchCriteria); String sortQuery = searchCriteria.getSortQuery(); if (StringUtils.isBlank(sortQuery)) { sortQuery = defaultSort; } if (StringUtils.isNotBlank(sortQuery)) {...
/** * Sets up the sorting criteria. This will support sorting by multiple fields at a time * * @param query * @param searchCriteria */
Sets up the sorting criteria. This will support sorting by multiple fields at a time
attachSortClause
{ "repo_name": "shopizer/BroadleafCommerce", "path": "core/broadleaf-framework/src/main/java/org/broadleafcommerce/core/search/service/solr/SolrSearchServiceImpl.java", "license": "apache-2.0", "size": 36637 }
[ "java.util.Map", "org.apache.commons.lang.StringUtils", "org.apache.solr.client.solrj.SolrQuery", "org.broadleafcommerce.core.search.domain.ProductSearchCriteria" ]
import java.util.Map; import org.apache.commons.lang.StringUtils; import org.apache.solr.client.solrj.SolrQuery; import org.broadleafcommerce.core.search.domain.ProductSearchCriteria;
import java.util.*; import org.apache.commons.lang.*; import org.apache.solr.client.solrj.*; import org.broadleafcommerce.core.search.domain.*;
[ "java.util", "org.apache.commons", "org.apache.solr", "org.broadleafcommerce.core" ]
java.util; org.apache.commons; org.apache.solr; org.broadleafcommerce.core;
864,281
interface WithPolicyDefinitions { WithCreate withPolicyDefinitions(List<PolicyDefinitionReference> policyDefinitions); }
interface WithPolicyDefinitions { WithCreate withPolicyDefinitions(List<PolicyDefinitionReference> policyDefinitions); }
/** * Specifies policyDefinitions. */
Specifies policyDefinitions
withPolicyDefinitions
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/policy/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/policy/v2018_03_01/PolicySetDefinition.java", "license": "mit", "size": 6436 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,010,355
@Override public int tightMarshal1(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { ConsumerControl info = (ConsumerControl) o; int rc = super.tightMarshal1(wireFormat, o, bs); bs.writeBoolean(info.isClose()); rc += tightMarshalNestedObject1(wireFormat...
int function(OpenWireFormat wireFormat, Object o, BooleanStream bs) throws IOException { ConsumerControl info = (ConsumerControl) o; int rc = super.tightMarshal1(wireFormat, o, bs); bs.writeBoolean(info.isClose()); rc += tightMarshalNestedObject1(wireFormat, info.getConsumerId(), bs); bs.writeBoolean(info.isFlush()); b...
/** * Write the booleans that this object uses to a BooleanStream */
Write the booleans that this object uses to a BooleanStream
tightMarshal1
{ "repo_name": "apache/activemq-openwire", "path": "openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v4/ConsumerControlMarshaller.java", "license": "apache-2.0", "size": 5258 }
[ "java.io.IOException", "org.apache.activemq.openwire.codec.BooleanStream", "org.apache.activemq.openwire.codec.OpenWireFormat", "org.apache.activemq.openwire.commands.ConsumerControl" ]
import java.io.IOException; import org.apache.activemq.openwire.codec.BooleanStream; import org.apache.activemq.openwire.codec.OpenWireFormat; import org.apache.activemq.openwire.commands.ConsumerControl;
import java.io.*; import org.apache.activemq.openwire.codec.*; import org.apache.activemq.openwire.commands.*;
[ "java.io", "org.apache.activemq" ]
java.io; org.apache.activemq;
2,141,738
BigDecimal getBigDecimal(int columnIndex) throws InvalidResultSetAccessException;
BigDecimal getBigDecimal(int columnIndex) throws InvalidResultSetAccessException;
/** * Retrieves the value of the indicated column in the current row as * an BigDecimal object. * @param columnIndex the column index * @return an BigDecimal object representing the column value * @see java.sql.ResultSet#getBigDecimal(int) */
Retrieves the value of the indicated column in the current row as an BigDecimal object
getBigDecimal
{ "repo_name": "ftomassetti/effectivejava", "path": "test-resources/sample-codebases/spring-jdbc/src/main/java/org/springframework/jdbc/support/rowset/SqlRowSet.java", "license": "apache-2.0", "size": 17476 }
[ "java.math.BigDecimal", "org.springframework.jdbc.InvalidResultSetAccessException" ]
import java.math.BigDecimal; import org.springframework.jdbc.InvalidResultSetAccessException;
import java.math.*; import org.springframework.jdbc.*;
[ "java.math", "org.springframework.jdbc" ]
java.math; org.springframework.jdbc;
445,378
private int getNotificationId(String downloadGuid) { DownloadSharedPreferenceEntry entry = getDownloadSharedPreferenceEntry(downloadGuid); if (entry != null) return entry.notificationId; int notificationId = mNextNotificationId; mNextNotificationId = mNextNotificationId == Integer.MA...
int function(String downloadGuid) { DownloadSharedPreferenceEntry entry = getDownloadSharedPreferenceEntry(downloadGuid); if (entry != null) return entry.notificationId; int notificationId = mNextNotificationId; mNextNotificationId = mNextNotificationId == Integer.MAX_VALUE ? STARTING_NOTIFICATION_ID : mNextNotificatio...
/** * Return the notification ID for the given download GUID. * @return notification ID to be used. */
Return the notification ID for the given download GUID
getNotificationId
{ "repo_name": "danakj/chromium", "path": "chrome/android/java/src/org/chromium/chrome/browser/download/DownloadNotificationService.java", "license": "bsd-3-clause", "size": 33659 }
[ "android.content.SharedPreferences" ]
import android.content.SharedPreferences;
import android.content.*;
[ "android.content" ]
android.content;
963,512
private void addRef(final CourseNode courseNode, final OLATResourceable resourceable) { ReferenceManager.getInstance().addReference(course, resourceable, courseNode.getIdent()); }
void function(final CourseNode courseNode, final OLATResourceable resourceable) { ReferenceManager.getInstance().addReference(course, resourceable, courseNode.getIdent()); }
/** * Add reference to resourceable held by courseNode. * * @param courseNode * @param resourceable */
Add reference to resourceable held by courseNode
addRef
{ "repo_name": "RLDevOps/Demo", "path": "src/main/java/org/olat/course/editor/PublishProcess.java", "license": "apache-2.0", "size": 31081 }
[ "org.olat.core.id.OLATResourceable", "org.olat.course.nodes.CourseNode", "org.olat.resource.references.ReferenceManager" ]
import org.olat.core.id.OLATResourceable; import org.olat.course.nodes.CourseNode; import org.olat.resource.references.ReferenceManager;
import org.olat.core.id.*; import org.olat.course.nodes.*; import org.olat.resource.references.*;
[ "org.olat.core", "org.olat.course", "org.olat.resource" ]
org.olat.core; org.olat.course; org.olat.resource;
314,638
protected void sequence_UiBindingEndpointAssignment(EObject context, UiBindingEndpointAssignment semanticObject) { genericSequencer.createSequence(context, semanticObject); }
void function(EObject context, UiBindingEndpointAssignment semanticObject) { genericSequencer.createSequence(context, semanticObject); }
/** * Constraint: * ( * (typedBindableDef=UiBindingEndpointAssignment_UiBindingEndpointAssignment_0_1 path=UiPathSegment?) | * typedBindableDef=UiBindingEndpointAssignment_UiBindingEndpointAssignment_0_1 | * typedBindableDef=UiBindingEndpointAssignment_UiBindingEndpointAssignment...
Constraint: ( (typedBindableDef=UiBindingEndpointAssignment_UiBindingEndpointAssignment_0_1 path=UiPathSegment?) | typedBindableDef=UiBindingEndpointAssignment_UiBindingEndpointAssignment_0_1 | typedBindableDef=UiBindingEndpointAssignment_UiBindingEndpointAssignment_1_1 | (typedBindableAlias=[UiTypedBindable|ID] path=U...
sequence_UiBindingEndpointAssignment
{ "repo_name": "lunifera/lunifera-ecview-addons", "path": "org.lunifera.ecview.dsl/src-gen/org/lunifera/ecview/dsl/serializer/UIGrammarSemanticSequencer.java", "license": "epl-1.0", "size": 151691 }
[ "org.eclipse.emf.ecore.EObject", "org.lunifera.ecview.semantic.uimodel.UiBindingEndpointAssignment" ]
import org.eclipse.emf.ecore.EObject; import org.lunifera.ecview.semantic.uimodel.UiBindingEndpointAssignment;
import org.eclipse.emf.ecore.*; import org.lunifera.ecview.semantic.uimodel.*;
[ "org.eclipse.emf", "org.lunifera.ecview" ]
org.eclipse.emf; org.lunifera.ecview;
2,916,190
public static GScene readGScene(String file, String postProcess, boolean adjustBindPoses) { GScene gscene = null; try { if (file.endsWith(".dae") || file.endsWith(".DAE")) { Collada col = null; if (file.startsWith("file:")) ...
static GScene function(String file, String postProcess, boolean adjustBindPoses) { GScene gscene = null; try { if (file.endsWith(".dae") file.endsWith(".DAE")) { Collada col = null; if (file.startsWith("file:")) { col = Collada.forURL(file); } else { col = Collada.forResource(file); } if (col == null) throw new Runtime...
/** * Reads a GScene from the specified file. * postProcess can be one of the predefined processing modes, for setting HAnim poses. * The file type, derived from the postfix, determines whether to read a Collada file * (.dae or .DAE) or a binaray file (.bin) */
Reads a GScene from the specified file. postProcess can be one of the predefined processing modes, for setting HAnim poses. The file type, derived from the postfix, determines whether to read a Collada file (.dae or .DAE) or a binaray file (.bin)
readGScene
{ "repo_name": "ArticulatedSocialAgentsPlatform/HmiCore", "path": "HmiGraphics/src/hmi/graphics/util/SceneIO.java", "license": "lgpl-3.0", "size": 9202 }
[ "java.io.BufferedInputStream", "java.io.DataInputStream", "java.io.InputStream" ]
import java.io.BufferedInputStream; import java.io.DataInputStream; import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
2,145,507
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<SupportTicketDetailsInner>> getWithResponseAsync(String supportTicketName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( ...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<SupportTicketDetailsInner>> function(String supportTicketName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (supportTicketName == null) { return Mono .error(new IllegalArgumentException...
/** * Get ticket details for an Azure subscription. Support ticket data is available for 18 months after ticket * creation. If a ticket was created more than 18 months ago, a request for data might cause an error. * * @param supportTicketName Support ticket name. * @param context The context to...
Get ticket details for an Azure subscription. Support ticket data is available for 18 months after ticket creation. If a ticket was created more than 18 months ago, a request for data might cause an error
getWithResponseAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/support/azure-resourcemanager-support/src/main/java/com/azure/resourcemanager/support/implementation/SupportTicketsClientImpl.java", "license": "mit", "size": 77733 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.Context", "com.azure.resourcemanager.support.fluent.models.SupportTicketDetailsInner" ]
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 com.azure.resourcemanager.support.fluent.models.SupportTicketDetailsInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.support.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,132,136
private void handleUniqueAdd(final UniqueID inID) { uniqueIDs.add(inID); if (removed.contains(inID)) { removed.remove(inID); } else { added.add(inID); } }
void function(final UniqueID inID) { uniqueIDs.add(inID); if (removed.contains(inID)) { removed.remove(inID); } else { added.add(inID); } }
/** * Add to unique IDs and checks whether the item to add has been removed * before. * * @param inID * UniqueID */
Add to unique IDs and checks whether the item to add has been removed before
handleUniqueAdd
{ "repo_name": "aktion-hip/relations", "path": "org.elbe.relations/src/org/elbe/relations/models/AbstractAssociationsModel.java", "license": "gpl-3.0", "size": 12774 }
[ "org.elbe.relations.data.utility.UniqueID" ]
import org.elbe.relations.data.utility.UniqueID;
import org.elbe.relations.data.utility.*;
[ "org.elbe.relations" ]
org.elbe.relations;
2,607,346
public void setAnnotationList(FSArray v) { if (Annotation_Type.featOkTst && ((Annotation_Type)jcasType).casFeat_annotationList == null) jcasType.jcas.throwFeatMissing("annotationList", "common.types.text.Annotation"); jcasType.ll_cas.ll_setRefValue(addr, ((Annotation_Type)jcasType).casFeatCode_annotatio...
void function(FSArray v) { if (Annotation_Type.featOkTst && ((Annotation_Type)jcasType).casFeat_annotationList == null) jcasType.jcas.throwFeatMissing(STR, STR); jcasType.ll_cas.ll_setRefValue(addr, ((Annotation_Type)jcasType).casFeatCode_annotationList, jcasType.ll_cas.ll_getFSRef(v));}
/** setter for annotationList - sets example: chunk may be made of several other ordered chunks a multi-word term may be made of several ordered words * @generated * @param v value to set into the feature */
setter for annotationList - sets example:
setAnnotationList
{ "repo_name": "nicolashernandez/dev-star", "path": "uima-star/uima-common-types/src/main/java/common/types/text/Annotation.java", "license": "apache-2.0", "size": 4958 }
[ "org.apache.uima.jcas.cas.FSArray" ]
import org.apache.uima.jcas.cas.FSArray;
import org.apache.uima.jcas.cas.*;
[ "org.apache.uima" ]
org.apache.uima;
2,840,817
public void serialize( Document doc ) throws IOException { reset(); prepare(); serializeNode( doc ); serializePreRoot(); _printer.flush(); if ( _printer.getException() != null ) throw _printer.getException(); } //---------------------...
void function( Document doc ) throws IOException { reset(); prepare(); serializeNode( doc ); serializePreRoot(); _printer.flush(); if ( _printer.getException() != null ) throw _printer.getException(); }
/** * Serializes the DOM document using the previously specified * writer and output format. Throws an exception only if * an I/O exception occured while serializing. * * @param doc The document to serialize * @throws IOException An I/O exception occured while * serializing */
Serializes the DOM document using the previously specified writer and output format. Throws an exception only if an I/O exception occured while serializing
serialize
{ "repo_name": "srnsw/xena", "path": "xena/ext/src/xerces-2_9_1/src/org/apache/xml/serialize/BaseMarkupSerializer.java", "license": "gpl-3.0", "size": 61682 }
[ "java.io.IOException", "org.w3c.dom.Document" ]
import java.io.IOException; import org.w3c.dom.Document;
import java.io.*; import org.w3c.dom.*;
[ "java.io", "org.w3c.dom" ]
java.io; org.w3c.dom;
1,936,204
protected void onSetRowStatus(RowPresenter presenter, RowPresenter.ViewHolder viewHolder, int adapterPosition, int selectedPosition, int selectedSubPosition) { if (presenter instanceof FullWidthDetailsOverviewRowPresenter) { onSetDetailsOverviewRowStatus((FullWidthDetailsOverviewRowP...
void function(RowPresenter presenter, RowPresenter.ViewHolder viewHolder, int adapterPosition, int selectedPosition, int selectedSubPosition) { if (presenter instanceof FullWidthDetailsOverviewRowPresenter) { onSetDetailsOverviewRowStatus((FullWidthDetailsOverviewRowPresenter) presenter, (FullWidthDetailsOverviewRowPre...
/** * Called on every visible row to change view status when current selected row position * or selected sub position changed. Subclass may override. The default * implementation calls {@link #onSetDetailsOverviewRowStatus(FullWidthDetailsOverviewRowPresenter, * FullWidthDetailsOverviewRowPresent...
Called on every visible row to change view status when current selected row position or selected sub position changed. Subclass may override. The default implementation calls <code>#onSetDetailsOverviewRowStatus(FullWidthDetailsOverviewRowPresenter, FullWidthDetailsOverviewRowPresenter.ViewHolder, int, int, int)</code>...
onSetRowStatus
{ "repo_name": "AndroidX/androidx", "path": "leanback/leanback/src/main/java/androidx/leanback/app/DetailsFragment.java", "license": "apache-2.0", "size": 41358 }
[ "androidx.leanback.widget.FullWidthDetailsOverviewRowPresenter", "androidx.leanback.widget.RowPresenter" ]
import androidx.leanback.widget.FullWidthDetailsOverviewRowPresenter; import androidx.leanback.widget.RowPresenter;
import androidx.leanback.widget.*;
[ "androidx.leanback" ]
androidx.leanback;
1,702,907
public static final YearExtensionAround getLatest(int currentYear){ return new YearExtensionAround(LATEST_ALLOWED_YEARS_IN_PAST, currentYear); } private static final int CENTURY_ALLOWED_YEARS_IN_PAST = 0; private static final int CENTURY_1900_START = 1900; public static final YearExtensionAround CENTURY_19...
static final YearExtensionAround function(int currentYear){ return new YearExtensionAround(LATEST_ALLOWED_YEARS_IN_PAST, currentYear); } private static final int CENTURY_ALLOWED_YEARS_IN_PAST = 0; private static final int CENTURY_1900_START = 1900; public static final YearExtensionAround CENTURY_1900 = new YearExtensio...
/** * Extend a two digit year to the nearest year that ends in * those two digits. * <p> * When it is the year 2000: * <ul> * <li> 01 to 1901 * <li> 49 to 1949 * <li> 50 to 1950 * <li> 99 to 1999 * <li> 00 to 2000 * </ul> * * @param currentYear the current year * @since ostermillerutils 1.08...
Extend a two digit year to the nearest year that ends in those two digits. When it is the year 2000: 01 to 1901 49 to 1949 50 to 1950 99 to 1999 00 to 2000
getLatest
{ "repo_name": "stephenostermiller/ostermillerutils", "path": "src/main/java/com/Ostermiller/util/YearExtensionAround.java", "license": "gpl-2.0", "size": 5565 }
[ "java.util.Calendar" ]
import java.util.Calendar;
import java.util.*;
[ "java.util" ]
java.util;
1,202,127
Set<URI> getIgnoreTypes();
Set<URI> getIgnoreTypes();
/** * Always ignore these classes when generating a view * @return List<URI> Classes to ignore */
Always ignore these classes when generating a view
getIgnoreTypes
{ "repo_name": "JervenBolleman/lodestar", "path": "lode-core-api/src/main/java/uk/ac/ebi/fgpt/lode/model/ExplorerViewConfiguration.java", "license": "apache-2.0", "size": 1899 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
598,059
public AzureBlobStorageLinkedService withSasToken(AzureKeyVaultSecretReference sasToken) { if (this.innerTypeProperties() == null) { this.innerTypeProperties = new AzureBlobStorageLinkedServiceTypeProperties(); } this.innerTypeProperties().withSasToken(sasToken); return t...
AzureBlobStorageLinkedService function(AzureKeyVaultSecretReference sasToken) { if (this.innerTypeProperties() == null) { this.innerTypeProperties = new AzureBlobStorageLinkedServiceTypeProperties(); } this.innerTypeProperties().withSasToken(sasToken); return this; }
/** * Set the sasToken property: The Azure key vault secret reference of sasToken in sas uri. * * @param sasToken the sasToken value to set. * @return the AzureBlobStorageLinkedService object itself. */
Set the sasToken property: The Azure key vault secret reference of sasToken in sas uri
withSasToken
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/datafactory/azure-resourcemanager-datafactory/src/main/java/com/azure/resourcemanager/datafactory/models/AzureBlobStorageLinkedService.java", "license": "mit", "size": 15618 }
[ "com.azure.resourcemanager.datafactory.fluent.models.AzureBlobStorageLinkedServiceTypeProperties" ]
import com.azure.resourcemanager.datafactory.fluent.models.AzureBlobStorageLinkedServiceTypeProperties;
import com.azure.resourcemanager.datafactory.fluent.models.*;
[ "com.azure.resourcemanager" ]
com.azure.resourcemanager;
2,156,147
@FIXVersion(introduced="5.0") public TriggeringInstruction getTriggeringInstruction() { throw new UnsupportedOperationException(getUnsupportedTagMessage()); }
@FIXVersion(introduced="5.0") TriggeringInstruction function() { throw new UnsupportedOperationException(getUnsupportedTagMessage()); }
/** * Message field getter. * @return field value */
Message field getter
getTriggeringInstruction
{ "repo_name": "marvisan/HadesFIX", "path": "Model/src/main/java/net/hades/fix/message/NewOrderCrossMsg.java", "license": "gpl-3.0", "size": 84522 }
[ "net.hades.fix.message.anno.FIXVersion", "net.hades.fix.message.comp.TriggeringInstruction" ]
import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.comp.TriggeringInstruction;
import net.hades.fix.message.anno.*; import net.hades.fix.message.comp.*;
[ "net.hades.fix" ]
net.hades.fix;
2,468,135
public void disableBrowserIntelligence() { DOM.setStyleAttribute(this.hTableContainer, "width", WRAPPER_WIDTH + "px"); }
void function() { DOM.setStyleAttribute(this.hTableContainer, "width", WRAPPER_WIDTH + "px"); }
/** * Disable browser measurement of the table width */
Disable browser measurement of the table width
disableBrowserIntelligence
{ "repo_name": "Softhouse/orchid", "path": "se.softhouse.garden.orchid.vaadin/addon/src/main/java/se/softhouse/garden/orchid/vaadin/widgetset/client/ui/VOrchidScrollTable.java", "license": "mit", "size": 221302 }
[ "com.google.gwt.user.client.DOM" ]
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.*;
[ "com.google.gwt" ]
com.google.gwt;
2,282,047
@Pure public List<String> getMimeTypes() { if (this.mimeTypes.isEmpty()) { return Arrays.asList("text/x-" + getLanguageSimpleName().toLowerCase()); //$NON-NLS-1$ } return this.mimeTypes; }
List<String> function() { if (this.mimeTypes.isEmpty()) { return Arrays.asList(STR + getLanguageSimpleName().toLowerCase()); } return this.mimeTypes; }
/** Replies the mime types for the SARL source code. * * @return the mime type for SARL. */
Replies the mime types for the SARL source code
getMimeTypes
{ "repo_name": "sarl/sarl", "path": "main/coreplugins/io.sarl.lang.mwe2/src/io/sarl/lang/mwe2/externalspec/AbstractExternalHighlightingFragment2.java", "license": "apache-2.0", "size": 24416 }
[ "java.util.Arrays", "java.util.List" ]
import java.util.Arrays; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
996,574
public com.mozu.api.contracts.commerceruntime.orders.Order changeOrderUserId(String orderId, String responseFields) throws Exception { MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> client = com.mozu.api.clients.commerce.OrderClient.changeOrderUserIdClient( orderId, responseFields); client....
com.mozu.api.contracts.commerceruntime.orders.Order function(String orderId, String responseFields) throws Exception { MozuClient<com.mozu.api.contracts.commerceruntime.orders.Order> client = com.mozu.api.clients.commerce.OrderClient.changeOrderUserIdClient( orderId, responseFields); client.setContext(_apiContext); cli...
/** * * <p><pre><code> * Order order = new Order(); * Order order = order.changeOrderUserId( orderId, responseFields); * </code></pre></p> * @param orderId Unique identifier of the order. * @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data r...
<code><code> Order order = new Order(); Order order = order.changeOrderUserId( orderId, responseFields); </code></code>
changeOrderUserId
{ "repo_name": "Mozu/mozu-java", "path": "mozu-java-core/src/main/java/com/mozu/api/resources/commerce/OrderResource.java", "license": "mit", "size": 27247 }
[ "com.mozu.api.MozuClient" ]
import com.mozu.api.MozuClient;
import com.mozu.api.*;
[ "com.mozu.api" ]
com.mozu.api;
880,700
@ApiOperation(value = "get the index status", notes = " ", response = IndexCreatedEvent.class) @ApiModelRequest(model = IndexCreatedEvent.class, required = true, modelName = "IndexCreatedEvent") public IndexCreatedEvent read(Request request, Response response) { String id...
@ApiOperation(value = STR, notes = " ", response = IndexCreatedEvent.class) @ApiModelRequest(model = IndexCreatedEvent.class, required = true, modelName = STR) IndexCreatedEvent function(Request request, Response response) { String id = request.getHeader(Constants.Url.INDEX_STATUS, STR); IndexCreatedEvent status = inde...
/** * Gets the status for an index creation request. * * @param request * @param response * @return */
Gets the status for an index creation request
read
{ "repo_name": "PearsonEducation/Docussandra", "path": "rest/src/main/java/com/pearson/docussandra/controller/IndexStatusController.java", "license": "apache-2.0", "size": 4483 }
[ "com.pearson.docussandra.Constants", "com.pearson.docussandra.domain.event.IndexCreatedEvent", "com.strategicgains.hyperexpress.HyperExpress", "com.strategicgains.restexpress.plugin.swagger.annotations.ApiModelRequest", "com.wordnik.swagger.annotations.ApiOperation", "java.util.UUID", "org.restexpress.R...
import com.pearson.docussandra.Constants; import com.pearson.docussandra.domain.event.IndexCreatedEvent; import com.strategicgains.hyperexpress.HyperExpress; import com.strategicgains.restexpress.plugin.swagger.annotations.ApiModelRequest; import com.wordnik.swagger.annotations.ApiOperation; import java.util.UUID; impo...
import com.pearson.docussandra.*; import com.pearson.docussandra.domain.event.*; import com.strategicgains.hyperexpress.*; import com.strategicgains.restexpress.plugin.swagger.annotations.*; import com.wordnik.swagger.annotations.*; import java.util.*; import org.restexpress.*;
[ "com.pearson.docussandra", "com.strategicgains.hyperexpress", "com.strategicgains.restexpress", "com.wordnik.swagger", "java.util", "org.restexpress" ]
com.pearson.docussandra; com.strategicgains.hyperexpress; com.strategicgains.restexpress; com.wordnik.swagger; java.util; org.restexpress;
2,617,344
@Override public UserWizardBuilder setItem(final AnyWrapper<UserTO> item) { super.setItem(item == null ? null : new UserWrapper(item.getInnerObject())); statusModel.getObject().clear(); return this; }
UserWizardBuilder function(final AnyWrapper<UserTO> item) { super.setItem(item == null ? null : new UserWrapper(item.getInnerObject())); statusModel.getObject().clear(); return this; }
/** * Overrides default setItem() in order to clean statusModel as well. * * @param item item to be set. * @return the current wizard. */
Overrides default setItem() in order to clean statusModel as well
setItem
{ "repo_name": "tmess567/syncope", "path": "client/console/src/main/java/org/apache/syncope/client/console/wizards/any/UserWizardBuilder.java", "license": "apache-2.0", "size": 4869 }
[ "org.apache.syncope.common.lib.to.UserTO" ]
import org.apache.syncope.common.lib.to.UserTO;
import org.apache.syncope.common.lib.to.*;
[ "org.apache.syncope" ]
org.apache.syncope;
497,598
public void service(HttpServletRequest req, HttpServletResponse res) { validateRequestProtocol(req); }
void function(HttpServletRequest req, HttpServletResponse res) { validateRequestProtocol(req); }
/** * Default implementation of the Endpoint <code>service</code> method. * Subclasses should call <code>super.service</code> before their custom * code. * * @param req The HttpServletRequest object. * @param res The HttpServletResponse object. */
Default implementation of the Endpoint <code>service</code> method. Subclasses should call <code>super.service</code> before their custom code
service
{ "repo_name": "apache/flex-blazeds", "path": "core/src/main/java/flex/messaging/endpoints/AbstractEndpoint.java", "license": "apache-2.0", "size": 59433 }
[ "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.*;
[ "javax.servlet" ]
javax.servlet;
2,755,693
public static MerkleTreeLeaf parseMerkleTreeLeaf(InputStream in) { int version = (int) readNumber(in, CTConstants.VERSION_LENGTH); if (version != Ct.Version.V1.getNumber()) { throw new SerializationException(String.format("Unknown version: %d", version)); } int leafType = (int) readNumber(in, 1...
static MerkleTreeLeaf function(InputStream in) { int version = (int) readNumber(in, CTConstants.VERSION_LENGTH); if (version != Ct.Version.V1.getNumber()) { throw new SerializationException(String.format(STR, version)); } int leafType = (int) readNumber(in, 1); if (leafType != TIMESTAMPED_ENTRY_LEAF_TYPE) { throw new S...
/** * Parses a {@link MerkleTreeLeaf} from binary encoding. * @param in byte stream of binary encoding. * @return Built {@link MerkleTreeLeaf}. * @throws SerializationException if the data stream is too short. */
Parses a <code>MerkleTreeLeaf</code> from binary encoding
parseMerkleTreeLeaf
{ "repo_name": "mozmark/tls-observatory", "path": "vendor/github.com/google/certificate-transparency/java/src/org/certificatetransparency/ctlog/serialization/Deserializer.java", "license": "mpl-2.0", "size": 12751 }
[ "java.io.InputStream", "org.certificatetransparency.ctlog.MerkleTreeLeaf", "org.certificatetransparency.ctlog.proto.Ct" ]
import java.io.InputStream; import org.certificatetransparency.ctlog.MerkleTreeLeaf; import org.certificatetransparency.ctlog.proto.Ct;
import java.io.*; import org.certificatetransparency.ctlog.*; import org.certificatetransparency.ctlog.proto.*;
[ "java.io", "org.certificatetransparency.ctlog" ]
java.io; org.certificatetransparency.ctlog;
562,839
public void onBlockPlacedBy(World par1World, int par2, int par3, int par4, EntityLivingBase par5EntityLivingBase, ItemStack par6ItemStack) { super.onBlockPlacedBy(par1World, par2, par3, par4, par5EntityLivingBase, par6ItemStack); if (par6ItemStack.hasDisplayName()) { ((TileE...
void function(World par1World, int par2, int par3, int par4, EntityLivingBase par5EntityLivingBase, ItemStack par6ItemStack) { super.onBlockPlacedBy(par1World, par2, par3, par4, par5EntityLivingBase, par6ItemStack); if (par6ItemStack.hasDisplayName()) { ((TileEntityEnchantmentTable)par1World.getBlockTileEntity(par2, pa...
/** * Called when the block is placed in the world. */
Called when the block is placed in the world
onBlockPlacedBy
{ "repo_name": "HATB0T/RuneCraftery", "path": "forge/mcp/src/minecraft/net/minecraft/block/BlockEnchantmentTable.java", "license": "lgpl-3.0", "size": 5351 }
[ "net.minecraft.entity.EntityLivingBase", "net.minecraft.item.ItemStack", "net.minecraft.tileentity.TileEntityEnchantmentTable", "net.minecraft.world.World" ]
import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntityEnchantmentTable; import net.minecraft.world.World;
import net.minecraft.entity.*; import net.minecraft.item.*; import net.minecraft.tileentity.*; import net.minecraft.world.*;
[ "net.minecraft.entity", "net.minecraft.item", "net.minecraft.tileentity", "net.minecraft.world" ]
net.minecraft.entity; net.minecraft.item; net.minecraft.tileentity; net.minecraft.world;
1,753,451
public static ClassLoader getClassLoader() { return Objects.firstNonNull( Thread.currentThread().getContextClassLoader(), Aocs.class.getClassLoader()); }
static ClassLoader function() { return Objects.firstNonNull( Thread.currentThread().getContextClassLoader(), Aocs.class.getClassLoader()); }
/** * Return the context classloader. BL: if this is command line operation, the classloading issues are more sane. * During servlet execution, we explicitly set the ClassLoader. * * @return The context classloader. */
During servlet execution, we explicitly set the ClassLoader
getClassLoader
{ "repo_name": "bingoohuang/aoc", "path": "src/main/java/org/n3r/aoc/utils/Aocs.java", "license": "apache-2.0", "size": 5274 }
[ "com.google.common.base.Objects" ]
import com.google.common.base.Objects;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
1,484,294
@Test public void testSelectAllPackages() { final QueryApi query = session.createQueryApi(); query.select().type(JavaPackage.class.getName()).selectEnd(); final QueryResult result = query.execute(sortMode, true); final List<Node> nodes = result.getNodes(); final NodeWr...
void function() { final QueryApi query = session.createQueryApi(); query.select().type(JavaPackage.class.getName()).selectEnd(); final QueryResult result = query.execute(sortMode, true); final List<Node> nodes = result.getNodes(); final NodeWrapper[] wrappers = wrapNodes(nodes);
/** * Test select all packages. */
Test select all packages
testSelectAllPackages
{ "repo_name": "porcelli/OpenSpotLight", "path": "osl-graph/osl-graph-core/src/test/java/org/openspotlight/graph/query/SLGraphQueryTest.java", "license": "lgpl-3.0", "size": 227396 }
[ "java.util.List", "org.openspotlight.graph.Node", "org.openspotlight.graph.test.domain.node.JavaPackage" ]
import java.util.List; import org.openspotlight.graph.Node; import org.openspotlight.graph.test.domain.node.JavaPackage;
import java.util.*; import org.openspotlight.graph.*; import org.openspotlight.graph.test.domain.node.*;
[ "java.util", "org.openspotlight.graph" ]
java.util; org.openspotlight.graph;
2,769,134
Iterable<EventData> receive();
Iterable<EventData> receive();
/** * Receive 'one' event from EventHub for processing from a target partition * * @return */
Receive 'one' event from EventHub for processing from a target partition
receive
{ "repo_name": "raviperi/storm", "path": "external/storm-eventhubs/src/main/java/org/apache/storm/eventhubs/core/IEventHubReceiver.java", "license": "apache-2.0", "size": 2400 }
[ "com.microsoft.azure.eventhubs.EventData" ]
import com.microsoft.azure.eventhubs.EventData;
import com.microsoft.azure.eventhubs.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
731,650
public JPanel pnlReceive() { JPanel panel = new JPanel(new BorderLayout()); JPanel usersHeader = new JPanel(new FlowLayout(FlowLayout.LEFT)); Box box = Box.createHorizontalBox(); URL u = this.getClass().getResource("iconchat.png"); ImageIcon image = new ImageIco...
JPanel function() { JPanel panel = new JPanel(new BorderLayout()); JPanel usersHeader = new JPanel(new FlowLayout(FlowLayout.LEFT)); Box box = Box.createHorizontalBox(); URL u = this.getClass().getResource(STR); ImageIcon image = new ImageIcon(u); JLabel lblImage = new JLabel(image); box.add(lblImage); box.add(new JLab...
/** * Initialises the JPanel that holds the group chat and userlist * * @return The JPanel that holds the group chat and userlist */
Initialises the JPanel that holds the group chat and userlist
pnlReceive
{ "repo_name": "inversion/ciderspe", "path": "src/cider/client/gui/MainWindow.java", "license": "gpl-3.0", "size": 63370 }
[ "java.awt.BorderLayout", "java.awt.Color", "java.awt.Dimension", "java.awt.FlowLayout", "javax.swing.BorderFactory", "javax.swing.Box", "javax.swing.ImageIcon", "javax.swing.JLabel", "javax.swing.JPanel" ]
import java.awt.BorderLayout; import java.awt.Color; import java.awt.Dimension; import java.awt.FlowLayout; import javax.swing.BorderFactory; import javax.swing.Box; import javax.swing.ImageIcon; import javax.swing.JLabel; import javax.swing.JPanel;
import java.awt.*; import javax.swing.*;
[ "java.awt", "javax.swing" ]
java.awt; javax.swing;
2,493,871
public ObjectLongMap<String> getInSyncGlobalCheckpoints() { verifyPrimary(); verifyNotClosed(); return getEngine().seqNoService().getInSyncGlobalCheckpoints(); }
ObjectLongMap<String> function() { verifyPrimary(); verifyNotClosed(); return getEngine().seqNoService().getInSyncGlobalCheckpoints(); }
/** * Get the local knowledge of the global checkpoints for all in-sync allocation IDs. * * @return a map from allocation ID to the local knowledge of the global checkpoint for that allocation ID */
Get the local knowledge of the global checkpoints for all in-sync allocation IDs
getInSyncGlobalCheckpoints
{ "repo_name": "mjason3/elasticsearch", "path": "core/src/main/java/org/elasticsearch/index/shard/IndexShard.java", "license": "apache-2.0", "size": 122035 }
[ "com.carrotsearch.hppc.ObjectLongMap" ]
import com.carrotsearch.hppc.ObjectLongMap;
import com.carrotsearch.hppc.*;
[ "com.carrotsearch.hppc" ]
com.carrotsearch.hppc;
158,035
@Override @XmlElement(name = "MD_CoverageContentTypeCode") public CodeListUID getElement() { return identifier; }
@XmlElement(name = STR) CodeListUID function() { return identifier; }
/** * Invoked by JAXB on marshalling. * * @return the value to be marshalled. */
Invoked by JAXB on marshalling
getElement
{ "repo_name": "Geomatys/sis", "path": "core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/MD_CoverageContentTypeCode.java", "license": "apache-2.0", "size": 2679 }
[ "javax.xml.bind.annotation.XmlElement", "org.apache.sis.internal.jaxb.gmd.CodeListUID" ]
import javax.xml.bind.annotation.XmlElement; import org.apache.sis.internal.jaxb.gmd.CodeListUID;
import javax.xml.bind.annotation.*; import org.apache.sis.internal.jaxb.gmd.*;
[ "javax.xml", "org.apache.sis" ]
javax.xml; org.apache.sis;
2,859,367
private void checkViewMeetsSpec(String viewName, ParsedSelectStmt stmt) throws VoltCompilerException { int groupColCount = stmt.m_groupByColumns.size(); int displayColCount = stmt.m_displayColumns.size(); String msg = "Materialized view \"" + viewName + "\" "; if (stmt.m_tableList.s...
void function(String viewName, ParsedSelectStmt stmt) throws VoltCompilerException { int groupColCount = stmt.m_groupByColumns.size(); int displayColCount = stmt.m_displayColumns.size(); String msg = STRSTR\" "; if (stmt.m_tableList.size() != 1) { msg += STR + String.valueOf(stmt.m_tableList.size()) + STR + STR; throw ...
/** * Verify the materialized view meets our arcane rules about what can and can't * go in a materialized view. Throw hopefully helpful error messages when these * rules are inevitably borked. * * @param viewName The name of the view being checked. * @param stmt The output from the parser ...
Verify the materialized view meets our arcane rules about what can and can't go in a materialized view. Throw hopefully helpful error messages when these rules are inevitably borked
checkViewMeetsSpec
{ "repo_name": "zheguang/voltdb", "path": "src/frontend/org/voltdb/compiler/DDLCompiler.java", "license": "agpl-3.0", "size": 101908 }
[ "java.util.ArrayList", "java.util.List", "org.hsqldb_voltpatches.FunctionSQL", "org.voltdb.compiler.VoltCompiler", "org.voltdb.expressions.AbstractExpression", "org.voltdb.planner.ParsedSelectStmt", "org.voltdb.types.ExpressionType" ]
import java.util.ArrayList; import java.util.List; import org.hsqldb_voltpatches.FunctionSQL; import org.voltdb.compiler.VoltCompiler; import org.voltdb.expressions.AbstractExpression; import org.voltdb.planner.ParsedSelectStmt; import org.voltdb.types.ExpressionType;
import java.util.*; import org.hsqldb_voltpatches.*; import org.voltdb.compiler.*; import org.voltdb.expressions.*; import org.voltdb.planner.*; import org.voltdb.types.*;
[ "java.util", "org.hsqldb_voltpatches", "org.voltdb.compiler", "org.voltdb.expressions", "org.voltdb.planner", "org.voltdb.types" ]
java.util; org.hsqldb_voltpatches; org.voltdb.compiler; org.voltdb.expressions; org.voltdb.planner; org.voltdb.types;
2,842,885
public static byte[] read( final File file ) throws IOException { if ( file == null ) { throw new IOException( "File reference was null" ); } if ( file.exists() && file.canRead() ) { DataInputStream dis = null; final byte[] bytes = new byte[new Long( file.length() ).intValue()]; ...
static byte[] function( final File file ) throws IOException { if ( file == null ) { throw new IOException( STR ); } if ( file.exists() && file.canRead() ) { DataInputStream dis = null; final byte[] bytes = new byte[new Long( file.length() ).intValue()]; try { dis = new DataInputStream( new FileInputStream( file ) ); d...
/** * Read the entire file into memory as an array of bytes. * * @param file The file to read * * @return A byte array that contains the contents of the file. * * @throws IOException If problems occur. */
Read the entire file into memory as an array of bytes
read
{ "repo_name": "sdcote/commons", "path": "src/main/java/coyote/commons/FileUtil.java", "license": "mit", "size": 61600 }
[ "java.io.DataInputStream", "java.io.File", "java.io.FileInputStream", "java.io.IOException" ]
import java.io.DataInputStream; import java.io.File; import java.io.FileInputStream; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
556,500
private Project createProject(String name, UserInfo creator) { String activityId = null; Project project = new Project(); project.setName(name); String id = entityManager.createEntity(creator, project, activityId); projectsToDelete.add(id); return entityManager.getEntity(creator, id, Project.class)...
Project function(String name, UserInfo creator) { String activityId = null; Project project = new Project(); project.setName(name); String id = entityManager.createEntity(creator, project, activityId); projectsToDelete.add(id); return entityManager.getEntity(creator, id, Project.class); }
/** * Helper to create a project. * * @param name * @param creator * @return */
Helper to create a project
createProject
{ "repo_name": "Sage-Bionetworks/Synapse-Repository-Services", "path": "services/repository-managers/src/test/java/org/sagebionetworks/repo/manager/UserProfileManagerImplTest.java", "license": "apache-2.0", "size": 10246 }
[ "org.sagebionetworks.repo.model.Project", "org.sagebionetworks.repo.model.UserInfo" ]
import org.sagebionetworks.repo.model.Project; import org.sagebionetworks.repo.model.UserInfo;
import org.sagebionetworks.repo.model.*;
[ "org.sagebionetworks.repo" ]
org.sagebionetworks.repo;
834,613
public Renderer getRenderer();
Renderer function();
/** * Returns the renderer. This method will always return * <code>null</code> if the type is not {@link #RND_SPECIFIC}. * * @return See above. */
Returns the renderer. This method will always return <code>null</code> if the type is not <code>#RND_SPECIFIC</code>
getRenderer
{ "repo_name": "tp81/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/metadata/view/MetadataViewer.java", "license": "gpl-2.0", "size": 19962 }
[ "org.openmicroscopy.shoola.agents.metadata.rnd.Renderer" ]
import org.openmicroscopy.shoola.agents.metadata.rnd.Renderer;
import org.openmicroscopy.shoola.agents.metadata.rnd.*;
[ "org.openmicroscopy.shoola" ]
org.openmicroscopy.shoola;
1,909,052
private void resetConnection() throws ExecutionException, InterruptedException { clientManager = new ThriftClientManager(); FramedClientConnector connector = new FramedClientConnector(new InetSocketAddress( JOB_PROGRESS_SERVICE_HOST.get(conf), JOB_PROGRESS_SERVICE_PORT.ge...
void function() throws ExecutionException, InterruptedException { clientManager = new ThriftClientManager(); FramedClientConnector connector = new FramedClientConnector(new InetSocketAddress( JOB_PROGRESS_SERVICE_HOST.get(conf), JOB_PROGRESS_SERVICE_PORT.get(conf))); jobProgressTracker = clientManager.createClient(conn...
/** * Try to establish new connection to JobProgressTracker */
Try to establish new connection to JobProgressTracker
resetConnection
{ "repo_name": "basio/graph", "path": "giraph-core/src/main/java/org/apache/giraph/graph/RetryableJobProgressTrackerClient.java", "license": "apache-2.0", "size": 5376 }
[ "com.facebook.nifty.client.FramedClientConnector", "com.facebook.swift.service.ThriftClientManager", "java.net.InetSocketAddress", "java.util.concurrent.ExecutionException", "org.apache.giraph.job.JobProgressTracker" ]
import com.facebook.nifty.client.FramedClientConnector; import com.facebook.swift.service.ThriftClientManager; import java.net.InetSocketAddress; import java.util.concurrent.ExecutionException; import org.apache.giraph.job.JobProgressTracker;
import com.facebook.nifty.client.*; import com.facebook.swift.service.*; import java.net.*; import java.util.concurrent.*; import org.apache.giraph.job.*;
[ "com.facebook.nifty", "com.facebook.swift", "java.net", "java.util", "org.apache.giraph" ]
com.facebook.nifty; com.facebook.swift; java.net; java.util; org.apache.giraph;
926,782
public Hashtable<String, ShaderVar> getUniforms() { return mUniforms; }
Hashtable<String, ShaderVar> function() { return mUniforms; }
/** * Returns all uniforms * * @return */
Returns all uniforms
getUniforms
{ "repo_name": "paoloach/zdomus", "path": "temperature_monitor/opengl/src/main/java/it/achdjian/paolo/opengl/materials/shaders/AShader.java", "license": "gpl-2.0", "size": 38509 }
[ "java.util.Hashtable" ]
import java.util.Hashtable;
import java.util.*;
[ "java.util" ]
java.util;
2,047,858
public boolean trigger(byte[] key) { // Sanity check Preconditions.checkArgument(key != null, "null key"); // Extract KeyInfo object for this key final KeyInfo keyInfo; synchronized (this) { if ((keyInfo = this.keyInfos.remove(key)) == null) retu...
boolean function(byte[] key) { Preconditions.checkArgument(key != null, STR); final KeyInfo keyInfo; synchronized (this) { if ((keyInfo = this.keyInfos.remove(key)) == null) return false; } keyInfo.triggerAll(); return true; }
/** * Trigger all watches associated with the given key. * * @param key the key that has been modified * @return true if any watches were triggered, otherwise false * @throws IllegalArgumentException if {@code key} is null */
Trigger all watches associated with the given key
trigger
{ "repo_name": "permazen/permazen", "path": "permazen-kv/src/main/java/io/permazen/kv/util/KeyWatchTracker.java", "license": "apache-2.0", "size": 17647 }
[ "com.google.common.base.Preconditions" ]
import com.google.common.base.Preconditions;
import com.google.common.base.*;
[ "com.google.common" ]
com.google.common;
1,326,758
@Test public void addStagingAndDelete() throws Exception { LOG.info("Starting addStagingAndDelete"); File f = copyToFile(randomStream(0, 4 * 1024), folder.newFile()); String id = getIdForInputStream(f); FileInputStream fin = new FileInputStream(f); closer.register(fin); ...
void function() throws Exception { LOG.info(STR); File f = copyToFile(randomStream(0, 4 * 1024), folder.newFile()); String id = getIdForInputStream(f); FileInputStream fin = new FileInputStream(f); closer.register(fin); DataRecord rec = dataStore.addRecord(fin); assertEquals(id, rec.getIdentifier().toString()); assertF...
/** * Add in staging and delete. * @throws Exception */
Add in staging and delete
addStagingAndDelete
{ "repo_name": "davidegiannella/jackrabbit-oak", "path": "oak-blob-plugins/src/test/java/org/apache/jackrabbit/oak/plugins/blob/CachingDataStoreTest.java", "license": "apache-2.0", "size": 18515 }
[ "java.io.File", "java.io.FileInputStream", "org.apache.jackrabbit.core.data.DataIdentifier", "org.apache.jackrabbit.core.data.DataRecord", "org.junit.Assert" ]
import java.io.File; import java.io.FileInputStream; import org.apache.jackrabbit.core.data.DataIdentifier; import org.apache.jackrabbit.core.data.DataRecord; import org.junit.Assert;
import java.io.*; import org.apache.jackrabbit.core.data.*; import org.junit.*;
[ "java.io", "org.apache.jackrabbit", "org.junit" ]
java.io; org.apache.jackrabbit; org.junit;
2,032,082
public JSONObject toJson() { final JSONObject object = new JSONObject(); try { object.put(AUTH_TOKEN, authToken); object.put(REFRESH_TOKEN, refreshToken); object.put(LOGIN_SERVER, loginServer); object.put(ID_URL, idUrl); object.put(INSTANCE_SERVER, instanceServ...
JSONObject function() { final JSONObject object = new JSONObject(); try { object.put(AUTH_TOKEN, authToken); object.put(REFRESH_TOKEN, refreshToken); object.put(LOGIN_SERVER, loginServer); object.put(ID_URL, idUrl); object.put(INSTANCE_SERVER, instanceServer); object.put(ORG_ID, orgId); object.put(USER_ID, userId); obj...
/** * Returns a JSON representation of this instance. * * @return JSONObject instance. */
Returns a JSON representation of this instance
toJson
{ "repo_name": "huminzhi/SalesforceMobileSDK-Android", "path": "libs/SalesforceSDK/src/com/salesforce/androidsdk/accounts/UserAccount.java", "license": "apache-2.0", "size": 20157 }
[ "android.util.Log", "org.json.JSONException", "org.json.JSONObject" ]
import android.util.Log; import org.json.JSONException; import org.json.JSONObject;
import android.util.*; import org.json.*;
[ "android.util", "org.json" ]
android.util; org.json;
1,384,570
public void setCashReceiptDocument(CashReceiptDocument cashReceiptDocument) { this.cashReceiptDocument = cashReceiptDocument; }
void function(CashReceiptDocument cashReceiptDocument) { this.cashReceiptDocument = cashReceiptDocument; }
/** * Sets the cashReceiptDocument attribute value. * @param cashReceiptDocument The cashReceiptDocument to set. */
Sets the cashReceiptDocument attribute value
setCashReceiptDocument
{ "repo_name": "ua-eas/ua-kfs-5.3", "path": "work/src/org/kuali/kfs/fp/businessobject/DepositCashReceiptControl.java", "license": "agpl-3.0", "size": 6319 }
[ "org.kuali.kfs.fp.document.CashReceiptDocument" ]
import org.kuali.kfs.fp.document.CashReceiptDocument;
import org.kuali.kfs.fp.document.*;
[ "org.kuali.kfs" ]
org.kuali.kfs;
1,121,354
private static ImportRoute buildAfBgp(ProtocolInfo proInfo, RouteProtocol protocol) { BgpcommImRouteProtocolEnum rpEnum = getProtocolType(protocol); ImportRoute impRoute = new DefaultImportRoute(); impRoute.importProcessId(proInfo.processId()); ...
static ImportRoute function(ProtocolInfo proInfo, RouteProtocol protocol) { BgpcommImRouteProtocolEnum rpEnum = getProtocolType(protocol); ImportRoute impRoute = new DefaultImportRoute(); impRoute.importProcessId(proInfo.processId()); impRoute.importProtocol(BgpcommImRouteProtocol.of(rpEnum)); return impRoute; }
/** * Builds the import route details from the route protocol and the * process id. * * @param proInfo protocol info * @param protocol route protocol * @return import route object */
Builds the import route details from the route protocol and the process id
buildAfBgp
{ "repo_name": "LorenzReinhart/ONOSnew", "path": "drivers/huawei/src/main/java/org/onosproject/drivers/huawei/BgpConstructionUtil.java", "license": "apache-2.0", "size": 17951 }
[ "org.onosproject.l3vpn.netl3vpn.ProtocolInfo", "org.onosproject.l3vpn.netl3vpn.RouteProtocol", "org.onosproject.yang.gen.v1.nebgpcomm.rev20141225.nebgpcomm.devices.device.bgp.bgpcomm.bgpvrfs.bgpvrf.bgpvrfafs.bgpvrfaf.importroutes.DefaultImportRoute", "org.onosproject.yang.gen.v1.nebgpcomm.rev20141225.nebgpcom...
import org.onosproject.l3vpn.netl3vpn.ProtocolInfo; import org.onosproject.l3vpn.netl3vpn.RouteProtocol; import org.onosproject.yang.gen.v1.nebgpcomm.rev20141225.nebgpcomm.devices.device.bgp.bgpcomm.bgpvrfs.bgpvrf.bgpvrfafs.bgpvrfaf.importroutes.DefaultImportRoute; import org.onosproject.yang.gen.v1.nebgpcomm.rev201412...
import org.onosproject.l3vpn.netl3vpn.*; import org.onosproject.yang.gen.v1.nebgpcomm.rev20141225.nebgpcomm.devices.device.bgp.bgpcomm.bgpvrfs.bgpvrf.bgpvrfafs.bgpvrfaf.importroutes.*; import org.onosproject.yang.gen.v1.nebgpcommtype.rev20141225.nebgpcommtype.*; import org.onosproject.yang.gen.v1.nebgpcommtype.rev20141...
[ "org.onosproject.l3vpn", "org.onosproject.yang" ]
org.onosproject.l3vpn; org.onosproject.yang;
1,999,268
public static BufferedImage bytesToImage(byte[] values) throws EncoderException { if (values == null) throw new IllegalArgumentException("No array specified."); try { ByteArrayInputStream stream = new ByteArrayInputStream(values); BufferedImage image = ImageIO.read(stream); if (image != null) ...
static BufferedImage function(byte[] values) throws EncoderException { if (values == null) throw new IllegalArgumentException(STR); try { ByteArrayInputStream stream = new ByteArrayInputStream(values); BufferedImage image = ImageIO.read(stream); if (image != null) image.setAccelerationPriority(1f); stream.close(); retu...
/** * Converts the passed byte array to a buffered image. * * @param values The values to convert. * @return See above. * @throws EncoderException Exception thrown if an error occurred during the * encoding process. */
Converts the passed byte array to a buffered image
bytesToImage
{ "repo_name": "rleigh-dundee/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/util/image/io/WriterImage.java", "license": "gpl-2.0", "size": 8456 }
[ "java.awt.image.BufferedImage", "java.io.ByteArrayInputStream", "javax.imageio.ImageIO" ]
import java.awt.image.BufferedImage; import java.io.ByteArrayInputStream; import javax.imageio.ImageIO;
import java.awt.image.*; import java.io.*; import javax.imageio.*;
[ "java.awt", "java.io", "javax.imageio" ]
java.awt; java.io; javax.imageio;
88,999
public Map<String, Object> toMap() { Map<String, Object> map = new HashMap<String, Object>(); map.put("uuid", this.uuid == null ? "" : this.uuid); map.put("name_label", this.nameLabel == null ? "" : this.nameLabel); map.put("name_description", this.nameDescription == null ? "" : this.nameDescripti...
Map<String, Object> function() { Map<String, Object> map = new HashMap<String, Object>(); map.put("uuid", this.uuid == null ? STRname_labelSTRSTRname_descriptionSTRSTRresident_onSTROpaqueRef:NULLSTRVDIsSTRvirtual_allocationSTRphysical_utilisationSTRphysical_sizeSTRtypeSTRSTRcontent_typeSTRSTRsharedSTRother_configSTRtag...
/** * Convert a SR.Record to a Map */
Convert a SR.Record to a Map
toMap
{ "repo_name": "Hearen/OnceServer", "path": "pool_management/bn-xend-core/src/main/java/com/beyondsphere/xenapi/SR.java", "license": "mit", "size": 75668 }
[ "java.util.HashMap", "java.util.Map", "java.util.Set" ]
import java.util.HashMap; import java.util.Map; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,068,740
public static SesameAdapter getInstance(RepoType type) throws RepositoryException { switch (type) { case MAIN: synchronized (lock) { if (mainMe == null) mainMe = new SesameAdapter("./sesame_db/main/"); } return mainMe; case EVALUATION: synchronized (lock) { if (evaluationMe == nul...
static SesameAdapter function(RepoType type) throws RepositoryException { switch (type) { case MAIN: synchronized (lock) { if (mainMe == null) mainMe = new SesameAdapter(STR); } return mainMe; case EVALUATION: synchronized (lock) { if (evaluationMe == null) evaluationMe = new SesameAdapter(STR); } return evaluationMe; ...
/** * "Dualton" instance retriever. Creates and/or returns one of two available * singleton-style instances, one for each {@link RepoType}. * * @param type * Requested repository type. * @return Singleton-style object. * @throws RepositoryException * If creation/initialization fa...
"Dualton" instance retriever. Creates and/or returns one of two available singleton-style instances, one for each <code>RepoType</code>
getInstance
{ "repo_name": "chrpin/rodi", "path": "src/com/fluidops/rdb2rdfbench/db/rdf/SesameAdapter.java", "license": "mit", "size": 12175 }
[ "org.openrdf.repository.RepositoryException" ]
import org.openrdf.repository.RepositoryException;
import org.openrdf.repository.*;
[ "org.openrdf.repository" ]
org.openrdf.repository;
1,088,904
public static int executeUpdate(String query, Object... params) { return JpaOperations.INSTANCE.executeUpdate(query, params); }
static int function(String query, Object... params) { return JpaOperations.INSTANCE.executeUpdate(query, params); }
/** * Executes a database update operation and return the number of rows operated on. * * @param query a normal HQL query * @param params optional list of indexed parameters * @return the number of rows operated on. */
Executes a database update operation and return the number of rows operated on
executeUpdate
{ "repo_name": "quarkusio/quarkus", "path": "extensions/panache/hibernate-orm-panache/runtime/src/main/java/io/quarkus/hibernate/orm/panache/Panache.java", "license": "apache-2.0", "size": 3972 }
[ "io.quarkus.hibernate.orm.panache.runtime.JpaOperations" ]
import io.quarkus.hibernate.orm.panache.runtime.JpaOperations;
import io.quarkus.hibernate.orm.panache.runtime.*;
[ "io.quarkus.hibernate" ]
io.quarkus.hibernate;
2,185,421
public boolean isUnclassified(AnnotationMirror anno) { Class<? extends Annotation> clazz = useFbc ? UnknownInitialization.class : Raw.class; return AnnotationUtils.areSameByClass(anno, clazz); }
boolean function(AnnotationMirror anno) { Class<? extends Annotation> clazz = useFbc ? UnknownInitialization.class : Raw.class; return AnnotationUtils.areSameByClass(anno, clazz); }
/** * Is {@code anno} the {@link UnknownInitialization} annotation (with any type * frame)? If {@code useFbc} is false, then {@link Raw} is used in the * comparison. */
Is anno the <code>UnknownInitialization</code> annotation (with any type frame)? If useFbc is false, then <code>Raw</code> is used in the comparison
isUnclassified
{ "repo_name": "pbsf/checker-framework", "path": "checker/src/org/checkerframework/checker/initialization/InitializationAnnotatedTypeFactory.java", "license": "gpl-2.0", "size": 34214 }
[ "java.lang.annotation.Annotation", "javax.lang.model.element.AnnotationMirror", "org.checkerframework.checker.initialization.qual.UnknownInitialization", "org.checkerframework.checker.nullness.qual.Raw", "org.checkerframework.javacutil.AnnotationUtils" ]
import java.lang.annotation.Annotation; import javax.lang.model.element.AnnotationMirror; import org.checkerframework.checker.initialization.qual.UnknownInitialization; import org.checkerframework.checker.nullness.qual.Raw; import org.checkerframework.javacutil.AnnotationUtils;
import java.lang.annotation.*; import javax.lang.model.element.*; import org.checkerframework.checker.initialization.qual.*; import org.checkerframework.checker.nullness.qual.*; import org.checkerframework.javacutil.*;
[ "java.lang", "javax.lang", "org.checkerframework.checker", "org.checkerframework.javacutil" ]
java.lang; javax.lang; org.checkerframework.checker; org.checkerframework.javacutil;
1,162,376
public void keyReleased(KeyEvent e){ verticalbar.repaint(); horizontalbar.repaint(); }
void function(KeyEvent e){ verticalbar.repaint(); horizontalbar.repaint(); }
/** * KeyListeners: Should repaint the scrollbar * everytime the user presses a key */
KeyListeners: Should repaint the scrollbar everytime the user presses a key
keyReleased
{ "repo_name": "ajhalbleib/aicg", "path": "appinventor/blockslib/src/openblocks/codeblockutil/CTracklessScrollPane.java", "license": "mit", "size": 24063 }
[ "java.awt.event.KeyEvent" ]
import java.awt.event.KeyEvent;
import java.awt.event.*;
[ "java.awt" ]
java.awt;
2,025,616
private static void createDBTables(final Connection connectionDB) { if (DBConnection.getInstance().isConnected(connectionDB)) { try (final Statement statement = connectionDB.createStatement()) { statement.execute(Queries.CREATE_TABLE_AND_INSERT_COUNTRY.getGuery()); ...
static void function(final Connection connectionDB) { if (DBConnection.getInstance().isConnected(connectionDB)) { try (final Statement statement = connectionDB.createStatement()) { statement.execute(Queries.CREATE_TABLE_AND_INSERT_COUNTRY.getGuery()); LOG.info(STR); statement.execute(Queries.CREATE_TABLE_AND_INSERT_CIT...
/** * CreateDBTable method used to create table in database when table is not exist. * @param connectionDB connection to database. */
CreateDBTable method used to create table in database when table is not exist
createDBTables
{ "repo_name": "VardanMatevosyan/Vardan-Git-Repository", "path": "Servlet_JSP/securityAndFilter/src/main/java/ru/matevosyan/database/UserStore.java", "license": "apache-2.0", "size": 14663 }
[ "java.sql.Connection", "java.sql.SQLException", "java.sql.Statement" ]
import java.sql.Connection; import java.sql.SQLException; import java.sql.Statement;
import java.sql.*;
[ "java.sql" ]
java.sql;
218,830
protected void assertBackKeyFinishesActivity() throws InterruptedException, TimeoutException { TestUtilities.invokeActivityOnBackPressedOnUiThread(getActivity()); assertTrue(getActivity().isFinishing()); }
void function() throws InterruptedException, TimeoutException { TestUtilities.invokeActivityOnBackPressedOnUiThread(getActivity()); assertTrue(getActivity().isFinishing()); }
/** * Asserts that pressing the {@code Back} key finishes the Activity under test. */
Asserts that pressing the Back key finishes the Activity under test
assertBackKeyFinishesActivity
{ "repo_name": "kaie/otp-authenticator-android", "path": "tests/src/de/kuix/android/apps/authenticator/wizard/WizardPageActivityTestBase.java", "license": "apache-2.0", "size": 4444 }
[ "de.kuix.android.apps.authenticator.TestUtilities", "java.util.concurrent.TimeoutException" ]
import de.kuix.android.apps.authenticator.TestUtilities; import java.util.concurrent.TimeoutException;
import de.kuix.android.apps.authenticator.*; import java.util.concurrent.*;
[ "de.kuix.android", "java.util" ]
de.kuix.android; java.util;
1,509,500
//------------------------------------------------------------------------- @Override public UniqueId getParentNodeId() { return _parentNodeId; }
UniqueId function() { return _parentNodeId; }
/** * Gets the unique identifier of the parent node, null if this is a root node. * * @return the unique identifier, null if root node */
Gets the unique identifier of the parent node, null if this is a root node
getParentNodeId
{ "repo_name": "jeorme/OG-Platform", "path": "projects/OG-Core/src/main/java/com/opengamma/core/position/impl/SimplePortfolioNode.java", "license": "apache-2.0", "size": 14100 }
[ "com.opengamma.id.UniqueId" ]
import com.opengamma.id.UniqueId;
import com.opengamma.id.*;
[ "com.opengamma.id" ]
com.opengamma.id;
2,089,711
@Test public void testSetParent() { final TreeNode<T> node = newNode(newData()); final TreeNode<T> newParent = newNode(newData()); node.setParent(newParent); final TreeNode<T> expected = newParent; final TreeNode<T> actual = node.getParent(); Assert.asser...
void function() { final TreeNode<T> node = newNode(newData()); final TreeNode<T> newParent = newNode(newData()); node.setParent(newParent); final TreeNode<T> expected = newParent; final TreeNode<T> actual = node.getParent(); Assert.assertEquals(expected, actual); }
/** * Tests {@link TreeNode#setParent(TreeNode)}. * This is only a test for the setter-functionality. */
Tests <code>TreeNode#setParent(TreeNode)</code>. This is only a test for the setter-functionality
testSetParent
{ "repo_name": "cosmocode/cosmocode-commons", "path": "src/test/java/de/cosmocode/collections/tree/TreeNodeTest.java", "license": "apache-2.0", "size": 39298 }
[ "junit.framework.Assert" ]
import junit.framework.Assert;
import junit.framework.*;
[ "junit.framework" ]
junit.framework;
787,236
public void testPeriodic() { LiveWindow.run(); }
void function() { LiveWindow.run(); }
/** * This function is called periodically during test mode */
This function is called periodically during test mode
testPeriodic
{ "repo_name": "ThinkRedstone/FLFL2014", "path": "src/edu/wpi/first/wpilibj/templates/RobotTemplate.java", "license": "bsd-3-clause", "size": 2550 }
[ "edu.wpi.first.wpilibj.livewindow.LiveWindow" ]
import edu.wpi.first.wpilibj.livewindow.LiveWindow;
import edu.wpi.first.wpilibj.livewindow.*;
[ "edu.wpi.first" ]
edu.wpi.first;
519,224
boolean doDefragment(int chunkSize) { boolean result = false; ArrayList<LongStack> freeChunks = new ArrayList<>(); collectFreeChunks(freeChunks); ResizableLongArray sorted = new ResizableLongArray(); for (LongStack l : freeChunks) { long addr = l.poll(); while (addr != 0) { int...
boolean doDefragment(int chunkSize) { boolean result = false; ArrayList<LongStack> freeChunks = new ArrayList<>(); collectFreeChunks(freeChunks); ResizableLongArray sorted = new ResizableLongArray(); for (LongStack l : freeChunks) { long addr = l.poll(); while (addr != 0) { int idx = sorted.binarySearch(addr); idx = -i...
/** * Defragments memory and returns true if enough memory to allocate chunkSize is freed. Otherwise * returns false; Unlike the defragment method this method is not thread safe and does not check * for a concurrent defragment. It should only be called by defragment and unit tests. */
Defragments memory and returns true if enough memory to allocate chunkSize is freed. Otherwise returns false; Unlike the defragment method this method is not thread safe and does not check for a concurrent defragment. It should only be called by defragment and unit tests
doDefragment
{ "repo_name": "jdeppe-pivotal/geode", "path": "geode-core/src/main/java/org/apache/geode/internal/offheap/FreeListManager.java", "license": "apache-2.0", "size": 33165 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
80,126
public static void startActivityCoordinates(final AbstractActivity context, final Geopoint coords, @Nullable final String name) { if (!isValidCoords(context, coords)) { return; } final Intent cachesIntent = new Intent(context, CacheListActivity.class); Intents.putListType...
static void function(final AbstractActivity context, final Geopoint coords, @Nullable final String name) { if (!isValidCoords(context, coords)) { return; } final Intent cachesIntent = new Intent(context, CacheListActivity.class); Intents.putListType(cachesIntent, CacheListType.COORDINATE); cachesIntent.putExtra(Intents...
/** * start list activity, by searching around the given point. * * @param name * name of coordinates, will lead to a title like "Around ..." instead of directly showing the * coordinates as title */
start list activity, by searching around the given point
startActivityCoordinates
{ "repo_name": "kumy/cgeo", "path": "main/src/cgeo/geocaching/CacheListActivity.java", "license": "apache-2.0", "size": 82464 }
[ "android.content.Intent", "android.support.annotation.Nullable", "org.apache.commons.lang3.StringUtils" ]
import android.content.Intent; import android.support.annotation.Nullable; import org.apache.commons.lang3.StringUtils;
import android.content.*; import android.support.annotation.*; import org.apache.commons.lang3.*;
[ "android.content", "android.support", "org.apache.commons" ]
android.content; android.support; org.apache.commons;
892,120
List<String> getDynamicConfigurationNames() throws PulsarAdminException;
List<String> getDynamicConfigurationNames() throws PulsarAdminException;
/** * Get list of updatable configuration name * * @return * @throws PulsarAdminException */
Get list of updatable configuration name
getDynamicConfigurationNames
{ "repo_name": "merlimat/pulsar", "path": "pulsar-client-admin/src/main/java/org/apache/pulsar/client/admin/Brokers.java", "license": "apache-2.0", "size": 4500 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,791,444
public SFTPv3FileHandle createFile(String fileName) throws IOException { return createFile(fileName, null); } /** * Create a file and open it for reading and writing. * You can specify the default attributes of the file (the server may or may * not respect your wishes). * * @param fileName See the {...
SFTPv3FileHandle function(String fileName) throws IOException { return createFile(fileName, null); } /** * Create a file and open it for reading and writing. * You can specify the default attributes of the file (the server may or may * not respect your wishes). * * @param fileName See the {@link SFTPv3Client comment} f...
/** * Create a file and open it for reading and writing. * Same as {@link #createFile(String, SFTPv3FileAttributes) createFile(fileName, null)}. * * @param fileName See the {@link SFTPv3Client comment} for the class for more details. * @return a SFTPv3FileHandle handle * @throws IOException */
Create a file and open it for reading and writing. Same as <code>#createFile(String, SFTPv3FileAttributes) createFile(fileName, null)</code>
createFile
{ "repo_name": "handong106324/sqLogWeb", "path": "src/ch/ethz/ssh2/SFTPv3Client.java", "license": "lgpl-2.1", "size": 37667 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,118,024
public ArrayList getTransparencyRange() { return transparencyRanges; }
ArrayList function() { return transparencyRanges; }
/** * Obtiene los rangos de pixels que son transparentes en el raster. * @return Rangos de transparencias a aplicar */
Obtiene los rangos de pixels que son transparentes en el raster
getTransparencyRange
{ "repo_name": "iCarto/siga", "path": "libRaster/src/org/gvsig/raster/datastruct/Transparency.java", "license": "gpl-3.0", "size": 13826 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
1,731,626
public Path randomRepoPath() { if (currentCluster instanceof InternalTestCluster) { return randomRepoPath(((InternalTestCluster) currentCluster).getDefaultSettings()); } else if (currentCluster instanceof CompositeTestCluster) { return randomRepoPath(((CompositeTestCluster) c...
Path function() { if (currentCluster instanceof InternalTestCluster) { return randomRepoPath(((InternalTestCluster) currentCluster).getDefaultSettings()); } else if (currentCluster instanceof CompositeTestCluster) { return randomRepoPath(((CompositeTestCluster) currentCluster).internalCluster().getDefaultSettings()); }...
/** * Returns path to a random directory that can be used to create a temporary file system repo */
Returns path to a random directory that can be used to create a temporary file system repo
randomRepoPath
{ "repo_name": "sreeramjayan/elasticsearch", "path": "test/framework/src/main/java/org/elasticsearch/test/ESIntegTestCase.java", "license": "apache-2.0", "size": 100953 }
[ "java.nio.file.Path" ]
import java.nio.file.Path;
import java.nio.file.*;
[ "java.nio" ]
java.nio;
2,562,395
public void valueOf(final Type type) { if (type.getSort() == Type.OBJECT || type.getSort() == Type.ARRAY) { return; } if (type == Type.VOID_TYPE) { push((String) null); } else { Type boxed = getBoxedType(type); invokeStatic(boxed, new M...
void function(final Type type) { if (type.getSort() == Type.OBJECT type.getSort() == Type.ARRAY) { return; } if (type == Type.VOID_TYPE) { push((String) null); } else { Type boxed = getBoxedType(type); invokeStatic(boxed, new Method(STR, boxed, new Type[] { type })); } }
/** * Generates the instructions to box the top stack value using Java 5's * valueOf() method. This value is replaced by its boxed equivalent on top * of the stack. * * @param type * the type of the top stack value. */
Generates the instructions to box the top stack value using Java 5's valueOf() method. This value is replaced by its boxed equivalent on top of the stack
valueOf
{ "repo_name": "llbit/ow2-asm", "path": "src/org/objectweb/asm/commons/GeneratorAdapter.java", "license": "bsd-3-clause", "size": 50594 }
[ "org.objectweb.asm.Type" ]
import org.objectweb.asm.Type;
import org.objectweb.asm.*;
[ "org.objectweb.asm" ]
org.objectweb.asm;
929,282
public void init(IGraph g, Metric m) { List<List<Node>> p = this.getPartitioning(g); this.partitionMap = new HashMap<Node, Partition>(); // this.partitions = new Partition[p.size()]; // int index = 0; // for (List<Node> nodes : p) { // this.partitions[index] = this.createPartition("p" + index, g, // no...
void function(IGraph g, Metric m) { List<List<Node>> p = this.getPartitioning(g); this.partitionMap = new HashMap<Node, Partition>(); switch (partitioningType) { case NON_OVERLAPPING: this.partitions = NonOverlappingPartition.getPartitions(g, p, m, this.partitionMap); break; case OVERLAPPING: this.partitions = Overlapp...
/** * * Initializes a partitioning of the given graph for the specified metric. * For each partition, the metric is cloned and assigned to the partition. * * @param g * graph that should be partitioned * @param m * metric (a clone is assigned to each partition) */
Initializes a partitioning of the given graph for the specified metric. For each partition, the metric is cloned and assigned to the partition
init
{ "repo_name": "matjoe/DNA", "path": "src/dna/metrics/parallelization/partitioning/schemes/PartitioningScheme.java", "license": "gpl-3.0", "size": 4604 }
[ "dna.graph.IGraph", "dna.graph.nodes.Node", "dna.metrics.Metric", "dna.metrics.parallelization.collation.PartitionedMetric", "dna.metrics.parallelization.partitioning.NodeCutPartition", "dna.metrics.parallelization.partitioning.NonOverlappingPartition", "dna.metrics.parallelization.partitioning.Overlapp...
import dna.graph.IGraph; import dna.graph.nodes.Node; import dna.metrics.Metric; import dna.metrics.parallelization.collation.PartitionedMetric; import dna.metrics.parallelization.partitioning.NodeCutPartition; import dna.metrics.parallelization.partitioning.NonOverlappingPartition; import dna.metrics.parallelization.p...
import dna.graph.*; import dna.graph.nodes.*; import dna.metrics.*; import dna.metrics.parallelization.collation.*; import dna.metrics.parallelization.partitioning.*; import java.util.*;
[ "dna.graph", "dna.graph.nodes", "dna.metrics", "dna.metrics.parallelization", "java.util" ]
dna.graph; dna.graph.nodes; dna.metrics; dna.metrics.parallelization; java.util;
1,599,612
private void mergeAndWorkAsNecessary(int label, int pred, Subroutine calledSubroutine, Frame frame, int[] workSet) { Frame existing = startFrames[label]; Frame merged; if (existing != null) { if (calledSubroutine != null) { merged = exist...
void function(int label, int pred, Subroutine calledSubroutine, Frame frame, int[] workSet) { Frame existing = startFrames[label]; Frame merged; if (existing != null) { if (calledSubroutine != null) { merged = existing.mergeWithSubroutineCaller(frame, calledSubroutine.getStartBlock(), pred); } else { merged = existing....
/** * Helper for {@link #processBlock}, which merges frames and * adds to the work set, as necessary. * * @param label {@code >= 0;} label to work on * @param pred predecessor label; must be {@code >= 0} when * {@code label} is a subroutine start block and calledSubroutine * is non-n...
Helper for <code>#processBlock</code>, which merges frames and adds to the work set, as necessary
mergeAndWorkAsNecessary
{ "repo_name": "MarkRunWu/buck", "path": "third-party/java/dx-from-kitkat/src/com/android/dx/cf/code/Ropper.java", "license": "apache-2.0", "size": 59948 }
[ "com.android.dx.util.Bits" ]
import com.android.dx.util.Bits;
import com.android.dx.util.*;
[ "com.android.dx" ]
com.android.dx;
2,317,830
protected List<KeyVerificator> getKeyVerificatorsDelegate() { return getKeyVerificators(); }
List<KeyVerificator> function() { return getKeyVerificators(); }
/** * just an alias for the delegated method */
just an alias for the delegated method
getKeyVerificatorsDelegate
{ "repo_name": "ChristophSonnberger/crypto", "path": "org.jcryptool.crypto.classic.model/src/org/jcryptool/crypto/classic/model/ui/wizard/AbstractClassicCryptoPage.java", "license": "epl-1.0", "size": 40823 }
[ "java.util.List", "org.jcryptool.core.operations.keys.KeyVerificator" ]
import java.util.List; import org.jcryptool.core.operations.keys.KeyVerificator;
import java.util.*; import org.jcryptool.core.operations.keys.*;
[ "java.util", "org.jcryptool.core" ]
java.util; org.jcryptool.core;
1,796,248
private void printExtraInfo() { StringBuilder sb = new StringBuilder(); int m = Database.getObjNumber(), // the size of the input dataset: m x n n = Database.getAttrNumber(); // that is: m lines, n columns sb.append("#").append("\n"); sb.append("# Input DB siz...
void function() { StringBuilder sb = new StringBuilder(); int m = Database.getObjNumber(), n = Database.getAttrNumber(); sb.append("#").append("\n"); sb.append(STR).append(m).append(STR).append(n).append("\n"); sb.append(STR) .append("(").append(m).append(STR).append(m-1).append(STR).append(")") .append(STR) .append("(...
/** * Print some info about the size of the input and output datasets. */
Print some info about the size of the input and output datasets
printExtraInfo
{ "repo_name": "jabbalaci/Talky-G", "path": "src/main/java/fr/loria/coronsys/coron/helper/extra/PairWriter.java", "license": "gpl-3.0", "size": 6333 }
[ "fr.loria.coronsys.coron.helper.Database" ]
import fr.loria.coronsys.coron.helper.Database;
import fr.loria.coronsys.coron.helper.*;
[ "fr.loria.coronsys" ]
fr.loria.coronsys;
2,140,859
public static IntValuedEnum<RTresult> rtVariableGet2f(RTvariable v, Pointer<Float> f1, Pointer<Float> f2) { return FlagSet.fromValue(rtVariableGet2f(Pointer.getPeer(v), Pointer.getPeer(f1), Pointer.getPeer(f2)), RTresult.class); }
static IntValuedEnum<RTresult> function(RTvariable v, Pointer<Float> f1, Pointer<Float> f2) { return FlagSet.fromValue(rtVariableGet2f(Pointer.getPeer(v), Pointer.getPeer(f1), Pointer.getPeer(f2)), RTresult.class); }
/** * Original signature : <code>RTresult rtVariableGet2f(RTvariable, float*, float*)</code><br> * <i>native declaration : include\optix_host.h:655</i> */
Original signature : <code>RTresult rtVariableGet2f(RTvariable, float*, float*)</code> native declaration : include\optix_host.h:655
rtVariableGet2f
{ "repo_name": "fetox74/optix-wrapper", "path": "src/main/java/com/fetoxdevelopments/optix/api/RT.java", "license": "mit", "size": 162970 }
[ "com.fetoxdevelopments.optix.api.enumeration.RTresult", "com.fetoxdevelopments.optix.api.struct.RTvariable", "org.bridj.FlagSet", "org.bridj.IntValuedEnum", "org.bridj.Pointer" ]
import com.fetoxdevelopments.optix.api.enumeration.RTresult; import com.fetoxdevelopments.optix.api.struct.RTvariable; import org.bridj.FlagSet; import org.bridj.IntValuedEnum; import org.bridj.Pointer;
import com.fetoxdevelopments.optix.api.enumeration.*; import com.fetoxdevelopments.optix.api.struct.*; import org.bridj.*;
[ "com.fetoxdevelopments.optix", "org.bridj" ]
com.fetoxdevelopments.optix; org.bridj;
861,049
@Test (expected = PicturesComparator.PicturesComparatorException.class) public void comparePicturesWithTooBigThreshold() throws PicturesComparator.PicturesComparatorException { l(this, "@Test comparePicturesWithTooBigThreshold"); PicturesComparator pc = new PixelByPixelPicturesComparator(); ...
@Test (expected = PicturesComparator.PicturesComparatorException.class) void function() throws PicturesComparator.PicturesComparatorException { l(this, STR); PicturesComparator pc = new PixelByPixelPicturesComparator(); assertFalse( pc.comparePictures(createEmptyBitmap(5, 5), createEmptyBitmap(5, 5), 101) ); }
/** * Tests the comparePictures() method with a too big threshold * * <i>If a to big threshold is used, an exception is thrown</i> */
Tests the comparePictures() method with a too big threshold If a to big threshold is used, an exception is thrown
comparePicturesWithTooBigThreshold
{ "repo_name": "pylapp/SmoothClicker", "path": "app/app/src/androidTest/java/pylapp/smoothclicker/android/tools/screen/ItPixelByPixelPicturesComparator.java", "license": "mit", "size": 12817 }
[ "junit.framework.Assert", "org.junit.Test" ]
import junit.framework.Assert; import org.junit.Test;
import junit.framework.*; import org.junit.*;
[ "junit.framework", "org.junit" ]
junit.framework; org.junit;
1,104,960
public Map<String, Object> getExtensions() { return extensions; }
Map<String, Object> function() { return extensions; }
/** * Returns enabled extensions. * * @return extensions */
Returns enabled extensions
getExtensions
{ "repo_name": "hof/wstcp-text-proxy", "path": "src/main/java/org/red5/net/websocket/WebSocketConnection.java", "license": "apache-2.0", "size": 8893 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,968,800
private boolean insertImageFromMediaContent(NewsViewHolder holder) { if (mCursor.getString(FeedFragment.INDEX_MEDIACONTENT) != null && !TextUtils.isEmpty(mCursor.getString(FeedFragment.INDEX_MEDIACONTENT))) { Picasso.with(mContext).load(mCursor.getString(FeedFragment.INDEX_MEDIAC...
boolean function(NewsViewHolder holder) { if (mCursor.getString(FeedFragment.INDEX_MEDIACONTENT) != null && !TextUtils.isEmpty(mCursor.getString(FeedFragment.INDEX_MEDIACONTENT))) { Picasso.with(mContext).load(mCursor.getString(FeedFragment.INDEX_MEDIACONTENT)).fit() .into(holder.imageView); return true; } return false...
/** * Insert the image from the media:content field in the Cursor. If there is a problem in the XML * and it returns null, we simply use the default thumbnail. * * @param holder the relevant ViewHolder * @return whether or not the image was successfully found and applied */
Insert the image from the media:content field in the Cursor. If there is a problem in the XML and it returns null, we simply use the default thumbnail
insertImageFromMediaContent
{ "repo_name": "benway0/Mundo", "path": "app/src/main/java/com/github/benway0/mundo/adapters/NewsAdapter.java", "license": "gpl-3.0", "size": 22194 }
[ "android.text.TextUtils", "com.github.benway0.mundo.fragments.FeedFragment", "com.squareup.picasso.Picasso" ]
import android.text.TextUtils; import com.github.benway0.mundo.fragments.FeedFragment; import com.squareup.picasso.Picasso;
import android.text.*; import com.github.benway0.mundo.fragments.*; import com.squareup.picasso.*;
[ "android.text", "com.github.benway0", "com.squareup.picasso" ]
android.text; com.github.benway0; com.squareup.picasso;
2,368,762
Answer command = new Answer(); assertEquals("ANSWER", CommandProcessor.buildCommand(command)); }
Answer command = new Answer(); assertEquals(STR, CommandProcessor.buildCommand(command)); }
/** * Test method. * * @throws AgiException if command is malformed. */
Test method
testCommand
{ "repo_name": "fonoster/astivetoolkit", "path": "astive-agi/src/test/java/com/fonoster/astive/agi/test/AnswerTest.java", "license": "apache-2.0", "size": 1455 }
[ "com.fonoster.astive.agi.CommandProcessor", "com.fonoster.astive.agi.command.Answer" ]
import com.fonoster.astive.agi.CommandProcessor; import com.fonoster.astive.agi.command.Answer;
import com.fonoster.astive.agi.*; import com.fonoster.astive.agi.command.*;
[ "com.fonoster.astive" ]
com.fonoster.astive;
2,809,019
public static void addText(FileWriter fw, String text, boolean quoteValue) throws IOException { if (quoteValue) addText(fw, "\"" + text + "\""); else addText(fw,text); } //addText
static void function(FileWriter fw, String text, boolean quoteValue) throws IOException { if (quoteValue) addText(fw, "\"STR\""); else addText(fw,text); }
/** * addLine * Add line * @param FileWriter fw * @param String line * @param boolean quoteValue ? surround the line with double quotes : do not surround the values with double quotes */
addLine Add line
addText
{ "repo_name": "arthurmelo88/palmetalADP", "path": "adempierelbr/base/src/org/adempierelbr/util/TextUtil.java", "license": "gpl-2.0", "size": 24715 }
[ "java.io.FileWriter", "java.io.IOException" ]
import java.io.FileWriter; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,424,757
public static void setApplication(GrailsApplication app) { application = app; initializeContext(); }
static void function(GrailsApplication app) { application = app; initializeContext(); }
/** * Set at startup by plugin. * @param app the application */
Set at startup by plugin
setApplication
{ "repo_name": "ParadigmasAMW/pp-forum", "path": "target/work/plugins/spring-security-core-2.0-RC4/src/java/grails/plugin/springsecurity/SpringSecurityUtils.java", "license": "gpl-2.0", "size": 27009 }
[ "org.codehaus.groovy.grails.commons.GrailsApplication" ]
import org.codehaus.groovy.grails.commons.GrailsApplication;
import org.codehaus.groovy.grails.commons.*;
[ "org.codehaus.groovy" ]
org.codehaus.groovy;
2,251,143
public List<Role> findByMenuItems(MenuItem menuItems);
List<Role> function(MenuItem menuItems);
/** * Find by reference: menuItems */
Find by reference: menuItems
findByMenuItems
{ "repo_name": "seava/seava.mod.ad", "path": "seava.mod.ad.business.api/src/main/java/seava/ad/business/api/security/IRoleService.java", "license": "apache-2.0", "size": 1645 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,311,648
public void removeCoprocessor(String className) { ImmutableBytesWritable match = null; Matcher keyMatcher; Matcher valueMatcher; for (Map.Entry<ImmutableBytesWritable, ImmutableBytesWritable> e : this.values .entrySet()) { keyMatcher = HConstants.CP_HTD_ATTR_KEY_PATTERN.matcher(Bytes.toS...
void function(String className) { ImmutableBytesWritable match = null; Matcher keyMatcher; Matcher valueMatcher; for (Map.Entry<ImmutableBytesWritable, ImmutableBytesWritable> e : this.values .entrySet()) { keyMatcher = HConstants.CP_HTD_ATTR_KEY_PATTERN.matcher(Bytes.toString(e .getKey().get())); if (!keyMatcher.match...
/** * Remove a coprocessor from those set on the table * @param className Class name of the co-processor */
Remove a coprocessor from those set on the table
removeCoprocessor
{ "repo_name": "mapr/hbase", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/HTableDescriptor.java", "license": "apache-2.0", "size": 51244 }
[ "java.util.Map", "java.util.regex.Matcher", "org.apache.hadoop.hbase.io.ImmutableBytesWritable", "org.apache.hadoop.hbase.util.Bytes" ]
import java.util.Map; import java.util.regex.Matcher; import org.apache.hadoop.hbase.io.ImmutableBytesWritable; import org.apache.hadoop.hbase.util.Bytes;
import java.util.*; import java.util.regex.*; import org.apache.hadoop.hbase.io.*; import org.apache.hadoop.hbase.util.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
1,172,732
public SubmissionEndpointReferenceBuilder referenceParameter(Element referenceParameter) { if (referenceParameter == null) { throw new IllegalArgumentException(Messages.getMessage("referenceParameterNullErr")); } if (this.referenceParameters == null) { ...
SubmissionEndpointReferenceBuilder function(Element referenceParameter) { if (referenceParameter == null) { throw new IllegalArgumentException(Messages.getMessage(STR)); } if (this.referenceParameters == null) { this.referenceParameters = new ArrayList<Element>(); } this.referenceParameters.add(referenceParameter); ret...
/** * Add reference parameters. * * @param referenceParameter the reference parameter * @return an instance of <code>SubmissionEndpointReferenceBuilder</code> that has * been updated as specified. */
Add reference parameters
referenceParameter
{ "repo_name": "manuranga/wso2-axis2", "path": "modules/jaxws/src/org/apache/axis2/jaxws/addressing/SubmissionEndpointReferenceBuilder.java", "license": "apache-2.0", "size": 8126 }
[ "java.util.ArrayList", "org.apache.axis2.jaxws.i18n.Messages", "org.w3c.dom.Element" ]
import java.util.ArrayList; import org.apache.axis2.jaxws.i18n.Messages; import org.w3c.dom.Element;
import java.util.*; import org.apache.axis2.jaxws.i18n.*; import org.w3c.dom.*;
[ "java.util", "org.apache.axis2", "org.w3c.dom" ]
java.util; org.apache.axis2; org.w3c.dom;
2,659,457
List<Double> list = new ArrayList<>(); for (int i = start; i <= end; i++) { list.add(func.apply((double) i)); } return list; }
List<Double> list = new ArrayList<>(); for (int i = start; i <= end; i++) { list.add(func.apply((double) i)); } return list; }
/** * finction diapason. * @param start start index diapason * @param end finish index diapason * @param func function * @return list of function return in diapason */
finction diapason
diapason
{ "repo_name": "mixed2004/borisovm", "path": "chapter_004/src/main/java/ru/job4j/functionindiapazone/Diapason.java", "license": "apache-2.0", "size": 734 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,353,826
public static IVaadinApplication getVaadinWebApplication(String name) { try { Collection<ServiceReference<IVaadinApplication>> refs = bundleContext .getServiceReferences(IVaadinApplication.class, "(component.name=" + name + ")"); if (refs.size() > 0) { ServiceReference<IVaadinApplication> ref...
static IVaadinApplication function(String name) { try { Collection<ServiceReference<IVaadinApplication>> refs = bundleContext .getServiceReferences(IVaadinApplication.class, STR + name + ")"); if (refs.size() > 0) { ServiceReference<IVaadinApplication> ref = refs.iterator() .next(); return bundleContext.getService(ref)...
/** * Returns the vaadin web application with the given name. * * @param name * @return */
Returns the vaadin web application with the given name
getVaadinWebApplication
{ "repo_name": "lunifera/lunifera-runtime-web", "path": "org.lunifera.runtime.web.vaadin.osgi/src/org/lunifera/runtime/web/vaadin/osgi/Activator.java", "license": "epl-1.0", "size": 3851 }
[ "java.util.Collection", "org.lunifera.runtime.web.vaadin.osgi.common.IVaadinApplication", "org.osgi.framework.InvalidSyntaxException", "org.osgi.framework.ServiceReference" ]
import java.util.Collection; import org.lunifera.runtime.web.vaadin.osgi.common.IVaadinApplication; import org.osgi.framework.InvalidSyntaxException; import org.osgi.framework.ServiceReference;
import java.util.*; import org.lunifera.runtime.web.vaadin.osgi.common.*; import org.osgi.framework.*;
[ "java.util", "org.lunifera.runtime", "org.osgi.framework" ]
java.util; org.lunifera.runtime; org.osgi.framework;
730,913
public void setProduct(ProductDTO product) { this.product = product; }
void function(ProductDTO product) { this.product = product; }
/** * Establece el valor del atributo product. * * @param product nuevo valor del atributo * @generated */
Establece el valor del atributo product
setProduct
{ "repo_name": "Uniandes-MISO4203/turism-201620-2", "path": "turism-api/src/main/java/co/edu/uniandes/csw/turism/dtos/detail/BuyDetailDTO.java", "license": "mit", "size": 1980 }
[ "co.edu.uniandes.csw.turism.dtos.minimum.ProductDTO" ]
import co.edu.uniandes.csw.turism.dtos.minimum.ProductDTO;
import co.edu.uniandes.csw.turism.dtos.minimum.*;
[ "co.edu.uniandes" ]
co.edu.uniandes;
2,794,688
public ScriptGenerator addInternal(String... parameters) { myInternalParameters.addAll(Arrays.asList(parameters)); return this; }
ScriptGenerator function(String... parameters) { myInternalParameters.addAll(Arrays.asList(parameters)); return this; }
/** * Add internal parameters for the script * * @param parameters internal parameters * @return this script generator */
Add internal parameters for the script
addInternal
{ "repo_name": "jexp/idea2", "path": "plugins/git4idea/src/git4idea/commands/ScriptGenerator.java", "license": "apache-2.0", "size": 5503 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
2,566,198
public Term copyGoal(AbstractMap<Var,Var> vars, int idExecCtx) { return copy(vars,idExecCtx); }
Term function(AbstractMap<Var,Var> vars, int idExecCtx) { return copy(vars,idExecCtx); }
/** * gets a engine's copy of this term. * @param idExecCtx Execution Context identified */
gets a engine's copy of this term
copyGoal
{ "repo_name": "adlange/IN2SEC", "path": "src/main/dependencies/alice/tuprolog/Term.java", "license": "bsd-3-clause", "size": 10800 }
[ "java.util.AbstractMap" ]
import java.util.AbstractMap;
import java.util.*;
[ "java.util" ]
java.util;
1,450,434
protected boolean setSocketOptions(SocketChannel socket) { // Process the connection try { //disable blocking, APR style, we are gonna be polling it socket.configureBlocking(false); Socket sock = socket.socket(); socketProperties.setProperties(sock); ...
boolean function(SocketChannel socket) { try { socket.configureBlocking(false); Socket sock = socket.socket(); socketProperties.setProperties(sock); NioChannel channel = nioChannels.pop(); if ( channel == null ) { if (sslContext != null) { SSLEngine engine = createSSLEngine(); int appbufsize = engine.getSession().getAp...
/** * Process the specified connection. */
Process the specified connection
setSocketOptions
{ "repo_name": "nrgaway/qubes-tools", "path": "experimental/tomcat/apache-tomcat-8.0.15-src/java/org/apache/tomcat/util/net/NioEndpoint.java", "license": "gpl-2.0", "size": 62883 }
[ "java.net.Socket", "java.nio.channels.SocketChannel", "javax.net.ssl.SSLEngine", "org.apache.tomcat.util.ExceptionUtils" ]
import java.net.Socket; import java.nio.channels.SocketChannel; import javax.net.ssl.SSLEngine; import org.apache.tomcat.util.ExceptionUtils;
import java.net.*; import java.nio.channels.*; import javax.net.ssl.*; import org.apache.tomcat.util.*;
[ "java.net", "java.nio", "javax.net", "org.apache.tomcat" ]
java.net; java.nio; javax.net; org.apache.tomcat;
496,076
public int contains(ValueStoreBase vsb) { final Vector values = vsb.fValues; final int size1 = values.size(); if (fFieldCount <= 1) { for (int i = 0; i < size1; ++i) { short val = vsb.getValueTypeAt(i); if (!valueTypeCo...
int function(ValueStoreBase vsb) { final Vector values = vsb.fValues; final int size1 = values.size(); if (fFieldCount <= 1) { for (int i = 0; i < size1; ++i) { short val = vsb.getValueTypeAt(i); if (!valueTypeContains(val) !fValues.contains(values.elementAt(i))) { return i; } else if(val == XSConstants.LIST_DT val == ...
/** * Returns -1 if this value store contains the specified * values, otherwise the index of the first field in the * key sequence. */
Returns -1 if this value store contains the specified values, otherwise the index of the first field in the key sequence
contains
{ "repo_name": "JetBrains/jdk8u_jaxp", "path": "src/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaValidator.java", "license": "gpl-2.0", "size": 178211 }
[ "com.sun.org.apache.xerces.internal.xs.ShortList", "com.sun.org.apache.xerces.internal.xs.XSConstants", "java.util.Vector" ]
import com.sun.org.apache.xerces.internal.xs.ShortList; import com.sun.org.apache.xerces.internal.xs.XSConstants; import java.util.Vector;
import com.sun.org.apache.xerces.internal.xs.*; import java.util.*;
[ "com.sun.org", "java.util" ]
com.sun.org; java.util;
1,612,585
Optional<Message> sendMessage(Message message);
Optional<Message> sendMessage(Message message);
/** * Initiate a new conversation with the user. The important fields are From, To, Text and Language. * * @param message the message that will initiate a conversation * @return optional message object */
Initiate a new conversation with the user. The important fields are From, To, Text and Language
sendMessage
{ "repo_name": "waveaccess/msbotframework4j", "path": "msbotframework4j-connector/src/main/java/org/msbotframework4j/connector/BotConnectorClient.java", "license": "apache-2.0", "size": 2487 }
[ "com.google.common.base.Optional", "org.msbotframework4j.core.model.Message" ]
import com.google.common.base.Optional; import org.msbotframework4j.core.model.Message;
import com.google.common.base.*; import org.msbotframework4j.core.model.*;
[ "com.google.common", "org.msbotframework4j.core" ]
com.google.common; org.msbotframework4j.core;
1,828,132
public boolean mightMatchNonNestedDocs(Query query, String nestedPath) { if (query instanceof ConstantScoreQuery) { return mightMatchNonNestedDocs(((ConstantScoreQuery) query).getQuery(), nestedPath); } else if (query instanceof BoostQuery) { return mightMatchNonNestedDocs(((...
boolean function(Query query, String nestedPath) { if (query instanceof ConstantScoreQuery) { return mightMatchNonNestedDocs(((ConstantScoreQuery) query).getQuery(), nestedPath); } else if (query instanceof BoostQuery) { return mightMatchNonNestedDocs(((BoostQuery) query).getQuery(), nestedPath); } else if (query insta...
/** Returns true if the given query might match parent documents or documents * that are nested under a different path. */
Returns true if the given query might match parent documents or documents
mightMatchNonNestedDocs
{ "repo_name": "s1monw/elasticsearch", "path": "server/src/main/java/org/elasticsearch/index/search/NestedHelper.java", "license": "apache-2.0", "size": 8656 }
[ "org.apache.lucene.search.BooleanClause", "org.apache.lucene.search.BooleanQuery", "org.apache.lucene.search.BoostQuery", "org.apache.lucene.search.ConstantScoreQuery", "org.apache.lucene.search.IndexOrDocValuesQuery", "org.apache.lucene.search.MatchAllDocsQuery", "org.apache.lucene.search.MatchNoDocsQu...
import org.apache.lucene.search.BooleanClause; import org.apache.lucene.search.BooleanQuery; import org.apache.lucene.search.BoostQuery; import org.apache.lucene.search.ConstantScoreQuery; import org.apache.lucene.search.IndexOrDocValuesQuery; import org.apache.lucene.search.MatchAllDocsQuery; import org.apache.lucene....
import org.apache.lucene.search.*;
[ "org.apache.lucene" ]
org.apache.lucene;
1,442,253
T visitWindowSource(@NotNull CQLParser.WindowSourceContext ctx);
T visitWindowSource(@NotNull CQLParser.WindowSourceContext ctx);
/** * Visit a parse tree produced by {@link CQLParser#windowSource}. */
Visit a parse tree produced by <code>CQLParser#windowSource</code>
visitWindowSource
{ "repo_name": "HuaweiBigData/StreamCQL", "path": "cql/src/main/java/com/huawei/streaming/cql/semanticanalyzer/parser/CQLParserVisitor.java", "license": "apache-2.0", "size": 29279 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
2,161,028
@Override public void enterTypeList(@NotNull Java7Parser.TypeListContext ctx) { }
@Override public void enterTypeList(@NotNull Java7Parser.TypeListContext ctx) { }
/** * {@inheritDoc} * * <p>The default implementation does nothing.</p> */
The default implementation does nothing
exitClassBodyDeclaration
{ "repo_name": "jsteenbeeke/antlr-java-parser", "path": "src/main/java/com/github/antlrjavaparser/Java7ParserBaseListener.java", "license": "lgpl-3.0", "size": 53492 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
1,899,411
@Override public void contributeToToolBar(IToolBarManager toolBarManager) { toolBarManager.add(new Separator("esb-settings")); toolBarManager.add(new Separator("esb-additions")); }
void function(IToolBarManager toolBarManager) { toolBarManager.add(new Separator(STR)); toolBarManager.add(new Separator(STR)); }
/** * This adds Separators for editor additions to the tool bar. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds Separators for editor additions to the tool bar.
contributeToToolBar
{ "repo_name": "chanakaudaya/developer-studio", "path": "esb/org.wso2.developerstudio.eclipse.esb.editor/src/org/wso2/developerstudio/eclipse/esb/presentation/EsbActionBarContributor.java", "license": "apache-2.0", "size": 20845 }
[ "org.eclipse.jface.action.IToolBarManager", "org.eclipse.jface.action.Separator" ]
import org.eclipse.jface.action.IToolBarManager; import org.eclipse.jface.action.Separator;
import org.eclipse.jface.action.*;
[ "org.eclipse.jface" ]
org.eclipse.jface;
1,777,898
protected PlanVersionBean createPlanVersionInternal(NewPlanVersionBean bean, PlanBean plan) throws StorageException { if (!BeanUtils.isValidVersion(bean.getVersion())) { throw new StorageException("Invalid/illegal plan version: " + bean.getVersion()); //$NON-NLS-1$ } ...
PlanVersionBean function(NewPlanVersionBean bean, PlanBean plan) throws StorageException { if (!BeanUtils.isValidVersion(bean.getVersion())) { throw new StorageException(STR + bean.getVersion()); } PlanVersionBean newVersion = new PlanVersionBean(); newVersion.setCreatedBy(securityContext.getCurrentUser()); newVersion....
/** * Creates a plan version. * @param bean * @param plan * @throws StorageException */
Creates a plan version
createPlanVersionInternal
{ "repo_name": "KurtStam/apiman", "path": "manager/api/rest-impl/src/main/java/io/apiman/manager/api/rest/impl/OrganizationResourceImpl.java", "license": "apache-2.0", "size": 164342 }
[ "io.apiman.manager.api.beans.BeanUtils", "io.apiman.manager.api.beans.plans.NewPlanVersionBean", "io.apiman.manager.api.beans.plans.PlanBean", "io.apiman.manager.api.beans.plans.PlanStatus", "io.apiman.manager.api.beans.plans.PlanVersionBean", "io.apiman.manager.api.core.exceptions.StorageException", "i...
import io.apiman.manager.api.beans.BeanUtils; import io.apiman.manager.api.beans.plans.NewPlanVersionBean; import io.apiman.manager.api.beans.plans.PlanBean; import io.apiman.manager.api.beans.plans.PlanStatus; import io.apiman.manager.api.beans.plans.PlanVersionBean; import io.apiman.manager.api.core.exceptions.Storag...
import io.apiman.manager.api.beans.*; import io.apiman.manager.api.beans.plans.*; import io.apiman.manager.api.core.exceptions.*; import io.apiman.manager.api.rest.impl.audit.*; import java.util.*;
[ "io.apiman.manager", "java.util" ]
io.apiman.manager; java.util;
1,111
@Override public void onSaveInstanceState(Bundle outState) { // BEGIN_INCLUDE(saveinstance) super.onSaveInstanceState(outState); // Store all variables required to restore the state of the application outState.putInt(BUNDLE_LATENCY, mMaxDelay); outState.putInt(BUNDLE_STAT...
void function(Bundle outState) { super.onSaveInstanceState(outState); outState.putInt(BUNDLE_LATENCY, mMaxDelay); outState.putInt(BUNDLE_STATE, mState); outState.putInt(BUNDLE_STEPS, mSteps); }
/** * Records the state of the application into the {@link android.os.Bundle}. * * @param outState */
Records the state of the application into the <code>android.os.Bundle</code>
onSaveInstanceState
{ "repo_name": "s20121035/rk3288_android5.1_repo", "path": "developers/samples/android/sensors/BatchStepSensor/Application/src/main/java/com/example/android/batchstepsensor/BatchStepSensorFragment.java", "license": "gpl-3.0", "size": 25011 }
[ "android.os.Bundle" ]
import android.os.Bundle;
import android.os.*;
[ "android.os" ]
android.os;
327
boolean isAcrossGroups() { List<DataObject> l = getSelectedObjects(); if (l == null || l.size() == 0) return false; List<Long> ids = new ArrayList<Long>(); Iterator<DataObject> i = l.iterator(); DataObject data; while (i.hasNext()) { data = i.next(); if (!ids.contains(data.getGroupId())) ids....
boolean isAcrossGroups() { List<DataObject> l = getSelectedObjects(); if (l == null l.size() == 0) return false; List<Long> ids = new ArrayList<Long>(); Iterator<DataObject> i = l.iterator(); DataObject data; while (i.hasNext()) { data = i.next(); if (!ids.contains(data.getGroupId())) ids.add(data.getGroupId()); } retu...
/** * Returns <code>true</code> if the selected objects belong to several * groups, <code>false</code> otherwise. * * @return See above. */
Returns <code>true</code> if the selected objects belong to several groups, <code>false</code> otherwise
isAcrossGroups
{ "repo_name": "dpwrussell/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/metadata/editor/EditorModel.java", "license": "gpl-2.0", "size": 130987 }
[ "java.util.ArrayList", "java.util.Iterator", "java.util.List" ]
import java.util.ArrayList; import java.util.Iterator; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,735,697
public final Type getType() { return type; }
final Type function() { return type; }
/** * <p> * Returns the type of the field. * </p> * * @return the field type */
Returns the type of the field.
getType
{ "repo_name": "ManfredTremmel/gwt-commons-lang3", "path": "src/main/java/org/apache/commons/lang3/builder/Diff.java", "license": "apache-2.0", "size": 3321 }
[ "java.lang.reflect.Type" ]
import java.lang.reflect.Type;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
1,543,230
private static void checkKey( final String authorizationKey, final HttpServletRequest request, final HttpServletResponse response ) throws IOException { LOGGER.fine( "Authorization key: " + authorizationKey ); PersistenceManager pm = null; try { pm = PMF.get().getPersistenceManager(); response.s...
static void function( final String authorizationKey, final HttpServletRequest request, final HttpServletResponse response ) throws IOException { LOGGER.fine( STR + authorizationKey ); PersistenceManager pm = null; try { pm = PMF.get().getPersistenceManager(); response.setContentType( STR ); setNoCache( response ); resp...
/** * Checks the authorization key.<br> * Sends back a plain text response: 1 line exactly, the boolean result of the key being valid (true or false). * @param authorizationKey authorization key to check */
Checks the authorization key. Sends back a plain text response: 1 line exactly, the boolean result of the key being valid (true or false)
checkKey
{ "repo_name": "icza/sc2gears", "path": "src-sc2gearsdb/hu/belicza/andras/sc2gearsdb/InfoServlet.java", "license": "apache-2.0", "size": 26806 }
[ "hu.belicza.andras.sc2gearsdb.util.CachingService", "hu.belicza.andras.sc2gearsdb.util.PMF", "java.io.IOException", "javax.jdo.PersistenceManager", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import hu.belicza.andras.sc2gearsdb.util.CachingService; import hu.belicza.andras.sc2gearsdb.util.PMF; import java.io.IOException; import javax.jdo.PersistenceManager; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import hu.belicza.andras.sc2gearsdb.util.*; import java.io.*; import javax.jdo.*; import javax.servlet.http.*;
[ "hu.belicza.andras", "java.io", "javax.jdo", "javax.servlet" ]
hu.belicza.andras; java.io; javax.jdo; javax.servlet;
525,816
public static PropertyDirection create(String name) { return create(name, Predicates.<EnumFacing>alwaysTrue()); }
static PropertyDirection function(String name) { return create(name, Predicates.<EnumFacing>alwaysTrue()); }
/** * Create a new PropertyDirection with the given name */
Create a new PropertyDirection with the given name
create
{ "repo_name": "gcewing/SGCraft", "path": "src/base/gcewing/sg/PropertyDirection.java", "license": "mit", "size": 1436 }
[ "com.google.common.base.Predicates", "net.minecraft.util.EnumFacing" ]
import com.google.common.base.Predicates; import net.minecraft.util.EnumFacing;
import com.google.common.base.*; import net.minecraft.util.*;
[ "com.google.common", "net.minecraft.util" ]
com.google.common; net.minecraft.util;
838,026
protected void dragStart(float x, float y, long downTime) { TouchCommon.dragStart(getActivity(), x, y, downTime); }
void function(float x, float y, long downTime) { TouchCommon.dragStart(getActivity(), x, y, downTime); }
/** * Starts (synchronously) a drag motion. Normally followed by dragTo() and dragEnd(). * * @param x * @param y * @param downTime (in ms) * @see TestTouchUtils */
Starts (synchronously) a drag motion. Normally followed by dragTo() and dragEnd()
dragStart
{ "repo_name": "Just-D/chromium-1", "path": "chrome/test/android/javatests/src/org/chromium/chrome/test/ChromeActivityTestCaseBase.java", "license": "bsd-3-clause", "size": 40833 }
[ "org.chromium.content.browser.test.util.TouchCommon" ]
import org.chromium.content.browser.test.util.TouchCommon;
import org.chromium.content.browser.test.util.*;
[ "org.chromium.content" ]
org.chromium.content;
2,035,900
List<BigInteger> getStartPoint();
List<BigInteger> getStartPoint();
/** * Returns the value of the '<em><b>Start Point</b></em>' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * <!-- begin-model-doc --> * Index position of the first grid post, which must lie somwhere in the GridEnvelope. If absent, the startPoint is equal to the value of gridEnve...
Returns the value of the 'Start Point' attribute. Index position of the first grid post, which must lie somwhere in the GridEnvelope. If absent, the startPoint is equal to the value of gridEnvelope::low from the grid definition.
getStartPoint
{ "repo_name": "geotools/geotools", "path": "modules/ogc/net.opengis.wmts/src/net/opengis/gml311/GridFunctionType.java", "license": "lgpl-2.1", "size": 3180 }
[ "java.math.BigInteger", "java.util.List" ]
import java.math.BigInteger; import java.util.List;
import java.math.*; import java.util.*;
[ "java.math", "java.util" ]
java.math; java.util;
1,067,964
private void fillAboveAndBelow(View sel, int position) { final int dividerHeight = mDividerHeight; if (!mStackFromBottom) { fillUp(position - 1, sel.getTop() - dividerHeight); adjustViewsUpOrDown(); fillDown(position + 1, sel.getBottom() + dividerHeight); ...
void function(View sel, int position) { final int dividerHeight = mDividerHeight; if (!mStackFromBottom) { fillUp(position - 1, sel.getTop() - dividerHeight); adjustViewsUpOrDown(); fillDown(position + 1, sel.getBottom() + dividerHeight); } else { fillDown(position + 1, sel.getBottom() + dividerHeight); adjustViewsUpOr...
/** * Once the selected view as been placed, fill up the visible area above and * below it. * * @param sel The selected view * @param position The position corresponding to sel */
Once the selected view as been placed, fill up the visible area above and below it
fillAboveAndBelow
{ "repo_name": "mateor/PDroidHistory", "path": "frameworks/base/core/java/android/widget/ListView.java", "license": "gpl-3.0", "size": 141583 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
1,719,128
@Override public InputStream getInputStream() throws IOException { return IOUtil.toBufferedInputStream(_file.getInputStream()); }
InputStream function() throws IOException { return IOUtil.toBufferedInputStream(_file.getInputStream()); }
/** * Get input stream. * * @returns Input stream * @throws IOException IO exception occurred */
Get input stream
getInputStream
{ "repo_name": "jzuijlek/Lucee", "path": "core/src/main/java/lucee/commons/activation/ResourceDataSource.java", "license": "lgpl-2.1", "size": 2393 }
[ "java.io.IOException", "java.io.InputStream" ]
import java.io.IOException; import java.io.InputStream;
import java.io.*;
[ "java.io" ]
java.io;
1,412,191
Optional<UserPrefs> readUserPrefs() throws DataConversionException, IOException;
Optional<UserPrefs> readUserPrefs() throws DataConversionException, IOException;
/** * Returns UserPrefs data from storage. Returns {@code Optional.empty()} if storage file is not * found. * * @throws DataConversionException * if the data in storage is not in the expected format. * @throws IOException * if there was any problem when reading...
Returns UserPrefs data from storage. Returns Optional.empty() if storage file is not found
readUserPrefs
{ "repo_name": "CS2103JAN2017-F11-B2/main", "path": "src/main/java/seedu/task/storage/UserPrefsStorage.java", "license": "mit", "size": 1043 }
[ "java.io.IOException", "java.util.Optional" ]
import java.io.IOException; import java.util.Optional;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,661,519
public void pasteJob() { if ( RepositorySecurityUI.verifyOperations( shell, rep, RepositoryOperation.MODIFY_JOB, RepositoryOperation.EXECUTE_JOB ) ) { return; } String xml = fromClipboard(); try { Document doc = XMLHandler.loadXMLString( xml ); JobMeta jobMeta = new JobMeta...
void function() { if ( RepositorySecurityUI.verifyOperations( shell, rep, RepositoryOperation.MODIFY_JOB, RepositoryOperation.EXECUTE_JOB ) ) { return; } String xml = fromClipboard(); try { Document doc = XMLHandler.loadXMLString( xml ); JobMeta jobMeta = new JobMeta( XMLHandler.getSubNode( doc, JobMeta.XML_TAG ), rep,...
/** * Paste job from the clipboard... * */
Paste job from the clipboard..
pasteJob
{ "repo_name": "codek/pentaho-kettle", "path": "ui/src/org/pentaho/di/ui/spoon/Spoon.java", "license": "apache-2.0", "size": 340171 }
[ "org.pentaho.di.core.exception.KettleException", "org.pentaho.di.core.xml.XMLHandler", "org.pentaho.di.i18n.BaseMessages", "org.pentaho.di.job.JobMeta", "org.pentaho.di.repository.RepositoryOperation", "org.pentaho.di.ui.core.dialog.ErrorDialog", "org.pentaho.di.ui.repository.RepositorySecurityUI", "o...
import org.pentaho.di.core.exception.KettleException; import org.pentaho.di.core.xml.XMLHandler; import org.pentaho.di.i18n.BaseMessages; import org.pentaho.di.job.JobMeta; import org.pentaho.di.repository.RepositoryOperation; import org.pentaho.di.ui.core.dialog.ErrorDialog; import org.pentaho.di.ui.repository.Reposit...
import org.pentaho.di.core.exception.*; import org.pentaho.di.core.xml.*; import org.pentaho.di.i18n.*; import org.pentaho.di.job.*; import org.pentaho.di.repository.*; import org.pentaho.di.ui.core.dialog.*; import org.pentaho.di.ui.repository.*; import org.w3c.dom.*;
[ "org.pentaho.di", "org.w3c.dom" ]
org.pentaho.di; org.w3c.dom;
624,712
//COMPATIBILITY NOTE: it is not Completable to prevent migration of old code @NonNull public Observable<?> forceSet(@Nullable final TObject newValue) { return internalSet(newValue, false).toObservable(); }
Observable<?> function(@Nullable final TObject newValue) { return internalSet(newValue, false).toObservable(); }
/** * Creates observable which is async setting value to store. * It is not checking if stored value equals new value. * In result it will be faster to not get value from store and compare but it will emit item to {@link #observe()} subscribers. * NOTE: It could emit ONLY completed and errors events...
Creates observable which is async setting value to store. It is not checking if stored value equals new value. In result it will be faster to not get value from store and compare but it will emit item to <code>#observe()</code> subscribers
forceSet
{ "repo_name": "TouchInstinct/RoboSwag-core", "path": "src/main/java/ru/touchin/roboswag/core/observables/storable/BaseStorable.java", "license": "apache-2.0", "size": 21411 }
[ "android.support.annotation.Nullable" ]
import android.support.annotation.Nullable;
import android.support.annotation.*;
[ "android.support" ]
android.support;
497,331
try { UserProvisioningManager upm = getUpm(); //getProtection using protection group name ProtectionGroup pg = getPGByPGName(pgName); String [] roleNameList = roleNames.split(","); String [] roleIds = new String[roleNameList.length]; for (int i=0; i < roleNameList.length; ++i) { Role role = getR...
try { UserProvisioningManager upm = getUpm(); ProtectionGroup pg = getPGByPGName(pgName); String [] roleNameList = roleNames.split(","); String [] roleIds = new String[roleNameList.length]; for (int i=0; i < roleNameList.length; ++i) { Role role = getRoleByRoleName(roleNameList[i]); roleIds[i] = role.getId().toString()...
/** * This method deassign an user to a protection group with a role * * @return String - the status of operation */
This method deassign an user to a protection group with a role
constructResponse
{ "repo_name": "NCIP/national-biomedical-image-archive", "path": "software/nbia-api/src/gov/nih/nci/nbia/restAPI/V3_modifyRolesOfUserForPG.java", "license": "bsd-3-clause", "size": 2345 }
[ "gov.nih.nci.security.UserProvisioningManager", "gov.nih.nci.security.authorization.domainobjects.ProtectionGroup", "gov.nih.nci.security.authorization.domainobjects.Role", "gov.nih.nci.security.authorization.domainobjects.User", "gov.nih.nci.security.exceptions.CSConfigurationException", "gov.nih.nci.sec...
import gov.nih.nci.security.UserProvisioningManager; import gov.nih.nci.security.authorization.domainobjects.ProtectionGroup; import gov.nih.nci.security.authorization.domainobjects.Role; import gov.nih.nci.security.authorization.domainobjects.User; import gov.nih.nci.security.exceptions.CSConfigurationException; impor...
import gov.nih.nci.security.*; import gov.nih.nci.security.authorization.domainobjects.*; import gov.nih.nci.security.exceptions.*; import javax.ws.rs.core.*;
[ "gov.nih.nci", "javax.ws" ]
gov.nih.nci; javax.ws;
38,309