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
@SuppressWarnings("unused") private List<Permission> convertToBitPermissions (List<Permission> nonbitPermissionsList) { Map<String, Permission> tempList = new HashMap<String, Permission>(); for(Permission p : nonbitPermissionsList) { if(!p.isBitPermission()) { Permission pt = tempList.get(p.getInode() ...
@SuppressWarnings(STR) List<Permission> function (List<Permission> nonbitPermissionsList) { Map<String, Permission> tempList = new HashMap<String, Permission>(); for(Permission p : nonbitPermissionsList) { if(!p.isBitPermission()) { Permission pt = tempList.get(p.getInode() + "-" + p.getRoleId()); if(pt == null) pt = n...
/** * This method let you convert a list of non bit permission to the new bit kind of permission, so you should * end up with a compressed list * @param p permission * @return boolean * @version 1.7 * @since 1.7 */
This method let you convert a list of non bit permission to the new bit kind of permission, so you should end up with a compressed list
convertToBitPermissions
{ "repo_name": "monzonj/core", "path": "src/com/dotmarketing/business/PermissionBitFactoryImpl.java", "license": "gpl-3.0", "size": 151473 }
[ "com.dotmarketing.beans.Permission", "java.util.ArrayList", "java.util.HashMap", "java.util.List", "java.util.Map" ]
import com.dotmarketing.beans.Permission; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map;
import com.dotmarketing.beans.*; import java.util.*;
[ "com.dotmarketing.beans", "java.util" ]
com.dotmarketing.beans; java.util;
613,107
private List<Map<String, String>> newAddresses(int size) { return new ArrayList<Map<String, String>>(size); } public Endpoint(String api, String protocolType, URI... uris) { this.api = api; this.addressType = AddressTypes.ADDRESS_URI; this.protocolType = protocolType; List<Map...
List<Map<String, String>> function(int size) { return new ArrayList<Map<String, String>>(size); } Endpoint(String api, String protocolType, URI... uris) { this.api = api; this.addressType = AddressTypes.ADDRESS_URI; this.protocolType = protocolType; List<Map<String, String>> addrs = function(uris.length); for (URI uri ...
/** * Create a new address structure of the requested size * @param size size to create * @return the new list */
Create a new address structure of the requested size
newAddresses
{ "repo_name": "apurtell/hadoop", "path": "hadoop-common-project/hadoop-registry/src/main/java/org/apache/hadoop/registry/client/types/Endpoint.java", "license": "apache-2.0", "size": 7421 }
[ "java.util.ArrayList", "java.util.List", "java.util.Map", "org.apache.hadoop.registry.client.binding.RegistryTypeUtils" ]
import java.util.ArrayList; import java.util.List; import java.util.Map; import org.apache.hadoop.registry.client.binding.RegistryTypeUtils;
import java.util.*; import org.apache.hadoop.registry.client.binding.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
832,461
public void update(ExternalActivity to) throws DataAccException { super.update(to,to.getId()); }
void function(ExternalActivity to) throws DataAccException { super.update(to,to.getId()); }
/** * Updates an existing ExternalActivity in database * @param to the ExternalActivity to update */
Updates an existing ExternalActivity in database
update
{ "repo_name": "autentia/TNTConcept", "path": "tntconcept-core/src/main/java/com/autentia/tnt/dao/hibernate/ExternalActivityDAO.java", "license": "gpl-3.0", "size": 3507 }
[ "com.autentia.tnt.businessobject.ExternalActivity", "com.autentia.tnt.dao.DataAccException" ]
import com.autentia.tnt.businessobject.ExternalActivity; import com.autentia.tnt.dao.DataAccException;
import com.autentia.tnt.businessobject.*; import com.autentia.tnt.dao.*;
[ "com.autentia.tnt" ]
com.autentia.tnt;
377,166
public List<BigDecimal> calculate(List<BigDecimal> list, BigDecimal[] array, int begin, int length, MathContext mc) { int index; List<BigDecimal> result = new ArrayList<BigDecimal>(); for(index = begin; index < list.size() && index < array.length && index < begin + length; index++) { result.ad...
List<BigDecimal> function(List<BigDecimal> list, BigDecimal[] array, int begin, int length, MathContext mc) { int index; List<BigDecimal> result = new ArrayList<BigDecimal>(); for(index = begin; index < list.size() && index < array.length && index < begin + length; index++) { result.add(list.get(index).remainder(array[...
/** * Performs the modulus operation on the list using the values in the array * between the indices. Missing data points due to uneven list and array * sizes are treated as zeroes. * @param List<BigDecimal> list the list * @param BigDecimal[] array the array * @param int begin ...
Performs the modulus operation on the list using the values in the array between the indices. Missing data points due to uneven list and array sizes are treated as zeroes
calculate
{ "repo_name": "jessemull/MicroFlex", "path": "src/main/java/com/github/jessemull/microflex/bigdecimalflex/math/ModulusBigDecimal.java", "license": "apache-2.0", "size": 20377 }
[ "java.math.BigDecimal", "java.math.MathContext", "java.util.ArrayList", "java.util.List" ]
import java.math.BigDecimal; import java.math.MathContext; import java.util.ArrayList; import java.util.List;
import java.math.*; import java.util.*;
[ "java.math", "java.util" ]
java.math; java.util;
1,890,655
@ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<ScheduleInner> listByLab(String resourceGroupName, String labName);
@ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<ScheduleInner> listByLab(String resourceGroupName, String labName);
/** * Returns a list of all schedules for a lab. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param labName The name of the lab that uniquely identifies it within containing lab account. Used in resource * URIs. * @throws IllegalArgument...
Returns a list of all schedules for a lab
listByLab
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/labservices/azure-resourcemanager-labservices/src/main/java/com/azure/resourcemanager/labservices/fluent/SchedulesClient.java", "license": "mit", "size": 13065 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedIterable", "com.azure.resourcemanager.labservices.fluent.models.ScheduleInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.resourcemanager.labservices.fluent.models.ScheduleInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.labservices.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,317,642
private MutablePropertyValues modifyProperties(MutablePropertyValues propertyValues, Object target) { propertyValues = getPropertyValuesForNamePrefix(propertyValues); if (target instanceof MapHolder) { propertyValues = addMapPrefix(propertyValues); } BeanWrapper wrapper = new BeanWrapperImpl(target); ...
MutablePropertyValues function(MutablePropertyValues propertyValues, Object target) { propertyValues = getPropertyValuesForNamePrefix(propertyValues); if (target instanceof MapHolder) { propertyValues = addMapPrefix(propertyValues); } BeanWrapper wrapper = new BeanWrapperImpl(target); wrapper.setConversionService( new ...
/** * Modify the property values so that period separated property paths are valid for * map keys. Also creates new maps for properties of map type that are null (assuming * all maps are potentially nested). The standard bracket {@code[...]} dereferencing * is also accepted. * @param propertyValues the proper...
Modify the property values so that period separated property paths are valid for map keys. Also creates new maps for properties of map type that are null (assuming all maps are potentially nested). The standard bracket dereferencing is also accepted
modifyProperties
{ "repo_name": "yhj630520/spring-boot", "path": "spring-boot/src/main/java/org/springframework/boot/bind/RelaxedDataBinder.java", "license": "apache-2.0", "size": 21977 }
[ "java.util.ArrayList", "java.util.HashSet", "java.util.List", "java.util.Set", "org.springframework.beans.BeanWrapper", "org.springframework.beans.BeanWrapperImpl", "org.springframework.beans.MutablePropertyValues", "org.springframework.beans.PropertyValue" ]
import java.util.ArrayList; import java.util.HashSet; import java.util.List; import java.util.Set; import org.springframework.beans.BeanWrapper; import org.springframework.beans.BeanWrapperImpl; import org.springframework.beans.MutablePropertyValues; import org.springframework.beans.PropertyValue;
import java.util.*; import org.springframework.beans.*;
[ "java.util", "org.springframework.beans" ]
java.util; org.springframework.beans;
2,065,401
public final static List<PolymerNotation> getBLOBPolymers(List<PolymerNotation> polymers) { List<PolymerNotation> blobPolymers = new ArrayList<PolymerNotation>(); for (PolymerNotation polymer : polymers) { if (polymer.getPolymerID() instanceof BlobEntity) { blobPolymers.add(polymer); ...
final static List<PolymerNotation> function(List<PolymerNotation> polymers) { List<PolymerNotation> blobPolymers = new ArrayList<PolymerNotation>(); for (PolymerNotation polymer : polymers) { if (polymer.getPolymerID() instanceof BlobEntity) { blobPolymers.add(polymer); } } return blobPolymers; }
/** * method to get all blob polymers given a list of PolymerNotation objects * * @param polymers List of PolymerNotation objects * @return list of blob polymers */
method to get all blob polymers given a list of PolymerNotation objects
getBLOBPolymers
{ "repo_name": "PistoiaHELM/HELM2NotationToolkit", "path": "src/main/java/org/helm/notation2/tools/HELM2NotationUtils.java", "license": "mit", "size": 26582 }
[ "java.util.ArrayList", "java.util.List", "org.helm.notation2.parser.notation.polymer.BlobEntity", "org.helm.notation2.parser.notation.polymer.PolymerNotation" ]
import java.util.ArrayList; import java.util.List; import org.helm.notation2.parser.notation.polymer.BlobEntity; import org.helm.notation2.parser.notation.polymer.PolymerNotation;
import java.util.*; import org.helm.notation2.parser.notation.polymer.*;
[ "java.util", "org.helm.notation2" ]
java.util; org.helm.notation2;
201,274
public BaseDocument createDocument(String docUid, String mime) throws IOException { return createDocument(null,docUid, mime); }
BaseDocument function(String docUid, String mime) throws IOException { return createDocument(null,docUid, mime); }
/** * Creates a new empty (place holder) document. * <p/> * This can be used to use the output stream of the document to write the content. * * @param docUid * @param mime * @return * @throws IOException */
Creates a new empty (place holder) document. This can be used to use the output stream of the document to write the content
createDocument
{ "repo_name": "medicayun/medicayundicom", "path": "dcm4chee-docstore/trunk/dcm4chee-docstore-store/src/main/java/org/dcm4chee/docstore/DocumentStore.java", "license": "apache-2.0", "size": 16127 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,398,639
@Nonnull public java.util.concurrent.CompletableFuture<AccessPackageAssignmentRequest> putAsync(@Nonnull final AccessPackageAssignmentRequest newAccessPackageAssignmentRequest) { return sendAsync(HttpMethod.PUT, newAccessPackageAssignmentRequest); }
java.util.concurrent.CompletableFuture<AccessPackageAssignmentRequest> function(@Nonnull final AccessPackageAssignmentRequest newAccessPackageAssignmentRequest) { return sendAsync(HttpMethod.PUT, newAccessPackageAssignmentRequest); }
/** * Creates a AccessPackageAssignmentRequest with a new object * * @param newAccessPackageAssignmentRequest the object to create/update * @return a future with the result */
Creates a AccessPackageAssignmentRequest with a new object
putAsync
{ "repo_name": "microsoftgraph/msgraph-sdk-java", "path": "src/main/java/com/microsoft/graph/requests/AccessPackageAssignmentRequestRequest.java", "license": "mit", "size": 7107 }
[ "com.microsoft.graph.http.HttpMethod", "com.microsoft.graph.models.AccessPackageAssignmentRequest", "javax.annotation.Nonnull" ]
import com.microsoft.graph.http.HttpMethod; import com.microsoft.graph.models.AccessPackageAssignmentRequest; import javax.annotation.Nonnull;
import com.microsoft.graph.http.*; import com.microsoft.graph.models.*; import javax.annotation.*;
[ "com.microsoft.graph", "javax.annotation" ]
com.microsoft.graph; javax.annotation;
2,368,387
try { TCPNettyClient tcpNettyClient = new TCPNettyClient(); tcpNettyClient.connect("localhost", Integer.parseInt("9892")); LOG.info("TCP client connected"); Random rand = new Random(); long i = 0; for (; i < EVENT_COUNT; i += BATCH_SIZE) { ...
try { TCPNettyClient tcpNettyClient = new TCPNettyClient(); tcpNettyClient.connect(STR, Integer.parseInt("9892")); LOG.info(STR); Random rand = new Random(); long i = 0; for (; i < EVENT_COUNT; i += BATCH_SIZE) { startTime = System.currentTimeMillis(); ArrayList<Event> arrayList = new ArrayList<Event>(BATCH_SIZE); for ...
/** * Main method to start the test client */
Main method to start the test client
main
{ "repo_name": "wso2/analytics-is", "path": "modules/performance/sample-clients/tcp-client/src/main/java/org/wso2/sp/tcp/client/TCPClient.java", "license": "apache-2.0", "size": 3854 }
[ "java.io.IOException", "java.util.ArrayList", "java.util.Random", "org.wso2.extension.siddhi.io.tcp.transport.TCPNettyClient", "org.wso2.extension.siddhi.map.binary.sinkmapper.BinaryEventConverter", "org.wso2.siddhi.core.event.Event", "org.wso2.siddhi.core.exception.ConnectionUnavailableException" ]
import java.io.IOException; import java.util.ArrayList; import java.util.Random; import org.wso2.extension.siddhi.io.tcp.transport.TCPNettyClient; import org.wso2.extension.siddhi.map.binary.sinkmapper.BinaryEventConverter; import org.wso2.siddhi.core.event.Event; import org.wso2.siddhi.core.exception.ConnectionUnavail...
import java.io.*; import java.util.*; import org.wso2.extension.siddhi.io.tcp.transport.*; import org.wso2.extension.siddhi.map.binary.sinkmapper.*; import org.wso2.siddhi.core.event.*; import org.wso2.siddhi.core.exception.*;
[ "java.io", "java.util", "org.wso2.extension", "org.wso2.siddhi" ]
java.io; java.util; org.wso2.extension; org.wso2.siddhi;
2,084,121
public void testInfoWithNode() { ServiceDiscoveryManager discoManager = ServiceDiscoveryManager .getInstanceFor(getConnection(0)); try { // Discover the information of another Smack client discoManager.discoverInfo(getFullJID(1), "some node"); // ...
void function() { ServiceDiscoveryManager discoManager = ServiceDiscoveryManager .getInstanceFor(getConnection(0)); try { discoManager.discoverInfo(getFullJID(1), STR); fail(STR); } catch (XMPPException e) { assertEquals(STR, 404, e.getXMPPError().getCode()); } catch (Exception e) { e.printStackTrace(); fail(e.getMessa...
/** * Tests that ensures that Smack answers a 404 error when the disco#info includes a node. */
Tests that ensures that Smack answers a 404 error when the disco#info includes a node
testInfoWithNode
{ "repo_name": "opg7371/Smack", "path": "smack-extensions/src/integration-test/java/org/jivesoftware/smackx/ServiceDiscoveryManagerTest.java", "license": "apache-2.0", "size": 5564 }
[ "org.jivesoftware.smack.XMPPException" ]
import org.jivesoftware.smack.XMPPException;
import org.jivesoftware.smack.*;
[ "org.jivesoftware.smack" ]
org.jivesoftware.smack;
2,077,266
public void setID(int id) { this.id = id; } } class comparatorTimestamps implements Comparator<Itemset> {
void function(int id) { this.id = id; } } class comparatorTimestamps implements Comparator<Itemset> {
/** * Set the sequence id of this sequence * @param id the sequence id */
Set the sequence id of this sequence
setID
{ "repo_name": "automenta/java_dann", "path": "src/syncleus/dann/learn/pattern/algorithms/sequentialpatterns/clasp_AGP/dataStructures/Sequence.java", "license": "agpl-3.0", "size": 6304 }
[ "java.util.Comparator" ]
import java.util.Comparator;
import java.util.*;
[ "java.util" ]
java.util;
2,178,096
public J select(final String fieldName, final Func func, final Object field, final Object... params) { if (_entity == null) { throw new RuntimeException("SearchBuilder cannot be modified once it has been setup"); } if (_specifiedAttrs.size() > 1) { throw new RuntimeEx...
J function(final String fieldName, final Func func, final Object field, final Object... params) { if (_entity == null) { throw new RuntimeException(STR); } if (_specifiedAttrs.size() > 1) { throw new RuntimeException(STR); } if (func.getCount() != -1 && (func.getCount() != (params.length + 1))) { throw new RuntimeExcep...
/** * Specifies what to select in the search. * * @param fieldName The field name of the result object to put the value of the field selected. This can be null if you're selecting only one field and the result is not a * complex object. * @param func function to place. ...
Specifies what to select in the search
select
{ "repo_name": "MissionCriticalCloud/cosmic", "path": "cosmic-core/framework/db/src/main/java/com/cloud/utils/db/SearchBase.java", "license": "apache-2.0", "size": 17249 }
[ "com.cloud.utils.db.SearchCriteria", "java.lang.reflect.Field", "java.util.ArrayList" ]
import com.cloud.utils.db.SearchCriteria; import java.lang.reflect.Field; import java.util.ArrayList;
import com.cloud.utils.db.*; import java.lang.reflect.*; import java.util.*;
[ "com.cloud.utils", "java.lang", "java.util" ]
com.cloud.utils; java.lang; java.util;
324,860
@IgniteAsyncSupported public void rollback() throws IgniteCheckedException;
void function() throws IgniteCheckedException;
/** * Rolls back this transaction. * * @throws IgniteCheckedException If rollback failed. */
Rolls back this transaction
rollback
{ "repo_name": "ryanzz/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/transactions/IgniteInternalTx.java", "license": "apache-2.0", "size": 20204 }
[ "org.apache.ignite.IgniteCheckedException" ]
import org.apache.ignite.IgniteCheckedException;
import org.apache.ignite.*;
[ "org.apache.ignite" ]
org.apache.ignite;
445,109
public NTLMMode getNTLMMode() { if (this.ntlmMode != null) { switch (this.ntlmMode) { case NONE: return NTLMMode.NONE; case PASS_THROUGH: for (AuthenticationComponent authComponent : getUsableAuthenticationC...
NTLMMode function() { if (this.ntlmMode != null) { switch (this.ntlmMode) { case NONE: return NTLMMode.NONE; case PASS_THROUGH: for (AuthenticationComponent authComponent : getUsableAuthenticationComponents()) { if (!(authComponent instanceof NLTMAuthenticator)) { continue; } NLTMAuthenticator ssoAuthenticator = (NLTMA...
/** * Get the NTLM mode - this is only what is set if one of the implementations provides support for that mode. */
Get the NTLM mode - this is only what is set if one of the implementations provides support for that mode
getNTLMMode
{ "repo_name": "daniel-he/community-edition", "path": "projects/repository/source/java/org/alfresco/repo/security/authentication/ChainingAuthenticationComponentImpl.java", "license": "lgpl-3.0", "size": 11762 }
[ "org.alfresco.repo.security.authentication.ntlm.NLTMAuthenticator" ]
import org.alfresco.repo.security.authentication.ntlm.NLTMAuthenticator;
import org.alfresco.repo.security.authentication.ntlm.*;
[ "org.alfresco.repo" ]
org.alfresco.repo;
49,935
protected void sequence_ActionsDecl(EObject context, ActionsDecl semanticObject) { genericSequencer.createSequence(context, semanticObject); }
void function(EObject context, ActionsDecl semanticObject) { genericSequencer.createSequence(context, semanticObject); }
/** * Constraint: * (actions+=Action*) */
Constraint: (actions+=Action*)
sequence_ActionsDecl
{ "repo_name": "fmca/Tupi", "path": "projects/br.ufpe.cin.Tupi/src-gen/br/ufpe/cin/serializer/TupiSemanticSequencer.java", "license": "mit", "size": 28114 }
[ "br.ufpe.cin.tupi.ActionsDecl", "org.eclipse.emf.ecore.EObject" ]
import br.ufpe.cin.tupi.ActionsDecl; import org.eclipse.emf.ecore.EObject;
import br.ufpe.cin.tupi.*; import org.eclipse.emf.ecore.*;
[ "br.ufpe.cin", "org.eclipse.emf" ]
br.ufpe.cin; org.eclipse.emf;
2,385,344
public static synchronized PubSubManager getInstance(XMPPConnection connection, BareJid pubSubService) { Map<BareJid, PubSubManager> managers = INSTANCES.get(connection); if (managers == null) { managers = new HashMap<>(); INSTANCES.put(connection, managers); } ...
static synchronized PubSubManager function(XMPPConnection connection, BareJid pubSubService) { Map<BareJid, PubSubManager> managers = INSTANCES.get(connection); if (managers == null) { managers = new HashMap<>(); INSTANCES.put(connection, managers); } PubSubManager pubSubManager = managers.get(pubSubService); if (pubSu...
/** * Get the PubSub manager for the given connection and PubSub service. * * @param connection the XMPP connection. * @param pubSubService the PubSub service. * @return a PubSub manager for the connection and service. */
Get the PubSub manager for the given connection and PubSub service
getInstance
{ "repo_name": "lovely3x/Smack", "path": "smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/PubSubManager.java", "license": "apache-2.0", "size": 17900 }
[ "java.util.HashMap", "java.util.Map", "org.jivesoftware.smack.XMPPConnection", "org.jxmpp.jid.BareJid" ]
import java.util.HashMap; import java.util.Map; import org.jivesoftware.smack.XMPPConnection; import org.jxmpp.jid.BareJid;
import java.util.*; import org.jivesoftware.smack.*; import org.jxmpp.jid.*;
[ "java.util", "org.jivesoftware.smack", "org.jxmpp.jid" ]
java.util; org.jivesoftware.smack; org.jxmpp.jid;
1,570,860
protected IPreferenceNode findNodeMatching(String nodeId) { List nodes = preferenceManager.getElements(PreferenceManager.POST_ORDER); for (Iterator i = nodes.iterator(); i.hasNext();) { IPreferenceNode node = (IPreferenceNode) i.next(); if (node.getId().equals(nodeId)) { return node; } } return ...
IPreferenceNode function(String nodeId) { List nodes = preferenceManager.getElements(PreferenceManager.POST_ORDER); for (Iterator i = nodes.iterator(); i.hasNext();) { IPreferenceNode node = (IPreferenceNode) i.next(); if (node.getId().equals(nodeId)) { return node; } } return null; }
/** * Find the <code>IPreferenceNode</code> that has data the same id as the * supplied value. * * @param nodeId * the id to search for. * @return <code>IPreferenceNode</code> or <code>null</code> if not * found. */
Find the <code>IPreferenceNode</code> that has data the same id as the supplied value
findNodeMatching
{ "repo_name": "ghillairet/gef-gwt", "path": "src/main/java/org/eclipse/jface/preference/PreferenceDialog.java", "license": "epl-1.0", "size": 45084 }
[ "java.util.Iterator", "java.util.List" ]
import java.util.Iterator; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
382,633
public Observable<ServiceResponse<Void>> deleteWithServiceResponseAsync(String resourceGroupName, String serviceName, String apiId, String operationId, String ifMatch) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be nul...
Observable<ServiceResponse<Void>> function(String resourceGroupName, String serviceName, String apiId, String operationId, String ifMatch) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (serviceName == null) { throw new IllegalArgumentException(STR); } if (apiId == null) { throw new Il...
/** * Deletes the policy configuration at the Api Operation. * * @param resourceGroupName The name of the resource group. * @param serviceName The name of the API Management service. * @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-curre...
Deletes the policy configuration at the Api Operation
deleteWithServiceResponseAsync
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/apimanagement/mgmt-v2018_06_01_preview/src/main/java/com/microsoft/azure/management/apimanagement/v2018_06_01_preview/implementation/ApiOperationPolicysInner.java", "license": "mit", "size": 48869 }
[ "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.rest.ServiceResponse;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
1,304,881
@Override public int writeBytes(byte[] outBytes, int offset, DataTypeDescriptor dtd) { final byte[] value; try { value = getValueAsBytes(); } catch (SQLException sqle) { // wrap in RuntimeException throw GemFireXDRuntimeException.newRuntimeException(null, sqle); } System.arrayc...
int function(byte[] outBytes, int offset, DataTypeDescriptor dtd) { final byte[] value; try { value = getValueAsBytes(); } catch (SQLException sqle) { throw GemFireXDRuntimeException.newRuntimeException(null, sqle); } System.arraycopy(value, 0, outBytes, offset, value.length); return value.length; }
/** * Optimized write to a byte array at specified offset * * @return number of bytes actually written */
Optimized write to a byte array at specified offset
writeBytes
{ "repo_name": "SnappyDataInc/snappy-store", "path": "gemfirexd/core/src/main/java/com/pivotal/gemfirexd/internal/iapi/types/SQLBinary.java", "license": "apache-2.0", "size": 40696 }
[ "com.pivotal.gemfirexd.internal.engine.jdbc.GemFireXDRuntimeException", "java.sql.SQLException" ]
import com.pivotal.gemfirexd.internal.engine.jdbc.GemFireXDRuntimeException; import java.sql.SQLException;
import com.pivotal.gemfirexd.internal.engine.jdbc.*; import java.sql.*;
[ "com.pivotal.gemfirexd", "java.sql" ]
com.pivotal.gemfirexd; java.sql;
2,127,593
@Test public final void testGetName() { assertEquals("OpenNMS.Vacuumd", m_vacuumd.getName()); }
final void function() { assertEquals(STR, m_vacuumd.getName()); }
/** * Why not. */
Why not
testGetName
{ "repo_name": "tharindum/opennms_dashboard", "path": "opennms-alarms/daemon/src/test/java/org/opennms/netmgt/vacuumd/VacuumdTest.java", "license": "gpl-2.0", "size": 20604 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,084,462
private PointF isFlingingToDelete(DragSource source) { if (mFlingToDeleteDropTarget == null) return null; if (!source.supportsFlingToDelete()) return null; ViewConfiguration config = ViewConfiguration.get(mLauncher); mVelocityTracker.computeCurrentVelocity(1000, config.getScaledMaxi...
PointF function(DragSource source) { if (mFlingToDeleteDropTarget == null) return null; if (!source.supportsFlingToDelete()) return null; ViewConfiguration config = ViewConfiguration.get(mLauncher); mVelocityTracker.computeCurrentVelocity(1000, config.getScaledMaximumFlingVelocity()); if (mVelocityTracker.getYVelocity(...
/** * Determines whether the user flung the current item to delete it. * * @return the vector at which the item was flung, or null if no fling was detected. */
Determines whether the user flung the current item to delete it
isFlingingToDelete
{ "repo_name": "mkodekar/LB-Launcher", "path": "app/src/main/java/com/lb/launcher/DragController.java", "license": "apache-2.0", "size": 28728 }
[ "android.graphics.PointF", "android.view.ViewConfiguration" ]
import android.graphics.PointF; import android.view.ViewConfiguration;
import android.graphics.*; import android.view.*;
[ "android.graphics", "android.view" ]
android.graphics; android.view;
1,907,194
public void trackListExecution(String type, int count, Profile profile, String sessionIdentifier) { Tracker tracker = getTracker(TrackerUtil.LIST_TRACKER); if (tracker != null) { ((ListTracker) tracker).trackList(type, count, null, ListTrackerEvent.EXEC...
void function(String type, int count, Profile profile, String sessionIdentifier) { Tracker tracker = getTracker(TrackerUtil.LIST_TRACKER); if (tracker != null) { ((ListTracker) tracker).trackList(type, count, null, ListTrackerEvent.EXECUTION, profile, sessionIdentifier); } }
/** * Store into the database the list execution * @param type the type of the list * @param count the number of items contained * @param profile the user profile * @param sessionIdentifier the session id */
Store into the database the list execution
trackListExecution
{ "repo_name": "joshkh/intermine", "path": "intermine/api/main/src/org/intermine/api/tracker/TrackerDelegate.java", "license": "lgpl-2.1", "size": 13066 }
[ "org.intermine.api.profile.Profile", "org.intermine.api.tracker.util.ListTrackerEvent", "org.intermine.api.tracker.util.TrackerUtil" ]
import org.intermine.api.profile.Profile; import org.intermine.api.tracker.util.ListTrackerEvent; import org.intermine.api.tracker.util.TrackerUtil;
import org.intermine.api.profile.*; import org.intermine.api.tracker.util.*;
[ "org.intermine.api" ]
org.intermine.api;
1,107,754
default HttpJsonRequest useGetMethod() { return setMethod(HttpMethod.GET); }
default HttpJsonRequest useGetMethod() { return setMethod(HttpMethod.GET); }
/** * Uses {@link HttpMethod#GET} as a request method. * * @return this request instance */
Uses <code>HttpMethod#GET</code> as a request method
useGetMethod
{ "repo_name": "gazarenkov/che-sketch", "path": "core/che-core-api-core/src/main/java/org/eclipse/che/api/core/rest/HttpJsonRequest.java", "license": "epl-1.0", "size": 7708 }
[ "javax.ws.rs.HttpMethod" ]
import javax.ws.rs.HttpMethod;
import javax.ws.rs.*;
[ "javax.ws" ]
javax.ws;
2,547,384
public Buffer clear() { return mBuffer.clear(); }
Buffer function() { return mBuffer.clear(); }
/** * Calls clear on the underlying ByteBuffer. */
Calls clear on the underlying ByteBuffer
clear
{ "repo_name": "A-Studio0/InsPicSoc", "path": "src/de/tavendo/autobahn/ByteBufferOutputStream.java", "license": "apache-2.0", "size": 4911 }
[ "java.nio.Buffer" ]
import java.nio.Buffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
513,572
public void add(String regex, int token) { tokenInfos.add(new TokenInfo(Pattern.compile("^(" + regex+")"), token)); }
void function(String regex, int token) { tokenInfos.add(new TokenInfo(Pattern.compile("^(" + regex+")"), token)); }
/** * Add a regular expression and a token id to the internal list of recognized tokens * @param regex the regular expression to match against * @param token the token id that the regular expression is linked to */
Add a regular expression and a token id to the internal list of recognized tokens
add
{ "repo_name": "luttero/Maud", "path": "src/uk/co/cogitolearning/cogpar/Tokenizer.java", "license": "bsd-3-clause", "size": 5344 }
[ "java.util.regex.Pattern" ]
import java.util.regex.Pattern;
import java.util.regex.*;
[ "java.util" ]
java.util;
1,842,922
Persistence persistence = new Persistence(path.toFile()); SortedSet<String> result = persistence.readCompletedJobs(); assertEquals(result.size(), 7); }
Persistence persistence = new Persistence(path.toFile()); SortedSet<String> result = persistence.readCompletedJobs(); assertEquals(result.size(), 7); }
/** * Test of readCompletedJobs method, of class Persistence. */
Test of readCompletedJobs method, of class Persistence
testReadCompletedJobs
{ "repo_name": "oicr-gsi/niassa", "path": "seqware-pipeline/src/test/java/io/seqware/pipeline/engines/whitestar/PersistenceTest.java", "license": "gpl-3.0", "size": 2055 }
[ "java.util.SortedSet", "org.junit.Assert" ]
import java.util.SortedSet; import org.junit.Assert;
import java.util.*; import org.junit.*;
[ "java.util", "org.junit" ]
java.util; org.junit;
1,852,234
public static String resolveVariables(String input, Map<String, String> props) { return resolveVariables(input, props, true); }
static String function(String input, Map<String, String> props) { return resolveVariables(input, props, true); }
/** * Resolve the variables of type ${my.var} for the current context which is composed * only of the given settings * * @param input * the input value * @param props * a set of parameters to add for the variable resolution * @return the resolve value */
Resolve the variables of type ${my.var} for the current context which is composed only of the given settings
resolveVariables
{ "repo_name": "bartlomiej-laczkowski/che", "path": "core/commons/che-core-commons-lang/src/main/java/org/eclipse/che/commons/lang/Deserializer.java", "license": "epl-1.0", "size": 4117 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,626,611
public static User getUser(int iUserId){ try { return ((com.idega.core.user.data.UserHome)com.idega.data.IDOLookup.getHomeLegacy(User.class)).findByPrimaryKeyLegacy(iUserId); } catch (Exception ex) { } return null; }
static User function(int iUserId){ try { return ((com.idega.core.user.data.UserHome)com.idega.data.IDOLookup.getHomeLegacy(User.class)).findByPrimaryKeyLegacy(iUserId); } catch (Exception ex) { } return null; }
/** * Returns User from userid, null if not found */
Returns User from userid, null if not found
getUser
{ "repo_name": "idega/platform2", "path": "src/com/idega/core/user/business/UserBusiness.java", "license": "gpl-3.0", "size": 21528 }
[ "com.idega.core.user.data.User" ]
import com.idega.core.user.data.User;
import com.idega.core.user.data.*;
[ "com.idega.core" ]
com.idega.core;
1,431,879
public void removeRuleFlow(String id) { ProcessPackage rtp = (ProcessPackage) getResourceTypePackages().get(ResourceType.BPMN2); if (rtp == null || rtp.lookup(id) == null) { throw new IllegalArgumentException("The rule flow with id [" + id + "] is not part of this package."); } ...
void function(String id) { ProcessPackage rtp = (ProcessPackage) getResourceTypePackages().get(ResourceType.BPMN2); if (rtp == null rtp.lookup(id) == null) { throw new IllegalArgumentException(STR + id + STR); } rtp.remove(id); }
/** * Rule flows can be removed by ID. */
Rule flows can be removed by ID
removeRuleFlow
{ "repo_name": "etirelli/drools", "path": "drools-core/src/main/java/org/drools/core/definitions/impl/KnowledgePackageImpl.java", "license": "apache-2.0", "size": 30960 }
[ "org.drools.core.definitions.ProcessPackage", "org.kie.api.io.ResourceType" ]
import org.drools.core.definitions.ProcessPackage; import org.kie.api.io.ResourceType;
import org.drools.core.definitions.*; import org.kie.api.io.*;
[ "org.drools.core", "org.kie.api" ]
org.drools.core; org.kie.api;
12,192
@Deprecated public void setFamilyMap(NavigableMap<byte [], List<KeyValue>> map) { TreeMap<byte[], List<Cell>> fm = new TreeMap<byte[], List<Cell>>(Bytes.BYTES_COMPARATOR); for (Map.Entry<byte[], List<KeyValue>> e : map.entrySet()) { fm.put(e.getKey(), Lists.<Cell>newArrayList(e.getValue())); } ...
void function(NavigableMap<byte [], List<KeyValue>> map) { TreeMap<byte[], List<Cell>> fm = new TreeMap<byte[], List<Cell>>(Bytes.BYTES_COMPARATOR); for (Map.Entry<byte[], List<KeyValue>> e : map.entrySet()) { fm.put(e.getKey(), Lists.<Cell>newArrayList(e.getValue())); } this.familyMap = fm; }
/** * Method for setting the put's familyMap that is deprecated and inefficient. * @deprecated use {@link #setFamilyCellMap(NavigableMap)} instead. */
Method for setting the put's familyMap that is deprecated and inefficient
setFamilyMap
{ "repo_name": "Jackygq1982/hbase_src", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/Mutation.java", "license": "apache-2.0", "size": 17302 }
[ "com.google.common.collect.Lists", "java.util.List", "java.util.Map", "java.util.NavigableMap", "java.util.TreeMap", "org.apache.hadoop.hbase.Cell", "org.apache.hadoop.hbase.KeyValue", "org.apache.hadoop.hbase.util.Bytes" ]
import com.google.common.collect.Lists; import java.util.List; import java.util.Map; import java.util.NavigableMap; import java.util.TreeMap; import org.apache.hadoop.hbase.Cell; import org.apache.hadoop.hbase.KeyValue; import org.apache.hadoop.hbase.util.Bytes;
import com.google.common.collect.*; import java.util.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.util.*;
[ "com.google.common", "java.util", "org.apache.hadoop" ]
com.google.common; java.util; org.apache.hadoop;
2,378,685
private void generateTasks() { tasks = new LinkedList<>(); // Iterate over directories in specified tileset dir File tilesDir = new File(Uristmaps.conf.fetch("Paths", "tiles")).getAbsoluteFile(); if (!tilesDir.exists()) { Log.error("TilesetTask", "Could not find tiles di...
void function() { tasks = new LinkedList<>(); File tilesDir = new File(Uristmaps.conf.fetch("Paths", "tiles")).getAbsoluteFile(); if (!tilesDir.exists()) { Log.error(STR, STR + tilesDir); System.exit(1); } for (File tileDir : tilesDir.listFiles(fname -> fname.isDirectory())) { int tileSize = 0; try { tileSize = Integer...
/** * Generate the list of tasks. There are 2 types of task, depending on whether the source * is a directory filled with images or a single txt containing a color table. */
Generate the list of tasks. There are 2 types of task, depending on whether the source is a directory filled with images or a single txt containing a color table
generateTasks
{ "repo_name": "dominiks/uristmapsj", "path": "src/main/java/org/uristmaps/tasks/TilesetsTaskGroup.java", "license": "gpl-3.0", "size": 3215 }
[ "com.esotericsoftware.minlog.Log", "java.io.File", "java.util.LinkedList", "org.apache.commons.io.FilenameUtils", "org.uristmaps.Tilesets", "org.uristmaps.Uristmaps", "org.uristmaps.util.BuildFiles" ]
import com.esotericsoftware.minlog.Log; import java.io.File; import java.util.LinkedList; import org.apache.commons.io.FilenameUtils; import org.uristmaps.Tilesets; import org.uristmaps.Uristmaps; import org.uristmaps.util.BuildFiles;
import com.esotericsoftware.minlog.*; import java.io.*; import java.util.*; import org.apache.commons.io.*; import org.uristmaps.*; import org.uristmaps.util.*;
[ "com.esotericsoftware.minlog", "java.io", "java.util", "org.apache.commons", "org.uristmaps", "org.uristmaps.util" ]
com.esotericsoftware.minlog; java.io; java.util; org.apache.commons; org.uristmaps; org.uristmaps.util;
2,510,979
@NonNull public InstallationResponse createFirebaseInstallation( @NonNull String apiKey, @Nullable String fid, @NonNull String projectID, @NonNull String appId, @Nullable String iidToken) throws FirebaseInstallationsException { if (!requestLimiter.isRequestAllowed()) { ...
InstallationResponse function( @NonNull String apiKey, @Nullable String fid, @NonNull String projectID, @NonNull String appId, @Nullable String iidToken) throws FirebaseInstallationsException { if (!requestLimiter.isRequestAllowed()) { throw new FirebaseInstallationsException( STR, Status.UNAVAILABLE); } String resourc...
/** * Creates a FID on the FIS Servers by calling FirebaseInstallations API create method. * * @param apiKey API Key that has access to FIS APIs * @param fid Firebase Installation Identifier * @param projectID Project Id * @param appId the identifier of a Firebase application * @param iidToken the ...
Creates a FID on the FIS Servers by calling FirebaseInstallations API create method
createFirebaseInstallation
{ "repo_name": "firebase/firebase-android-sdk", "path": "firebase-installations/src/main/java/com/google/firebase/installations/remote/FirebaseInstallationServiceClient.java", "license": "apache-2.0", "size": 25717 }
[ "android.net.TrafficStats", "androidx.annotation.NonNull", "androidx.annotation.Nullable", "com.google.firebase.installations.FirebaseInstallationsException", "com.google.firebase.installations.remote.InstallationResponse", "java.io.IOException", "java.net.HttpURLConnection" ]
import android.net.TrafficStats; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import com.google.firebase.installations.FirebaseInstallationsException; import com.google.firebase.installations.remote.InstallationResponse; import java.io.IOException; import java.net.HttpURLConnection;
import android.net.*; import androidx.annotation.*; import com.google.firebase.installations.*; import com.google.firebase.installations.remote.*; import java.io.*; import java.net.*;
[ "android.net", "androidx.annotation", "com.google.firebase", "java.io", "java.net" ]
android.net; androidx.annotation; com.google.firebase; java.io; java.net;
2,048,489
@Override public String getTitleTranslated() { return I18nHelperJavaFX.getMessage(viewEntity.getName()); }
String function() { return I18nHelperJavaFX.getMessage(viewEntity.getName()); }
/** * Gets the title translated. * * @return the title translated */
Gets the title translated
getTitleTranslated
{ "repo_name": "sguisse/InfoWkspOrga", "path": "10-Application/Application/InfoWkspOrga-APP/src/main/java/com/sgu/infowksporga/jfx/view/ui/AAppViewModel.java", "license": "apache-2.0", "size": 1437 }
[ "com.sgu.core.framework.gui.jfx.i18n.I18nHelperJavaFX" ]
import com.sgu.core.framework.gui.jfx.i18n.I18nHelperJavaFX;
import com.sgu.core.framework.gui.jfx.i18n.*;
[ "com.sgu.core" ]
com.sgu.core;
1,124,654
public Reward_observation_terminal env_step(Action thisAction) { assert (thisAction.getNumInts() == 1) : "Expecting a 1-dimensional integer action. " + thisAction.getNumInts() + "D was provided"; assert (thisAction.getInt(0) >= 0) : "Action should be in [0,4], " + thisAction.getInt(0) + " w...
Reward_observation_terminal function(Action thisAction) { assert (thisAction.getNumInts() == 1) : STR + thisAction.getNumInts() + STR; assert (thisAction.getInt(0) >= 0) : STR + thisAction.getInt(0) + STR; assert (thisAction.getInt(0) < 4) : STR + thisAction.getInt(0) + STR; theWorld.updatePosition(thisAction.getInt(0)...
/** * Make sure the action is in the appropriate range, update the state, * generate the new observation, reward, and whether the episode is over. * @param thisAction * @return */
Make sure the action is in the appropriate range, update the state, generate the new observation, reward, and whether the episode is over
env_step
{ "repo_name": "shiwalimohan/RLInfiniteMario", "path": "system/codecs/Java/examples/mines-sarsa-sample/SampleMinesEnvironment.java", "license": "gpl-2.0", "size": 13180 }
[ "org.rlcommunity.rlglue.codec.types.Action", "org.rlcommunity.rlglue.codec.types.Observation" ]
import org.rlcommunity.rlglue.codec.types.Action; import org.rlcommunity.rlglue.codec.types.Observation;
import org.rlcommunity.rlglue.codec.types.*;
[ "org.rlcommunity.rlglue" ]
org.rlcommunity.rlglue;
82,213
public void delete(InboxStatus service) { log.debug("Performing delete"); try { objectDao.delete(service); } catch (Throwable t) { log.error("Failure during object delete.", t); } log.debug("Completed delete"); }
void function(InboxStatus service) { log.debug(STR); try { objectDao.delete(service); } catch (Throwable t) { log.error(STR, t); } log.debug(STR); }
/** * Delete a service * * @param service InboxStatus to delete */
Delete a service
delete
{ "repo_name": "TATRC/KMR2", "path": "DataAccess/DisplayStatusDAO/src/main/java/gov/hhs/fha/nhinc/displaymanager/dao/InboxStatusDao.java", "license": "bsd-3-clause", "size": 7280 }
[ "gov.hhs.fha.nhinc.displaymanager.model.InboxStatus" ]
import gov.hhs.fha.nhinc.displaymanager.model.InboxStatus;
import gov.hhs.fha.nhinc.displaymanager.model.*;
[ "gov.hhs.fha" ]
gov.hhs.fha;
1,604,991
private MessageAbstractType sendMat(final MessageAbstractType req, final LavercaContext context, final Security security) throws AxisFault, IOException { AbstractSoapBindingStub port = null; try { Long timeout = null; if (req instanceof MSSSignatureReq) { ...
MessageAbstractType function(final MessageAbstractType req, final LavercaContext context, final Security security) throws AxisFault, IOException { AbstractSoapBindingStub port = null; try { Long timeout = null; if (req instanceof MSSSignatureReq) { timeout = ((MSSSignatureReq)req).getTimeOut(); port = (MSS_SignatureBin...
/** * Sends an MSS request. * * @param req Abstract request type * @param context Context * @param security WSSE security headers * @throws IOException if a HTTP communication error occurred i.e. a SOAP fault was generated by the <i>local</i> SOAP client stub. */
Sends an MSS request
sendMat
{ "repo_name": "laverca/laverca", "path": "src/core/fi/laverca/mss/MssClient.java", "license": "apache-2.0", "size": 38925 }
[ "fi.laverca.jaxb.mss.MSSHandshakeReq", "fi.laverca.jaxb.mss.MSSProfileReq", "fi.laverca.jaxb.mss.MSSReceiptReq", "fi.laverca.jaxb.mss.MSSRegistrationReq", "fi.laverca.jaxb.mss.MSSSignatureReq", "fi.laverca.jaxb.mss.MSSStatusReq", "fi.laverca.jaxb.mss.MessageAbstractType", "fi.laverca.jaxb.wsssecext.Se...
import fi.laverca.jaxb.mss.MSSHandshakeReq; import fi.laverca.jaxb.mss.MSSProfileReq; import fi.laverca.jaxb.mss.MSSReceiptReq; import fi.laverca.jaxb.mss.MSSRegistrationReq; import fi.laverca.jaxb.mss.MSSSignatureReq; import fi.laverca.jaxb.mss.MSSStatusReq; import fi.laverca.jaxb.mss.MessageAbstractType; import fi.la...
import fi.laverca.jaxb.mss.*; import fi.laverca.jaxb.wsssecext.*; import fi.laverca.util.*; import java.io.*; import javax.xml.rpc.*; import org.apache.axis.*;
[ "fi.laverca.jaxb", "fi.laverca.util", "java.io", "javax.xml", "org.apache.axis" ]
fi.laverca.jaxb; fi.laverca.util; java.io; javax.xml; org.apache.axis;
1,200,535
static public void setULocale( ULocale locale ) { if ( locale == null ) { return; } UResourceBundle rb = (UResourceBundle) threadLocal.get( ); if ( rb != null ) { ULocale rbLocale = rb.getULocale( ); if ( locale.equals( rbLocale ) ) { return; } } rb = getResourceBundle(locale); ...
static void function( ULocale locale ) { if ( locale == null ) { return; } UResourceBundle rb = (UResourceBundle) threadLocal.get( ); if ( rb != null ) { ULocale rbLocale = rb.getULocale( ); if ( locale.equals( rbLocale ) ) { return; } } rb = getResourceBundle(locale); threadLocal.set( rb ); }
/** * Set locale. * * @param locale */
Set locale
setULocale
{ "repo_name": "sguan-actuate/birt", "path": "engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/EngineException.java", "license": "epl-1.0", "size": 6073 }
[ "com.ibm.icu.util.ULocale", "com.ibm.icu.util.UResourceBundle" ]
import com.ibm.icu.util.ULocale; import com.ibm.icu.util.UResourceBundle;
import com.ibm.icu.util.*;
[ "com.ibm.icu" ]
com.ibm.icu;
284,818
public void testAsterisk() throws IOException { Directory indexStore = getIndexStore("body", new String[] {"metal", "metals"}); IndexReader reader = DirectoryReader.open(indexStore); IndexSearcher searcher = newSearcher(reader); Query query1 = new TermQuery(new Term("body", "metal")); Qu...
void function() throws IOException { Directory indexStore = getIndexStore("body", new String[] {"metal", STR}); IndexReader reader = DirectoryReader.open(indexStore); IndexSearcher searcher = newSearcher(reader); Query query1 = new TermQuery(new Term("body", "metal")); Query query2 = new WildcardQuery(new Term("body", ...
/** * Tests Wildcard queries with an asterisk. */
Tests Wildcard queries with an asterisk
testAsterisk
{ "repo_name": "PATRIC3/p3_solr", "path": "lucene/core/src/test/org/apache/lucene/search/TestWildcard.java", "license": "apache-2.0", "size": 14892 }
[ "java.io.IOException", "org.apache.lucene.index.DirectoryReader", "org.apache.lucene.index.IndexReader", "org.apache.lucene.index.Term", "org.apache.lucene.store.Directory" ]
import java.io.IOException; import org.apache.lucene.index.DirectoryReader; import org.apache.lucene.index.IndexReader; import org.apache.lucene.index.Term; import org.apache.lucene.store.Directory;
import java.io.*; import org.apache.lucene.index.*; import org.apache.lucene.store.*;
[ "java.io", "org.apache.lucene" ]
java.io; org.apache.lucene;
1,193,655
public void onPowerOff(int zone) { // When the AVR is Powered OFF, update the status of channels to Undefined updateState(getChannelUID(PioneerAvrBindingConstants.MUTE_CHANNEL, zone), UnDefType.UNDEF); updateState(getChannelUID(PioneerAvrBindingConstants.VOLUME_DB_CHANNEL, zone), UnDefType.U...
void function(int zone) { updateState(getChannelUID(PioneerAvrBindingConstants.MUTE_CHANNEL, zone), UnDefType.UNDEF); updateState(getChannelUID(PioneerAvrBindingConstants.VOLUME_DB_CHANNEL, zone), UnDefType.UNDEF); updateState(getChannelUID(PioneerAvrBindingConstants.VOLUME_DIMMER_CHANNEL, zone), UnDefType.UNDEF); upda...
/** * Called when a Power OFF state update is received from the AVR. */
Called when a Power OFF state update is received from the AVR
onPowerOff
{ "repo_name": "kwave/openhab2-addons", "path": "addons/binding/org.openhab.binding.pioneeravr/src/main/java/org/openhab/binding/pioneeravr/internal/handler/AbstractAvrHandler.java", "license": "epl-1.0", "size": 12770 }
[ "org.eclipse.smarthome.core.types.UnDefType", "org.openhab.binding.pioneeravr.PioneerAvrBindingConstants" ]
import org.eclipse.smarthome.core.types.UnDefType; import org.openhab.binding.pioneeravr.PioneerAvrBindingConstants;
import org.eclipse.smarthome.core.types.*; import org.openhab.binding.pioneeravr.*;
[ "org.eclipse.smarthome", "org.openhab.binding" ]
org.eclipse.smarthome; org.openhab.binding;
875,563
public String startNode(Settings settings) { return startNodes(settings).get(0); }
String function(Settings settings) { return startNodes(settings).get(0); }
/** * Starts a node with the given settings and returns its name. */
Starts a node with the given settings and returns its name
startNode
{ "repo_name": "jmluy/elasticsearch", "path": "test/framework/src/main/java/org/elasticsearch/test/InternalTestCluster.java", "license": "apache-2.0", "size": 110894 }
[ "org.elasticsearch.common.settings.Settings" ]
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.settings.*;
[ "org.elasticsearch.common" ]
org.elasticsearch.common;
2,763,993
public String signAndEncrypt( String plainText, String userID, String passPhrase ) throws KettleException { try { createTempFile( plainText ); return execGnuPG( "-r \"" + userID + "\" --passphrase-fd 0 -se \"" + getTempFileName() + "\"", passPhrase, false ); } finally { deleteTempF...
String function( String plainText, String userID, String passPhrase ) throws KettleException { try { createTempFile( plainText ); return execGnuPG( STRSTR\STRSTR\"", passPhrase, false ); } finally { deleteTempFile(); } }
/** * Signs and encrypts a string * * @param plainText * input string to encrypt * @param userID * key ID of the key in GnuPG's key database to encrypt with * @param passPhrase * passphrase for the personal private key to sign with * @return encrypted string * @t...
Signs and encrypts a string
signAndEncrypt
{ "repo_name": "tkafalas/pentaho-kettle", "path": "engine/src/main/java/org/pentaho/di/job/entries/pgpencryptfiles/GPG.java", "license": "apache-2.0", "size": 17346 }
[ "org.pentaho.di.core.exception.KettleException" ]
import org.pentaho.di.core.exception.KettleException;
import org.pentaho.di.core.exception.*;
[ "org.pentaho.di" ]
org.pentaho.di;
1,149,894
void startDirectoryInitializationService(DirectoryStateReceiver receiver, IntentFilter filter);
void startDirectoryInitializationService(DirectoryStateReceiver receiver, IntentFilter filter);
/** * Start the DirectoryInitializationService and listen for the result. * * @param receiver the broadcast receiver for the DirectoryInitializationService * @param filter the Intent broadcasts to be received. */
Start the DirectoryInitializationService and listen for the result
startDirectoryInitializationService
{ "repo_name": "stenzek/dolphin", "path": "Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/features/settings/ui/SettingsActivityView.java", "license": "gpl-2.0", "size": 3982 }
[ "android.content.IntentFilter", "org.dolphinemu.dolphinemu.utils.DirectoryStateReceiver" ]
import android.content.IntentFilter; import org.dolphinemu.dolphinemu.utils.DirectoryStateReceiver;
import android.content.*; import org.dolphinemu.dolphinemu.utils.*;
[ "android.content", "org.dolphinemu.dolphinemu" ]
android.content; org.dolphinemu.dolphinemu;
1,481,508
public void testHavingClauseRestrictions5653() throws Exception { Statement st = createStatement(); ResultSet rs = null; // bug 5653 test (almost useful) restrictions on a having // clause without a group by clause create the table // this is the only query that should not f...
void function() throws Exception { Statement st = createStatement(); ResultSet rs = null; rs = st.executeQuery( STR); expColNames = new String [] {"1"}; JDBC.assertColumnNames(rs, expColNames); JDBC.assertDrainResults(rs, 0); assertStatementError("42Y35", st, STR); assertStatementError("42Y35", st, STR); assertStatemen...
/** * Tests for Bug 5653 restrictions. * @throws Exception */
Tests for Bug 5653 restrictions
testHavingClauseRestrictions5653
{ "repo_name": "trejkaz/derby", "path": "java/testing/org/apache/derbyTesting/functionTests/tests/lang/GroupByTest.java", "license": "apache-2.0", "size": 108453 }
[ "java.sql.ResultSet", "java.sql.Statement", "org.apache.derbyTesting.junit.JDBC" ]
import java.sql.ResultSet; import java.sql.Statement; import org.apache.derbyTesting.junit.JDBC;
import java.sql.*; import org.apache.*;
[ "java.sql", "org.apache" ]
java.sql; org.apache;
216,340
public static java.util.List extractMiniNutritionalAssessmentDetailsList(ims.domain.ILightweightDomainFactory domainFactory, ims.nursing.vo.MiniNutritionalAssessmentDetailsCollection voCollection) { return extractMiniNutritionalAssessmentDetailsList(domainFactory, voCollection, null, new HashMap()); } ...
static java.util.List function(ims.domain.ILightweightDomainFactory domainFactory, ims.nursing.vo.MiniNutritionalAssessmentDetailsCollection voCollection) { return extractMiniNutritionalAssessmentDetailsList(domainFactory, voCollection, null, new HashMap()); }
/** * Create the ims.nursing.assessmenttools.domain.objects.MiniNutritionalAssessmentDetails list from the value object collection. * @param domainFactory - used to create existing (persistent) domain objects. * @param voCollection - the collection of value objects */
Create the ims.nursing.assessmenttools.domain.objects.MiniNutritionalAssessmentDetails list from the value object collection
extractMiniNutritionalAssessmentDetailsList
{ "repo_name": "FreudianNM/openMAXIMS", "path": "Source Library/openmaxims_workspace/ValueObjects/src/ims/nursing/vo/domain/MiniNutritionalAssessmentDetailsAssembler.java", "license": "agpl-3.0", "size": 18336 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
2,201,940
@Override public void updatePipeline(String pipelineID, List<DatanodeDetails> newDatanodes) throws IOException { }
void function(String pipelineID, List<DatanodeDetails> newDatanodes) throws IOException { }
/** * Update the datanode list of the pipeline. * * @param pipelineID * @param newDatanodes */
Update the datanode list of the pipeline
updatePipeline
{ "repo_name": "szegedim/hadoop", "path": "hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipelines/ratis/RatisManagerImpl.java", "license": "apache-2.0", "size": 5301 }
[ "java.io.IOException", "java.util.List", "org.apache.hadoop.hdds.protocol.DatanodeDetails" ]
import java.io.IOException; import java.util.List; import org.apache.hadoop.hdds.protocol.DatanodeDetails;
import java.io.*; import java.util.*; import org.apache.hadoop.hdds.protocol.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
652,133
private int getArmSwingAnimationEnd() { return this.isPotionActive(Potion.digSpeed) ? 6 - (1 + this.getActivePotionEffect(Potion.digSpeed).getAmplifier()) * 1 : (this.isPotionActive(Potion.digSlowdown) ? 6 + (1 + this.getActivePotionEffect(Potion.digSlowdown).getAmplifier()) * 2 : 6); }
int function() { return this.isPotionActive(Potion.digSpeed) ? 6 - (1 + this.getActivePotionEffect(Potion.digSpeed).getAmplifier()) * 1 : (this.isPotionActive(Potion.digSlowdown) ? 6 + (1 + this.getActivePotionEffect(Potion.digSlowdown).getAmplifier()) * 2 : 6); }
/** * Returns an integer indicating the end point of the swing animation, used by {@link #swingProgress} to provide a * progress indicator. Takes dig speed enchantments into account. */
Returns an integer indicating the end point of the swing animation, used by <code>#swingProgress</code> to provide a progress indicator. Takes dig speed enchantments into account
getArmSwingAnimationEnd
{ "repo_name": "Hexeption/Youtube-Hacked-Client-1.8", "path": "minecraft/net/minecraft/entity/EntityLivingBase.java", "license": "mit", "size": 71852 }
[ "net.minecraft.potion.Potion" ]
import net.minecraft.potion.Potion;
import net.minecraft.potion.*;
[ "net.minecraft.potion" ]
net.minecraft.potion;
1,989,496
public ServiceFuture<VnetRouteInner> updateVnetRouteAsync(String resourceGroupName, String name, String vnetName, String routeName, VnetRouteInner route, final ServiceCallback<VnetRouteInner> serviceCallback) { return ServiceFuture.fromResponse(updateVnetRouteWithServiceResponseAsync(resourceGroupName, name...
ServiceFuture<VnetRouteInner> function(String resourceGroupName, String name, String vnetName, String routeName, VnetRouteInner route, final ServiceCallback<VnetRouteInner> serviceCallback) { return ServiceFuture.fromResponse(updateVnetRouteWithServiceResponseAsync(resourceGroupName, name, vnetName, routeName, route), ...
/** * Create or update a Virtual Network route in an App Service plan. * Create or update a Virtual Network route in an App Service plan. * * @param resourceGroupName Name of the resource group to which the resource belongs. * @param name Name of the App Service plan. * @param vnetName Nam...
Create or update a Virtual Network route in an App Service plan. Create or update a Virtual Network route in an App Service plan
updateVnetRouteAsync
{ "repo_name": "jianghaolu/azure-sdk-for-java", "path": "azure-mgmt-appservice/src/main/java/com/microsoft/azure/management/appservice/implementation/AppServicePlansInner.java", "license": "mit", "size": 260114 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
130,193
EList<IfcTrimmingSelect> getTrim1();
EList<IfcTrimmingSelect> getTrim1();
/** * Returns the value of the '<em><b>Trim1</b></em>' reference list. * The list contents are of type {@link cn.dlb.bim.models.ifc2x3tc1.IfcTrimmingSelect}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Trim1</em>' reference list isn't clear, * there really should be more of a description he...
Returns the value of the 'Trim1' reference list. The list contents are of type <code>cn.dlb.bim.models.ifc2x3tc1.IfcTrimmingSelect</code>. If the meaning of the 'Trim1' reference list isn't clear, there really should be more of a description here...
getTrim1
{ "repo_name": "shenan4321/BIMplatform", "path": "generated/cn/dlb/bim/models/ifc2x3tc1/IfcTrimmedCurve.java", "license": "agpl-3.0", "size": 6024 }
[ "org.eclipse.emf.common.util.EList" ]
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,618,229
private void tds5AltFormatToken() throws IOException, ProtocolException { // total length, in bytes, of the remaining data stream final int pktLen = in.readShort(); // This is the ID of the compute clause being described. It is legal for a // Transact-SQL statement to have multiple ...
void function() throws IOException, ProtocolException { final int pktLen = in.readShort(); short id = in.readShort(); int bytesRead = 2; int computeByCount = in.read(); for( int i = 0; i < computeByCount; ++ i ) { ColInfo col = computedColumns[i]; int type = in.read(); switch( type ) { case 0x61: col.name = STR; break;...
/** * Sybase ASE only */
Sybase ASE only
tds5AltFormatToken
{ "repo_name": "milesibastos/jTDS", "path": "src/main/net/sourceforge/jtds/jdbc/TdsCore.java", "license": "lgpl-2.1", "size": 168782 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,294,567
public void SaveChanges () { File tempname = new File (filename.getPath () + ".tmp"); try { BufferedWriter wtr = sshclient.getMasterPassword ().EncryptedFileWriter (tempname.getPath ()); try { for (SavedLogin sh : values ()) { wtr.write...
void function () { File tempname = new File (filename.getPath () + ".tmp"); try { BufferedWriter wtr = sshclient.getMasterPassword ().EncryptedFileWriter (tempname.getPath ()); try { for (SavedLogin sh : values ()) { wtr.write (sh.getRecord ()); wtr.newLine (); } } finally { wtr.close (); } if (!tempname.renameTo (file...
/** * Write the in-memory list out to the datafile. * Also update the names available to all hostnametext input boxes. */
Write the in-memory list out to the datafile. Also update the names available to all hostnametext input boxes
SaveChanges
{ "repo_name": "mrieker/SshClient", "path": "app/src/main/java/com/outerworldapps/sshclient/SavedLogins.java", "license": "gpl-2.0", "size": 6245 }
[ "android.util.Log", "java.io.BufferedWriter", "java.io.File", "java.io.IOException" ]
import android.util.Log; import java.io.BufferedWriter; import java.io.File; import java.io.IOException;
import android.util.*; import java.io.*;
[ "android.util", "java.io" ]
android.util; java.io;
2,729,044
@Override @Pure public boolean intersects(Shape2D<?, ?, ?, ?, ?, ? extends Rectangle2afp<?, ?, ?, ?, ?, ?>> rectangle) { if (boundsIntersects(rectangle)) { if (rectangle.intersects(getBoundingBox())) { return true; } if (this.isWidePolyline) { final Rectangle2afp<?, ?, ?, ?, ?, ?> box = rectan...
boolean function(Shape2D<?, ?, ?, ?, ?, ? extends Rectangle2afp<?, ?, ?, ?, ?, ?>> rectangle) { if (boundsIntersects(rectangle)) { if (rectangle.intersects(getBoundingBox())) { return true; } if (this.isWidePolyline) { final Rectangle2afp<?, ?, ?, ?, ?, ?> box = rectangle.toBoundingBox(); final double rminX = box.getMi...
/** * Replies if this element has an intersection * with the specified rectangle. * * @return <code>true</code> if this MapElement is intersecting the specified area, * otherwise <code>false</code> */
Replies if this element has an intersection with the specified rectangle
intersects
{ "repo_name": "gallandarakhneorg/afc", "path": "advanced/gis/giscore/src/main/java/org/arakhne/afc/gis/mapelement/MapPolyline.java", "license": "apache-2.0", "size": 25283 }
[ "org.arakhne.afc.math.MathUtil", "org.arakhne.afc.math.geometry.d2.Shape2D", "org.arakhne.afc.math.geometry.d2.afp.Rectangle2afp", "org.arakhne.afc.math.geometry.d2.afp.Segment2afp", "org.arakhne.afc.math.geometry.d2.d.Point2d" ]
import org.arakhne.afc.math.MathUtil; import org.arakhne.afc.math.geometry.d2.Shape2D; import org.arakhne.afc.math.geometry.d2.afp.Rectangle2afp; import org.arakhne.afc.math.geometry.d2.afp.Segment2afp; import org.arakhne.afc.math.geometry.d2.d.Point2d;
import org.arakhne.afc.math.*; import org.arakhne.afc.math.geometry.d2.*; import org.arakhne.afc.math.geometry.d2.afp.*; import org.arakhne.afc.math.geometry.d2.d.*;
[ "org.arakhne.afc" ]
org.arakhne.afc;
1,747,100
public View getSecondaryMenu() { return mViewBehind.getSecondaryContent(); }
View function() { return mViewBehind.getSecondaryContent(); }
/** * Retrieves the current secondary menu (right). * * @return the current menu */
Retrieves the current secondary menu (right)
getSecondaryMenu
{ "repo_name": "Amuck/SlidingMenuLib", "path": "src/com/jeremyfeinstein/slidingmenu/lib/SlidingMenu.java", "license": "apache-2.0", "size": 30629 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
1,671,984
@JsonProperty( "last_licensed_scan_date" ) public Calendar getLastLicensedScanDate() { return lastLicensedScanDate; }
@JsonProperty( STR ) public Calendar getLastLicensedScanDate() { return lastLicensedScanDate; }
/** * Sets first seen. * * @param firstSeen the first seen */
Sets first seen
setFirstSeen
{ "repo_name": "tenable/Tenable.io-SDK-for-Java", "path": "src/main/java/com/tenable/io/api/assetImport/models/Asset.java", "license": "mit", "size": 14747 }
[ "com.fasterxml.jackson.annotation.JsonProperty", "java.util.Calendar" ]
import com.fasterxml.jackson.annotation.JsonProperty; import java.util.Calendar;
import com.fasterxml.jackson.annotation.*; import java.util.*;
[ "com.fasterxml.jackson", "java.util" ]
com.fasterxml.jackson; java.util;
106,944
@Test public void testByteArrayConversion() throws IOException { Util.createLocalInputFile(datadir + "originput2", new String[] {"peter\t1", "samir\t2", "michael\t4", "peter\t2", "peter\t4", "samir\t1", "john\t" }); Util.createLocalInputFile(datadir + ".pi...
void function() throws IOException { Util.createLocalInputFile(datadir + STR, new String[] {STR, STR, STR, STR, STR, STR, STR }); Util.createLocalInputFile(datadir + STR, new String[] { "{\"fields\":[{\"name\":\"name\",\"type\":55,\"schema\STR + "\"description\":\"autogenerated from Pig Field Schema\"}," + "{\"name\":\...
/** * See PIG-1830 * @throws IOException */
See PIG-1830
testByteArrayConversion
{ "repo_name": "daijyc/pig", "path": "test/org/apache/pig/test/TestPigStorage.java", "license": "apache-2.0", "size": 31235 }
[ "java.io.IOException", "java.util.Iterator", "org.apache.pig.data.Tuple", "org.apache.pig.impl.logicalLayer.schema.Schema" ]
import java.io.IOException; import java.util.Iterator; import org.apache.pig.data.Tuple; import org.apache.pig.impl.logicalLayer.schema.Schema;
import java.io.*; import java.util.*; import org.apache.pig.data.*; import org.apache.pig.impl.*;
[ "java.io", "java.util", "org.apache.pig" ]
java.io; java.util; org.apache.pig;
1,113,593
Response<DomainSharedAccessKeys> regenerateKeyWithResponse( DomainRegenerateKeyRequest regenerateKeyRequest, Context context);
Response<DomainSharedAccessKeys> regenerateKeyWithResponse( DomainRegenerateKeyRequest regenerateKeyRequest, Context context);
/** * Regenerate a shared access key for a domain. * * @param regenerateKeyRequest Request body to regenerate key. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.core.management...
Regenerate a shared access key for a domain
regenerateKeyWithResponse
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/eventgrid/azure-resourcemanager-eventgrid/src/main/java/com/azure/resourcemanager/eventgrid/models/Domain.java", "license": "mit", "size": 32244 }
[ "com.azure.core.http.rest.Response", "com.azure.core.util.Context" ]
import com.azure.core.http.rest.Response; import com.azure.core.util.Context;
import com.azure.core.http.rest.*; import com.azure.core.util.*;
[ "com.azure.core" ]
com.azure.core;
448,812
@ApiModelProperty(example = "null", required = true, value = "This string contains a previously configured company code which may also have codes needed for tax return purposes. These codes are maintained through the customer portal. Main company address identity") public String getCompanyLocation() { return co...
@ApiModelProperty(example = "null", required = true, value = STR) String function() { return companyLocation; }
/** * This string contains a previously configured company code which may also have codes needed for tax return purposes. These codes are maintained through the customer portal. Main company address identity * @return companyLocation **/
This string contains a previously configured company code which may also have codes needed for tax return purposes. These codes are maintained through the customer portal. Main company address identity
getCompanyLocation
{ "repo_name": "Avalara/avataxbr-clients", "path": "java-client/src/main/java/io/swagger/client/model/SalesHeaderOut.java", "license": "gpl-3.0", "size": 18319 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
1,759,932
public static void removeAllMakers(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) { Base.removeAll(model, instanceResource, MAKER); }
static void function(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) { Base.removeAll(model, instanceResource, MAKER); }
/** * Removes all values of property Maker * @param model an RDF2Go model * * @param resource an RDF2Go resource [Generated from RDFReactor template * rule #removeall1static] */
Removes all values of property Maker
removeAllMakers
{ "repo_name": "m0ep/master-thesis", "path": "source/apis/rdf2go/rdf2go-foaf/src/main/java/com/xmlns/foaf/Thing.java", "license": "mit", "size": 274766 }
[ "org.ontoware.rdf2go.model.Model", "org.ontoware.rdfreactor.runtime.Base" ]
import org.ontoware.rdf2go.model.Model; import org.ontoware.rdfreactor.runtime.Base;
import org.ontoware.rdf2go.model.*; import org.ontoware.rdfreactor.runtime.*;
[ "org.ontoware.rdf2go", "org.ontoware.rdfreactor" ]
org.ontoware.rdf2go; org.ontoware.rdfreactor;
2,809,951
public View getView(int position, View convertView, ViewGroup parent) { SpeechView sv; if (convertView == null) { sv = new SpeechView(mContext, Shakespeare.TITLES[position], Shakespeare.DIALOGUE[position]); } else { sv =...
View function(int position, View convertView, ViewGroup parent) { SpeechView sv; if (convertView == null) { sv = new SpeechView(mContext, Shakespeare.TITLES[position], Shakespeare.DIALOGUE[position]); } else { sv = (SpeechView) convertView; sv.setTitle(Shakespeare.TITLES[position]); sv.setDialogue(Shakespeare.DIALOGUE[...
/** * Make a SpeechView to hold each row. * * @see android.widget.ListAdapter#getView(int, android.view.View, * android.view.ViewGroup) */
Make a SpeechView to hold each row
getView
{ "repo_name": "b-cuts/android-maven-plugin", "path": "src/test/projects/apidemos-android-16/apidemos-application/src/main/java/com/example/android/apis/view/List4.java", "license": "apache-2.0", "size": 4705 }
[ "android.content.Context", "android.view.View", "android.view.ViewGroup", "android.widget.LinearLayout", "android.widget.TextView", "com.example.android.apis.Shakespeare" ]
import android.content.Context; import android.view.View; import android.view.ViewGroup; import android.widget.LinearLayout; import android.widget.TextView; import com.example.android.apis.Shakespeare;
import android.content.*; import android.view.*; import android.widget.*; import com.example.android.apis.*;
[ "android.content", "android.view", "android.widget", "com.example.android" ]
android.content; android.view; android.widget; com.example.android;
1,107,994
private static void packBasicFileInfo(FileInfo info, DataBuffer buf) { // Information format :- // LARGE_INTEGER Creation date/time // LARGE_INTEGER Access date/time // LARGE_INTEGER Write date/time // LARGE_INTEGER Change date/time // UINT Attributes // UINT Unknown // Pack the creation date/time ...
static void function(FileInfo info, DataBuffer buf) { if ( info.hasCreationDateTime()) { buf.putLong(NTTime.toNTTime(info.getCreationDateTime())); } else buf.putZeros(8); if ( info.hasAccessDateTime()) { buf.putLong(NTTime.toNTTime(info.getAccessDateTime())); } else if ( info.hasModifyDateTime()) buf.putLong(NTTime.toN...
/** * Pack the basic file information (level 0x101) * * @param info File information * @param buf Buffer to pack data into */
Pack the basic file information (level 0x101)
packBasicFileInfo
{ "repo_name": "loftuxab/community-edition-old", "path": "projects/alfresco-jlan/source/java/org/alfresco/jlan/smb/server/QueryInfoPacker.java", "license": "lgpl-3.0", "size": 17087 }
[ "org.alfresco.jlan.server.filesys.FileInfo", "org.alfresco.jlan.smb.NTTime", "org.alfresco.jlan.util.DataBuffer" ]
import org.alfresco.jlan.server.filesys.FileInfo; import org.alfresco.jlan.smb.NTTime; import org.alfresco.jlan.util.DataBuffer;
import org.alfresco.jlan.server.filesys.*; import org.alfresco.jlan.smb.*; import org.alfresco.jlan.util.*;
[ "org.alfresco.jlan" ]
org.alfresco.jlan;
814,349
Observable<List<SimilarFace>> findSimilarAsync(UUID faceId, FindSimilarOptionalParameter findSimilarOptionalParameter);
Observable<List<SimilarFace>> findSimilarAsync(UUID faceId, FindSimilarOptionalParameter findSimilarOptionalParameter);
/** * Given query face's faceId, find the similar-looking faces from a faceId array or a faceListId. * * @param faceId FaceId of the query face. User needs to call Face - Detect first to get a valid faceId. Note that this * faceId is not persisted and will expire 24 hours after the detection call....
Given query face's faceId, find the similar-looking faces from a faceId array or a faceListId
findSimilarAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/cognitiveservices/ms-azure-cs-faceapi/src/main/java/com/microsoft/azure/cognitiveservices/vision/faceapi/Faces.java", "license": "mit", "size": 23718 }
[ "com.microsoft.azure.cognitiveservices.vision.faceapi.models.FindSimilarOptionalParameter", "com.microsoft.azure.cognitiveservices.vision.faceapi.models.SimilarFace", "java.util.List" ]
import com.microsoft.azure.cognitiveservices.vision.faceapi.models.FindSimilarOptionalParameter; import com.microsoft.azure.cognitiveservices.vision.faceapi.models.SimilarFace; import java.util.List;
import com.microsoft.azure.cognitiveservices.vision.faceapi.models.*; import java.util.*;
[ "com.microsoft.azure", "java.util" ]
com.microsoft.azure; java.util;
499,676
@Override protected void doActionPerformed(ActionEvent e) { if (m_State.getApplyToAll()) getTabbedPane().setShowCellTypes(isSelected()); else getTabbedPane().setShowCellTypesAt(getTabbedPane().getSelectedIndex(), isSelected()); }
void function(ActionEvent e) { if (m_State.getApplyToAll()) getTabbedPane().setShowCellTypes(isSelected()); else getTabbedPane().setShowCellTypesAt(getTabbedPane().getSelectedIndex(), isSelected()); }
/** * Invoked when an action occurs. */
Invoked when an action occurs
doActionPerformed
{ "repo_name": "waikato-datamining/adams-base", "path": "adams-spreadsheet/src/main/java/adams/gui/tools/spreadsheetviewer/menu/ViewShowCellTypes.java", "license": "gpl-3.0", "size": 2217 }
[ "java.awt.event.ActionEvent" ]
import java.awt.event.ActionEvent;
import java.awt.event.*;
[ "java.awt" ]
java.awt;
2,577,397
public void onWindowFocusChanged(boolean hasWindowFocus) { if (!hasWindowFocus) hideNotificationToast(); if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2) return; mHandler.removeMessages(MSG_ID_SET_FULLSCREEN_SYSTEM_UI_FLAGS); mHandler.removeMessages(MSG_ID_CLEAR_LAYOU...
void function(boolean hasWindowFocus) { if (!hasWindowFocus) hideNotificationToast(); if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR2) return; mHandler.removeMessages(MSG_ID_SET_FULLSCREEN_SYSTEM_UI_FLAGS); mHandler.removeMessages(MSG_ID_CLEAR_LAYOUT_FULLSCREEN_FLAG); if (mTabInFullscreen == null !mIsPer...
/** * Ensure the proper system UI flags are set after the window regains focus. * @see android.app.Activity#onWindowFocusChanged(boolean) */
Ensure the proper system UI flags are set after the window regains focus
onWindowFocusChanged
{ "repo_name": "js0701/chromium-crosswalk", "path": "chrome/android/java/src/org/chromium/chrome/browser/fullscreen/FullscreenHtmlApiHandler.java", "license": "bsd-3-clause", "size": 17451 }
[ "android.os.Build" ]
import android.os.Build;
import android.os.*;
[ "android.os" ]
android.os;
66,393
public String getMD5Hash() throws FileSystemException { ObjectMetadata metadata = getObjectMetadata(); if (metadata != null) { return metadata.getETag(); // TODO this is something different than mentioned in methodname / javadoc } return null; }
String function() throws FileSystemException { ObjectMetadata metadata = getObjectMetadata(); if (metadata != null) { return metadata.getETag(); } return null; }
/** * Get MD5 hash for the file * @return md5 hash for file */
Get MD5 hash for the file
getMD5Hash
{ "repo_name": "themartynroberts/vfs2-s3", "path": "src/main/java/org/apache/commons/vfs2/provider/s3/S3FileObject.java", "license": "apache-2.0", "size": 31115 }
[ "com.amazonaws.services.s3.model.ObjectMetadata", "org.apache.commons.vfs2.FileSystemException" ]
import com.amazonaws.services.s3.model.ObjectMetadata; import org.apache.commons.vfs2.FileSystemException;
import com.amazonaws.services.s3.model.*; import org.apache.commons.vfs2.*;
[ "com.amazonaws.services", "org.apache.commons" ]
com.amazonaws.services; org.apache.commons;
273,739
private void initialize( Collection<String> toRemove, Collection<String> toAdd, String siteRoot, boolean removeAllNonExplicitlyAdded) { m_removeAllNonExplicitlyAdded = removeAllNonExplicitlyAdded; for (String removeKey : toRemove) { if (CmsUUID.isValidUU...
void function( Collection<String> toRemove, Collection<String> toAdd, String siteRoot, boolean removeAllNonExplicitlyAdded) { m_removeAllNonExplicitlyAdded = removeAllNonExplicitlyAdded; for (String removeKey : toRemove) { if (CmsUUID.isValidUUID(removeKey)) { m_updateSet.put(new CmsUUID(removeKey), Boolean.FALSE); } e...
/** * Initializes this formatter change set with the values from the sitemap configuration.<p> * * @param toRemove the keys for the formatters to remove * @param toAdd the keys for the formatters to add * @param siteRoot the site root of the current config * @param removeAllNonExplicitlyAd...
Initializes this formatter change set with the values from the sitemap configuration
initialize
{ "repo_name": "alkacon/opencms-core", "path": "src/org/opencms/ade/configuration/formatters/CmsFormatterChangeSet.java", "license": "lgpl-2.1", "size": 9622 }
[ "java.util.Collection", "java.util.regex.Pattern", "org.opencms.main.OpenCms", "org.opencms.util.CmsStringUtil", "org.opencms.util.CmsUUID" ]
import java.util.Collection; import java.util.regex.Pattern; import org.opencms.main.OpenCms; import org.opencms.util.CmsStringUtil; import org.opencms.util.CmsUUID;
import java.util.*; import java.util.regex.*; import org.opencms.main.*; import org.opencms.util.*;
[ "java.util", "org.opencms.main", "org.opencms.util" ]
java.util; org.opencms.main; org.opencms.util;
421,516
@Deployment(name = "app", testable = false) public static WebArchive createDeployment() { final WebArchive war = ShrinkWrap.create(WebArchive.class, WEB_APP_CONTEXT + ".war"); war.addClasses(JAXBUsageServlet.class, Items.class, ObjectFactory.class, PurchaseOrderType.class, USAddress.class); ...
@Deployment(name = "app", testable = false) static WebArchive function() { final WebArchive war = ShrinkWrap.create(WebArchive.class, WEB_APP_CONTEXT + ".war"); war.addClasses(JAXBUsageServlet.class, Items.class, ObjectFactory.class, PurchaseOrderType.class, USAddress.class); return war; }
/** * Create a .ear, containing a web application (without any Jakarta Server Faces constructs) and also the xerces jar in the .ear/lib * * @return */
Create a .ear, containing a web application (without any Jakarta Server Faces constructs) and also the xerces jar in the .ear/lib
createDeployment
{ "repo_name": "jstourac/wildfly", "path": "testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/jaxb/unit/JAXBUsageTestCase.java", "license": "lgpl-2.1", "size": 3986 }
[ "org.jboss.arquillian.container.test.api.Deployment", "org.jboss.as.test.integration.jaxb.JAXBUsageServlet", "org.jboss.as.test.integration.jaxb.bindings.Items", "org.jboss.as.test.integration.jaxb.bindings.ObjectFactory", "org.jboss.as.test.integration.jaxb.bindings.PurchaseOrderType", "org.jboss.as.test...
import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.as.test.integration.jaxb.JAXBUsageServlet; import org.jboss.as.test.integration.jaxb.bindings.Items; import org.jboss.as.test.integration.jaxb.bindings.ObjectFactory; import org.jboss.as.test.integration.jaxb.bindings.PurchaseOrderType; import ...
import org.jboss.arquillian.container.test.api.*; import org.jboss.as.test.integration.jaxb.*; import org.jboss.as.test.integration.jaxb.bindings.*; import org.jboss.shrinkwrap.api.*; import org.jboss.shrinkwrap.api.spec.*;
[ "org.jboss.arquillian", "org.jboss.as", "org.jboss.shrinkwrap" ]
org.jboss.arquillian; org.jboss.as; org.jboss.shrinkwrap;
510,948
public static LocalTime now(Clock clock) { Objects.requireNonNull(clock, "clock"); // inline OffsetTime factory to avoid creating object and InstantProvider checks final Instant now = clock.instant(); // called once return ofInstant(now, clock.getZone()); }
static LocalTime function(Clock clock) { Objects.requireNonNull(clock, "clock"); final Instant now = clock.instant(); return ofInstant(now, clock.getZone()); }
/** * Obtains the current time from the specified clock. * <p> * This will query the specified clock to obtain the current time. * Using this method allows the use of an alternate clock for testing. * The alternate clock may be introduced using {@link Clock dependency injection}. * * ...
Obtains the current time from the specified clock. This will query the specified clock to obtain the current time. Using this method allows the use of an alternate clock for testing. The alternate clock may be introduced using <code>Clock dependency injection</code>
now
{ "repo_name": "google/desugar_jdk_libs", "path": "jdk11/src/libcore/ojluni/src/main/java/java/time/LocalTime.java", "license": "gpl-2.0", "size": 73669 }
[ "java.util.Objects" ]
import java.util.Objects;
import java.util.*;
[ "java.util" ]
java.util;
2,152,717
public FormValidation doCheckWaitSeconds(@QueryParameter String value) { if (value == null || value.isEmpty()) return FormValidation.error("Can not be empty."); Integer i = Integer.valueOf(value); if (i != null && i >= 0) { return FormValidation.ok(); } else { return FormValidation.error("I...
FormValidation function(@QueryParameter String value) { if (value == null value.isEmpty()) return FormValidation.error(STR); Integer i = Integer.valueOf(value); if (i != null && i >= 0) { return FormValidation.ok(); } else { return FormValidation.error(STR); } }
/** * Do form validation of wait seconds. */
Do form validation of wait seconds
doCheckWaitSeconds
{ "repo_name": "patlau/vssj-plugin", "path": "src/main/java/org/jenkinsci/plugins/vssj/VssSCM.java", "license": "mit", "size": 15320 }
[ "hudson.util.FormValidation", "org.kohsuke.stapler.QueryParameter" ]
import hudson.util.FormValidation; import org.kohsuke.stapler.QueryParameter;
import hudson.util.*; import org.kohsuke.stapler.*;
[ "hudson.util", "org.kohsuke.stapler" ]
hudson.util; org.kohsuke.stapler;
290,195
public void setTable(AmberTable table) { _table = table; }
void function(AmberTable table) { _table = table; }
/** * Sets the table. */
Sets the table
setTable
{ "repo_name": "bertrama/resin", "path": "modules/resin/src/com/caucho/amber/query/FromItem.java", "license": "gpl-2.0", "size": 5069 }
[ "com.caucho.amber.table.AmberTable" ]
import com.caucho.amber.table.AmberTable;
import com.caucho.amber.table.*;
[ "com.caucho.amber" ]
com.caucho.amber;
1,062,413
@Nullable public static Constructor<?> forceEmptyConstructor(Class<?> cls) throws IgniteCheckedException { Constructor<?> ctor = null; try { return cls.getDeclaredConstructor(); } catch (Exception ignore) { Method ctorFac = U.ctorFactory(); Object...
@Nullable static Constructor<?> function(Class<?> cls) throws IgniteCheckedException { Constructor<?> ctor = null; try { return cls.getDeclaredConstructor(); } catch (Exception ignore) { Method ctorFac = U.ctorFactory(); Object sunRefFac = U.sunReflectionFactory(); if (ctorFac != null && sunRefFac != null) try { ctor =...
/** * Gets empty constructor for class even if the class does not have empty constructor * declared. This method is guaranteed to work with SUN JDK and other JDKs still need * to be tested. * * @param cls Class to get empty constructor for. * @return Empty constructor if one could be found...
Gets empty constructor for class even if the class does not have empty constructor declared. This method is guaranteed to work with SUN JDK and other JDKs still need to be tested
forceEmptyConstructor
{ "repo_name": "mcherkasov/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java", "license": "apache-2.0", "size": 316648 }
[ "java.lang.reflect.Constructor", "java.lang.reflect.InvocationTargetException", "java.lang.reflect.Method", "org.apache.ignite.IgniteCheckedException", "org.apache.ignite.internal.util.typedef.internal.U", "org.jetbrains.annotations.Nullable" ]
import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.internal.util.typedef.internal.U; import org.jetbrains.annotations.Nullable;
import java.lang.reflect.*; import org.apache.ignite.*; import org.apache.ignite.internal.util.typedef.internal.*; import org.jetbrains.annotations.*;
[ "java.lang", "org.apache.ignite", "org.jetbrains.annotations" ]
java.lang; org.apache.ignite; org.jetbrains.annotations;
2,321,650
private TreeSet<String> scanKeys() throws IOException { TreeSet<String> keySet = new TreeSet<String>(); String prefix = _tagPrefix; Map<String,RepositoryTagEntry> tagMap = _repository.getTagMap(); for (String tag : tagMap.keySet()) { if (tag.startsWith(prefix)) { String ...
TreeSet<String> function() throws IOException { TreeSet<String> keySet = new TreeSet<String>(); String prefix = _tagPrefix; Map<String,RepositoryTagEntry> tagMap = _repository.getTagMap(); for (String tag : tagMap.keySet()) { if (tag.startsWith(prefix)) { String key = tag.substring(prefix.length()); if (key.indexOf('/'...
/** * Return the entry names for all repository objects. */
Return the entry names for all repository objects
scanKeys
{ "repo_name": "dlitz/resin", "path": "modules/resin/src/com/caucho/env/deploy/ExpandRepositoryManager.java", "license": "gpl-2.0", "size": 4213 }
[ "com.caucho.env.repository.RepositoryTagEntry", "java.io.IOException", "java.util.Map", "java.util.TreeSet" ]
import com.caucho.env.repository.RepositoryTagEntry; import java.io.IOException; import java.util.Map; import java.util.TreeSet;
import com.caucho.env.repository.*; import java.io.*; import java.util.*;
[ "com.caucho.env", "java.io", "java.util" ]
com.caucho.env; java.io; java.util;
313,189
private Boolean isAuthorized(HttpServletRequest request, HttpServletResponse response, String service, String room) throws ServletException, IOException { String auth = request.getHeader("Authorization"); JID jid; try { if (auth == null || !reques...
Boolean function(HttpServletRequest request, HttpServletResponse response, String service, String room) throws ServletException, IOException { String auth = request.getHeader(STR); JID jid; try { if (auth == null !request.getAuthType().equals(HttpServletRequest.BASIC_AUTH)) { throw new Exception(STR); } auth = auth.sub...
/** * Verifies that the authenticated user is a member of a conference service and room, or else * they are not entitled to view any of the files in the room. * * @param request Object representing the HTTP request. * @param response Object representing the HTTP response. * @param service ...
Verifies that the authenticated user is a member of a conference service and room, or else they are not entitled to view any of the files in the room
isAuthorized
{ "repo_name": "coodeer/g3server", "path": "src/java/org/jivesoftware/openfire/webdav/WebDAVLiteServlet.java", "license": "apache-2.0", "size": 15848 }
[ "java.io.IOException", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "org.jivesoftware.openfire.XMPPServer", "org.jivesoftware.util.Base64" ]
import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.jivesoftware.openfire.XMPPServer; import org.jivesoftware.util.Base64;
import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import org.jivesoftware.openfire.*; import org.jivesoftware.util.*;
[ "java.io", "javax.servlet", "org.jivesoftware.openfire", "org.jivesoftware.util" ]
java.io; javax.servlet; org.jivesoftware.openfire; org.jivesoftware.util;
1,499,441
public void setEncodedImage(String encodedAvatar) { setAvatar(encodedAvatar, DEFAULT_MIME_TYPE); } /** * Return the byte representation of the avatar(if one exists), otherwise returns null if * no avatar could be found. * <b>Example 1</b> * <pre> * // Load Avatar from V...
void function(String encodedAvatar) { setAvatar(encodedAvatar, DEFAULT_MIME_TYPE); } /** * Return the byte representation of the avatar(if one exists), otherwise returns null if * no avatar could be found. * <b>Example 1</b> * <pre> * * byte[] avatarBytes = vCard.getAvatar(); * <p/> * * ImageIcon icon = new ImageIcon(a...
/** * Set the encoded avatar string. This is used by the provider. * * @param encodedAvatar the encoded avatar string. * @deprecated Use {@link #setAvatar(String, String)} instead. */
Set the encoded avatar string. This is used by the provider
setEncodedImage
{ "repo_name": "vito-c/Smack", "path": "smack-extensions/src/main/java/org/jivesoftware/smackx/vcardtemp/packet/VCard.java", "license": "apache-2.0", "size": 24890 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,501,056
public void disableGlobalInputProcessors(Iscene scene){ Set<AbstractGlobalInputProcessor> set = inputProcessorsToScene.keySet(); for (AbstractGlobalInputProcessor processor : set) { if (inputProcessorsToScene.get(processor).equals(scene)) { processor.setDisabled(true); ...
void function(Iscene scene){ Set<AbstractGlobalInputProcessor> set = inputProcessorsToScene.keySet(); for (AbstractGlobalInputProcessor processor : set) { if (inputProcessorsToScene.get(processor).equals(scene)) { processor.setDisabled(true); } } }
/** * Disables the global inputprocessors that are associated with the given scene. * * @param scene the scene */
Disables the global inputprocessors that are associated with the given scene
disableGlobalInputProcessors
{ "repo_name": "rogiermars/mt4j-core", "path": "src/org/mt4j/input/InputManager.java", "license": "gpl-2.0", "size": 9221 }
[ "java.util.Set", "org.mt4j.input.inputProcessors.globalProcessors.AbstractGlobalInputProcessor", "org.mt4j.sceneManagement.Iscene" ]
import java.util.Set; import org.mt4j.input.inputProcessors.globalProcessors.AbstractGlobalInputProcessor; import org.mt4j.sceneManagement.Iscene;
import java.util.*; import org.mt4j.*; import org.mt4j.input.*;
[ "java.util", "org.mt4j", "org.mt4j.input" ]
java.util; org.mt4j; org.mt4j.input;
2,776,011
@Override public Adapter createCloudConnectorOperationInputConnectorAdapter() { if (cloudConnectorOperationInputConnectorItemProvider == null) { cloudConnectorOperationInputConnectorItemProvider = new CloudConnectorOperationInputConnectorItemProvider(this); } return cloudCon...
Adapter function() { if (cloudConnectorOperationInputConnectorItemProvider == null) { cloudConnectorOperationInputConnectorItemProvider = new CloudConnectorOperationInputConnectorItemProvider(this); } return cloudConnectorOperationInputConnectorItemProvider; } protected CloudConnectorOperationOutputConnectorItemProvide...
/** * This creates an adapter for a {@link org.wso2.developerstudio.eclipse.gmf.esb.CloudConnectorOperationInputConnector}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This creates an adapter for a <code>org.wso2.developerstudio.eclipse.gmf.esb.CloudConnectorOperationInputConnector</code>.
createCloudConnectorOperationInputConnectorAdapter
{ "repo_name": "prabushi/devstudio-tooling-esb", "path": "plugins/org.wso2.developerstudio.eclipse.gmf.esb.edit/src/org/wso2/developerstudio/eclipse/gmf/esb/provider/EsbItemProviderAdapterFactory.java", "license": "apache-2.0", "size": 339597 }
[ "org.eclipse.emf.common.notify.Adapter" ]
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,300,412
log.debug("getProperties({})", nDocVersion); Version ver = new Version(); // Properties ver.setAuthor(nDocVersion.getAuthor()); ver.setSize(nDocVersion.getSize()); ver.setComment(nDocVersion.getComment()); ver.setName(nDocVersion.getName()); ver.setCreated(nDocVersion.getCreated()); ver.setChecksum...
log.debug(STR, nDocVersion); Version ver = new Version(); ver.setAuthor(nDocVersion.getAuthor()); ver.setSize(nDocVersion.getSize()); ver.setComment(nDocVersion.getComment()); ver.setName(nDocVersion.getName()); ver.setCreated(nDocVersion.getCreated()); ver.setChecksum(nDocVersion.getChecksum()); ver.setActual(nDocVers...
/** * Get properties */
Get properties
getProperties
{ "repo_name": "papamas/DMS-KANGREG-XI-MANADO", "path": "src/main/java/com/openkm/module/db/base/BaseModule.java", "license": "gpl-3.0", "size": 3261 }
[ "com.openkm.bean.Version" ]
import com.openkm.bean.Version;
import com.openkm.bean.*;
[ "com.openkm.bean" ]
com.openkm.bean;
861,637
public void dumpState(){ Log.d(TAG,"BEGIN launcher3 dump state for launcher " + this); Log.d(TAG,"mSavedState=" + mSavedState); Log.d(TAG,"mWorkspaceLoading=" + mWorkspaceLoading); Log.d(TAG,"mRestoring=" + mRestoring); Log.d(TAG,"mWaitingForResult=" + mWaitingForResult); ...
void function(){ Log.d(TAG,STR + this); Log.d(TAG,STR + mSavedState); Log.d(TAG,STR + mWorkspaceLoading); Log.d(TAG,STR + mRestoring); Log.d(TAG,STR + mWaitingForResult); Log.d(TAG,STR + mSavedInstanceState); Log.d(TAG,STR + sFolders.size()); mModel.dumpState(); if(mAppsCustomizeContent != null){ mAppsCustomizeContent....
/** * Prints out out state for debugging. */
Prints out out state for debugging
dumpState
{ "repo_name": "hikelee/projector", "path": "android/Launcher/src/com/android/launcher3/Launcher.java", "license": "mit", "size": 182618 }
[ "android.util.Log" ]
import android.util.Log;
import android.util.*;
[ "android.util" ]
android.util;
1,800,492
protected void preValidateCall( SqlValidator validator, SqlValidatorScope scope, SqlCall call) { }
void function( SqlValidator validator, SqlValidatorScope scope, SqlCall call) { }
/** * Receives notification that validation of a call to this operator is * beginning. Subclasses can supply custom behavior; default implementation * does nothing. * * @param validator invoking validator * @param scope validation scope * @param call the call being validated */
Receives notification that validation of a call to this operator is beginning. Subclasses can supply custom behavior; default implementation does nothing
preValidateCall
{ "repo_name": "mehant/incubator-calcite", "path": "core/src/main/java/org/apache/calcite/sql/SqlOperator.java", "license": "apache-2.0", "size": 24165 }
[ "org.apache.calcite.sql.validate.SqlValidator", "org.apache.calcite.sql.validate.SqlValidatorScope" ]
import org.apache.calcite.sql.validate.SqlValidator; import org.apache.calcite.sql.validate.SqlValidatorScope;
import org.apache.calcite.sql.validate.*;
[ "org.apache.calcite" ]
org.apache.calcite;
2,747,074
private boolean isFormSubmission(HttpServletRequest request) { return "POST".equals(request.getMethod()); }
boolean function(HttpServletRequest request) { return "POST".equals(request.getMethod()); }
/** * Determine if the given request represents a form submission. * * @param request current HTTP request * @return if the request represents a form submission */
Determine if the given request represents a form submission
isFormSubmission
{ "repo_name": "ayeminoo/futuresonic", "path": "futuresonic-main/src/main/java/net/sourceforge/subsonic/controller/AccessSettingsController.java", "license": "gpl-3.0", "size": 4559 }
[ "javax.servlet.http.HttpServletRequest" ]
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.*;
[ "javax.servlet" ]
javax.servlet;
690,215
public void set(Object target, Object value, SessionFactoryImplementor factory) throws HibernateException; public String getMethodName(); public Method getMethod();
void set(Object target, Object value, SessionFactoryImplementor factory) throws HibernateException; public String functionName(); Method function();
/** * Optional operation (return null) */
Optional operation (return null)
getMethod
{ "repo_name": "raedle/univis", "path": "lib/hibernate-3.1.3/src/org/hibernate/property/Setter.java", "license": "lgpl-2.1", "size": 929 }
[ "java.lang.reflect.Method", "org.hibernate.HibernateException", "org.hibernate.engine.SessionFactoryImplementor" ]
import java.lang.reflect.Method; import org.hibernate.HibernateException; import org.hibernate.engine.SessionFactoryImplementor;
import java.lang.reflect.*; import org.hibernate.*; import org.hibernate.engine.*;
[ "java.lang", "org.hibernate", "org.hibernate.engine" ]
java.lang; org.hibernate; org.hibernate.engine;
2,583,590
public void assertHasSize(AssertionInfo info, CharSequence actual, int expectedSize) { assertNotNull(info, actual); checkSizes(actual, actual.length(), expectedSize, info); }
void function(AssertionInfo info, CharSequence actual, int expectedSize) { assertNotNull(info, actual); checkSizes(actual, actual.length(), expectedSize, info); }
/** * Asserts that the size of the given {@code CharSequence} is equal to the expected one. * * @param info contains information about the assertion. * @param actual the given {@code CharSequence}. * @param expectedSize the expected size of {@code actual}. * @throws AssertionError if the given {@code...
Asserts that the size of the given CharSequence is equal to the expected one
assertHasSize
{ "repo_name": "michal-lipski/assertj-core", "path": "src/main/java/org/assertj/core/internal/Strings.java", "license": "apache-2.0", "size": 29060 }
[ "org.assertj.core.api.AssertionInfo", "org.assertj.core.internal.CommonValidations" ]
import org.assertj.core.api.AssertionInfo; import org.assertj.core.internal.CommonValidations;
import org.assertj.core.api.*; import org.assertj.core.internal.*;
[ "org.assertj.core" ]
org.assertj.core;
1,302,811
public BigDecimal sum(BigDecimal first, BigDecimal second) { BigDecimal sumOfNumbers = new BigDecimal( String.valueOf(first) ); sumOfNumbers = sumOfNumbers.add(second); return sumOfNumbers; }
BigDecimal function(BigDecimal first, BigDecimal second) { BigDecimal sumOfNumbers = new BigDecimal( String.valueOf(first) ); sumOfNumbers = sumOfNumbers.add(second); return sumOfNumbers; }
/** * Returns the sum of two BigDecimal numbers. * * @param first The first BigDecimal number * @param second The second BigDecimal number * @return The sum of the two BigDecimal numbers */
Returns the sum of two BigDecimal numbers
sum
{ "repo_name": "dvt32/cpp-journey", "path": "Java/Misc/Internship2017/GenericTypesClassesAndObjects/src/main/java/net/dvt32/generictypesclassesandobjects/task1/Summator.java", "license": "mit", "size": 4312 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
763,536
public Integer getHierarchyLevel() { Set<String> uids = Sets.newHashSet( uid ); OrganisationUnit current = this; while ( (current = current.getParent()) != null ) { boolean add = uids.add( current.getUid() ); if ( !add ) { ...
Integer function() { Set<String> uids = Sets.newHashSet( uid ); OrganisationUnit current = this; while ( (current = current.getParent()) != null ) { boolean add = uids.add( current.getUid() ); if ( !add ) { break; } } hierarchyLevel = uids.size(); return hierarchyLevel; }
/** * Used by persistence layer. Purpose is to have a column for use in database * queries. For application use see {@link getLevel()} which has better performance. */
Used by persistence layer. Purpose is to have a column for use in database queries. For application use see <code>getLevel()</code> which has better performance
getHierarchyLevel
{ "repo_name": "mortenoh/dhis2-core", "path": "dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java", "license": "bsd-3-clause", "size": 35770 }
[ "com.google.common.collect.Sets", "java.util.Set" ]
import com.google.common.collect.Sets; import java.util.Set;
import com.google.common.collect.*; import java.util.*;
[ "com.google.common", "java.util" ]
com.google.common; java.util;
47,301
private static CompilerInfoStruct collectVersionInformation(final String path) { if (path == null || path.trim().length() == 0) { return null; } // If we are on win32 and we do not have cygwin -> cancel if (Platform.OS_WIN32.equals(Platform.getOS())) { if (!Cygwin.isInstalled()) { return null; ...
static CompilerInfoStruct function(final String path) { if (path == null path.trim().length() == 0) { return null; } if (Platform.OS_WIN32.equals(Platform.getOS())) { if (!Cygwin.isInstalled()) { return null; } } boolean reportDebugInformation = Platform.getPreferencesService().getBoolean(ProductConstants.PRODUCT_ID_DE...
/** * Does the actual work of collecting the version information from the * provided path. * * @param path * the path of the supposed TITAN installation. * @return the structure recovered from the compiler, or null in case of * problems. * */
Does the actual work of collecting the version information from the provided path
collectVersionInformation
{ "repo_name": "alovassy/titan.EclipsePlug-ins", "path": "org.eclipse.titan.designer/src/org/eclipse/titan/designer/core/CompilerVersionInformationCollector.java", "license": "epl-1.0", "size": 10928 }
[ "java.io.BufferedReader", "java.io.IOException", "java.io.InputStreamReader", "java.util.ArrayList", "java.util.regex.Matcher", "org.eclipse.core.runtime.Path", "org.eclipse.core.runtime.Platform", "org.eclipse.titan.common.logging.ErrorReporter", "org.eclipse.titan.common.path.PathConverter", "or...
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.regex.Matcher; import org.eclipse.core.runtime.Path; import org.eclipse.core.runtime.Platform; import org.eclipse.titan.common.logging.ErrorReporter; import org.eclipse.titan.common....
import java.io.*; import java.util.*; import java.util.regex.*; import org.eclipse.core.runtime.*; import org.eclipse.titan.common.logging.*; import org.eclipse.titan.common.path.*; import org.eclipse.titan.common.utils.*; import org.eclipse.titan.designer.*; import org.eclipse.titan.designer.actions.*; import org.ecli...
[ "java.io", "java.util", "org.eclipse.core", "org.eclipse.titan" ]
java.io; java.util; org.eclipse.core; org.eclipse.titan;
2,842,444
private void updateGeomagneticField() { mGeomagneticField = new GeomagneticField((float) mLocation.getLatitude(), (float) mLocation.getLongitude(), (float) mLocation.getAltitude(), mLocation.getTime()); }
void function() { mGeomagneticField = new GeomagneticField((float) mLocation.getLatitude(), (float) mLocation.getLongitude(), (float) mLocation.getAltitude(), mLocation.getTime()); }
/** * Updates the cached instance of the geomagnetic field after a location change. */
Updates the cached instance of the geomagnetic field after a location change
updateGeomagneticField
{ "repo_name": "luisibanez/gdk-line-sample", "path": "src/com/kitware/android/glass/sample/line/OrientationManager.java", "license": "apache-2.0", "size": 12361 }
[ "android.hardware.GeomagneticField" ]
import android.hardware.GeomagneticField;
import android.hardware.*;
[ "android.hardware" ]
android.hardware;
983,598
public static final Uri getOtrMessagesContentUriByProvider(long providerId) { Uri.Builder builder = OTR_MESSAGES_CONTENT_URI_BY_PROVIDER.buildUpon(); ContentUris.appendId(builder, providerId); return builder.build(); }
static final Uri function(long providerId) { Uri.Builder builder = OTR_MESSAGES_CONTENT_URI_BY_PROVIDER.buildUpon(); ContentUris.appendId(builder, providerId); return builder.build(); }
/** * Gets the Uri to query off the record messages by provider. * * @param providerId the service provider id. * @return the Uri */
Gets the Uri to query off the record messages by provider
getOtrMessagesContentUriByProvider
{ "repo_name": "ChatSecure/ChatSecureAndroid", "path": "src/info/guardianproject/otr/app/im/provider/Imps.java", "license": "apache-2.0", "size": 98672 }
[ "android.content.ContentUris", "android.net.Uri" ]
import android.content.ContentUris; import android.net.Uri;
import android.content.*; import android.net.*;
[ "android.content", "android.net" ]
android.content; android.net;
285,169
@Test public void testEquals_2() throws Exception { Terrain fixture = new Terrain(); fixture.gridQuads = new ArrayList<Cases>(); Terrain o = new Terrain(); o.gridQuads = new ArrayList<Cases>(); boolean result = fixture.equals(o); // add additional test code here assertEquals(true, resul...
void function() throws Exception { Terrain fixture = new Terrain(); fixture.gridQuads = new ArrayList<Cases>(); Terrain o = new Terrain(); o.gridQuads = new ArrayList<Cases>(); boolean result = fixture.equals(o); assertEquals(true, result); }
/** * Run the boolean equals(Object) method test. * * @throws Exception * * @generatedBy CodePro at 15/05/15 23:06 */
Run the boolean equals(Object) method test
testEquals_2
{ "repo_name": "laynos/GLPOO_ESIEA_1415_Eternity_Souhel", "path": "eternity/test/main/java/fr/esiea/glpoo/création_pièces_terrain/AbstractQuadGridTest.java", "license": "apache-2.0", "size": 15405 }
[ "java.util.ArrayList", "org.junit.Assert" ]
import java.util.ArrayList; import org.junit.Assert;
import java.util.*; import org.junit.*;
[ "java.util", "org.junit" ]
java.util; org.junit;
216,202
public static float getZoomForLevel(byte level) { switch (level) { case -1: return 0; case 0: return 0.25f; case 1: return 0.5f; //default character zoom case 2: return 1.0f; //default vehicle zoom default: return MyMath.fibonacci(level); }...
static float function(byte level) { switch (level) { case -1: return 0; case 0: return 0.25f; case 1: return 0.5f; case 2: return 1.0f; default: return MyMath.fibonacci(level); } }
/** iter: -1, 0, 1, 2, 3, 4, 5, 6, 7, 8... * fib: , 0, 1, 1, 2, 3, 5, 8, 13, 21.. * out: 0, 0.25, 0.5, 1, 2, 3, 5, 8, 13, 21.. */
iter: -1, 0, 1, 2, 3, 4, 5, 6, 7, 8... fib: , 0, 1, 1, 2, 3, 5, 8, 13, 21.
getZoomForLevel
{ "repo_name": "0XDE57/SpaceProject", "path": "core/src/com/spaceproject/systems/CameraSystem.java", "license": "apache-2.0", "size": 11647 }
[ "com.spaceproject.math.MyMath" ]
import com.spaceproject.math.MyMath;
import com.spaceproject.math.*;
[ "com.spaceproject.math" ]
com.spaceproject.math;
2,289,883
private List<String> downloadFilesTo(IWebDav client, File location) { int count = 0; Vector<String> children = client.getAllChildren(); List<String> downloaded = new ArrayList<String>(); for (String child : children) { if (!child.endsWith("/")) { // only download files, not directories client.down...
List<String> function(IWebDav client, File location) { int count = 0; Vector<String> children = client.getAllChildren(); List<String> downloaded = new ArrayList<String>(); for (String child : children) { if (!child.endsWith("/")) { client.download(child, new File(location, new File(child).getName())); downloaded.add(ch...
/** * downloads all necessary files from the webdav client to a certain * directory * @param client * @param location target directory * @return */
downloads all necessary files from the webdav client to a certain directory
downloadFilesTo
{ "repo_name": "rmayr/privatenotes-tomdroid", "path": "src/org/privatenotes/sync/WebDAV/SharedWebDAVSyncService.java", "license": "gpl-3.0", "size": 8710 }
[ "at.fhooe.mcm.webdav.IWebDav", "java.io.File", "java.util.ArrayList", "java.util.List", "java.util.Vector" ]
import at.fhooe.mcm.webdav.IWebDav; import java.io.File; import java.util.ArrayList; import java.util.List; import java.util.Vector;
import at.fhooe.mcm.webdav.*; import java.io.*; import java.util.*;
[ "at.fhooe.mcm", "java.io", "java.util" ]
at.fhooe.mcm; java.io; java.util;
2,743,757
public void bulkEvaluateTest(Set<PermissionBackendCondition> conds) { // Do nothing by default. The default implementation of PermissionBackendCondition // delegates to the appropriate testOrFalse method in PermissionBackend. } public abstract static class AcceptsReviewDb<T> { protected Provider<R...
void function(Set<PermissionBackendCondition> conds) { } public abstract static class AcceptsReviewDb<T> { protected Provider<ReviewDb> db;
/** * Bulk evaluate a set of {@link PermissionBackendCondition} for view handling. * * <p>Overridden implementations should call {@link PermissionBackendCondition#set(boolean)} to * cache the result of {@code testOrFalse} in the condition for later evaluation. Caching the * result will bypass the usual i...
Bulk evaluate a set of <code>PermissionBackendCondition</code> for view handling. Overridden implementations should call <code>PermissionBackendCondition#set(boolean)</code> to cache the result of testOrFalse in the condition for later evaluation. Caching the result will bypass the usual invocation of testOrFalse
bulkEvaluateTest
{ "repo_name": "WANdisco/gerrit", "path": "java/com/google/gerrit/server/permissions/PermissionBackend.java", "license": "apache-2.0", "size": 20472 }
[ "com.google.gerrit.reviewdb.server.ReviewDb", "com.google.inject.Provider", "java.util.Set" ]
import com.google.gerrit.reviewdb.server.ReviewDb; import com.google.inject.Provider; import java.util.Set;
import com.google.gerrit.reviewdb.server.*; import com.google.inject.*; import java.util.*;
[ "com.google.gerrit", "com.google.inject", "java.util" ]
com.google.gerrit; com.google.inject; java.util;
2,511,723
@Override protected BlockStateContainer createBlockState() { return new BlockStateContainer(this, new IProperty[] { META_PROPERTY }); }
BlockStateContainer function() { return new BlockStateContainer(this, new IProperty[] { META_PROPERTY }); }
/******************************************************************************* * 3. Blockstate *******************************************************************************/
3. Blockstate
createBlockState
{ "repo_name": "Deadrik/TFC2", "path": "src/Common/com/bioxx/tfc2/blocks/BlockFarmland.java", "license": "gpl-3.0", "size": 3705 }
[ "net.minecraft.block.properties.IProperty", "net.minecraft.block.state.BlockStateContainer" ]
import net.minecraft.block.properties.IProperty; import net.minecraft.block.state.BlockStateContainer;
import net.minecraft.block.properties.*; import net.minecraft.block.state.*;
[ "net.minecraft.block" ]
net.minecraft.block;
648,510
static void testLongIntFloorMod(long x, int y, Object expected) { Object result = doFloorMod(x, y); if (!resultEquals(result, expected)) { fail("FAIL: long Math.floorMod(%d, %d) = %s; expected %s%n", x, y, result, expected); } Object strict_result = doStrictFloorMod(x, y...
static void testLongIntFloorMod(long x, int y, Object expected) { Object result = doFloorMod(x, y); if (!resultEquals(result, expected)) { fail(STR, x, y, result, expected); } Object strict_result = doStrictFloorMod(x, y); if (!resultEquals(strict_result, expected)) { fail(STR, x, y, strict_result, expected); } try { B...
/** * Test FloorMod of long arguments against expected value. The expected value is usually a Long * but in some cases is an ArithmeticException. * * @param x dividend * @param y modulus * @param expected expected value */
Test FloorMod of long arguments against expected value. The expected value is usually a Long but in some cases is an ArithmeticException
testLongIntFloorMod
{ "repo_name": "google/desugar_jdk_libs", "path": "jdk11/src/libcore/ojluni/src/test/java/lang/Math/DivModTests.java", "license": "gpl-2.0", "size": 20341 }
[ "java.math.BigDecimal", "java.math.RoundingMode" ]
import java.math.BigDecimal; import java.math.RoundingMode;
import java.math.*;
[ "java.math" ]
java.math;
1,577,206
public boolean hasNext() throws IOException { peek(); return token != JsonToken.END_OBJECT && token != JsonToken.END_ARRAY; }
boolean function() throws IOException { peek(); return token != JsonToken.END_OBJECT && token != JsonToken.END_ARRAY; }
/** * Returns true if the current array or object has another element. */
Returns true if the current array or object has another element
hasNext
{ "repo_name": "EuphoriaDev/app-common", "path": "library/src/main/java/ru/euphoria/commons/io/JsonReader.java", "license": "mit", "size": 33107 }
[ "java.io.IOException", "ru.euphoria.commons.json.JsonToken" ]
import java.io.IOException; import ru.euphoria.commons.json.JsonToken;
import java.io.*; import ru.euphoria.commons.json.*;
[ "java.io", "ru.euphoria.commons" ]
java.io; ru.euphoria.commons;
1,644,841
private void createStoreFiles(Path basePath, String family, String qualifier, int count, Type type, final Date date) throws IOException { createStoreFiles(basePath, family, qualifier, count, type, false, date); }
void function(Path basePath, String family, String qualifier, int count, Type type, final Date date) throws IOException { createStoreFiles(basePath, family, qualifier, count, type, false, date); }
/** * Creates store files. * @param basePath the path to create file * @param family the column family name * @param qualifier the column qualifier assigned to data values * @param count the store file number * @param type the row key type * @param date the latest timestamp when an instance of MobF...
Creates store files
createStoreFiles
{ "repo_name": "ultratendency/hbase", "path": "hbase-server/src/test/java/org/apache/hadoop/hbase/mob/compactions/TestPartitionedMobCompactor.java", "license": "apache-2.0", "size": 38262 }
[ "java.io.IOException", "java.util.Date", "org.apache.hadoop.fs.Path", "org.apache.hadoop.hbase.KeyValue" ]
import java.io.IOException; import java.util.Date; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.KeyValue;
import java.io.*; import java.util.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hbase.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
2,295,455
public static synchronized Collator getInstance() { return getInstance(Locale.getDefault()); }
static synchronized Collator function() { return getInstance(Locale.getDefault()); }
/** * Gets the Collator for the current default locale. * The default locale is determined by java.util.Locale.getDefault. * @return the Collator for the default locale.(for example, en_US) * @see java.util.Locale#getDefault */
Gets the Collator for the current default locale. The default locale is determined by java.util.Locale.getDefault
getInstance
{ "repo_name": "rokn/Count_Words_2015", "path": "testing/openjdk2/jdk/src/share/classes/java/text/Collator.java", "license": "mit", "size": 21093 }
[ "java.util.Locale" ]
import java.util.Locale;
import java.util.*;
[ "java.util" ]
java.util;
2,583,913
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<NetworkVirtualApplianceSkuInner>> getWithResponseAsync(String skuName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( ...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<NetworkVirtualApplianceSkuInner>> function(String skuName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (this.client.getSubscriptionId() == null) { return Mono .error( new IllegalArgume...
/** * Retrieves a single available sku for network virtual appliance. * * @param skuName Name of the Sku. * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws ManagementException thrown if the ...
Retrieves a single available sku for network virtual appliance
getWithResponseAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualApplianceSkusClientImpl.java", "license": "mit", "size": 20676 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.Context", "com.azure.resourcemanager.network.fluent.models.NetworkVirtualApplianceSkuInner" ]
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.network.fluent.models.NetworkVirtualApplianceSkuInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.network.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,857,360
public Type lookup(String name) { // System.out.println("--- lookup: " + name); for (int i = fScopes.size() - 1; i >= 0; i--) { Map<String, Entry> names = fScopes.elementAt(i); Entry e = (Entry) names.get(name); if (e != null ) return e.fType; ...
Type function(String name) { for (int i = fScopes.size() - 1; i >= 0; i--) { Map<String, Entry> names = fScopes.elementAt(i); Entry e = (Entry) names.get(name); if (e != null ) return e.fType; } if (fGlobalBindings != null ) { Value v = fGlobalBindings.getValue(name); if (v != null ) return v.type(); } return null; }
/** * Looks up a name and returns its type. * * @return null if variable not found. */
Looks up a name and returns its type
lookup
{ "repo_name": "vnu-dse/rtl", "path": "src/main/org/tzi/use/parser/Symtable.java", "license": "gpl-2.0", "size": 4103 }
[ "java.util.Map", "org.tzi.use.uml.ocl.type.Type", "org.tzi.use.uml.ocl.value.Value" ]
import java.util.Map; import org.tzi.use.uml.ocl.type.Type; import org.tzi.use.uml.ocl.value.Value;
import java.util.*; import org.tzi.use.uml.ocl.type.*; import org.tzi.use.uml.ocl.value.*;
[ "java.util", "org.tzi.use" ]
java.util; org.tzi.use;
1,523,962
@Test public void testStreamMessage_2() { try { StreamMessage message = senderSession.createStreamMessage(); message.writeString("pi"); message.writeDouble(3.14159); sender.send(message); Message m = receiver.receive(TestConfig.TIMEOUT); Assert...
void function() { try { StreamMessage message = senderSession.createStreamMessage(); message.writeString("pi"); message.writeDouble(3.14159); sender.send(message); Message m = receiver.receive(TestConfig.TIMEOUT); Assert.assertTrue(STR, m instanceof StreamMessage); StreamMessage msg = (StreamMessage)m; Assert.assertEqu...
/** * Send a <code>StreamMessage</code> with 2 Java primitives in its body (a <code> * String</code> and a <code>double</code>). * <br /> * Receive it and test that the values of the primitives of the body are correct */
Send a <code>StreamMessage</code> with 2 Java primitives in its body (a <code> String</code> and a <code>double</code>). Receive it and test that the values of the primitives of the body are correct
testStreamMessage_2
{ "repo_name": "jbertram/activemq-artemis-old", "path": "tests/joram-tests/src/test/java/org/objectweb/jtests/jms/conform/message/MessageTypeTest.java", "license": "apache-2.0", "size": 12702 }
[ "javax.jms.JMSException", "javax.jms.Message", "javax.jms.StreamMessage", "org.junit.Assert", "org.objectweb.jtests.jms.framework.TestConfig" ]
import javax.jms.JMSException; import javax.jms.Message; import javax.jms.StreamMessage; import org.junit.Assert; import org.objectweb.jtests.jms.framework.TestConfig;
import javax.jms.*; import org.junit.*; import org.objectweb.jtests.jms.framework.*;
[ "javax.jms", "org.junit", "org.objectweb.jtests" ]
javax.jms; org.junit; org.objectweb.jtests;
647,563
public MediaType getMediaType();
MediaType function();
/** * Returns the media type of this representation. * * @return The media type, never {@code null}. */
Returns the media type of this representation
getMediaType
{ "repo_name": "heuer/cassa", "path": "cassa-common/src/main/java/com/semagia/cassa/common/dm/IWritableRepresentation.java", "license": "apache-2.0", "size": 1577 }
[ "com.semagia.cassa.common.MediaType" ]
import com.semagia.cassa.common.MediaType;
import com.semagia.cassa.common.*;
[ "com.semagia.cassa" ]
com.semagia.cassa;
1,094,054
public void setDate(Date date);
void function(Date date);
/** * Sets the modified date of the most recently modified file to be replaced by the update * * @param date the date */
Sets the modified date of the most recently modified file to be replaced by the update
setDate
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.repository/src/com/ibm/ws/repository/resources/writeable/IfixResourceWritable.java", "license": "epl-1.0", "size": 1376 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
747,885