method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
@Override public Iterator<ApiOperation> iterator() { return operations.iterator(); }
Iterator<ApiOperation> function() { return operations.iterator(); }
/** * Gets an iterator over the {@code ApiOperation}s. This implementation exhausts the * iterator, and should only be used by tests. * * @return an iterator on the first call * @throws IllegalStateException if this method has been called on this instance before */
Gets an iterator over the ApiOperations. This implementation exhausts the iterator, and should only be used by tests
iterator
{ "repo_name": "google-cloudsearch/connector-sdk", "path": "indexing/src/main/java/com/google/enterprise/cloudsearch/sdk/indexing/template/BatchApiOperation.java", "license": "apache-2.0", "size": 3904 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
1,631,910
public void generateSetNull(JavaWriter out, String pstmt, String index) throws IOException { out.println(pstmt + ".setNull(" + index + "++, java.sql.Types.BIT);"); }
void function(JavaWriter out, String pstmt, String index) throws IOException { out.println(pstmt + STR + index + STR); }
/** * Generates a string to set the property. */
Generates a string to set the property
generateSetNull
{ "repo_name": "christianchristensen/resin", "path": "modules/resin/src/com/caucho/amber/type/PrimitiveBooleanType.java", "license": "gpl-2.0", "size": 3667 }
[ "com.caucho.java.JavaWriter", "java.io.IOException" ]
import com.caucho.java.JavaWriter; import java.io.IOException;
import com.caucho.java.*; import java.io.*;
[ "com.caucho.java", "java.io" ]
com.caucho.java; java.io;
610,557
public void getSession(com.google.spanner.v1.GetSessionRequest request, io.grpc.stub.StreamObserver<com.google.spanner.v1.Session> responseObserver) { asyncUnimplementedUnaryCall(METHOD_GET_SESSION, responseObserver); }
void function(com.google.spanner.v1.GetSessionRequest request, io.grpc.stub.StreamObserver<com.google.spanner.v1.Session> responseObserver) { asyncUnimplementedUnaryCall(METHOD_GET_SESSION, responseObserver); }
/** * <pre> * Gets a session. Returns `NOT_FOUND` if the session does not exist. * This is mainly useful for determining whether a session is still * alive. * </pre> */
<code> Gets a session. Returns `NOT_FOUND` if the session does not exist. This is mainly useful for determining whether a session is still alive. </code>
getSession
{ "repo_name": "eoogbe/api-client-staging", "path": "generated/java/grpc-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/SpannerGrpc.java", "license": "bsd-3-clause", "size": 47947 }
[ "io.grpc.stub.ServerCalls" ]
import io.grpc.stub.ServerCalls;
import io.grpc.stub.*;
[ "io.grpc.stub" ]
io.grpc.stub;
1,603,364
@ApiModelProperty(example = "Platinum", required = true, value = "") public String getName() { return name; }
@ApiModelProperty(example = STR, required = true, value = "") String function() { return name; }
/** * Get name * @return name **/
Get name
getName
{ "repo_name": "tharindu1st/product-apim", "path": "integration-tests/src/main/java/org/wso2/carbon/apimgt/rest/integration/tests/model/Tier.java", "license": "apache-2.0", "size": 9341 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
988,742
public ProfilePartWriter createIndexCodingPartWriter() { return new NullProfilePartWriter(); }
ProfilePartWriter function() { return new NullProfilePartWriter(); }
/** * Creates an instance of {@link org.esa.snap.dataio.netcdf.metadata.ProfilePartWriter} responsible for writing * {@link org.esa.snap.framework.datamodel.IndexCoding index coding}. * * @return the {@link org.esa.snap.dataio.netcdf.metadata.ProfilePartWriter} for index coding */
Creates an instance of <code>org.esa.snap.dataio.netcdf.metadata.ProfilePartWriter</code> responsible for writing <code>org.esa.snap.framework.datamodel.IndexCoding index coding</code>
createIndexCodingPartWriter
{ "repo_name": "arraydev/snap-engine", "path": "snap-netcdf/src/main/java/org/esa/snap/dataio/netcdf/AbstractNetCdfWriterPlugIn.java", "license": "gpl-3.0", "size": 6808 }
[ "org.esa.snap.dataio.netcdf.metadata.ProfilePartWriter" ]
import org.esa.snap.dataio.netcdf.metadata.ProfilePartWriter;
import org.esa.snap.dataio.netcdf.metadata.*;
[ "org.esa.snap" ]
org.esa.snap;
282,787
private JobService createJobService() { RestAdapter adapter = createAdapter(); return adapter.create(JobService.class); }
JobService function() { RestAdapter adapter = createAdapter(); return adapter.create(JobService.class); }
/** * Extends the {@link edu.hm.cs.jenkins.web.service.JobService}. * * @return extended JobService */
Extends the <code>edu.hm.cs.jenkins.web.service.JobService</code>
createJobService
{ "repo_name": "jenkinsci/status-monitors", "path": "Jenkins REST Client/src/main/java/edu/hm/cs/jenkins/web/client/JobClientImpl.java", "license": "mit", "size": 2351 }
[ "edu.hm.cs.jenkins.web.service.JobService" ]
import edu.hm.cs.jenkins.web.service.JobService;
import edu.hm.cs.jenkins.web.service.*;
[ "edu.hm.cs" ]
edu.hm.cs;
2,871,292
public static ArrayList<Item> getItemsFromSource(String source){ ArrayList<Item> items = new ArrayList<Item>(); String requestPlugs =""; String request = "SELECT DISTINCT(?uri) WHERE{?uri <http://purl.org/rss/1.0/source> <"+source+">.}"; ResultSet results = runSPARQLRequest(...
static ArrayList<Item> function(String source){ ArrayList<Item> items = new ArrayList<Item>(); String requestPlugs =STRSELECT DISTINCT(?uri) WHERE{?uri <http: ResultSet results = runSPARQLRequest(request); while (results.hasNext()) { QuerySolution result = results.nextSolution(); items.add(getOneItemByURI(result.get("?...
/** * get all items which has not been annotated for a plugin * @param pluginURI the plugin URI * @return the items */
get all items which has not been annotated for a plugin
getItemsFromSource
{ "repo_name": "karimessouabni/ZONE", "path": "ZONE-extractor/ZONE-utils/src/main/java/org/zoneproject/extractor/utils/VirtuosoDatabase.java", "license": "agpl-3.0", "size": 12038 }
[ "com.hp.hpl.jena.query.QuerySolution", "com.hp.hpl.jena.query.ResultSet", "java.util.ArrayList" ]
import com.hp.hpl.jena.query.QuerySolution; import com.hp.hpl.jena.query.ResultSet; import java.util.ArrayList;
import com.hp.hpl.jena.query.*; import java.util.*;
[ "com.hp.hpl", "java.util" ]
com.hp.hpl; java.util;
2,147,833
public static ContentValues getContentValues( BluetoothPrxmDevice device ){ ContentValues values = new ContentValues(); if( device.getId() != -1 ){ // old record values.put( BluetoothPrxmDeviceMetaData._ID, device.getId() ); } values.put( BluetoothPrxmDeviceMetaData.DEVICE_ADDR, device.getAddress() )...
static ContentValues function( BluetoothPrxmDevice device ){ ContentValues values = new ContentValues(); if( device.getId() != -1 ){ values.put( BluetoothPrxmDeviceMetaData._ID, device.getId() ); } values.put( BluetoothPrxmDeviceMetaData.DEVICE_ADDR, device.getAddress() ); values.put( BluetoothPrxmDeviceMetaData.DEVICE...
/** * BluetoothPrxmDevice - create ContentValues for BluetoothPrxmDevice object * * @return */
BluetoothPrxmDevice - create ContentValues for BluetoothPrxmDevice object
getContentValues
{ "repo_name": "rex-xxx/mt6572_x201", "path": "mediatek/packages/apps/Bluetooth/profiles/prxm/src/com/mediatek/bluetooth/prx/monitor/PrxmProvider.java", "license": "gpl-2.0", "size": 14768 }
[ "android.content.ContentValues", "com.mediatek.bluetooth.service.BluetoothPrxmDevice" ]
import android.content.ContentValues; import com.mediatek.bluetooth.service.BluetoothPrxmDevice;
import android.content.*; import com.mediatek.bluetooth.service.*;
[ "android.content", "com.mediatek.bluetooth" ]
android.content; com.mediatek.bluetooth;
2,158,845
List<User> addGroupMembers(long groupId, List<Long> userIds, List<String> usernames) throws ServiceLayerException, UserNotFoundException, GroupNotFoundException, AuthenticationException;
List<User> addGroupMembers(long groupId, List<Long> userIds, List<String> usernames) throws ServiceLayerException, UserNotFoundException, GroupNotFoundException, AuthenticationException;
/** * Add users to the group * * @param groupId Group identifier * @param userIds List of user identifiers * @param usernames List of usernames * @return users added to the group */
Add users to the group
addGroupMembers
{ "repo_name": "craftercms/studio2", "path": "src/main/java/org/craftercms/studio/api/v2/service/security/GroupService.java", "license": "gpl-3.0", "size": 4450 }
[ "java.util.List", "org.craftercms.studio.api.v1.exception.ServiceLayerException", "org.craftercms.studio.api.v1.exception.security.AuthenticationException", "org.craftercms.studio.api.v1.exception.security.GroupNotFoundException", "org.craftercms.studio.api.v1.exception.security.UserNotFoundException", "o...
import java.util.List; import org.craftercms.studio.api.v1.exception.ServiceLayerException; import org.craftercms.studio.api.v1.exception.security.AuthenticationException; import org.craftercms.studio.api.v1.exception.security.GroupNotFoundException; import org.craftercms.studio.api.v1.exception.security.UserNotFoundEx...
import java.util.*; import org.craftercms.studio.api.v1.exception.*; import org.craftercms.studio.api.v1.exception.security.*; import org.craftercms.studio.api.v2.dal.*;
[ "java.util", "org.craftercms.studio" ]
java.util; org.craftercms.studio;
1,537,943
static ClientPoliciesRepresentation getClientPoliciesRepresentation(KeycloakSession session, RealmModel realm) throws ClientPolicyException { // get existing policies json String policiesJson = getClientPoliciesJsonString(realm); // deserialize existing policies (json -> representation) ...
static ClientPoliciesRepresentation getClientPoliciesRepresentation(KeycloakSession session, RealmModel realm) throws ClientPolicyException { String policiesJson = getClientPoliciesJsonString(realm); if (policiesJson == null) { return new ClientPoliciesRepresentation(); } return convertClientPoliciesJsonToRepresentatio...
/** * get existing client policies in a realm as representation. * not return null. */
get existing client policies in a realm as representation. not return null
getClientPoliciesRepresentation
{ "repo_name": "srose/keycloak", "path": "services/src/main/java/org/keycloak/services/clientpolicy/ClientPoliciesUtil.java", "license": "apache-2.0", "size": 23844 }
[ "org.keycloak.models.KeycloakSession", "org.keycloak.models.RealmModel", "org.keycloak.representations.idm.ClientPoliciesRepresentation" ]
import org.keycloak.models.KeycloakSession; import org.keycloak.models.RealmModel; import org.keycloak.representations.idm.ClientPoliciesRepresentation;
import org.keycloak.models.*; import org.keycloak.representations.idm.*;
[ "org.keycloak.models", "org.keycloak.representations" ]
org.keycloak.models; org.keycloak.representations;
2,091,850
public static <T> List<T> convertCollectionToList(Collection<T> collection) { // Si la collection est nulle if(collection == null) return null; // On retourne la Liste return new ArrayList<T>(collection); }
static <T> List<T> function(Collection<T> collection) { if(collection == null) return null; return new ArrayList<T>(collection); }
/** * Methode de conversion d'une collection en Liste * @param <T> Parametre de Type du contenu de la Collection * @param collection Collection a convertir * @return Liste converti */
Methode de conversion d'une collection en Liste
convertCollectionToList
{ "repo_name": "leadware/jpersistence-tools", "path": "jpersistence-tools-core/src/main/java/net/leadware/persistence/tools/api/collection/utils/ConverterUtil.java", "license": "apache-2.0", "size": 6050 }
[ "java.util.ArrayList", "java.util.Collection", "java.util.List" ]
import java.util.ArrayList; import java.util.Collection; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
382,248
public static void handlePreInit(String tag) { if (sInstance != null) return; Log.d(TAG, "Pre init xwalk core in " + tag); if (sReservedActions.containsKey(tag)) { sReservedActions.remove(tag); } else { sReservedActivities.add(tag); } sReserv...
static void function(String tag) { if (sInstance != null) return; Log.d(TAG, STR + tag); if (sReservedActions.containsKey(tag)) { sReservedActions.remove(tag); } else { sReservedActivities.add(tag); } sReservedActions.put(tag, new LinkedList<ReservedAction>()); }
/** * This method must be invoked on the UI thread. */
This method must be invoked on the UI thread
handlePreInit
{ "repo_name": "darktears/crosswalk", "path": "runtime/android/core/src/org/xwalk/core/XWalkCoreWrapper.java", "license": "bsd-3-clause", "size": 18000 }
[ "android.util.Log", "java.util.LinkedList" ]
import android.util.Log; import java.util.LinkedList;
import android.util.*; import java.util.*;
[ "android.util", "java.util" ]
android.util; java.util;
2,704,430
public String getItemCount(Document doc){ String item_count = "0"; //first count is total; second is Sear's only. try { Element tab_filters_count = doc.select(".tab-filters-count").first(); item_count = tab_filters_count.text(); //remove parentheses item_count = item_count.substring(1,item_count.le...
String function(Document doc){ String item_count = "0"; try { Element tab_filters_count = doc.select(STR).first(); item_count = tab_filters_count.text(); item_count = item_count.substring(1,item_count.length()-1); } catch (NullPointerException e){ System.out.println(STR); } System.out.println(STR + item_count); return ...
/** * Returns the number of items showns on Sears' search page. * * @param doc Document returned from search url. * @return item_count A string containing the number of search items. */
Returns the number of items showns on Sears' search page
getItemCount
{ "repo_name": "golddiamonds/brightedge", "path": "src/brightedge/MainProg.java", "license": "mit", "size": 9032 }
[ "org.jsoup.nodes.Document", "org.jsoup.nodes.Element" ]
import org.jsoup.nodes.Document; import org.jsoup.nodes.Element;
import org.jsoup.nodes.*;
[ "org.jsoup.nodes" ]
org.jsoup.nodes;
2,129,030
public static void addStarwarsData(XOManager xoManager) { TestData.addStarwars(xoManager); }
static void function(XOManager xoManager) { TestData.addStarwars(xoManager); }
/** * This method adds the Starwars characters data into the Titan database for * testing purposes. * * @param xoManager * is the {@link XOManager} to be used. */
This method adds the Starwars characters data into the Titan database for testing purposes
addStarwarsData
{ "repo_name": "PureSolTechnologies/extended-objects-titan", "path": "titan.test/src/test/java/com/puresoltechnologies/xo/titan/test/XOTitanTestUtils.java", "license": "apache-2.0", "size": 6875 }
[ "com.buschmais.xo.api.XOManager", "com.puresoltechnologies.xo.titan.test.data.TestData" ]
import com.buschmais.xo.api.XOManager; import com.puresoltechnologies.xo.titan.test.data.TestData;
import com.buschmais.xo.api.*; import com.puresoltechnologies.xo.titan.test.data.*;
[ "com.buschmais.xo", "com.puresoltechnologies.xo" ]
com.buschmais.xo; com.puresoltechnologies.xo;
824,703
@Deprecated public static boolean isEmpty( String[] vals ) { return Utils.isEmpty( vals ); }
static boolean function( String[] vals ) { return Utils.isEmpty( vals ); }
/** * Check if the string array supplied is empty. A String array is empty when it is null or when the number of elements * is 0 * * @param vals * The string array to check * @return true if the string array supplied is empty * @deprecated * @see org.pentaho.di.core.util.Utils#isEmpty(C...
Check if the string array supplied is empty. A String array is empty when it is null or when the number of elements is 0
isEmpty
{ "repo_name": "e-cuellar/pentaho-kettle", "path": "core/src/main/java/org/pentaho/di/core/Const.java", "license": "apache-2.0", "size": 121114 }
[ "org.pentaho.di.core.util.Utils" ]
import org.pentaho.di.core.util.Utils;
import org.pentaho.di.core.util.*;
[ "org.pentaho.di" ]
org.pentaho.di;
2,793,582
public Collection<SnapshotId> getAllSnapshotIds() { List<SnapshotId> allSnapshotIds = new ArrayList<>(snapshotIds.size() + incompatibleSnapshotIds.size()); allSnapshotIds.addAll(snapshotIds.values()); allSnapshotIds.addAll(incompatibleSnapshotIds); return Collections.unmodifiableList...
Collection<SnapshotId> function() { List<SnapshotId> allSnapshotIds = new ArrayList<>(snapshotIds.size() + incompatibleSnapshotIds.size()); allSnapshotIds.addAll(snapshotIds.values()); allSnapshotIds.addAll(incompatibleSnapshotIds); return Collections.unmodifiableList(allSnapshotIds); }
/** * Returns an immutable collection of all the snapshot ids in the repository, both active and * incompatible snapshots. */
Returns an immutable collection of all the snapshot ids in the repository, both active and incompatible snapshots
getAllSnapshotIds
{ "repo_name": "strapdata/elassandra", "path": "server/src/main/java/org/elasticsearch/repositories/RepositoryData.java", "license": "apache-2.0", "size": 23171 }
[ "java.util.ArrayList", "java.util.Collection", "java.util.Collections", "java.util.List", "org.elasticsearch.snapshots.SnapshotId" ]
import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; import org.elasticsearch.snapshots.SnapshotId;
import java.util.*; import org.elasticsearch.snapshots.*;
[ "java.util", "org.elasticsearch.snapshots" ]
java.util; org.elasticsearch.snapshots;
2,531,124
public NestedPlan getBestConjunctivePlan(LinkSpecification spec, NestedPlan left, List<NestedPlan> plans, double selectivity) { if (plans == null) { return left; } if (plans.isEmpty()) { return left; } if (p...
NestedPlan function(LinkSpecification spec, NestedPlan left, List<NestedPlan> plans, double selectivity) { if (plans == null) { return left; } if (plans.isEmpty()) { return left; } if (plans.size() == 1) { return getBestConjunctivePlan(spec, left, plans.get(0), selectivity); } else { NestedPlan right = getBestConjuncti...
/** * Computes the best conjunctive instructionList for a instructionList * against a list of plans by calling back the method. * * @param spec * Input link specification * @param left * Left instructionList * @param plans * List of other pla...
Computes the best conjunctive instructionList for a instructionList against a list of plans by calling back the method
getBestConjunctivePlan
{ "repo_name": "dice-group/LIMES", "path": "limes-core/src/main/java/org/aksw/limes/core/execution/planning/planner/HeliosPlanner.java", "license": "agpl-3.0", "size": 18612 }
[ "java.util.List", "org.aksw.limes.core.execution.planning.plan.NestedPlan", "org.aksw.limes.core.io.ls.LinkSpecification" ]
import java.util.List; import org.aksw.limes.core.execution.planning.plan.NestedPlan; import org.aksw.limes.core.io.ls.LinkSpecification;
import java.util.*; import org.aksw.limes.core.execution.planning.plan.*; import org.aksw.limes.core.io.ls.*;
[ "java.util", "org.aksw.limes" ]
java.util; org.aksw.limes;
2,849,515
public void getDevicesList(JsonHttpResponseHandler responseHandler) { get(URL_GET_DEVICES_LIST, new HashMap<String, String>(), responseHandler); }
void function(JsonHttpResponseHandler responseHandler) { get(URL_GET_DEVICES_LIST, new HashMap<String, String>(), responseHandler); }
/** * Returns the list of devices owned by the user, and their modules. A device is identified by its _id (which is its mac address) and each device * may have one, several or no modules, also identified by an _id. See <a * href="http://dev.netatmo.com/doc/restapi/devicelist">http://dev.netatmo.com/doc/restapi...
Returns the list of devices owned by the user, and their modules. A device is identified by its _id (which is its mac address) and each device may have one, several or no modules, also identified by an _id. See HREF for more
getDevicesList
{ "repo_name": "smartnsoft/hackathon-direct-energie-2013", "path": "src/com/netatmo/weatherstation/api/NetatmoHttpClient.java", "license": "gpl-2.0", "size": 10057 }
[ "com.loopj.android.http.JsonHttpResponseHandler", "java.util.HashMap" ]
import com.loopj.android.http.JsonHttpResponseHandler; import java.util.HashMap;
import com.loopj.android.http.*; import java.util.*;
[ "com.loopj.android", "java.util" ]
com.loopj.android; java.util;
1,436,272
@Override public final CloudFileDirectory getParent() throws URISyntaxException, StorageException { if (this.parent == null) { final String parentName = getParentNameFromURI(this.getStorageUri(), this.getShare()); if (parentName != null) { StorageUri parentURI = ...
final CloudFileDirectory function() throws URISyntaxException, StorageException { if (this.parent == null) { final String parentName = getParentNameFromURI(this.getStorageUri(), this.getShare()); if (parentName != null) { StorageUri parentURI = PathUtility.appendPathToUri(this.share.getStorageUri(), parentName); this.p...
/** * Returns the file item's parent. * * @return A {@link CloudFileDirectory} object that represents the parent directory for the file. * * @throws StorageException * If a storage service error occurred. * @throws URISyntaxException * If the resource UR...
Returns the file item's parent
getParent
{ "repo_name": "Azure/azure-storage-android", "path": "microsoft-azure-storage/src/com/microsoft/azure/storage/file/CloudFile.java", "license": "apache-2.0", "size": 138711 }
[ "com.microsoft.azure.storage.StorageException", "com.microsoft.azure.storage.StorageUri", "com.microsoft.azure.storage.core.PathUtility", "java.net.URISyntaxException" ]
import com.microsoft.azure.storage.StorageException; import com.microsoft.azure.storage.StorageUri; import com.microsoft.azure.storage.core.PathUtility; import java.net.URISyntaxException;
import com.microsoft.azure.storage.*; import com.microsoft.azure.storage.core.*; import java.net.*;
[ "com.microsoft.azure", "java.net" ]
com.microsoft.azure; java.net;
1,610,125
private void waitForRegionCreateEvent() { StoppableCountDownLatch latch = this.afterRegionCreateEventLatch; if (latch != null && latch.getCount() == 0) { return; } waitOnInitialization(latch); }
void function() { StoppableCountDownLatch latch = this.afterRegionCreateEventLatch; if (latch != null && latch.getCount() == 0) { return; } waitOnInitialization(latch); }
/** * Used to cause cache listener events to wait until the after region create event is delivered. * * @since GemFire 5.0 */
Used to cause cache listener events to wait until the after region create event is delivered
waitForRegionCreateEvent
{ "repo_name": "shankarh/geode", "path": "geode-core/src/main/java/org/apache/geode/internal/cache/LocalRegion.java", "license": "apache-2.0", "size": 428183 }
[ "org.apache.geode.internal.util.concurrent.StoppableCountDownLatch" ]
import org.apache.geode.internal.util.concurrent.StoppableCountDownLatch;
import org.apache.geode.internal.util.concurrent.*;
[ "org.apache.geode" ]
org.apache.geode;
2,552,995
protected void registerListeners() { // Register statically specified listeners first. for (ApplicationListener<?> listener : getApplicationListeners()) { getApplicationEventMulticaster().addApplicationListener(listener); } // Do not initialize FactoryBeans here: We need to leave all regular beans // u...
void function() { for (ApplicationListener<?> listener : getApplicationListeners()) { getApplicationEventMulticaster().addApplicationListener(listener); } String[] listenerBeanNames = getBeanNamesForType(ApplicationListener.class, true, false); for (String listenerBeanName : listenerBeanNames) { getApplicationEventMult...
/** * Add beans that implement ApplicationListener as listeners. * Doesn't affect other listeners, which can be added without being beans. */
Add beans that implement ApplicationListener as listeners. Doesn't affect other listeners, which can be added without being beans
registerListeners
{ "repo_name": "lamsfoundation/lams", "path": "3rdParty_sources/spring/org/springframework/context/support/AbstractApplicationContext.java", "license": "gpl-2.0", "size": 50710 }
[ "java.util.Set", "org.springframework.context.ApplicationEvent", "org.springframework.context.ApplicationListener" ]
import java.util.Set; import org.springframework.context.ApplicationEvent; import org.springframework.context.ApplicationListener;
import java.util.*; import org.springframework.context.*;
[ "java.util", "org.springframework.context" ]
java.util; org.springframework.context;
1,039,406
public void checkDoFirstInstall(){ if ( ! downloadAll ) { return; } if ( path == null) path = System.getProperty(AbstractUserArgumentProcessor.CACHE_DIR); if (path == null || path.equals("")) path = System.getProperty(AbstractUserArgumentProcessor.PDB_DIR); String filename = path + Dow...
void function(){ if ( ! downloadAll ) { return; } if ( path == null) path = System.getProperty(AbstractUserArgumentProcessor.CACHE_DIR); if (path == null path.equals(STRcomponents.cif.gz"; File f = new File(filename); if ( ! f.exists()) { downloadAllDefinitions(); } else { String directoryName = path + DownloadChemComp...
/** checks if the chemical components already have been installed into the PDB directory. * If not, will download the chemical components definitions file and split it up into small * subfiles. */
checks if the chemical components already have been installed into the PDB directory. If not, will download the chemical components definitions file and split it up into small subfiles
checkDoFirstInstall
{ "repo_name": "sbliven/biojava", "path": "biojava3-structure/src/main/java/org/biojava/bio/structure/io/mmcif/DownloadChemCompProvider.java", "license": "lgpl-2.1", "size": 11501 }
[ "java.io.File", "java.io.FilenameFilter", "org.biojava.bio.structure.align.ce.AbstractUserArgumentProcessor" ]
import java.io.File; import java.io.FilenameFilter; import org.biojava.bio.structure.align.ce.AbstractUserArgumentProcessor;
import java.io.*; import org.biojava.bio.structure.align.ce.*;
[ "java.io", "org.biojava.bio" ]
java.io; org.biojava.bio;
1,207,215
private void removeAndReportBlock(DistributedFileSystem blockDfs, Path filePath, LocatedBlock block) throws IOException { TestRaidDfs.corruptBlock(filePath, block.getBlock(), NUM_DATANODES, true, cluster); // report dele...
void function(DistributedFileSystem blockDfs, Path filePath, LocatedBlock block) throws IOException { TestRaidDfs.corruptBlock(filePath, block.getBlock(), NUM_DATANODES, true, cluster); LocatedBlock[] toReport = { block }; blockDfs.getClient().namenode.reportBadBlocks(toReport); }
/** * removes a specified block from MiniDFS storage and reports it as corrupt */
removes a specified block from MiniDFS storage and reports it as corrupt
removeAndReportBlock
{ "repo_name": "iVCE/RDFS", "path": "src/contrib/raid/src/test/org/apache/hadoop/raid/TestRaidShellFsck.java", "license": "apache-2.0", "size": 22939 }
[ "java.io.IOException", "org.apache.hadoop.fs.Path", "org.apache.hadoop.hdfs.DistributedFileSystem", "org.apache.hadoop.hdfs.TestRaidDfs", "org.apache.hadoop.hdfs.protocol.LocatedBlock" ]
import java.io.IOException; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hdfs.DistributedFileSystem; import org.apache.hadoop.hdfs.TestRaidDfs; import org.apache.hadoop.hdfs.protocol.LocatedBlock;
import java.io.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.*; import org.apache.hadoop.hdfs.protocol.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,666,496
@Override public void onCheckedChanged(CompoundButton switchView, boolean isChecked) { if (!isResumed()) { // very important, setChecked(...) is called automatically during // Fragment recreation on device rotations return; } ...
void function(CompoundButton switchView, boolean isChecked) { if (!isResumed()) { return; } if (isChecked) { requestPasswordForShareViaLink(false, mCapabilities.getFilesSharingPublicAskForOptionalPassword().isTrue()); } else { ((FileActivity) getActivity()).getFileOperationsHelper().setPasswordToShareViaLink(mFile, "")...
/** * Called by R.id.shareViaLinkPasswordSwitch to set or clear the password. * * @param switchView {@link SwitchCompat} toggled by the user, R.id.shareViaLinkPasswordSwitch * @param isChecked New switch state. */
Called by R.id.shareViaLinkPasswordSwitch to set or clear the password
onCheckedChanged
{ "repo_name": "SpryServers/sprycloud-android", "path": "src/main/java/com/owncloud/android/ui/fragment/ShareFileFragment.java", "license": "gpl-2.0", "size": 39010 }
[ "android.widget.CompoundButton", "com.owncloud.android.ui.activity.FileActivity" ]
import android.widget.CompoundButton; import com.owncloud.android.ui.activity.FileActivity;
import android.widget.*; import com.owncloud.android.ui.activity.*;
[ "android.widget", "com.owncloud.android" ]
android.widget; com.owncloud.android;
411,805
public void checkCreation4() throws Exception { // // set up the keys // PrivateKey privKey; PublicKey pubKey; KeyPairGenerator g = KeyPairGenerator.getInstance("GOST3410", BC); GOST3410ParameterSpec gost3410P = new GOST3410P...
void function() throws Exception { PublicKey pubKey; KeyPairGenerator g = KeyPairGenerator.getInstance(STR, BC); GOST3410ParameterSpec gost3410P = new GOST3410ParameterSpec(STR); g.initialize(gost3410P, new SecureRandom()); KeyPair p = g.generateKeyPair(); privKey = p.getPrivate(); pubKey = p.getPublic(); X509v3Certifi...
/** * we generate a self signed certificate for the sake of testing - GOST3410 */
we generate a self signed certificate for the sake of testing - GOST3410
checkCreation4
{ "repo_name": "sergeypayu/bc-java", "path": "pkix/src/test/java/org/bouncycastle/cert/test/CertTest.java", "license": "mit", "size": 150228 }
[ "java.io.ByteArrayInputStream", "java.math.BigInteger", "java.security.KeyPair", "java.security.KeyPairGenerator", "java.security.PublicKey", "java.security.SecureRandom", "java.security.cert.CertificateFactory", "java.security.cert.X509Certificate", "java.util.Date", "org.bouncycastle.cert.X509v3...
import java.io.ByteArrayInputStream; import java.math.BigInteger; import java.security.KeyPair; import java.security.KeyPairGenerator; import java.security.PublicKey; import java.security.SecureRandom; import java.security.cert.CertificateFactory; import java.security.cert.X509Certificate; import java.util.Date; import...
import java.io.*; import java.math.*; import java.security.*; import java.security.cert.*; import java.util.*; import org.bouncycastle.cert.*; import org.bouncycastle.cert.jcajce.*; import org.bouncycastle.jce.spec.*;
[ "java.io", "java.math", "java.security", "java.util", "org.bouncycastle.cert", "org.bouncycastle.jce" ]
java.io; java.math; java.security; java.util; org.bouncycastle.cert; org.bouncycastle.jce;
1,440,274
public static void writeCompoundCurve(ByteWriter writer, CompoundCurve compoundCurve) throws IOException { writer.writeInt(compoundCurve.numLineStrings()); for (LineString lineString : compoundCurve.getLineStrings()) { writeGeometry(writer, lineString); } }
static void function(ByteWriter writer, CompoundCurve compoundCurve) throws IOException { writer.writeInt(compoundCurve.numLineStrings()); for (LineString lineString : compoundCurve.getLineStrings()) { writeGeometry(writer, lineString); } }
/** * Write a Compound Curve * * @param writer * @param compoundCurve * @throws IOException */
Write a Compound Curve
writeCompoundCurve
{ "repo_name": "boundlessgeo/geopackage-wkb-java", "path": "src/main/java/mil/nga/wkb/io/WkbGeometryWriter.java", "license": "mit", "size": 7829 }
[ "java.io.IOException", "mil.nga.wkb.geom.CompoundCurve", "mil.nga.wkb.geom.LineString" ]
import java.io.IOException; import mil.nga.wkb.geom.CompoundCurve; import mil.nga.wkb.geom.LineString;
import java.io.*; import mil.nga.wkb.geom.*;
[ "java.io", "mil.nga.wkb" ]
java.io; mil.nga.wkb;
987,425
public void createQuadTree (List<? extends GameElement> sprites) { myQuadTree.clear(); for (GameElement e : sprites) { myQuadTree.insert(e); } }
void function (List<? extends GameElement> sprites) { myQuadTree.clear(); for (GameElement e : sprites) { myQuadTree.insert(e); } }
/** * Clears the quad tree and re-adds all current collidable sprites to the quad tree. * * @param sprites List<Sprite> of all sprites on the map */
Clears the quad tree and re-adds all current collidable sprites to the quad tree
createQuadTree
{ "repo_name": "calliem/voogasalad_ProtectedTower", "path": "src/engine/CollisionChecker.java", "license": "mit", "size": 5722 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,916,113
private static Map<String, Pair<String, String>> autoGenerateMapping(List<ColumnMetadata> columns, Optional<Map<String, Set<String>>> groups) { Map<String, Pair<String, String>> mapping = new HashMap<>(); for (ColumnMetadata column : columns) { Optional<String> family = getColumnLoca...
static Map<String, Pair<String, String>> function(List<ColumnMetadata> columns, Optional<Map<String, Set<String>>> groups) { Map<String, Pair<String, String>> mapping = new HashMap<>(); for (ColumnMetadata column : columns) { Optional<String> family = getColumnLocalityGroup(column.getName(), groups); mapping.put(column...
/** * Auto-generates the mapping of Presto column name to Accumulo family/qualifier, respecting the locality groups (if any). * * @param columns Presto columns for the table * @param groups Mapping of locality groups to a set of Presto columns, or null if none * @return Column mappings */
Auto-generates the mapping of Presto column name to Accumulo family/qualifier, respecting the locality groups (if any)
autoGenerateMapping
{ "repo_name": "prestodb/presto", "path": "presto-accumulo/src/main/java/com/facebook/presto/accumulo/AccumuloClient.java", "license": "apache-2.0", "size": 42686 }
[ "com.facebook.presto.spi.ColumnMetadata", "java.util.HashMap", "java.util.List", "java.util.Map", "java.util.Optional", "java.util.Set", "org.apache.commons.lang3.tuple.Pair" ]
import com.facebook.presto.spi.ColumnMetadata; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Optional; import java.util.Set; import org.apache.commons.lang3.tuple.Pair;
import com.facebook.presto.spi.*; import java.util.*; import org.apache.commons.lang3.tuple.*;
[ "com.facebook.presto", "java.util", "org.apache.commons" ]
com.facebook.presto; java.util; org.apache.commons;
2,528,136
@NonNull @Override public View getView(int position, View convertView, @NonNull ViewGroup parent) { ViewHolder holder; View listRowView; if(convertView == null) { listRowView = this.activity.getLayoutInflater().inflate(R.layout.fragment_ticker_row, parent, fa...
View function(int position, View convertView, @NonNull ViewGroup parent) { ViewHolder holder; View listRowView; if(convertView == null) { listRowView = this.activity.getLayoutInflater().inflate(R.layout.fragment_ticker_row, parent, false); holder = new ViewHolder(listRowView); listRowView.setTag(holder); } else { listR...
/** * Populates the ListView. */
Populates the ListView
getView
{ "repo_name": "Pepito-Manaloto/PSE_Planner", "path": "app/src/main/java/com/aaron/pseplanner/adapter/TickerListAdapter.java", "license": "apache-2.0", "size": 4953 }
[ "android.support.annotation.NonNull", "android.view.View", "android.view.ViewGroup", "com.aaron.pseplanner.bean.TickerDto" ]
import android.support.annotation.NonNull; import android.view.View; import android.view.ViewGroup; import com.aaron.pseplanner.bean.TickerDto;
import android.support.annotation.*; import android.view.*; import com.aaron.pseplanner.bean.*;
[ "android.support", "android.view", "com.aaron.pseplanner" ]
android.support; android.view; com.aaron.pseplanner;
1,330,522
// we may consider making this public boolean shouldMeasureChild(View child, int widthSpec, int heightSpec, LayoutParams lp) { return child.isLayoutRequested() || !mMeasurementCacheEnabled || !isMeasurementUpToDate(child.getWidth(), widthSpec, lp.widt...
boolean shouldMeasureChild(View child, int widthSpec, int heightSpec, LayoutParams lp) { return child.isLayoutRequested() !mMeasurementCacheEnabled !isMeasurementUpToDate(child.getWidth(), widthSpec, lp.width) !isMeasurementUpToDate(child.getHeight(), heightSpec, lp.height); }
/** * RecyclerView internally does its own View measurement caching which should help with * WRAP_CONTENT. * <p> * Use this method if the View is not yet measured and you need to decide whether to * measure this View or not. */
RecyclerView internally does its own View measurement caching which should help with WRAP_CONTENT. Use this method if the View is not yet measured and you need to decide whether to measure this View or not
shouldMeasureChild
{ "repo_name": "aosp-mirror/platform_frameworks_support", "path": "v7/recyclerview/src/main/java/androidx/recyclerview/widget/RecyclerView.java", "license": "apache-2.0", "size": 582575 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
1,943,006
public String getApnName() { Network network = null; synchronized (this) { if (mNetwork == null) { Log.d(MmsService.TAG, "MmsNetworkManager: getApnName: network not available"); return null; } network = mNetwork; } S...
String function() { Network network = null; synchronized (this) { if (mNetwork == null) { Log.d(MmsService.TAG, STR); return null; } network = mNetwork; } String apnName = null; final ConnectivityManager connectivityManager = getConnectivityManager(); NetworkInfo mmsNetworkInfo = connectivityManager.getNetworkInfo(netw...
/** * Get the APN name for the active network * * @return The APN name if available, otherwise null */
Get the APN name for the active network
getApnName
{ "repo_name": "s20121035/rk3288_android5.1_repo", "path": "packages/services/Mms/src/com/android/mms/service/MmsNetworkManager.java", "license": "gpl-3.0", "size": 10943 }
[ "android.net.ConnectivityManager", "android.net.Network", "android.net.NetworkInfo", "android.util.Log" ]
import android.net.ConnectivityManager; import android.net.Network; import android.net.NetworkInfo; import android.util.Log;
import android.net.*; import android.util.*;
[ "android.net", "android.util" ]
android.net; android.util;
603,695
public static void triangulatePoints(Mat projMatr1, Mat projMatr2, Mat projPoints1, Mat projPoints2, Mat points4D) { triangulatePoints_0(projMatr1.nativeObj, projMatr2.nativeObj, projPoints1.nativeObj, projPoints2.nativeObj, points4D.nativeObj); return; } // // C++: void validat...
static void function(Mat projMatr1, Mat projMatr2, Mat projPoints1, Mat projPoints2, Mat points4D) { triangulatePoints_0(projMatr1.nativeObj, projMatr2.nativeObj, projPoints1.nativeObj, projPoints2.nativeObj, points4D.nativeObj); return; } //
/** * <p>Reconstructs points by triangulation.</p> * * <p>The function reconstructs 3-dimensional points (in homogeneous coordinates) * by using their observations with a stereo camera. Projections matrices can be * obtained from "stereoRectify".</p> * * @param projMatr1 3x4 projection matrix of the first camera...
Reconstructs points by triangulation. The function reconstructs 3-dimensional points (in homogeneous coordinates) by using their observations with a stereo camera. Projections matrices can be obtained from "stereoRectify"
triangulatePoints
{ "repo_name": "TechBooster/effective_android_sample", "path": "chapter23/OpenCV Library - 2.4.6/src/org/opencv/calib3d/Calib3d.java", "license": "apache-2.0", "size": 163620 }
[ "org.opencv.core.Mat" ]
import org.opencv.core.Mat;
import org.opencv.core.*;
[ "org.opencv.core" ]
org.opencv.core;
2,141,859
public static Object validateIntegerLocale(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request) { Object result = null; String value = null; try { value = evaluateBean(bean, field); } catch ...
static Object function(Object bean, ValidatorAction va, Field field, ActionMessages errors, Validator validator, HttpServletRequest request) { Object result = null; String value = null; try { value = evaluateBean(bean, field); } catch (Exception e) { processFailure(errors, field, validator.getFormName(), STR, e); retur...
/** * Checks if the field can safely be converted to an int primitive. * * @param bean The bean validation is being performed on. * @param va The <code>ValidatorAction</code> that is currently * being performed. * @param field The <code>Field</code> object ...
Checks if the field can safely be converted to an int primitive
validateIntegerLocale
{ "repo_name": "davcamer/clients", "path": "projects-for-testing/struts/core/src/main/java/org/apache/struts/validator/FieldChecks.java", "license": "apache-2.0", "size": 55903 }
[ "java.util.Locale", "javax.servlet.http.HttpServletRequest", "org.apache.commons.validator.Field", "org.apache.commons.validator.GenericTypeValidator", "org.apache.commons.validator.GenericValidator", "org.apache.commons.validator.Validator", "org.apache.commons.validator.ValidatorAction", "org.apache...
import java.util.Locale; import javax.servlet.http.HttpServletRequest; import org.apache.commons.validator.Field; import org.apache.commons.validator.GenericTypeValidator; import org.apache.commons.validator.GenericValidator; import org.apache.commons.validator.Validator; import org.apache.commons.validator.ValidatorAc...
import java.util.*; import javax.servlet.http.*; import org.apache.commons.validator.*; import org.apache.struts.action.*; import org.apache.struts.util.*;
[ "java.util", "javax.servlet", "org.apache.commons", "org.apache.struts" ]
java.util; javax.servlet; org.apache.commons; org.apache.struts;
1,648,035
private Map<String, DataColumn> readTableColumnMetaData(String tableName, DatabaseMetaData meta) throws ODataServiceFault { ResultSet resultSet = null; Map<String, DataColumn> columnMap = new HashMap<>(); try { resultSet = meta.getColumns(null, null, tableName, null);...
Map<String, DataColumn> function(String tableName, DatabaseMetaData meta) throws ODataServiceFault { ResultSet resultSet = null; Map<String, DataColumn> columnMap = new HashMap<>(); try { resultSet = meta.getColumns(null, null, tableName, null); int i = 1; while (resultSet.next()) { String columnName = resultSet.getStr...
/** * This method reads table column meta data. * * @param tableName Name of the table * @return table MetaData * @throws ODataServiceFault */
This method reads table column meta data
readTableColumnMetaData
{ "repo_name": "lankavitharana/carbon-data", "path": "components/data-services/org.wso2.carbon.dataservices.core/src/main/java/org/wso2/carbon/dataservices/core/odata/RDBMSDataHandler.java", "license": "apache-2.0", "size": 53572 }
[ "java.sql.DatabaseMetaData", "java.sql.ResultSet", "java.sql.SQLException", "java.sql.Types", "java.util.HashMap", "java.util.Map" ]
import java.sql.DatabaseMetaData; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Types; import java.util.HashMap; import java.util.Map;
import java.sql.*; import java.util.*;
[ "java.sql", "java.util" ]
java.sql; java.util;
666,521
private void autoSelectAuthHandler(final HttpProxyResponse response) throws ProxyAuthException { // Get the Proxy-Authenticate header List<String> values = response.getHeaders().get("Proxy-Authenticate"); ProxyIoSession proxyIoSession = getProxyIoSession(); if (values ==...
void function(final HttpProxyResponse response) throws ProxyAuthException { List<String> values = response.getHeaders().get(STR); ProxyIoSession proxyIoSession = getProxyIoSession(); if (values == null values.size() == 0) { authHandler = HttpAuthenticationMethods.NO_AUTH .getNewHandler(proxyIoSession); } else if (getPr...
/** * Automatic selection of the authentication algorithm. If <code>preferedOrder</code> is set then * algorithms are selected from the list order otherwise the algorithm tries to select the most * secured algorithm available first. * * @param response the proxy response */
Automatic selection of the authentication algorithm. If <code>preferedOrder</code> is set then algorithms are selected from the list order otherwise the algorithm tries to select the most secured algorithm available first
autoSelectAuthHandler
{ "repo_name": "sardine/mina-ja", "path": "src/mina-core/src/main/java/org/apache/mina/proxy/handlers/http/HttpSmartProxyHandler.java", "license": "apache-2.0", "size": 8526 }
[ "java.util.List", "org.apache.mina.proxy.ProxyAuthException", "org.apache.mina.proxy.session.ProxyIoSession" ]
import java.util.List; import org.apache.mina.proxy.ProxyAuthException; import org.apache.mina.proxy.session.ProxyIoSession;
import java.util.*; import org.apache.mina.proxy.*; import org.apache.mina.proxy.session.*;
[ "java.util", "org.apache.mina" ]
java.util; org.apache.mina;
1,710,327
public boolean itemInteractionForEntity(ItemStack stack, EntityPlayer playerIn, EntityLivingBase target, EnumHand hand) { if (target instanceof EntitySheep) { EntitySheep entitysheep = (EntitySheep)target; EnumDyeColor enumdyecolor = EnumDyeColor.byDyeDamage(stack.getMeta...
boolean function(ItemStack stack, EntityPlayer playerIn, EntityLivingBase target, EnumHand hand) { if (target instanceof EntitySheep) { EntitySheep entitysheep = (EntitySheep)target; EnumDyeColor enumdyecolor = EnumDyeColor.byDyeDamage(stack.getMetadata()); if (!entitysheep.getSheared() && entitysheep.getFleeceColor() ...
/** * Returns true if the item can be used on the given entity, e.g. shears on sheep. */
Returns true if the item can be used on the given entity, e.g. shears on sheep
itemInteractionForEntity
{ "repo_name": "dafuq360/essenceplusnew", "path": "build/tmp/recompileMc/sources/net/minecraft/item/ItemDye.java", "license": "lgpl-2.1", "size": 8093 }
[ "net.minecraft.entity.EntityLivingBase", "net.minecraft.entity.passive.EntitySheep", "net.minecraft.entity.player.EntityPlayer", "net.minecraft.util.EnumHand" ]
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.passive.EntitySheep; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.EnumHand;
import net.minecraft.entity.*; import net.minecraft.entity.passive.*; import net.minecraft.entity.player.*; import net.minecraft.util.*;
[ "net.minecraft.entity", "net.minecraft.util" ]
net.minecraft.entity; net.minecraft.util;
1,098,226
public void cancel(Callback callback) { if (callback != null) { stopCallbackWeakReference = new WeakReference<>(callback); }
void function(Callback callback) { if (callback != null) { stopCallbackWeakReference = new WeakReference<>(callback); }
/** * Cancel the running job. * <p> * 1. Set <b>canceling = true</b>.<br/> * 2. Post a delay runnable which will involve: <br/> * - Set <b>canceling = false</b><br/> * - Call onCancel abstract method.<br/> * - if callback is not null then call callback method.<br/> * </p> * ...
Cancel the running job. 1. Set canceling = true. 2. Post a delay runnable which will involve: - Set canceling = false - Call onCancel abstract method. - if callback is not null then call callback method.
cancel
{ "repo_name": "talenguyen/FlowFramework", "path": "flowframework/src/main/java/com/tale/flowframework/Flow.java", "license": "apache-2.0", "size": 4225 }
[ "java.lang.ref.WeakReference" ]
import java.lang.ref.WeakReference;
import java.lang.ref.*;
[ "java.lang" ]
java.lang;
1,641,036
EAttribute getParagraph_LineSpacing();
EAttribute getParagraph_LineSpacing();
/** * Returns the meta object for the attribute '{@link benchmarkdp.datagenerator.model.PSMDocx.Paragraph#getLineSpacing <em>Line Spacing</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Line Spacing</em>'. * @see benchmarkdp.datagenerator.model.PSMDoc...
Returns the meta object for the attribute '<code>benchmarkdp.datagenerator.model.PSMDocx.Paragraph#getLineSpacing Line Spacing</code>'.
getParagraph_LineSpacing
{ "repo_name": "kduretec/TestDataGenerator", "path": "DataGenerator/src/benchmarkdp/datagenerator/model/PSMDocx/PSMDocxPackage.java", "license": "apache-2.0", "size": 71672 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,247,888
@Column(name = "state", nullable = false, length = 128) public String getState();
@Column(name = "state", nullable = false, length = 128) String function();
/** * Getter for <code>cattle.external_handler_external_handler_process_map.state</code>. */
Getter for <code>cattle.external_handler_external_handler_process_map.state</code>
getState
{ "repo_name": "vincent99/cattle", "path": "code/iaas/model/src/main/java/io/cattle/platform/core/model/ExternalHandlerExternalHandlerProcessMap.java", "license": "apache-2.0", "size": 6476 }
[ "javax.persistence.Column" ]
import javax.persistence.Column;
import javax.persistence.*;
[ "javax.persistence" ]
javax.persistence;
1,384,251
public Foo findByUuid_C_Last(java.lang.String uuid, long companyId, com.liferay.portal.kernel.util.OrderByComparator<Foo> orderByComparator) throws NoSuchFooException;
Foo function(java.lang.String uuid, long companyId, com.liferay.portal.kernel.util.OrderByComparator<Foo> orderByComparator) throws NoSuchFooException;
/** * Returns the last foo in the ordered set where uuid = &#63; and companyId = &#63;. * * @param uuid the uuid * @param companyId the company ID * @param orderByComparator the comparator to order the set by (optionally <code>null</code>) * @return the last matching foo * @throws NoSuchFooException if a matchin...
Returns the last foo in the ordered set where uuid = &#63; and companyId = &#63;
findByUuid_C_Last
{ "repo_name": "rafoli/liferay-blade-samples", "path": "maven/apps/service-builder/basic/basic-api/src/main/java/com/liferay/blade/samples/servicebuilder/service/persistence/FooPersistence.java", "license": "apache-2.0", "size": 31389 }
[ "com.liferay.blade.samples.servicebuilder.exception.NoSuchFooException", "com.liferay.blade.samples.servicebuilder.model.Foo" ]
import com.liferay.blade.samples.servicebuilder.exception.NoSuchFooException; import com.liferay.blade.samples.servicebuilder.model.Foo;
import com.liferay.blade.samples.servicebuilder.exception.*; import com.liferay.blade.samples.servicebuilder.model.*;
[ "com.liferay.blade" ]
com.liferay.blade;
1,934,355
public void setServerProgram(ConfigProgram serverProgram) { _serverProgram = serverProgram; }
void function(ConfigProgram serverProgram) { _serverProgram = serverProgram; }
/** * Sets the server program. */
Sets the server program
setServerProgram
{ "repo_name": "christianchristensen/resin", "path": "modules/resin/src/com/caucho/ejb/server/AbstractEjbBeanManager.java", "license": "gpl-2.0", "size": 13267 }
[ "com.caucho.config.program.ConfigProgram" ]
import com.caucho.config.program.ConfigProgram;
import com.caucho.config.program.*;
[ "com.caucho.config" ]
com.caucho.config;
2,358,653
public final void setOwnerElement(Element e) { if (parent != null) { throw new DomDOMException(DOMException.HIERARCHY_REQUEST_ERR); } if (!(e instanceof DomElement)) { throw new DomDOMException(DOMException.WRONG_DOCUMENT_ERR); } parent = (DomElement) e; depth...
final void function(Element e) { if (parent != null) { throw new DomDOMException(DOMException.HIERARCHY_REQUEST_ERR); } if (!(e instanceof DomElement)) { throw new DomDOMException(DOMException.WRONG_DOCUMENT_ERR); } parent = (DomElement) e; depth = parent.depth + 1; }
/** * Records the element with which this attribute is associated. */
Records the element with which this attribute is associated
setOwnerElement
{ "repo_name": "rhuitl/uClinux", "path": "lib/classpath/gnu/xml/dom/DomAttr.java", "license": "gpl-2.0", "size": 10912 }
[ "org.w3c.dom.DOMException", "org.w3c.dom.Element" ]
import org.w3c.dom.DOMException; import org.w3c.dom.Element;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
2,855,795
public void addLast(T data) { if (data == null) throw new NullPointerException(); Node<T> oldTail = this.tail; this.tail = new Node<T>(data); this.tail.prev = oldTail; if (oldTail != null) oldTail.next = this.tail; // when the deque is empty...
void function(T data) { if (data == null) throw new NullPointerException(); Node<T> oldTail = this.tail; this.tail = new Node<T>(data); this.tail.prev = oldTail; if (oldTail != null) oldTail.next = this.tail; if (this.isEmpty()) this.head = this.tail; this.size++; }
/** * Add the {@link T data} to the end.<br> * <strong>Time complexity:</strong> O(1)<br> * * @param data */
Add the <code>T data</code> to the end. Time complexity: O(1)
addLast
{ "repo_name": "marioluan/java-data-structures", "path": "src/main/java/io/github/marioluan/datastructures/queue/Deque.java", "license": "mit", "size": 3639 }
[ "io.github.marioluan.datastructures.Node" ]
import io.github.marioluan.datastructures.Node;
import io.github.marioluan.datastructures.*;
[ "io.github.marioluan" ]
io.github.marioluan;
890,301
public Scan getEventLogRecommendedScanner(Long startDate, Long endDate) { Scan scan = new Scan().addFamily(EVENTLOG_COLUMN_RECOMMENDED); FilterList filters = new FilterList(); filters.addFilter(new RowFilter(CompareOp.EQUAL, new BinaryPrefixComparator(RowKeys.getRecommendedItemKey()))); // timestamp filter:...
Scan function(Long startDate, Long endDate) { Scan scan = new Scan().addFamily(EVENTLOG_COLUMN_RECOMMENDED); FilterList filters = new FilterList(); filters.addFilter(new RowFilter(CompareOp.EQUAL, new BinaryPrefixComparator(RowKeys.getRecommendedItemKey()))); if (startDate != null) { SingleColumnValueFilter startFilter...
/** * return a recommended scanner with an optional start date and end date * @param startDate start date * @param endDate end date * @return */
return a recommended scanner with an optional start date and end date
getEventLogRecommendedScanner
{ "repo_name": "beeldengeluid/zieook", "path": "backend/zieook-backend/zieook-inx/zieook-runner/src/main/java/nl/gridline/zieook/runners/statistics/StatisticsTool.java", "license": "apache-2.0", "size": 20714 }
[ "nl.gridline.zieook.mapreduce.RowKeys", "nl.gridline.zieook.model.ModelConstants", "org.apache.hadoop.hbase.client.Scan", "org.apache.hadoop.hbase.filter.BinaryPrefixComparator", "org.apache.hadoop.hbase.filter.CompareFilter", "org.apache.hadoop.hbase.filter.FilterList", "org.apache.hadoop.hbase.filter....
import nl.gridline.zieook.mapreduce.RowKeys; import nl.gridline.zieook.model.ModelConstants; import org.apache.hadoop.hbase.client.Scan; import org.apache.hadoop.hbase.filter.BinaryPrefixComparator; import org.apache.hadoop.hbase.filter.CompareFilter; import org.apache.hadoop.hbase.filter.FilterList; import org.apache....
import nl.gridline.zieook.mapreduce.*; import nl.gridline.zieook.model.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.filter.*; import org.apache.hadoop.hbase.util.*;
[ "nl.gridline.zieook", "org.apache.hadoop" ]
nl.gridline.zieook; org.apache.hadoop;
382,155
BeanMetadataElement createBeanMetadataElementByIntrospection(Object object, ConversionService conversionService);
BeanMetadataElement createBeanMetadataElementByIntrospection(Object object, ConversionService conversionService);
/** * Creates a bean metadata element by introspecting a Java beans object. * * @param object the object to introspect * @param conversionService the conversion service to be used to convert simple object types to string * @return the bean definition */
Creates a bean metadata element by introspecting a Java beans object
createBeanMetadataElementByIntrospection
{ "repo_name": "lat-lon/geomajas", "path": "plugin/geomajas-plugin-runtimeconfig/runtimeconfig/src/main/java/org/geomajas/plugin/runtimeconfig/service/BeanDefinitionDtoConverterService.java", "license": "agpl-3.0", "size": 5180 }
[ "org.springframework.beans.BeanMetadataElement", "org.springframework.core.convert.ConversionService" ]
import org.springframework.beans.BeanMetadataElement; import org.springframework.core.convert.ConversionService;
import org.springframework.beans.*; import org.springframework.core.convert.*;
[ "org.springframework.beans", "org.springframework.core" ]
org.springframework.beans; org.springframework.core;
321,189
public void loadDrinkizyResults(){ String locationProvider = LocationManager.NETWORK_PROVIDER; // Or, use GPS location data: // String locationProvider = LocationManager.GPS_PROVIDER; if(mDistanceQuery != 0){ locationManager = (LocationManager) this.getSystemService(Context.LOCATIO...
void function(){ String locationProvider = LocationManager.NETWORK_PROVIDER; if(mDistanceQuery != 0){ locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE); mLastKnownLocation = locationManager.getLastKnownLocation(locationProvider); } RequestParams params = new RequestParams(); params.put...
/** * Load data from API */
Load data from API
loadDrinkizyResults
{ "repo_name": "HugoGresse/drinkizy-android", "path": "src/fr/drinkizy/SearchResultActivity.java", "license": "gpl-2.0", "size": 10412 }
[ "android.content.Context", "android.location.LocationManager", "com.loopj.android.http.RequestParams" ]
import android.content.Context; import android.location.LocationManager; import com.loopj.android.http.RequestParams;
import android.content.*; import android.location.*; import com.loopj.android.http.*;
[ "android.content", "android.location", "com.loopj.android" ]
android.content; android.location; com.loopj.android;
2,785,148
Set<MavenRepositoryMetadata> getRepositoriesResolvingArtifact( final GAV gav, final MavenRepositoryMetadata... filter );
Set<MavenRepositoryMetadata> getRepositoriesResolvingArtifact( final GAV gav, final MavenRepositoryMetadata... filter );
/** * Get a collection of Repositories that a given GAV resolve against. * @param gav The GAV for the artifact to resolve * @param filter An optional Set of MavenRepositoryMetadata to filter the results. Those in the filter are included. If a filter is not provided all results are returned. * @retur...
Get a collection of Repositories that a given GAV resolve against
getRepositoriesResolvingArtifact
{ "repo_name": "porcelli-forks/guvnor", "path": "guvnor-project/guvnor-project-api/src/main/java/org/guvnor/common/services/project/service/ProjectRepositoryResolver.java", "license": "apache-2.0", "size": 3981 }
[ "java.util.Set", "org.guvnor.common.services.project.model.MavenRepositoryMetadata" ]
import java.util.Set; import org.guvnor.common.services.project.model.MavenRepositoryMetadata;
import java.util.*; import org.guvnor.common.services.project.model.*;
[ "java.util", "org.guvnor.common" ]
java.util; org.guvnor.common;
2,455,482
public Map<String, SearchComponent> getSearchComponents() { return searchComponents; } //////////////////////////////////////////////////////////////////////////////// // Update Handler ////////////////////////////////////////////////////////////////////////////////
Map<String, SearchComponent> function() { return searchComponents; }
/** * Accessor for all the Search Components * @return An unmodifiable Map of Search Components */
Accessor for all the Search Components
getSearchComponents
{ "repo_name": "kankedong/solr_reading", "path": "solr/core/src/java/org/apache/solr/core/SolrCore.java", "license": "apache-2.0", "size": 92758 }
[ "java.util.Map", "org.apache.solr.handler.component.SearchComponent" ]
import java.util.Map; import org.apache.solr.handler.component.SearchComponent;
import java.util.*; import org.apache.solr.handler.component.*;
[ "java.util", "org.apache.solr" ]
java.util; org.apache.solr;
2,442,317
private IProphetResult getResult( MsmsRunSummary runSummary, SpectrumQuery spectrumQuery, SearchHit searchHit ) throws Exception { IProphetResult result = new IProphetResult(); result.setScanFile( ScanParsingUtils.getFilenameFromReportedScan( spectrumQuery.getSpectrum() ) + runSummary.getRawData() ); ...
IProphetResult function( MsmsRunSummary runSummary, SpectrumQuery spectrumQuery, SearchHit searchHit ) throws Exception { IProphetResult result = new IProphetResult(); result.setScanFile( ScanParsingUtils.getFilenameFromReportedScan( spectrumQuery.getSpectrum() ) + runSummary.getRawData() ); result.setScanNumber( (int)...
/** * Get the PSM result for the given spectrum query and search hit. * * @param spectrumQuery * @param searchHit * @return * @throws Exception If any of the expected scores are not found */
Get the PSM result for the given spectrum query and search hit
getResult
{ "repo_name": "yeastrc/proxl-import-iprophet", "path": "src/org/yeastrc/proxl/xml/iprophet/reader/IProphetResultsParser.java", "license": "apache-2.0", "size": 26087 }
[ "java.math.BigDecimal", "net.systemsbiology.regis_web.pepxml.InterprophetResult", "net.systemsbiology.regis_web.pepxml.MsmsPipelineAnalysis", "net.systemsbiology.regis_web.pepxml.NameValueType", "net.systemsbiology.regis_web.pepxml.PeptideprophetResult", "org.yeastrc.proxl.xml.iprophet.constants.IProphetC...
import java.math.BigDecimal; import net.systemsbiology.regis_web.pepxml.InterprophetResult; import net.systemsbiology.regis_web.pepxml.MsmsPipelineAnalysis; import net.systemsbiology.regis_web.pepxml.NameValueType; import net.systemsbiology.regis_web.pepxml.PeptideprophetResult; import org.yeastrc.proxl.xml.iprophet.co...
import java.math.*; import net.systemsbiology.regis_web.pepxml.*; import org.yeastrc.proxl.xml.iprophet.constants.*; import org.yeastrc.proxl.xml.iprophet.objects.*; import org.yeastrc.proxl.xml.iprophet.utils.*;
[ "java.math", "net.systemsbiology.regis_web", "org.yeastrc.proxl" ]
java.math; net.systemsbiology.regis_web; org.yeastrc.proxl;
1,498,354
public static void resolveKnownConstantFields(CamelContext camelContext, Object definition) throws Exception { LOG.trace("Resolving known fields for: {}", definition); // find all String getter/setter Map<String, Object> properties = new HashMap<>(); IntrospectionSupport.getProperti...
static void function(CamelContext camelContext, Object definition) throws Exception { LOG.trace(STR, definition); Map<String, Object> properties = new HashMap<>(); IntrospectionSupport.getProperties(definition, properties, null); Map<String, Object> changedProperties = new HashMap<>(); if (!properties.isEmpty()) { LOG....
/** * Inspects the given definition and resolves known fields * <p/> * This implementation will check all the getter/setter pairs on this instance and for all the values * (which is a String type) will check if it refers to a known field (such as on Exchange). * * @param camelContext the c...
Inspects the given definition and resolves known fields This implementation will check all the getter/setter pairs on this instance and for all the values (which is a String type) will check if it refers to a known field (such as on Exchange)
resolveKnownConstantFields
{ "repo_name": "Fabryprog/camel", "path": "core/camel-core/src/main/java/org/apache/camel/model/ProcessorDefinitionHelper.java", "license": "apache-2.0", "size": 36353 }
[ "java.util.HashMap", "java.util.Map", "org.apache.camel.CamelContext", "org.apache.camel.Exchange", "org.apache.camel.support.IntrospectionSupport", "org.apache.camel.util.ObjectHelper", "org.apache.camel.util.StringHelper" ]
import java.util.HashMap; import java.util.Map; import org.apache.camel.CamelContext; import org.apache.camel.Exchange; import org.apache.camel.support.IntrospectionSupport; import org.apache.camel.util.ObjectHelper; import org.apache.camel.util.StringHelper;
import java.util.*; import org.apache.camel.*; import org.apache.camel.support.*; import org.apache.camel.util.*;
[ "java.util", "org.apache.camel" ]
java.util; org.apache.camel;
650,027
//----------------------------------------------------------------------- public UniqueId getUniqueId() { return _uniqueId; }
UniqueId function() { return _uniqueId; }
/** * Gets the unique identifier of this user. * This must be null when adding to a master and not null when retrieved from a master. * @return the value of the property */
Gets the unique identifier of this user. This must be null when adding to a master and not null when retrieved from a master
getUniqueId
{ "repo_name": "DevStreet/FinanceAnalytics", "path": "projects/OG-Master/src/main/java/com/opengamma/master/user/ManageableUser.java", "license": "apache-2.0", "size": 25314 }
[ "com.opengamma.id.UniqueId" ]
import com.opengamma.id.UniqueId;
import com.opengamma.id.*;
[ "com.opengamma.id" ]
com.opengamma.id;
2,581,671
private void generateProfileFromText() { if (arglist.size() != 1) { System.err.println("Need to specify text file path"); return; } File file = new File(arglist.get(0)); if (!file.exists()) { System.err.println("Need to specify existing text file p...
void function() { if (arglist.size() != 1) { System.err.println(STR); return; } File file = new File(arglist.get(0)); if (!file.exists()) { System.err.println(STR); return; } String lang = get("lang"); if (lang == null) { System.err.println(STR); return; } FileOutputStream os = null; try { LangProfile profile = GenProf...
/** * Generate Language Profile from Text File * * <pre> * usage: --genprofile-text -l [language code] [text file path] * </pre> * */
Generate Language Profile from Text File <code> usage: --genprofile-text -l [language code] [text file path] </code>
generateProfileFromText
{ "repo_name": "deezer/weslang", "path": "third_party/java/language-detection-v2/src/com/cybozu/labs/langdetect/Command.java", "license": "apache-2.0", "size": 11185 }
[ "com.cybozu.labs.langdetect.util.LangProfile", "java.io.File", "java.io.FileOutputStream", "java.io.IOException", "net.arnx.jsonic.JSON", "net.arnx.jsonic.JSONException" ]
import com.cybozu.labs.langdetect.util.LangProfile; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import net.arnx.jsonic.JSON; import net.arnx.jsonic.JSONException;
import com.cybozu.labs.langdetect.util.*; import java.io.*; import net.arnx.jsonic.*;
[ "com.cybozu.labs", "java.io", "net.arnx.jsonic" ]
com.cybozu.labs; java.io; net.arnx.jsonic;
1,720,937
@Test public void testGet() { myState = new Cluster(new MongoClientConfiguration(), ClusterType.STAND_ALONE); final PropertyChangeListener mockListener = EasyMock .createMock(PropertyChangeListener.class); myState.addListener(mockListener); // Sh...
void function() { myState = new Cluster(new MongoClientConfiguration(), ClusterType.STAND_ALONE); final PropertyChangeListener mockListener = EasyMock .createMock(PropertyChangeListener.class); myState.addListener(mockListener); final Capture<PropertyChangeEvent> event = new Capture<PropertyChangeEvent>(); mockListener...
/** * Test method for {@link Cluster#get(java.lang.String)}. */
Test method for <code>Cluster#get(java.lang.String)</code>
testGet
{ "repo_name": "allanbank/mongodb-async-driver", "path": "src/test/java/com/allanbank/mongodb/client/state/ClusterTest.java", "license": "apache-2.0", "size": 31097 }
[ "com.allanbank.mongodb.MongoClientConfiguration", "com.allanbank.mongodb.client.ClusterType", "java.beans.PropertyChangeEvent", "java.beans.PropertyChangeListener", "org.easymock.Capture", "org.easymock.EasyMock", "org.junit.Assert" ]
import com.allanbank.mongodb.MongoClientConfiguration; import com.allanbank.mongodb.client.ClusterType; import java.beans.PropertyChangeEvent; import java.beans.PropertyChangeListener; import org.easymock.Capture; import org.easymock.EasyMock; import org.junit.Assert;
import com.allanbank.mongodb.*; import com.allanbank.mongodb.client.*; import java.beans.*; import org.easymock.*; import org.junit.*;
[ "com.allanbank.mongodb", "java.beans", "org.easymock", "org.junit" ]
com.allanbank.mongodb; java.beans; org.easymock; org.junit;
1,271,898
public static final Long date2utc(Date date) { // use null for a null date if (date == null) return null; long time = date.getTime(); // remove the timezone offset time -= timezoneOffsetMillis(date); return time; }
static final Long function(Date date) { if (date == null) return null; long time = date.getTime(); time -= timezoneOffsetMillis(date); return time; }
/** * Converts a gwt Date in the timezone of the current browser to a time in * UTC. * * @return A Long corresponding to the number of milliseconds since January * 1, 1970, 00:00:00 GMT or null if the specified Date is null. */
Converts a gwt Date in the timezone of the current browser to a time in UTC
date2utc
{ "repo_name": "tractionsoftware/gwt-traction", "path": "src/main/java/com/tractionsoftware/gwt/user/client/ui/UTCDateBox.java", "license": "apache-2.0", "size": 7947 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
414,495
@Test public void testEquals2() { TestRenderer r1 = new TestRenderer(); TestRenderer r2 = new TestRenderer(); assertEquals(r1, r2); r1.setTreatLegendShapeAsLine(true); assertFalse(r1.equals(r2)); r2.setTreatLegendShapeAsLine(true); assertEquals(r1,...
void function() { TestRenderer r1 = new TestRenderer(); TestRenderer r2 = new TestRenderer(); assertEquals(r1, r2); r1.setTreatLegendShapeAsLine(true); assertFalse(r1.equals(r2)); r2.setTreatLegendShapeAsLine(true); assertEquals(r1, r2); }
/** * Check that the treatLegendShapeAsLine flag is included in the equals() * comparison. */
Check that the treatLegendShapeAsLine flag is included in the equals() comparison
testEquals2
{ "repo_name": "oskopek/jfreechart-fse", "path": "src/test/java/org/jfree/chart/renderer/AbstractRendererTest.java", "license": "lgpl-2.1", "size": 29224 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,334,277
void onScrollingStarted(WheelView wheelView);
void onScrollingStarted(WheelView wheelView);
/** * Callback method to be invoked when scrolling started. * @param wheel the wheel view whose state has changed. */
Callback method to be invoked when scrolling started
onScrollingStarted
{ "repo_name": "CiLiNet-Android/AndroidProject-CndSteel_External", "path": "CndSteel_External/src/com/cndsteel/framework/views/dialogs/wheelpicker/listeners/OnWheelScrollListener.java", "license": "apache-2.0", "size": 1175 }
[ "com.cndsteel.framework.views.dialogs.wheelpicker.WheelView" ]
import com.cndsteel.framework.views.dialogs.wheelpicker.WheelView;
import com.cndsteel.framework.views.dialogs.wheelpicker.*;
[ "com.cndsteel.framework" ]
com.cndsteel.framework;
1,042,503
public static Response load(InputStream is) throws JSONStructureException { // TODO - ASSUME that order of members within an object does not matter (Different from XML, in JSON // everything is handled as Maps so order does not matter) // ensure shorthand map is set up if (shorthan...
static Response function(InputStream is) throws JSONStructureException { if (shorthandMap == null) { initShorthandMap(); } if (dataTypeFactory == null) { try { dataTypeFactory = DataTypeFactory.newInstance(); if (dataTypeFactory == null) { throw new NullPointerException(STR); } } catch (FactoryException e) { throw new ...
/** * Read characters from the given <code>InputStream</code> and parse them into an XACML * {@link org.apache.openaz.xacml.api.Request} object. * * @param is * @return * @throws JSONStructureException */
Read characters from the given <code>InputStream</code> and parse them into an XACML <code>org.apache.openaz.xacml.api.Request</code> object
load
{ "repo_name": "mefarazath/incubator-openaz", "path": "openaz-xacml/src/main/java/org/apache/openaz/xacml/std/json/JSONResponse.java", "license": "apache-2.0", "size": 96377 }
[ "com.fasterxml.jackson.databind.ObjectMapper", "java.io.InputStream", "org.apache.openaz.xacml.api.Attribute", "org.apache.openaz.xacml.api.AttributeValue", "org.apache.openaz.xacml.api.DataType", "org.apache.openaz.xacml.api.DataTypeFactory", "org.apache.openaz.xacml.api.Decision", "org.apache.openaz...
import com.fasterxml.jackson.databind.ObjectMapper; import java.io.InputStream; import org.apache.openaz.xacml.api.Attribute; import org.apache.openaz.xacml.api.AttributeValue; import org.apache.openaz.xacml.api.DataType; import org.apache.openaz.xacml.api.DataTypeFactory; import org.apache.openaz.xacml.api.Decision; i...
import com.fasterxml.jackson.databind.*; import java.io.*; import org.apache.openaz.xacml.api.*; import org.apache.openaz.xacml.std.*; import org.apache.openaz.xacml.util.*;
[ "com.fasterxml.jackson", "java.io", "org.apache.openaz" ]
com.fasterxml.jackson; java.io; org.apache.openaz;
354,821
public Future<?> playNext() { return interactWithRoom(instance -> { processVotes(instance); Song song = instance.nextSong(); startPlaying(song); instance.merge(); }); }
Future<?> function() { return interactWithRoom(instance -> { processVotes(instance); Song song = instance.nextSong(); startPlaying(song); instance.merge(); }); }
/** * Play a next song. Will fetch from the history if no songs can be found. */
Play a next song. Will fetch from the history if no songs can be found
playNext
{ "repo_name": "MoodCat/MoodCat.me-Core", "path": "src/main/java/me/moodcat/backend/rooms/RoomInstance.java", "license": "mit", "size": 11405 }
[ "java.util.concurrent.Future", "me.moodcat.database.entities.Song" ]
import java.util.concurrent.Future; import me.moodcat.database.entities.Song;
import java.util.concurrent.*; import me.moodcat.database.entities.*;
[ "java.util", "me.moodcat.database" ]
java.util; me.moodcat.database;
2,434,236
public int exec(List<String> args, OutErr originalOutErr, long firstContactTime) throws ShutdownBlazeServerException { // Record the start time for the profiler and the timestamp granularity monitor. Do not put // anything before this! long execStartTimeNanos = runtime.getClock().nanoTime(); //...
int function(List<String> args, OutErr originalOutErr, long firstContactTime) throws ShutdownBlazeServerException { long execStartTimeNanos = runtime.getClock().nanoTime(); runtime.recordCommandStartTime(firstContactTime); runtime.getTimestampGranularityMonitor().setCommandStartTime(); runtime.initEventBus(); OutErrEve...
/** * Executes a single command. Returns the Unix exit status for the Blaze * client process, or throws {@link ShutdownBlazeServerException} to * indicate that a command wants to shutdown the Blaze server. */
Executes a single command. Returns the Unix exit status for the Blaze client process, or throws <code>ShutdownBlazeServerException</code> to indicate that a command wants to shutdown the Blaze server
exec
{ "repo_name": "bitemyapp/bazel", "path": "src/main/java/com/google/devtools/build/lib/runtime/BlazeCommandDispatcher.java", "license": "apache-2.0", "size": 28448 }
[ "com.google.common.io.Flushables", "com.google.devtools.build.lib.Constants", "com.google.devtools.build.lib.events.Event", "com.google.devtools.build.lib.events.EventHandler", "com.google.devtools.build.lib.events.Reporter", "com.google.devtools.build.lib.util.AbruptExitException", "com.google.devtools...
import com.google.common.io.Flushables; import com.google.devtools.build.lib.Constants; import com.google.devtools.build.lib.events.Event; import com.google.devtools.build.lib.events.EventHandler; import com.google.devtools.build.lib.events.Reporter; import com.google.devtools.build.lib.util.AbruptExitException; import...
import com.google.common.io.*; import com.google.devtools.build.lib.*; import com.google.devtools.build.lib.events.*; import com.google.devtools.build.lib.util.*; import com.google.devtools.build.lib.util.io.*; import com.google.devtools.build.lib.vfs.*; import com.google.devtools.common.options.*; import java.io.*; im...
[ "com.google.common", "com.google.devtools", "java.io", "java.util" ]
com.google.common; com.google.devtools; java.io; java.util;
879,916
private static boolean isFullySpecified(Type type) { if (type instanceof Class) { return true; } else if (type instanceof CompositeType) { return ((CompositeType) type).isFullySpecified(); } else if (type instanceof TypeVariable) { return false; ...
static boolean function(Type type) { if (type instanceof Class) { return true; } else if (type instanceof CompositeType) { return ((CompositeType) type).isFullySpecified(); } else if (type instanceof TypeVariable) { return false; } else { return ((CompositeType) canonicalize(type)).isFullySpecified(); } }
/** * Returns true if {@code type} is free from type variables. */
Returns true if type is free from type variables
isFullySpecified
{ "repo_name": "EvilMcJerkface/crate", "path": "libs/guice/src/main/java/org/elasticsearch/common/inject/internal/MoreTypes.java", "license": "apache-2.0", "size": 24942 }
[ "java.lang.reflect.Type", "java.lang.reflect.TypeVariable" ]
import java.lang.reflect.Type; import java.lang.reflect.TypeVariable;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
2,274,505
private void createAFileWithCorruptedBlockReplicas(Path filePath, short repl, int corruptBlockCount) throws IOException, AccessControlException, FileNotFoundException, UnresolvedLinkException, InterruptedException, TimeoutException { DFSTestUtil.createFile(dfs, filePath, BLOCK_SIZE, repl, 0); DFST...
void function(Path filePath, short repl, int corruptBlockCount) throws IOException, AccessControlException, FileNotFoundException, UnresolvedLinkException, InterruptedException, TimeoutException { DFSTestUtil.createFile(dfs, filePath, BLOCK_SIZE, repl, 0); DFSTestUtil.waitReplication(dfs, filePath, repl); final Located...
/** * Create a file with one block and corrupt some/all of the block replicas. */
Create a file with one block and corrupt some/all of the block replicas
createAFileWithCorruptedBlockReplicas
{ "repo_name": "mapr/hadoop-common", "path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestClientReportBadBlock.java", "license": "apache-2.0", "size": 13332 }
[ "java.io.FileNotFoundException", "java.io.IOException", "java.util.concurrent.TimeoutException", "org.apache.hadoop.fs.Path", "org.apache.hadoop.fs.UnresolvedLinkException", "org.apache.hadoop.hdfs.protocol.DatanodeInfo", "org.apache.hadoop.hdfs.protocol.ExtendedBlock", "org.apache.hadoop.hdfs.protoco...
import java.io.FileNotFoundException; import java.io.IOException; import java.util.concurrent.TimeoutException; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.UnresolvedLinkException; import org.apache.hadoop.hdfs.protocol.DatanodeInfo; import org.apache.hadoop.hdfs.protocol.ExtendedBlock; import org.apa...
import java.io.*; import java.util.concurrent.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.server.datanode.*; import org.apache.hadoop.security.*; import org.junit.*;
[ "java.io", "java.util", "org.apache.hadoop", "org.junit" ]
java.io; java.util; org.apache.hadoop; org.junit;
1,142,740
protected void validateDouble(String field, double min, double max, String errorKey, String errorMessage) { String value = controller.getPara(field); if (StrKit.isBlank(value)) { addError(errorKey, errorMessage); return ; } try { double temp = Double.parseDouble(value.trim()); if (temp < ...
void function(String field, double min, double max, String errorKey, String errorMessage) { String value = controller.getPara(field); if (StrKit.isBlank(value)) { addError(errorKey, errorMessage); return ; } try { double temp = Double.parseDouble(value.trim()); if (temp < min temp > max) addError(errorKey, errorMessage...
/** * Validate double. */
Validate double
validateDouble
{ "repo_name": "cokolin/JFinal-Servlet3", "path": "src/main/java/com/jfinal/validate/Validator.java", "license": "apache-2.0", "size": 15691 }
[ "com.jfinal.kit.StrKit" ]
import com.jfinal.kit.StrKit;
import com.jfinal.kit.*;
[ "com.jfinal.kit" ]
com.jfinal.kit;
1,803,207
public DataNode setZone_support_materialScalar(String zone_support_material);
DataNode function(String zone_support_material);
/** * Material present between the zones. This is usually only present for the "zone doubled" fabrication process * * @param zone_support_material the zone_support_material */
Material present between the zones. This is usually only present for the "zone doubled" fabrication process
setZone_support_materialScalar
{ "repo_name": "colinpalmer/dawnsci", "path": "org.eclipse.dawnsci.nexus/autogen/org/eclipse/dawnsci/nexus/NXfresnel_zone_plate.java", "license": "epl-1.0", "size": 14652 }
[ "org.eclipse.dawnsci.analysis.api.tree.DataNode" ]
import org.eclipse.dawnsci.analysis.api.tree.DataNode;
import org.eclipse.dawnsci.analysis.api.tree.*;
[ "org.eclipse.dawnsci" ]
org.eclipse.dawnsci;
1,533,632
public com.mozu.api.contracts.customer.CustomerContactCollection getAccountContacts(Integer accountId, Integer startIndex, Integer pageSize, String sortBy, String filter, String responseFields) throws Exception { MozuClient<com.mozu.api.contracts.customer.CustomerContactCollection> client = com.mozu.api.clients.c...
com.mozu.api.contracts.customer.CustomerContactCollection function(Integer accountId, Integer startIndex, Integer pageSize, String sortBy, String filter, String responseFields) throws Exception { MozuClient<com.mozu.api.contracts.customer.CustomerContactCollection> client = com.mozu.api.clients.commerce.customer.accoun...
/** * Retrieves a list of contacts for a customer according to any specified filter criteria and sort options. * <p><pre><code> * CustomerContact customercontact = new CustomerContact(); * CustomerContactCollection customerContactCollection = customercontact.getAccountContacts( accountId, startIndex, pageSize...
Retrieves a list of contacts for a customer according to any specified filter criteria and sort options. <code><code> CustomerContact customercontact = new CustomerContact(); CustomerContactCollection customerContactCollection = customercontact.getAccountContacts( accountId, startIndex, pageSize, sortBy, filter, respon...
getAccountContacts
{ "repo_name": "bhewett/mozu-java", "path": "mozu-java-core/src/main/java/com/mozu/api/resources/commerce/customer/accounts/CustomerContactResource.java", "license": "mit", "size": 11265 }
[ "com.mozu.api.MozuClient" ]
import com.mozu.api.MozuClient;
import com.mozu.api.*;
[ "com.mozu.api" ]
com.mozu.api;
1,635,482
@Override public int getMaximumVolumeSizeIOPS() throws InternalException, CloudException { return 0; }
int function() throws InternalException, CloudException { return 0; }
/** * Indicates the maximum volume size for IOPS Volumes. * * @return the maximum size of an IOPS volume * @throws org.dasein.cloud.InternalException an error occurred within the Dasein Cloud implementation determining the limit * @throws org.dasein.cloud.CloudException an error occurred ret...
Indicates the maximum volume size for IOPS Volumes
getMaximumVolumeSizeIOPS
{ "repo_name": "dasein-cloud/dasein-cloud-azure", "path": "src/main/java/org/dasein/cloud/azure/compute/disk/AzureDiskCapabilities.java", "license": "apache-2.0", "size": 5281 }
[ "org.dasein.cloud.CloudException", "org.dasein.cloud.InternalException" ]
import org.dasein.cloud.CloudException; import org.dasein.cloud.InternalException;
import org.dasein.cloud.*;
[ "org.dasein.cloud" ]
org.dasein.cloud;
240,086
public final void buscarWithoutContentPerformanceTest() throws BackupServerException { List<Pair<ServidorSimpleConRespaldoImp, String>> testElements = new ArrayList<>(); for (int i = 0; i < itNumber; i++) { String nombre = gNameGen.next(); String passwd = gNameGen.next(); String tokenValido = sTokenG...
final void function() throws BackupServerException { List<Pair<ServidorSimpleConRespaldoImp, String>> testElements = new ArrayList<>(); for (int i = 0; i < itNumber; i++) { String nombre = gNameGen.next(); String passwd = gNameGen.next(); String tokenValido = sTokenGen.next().getLeft(); Servidor servidorRespaldo = new ...
/** * Buscar sin contenido test. * * @throws BackupServerException * la excepción BackupServerException */
Buscar sin contenido test
buscarWithoutContentPerformanceTest
{ "repo_name": "Xokage/practica-vvs-4malladores", "path": "test/test/performance/ServidorSimpleConRespaldoImpPerformance.java", "license": "gpl-2.0", "size": 3906 }
[ "java.util.ArrayList", "java.util.List" ]
import java.util.ArrayList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,790,480
static TextView constructImageTag(LayoutInflater inflater, final String tagName, final String tagScore) { TextView imageTagView = (TextView)inflater.inflate(R.layout.image_tag, null); imageTagView.setText(tagName);
static TextView constructImageTag(LayoutInflater inflater, final String tagName, final String tagScore) { TextView imageTagView = (TextView)inflater.inflate(R.layout.image_tag, null); imageTagView.setText(tagName);
/** * Creates a TextView image tag with a name and score to be displayed to the user. * @param inflater Layout inflater to access R.layout.image_tag. * @param tagName Name of the tag to be displayed. * @param tagScore Certainty score of the tag, to be displayed when the user clicks the tag. * @...
Creates a TextView image tag with a name and score to be displayed to the user
constructImageTag
{ "repo_name": "kbrkkn/Uygulama-Android", "path": "app/src/main/java/com/ibm/visual_recognition/RecognitionResultBuilder.java", "license": "mit", "size": 7501 }
[ "android.view.LayoutInflater", "android.widget.TextView" ]
import android.view.LayoutInflater; import android.widget.TextView;
import android.view.*; import android.widget.*;
[ "android.view", "android.widget" ]
android.view; android.widget;
2,303,638
public void testRestoreSetsBaseVersionJcr2() throws RepositoryException { versionManager.restore(version, true); Version baseV = versionManager.getBaseVersion(versionableNode.getPath()); assertTrue("Restoring a node must set node's base version in order to point to the restored version.", ve...
void function() throws RepositoryException { versionManager.restore(version, true); Version baseV = versionManager.getBaseVersion(versionableNode.getPath()); assertTrue(STR, version.isSame(baseV)); }
/** * Test if restoring a node sets the jcr:baseVersion property correctly. * * @throws javax.jcr.RepositoryException */
Test if restoring a node sets the jcr:baseVersion property correctly
testRestoreSetsBaseVersionJcr2
{ "repo_name": "apache/jackrabbit", "path": "jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/version/RestoreTest.java", "license": "apache-2.0", "size": 61164 }
[ "javax.jcr.RepositoryException", "javax.jcr.version.Version" ]
import javax.jcr.RepositoryException; import javax.jcr.version.Version;
import javax.jcr.*; import javax.jcr.version.*;
[ "javax.jcr" ]
javax.jcr;
538,287
public void runTests(String prefix) { int errorCount = 0; long t0 = 0, t1 = 0, t2 = 0; System.out.println("STARTING TESTS at " + new Date()); t0 = new Date().getTime(); for(int i = 0; i < 10; i++) { Iterator it = tests.iterator();...
void function(String prefix) { int errorCount = 0; long t0 = 0, t1 = 0, t2 = 0; System.out.println(STR + new Date()); t0 = new Date().getTime(); for(int i = 0; i < 10; i++) { Iterator it = tests.iterator(); while (it.hasNext()) { t1 = new Date().getTime(); Test test = (Test)(it.next()); errorCount += test.run(prefix); ...
/** * Runs the tests, in order, using the given location of the test data. * * @param prefix the root directory of all the conformance test cases */
Runs the tests, in order, using the given location of the test data
runTests
{ "repo_name": "townbull/mtaaas", "path": "PEPClient/mtrbac/PEPClient/TestDriver.java", "license": "apache-2.0", "size": 7717 }
[ "java.util.Date", "java.util.Iterator" ]
import java.util.Date; import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
812,658
private void endDiskDir() { StringBuffer dirName = (StringBuffer) stack.pop(); File dir = new File(dirName.toString().trim()); if (!dir.exists()) { } stack.push(dir); }
void function() { StringBuffer dirName = (StringBuffer) stack.pop(); File dir = new File(dirName.toString().trim()); if (!dir.exists()) { } stack.push(dir); }
/** * When a <code>disk-dir</code> element is finished, the name of the directory is on top of the * stack. Create a new {@link File}and push it on the stack. */
When a <code>disk-dir</code> element is finished, the name of the directory is on top of the stack. Create a new <code>File</code>and push it on the stack
endDiskDir
{ "repo_name": "pdxrunner/geode", "path": "geode-core/src/main/java/org/apache/geode/internal/cache/xmlcache/CacheXmlParser.java", "license": "apache-2.0", "size": 128922 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
2,274,130
public void testSerialization() { DefaultBoxAndWhiskerCategoryDataset d1 = new DefaultBoxAndWhiskerCategoryDataset(); d1.add( new BoxAndWhiskerItem( new Double(1.0), new Double(2.0), new Double(3.0), new Double(4.0), new Doub...
void function() { DefaultBoxAndWhiskerCategoryDataset d1 = new DefaultBoxAndWhiskerCategoryDataset(); d1.add( new BoxAndWhiskerItem( new Double(1.0), new Double(2.0), new Double(3.0), new Double(4.0), new Double(5.0), new Double(6.0), new Double(7.0), new Double(8.0), new ArrayList() ), "ROW1", STR ); DefaultBoxAndWhis...
/** * Serialize an instance, restore it, and check for equality. */
Serialize an instance, restore it, and check for equality
testSerialization
{ "repo_name": "nologic/nabs", "path": "client/trunk/shared/libraries/jfreechart-1.0.5/tests/org/jfree/data/statistics/junit/DefaultBoxAndWhiskerCategoryDatasetTests.java", "license": "gpl-2.0", "size": 5018 }
[ "java.io.ByteArrayInputStream", "java.io.ByteArrayOutputStream", "java.io.ObjectInput", "java.io.ObjectInputStream", "java.io.ObjectOutput", "java.io.ObjectOutputStream", "java.util.ArrayList", "org.jfree.data.statistics.BoxAndWhiskerItem", "org.jfree.data.statistics.DefaultBoxAndWhiskerCategoryData...
import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.ObjectInput; import java.io.ObjectInputStream; import java.io.ObjectOutput; import java.io.ObjectOutputStream; import java.util.ArrayList; import org.jfree.data.statistics.BoxAndWhiskerItem; import org.jfree.data.statistics.Defaul...
import java.io.*; import java.util.*; import org.jfree.data.statistics.*;
[ "java.io", "java.util", "org.jfree.data" ]
java.io; java.util; org.jfree.data;
1,287,495
void handleBookiesThatJoined(Set<BookieSocketAddress> joinedBookies);
void handleBookiesThatJoined(Set<BookieSocketAddress> joinedBookies);
/** * Handle bookies that joined * * @param joinedBookies * bookies that joined. */
Handle bookies that joined
handleBookiesThatJoined
{ "repo_name": "twitter/bookkeeper", "path": "bookkeeper-server/src/main/java/org/apache/bookkeeper/client/ITopologyAwareEnsemblePlacementPolicy.java", "license": "apache-2.0", "size": 3248 }
[ "java.util.Set", "org.apache.bookkeeper.net.BookieSocketAddress" ]
import java.util.Set; import org.apache.bookkeeper.net.BookieSocketAddress;
import java.util.*; import org.apache.bookkeeper.net.*;
[ "java.util", "org.apache.bookkeeper" ]
java.util; org.apache.bookkeeper;
1,730,813
public static TypeMapper getTypeMapper(Class cls) { synchronized(libraries) { Class interfaceClass = findEnclosingLibraryClass(cls); if (interfaceClass != null) loadLibraryInstance(interfaceClass); else interfaceClass = cls; ...
static TypeMapper function(Class cls) { synchronized(libraries) { Class interfaceClass = findEnclosingLibraryClass(cls); if (interfaceClass != null) loadLibraryInstance(interfaceClass); else interfaceClass = cls; if (!typeMappers.containsKey(interfaceClass)) { try { Field field = interfaceClass.getField(STR); field.set...
/** Return the preferred {@link TypeMapper} for the given native interface. * See {@link com.sun.jna.Library#OPTION_TYPE_MAPPER}. */
Return the preferred <code>TypeMapper</code> for the given native interface. See <code>com.sun.jna.Library#OPTION_TYPE_MAPPER</code>
getTypeMapper
{ "repo_name": "berryzplus/jna", "path": "src/com/sun/jna/Native.java", "license": "lgpl-2.1", "size": 76420 }
[ "java.lang.reflect.Field", "java.util.Map" ]
import java.lang.reflect.Field; import java.util.Map;
import java.lang.reflect.*; import java.util.*;
[ "java.lang", "java.util" ]
java.lang; java.util;
2,631,391
ArrayList<Character> buildingIons = new ArrayList<>(); ArrayList<String> cutSequence = new ArrayList<>(); sequence = checkSequence(sequence); //runs the sequence through the sequence checker method in order to detect any errors int i = 0; //needed to send what the character after the currentAA i...
ArrayList<Character> buildingIons = new ArrayList<>(); ArrayList<String> cutSequence = new ArrayList<>(); sequence = checkSequence(sequence); int i = 0; for (Character currentAA : sequence.toCharArray()) { if (!cutsBefore) { buildingIons.add(currentAA); } for (Character currentCutPoint : cutAminoAcids) { Character afte...
/** * Cut array list. * * @param sequence the sequence * @return the array list * @throws ProteaseException the protease exception */
Cut array list
cut
{ "repo_name": "RITJBF/JBioFramework", "path": "src/main/java/Electro2D/Protease.java", "license": "mit", "size": 3620 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
758,689
protected EventReaderSummary getSummary(int sourceId) { DbusEventsTotalStats stats = _stats.getSourceStats(sourceId); if (stats != null) { EventReaderSummary summary = new EventReaderSummary( (short) sourceId, stats.getDimension(), stats.getMaxScn(), (int) stats.getNumDataEvents(), s...
EventReaderSummary function(int sourceId) { DbusEventsTotalStats stats = _stats.getSourceStats(sourceId); if (stats != null) { EventReaderSummary summary = new EventReaderSummary( (short) sourceId, stats.getDimension(), stats.getMaxScn(), (int) stats.getNumDataEvents(), stats.getSizeDataEvents()*(int) (stats.getNumData...
/** * Return stats for each table access; readTime will be extrapolated diff between cur and last readings; * @param sourceId * @return */
Return stats for each table access; readTime will be extrapolated diff between cur and last readings
getSummary
{ "repo_name": "tinkujohn/databus", "path": "databus2-relay/databus2-relay-impl/src/main/java/com/linkedin/databus2/producers/RelayStatsAdapter.java", "license": "apache-2.0", "size": 5737 }
[ "com.linkedin.databus.core.monitoring.mbean.DbusEventsTotalStats", "com.linkedin.databus2.producers.db.EventReaderSummary" ]
import com.linkedin.databus.core.monitoring.mbean.DbusEventsTotalStats; import com.linkedin.databus2.producers.db.EventReaderSummary;
import com.linkedin.databus.core.monitoring.mbean.*; import com.linkedin.databus2.producers.db.*;
[ "com.linkedin.databus", "com.linkedin.databus2" ]
com.linkedin.databus; com.linkedin.databus2;
2,153,623
@Test public void testSFRemoteInterface_get_set_String() throws Exception { String originalValue = fejb1.getStringValue(); fejb1.setStringValue(originalValue + "One More"); assertEquals("Set value test was unexpected value", fejb1.getStringValue(), originalValue + "One More"); fe...
void function() throws Exception { String originalValue = fejb1.getStringValue(); fejb1.setStringValue(originalValue + STR); assertEquals(STR, fejb1.getStringValue(), originalValue + STR); fejb1.setStringValue(originalValue); assertEquals(STR, fejb1.getStringValue(), originalValue); }
/** * (bmg09) Test Stateful remote get/set methods for String value. */
(bmg09) Test Stateful remote get/set methods for String value
testSFRemoteInterface_get_set_String
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.ejbcontainer.legacy_fat/test-applications/EJB2XRemoteSpecWeb.war/src/com/ibm/ejb2x/base/spec/sfr/web/SFRemoteInterfaceMethodServlet.java", "license": "epl-1.0", "size": 13304 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,310,724
public void addDeviceListener(DeviceListener l) { if(!deviceListeners.contains(l)) deviceListeners.add(l); }
void function(DeviceListener l) { if(!deviceListeners.contains(l)) deviceListeners.add(l); }
/** * Add a listener for devices additions and removals. * * @param l The listener. Nulls and duplicates will be ignored. */
Add a listener for devices additions and removals
addDeviceListener
{ "repo_name": "Norkart/NK-VirtualGlobe", "path": "Xj3D/src/java/org/xj3d/ui/awt/device/ogl/mouse/MouseManager.java", "license": "gpl-2.0", "size": 3663 }
[ "org.xj3d.device.DeviceListener" ]
import org.xj3d.device.DeviceListener;
import org.xj3d.device.*;
[ "org.xj3d.device" ]
org.xj3d.device;
1,529,150
@ConfigAttributeChecker(name = SSL_ENABLED_COMPONENTS) protected SecurableCommunicationChannel[] checkLegacySSLWhenSSLEnabledComponentsSet( SecurableCommunicationChannel[] value) { for (SecurableCommunicationChannel component : value) { switch (component) { case ALL: case CLUSTER: ...
@ConfigAttributeChecker(name = SSL_ENABLED_COMPONENTS) SecurableCommunicationChannel[] function( SecurableCommunicationChannel[] value) { for (SecurableCommunicationChannel component : value) { switch (component) { case ALL: case CLUSTER: case SERVER: case GATEWAY: case JMX: case WEB: case LOCATOR: continue; default: t...
/** * First check if sslComponents are in the list of valid components. If so, check that no other * *-ssl-* properties other than cluster-ssl-* are set. This would mean one is mixing the "old" * with the "new" */
First check if sslComponents are in the list of valid components. If so, check that no other -ssl-* properties other than cluster-ssl-* are set. This would mean one is mixing the "old" with the "new"
checkLegacySSLWhenSSLEnabledComponentsSet
{ "repo_name": "masaki-yamakawa/geode", "path": "geode-core/src/main/java/org/apache/geode/distributed/internal/AbstractDistributionConfig.java", "license": "apache-2.0", "size": 81027 }
[ "java.util.Arrays", "org.apache.commons.lang3.StringUtils", "org.apache.geode.internal.security.SecurableCommunicationChannel" ]
import java.util.Arrays; import org.apache.commons.lang3.StringUtils; import org.apache.geode.internal.security.SecurableCommunicationChannel;
import java.util.*; import org.apache.commons.lang3.*; import org.apache.geode.internal.security.*;
[ "java.util", "org.apache.commons", "org.apache.geode" ]
java.util; org.apache.commons; org.apache.geode;
2,442,215
void startProperty(JMeterProperty key);
void startProperty(JMeterProperty key);
/** * Notification that a property is starting. This could be a test element * property or a Map property - depends on the context. * * @param key property to be traversed */
Notification that a property is starting. This could be a test element property or a Map property - depends on the context
startProperty
{ "repo_name": "benbenw/jmeter", "path": "src/core/src/main/java/org/apache/jmeter/testelement/TestElementTraverser.java", "license": "apache-2.0", "size": 1922 }
[ "org.apache.jmeter.testelement.property.JMeterProperty" ]
import org.apache.jmeter.testelement.property.JMeterProperty;
import org.apache.jmeter.testelement.property.*;
[ "org.apache.jmeter" ]
org.apache.jmeter;
1,469,326
public static Intent sanitizeIntent(final Intent incomingIntent) { if (incomingIntent == null) return null; try { incomingIntent.getBooleanExtra("TriggerUnparcel", false); return incomingIntent; } catch (BadParcelableException e) { return logInvalidIntent(...
static Intent function(final Intent incomingIntent) { if (incomingIntent == null) return null; try { incomingIntent.getBooleanExtra(STR, false); return incomingIntent; } catch (BadParcelableException e) { return logInvalidIntent(incomingIntent, e); } catch (RuntimeException e) { if (e.getCause() instanceof ClassNotFoun...
/** * Sanitizes an intent. In case the intent cannot be unparcelled, all extras will be removed to * make it safe to use. * @return A safe to use version of this intent. */
Sanitizes an intent. In case the intent cannot be unparcelled, all extras will be removed to make it safe to use
sanitizeIntent
{ "repo_name": "chromium/chromium", "path": "base/android/java/src/org/chromium/base/IntentUtils.java", "license": "bsd-3-clause", "size": 22694 }
[ "android.content.Intent", "android.os.BadParcelableException" ]
import android.content.Intent; import android.os.BadParcelableException;
import android.content.*; import android.os.*;
[ "android.content", "android.os" ]
android.content; android.os;
2,895,132
protected boolean readAtOffset(FSDataInputStream istream, ByteBuff dest, int size, boolean peekIntoNextBlock, long fileOffset, boolean pread) throws IOException { if (!pread) { // Seek + read. Better for scanning. HFileUtil.seekOnMultipleSources(istream, fileOffset); long realO...
boolean function(FSDataInputStream istream, ByteBuff dest, int size, boolean peekIntoNextBlock, long fileOffset, boolean pread) throws IOException { if (!pread) { HFileUtil.seekOnMultipleSources(istream, fileOffset); long realOffset = istream.getPos(); if (realOffset != fileOffset) { throw new IOException(STR + fileOff...
/** * Does a positional read or a seek and read into the given byte buffer. We need take care that * we will call the {@link ByteBuff#release()} for every exit to deallocate the ByteBuffers, * otherwise the memory leak may happen. * @param dest destination buffer * @param size size of read ...
Does a positional read or a seek and read into the given byte buffer. We need take care that we will call the <code>ByteBuff#release()</code> for every exit to deallocate the ByteBuffers, otherwise the memory leak may happen
readAtOffset
{ "repo_name": "ndimiduk/hbase", "path": "hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileBlock.java", "license": "apache-2.0", "size": 87874 }
[ "java.io.IOException", "org.apache.hadoop.fs.FSDataInputStream", "org.apache.hadoop.hbase.io.util.BlockIOUtils", "org.apache.hadoop.hbase.nio.ByteBuff" ]
import java.io.IOException; import org.apache.hadoop.fs.FSDataInputStream; import org.apache.hadoop.hbase.io.util.BlockIOUtils; import org.apache.hadoop.hbase.nio.ByteBuff;
import java.io.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hbase.io.util.*; import org.apache.hadoop.hbase.nio.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
2,216,687
final void ensureChildrenContainer(NodeDataAdapter<D> dataAdapter, Tree.Css css) { if (!hasChildrenContainer()) { D data = getData(); if (dataAdapter.hasChildren(data)) { Element childrenContainer = Elements.createElement("ul", css.childrenContainer()); this.appendChild(childrenContain...
final void ensureChildrenContainer(NodeDataAdapter<D> dataAdapter, Tree.Css css) { if (!hasChildrenContainer()) { D data = getData(); if (dataAdapter.hasChildren(data)) { Element childrenContainer = Elements.createElement("ul", css.childrenContainer()); this.appendChild(childrenContainer); childrenContainer.getStyle()....
/** * If this node does not have a children container, but has children data, * then we coerce a children container into existence. */
If this node does not have a children container, but has children data, then we coerce a children container into existence
ensureChildrenContainer
{ "repo_name": "ericmckean/collide", "path": "java/com/google/collide/client/ui/tree/TreeNodeElement.java", "license": "apache-2.0", "size": 9921 }
[ "com.google.collide.client.ui.tree.Tree", "com.google.collide.client.util.Elements" ]
import com.google.collide.client.ui.tree.Tree; import com.google.collide.client.util.Elements;
import com.google.collide.client.ui.tree.*; import com.google.collide.client.util.*;
[ "com.google.collide" ]
com.google.collide;
1,669,825
public String generate(){ Set<ConstraintViolation<FormHelper>> validationResults =validator.validate(this); final Field[] fieldList= this.formObject.getClass().getDeclaredFields(); String formHTML=""; //Object fieldType; String fieldName; try { for (Field field : fieldList){ //System.out.format...
String function(){ Set<ConstraintViolation<FormHelper>> validationResults =validator.validate(this); final Field[] fieldList= this.formObject.getClass().getDeclaredFields(); String formHTML=""; String fieldName; try { for (Field field : fieldList){ field.setAccessible(true); Class<?> fieldType = field.getType(); if (fi...
/** * Generates html form as * Example output: * <input id="myid" name="myid" /> * */
Generates html form as Example output:
generate
{ "repo_name": "arvis/formhelper", "path": "src/main/java/com/viestards/formhelper/FormHelper.java", "license": "apache-2.0", "size": 2387 }
[ "java.lang.reflect.Field", "java.util.Set", "javax.validation.ConstraintViolation" ]
import java.lang.reflect.Field; import java.util.Set; import javax.validation.ConstraintViolation;
import java.lang.reflect.*; import java.util.*; import javax.validation.*;
[ "java.lang", "java.util", "javax.validation" ]
java.lang; java.util; javax.validation;
2,550,620
public Pair<MatrixObject, Boolean> getDenseMatrixOutputForGPUInstruction(String varName, long numRows, long numCols) { MatrixObject mo = allocateGPUMatrixObject(varName, numRows, numCols); boolean allocated = mo.getGPUObject(getGPUContext(0)).acquireDeviceModifyDense(); mo.getMatrixCharacteristics().setNonZero...
Pair<MatrixObject, Boolean> function(String varName, long numRows, long numCols) { MatrixObject mo = allocateGPUMatrixObject(varName, numRows, numCols); boolean allocated = mo.getGPUObject(getGPUContext(0)).acquireDeviceModifyDense(); mo.getMatrixCharacteristics().setNonZeros(-1); return new Pair<>(mo, allocated); }
/** * Allocates a dense matrix on the GPU (for output) * @param varName name of the output matrix (known by this {@link ExecutionContext}) * @param numRows number of rows of matrix object * @param numCols number of columns of matrix object * @return a pair containing the wrapping {@link MatrixObject} and a bo...
Allocates a dense matrix on the GPU (for output)
getDenseMatrixOutputForGPUInstruction
{ "repo_name": "niketanpansare/systemml", "path": "src/main/java/org/apache/sysml/runtime/controlprogram/context/ExecutionContext.java", "license": "apache-2.0", "size": 27647 }
[ "org.apache.sysml.runtime.controlprogram.caching.MatrixObject", "org.apache.sysml.runtime.matrix.data.Pair" ]
import org.apache.sysml.runtime.controlprogram.caching.MatrixObject; import org.apache.sysml.runtime.matrix.data.Pair;
import org.apache.sysml.runtime.controlprogram.caching.*; import org.apache.sysml.runtime.matrix.data.*;
[ "org.apache.sysml" ]
org.apache.sysml;
2,302,611
public ApprovalRequestParams build() throws OneTouchException { // if we have logo but the user didnt send a default this if (!currentLogos.isEmpty() && !currentLogos.containsKey(Resolution.Default)) { throw new OneTouchException(LOGO_ERROR_DEFAULT); } ...
ApprovalRequestParams function() throws OneTouchException { if (!currentLogos.isEmpty() && !currentLogos.containsKey(Resolution.Default)) { throw new OneTouchException(LOGO_ERROR_DEFAULT); } this.params.logos.addAll(currentLogos.values()); return this.params; } }
/** * Compiles and creates the provided set of parameters to have a ready to use ApprovalRequestParams object. * * @return The bean containing all the properties required to send a valid OneTouch request to Authy. * @throws OneTouchException If any of the params doesn't match the req...
Compiles and creates the provided set of parameters to have a ready to use ApprovalRequestParams object
build
{ "repo_name": "authy/authy-java", "path": "src/main/java/com/authy/api/ApprovalRequestParams.java", "license": "mit", "size": 8630 }
[ "com.authy.OneTouchException" ]
import com.authy.OneTouchException;
import com.authy.*;
[ "com.authy" ]
com.authy;
1,791,658
void addListRecordSets(String zoneName, Callback<ResourceRecordSetsListResponse> callback, Map<DnsRpc.Option, ?> options);
void addListRecordSets(String zoneName, Callback<ResourceRecordSetsListResponse> callback, Map<DnsRpc.Option, ?> options);
/** * Adds a call to "list record sets" to the batch with the provided {@code callback} and {@code * options}. The zone whose record sets are to be listed is identified by {@code zoneName}. */
Adds a call to "list record sets" to the batch with the provided callback and options. The zone whose record sets are to be listed is identified by zoneName
addListRecordSets
{ "repo_name": "shinfan/gcloud-java", "path": "google-cloud-dns/src/main/java/com/google/cloud/dns/spi/v1/RpcBatch.java", "license": "apache-2.0", "size": 4326 }
[ "com.google.api.services.dns.model.ResourceRecordSetsListResponse", "java.util.Map" ]
import com.google.api.services.dns.model.ResourceRecordSetsListResponse; import java.util.Map;
import com.google.api.services.dns.model.*; import java.util.*;
[ "com.google.api", "java.util" ]
com.google.api; java.util;
1,076,147
public void testBuildSortFieldOrder() throws IOException { QueryShardContext shardContextMock = createMockShardContext(); GeoDistanceSortBuilder geoDistanceSortBuilder = new GeoDistanceSortBuilder("fieldName", 1.0, 1.0); assertEquals(false, geoDistanceSortBuilder.build(shardContextMock).fiel...
void function() throws IOException { QueryShardContext shardContextMock = createMockShardContext(); GeoDistanceSortBuilder geoDistanceSortBuilder = new GeoDistanceSortBuilder(STR, 1.0, 1.0); assertEquals(false, geoDistanceSortBuilder.build(shardContextMock).field.getReverse()); geoDistanceSortBuilder.order(SortOrder.AS...
/** * Test that the sort builder order gets transferred correctly to the SortField */
Test that the sort builder order gets transferred correctly to the SortField
testBuildSortFieldOrder
{ "repo_name": "gfyoung/elasticsearch", "path": "server/src/test/java/org/elasticsearch/search/sort/GeoDistanceSortBuilderTests.java", "license": "apache-2.0", "size": 30212 }
[ "java.io.IOException", "org.elasticsearch.index.query.QueryShardContext" ]
import java.io.IOException; import org.elasticsearch.index.query.QueryShardContext;
import java.io.*; import org.elasticsearch.index.query.*;
[ "java.io", "org.elasticsearch.index" ]
java.io; org.elasticsearch.index;
1,928,375
public void db_updateRemoveZettelPosElements() { String ATTRIBUTE_NEXT_ZETTEL = "nextzettel"; String ATTRIBUTE_PREV_ZETTEL = "prevzettel"; String ATTRIBUTE_FIRST_ZETTEL = "firstzettel"; String ATTRIBUTE_LAST_ZETTEL = "lastzettel"; // iterate all elements for (int cnt ...
void function() { String ATTRIBUTE_NEXT_ZETTEL = STR; String ATTRIBUTE_PREV_ZETTEL = STR; String ATTRIBUTE_FIRST_ZETTEL = STR; String ATTRIBUTE_LAST_ZETTEL = STR; for (int cnt = 1; cnt <= getCount(ZKNCOUNT); cnt++) { Element zettel = retrieveZettel(cnt); if (zettel != null) { if (zettel.getAttribute(ATTRIBUTE_NEXT_ZETT...
/** * This method updates the inline-code-format-tags in the data base. */
This method updates the inline-code-format-tags in the data base
db_updateRemoveZettelPosElements
{ "repo_name": "sjPlot/Zettelkasten", "path": "src/main/java/de/danielluedecke/zettelkasten/database/Daten.java", "license": "gpl-3.0", "size": 336724 }
[ "org.jdom2.Element" ]
import org.jdom2.Element;
import org.jdom2.*;
[ "org.jdom2" ]
org.jdom2;
181,420
public void saveConfig() { File cf = new File(CONFIG_FILE); try { saveConfigXML().save(cf); } catch (IOException ex) { Exceptions.add(ex); } }
void function() { File cf = new File(CONFIG_FILE); try { saveConfigXML().save(cf); } catch (IOException ex) { Exceptions.add(ex); } }
/** * Save the current configuration. */
Save the current configuration
saveConfig
{ "repo_name": "p-smith/open-ig", "path": "src/hu/openig/editors/ce/CampaignEditor.java", "license": "lgpl-3.0", "size": 24583 }
[ "hu.openig.utils.Exceptions", "java.io.File", "java.io.IOException" ]
import hu.openig.utils.Exceptions; import java.io.File; import java.io.IOException;
import hu.openig.utils.*; import java.io.*;
[ "hu.openig.utils", "java.io" ]
hu.openig.utils; java.io;
2,228,558
// tag POS and phrase chunks String[] tokens = OpenNLP.tokenize(qn); String[] pos = OpenNLP.tagPos(tokens); String[] chunks = OpenNLP.tagChunks(tokens, pos); // check if there is a verb other than 'to be', 'to do' or 'to have' which is not on the ignore list for (int i = 0; i < tokens.length; i++) if ...
String[] tokens = OpenNLP.tokenize(qn); String[] pos = OpenNLP.tagPos(tokens); String[] chunks = OpenNLP.tagChunks(tokens, pos); for (int i = 0; i < tokens.length; i++) if ((pos[i].startsWith("VB") chunks[i].endsWith("-VP")) && !(tokens[i].matches(BE_P) tokens[i].matches(DO_P) tokens[i].matches(HAVE_P) tokens[i].matche...
/** * Checks if the question contains a predicate that can be labeled. * * @param qn normalized question string * @return <code>true</code> iff the question contains a predicate */
Checks if the question contains a predicate that can be labeled
containsPredicate
{ "repo_name": "bogdartysh/openqa", "path": "src/main/java/info/ephyra/questionanalysis/PredicateExtractor.java", "license": "gpl-3.0", "size": 14883 }
[ "info.ephyra.nlp.OpenNLP" ]
import info.ephyra.nlp.OpenNLP;
import info.ephyra.nlp.*;
[ "info.ephyra.nlp" ]
info.ephyra.nlp;
1,079,082
public static BLOB createEnvelopedBES_T(BLOB keystore, String keystoreType, String keystorePassword, String privateKeyPassword, BLOB document, String name, String description, String mimeType, String tsaUrl, String tsaUserName, String tsaPassword) { InputStream isKeyStore = null; InputStream isDocument = null; ...
static BLOB function(BLOB keystore, String keystoreType, String keystorePassword, String privateKeyPassword, BLOB document, String name, String description, String mimeType, String tsaUrl, String tsaUserName, String tsaPassword) { InputStream isKeyStore = null; InputStream isDocument = null; BLOB blobSignature = null; ...
/** * Create a XAdES-T BES Enveloped Signature. * @param keystore Keystore with certificate for the signature. * @param keystoreType The keystore's type. (Only support JKS and PKCS12 types). * @param keystorePassword Password of keystore. * @param privateKeyPassword The private key password. * @param docume...
Create a XAdES-T BES Enveloped Signature
createEnvelopedBES_T
{ "repo_name": "gialnet/eDocPKI", "path": "src/es/redmoon/pl/dsig/XAdES.java", "license": "gpl-2.0", "size": 9907 }
[ "es.redmoon.utils.XML", "java.io.InputStream", "java.util.logging.Level", "java.util.logging.Logger", "org.w3c.dom.Document" ]
import es.redmoon.utils.XML; import java.io.InputStream; import java.util.logging.Level; import java.util.logging.Logger; import org.w3c.dom.Document;
import es.redmoon.utils.*; import java.io.*; import java.util.logging.*; import org.w3c.dom.*;
[ "es.redmoon.utils", "java.io", "java.util", "org.w3c.dom" ]
es.redmoon.utils; java.io; java.util; org.w3c.dom;
1,102,813
VersionedFlowSnapshot getVersionedFlowSnapshotByGroupId(String processGroupId);
VersionedFlowSnapshot getVersionedFlowSnapshotByGroupId(String processGroupId);
/** * Get the latest Versioned Flow Snapshot from the registry for the Process Group with the given ID * * @param processGroupId the ID of the Process Group * @return the latest Versioned Flow Snapshot for download * * @throws ResourceNotFoundException if the Versioned Flow Snapshot could ...
Get the latest Versioned Flow Snapshot from the registry for the Process Group with the given ID
getVersionedFlowSnapshotByGroupId
{ "repo_name": "mans2singh/nifi", "path": "nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/NiFiServiceFacade.java", "license": "apache-2.0", "size": 84641 }
[ "org.apache.nifi.registry.flow.VersionedFlowSnapshot" ]
import org.apache.nifi.registry.flow.VersionedFlowSnapshot;
import org.apache.nifi.registry.flow.*;
[ "org.apache.nifi" ]
org.apache.nifi;
1,377,140
public S get(K key, N namespace) { int keyGroup = KeyGroupRangeAssignment.assignToKeyGroup(key, keyContext.getNumberOfKeyGroups()); return get(key, keyGroup, namespace); }
S function(K key, N namespace) { int keyGroup = KeyGroupRangeAssignment.assignToKeyGroup(key, keyContext.getNumberOfKeyGroups()); return get(key, keyGroup, namespace); }
/** * Returns the state for the composite of active key and given namespace. This is typically used * by queryable state. * * @param key the key. Not null. * @param namespace the namespace. Not null. * @return the state of the mapping with the specified key/namespace composite key, or {@co...
Returns the state for the composite of active key and given namespace. This is typically used by queryable state
get
{ "repo_name": "kl0u/flink", "path": "flink-runtime/src/main/java/org/apache/flink/runtime/state/heap/StateTable.java", "license": "apache-2.0", "size": 17045 }
[ "org.apache.flink.runtime.state.KeyGroupRangeAssignment" ]
import org.apache.flink.runtime.state.KeyGroupRangeAssignment;
import org.apache.flink.runtime.state.*;
[ "org.apache.flink" ]
org.apache.flink;
2,448,791
public org.jbundle.thin.base.db.FieldList makeFieldList(String strFieldsToInclude) throws RemoteException { return m_tableRemote.makeFieldList(strFieldsToInclude); }
org.jbundle.thin.base.db.FieldList function(String strFieldsToInclude) throws RemoteException { return m_tableRemote.makeFieldList(strFieldsToInclude); }
/** * make a thin FieldList for this table. * Usually used for special queries that don't have a field list available. */
make a thin FieldList for this table. Usually used for special queries that don't have a field list available
makeFieldList
{ "repo_name": "jbundle/jbundle", "path": "thin/base/db/misc/src/main/java/org/jbundle/thin/base/db/client/CachedRemoteTable.java", "license": "gpl-3.0", "size": 32968 }
[ "org.jbundle.model.RemoteException", "org.jbundle.thin.base.db.FieldList" ]
import org.jbundle.model.RemoteException; import org.jbundle.thin.base.db.FieldList;
import org.jbundle.model.*; import org.jbundle.thin.base.db.*;
[ "org.jbundle.model", "org.jbundle.thin" ]
org.jbundle.model; org.jbundle.thin;
270,421
public List<User> getConnectedUsersForUserInsecurely(final String userUuid);
List<User> function(final String userUuid);
/** * Gets a list of Persons that are connected to this user. Current user, prefs * and privacy are skipped. * * @param userUuid uuid of the user to retrieve the list of connections for * @return */
Gets a list of Persons that are connected to this user. Current user, prefs and privacy are skipped
getConnectedUsersForUserInsecurely
{ "repo_name": "OpenCollabZA/sakai", "path": "profile2/api/src/java/org/sakaiproject/profile2/logic/ProfileConnectionsLogic.java", "license": "apache-2.0", "size": 6831 }
[ "java.util.List", "org.sakaiproject.user.api.User" ]
import java.util.List; import org.sakaiproject.user.api.User;
import java.util.*; import org.sakaiproject.user.api.*;
[ "java.util", "org.sakaiproject.user" ]
java.util; org.sakaiproject.user;
524,572
public Object deepCopy(Object value) throws HibernateException { return value; }
Object function(Object value) throws HibernateException { return value; }
/** * This implementation returns the passed-in value as-is. */
This implementation returns the passed-in value as-is
deepCopy
{ "repo_name": "kingtang/spring-learn", "path": "spring-orm/src/main/java/org/springframework/orm/hibernate3/support/AbstractLobType.java", "license": "gpl-3.0", "size": 7157 }
[ "org.hibernate.HibernateException" ]
import org.hibernate.HibernateException;
import org.hibernate.*;
[ "org.hibernate" ]
org.hibernate;
1,534,846
// p4ic4idea: IServerMessage public static List<IServerMessage> getErrorsFromFileSpecList(final List<IFileSpec> fileSpecs) { return getMessagesFromFileSpecList(FileSpecOpStatus.ERROR, fileSpecs); }
static List<IServerMessage> function(final List<IFileSpec> fileSpecs) { return getMessagesFromFileSpecList(FileSpecOpStatus.ERROR, fileSpecs); }
/** * Scan a list of filespecs for errors and return them in a list. * * @param fileSpecs - the output of a p4java client command * @return errorMessages - a, possibly empty, list of messages */
Scan a list of filespecs for errors and return them in a list
getErrorsFromFileSpecList
{ "repo_name": "groboclown/p4ic4idea", "path": "p4java/src/test/java/com/perforce/p4java/tests/dev/unit/P4JavaTestCase.java", "license": "apache-2.0", "size": 107234 }
[ "com.perforce.p4java.core.file.FileSpecOpStatus", "com.perforce.p4java.core.file.IFileSpec", "com.perforce.p4java.server.IServerMessage", "java.util.List" ]
import com.perforce.p4java.core.file.FileSpecOpStatus; import com.perforce.p4java.core.file.IFileSpec; import com.perforce.p4java.server.IServerMessage; import java.util.List;
import com.perforce.p4java.core.file.*; import com.perforce.p4java.server.*; import java.util.*;
[ "com.perforce.p4java", "java.util" ]
com.perforce.p4java; java.util;
2,113,674
@Test public void pcepUpdateMsgTest19() throws PcepParseException, PcepOutOfBoundMessageException { byte[] updateMsg = new byte[] {0x20, 0x0b, 0x00, (byte) 0x58, 0x21, 0x10, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, //SRP object 0x20, 0x10, 0x00, 0x1C, ...
void function() throws PcepParseException, PcepOutOfBoundMessageException { byte[] updateMsg = new byte[] {0x20, 0x0b, 0x00, (byte) 0x58, 0x21, 0x10, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x20, 0x10, 0x00, 0x1C, 0x00, 0x00, 0x10, 0x03, 0x00, 0x12, 0x00, 0x10, (byte) 0xb6, 0x02, 0x4e, 0x1f, 0x00, 0...
/** * This test case checks for SRP, LSP (StatefulIPv4LspIdentidiersTlv), * ERO (IPv4SubObject, IPv4SubObject),Metric-list objects in PcUpd message. */
This test case checks for SRP, LSP (StatefulIPv4LspIdentidiersTlv), ERO (IPv4SubObject, IPv4SubObject),Metric-list objects in PcUpd message
pcepUpdateMsgTest19
{ "repo_name": "kuujo/onos", "path": "protocols/pcep/pcepio/src/test/java/org/onosproject/pcepio/protocol/PcepUpdateMsgTest.java", "license": "apache-2.0", "size": 66899 }
[ "org.hamcrest.MatcherAssert", "org.hamcrest.Matchers", "org.hamcrest.core.Is", "org.jboss.netty.buffer.ChannelBuffer", "org.jboss.netty.buffer.ChannelBuffers", "org.onosproject.pcepio.exceptions.PcepOutOfBoundMessageException", "org.onosproject.pcepio.exceptions.PcepParseException" ]
import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; import org.hamcrest.core.Is; import org.jboss.netty.buffer.ChannelBuffer; import org.jboss.netty.buffer.ChannelBuffers; import org.onosproject.pcepio.exceptions.PcepOutOfBoundMessageException; import org.onosproject.pcepio.exceptions.PcepParseException;
import org.hamcrest.*; import org.hamcrest.core.*; import org.jboss.netty.buffer.*; import org.onosproject.pcepio.exceptions.*;
[ "org.hamcrest", "org.hamcrest.core", "org.jboss.netty", "org.onosproject.pcepio" ]
org.hamcrest; org.hamcrest.core; org.jboss.netty; org.onosproject.pcepio;
2,804,872
List<User> getUsersByAttributeValue(PerunSession sess, String attributeName, String attributeValue) throws PrivilegeException, AttributeNotExistsException;
List<User> getUsersByAttributeValue(PerunSession sess, String attributeName, String attributeValue) throws PrivilegeException, AttributeNotExistsException;
/** * Returns all users who have the attribute with the value. attributeValue is not converted to the attribute type, it is always type of String. * * @param sess * @param attributeName * @param attributeValue * @return list of users * @throws InternalErrorException * @throws PrivilegeException * @thr...
Returns all users who have the attribute with the value. attributeValue is not converted to the attribute type, it is always type of String
getUsersByAttributeValue
{ "repo_name": "balcirakpeter/perun", "path": "perun-core/src/main/java/cz/metacentrum/perun/core/api/UsersManager.java", "license": "bsd-2-clause", "size": 50685 }
[ "cz.metacentrum.perun.core.api.exceptions.AttributeNotExistsException", "cz.metacentrum.perun.core.api.exceptions.PrivilegeException", "java.util.List" ]
import cz.metacentrum.perun.core.api.exceptions.AttributeNotExistsException; import cz.metacentrum.perun.core.api.exceptions.PrivilegeException; import java.util.List;
import cz.metacentrum.perun.core.api.exceptions.*; import java.util.*;
[ "cz.metacentrum.perun", "java.util" ]
cz.metacentrum.perun; java.util;
257,878
private static void fireMissingEvent() { if (delayCheckSignaled) { // already going... return; } ScheduledEventService scheduler = CHFWBundle.getScheduleService(); if (null != scheduler) { delayCheckSignaled = true; ChannelFrameworkImpl...
static void function() { if (delayCheckSignaled) { return; } ScheduledEventService scheduler = CHFWBundle.getScheduleService(); if (null != scheduler) { delayCheckSignaled = true; ChannelFrameworkImpl cf = (ChannelFrameworkImpl) ChannelFrameworkFactory.getChannelFramework(); scheduler.schedule(CHFWEventHandler.EVENT_CH...
/** * Fire the missing config delayed event. */
Fire the missing config delayed event
fireMissingEvent
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.channelfw/src/com/ibm/websphere/channelfw/ChannelUtils.java", "license": "epl-1.0", "size": 56856 }
[ "com.ibm.websphere.channelfw.osgi.CHFWBundle", "com.ibm.websphere.event.ScheduledEventService", "com.ibm.ws.channelfw.internal.CHFWEventHandler", "com.ibm.ws.channelfw.internal.ChannelFrameworkImpl", "com.ibm.wsspi.channelfw.ChannelFrameworkFactory", "java.util.concurrent.TimeUnit" ]
import com.ibm.websphere.channelfw.osgi.CHFWBundle; import com.ibm.websphere.event.ScheduledEventService; import com.ibm.ws.channelfw.internal.CHFWEventHandler; import com.ibm.ws.channelfw.internal.ChannelFrameworkImpl; import com.ibm.wsspi.channelfw.ChannelFrameworkFactory; import java.util.concurrent.TimeUnit;
import com.ibm.websphere.channelfw.osgi.*; import com.ibm.websphere.event.*; import com.ibm.ws.channelfw.internal.*; import com.ibm.wsspi.channelfw.*; import java.util.concurrent.*;
[ "com.ibm.websphere", "com.ibm.ws", "com.ibm.wsspi", "java.util" ]
com.ibm.websphere; com.ibm.ws; com.ibm.wsspi; java.util;
1,579,365