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
public void testUriBulkNullUids() { final URI uri = DataSecuritySourceUris.uriBulk(_baseUri, null); assertEquals(uri.getPath(), "path/to/securitySearches/bulk"); assertNull(uri.getQuery()); }
void function() { final URI uri = DataSecuritySourceUris.uriBulk(_baseUri, null); assertEquals(uri.getPath(), STR); assertNull(uri.getQuery()); }
/** * Tests the URI when the unique ids are null. */
Tests the URI when the unique ids are null
testUriBulkNullUids
{ "repo_name": "McLeodMoores/starling", "path": "projects/core-rest-client/src/test/java/com/opengamma/core/security/impl/DataSecuritySourceUrisTest.java", "license": "apache-2.0", "size": 7905 }
[ "org.testng.Assert" ]
import org.testng.Assert;
import org.testng.*;
[ "org.testng" ]
org.testng;
221,360
private void startImageStorageController() { Intent imageStorageService = new Intent(context, ImageStorageController.class); context.startService(imageStorageService); }
void function() { Intent imageStorageService = new Intent(context, ImageStorageController.class); context.startService(imageStorageService); }
/** * Starts the service that listens all changes in image storage. */
Starts the service that listens all changes in image storage
startImageStorageController
{ "repo_name": "vityokkv73/android_retrieval_system", "path": "src/net/deerhunter/ars/broadcast_receivers/BootReceiver.java", "license": "gpl-3.0", "size": 6201 }
[ "android.content.Intent", "net.deerhunter.ars.services.ImageStorageController" ]
import android.content.Intent; import net.deerhunter.ars.services.ImageStorageController;
import android.content.*; import net.deerhunter.ars.services.*;
[ "android.content", "net.deerhunter.ars" ]
android.content; net.deerhunter.ars;
2,453,031
public static X509Name getSubjectX509Name(Certificate cert) throws CertificateEncodingException, IOException { ASN1InputStream ais = new ASN1InputStream(cert.getEncoded()); X509CertificateStructure x509Struct = new X509CertificateStructure((ASN1Sequence)ais.readObject()); ais.close(); ...
static X509Name function(Certificate cert) throws CertificateEncodingException, IOException { ASN1InputStream ais = new ASN1InputStream(cert.getEncoded()); X509CertificateStructure x509Struct = new X509CertificateStructure((ASN1Sequence)ais.readObject()); ais.close(); return x509Struct.getSubject(); }
/** * This method returns a X509Name object corresponding to the subject in a given certificate * @param cert Certificate from which subject needs to be retrieved */
This method returns a X509Name object corresponding to the subject in a given certificate
getSubjectX509Name
{ "repo_name": "apache/geronimo", "path": "framework/modules/geronimo-crypto/src/main/java/org/apache/geronimo/crypto/CaUtils.java", "license": "apache-2.0", "size": 12776 }
[ "java.io.IOException", "java.security.cert.Certificate", "java.security.cert.CertificateEncodingException", "org.apache.geronimo.crypto.asn1.ASN1InputStream", "org.apache.geronimo.crypto.asn1.ASN1Sequence", "org.apache.geronimo.crypto.asn1.x509.X509CertificateStructure", "org.apache.geronimo.crypto.asn1...
import java.io.IOException; import java.security.cert.Certificate; import java.security.cert.CertificateEncodingException; import org.apache.geronimo.crypto.asn1.ASN1InputStream; import org.apache.geronimo.crypto.asn1.ASN1Sequence; import org.apache.geronimo.crypto.asn1.x509.X509CertificateStructure; import org.apache....
import java.io.*; import java.security.cert.*; import org.apache.geronimo.crypto.asn1.*; import org.apache.geronimo.crypto.asn1.x509.*;
[ "java.io", "java.security", "org.apache.geronimo" ]
java.io; java.security; org.apache.geronimo;
970,896
public List<String> getButtonBarShownItems() { if (m_buttonBar == null) { // first get individual button bar configuration List<String> buttonBar = getButtonBarOption(); if (buttonBar.isEmpty()) { // no specific button bar defined, try to get global confi...
List<String> function() { if (m_buttonBar == null) { List<String> buttonBar = getButtonBarOption(); if (buttonBar.isEmpty()) { if (m_globalButtonBarOption == null) { String defaultConf = OpenCms.getXmlContentTypeManager().getWidgetDefaultConfiguration( CmsHtmlWidget.class.getName()); if (CmsStringUtil.isNotEmptyOrWhite...
/** * Returns the calculated button bar items, including blocks and separators, considering the current widget configuration.<p> * * Use this method to get the calculated list of button bar items if {@link #getButtonBar(Map, String)} can not * be used for a specific editor widget.<p> * * @...
Returns the calculated button bar items, including blocks and separators, considering the current widget configuration. Use this method to get the calculated list of button bar items if <code>#getButtonBar(Map, String)</code> can not be used for a specific editor widget
getButtonBarShownItems
{ "repo_name": "alkacon/opencms-core", "path": "src/org/opencms/widgets/CmsHtmlWidgetOption.java", "license": "lgpl-2.1", "size": 47359 }
[ "java.util.ArrayList", "java.util.Collections", "java.util.Iterator", "java.util.List", "org.opencms.main.OpenCms", "org.opencms.util.CmsStringUtil", "org.opencms.workplace.galleries.CmsAjaxImageGallery" ]
import java.util.ArrayList; import java.util.Collections; import java.util.Iterator; import java.util.List; import org.opencms.main.OpenCms; import org.opencms.util.CmsStringUtil; import org.opencms.workplace.galleries.CmsAjaxImageGallery;
import java.util.*; import org.opencms.main.*; import org.opencms.util.*; import org.opencms.workplace.galleries.*;
[ "java.util", "org.opencms.main", "org.opencms.util", "org.opencms.workplace" ]
java.util; org.opencms.main; org.opencms.util; org.opencms.workplace;
1,597,499
public Tuple<DocumentMapper, Mapping> documentMapperWithAutoCreate(String type) { DocumentMapper mapper = mappers.get(type); if (mapper != null) { return Tuple.tuple(mapper, null); } if (!dynamic) { throw new TypeMissingException(index, type, "trying to auto c...
Tuple<DocumentMapper, Mapping> function(String type) { DocumentMapper mapper = mappers.get(type); if (mapper != null) { return Tuple.tuple(mapper, null); } if (!dynamic) { throw new TypeMissingException(index, type, STR); } mapper = parse(type, null, true); return Tuple.tuple(mapper, mapper.mapping()); }
/** * Returns the document mapper created, including a mapping update if the * type has been dynamically created. */
Returns the document mapper created, including a mapping update if the type has been dynamically created
documentMapperWithAutoCreate
{ "repo_name": "hechunwen/elasticsearch", "path": "core/src/main/java/org/elasticsearch/index/mapper/MapperService.java", "license": "apache-2.0", "size": 28448 }
[ "org.elasticsearch.common.collect.Tuple", "org.elasticsearch.indices.TypeMissingException" ]
import org.elasticsearch.common.collect.Tuple; import org.elasticsearch.indices.TypeMissingException;
import org.elasticsearch.common.collect.*; import org.elasticsearch.indices.*;
[ "org.elasticsearch.common", "org.elasticsearch.indices" ]
org.elasticsearch.common; org.elasticsearch.indices;
844,251
public static ArrayList<Symlink> getSymlinks(String path) throws Exception { return getInternals().getSymlinks(path); }
static ArrayList<Symlink> function(String path) throws Exception { return getInternals().getSymlinks(path); }
/** * This will return an ArrayList of the class Symlink. The class Symlink contains the following * property's: path SymplinkPath * <p/> * These will provide you with any Symlinks in the given path. * * @param path path to search for Symlinks. * @return <code>ArrayList<Symlink></code...
This will return an ArrayList of the class Symlink. The class Symlink contains the following property's: path SymplinkPath These will provide you with any Symlinks in the given path
getSymlinks
{ "repo_name": "xakep666/android_app_efidroidmanager", "path": "sub_projects/RootTools/src/main/java/com/stericson/roottools/RootTools.java", "license": "apache-2.0", "size": 33749 }
[ "com.stericson.roottools.containers.Symlink", "java.util.ArrayList" ]
import com.stericson.roottools.containers.Symlink; import java.util.ArrayList;
import com.stericson.roottools.containers.*; import java.util.*;
[ "com.stericson.roottools", "java.util" ]
com.stericson.roottools; java.util;
2,467,432
public void setConstructorAccessor(Constructor c, ConstructorAccessor accessor) { langReflectAccess().setConstructorAccessor(c, accessor); }
void function(Constructor c, ConstructorAccessor accessor) { langReflectAccess().setConstructorAccessor(c, accessor); }
/** Sets the ConstructorAccessor object for a java.lang.reflect.Constructor */
Sets the ConstructorAccessor object for a
setConstructorAccessor
{ "repo_name": "tranleduy2000/javaide", "path": "jdk-1_7/src/main/java/sun/reflect/ReflectionFactory.java", "license": "gpl-3.0", "size": 17971 }
[ "java.lang.reflect.Constructor" ]
import java.lang.reflect.Constructor;
import java.lang.reflect.*;
[ "java.lang" ]
java.lang;
2,643,502
public Map<String, Object> toMap() { return new HashMap<String, Object>(this.headers); } // Generic header accessors
Map<String, Object> function() { return new HashMap<String, Object>(this.headers); }
/** * Return a copy of the underlying header values as a plain {@link Map} object. * <p>This method can be invoked many times, with modifications in between * where each new call returns a fresh copy of the current header values. */
Return a copy of the underlying header values as a plain <code>Map</code> object. This method can be invoked many times, with modifications in between where each new call returns a fresh copy of the current header values
toMap
{ "repo_name": "qobel/esoguproject", "path": "spring-framework/spring-messaging/src/main/java/org/springframework/messaging/support/MessageHeaderAccessor.java", "license": "apache-2.0", "size": 21465 }
[ "java.util.HashMap", "java.util.Map" ]
import java.util.HashMap; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
122,240
public FallbackRouteProperties withEndpointNames(List<String> endpointNames) { this.endpointNames = endpointNames; return this; }
FallbackRouteProperties function(List<String> endpointNames) { this.endpointNames = endpointNames; return this; }
/** * Set the endpointNames value. * * @param endpointNames the endpointNames value to set * @return the FallbackRouteProperties object itself. */
Set the endpointNames value
withEndpointNames
{ "repo_name": "hovsepm/azure-sdk-for-java", "path": "iothub/resource-manager/v2018_04_01/src/main/java/com/microsoft/azure/management/iothub/v2018_04_01/FallbackRouteProperties.java", "license": "mit", "size": 4183 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
914,732
int updateByPrimaryKeySelective(WardGroup record);
int updateByPrimaryKeySelective(WardGroup record);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table ward_group * * @mbggenerated Tue Jun 16 02:58:03 ICT 2015 */
This method was generated by MyBatis Generator. This method corresponds to the database table ward_group
updateByPrimaryKeySelective
{ "repo_name": "punyararj/his-interface-core", "path": "Server/src/com/healthcare/db/client/WardGroupMapper.java", "license": "gpl-3.0", "size": 3102 }
[ "com.healthcare.db.model.WardGroup" ]
import com.healthcare.db.model.WardGroup;
import com.healthcare.db.model.*;
[ "com.healthcare.db" ]
com.healthcare.db;
976,638
public ScheduleWrapper getScheduleById(String id, SimpleRESTContext securityContext) { ScheduleWrapper retVal; MultivaluedMap<String, String> queryParams = null; this.setFilterFromContext(securityContext); retVal = this.performScheduleGet(RestClientUtils.encodeUrl(SCHEDULE_BY_ID, i...
ScheduleWrapper function(String id, SimpleRESTContext securityContext) { ScheduleWrapper retVal; MultivaluedMap<String, String> queryParams = null; this.setFilterFromContext(securityContext); retVal = this.performScheduleGet(RestClientUtils.encodeUrl(SCHEDULE_BY_ID, id), queryParams); return retVal; }
/** * Get schedule by id. * * @param id the id of the schedule. * @param securityContext security context * * @return ScheduleWrapper */
Get schedule by id
getScheduleById
{ "repo_name": "kit-data-manager/base", "path": "RestInterfaces/SchedulerRestInterface/src/main/java/edu/kit/dama/rest/scheduler/service/client/impl/SchedulerRestClient.java", "license": "apache-2.0", "size": 25096 }
[ "edu.kit.dama.rest.SimpleRESTContext", "edu.kit.dama.rest.scheduler.types.ScheduleWrapper", "edu.kit.dama.rest.util.RestClientUtils", "javax.ws.rs.core.MultivaluedMap" ]
import edu.kit.dama.rest.SimpleRESTContext; import edu.kit.dama.rest.scheduler.types.ScheduleWrapper; import edu.kit.dama.rest.util.RestClientUtils; import javax.ws.rs.core.MultivaluedMap;
import edu.kit.dama.rest.*; import edu.kit.dama.rest.scheduler.types.*; import edu.kit.dama.rest.util.*; import javax.ws.rs.core.*;
[ "edu.kit.dama", "javax.ws" ]
edu.kit.dama; javax.ws;
692,211
BigInteger tmp; for (int i = 0; i < Network.size(); ++i) { tmp = urg.generate(); ((MSPastryProtocol)(Network.get(i).getProtocol(protocolID))).setNodeId(tmp); } return false; } //_______________________________________________________________________________...
BigInteger tmp; for (int i = 0; i < Network.size(); ++i) { tmp = urg.generate(); ((MSPastryProtocol)(Network.get(i).getProtocol(protocolID))).setNodeId(tmp); } return false; }
/** * Scan over the nodes in the network and assign a randomly generated NodeId in the space * 0..2^BITS, where BITS is a parameter from the pastry protocol (usually 128) * @return boolean always false */
Scan over the nodes in the network and assign a randomly generated NodeId in the space 0..2^BITS, where BITS is a parameter from the pastry protocol (usually 128)
execute
{ "repo_name": "vizpub/vizpub", "path": "src/main/java/no/uio/ifi/vizpub/peersim/pastry/CustomDistribution.java", "license": "mit", "size": 2055 }
[ "java.math.BigInteger" ]
import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
1,789,651
protected static void initialize() { Log.printLine("Initialising..."); entities = new ArrayList<SimEntity>(); entitiesByName = new LinkedHashMap<String, SimEntity>(); future = new FutureQueue(); deferred = new DeferredQueue(); waitPredicates = new HashMap<Integer, Predicate>(); clock = 0; running = f...
static void function() { Log.printLine(STR); entities = new ArrayList<SimEntity>(); entitiesByName = new LinkedHashMap<String, SimEntity>(); future = new FutureQueue(); deferred = new DeferredQueue(); waitPredicates = new HashMap<Integer, Predicate>(); clock = 0; running = false; } public final static PredicateAny SIM_...
/** * Initialise the simulation for stand alone simulations. This function should be called at the * start of the simulation. */
Initialise the simulation for stand alone simulations. This function should be called at the start of the simulation
initialize
{ "repo_name": "mithilarun/Swift-OpenSim", "path": "src/org/cloudbus/cloudsim/core/CloudSim.java", "license": "lgpl-3.0", "size": 23887 }
[ "java.util.ArrayList", "java.util.HashMap", "java.util.LinkedHashMap", "org.cloudbus.cloudsim.Log", "org.cloudbus.cloudsim.core.predicates.Predicate", "org.cloudbus.cloudsim.core.predicates.PredicateAny", "org.cloudbus.cloudsim.core.predicates.PredicateNone" ]
import java.util.ArrayList; import java.util.HashMap; import java.util.LinkedHashMap; import org.cloudbus.cloudsim.Log; import org.cloudbus.cloudsim.core.predicates.Predicate; import org.cloudbus.cloudsim.core.predicates.PredicateAny; import org.cloudbus.cloudsim.core.predicates.PredicateNone;
import java.util.*; import org.cloudbus.cloudsim.*; import org.cloudbus.cloudsim.core.predicates.*;
[ "java.util", "org.cloudbus.cloudsim" ]
java.util; org.cloudbus.cloudsim;
28,536
public void setTaskId(TaskId taskId) { this.taskId = taskId; }
void function(TaskId taskId) { this.taskId = taskId; }
/** * To set the taskId * * @param taskId The taskId to be set. * */
To set the taskId
setTaskId
{ "repo_name": "marcocast/scheduling", "path": "scheduler/scheduler-client/src/main/java/org/ow2/proactive/scheduler/task/TaskInfoImpl.java", "license": "agpl-3.0", "size": 11025 }
[ "org.ow2.proactive.scheduler.common.task.TaskId" ]
import org.ow2.proactive.scheduler.common.task.TaskId;
import org.ow2.proactive.scheduler.common.task.*;
[ "org.ow2.proactive" ]
org.ow2.proactive;
1,088,644
protected void updateTemporalBoundingBoxes() throws OwsExceptionReport { DateTime minPhenomenonTime = null; DateTime maxPhenomenonTime = null; DateTime resultTime = null; if (o.getPhenomenonTime() != null) { if (o.getPhenomenonTime() instanceof TimeInstant) { ...
void function() throws OwsExceptionReport { DateTime minPhenomenonTime = null; DateTime maxPhenomenonTime = null; DateTime resultTime = null; if (o.getPhenomenonTime() != null) { if (o.getPhenomenonTime() instanceof TimeInstant) { minPhenomenonTime = maxPhenomenonTime = ((TimeInstant) o.getPhenomenonTime()).getValue();...
/** * Update the global and offering specific temporal bounding boxes. The * updates are conditional: the database is only queried if the observation * bounding boxes touch the cached bounding boxes. * * @throws CodedException */
Update the global and offering specific temporal bounding boxes. The updates are conditional: the database is only queried if the observation bounding boxes touch the cached bounding boxes
updateTemporalBoundingBoxes
{ "repo_name": "ahuarte47/SOS", "path": "extensions/do/core/src/main/java/org/n52/sos/ext/deleteobservation/DeleteObservationCacheFeederDAO.java", "license": "gpl-2.0", "size": 16384 }
[ "org.joda.time.DateTime", "org.n52.sos.ogc.gml.time.TimeInstant", "org.n52.sos.ogc.gml.time.TimePeriod", "org.n52.sos.ogc.ows.OwsExceptionReport" ]
import org.joda.time.DateTime; import org.n52.sos.ogc.gml.time.TimeInstant; import org.n52.sos.ogc.gml.time.TimePeriod; import org.n52.sos.ogc.ows.OwsExceptionReport;
import org.joda.time.*; import org.n52.sos.ogc.gml.time.*; import org.n52.sos.ogc.ows.*;
[ "org.joda.time", "org.n52.sos" ]
org.joda.time; org.n52.sos;
1,928,824
Authenticator getAuthenticator();
Authenticator getAuthenticator();
/** * Getter for this domain's Authenticator instance. */
Getter for this domain's Authenticator instance
getAuthenticator
{ "repo_name": "atricore/josso1", "path": "core/josso-core/src/main/java/org/josso/SecurityDomain.java", "license": "lgpl-2.1", "size": 3931 }
[ "org.josso.auth.Authenticator" ]
import org.josso.auth.Authenticator;
import org.josso.auth.*;
[ "org.josso.auth" ]
org.josso.auth;
678,832
@Test (timeout=60000) public void testSnapshotWhileAppending() throws Exception { Path file = new Path(dir, "file"); DFSTestUtil.createFile(hdfs, file, BLOCKSIZE, REPLICATION, seed); // 1. append without closing stream --> create snapshot HdfsDataOutputStream out = appendFileWithoutClosing(file...
@Test (timeout=60000) void function() throws Exception { Path file = new Path(dir, "file"); DFSTestUtil.createFile(hdfs, file, BLOCKSIZE, REPLICATION, seed); HdfsDataOutputStream out = appendFileWithoutClosing(file, BLOCKSIZE); out.hsync(EnumSet.of(SyncFlag.UPDATE_LENGTH)); SnapshotTestHelper.createSnapshot(hdfs, dir, ...
/** * Test snapshot during file appending, before the corresponding * {@link FSDataOutputStream} instance closes. */
Test snapshot during file appending, before the corresponding <code>FSDataOutputStream</code> instance closes
testSnapshotWhileAppending
{ "repo_name": "ZhangXFeng/hadoop", "path": "src/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/snapshot/TestINodeFileUnderConstructionWithSnapshot.java", "license": "apache-2.0", "size": 10899 }
[ "java.util.EnumSet", "org.apache.hadoop.fs.Path", "org.apache.hadoop.hdfs.DFSTestUtil", "org.apache.hadoop.hdfs.client.HdfsDataOutputStream", "org.apache.hadoop.hdfs.server.namenode.INodeDirectory", "org.apache.hadoop.hdfs.server.namenode.INodeFile", "org.apache.hadoop.hdfs.server.namenode.snapshot.Dire...
import java.util.EnumSet; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hdfs.DFSTestUtil; import org.apache.hadoop.hdfs.client.HdfsDataOutputStream; import org.apache.hadoop.hdfs.server.namenode.INodeDirectory; import org.apache.hadoop.hdfs.server.namenode.INodeFile; import org.apache.hadoop.hdfs.server.na...
import java.util.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.*; import org.apache.hadoop.hdfs.client.*; import org.apache.hadoop.hdfs.server.namenode.*; import org.apache.hadoop.hdfs.server.namenode.snapshot.*; import org.junit.*;
[ "java.util", "org.apache.hadoop", "org.junit" ]
java.util; org.apache.hadoop; org.junit;
57,642
@Override public AddFileToCollection setCollectionId(String id) { return super.setCollectionId(id); } } public static class DeleteFileFromCollection extends BoxRequestCollectionUpdate<BoxFile, DeleteFileFromCollection> { public DeleteFileFromCollection...
AddFileToCollection function(String id) { return super.setCollectionId(id); } } static class DeleteFileFromCollection extends BoxRequestCollectionUpdate<BoxFile, DeleteFileFromCollection> { public DeleteFileFromCollection(String id, String requestUrl, BoxSession session) { super(BoxFile.class, id, requestUrl, session);...
/** * Sets the collection id in the request to add the file to. * * @param id id of the collection to add the file to. * @return request with the updated collection id. */
Sets the collection id in the request to add the file to
setCollectionId
{ "repo_name": "follower/box-android-sdk", "path": "box-content-sdk/src/main/java/com/box/androidsdk/content/requests/BoxRequestsFile.java", "license": "apache-2.0", "size": 24764 }
[ "com.box.androidsdk.content.models.BoxFile", "com.box.androidsdk.content.models.BoxSession" ]
import com.box.androidsdk.content.models.BoxFile; import com.box.androidsdk.content.models.BoxSession;
import com.box.androidsdk.content.models.*;
[ "com.box.androidsdk" ]
com.box.androidsdk;
2,775,319
public void doProgressiveLog( StaplerRequest req, StaplerResponse rsp) throws IOException { AnnotatedLargeText text = obtainLog(); if(text!=null) { text.doProgressText(req,rsp); return; } rsp.setStatus(HttpServletResponse.SC_OK); }
void function( StaplerRequest req, StaplerResponse rsp) throws IOException { AnnotatedLargeText text = obtainLog(); if(text!=null) { text.doProgressText(req,rsp); return; } rsp.setStatus(HttpServletResponse.SC_OK); }
/** * Handles incremental log output. */
Handles incremental log output
doProgressiveLog
{ "repo_name": "rlugojr/jenkins", "path": "core/src/main/java/hudson/model/TaskAction.java", "license": "mit", "size": 4798 }
[ "hudson.console.AnnotatedLargeText", "java.io.IOException", "javax.servlet.http.HttpServletResponse", "org.kohsuke.stapler.StaplerRequest", "org.kohsuke.stapler.StaplerResponse" ]
import hudson.console.AnnotatedLargeText; import java.io.IOException; import javax.servlet.http.HttpServletResponse; import org.kohsuke.stapler.StaplerRequest; import org.kohsuke.stapler.StaplerResponse;
import hudson.console.*; import java.io.*; import javax.servlet.http.*; import org.kohsuke.stapler.*;
[ "hudson.console", "java.io", "javax.servlet", "org.kohsuke.stapler" ]
hudson.console; java.io; javax.servlet; org.kohsuke.stapler;
1,710,059
public void trace(String msg) { super.logDelegate.log(Level.FINER, msg); }
void function(String msg) { super.logDelegate.log(Level.FINER, msg); }
/** * Synonymous to using {@link java.util.logging.Logger#finer}. * * @param msg log message */
Synonymous to using <code>java.util.logging.Logger#finer</code>
trace
{ "repo_name": "openremote/OpenRemote-Logging", "path": "src/main/java/org/openremote/logging/Logger.java", "license": "agpl-3.0", "size": 11944 }
[ "java.util.logging.Level" ]
import java.util.logging.Level;
import java.util.logging.*;
[ "java.util" ]
java.util;
1,608,919
private boolean isGuardedInstanceofReference(Node reference) { Node instanceofNode = reference.getParent(); if (isInstanceofFor(instanceofNode, reference)) { Node andNode = instanceofNode.getParent(); return andNode != null && andNode.isAnd() && isUndefinedTypeofGuardFor(andNod...
boolean function(Node reference) { Node instanceofNode = reference.getParent(); if (isInstanceofFor(instanceofNode, reference)) { Node andNode = instanceofNode.getParent(); return andNode != null && andNode.isAnd() && isUndefinedTypeofGuardFor(andNode.getFirstChild(), reference); } else { return false; } }
/** * Is the reference node the second {@code Ref} in an expression like {@code 'undefined' != typeof * Ref && x instanceof Ref}? * * <p>It's safe to ignore this kind of reference when moving the definition of {@code Ref}. */
Is the reference node the second Ref in an expression like 'undefined' != typeof Ref && x instanceof Ref? It's safe to ignore this kind of reference when moving the definition of Ref
isGuardedInstanceofReference
{ "repo_name": "Yannic/closure-compiler", "path": "src/com/google/javascript/jscomp/CrossChunkCodeMotion.java", "license": "apache-2.0", "size": 30067 }
[ "com.google.javascript.rhino.Node" ]
import com.google.javascript.rhino.Node;
import com.google.javascript.rhino.*;
[ "com.google.javascript" ]
com.google.javascript;
1,157,792
@javax.annotation.Nullable @ApiModelProperty(value = "") public V1ObjectMeta getMetadata() { return metadata; }
@javax.annotation.Nullable @ApiModelProperty(value = "") V1ObjectMeta function() { return metadata; }
/** * Get metadata * * @return metadata */
Get metadata
getMetadata
{ "repo_name": "kubernetes-client/java", "path": "kubernetes/src/main/java/io/kubernetes/client/openapi/models/V1LimitRange.java", "license": "apache-2.0", "size": 5717 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
2,537,008
public String getExplainString(ArrayList<PlanFragment> fragments, TQueryExecRequest request, TExplainLevel explainLevel) { StringBuilder str = new StringBuilder(); boolean hasHeader = false; if (request.isSetPer_host_mem_req() && request.isSetPer_host_vcores()) { str.append( String.f...
String function(ArrayList<PlanFragment> fragments, TQueryExecRequest request, TExplainLevel explainLevel) { StringBuilder str = new StringBuilder(); boolean hasHeader = false; if (request.isSetPer_host_mem_req() && request.isSetPer_host_vcores()) { str.append( String.format(STR, PrintUtils.printBytes(request.getPer_hos...
/** * Return combined explain string for all plan fragments and with an * explicit explain level. * Includes the estimated resource requirements from the request if set. */
Return combined explain string for all plan fragments and with an explicit explain level. Includes the estimated resource requirements from the request if set
getExplainString
{ "repo_name": "michaelhkw/incubator-impala", "path": "fe/src/main/java/org/apache/impala/planner/Planner.java", "license": "apache-2.0", "size": 25939 }
[ "com.google.common.base.Joiner", "com.google.common.collect.Lists", "java.util.ArrayList", "java.util.List", "org.apache.impala.common.PrintUtils", "org.apache.impala.thrift.TExplainLevel", "org.apache.impala.thrift.TQueryExecRequest", "org.apache.impala.thrift.TTableName" ]
import com.google.common.base.Joiner; import com.google.common.collect.Lists; import java.util.ArrayList; import java.util.List; import org.apache.impala.common.PrintUtils; import org.apache.impala.thrift.TExplainLevel; import org.apache.impala.thrift.TQueryExecRequest; import org.apache.impala.thrift.TTableName;
import com.google.common.base.*; import com.google.common.collect.*; import java.util.*; import org.apache.impala.common.*; import org.apache.impala.thrift.*;
[ "com.google.common", "java.util", "org.apache.impala" ]
com.google.common; java.util; org.apache.impala;
2,069,878
public boolean enabled() { return CompressorJNI.getCompressor(m_compressorHandle); }
boolean function() { return CompressorJNI.getCompressor(m_compressorHandle); }
/** * Get the enabled status of the compressor. * * @return true if the compressor is on */
Get the enabled status of the compressor
enabled
{ "repo_name": "PeterMitrano/allwpilib", "path": "wpilibj/src/athena/java/edu/wpi/first/wpilibj/Compressor.java", "license": "bsd-3-clause", "size": 7058 }
[ "edu.wpi.first.wpilibj.hal.CompressorJNI" ]
import edu.wpi.first.wpilibj.hal.CompressorJNI;
import edu.wpi.first.wpilibj.hal.*;
[ "edu.wpi.first" ]
edu.wpi.first;
1,749,548
protected Map describeBean(Object o) { Map m = null; try { m = BeanUtils.describe((Serializable) o); } catch(Throwable t) { log.debug("Caught error in BeanUtils.describe(): " + t.getMessage()); t.printStackTrace(); throw new java.lang.UnsupportedOperationExce...
Map function(Object o) { Map m = null; try { m = BeanUtils.describe((Serializable) o); } catch(Throwable t) { log.debug(STR + t.getMessage()); t.printStackTrace(); throw new java.lang.UnsupportedOperationException( STR + t); } return m; }
/** * protected utility method to wrap BeanUtils * * @param o DOCUMENTATION PENDING * * @return DOCUMENTATION PENDING * * @throws java.lang.UnsupportedOperationException DOCUMENTATION PENDING */
protected utility method to wrap BeanUtils
describeBean
{ "repo_name": "Fudan-University/sakai", "path": "samigo/samigo-app/src/java/org/sakaiproject/tool/assessment/util/BeanSortComparator.java", "license": "apache-2.0", "size": 4274 }
[ "java.io.Serializable", "java.util.Map", "org.apache.commons.beanutils.BeanUtils" ]
import java.io.Serializable; import java.util.Map; import org.apache.commons.beanutils.BeanUtils;
import java.io.*; import java.util.*; import org.apache.commons.beanutils.*;
[ "java.io", "java.util", "org.apache.commons" ]
java.io; java.util; org.apache.commons;
1,506,534
public static void checkJarHell() throws Exception { ClassLoader loader = JarHell.class.getClassLoader(); ESLogger logger = Loggers.getLogger(JarHell.class); if (logger.isDebugEnabled()) { logger.debug("java.class.path: {}", System.getProperty("java.class.path")); log...
static void function() throws Exception { ClassLoader loader = JarHell.class.getClassLoader(); ESLogger logger = Loggers.getLogger(JarHell.class); if (logger.isDebugEnabled()) { logger.debug(STR, System.getProperty(STR)); logger.debug(STR, System.getProperty(STR)); if (loader instanceof URLClassLoader ) { logger.debug(...
/** * Checks the current classpath for duplicate classes * @throws IllegalStateException if jar hell was found */
Checks the current classpath for duplicate classes
checkJarHell
{ "repo_name": "xiaguangme/demo", "path": "07.ElasticSearch_demo/elasticsearch-2.4.0-sources/org/elasticsearch/bootstrap/JarHell.java", "license": "apache-2.0", "size": 13521 }
[ "java.net.URLClassLoader", "java.util.Arrays", "org.elasticsearch.common.logging.ESLogger", "org.elasticsearch.common.logging.Loggers" ]
import java.net.URLClassLoader; import java.util.Arrays; import org.elasticsearch.common.logging.ESLogger; import org.elasticsearch.common.logging.Loggers;
import java.net.*; import java.util.*; import org.elasticsearch.common.logging.*;
[ "java.net", "java.util", "org.elasticsearch.common" ]
java.net; java.util; org.elasticsearch.common;
8,220
public static DocTrees instance(ProcessingEnvironment env) { if (!env.getClass().getName().equals("com.sun.tools.javac.processing.JavacProcessingEnvironment")) throw new IllegalArgumentException(); return (DocTrees) getJavacTrees(ProcessingEnvironment.class, env); }
static DocTrees function(ProcessingEnvironment env) { if (!env.getClass().getName().equals(STR)) throw new IllegalArgumentException(); return (DocTrees) getJavacTrees(ProcessingEnvironment.class, env); }
/** * Returns a DocTrees object for a given ProcessingEnvironment. * @param env the processing environment for which to get the Trees object * @return the DocTrees object * @throws IllegalArgumentException if the env does not support the Trees API. */
Returns a DocTrees object for a given ProcessingEnvironment
instance
{ "repo_name": "google/error-prone-javac", "path": "src/jdk.compiler/share/classes/com/sun/source/util/DocTrees.java", "license": "gpl-2.0", "size": 8070 }
[ "javax.annotation.processing.ProcessingEnvironment" ]
import javax.annotation.processing.ProcessingEnvironment;
import javax.annotation.processing.*;
[ "javax.annotation" ]
javax.annotation;
1,001,621
public static <E> Comparator<E> reversedComparator(final Comparator<E> comparator) { return new ReverseComparator<E>(comparator); }
static <E> Comparator<E> function(final Comparator<E> comparator) { return new ReverseComparator<E>(comparator); }
/** * Gets a comparator that reverses the order of the given comparator. * * @param <E> the object type to compare * @param comparator the comparator to reverse * @return a comparator that reverses the order of the input comparator * @see ReverseComparator */
Gets a comparator that reverses the order of the given comparator
reversedComparator
{ "repo_name": "AffogatoLang/Moka", "path": "lib/Apache_Commons_Collections/src/main/java/org/apache/commons/collections4/ComparatorUtils.java", "license": "bsd-3-clause", "size": 9523 }
[ "java.util.Comparator", "org.apache.commons.collections4.comparators.ReverseComparator" ]
import java.util.Comparator; import org.apache.commons.collections4.comparators.ReverseComparator;
import java.util.*; import org.apache.commons.collections4.comparators.*;
[ "java.util", "org.apache.commons" ]
java.util; org.apache.commons;
2,706,965
private JCheckBox getChkParseGit() { if (parseGit == null) { parseGit = new JCheckBox(); parseGit.setText(Constant.messages.getString("spider.options.label.git")); } return parseGit; }
JCheckBox function() { if (parseGit == null) { parseGit = new JCheckBox(); parseGit.setText(Constant.messages.getString(STR)); } return parseGit; }
/** * This method initializes the Parse "Git" checkbox. * * @return javax.swing.JCheckBox */
This method initializes the Parse "Git" checkbox
getChkParseGit
{ "repo_name": "0xkasun/zaproxy", "path": "src/org/zaproxy/zap/extension/spider/OptionsSpiderPanel.java", "license": "apache-2.0", "size": 18538 }
[ "javax.swing.JCheckBox", "org.parosproxy.paros.Constant" ]
import javax.swing.JCheckBox; import org.parosproxy.paros.Constant;
import javax.swing.*; import org.parosproxy.paros.*;
[ "javax.swing", "org.parosproxy.paros" ]
javax.swing; org.parosproxy.paros;
283,474
public ObjectMessage createJMSMessage(final String body) throws JMSException { return _jmsSession.createObjectMessage(body); }
ObjectMessage function(final String body) throws JMSException { return _jmsSession.createObjectMessage(body); }
/** * Creates a JMS {@link ObjectMessage} with the passed-in String as the body. * * @param body the String to be used as the messages payload(body) * @return ObjectMessage with the passed-in String as its payload. * @throws JMSException if an error occurs while creating the message. */
Creates a JMS <code>ObjectMessage</code> with the passed-in String as the body
createJMSMessage
{ "repo_name": "cunningt/switchyard", "path": "components/test/mixins/hornetq/src/main/java/org/switchyard/component/test/mixins/hornetq/HornetQMixIn.java", "license": "apache-2.0", "size": 23810 }
[ "javax.jms.JMSException", "javax.jms.ObjectMessage" ]
import javax.jms.JMSException; import javax.jms.ObjectMessage;
import javax.jms.*;
[ "javax.jms" ]
javax.jms;
2,276,544
public void readEntityFromNBT(NBTTagCompound tagCompund) { super.readEntityFromNBT(tagCompund); String s = ""; if (tagCompund.hasKey("OwnerUUID", 8)) { s = tagCompund.getString("OwnerUUID"); } else { String s1 = tagCompund.getStrin...
void function(NBTTagCompound tagCompund) { super.readEntityFromNBT(tagCompund); String s = STROwnerUUIDSTROwnerUUIDSTROwnerSTRSittingSTRSitting")); }
/** * (abstract) Protected helper method to read subclass entity data from NBT. */
(abstract) Protected helper method to read subclass entity data from NBT
readEntityFromNBT
{ "repo_name": "trixmot/mod1", "path": "build/tmp/recompileMc/sources/net/minecraft/entity/passive/EntityTameable.java", "license": "lgpl-2.1", "size": 6921 }
[ "net.minecraft.nbt.NBTTagCompound" ]
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.*;
[ "net.minecraft.nbt" ]
net.minecraft.nbt;
294,031
@RequestMapping("/unhandledException") String throwUnhandledException() throws Exception { logger.info("Throw UnhandledException"); throw new UnhandledException("Some exception occurred"); }
@RequestMapping(STR) String throwUnhandledException() throws Exception { logger.info(STR); throw new UnhandledException(STR); }
/** * Simulates a database exception by always throwing * <tt>UnhandledException</tt>. Must be caught by an exception handler. * * @return Nothing - it always throws the exception. * @throws UnhandledException * Always thrown. */
Simulates a database exception by always throwing UnhandledException. Must be caught by an exception handler
throwUnhandledException
{ "repo_name": "lihongjie/spring-tutorial", "path": "mvc-exceptions/src/main/java/demo1/web/ExceptionHandlingController.java", "license": "apache-2.0", "size": 7937 }
[ "org.springframework.web.bind.annotation.RequestMapping" ]
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.*;
[ "org.springframework.web" ]
org.springframework.web;
2,757,659
public boolean isCompatible(PlotArea plotArea) { ConfigurationSection section = PS.get().worlds.getConfigurationSection("worlds"); for (ConfigurationNode setting : plotArea.getSettingNodes()) { Object constant = section.get(plotArea.worldname + '.' + setting.getConstant()); i...
boolean function(PlotArea plotArea) { ConfigurationSection section = PS.get().worlds.getConfigurationSection(STR); for (ConfigurationNode setting : plotArea.getSettingNodes()) { Object constant = section.get(plotArea.worldname + '.' + setting.getConstant()); if (constant == null !constant.equals(section.get(this.worldn...
/** * Check if a PlotArea is compatible (move/copy etc). * @param plotArea the {@code PlotArea} to compare * @return true if both areas are compatible */
Check if a PlotArea is compatible (move/copy etc)
isCompatible
{ "repo_name": "manuelgu/PlotSquared", "path": "Core/src/main/java/com/intellectualcrafters/plot/object/PlotArea.java", "license": "gpl-3.0", "size": 30728 }
[ "com.intellectualcrafters.configuration.ConfigurationSection", "com.intellectualcrafters.plot.PS", "com.intellectualcrafters.plot.config.ConfigurationNode" ]
import com.intellectualcrafters.configuration.ConfigurationSection; import com.intellectualcrafters.plot.PS; import com.intellectualcrafters.plot.config.ConfigurationNode;
import com.intellectualcrafters.configuration.*; import com.intellectualcrafters.plot.*; import com.intellectualcrafters.plot.config.*;
[ "com.intellectualcrafters.configuration", "com.intellectualcrafters.plot" ]
com.intellectualcrafters.configuration; com.intellectualcrafters.plot;
1,384,797
void checkDeleteHistoricProcessInstance(HistoricProcessInstance instance);
void checkDeleteHistoricProcessInstance(HistoricProcessInstance instance);
/** * Checks if it is allowed to delete the given historic process instance. */
Checks if it is allowed to delete the given historic process instance
checkDeleteHistoricProcessInstance
{ "repo_name": "falko/camunda-bpm-platform", "path": "engine/src/main/java/org/camunda/bpm/engine/impl/cfg/CommandChecker.java", "license": "apache-2.0", "size": 12599 }
[ "org.camunda.bpm.engine.history.HistoricProcessInstance" ]
import org.camunda.bpm.engine.history.HistoricProcessInstance;
import org.camunda.bpm.engine.history.*;
[ "org.camunda.bpm" ]
org.camunda.bpm;
1,950,086
@Test public void testCanObtainNoInterfaceReferenceViaEJBLinkWithBeanInterfaceAndGenericVariableType() throws Exception { long currentThreadId = 0; // Get a NoInterfaceBean2 BeanReference NoInterfaceBean2 bean = lookupNoInterfaceBean2FromEJBLocalNamespace(); // Exercise the no-...
void function() throws Exception { long currentThreadId = 0; NoInterfaceBean2 bean = lookupNoInterfaceBean2FromEJBLocalNamespace(); Future<Integer> future = bean.invokeMethodOnReferenceObtainedViaEJBLinkWithValidBeanInterfaceAndGenericVariableType_ReturnFutureResults(); int result = future.get().intValue(); assertEqual...
/** * (3.4.4) Session Bean's No-Interface View * (3.4.8) Asynchronous Invocations * With an Asynchronous annotation at the method level: * 1) Verify that we can obtain a no-interface style BeanReference via the EJBLink flow. * 2) Verify that we can use EJBLink flow when specifying a valid beanI...
(3.4.4) Session Bean's No-Interface View (3.4.8) Asynchronous Invocations With an Asynchronous annotation at the method level: 1) Verify that we can obtain a no-interface style BeanReference via the EJBLink flow. 2) Verify that we can use EJBLink flow when specifying a valid beanInterface, and a generic variable type
testCanObtainNoInterfaceReferenceViaEJBLinkWithBeanInterfaceAndGenericVariableType
{ "repo_name": "OpenLiberty/open-liberty", "path": "dev/com.ibm.ws.ejbcontainer.async_fat/test-applications/AsyncTestWeb.war/src/com/ibm/ws/ejbcontainer/async/fat/web/BasicMixServlet.java", "license": "epl-1.0", "size": 75937 }
[ "com.ibm.ws.ejbcontainer.async.fat.mix.ejb.NoInterfaceBean2", "java.util.concurrent.Future", "org.junit.Assert" ]
import com.ibm.ws.ejbcontainer.async.fat.mix.ejb.NoInterfaceBean2; import java.util.concurrent.Future; import org.junit.Assert;
import com.ibm.ws.ejbcontainer.async.fat.mix.ejb.*; import java.util.concurrent.*; import org.junit.*;
[ "com.ibm.ws", "java.util", "org.junit" ]
com.ibm.ws; java.util; org.junit;
1,446,016
public void testClusterJoinDespiteOfPublishingIssues() throws Exception { List<String> nodes = startCluster(2, 1); String masterNode = internalCluster().getMasterName(); String nonMasterNode; if (masterNode.equals(nodes.get(0))) { nonMasterNode = nodes.get(1); } ...
void function() throws Exception { List<String> nodes = startCluster(2, 1); String masterNode = internalCluster().getMasterName(); String nonMasterNode; if (masterNode.equals(nodes.get(0))) { nonMasterNode = nodes.get(1); } else { nonMasterNode = nodes.get(0); } DiscoveryNodes discoveryNodes = internalCluster().getInst...
/** * Test cluster join with issues in cluster state publishing * */
Test cluster join with issues in cluster state publishing
testClusterJoinDespiteOfPublishingIssues
{ "repo_name": "schonfeld/elasticsearch", "path": "core/src/test/java/org/elasticsearch/discovery/DiscoveryWithServiceDisruptionsIT.java", "license": "apache-2.0", "size": 56155 }
[ "java.util.List", "org.elasticsearch.cluster.ClusterService", "org.elasticsearch.cluster.node.DiscoveryNodes", "org.elasticsearch.discovery.zen.publish.PublishClusterStateAction", "org.elasticsearch.test.transport.MockTransportService", "org.elasticsearch.transport.TransportService" ]
import java.util.List; import org.elasticsearch.cluster.ClusterService; import org.elasticsearch.cluster.node.DiscoveryNodes; import org.elasticsearch.discovery.zen.publish.PublishClusterStateAction; import org.elasticsearch.test.transport.MockTransportService; import org.elasticsearch.transport.TransportService;
import java.util.*; import org.elasticsearch.cluster.*; import org.elasticsearch.cluster.node.*; import org.elasticsearch.discovery.zen.publish.*; import org.elasticsearch.test.transport.*; import org.elasticsearch.transport.*;
[ "java.util", "org.elasticsearch.cluster", "org.elasticsearch.discovery", "org.elasticsearch.test", "org.elasticsearch.transport" ]
java.util; org.elasticsearch.cluster; org.elasticsearch.discovery; org.elasticsearch.test; org.elasticsearch.transport;
2,445,174
public void validate(Guarantee guarantee, boolean isAuthorization);
void function(Guarantee guarantee, boolean isAuthorization);
/** * It makes guarantee's validation * @param isAuthorization if true it validates the guarantee for authorization otherwise validates for registration */
It makes guarantee's validation
validate
{ "repo_name": "robertoandrade/cyclos", "path": "src/nl/strohalm/cyclos/services/accounts/guarantees/GuaranteeService.java", "license": "gpl-2.0", "size": 6161 }
[ "nl.strohalm.cyclos.entities.accounts.guarantees.Guarantee" ]
import nl.strohalm.cyclos.entities.accounts.guarantees.Guarantee;
import nl.strohalm.cyclos.entities.accounts.guarantees.*;
[ "nl.strohalm.cyclos" ]
nl.strohalm.cyclos;
553,274
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) public SyncPoller< PollResult<ExpressRouteCircuitsRoutesTableListResultInner>, ExpressRouteCircuitsRoutesTableListResultInner> beginListRoutesTable(String resourceGroupName, String circuitName, String peeringName, String devicePath)...
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller< PollResult<ExpressRouteCircuitsRoutesTableListResultInner>, ExpressRouteCircuitsRoutesTableListResultInner> function(String resourceGroupName, String circuitName, String peeringName, String devicePath) { return beginListRoutesTableAsync(resourceGro...
/** * Gets the currently advertised routes table associated with the express route circuit in a resource group. * * @param resourceGroupName The name of the resource group. * @param circuitName The name of the express route circuit. * @param peeringName The name of the peering. * @param de...
Gets the currently advertised routes table associated with the express route circuit in a resource group
beginListRoutesTable
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/ExpressRouteCircuitsClientImpl.java", "license": "mit", "size": 143721 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.management.polling.PollResult", "com.azure.core.util.polling.SyncPoller", "com.azure.resourcemanager.network.fluent.models.ExpressRouteCircuitsRoutesTableListResultInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.management.polling.PollResult; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.network.fluent.models.ExpressRouteCircuitsRoutesTableListResultInner;
import com.azure.core.annotation.*; import com.azure.core.management.polling.*; import com.azure.core.util.polling.*; import com.azure.resourcemanager.network.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,427,416
public static class Solution2 { public int countNodes(TreeNode root) { if (root == null) { return 0; } int depth = getDepth(root); if (depth == 0) { return 1; } int left = 0; int right = ...
static class Solution2 { public int function(TreeNode root) { if (root == null) { return 0; } int depth = getDepth(root); if (depth == 0) { return 1; } int left = 0; int right = (int) Math.pow(2, depth) - 1; while (left <= right) { int mid = left + (right - left) / 2; if (exists(root, mid, depth)) { left = mid + 1; } e...
/** * credit: https://leetcode.com/problems/count-complete-tree-nodes/solution/ */
credit: HREF
countNodes
{ "repo_name": "fishercoder1534/Leetcode", "path": "src/main/java/com/fishercoder/solutions/_222.java", "license": "apache-2.0", "size": 3606 }
[ "com.fishercoder.common.classes.TreeNode" ]
import com.fishercoder.common.classes.TreeNode;
import com.fishercoder.common.classes.*;
[ "com.fishercoder.common" ]
com.fishercoder.common;
2,136,856
public int getLastSavedIndex() throws InterruptedException { return cmember.getSavedIndex(); } // TODO: move pool to Gondola, like message pool Queue<Command> pool = new ConcurrentLinkedQueue<>();
int function() throws InterruptedException { return cmember.getSavedIndex(); } Queue<Command> pool = new ConcurrentLinkedQueue<>();
/** * Returns the last saved index for this shard. Waits until the storage is settled if necessary. */
Returns the last saved index for this shard. Waits until the storage is settled if necessary
getLastSavedIndex
{ "repo_name": "patc888/gondola", "path": "core/src/main/java/com/yahoo/gondola/Shard.java", "license": "bsd-3-clause", "size": 7452 }
[ "java.util.Queue", "java.util.concurrent.ConcurrentLinkedQueue" ]
import java.util.Queue; import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.*; import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,687,979
public final void setSelectTransf(final ITransformer<SQLSelect, SQLSelect> transf) { this.selTransf = transf; this.fireWhereChange(); }
final void function(final ITransformer<SQLSelect, SQLSelect> transf) { this.selTransf = transf; this.fireWhereChange(); }
/** * Allows to transform the SQLSelect returned by getFillRequest(). * * @param transf the transformer to apply. */
Allows to transform the SQLSelect returned by getFillRequest()
setSelectTransf
{ "repo_name": "eric-lemesre/OpenConcerto", "path": "OpenConcerto/src/org/openconcerto/sql/request/BaseFillSQLRequest.java", "license": "gpl-3.0", "size": 8054 }
[ "org.openconcerto.sql.model.SQLSelect", "org.openconcerto.utils.cc.ITransformer" ]
import org.openconcerto.sql.model.SQLSelect; import org.openconcerto.utils.cc.ITransformer;
import org.openconcerto.sql.model.*; import org.openconcerto.utils.cc.*;
[ "org.openconcerto.sql", "org.openconcerto.utils" ]
org.openconcerto.sql; org.openconcerto.utils;
1,081,972
public String setServiceLocationFromLocationMapping(String env) { String locationUrl = m_serviceLocationMap.get(env); if (locationUrl != null) { setServiceLocation(locationUrl); } else { LogManager.getInstance(this.getClass()).log(Level.SEVERE, "No Service location mapped for " + env ); } ...
String function(String env) { String locationUrl = m_serviceLocationMap.get(env); if (locationUrl != null) { setServiceLocation(locationUrl); } else { LogManager.getInstance(this.getClass()).log(Level.SEVERE, STR + env ); } return locationUrl; }
/** * Sets the serviceLocation from the map for only valid keys * @param env the environment to determine the serviceLocation from LocationMappings */
Sets the serviceLocation from the map for only valid keys
setServiceLocationFromLocationMapping
{ "repo_name": "vthangathurai/SOA-Runtime", "path": "soa-client/src/main/java/org/ebayopensource/turmeric/runtime/sif/impl/internal/config/ClientConfigHolder.java", "license": "apache-2.0", "size": 28200 }
[ "java.util.logging.Level", "org.ebayopensource.turmeric.runtime.common.impl.utils.LogManager" ]
import java.util.logging.Level; import org.ebayopensource.turmeric.runtime.common.impl.utils.LogManager;
import java.util.logging.*; import org.ebayopensource.turmeric.runtime.common.impl.utils.*;
[ "java.util", "org.ebayopensource.turmeric" ]
java.util; org.ebayopensource.turmeric;
1,990,282
@Test() public void testWrongPasswordDIGESTMD5() throws Exception { if (! isDirectoryInstanceAvailable()) { return; } String[] args = { "-h", getTestHost(), "-p", String.valueOf(getTestPort()), "-D", getTestBindDN(), "-w", getTestBindPassword(), "-...
@Test() void function() throws Exception { if (! isDirectoryInstanceAvailable()) { return; } String[] args = { "-h", getTestHost(), "-p", String.valueOf(getTestPort()), "-D", getTestBindDN(), "-w", getTestBindPassword(), "-b", getTestBaseDN(), "-s", "sub", "-f", STR, "-C", "wrong", "-a", STR, "-t", "10", "-i", "1", "-I...
/** * Performs a test using the wrong password with DIGEST-MD5 authentication. * <BR><BR> * Access to a Directory Server instance is required for complete processing. * * @throws Exception If an unexpected problem occurs. */
Performs a test using the wrong password with DIGEST-MD5 authentication. Access to a Directory Server instance is required for complete processing
testWrongPasswordDIGESTMD5
{ "repo_name": "UnboundID/ldapsdk", "path": "tests/unit/src/com/unboundid/ldap/sdk/examples/AuthRateTestCase.java", "license": "gpl-2.0", "size": 24014 }
[ "com.unboundid.ldap.sdk.ResultCode", "org.testng.annotations.Test" ]
import com.unboundid.ldap.sdk.ResultCode; import org.testng.annotations.Test;
import com.unboundid.ldap.sdk.*; import org.testng.annotations.*;
[ "com.unboundid.ldap", "org.testng.annotations" ]
com.unboundid.ldap; org.testng.annotations;
1,195,660
protected void processRequest(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String code = request.getParameter("code"); String token = request.getParameter("token"); String fbref = request.getParameter("fbref"); ...
void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String code = request.getParameter("code"); String token = request.getParameter("token"); String fbref = request.getParameter("fbref"); String data = request.getParameter("data"); String callback = request.get...
/** * Processes requests for both HTTP * <code>GET</code> and * <code>POST</code> methods. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */
Processes requests for both HTTP <code>GET</code> and <code>POST</code> methods
processRequest
{ "repo_name": "suthat/signal", "path": "server/Signal/src/java/edu/sit/signal/feedback/SendApis.java", "license": "apache-2.0", "size": 5299 }
[ "edu.sit.signal.apis.DbApis", "java.io.IOException", "java.io.PrintWriter", "java.net.URLDecoder", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import edu.sit.signal.apis.DbApis; import java.io.IOException; import java.io.PrintWriter; import java.net.URLDecoder; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import edu.sit.signal.apis.*; import java.io.*; import java.net.*; import javax.servlet.*; import javax.servlet.http.*;
[ "edu.sit.signal", "java.io", "java.net", "javax.servlet" ]
edu.sit.signal; java.io; java.net; javax.servlet;
2,573,535
public void transitionToMaster() { for (IHAListener rl : haListeners.getOrderedListeners()) { rl.transitionToMaster(); } }
void function() { for (IHAListener rl : haListeners.getOrderedListeners()) { rl.transitionToMaster(); } }
/** * Dispatches a new role change notification * @param oldRole * @param newRole */
Dispatches a new role change notification
transitionToMaster
{ "repo_name": "xuraylei/floodlight_with_topoguard", "path": "src/test/java/net/floodlightcontroller/core/test/MockFloodlightProvider.java", "license": "apache-2.0", "size": 13147 }
[ "net.floodlightcontroller.core.IHAListener" ]
import net.floodlightcontroller.core.IHAListener;
import net.floodlightcontroller.core.*;
[ "net.floodlightcontroller.core" ]
net.floodlightcontroller.core;
1,256,385
@Override public void getRounds(String playeruuid, String orderByField, Round.Type filter, RoundsCallback callback) { // Creamos una lista de rondas y obtenemos las partidas siponibles List<Round> rounds = new ArrayList<>(); RoundCursorWrapper cursor = queryRoun...
void function(String playeruuid, String orderByField, Round.Type filter, RoundsCallback callback) { List<Round> rounds = new ArrayList<>(); RoundCursorWrapper cursor = queryRounds(); cursor.moveToFirst(); while (!cursor.isAfterLast()) { Round round = cursor.getRound(); if (round.getSecondUserUUID().equals(playeruuid)) ...
/** * Busca en la base de datos todas las partidas disponibles para el usuario playeruuid y enviamos * esa lista al callback en caso de una consulta exitosa y un error en caso de fallo * * @param playeruuid Identificador de usuario * @param orderByField Orden en el que se devolverán las partida...
Busca en la base de datos todas las partidas disponibles para el usuario playeruuid y enviamos esa lista al callback en caso de una consulta exitosa y un error en caso de fallo
getRounds
{ "repo_name": "manso92/DADM", "path": "app/src/main/java/com/manso92/damas/database/DataBase.java", "license": "gpl-3.0", "size": 16871 }
[ "com.manso92.damas.model.Round", "java.util.ArrayList", "java.util.List" ]
import com.manso92.damas.model.Round; import java.util.ArrayList; import java.util.List;
import com.manso92.damas.model.*; import java.util.*;
[ "com.manso92.damas", "java.util" ]
com.manso92.damas; java.util;
2,284,964
public static List<InetSocketAddress> getAddresses(Configuration conf, Collection<String> serviceIds, String defaultAddress, String... keys) { Collection<String> nameserviceIds = getNameServiceIds(conf); List<InetSocketAddress> isas = new ArrayList<InetSocketAddress>(); // Configuration with a sing...
static List<InetSocketAddress> function(Configuration conf, Collection<String> serviceIds, String defaultAddress, String... keys) { Collection<String> nameserviceIds = getNameServiceIds(conf); List<InetSocketAddress> isas = new ArrayList<InetSocketAddress>(); if (nameserviceIds == null nameserviceIds.isEmpty()) { Strin...
/** * Return list of InetSocketAddress for a given set of services * * @param conf configuration * @param serviceIds services ids * @param defaultAddress default address * @param keys set of keys * @return list of InetSocketAddress */
Return list of InetSocketAddress for a given set of services
getAddresses
{ "repo_name": "rvadali/fb-raid-refactoring", "path": "src/hdfs/org/apache/hadoop/hdfs/DFSUtil.java", "license": "apache-2.0", "size": 20954 }
[ "java.net.InetSocketAddress", "java.util.ArrayList", "java.util.Collection", "java.util.List", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.net.NetUtils" ]
import java.net.InetSocketAddress; import java.util.ArrayList; import java.util.Collection; import java.util.List; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.net.NetUtils;
import java.net.*; import java.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.net.*;
[ "java.net", "java.util", "org.apache.hadoop" ]
java.net; java.util; org.apache.hadoop;
1,917,916
void releaseConsole() { if (colorOutput) { AnsiConsole.systemUninstall(); } else { System.setProperty(Ansi.DISABLE, "false"); } }
void releaseConsole() { if (colorOutput) { AnsiConsole.systemUninstall(); } else { System.setProperty(Ansi.DISABLE, "false"); } }
/** * Returns the console to its state prior to the last call of {@link #prepareConsole(boolean)}. */
Returns the console to its state prior to the last call of <code>#prepareConsole(boolean)</code>
releaseConsole
{ "repo_name": "Ervii/garage-time", "path": "pajamas/src/java/com/twitter/common/tools/AnsiColorDiagnosticListener.java", "license": "apache-2.0", "size": 5866 }
[ "org.fusesource.jansi.Ansi", "org.fusesource.jansi.AnsiConsole" ]
import org.fusesource.jansi.Ansi; import org.fusesource.jansi.AnsiConsole;
import org.fusesource.jansi.*;
[ "org.fusesource.jansi" ]
org.fusesource.jansi;
1,538,638
public Optional<Boolean> isRemoteControlEnabled() { return device.flatMap(Device::getState).flatMap(State::getRemoteEnable) .flatMap(RemoteEnable::getFullRemoteControl); }
Optional<Boolean> function() { return device.flatMap(Device::getState).flatMap(State::getRemoteEnable) .flatMap(RemoteEnable::getFullRemoteControl); }
/** * Gets the "fullRemoteControl" state information of the device. If this flag is true ALL remote control actions * of the device can be triggered. * * @return Whether the device can be remote controlled. */
Gets the "fullRemoteControl" state information of the device. If this flag is true ALL remote control actions of the device can be triggered
isRemoteControlEnabled
{ "repo_name": "paulianttila/openhab2", "path": "bundles/org.openhab.binding.mielecloud/src/main/java/org/openhab/binding/mielecloud/internal/webservice/api/DeviceState.java", "license": "epl-1.0", "size": 18906 }
[ "java.util.Optional", "org.openhab.binding.mielecloud.internal.webservice.api.json.Device", "org.openhab.binding.mielecloud.internal.webservice.api.json.RemoteEnable", "org.openhab.binding.mielecloud.internal.webservice.api.json.State" ]
import java.util.Optional; import org.openhab.binding.mielecloud.internal.webservice.api.json.Device; import org.openhab.binding.mielecloud.internal.webservice.api.json.RemoteEnable; import org.openhab.binding.mielecloud.internal.webservice.api.json.State;
import java.util.*; import org.openhab.binding.mielecloud.internal.webservice.api.json.*;
[ "java.util", "org.openhab.binding" ]
java.util; org.openhab.binding;
1,626,659
public boolean isApplicable(Class<? extends Job> jobType) { Type parameterization = Types.getBaseClass(clazz, JobProperty.class); if (parameterization instanceof ParameterizedType) { ParameterizedType pt = (ParameterizedType) parameterization; Class applicable = Types.erasure...
boolean function(Class<? extends Job> jobType) { Type parameterization = Types.getBaseClass(clazz, JobProperty.class); if (parameterization instanceof ParameterizedType) { ParameterizedType pt = (ParameterizedType) parameterization; Class applicable = Types.erasure(Types.getTypeArgument(pt, 0)); return applicable.isAss...
/** * Returns true if this {@link JobProperty} type is applicable to the * given job type. * * <p> * The default implementation of this method checks if the given job type is assignable to 'J' of * {@link JobProperty}<tt>&lt;J></tt>, but subtypes can extend this to change this behavior. ...
Returns true if this <code>JobProperty</code> type is applicable to the given job type. The default implementation of this method checks if the given job type is assignable to 'J' of <code>JobProperty</code>&lt;J>, but subtypes can extend this to change this behavior
isApplicable
{ "repo_name": "ns163/jenkins", "path": "core/src/main/java/hudson/model/JobPropertyDescriptor.java", "license": "mit", "size": 4335 }
[ "java.lang.reflect.ParameterizedType", "java.lang.reflect.Type", "org.jvnet.tiger_types.Types" ]
import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; import org.jvnet.tiger_types.Types;
import java.lang.reflect.*; import org.jvnet.tiger_types.*;
[ "java.lang", "org.jvnet.tiger_types" ]
java.lang; org.jvnet.tiger_types;
1,013,208
public synchronized Vector<TaskInProgress> reportSetupTIPs( boolean shouldBeComplete) { Vector<TaskInProgress> results = new Vector<TaskInProgress>(); for (int i = 0; i < setup.length; i++) { if (setup[i].isComplete() == shouldBeComplete) { res...
synchronized Vector<TaskInProgress> function( boolean shouldBeComplete) { Vector<TaskInProgress> results = new Vector<TaskInProgress>(); for (int i = 0; i < setup.length; i++) { if (setup[i].isComplete() == shouldBeComplete) { results.add(setup[i]); } } return results; }
/** * Return a vector of setup TaskInProgress objects */
Return a vector of setup TaskInProgress objects
reportSetupTIPs
{ "repo_name": "dhootha/hadoop-common", "path": "src/mapred/org/apache/hadoop/mapred/JobInProgress.java", "license": "apache-2.0", "size": 92287 }
[ "java.util.Vector" ]
import java.util.Vector;
import java.util.*;
[ "java.util" ]
java.util;
651,004
@Override public void invoke(Request request, Response response) throws IOException, ServletException { if (log.isDebugEnabled()) { log.debug("Security checking request " + request.getMethod() + " " + request.getRequestURI()); } // Have we got a cach...
void function(Request request, Response response) throws IOException, ServletException { if (log.isDebugEnabled()) { log.debug(STR + request.getMethod() + " " + request.getRequestURI()); } if (cache) { Principal principal = request.getUserPrincipal(); if (principal == null) { Session session = request.getSessionInterna...
/** * Enforce the security restrictions in the web application deployment * descriptor of our associated Context. * * @param request Request to be processed * @param response Response to be processed * * @exception IOException if an input/output error occurs * @exception ServletE...
Enforce the security restrictions in the web application deployment descriptor of our associated Context
invoke
{ "repo_name": "nrgaway/qubes-tools", "path": "experimental/tomcat/apache-tomcat-8.0.15-src/java/org/apache/catalina/authenticator/AuthenticatorBase.java", "license": "gpl-2.0", "size": 33099 }
[ "java.io.IOException", "java.security.Principal", "java.security.cert.X509Certificate", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "org.apache.catalina.Realm", "org.apache.catalina.Session", "org.apache.catalina.Wrapper", "org.apache.catalina.connector.Request", "or...
import java.io.IOException; import java.security.Principal; import java.security.cert.X509Certificate; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import org.apache.catalina.Realm; import org.apache.catalina.Session; import org.apache.catalina.Wrapper; import org.apache.catalina...
import java.io.*; import java.security.*; import java.security.cert.*; import javax.servlet.*; import javax.servlet.http.*; import org.apache.catalina.*; import org.apache.catalina.connector.*; import org.apache.tomcat.util.descriptor.web.*;
[ "java.io", "java.security", "javax.servlet", "org.apache.catalina", "org.apache.tomcat" ]
java.io; java.security; javax.servlet; org.apache.catalina; org.apache.tomcat;
1,126,059
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_main, menu); return true; }
boolean function(Menu menu) { getMenuInflater().inflate(R.menu.menu_main, menu); return true; }
/** * Method to maintain a unified menu across all screens. * * @param menu The menu being used. * @return boolean */
Method to maintain a unified menu across all screens
onCreateOptionsMenu
{ "repo_name": "ASU-CodeDevils/FlashCards", "path": "app/src/main/java/com/example/terin/asu_flashcardapp/CourseList.java", "license": "mit", "size": 5430 }
[ "android.view.Menu" ]
import android.view.Menu;
import android.view.*;
[ "android.view" ]
android.view;
20,982
@Override public void onEnable() { loadLanguageFile(); createConfigurationFiles(); // Resiter the commands if (m_teleportationConfiguration.getBoolean("commands.tp")) { registerCommand(new CommandTP(this)); registerCommand(new CommandTPHere(this)); registerCommand(new CommandTPR(...
void function() { loadLanguageFile(); createConfigurationFiles(); if (m_teleportationConfiguration.getBoolean(STR)) { registerCommand(new CommandTP(this)); registerCommand(new CommandTPHere(this)); registerCommand(new CommandTPR(this)); registerCommand(new CommandTPHR(this)); registerCommand(new CommandTPA(this)); } if...
/** * Called when the module is loaded. * Allowing us to register the player and block listeners */
Called when the module is loaded. Allowing us to register the player and block listeners
onEnable
{ "repo_name": "CodingBadgers/Perks", "path": "bTransported/src/uk/codingbadgers/btransported/bTransported.java", "license": "gpl-2.0", "size": 14414 }
[ "java.util.logging.Level", "uk.codingbadgers.btransported.commands.CommandRandomWarp", "uk.codingbadgers.btransported.commands.CommandSpawn", "uk.codingbadgers.btransported.commands.CommandWarp", "uk.codingbadgers.btransported.commands.home.CommandHome", "uk.codingbadgers.btransported.commands.tp.CommandT...
import java.util.logging.Level; import uk.codingbadgers.btransported.commands.CommandRandomWarp; import uk.codingbadgers.btransported.commands.CommandSpawn; import uk.codingbadgers.btransported.commands.CommandWarp; import uk.codingbadgers.btransported.commands.home.CommandHome; import uk.codingbadgers.btransported.com...
import java.util.logging.*; import uk.codingbadgers.btransported.commands.*; import uk.codingbadgers.btransported.commands.home.*; import uk.codingbadgers.btransported.commands.tp.*; import uk.codingbadgers.btransported.listeners.*;
[ "java.util", "uk.codingbadgers.btransported" ]
java.util; uk.codingbadgers.btransported;
1,169,613
public StringMap getIdentifiers() { return values; }
StringMap function() { return values; }
/** * Implements {@link IdentifierManager#getIdentifiers()}. */
Implements <code>IdentifierManager#getIdentifiers()</code>
getIdentifiers
{ "repo_name": "Uni-Sol/batik", "path": "sources/org/apache/batik/css/engine/value/svg/ShapeRenderingManager.java", "license": "apache-2.0", "size": 2958 }
[ "org.apache.batik.css.engine.value.StringMap" ]
import org.apache.batik.css.engine.value.StringMap;
import org.apache.batik.css.engine.value.*;
[ "org.apache.batik" ]
org.apache.batik;
396,201
public String getId() { return (version == null ? "[inherited]" : groupId) + ':' + artifactId + ':' + packaging + ':' + (version == null ? "[inherited]" : version); } /** * Returns model pom file if model has been created with {@link #readFrom(Path)} or {@li...
String function() { return (version == null ? STR : groupId) + ':' + artifactId + ':' + packaging + ':' + (version == null ? STR : version); } /** * Returns model pom file if model has been created with {@link #readFrom(Path)} or { * #readFrom(File)} methods. * * <p>This method doesn't guarantee to return actual model ...
/** * Returns model identifier * * @return the model id as <code>groupId:artifactId:packaging:version</code> */
Returns model identifier
getId
{ "repo_name": "TypeFox/che", "path": "plugins/plugin-maven/che-plugin-maven-tools/src/main/java/org/eclipse/che/ide/maven/tools/Model.java", "license": "epl-1.0", "size": 38042 }
[ "java.io.File", "java.nio.file.Path" ]
import java.io.File; import java.nio.file.Path;
import java.io.*; import java.nio.file.*;
[ "java.io", "java.nio" ]
java.io; java.nio;
4,722
private void setConnectionActive(Connection c) { if (settingsInterface != null) { settingsInterface.reconnect(); } // Switch the selection status c.selected = (c.selected) ? false : true; if (c.selected) { Connection previousConn = DatabaseHel...
void function(Connection c) { if (settingsInterface != null) { settingsInterface.reconnect(); } c.selected = (c.selected) ? false : true; if (c.selected) { Connection previousConn = DatabaseHelper.getInstance().getSelectedConnection(); if (previousConn != null) { previousConn.selected = false; DatabaseHelper.getInstanc...
/** * Switched the selection status of the connection by setting the previous * connection to unselected if the selected one is set as selected. * * @param c */
Switched the selection status of the connection by setting the previous connection to unselected if the selected one is set as selected
setConnectionActive
{ "repo_name": "1stsetup/TVHClient", "path": "src/org/tvheadend/tvhclient/fragments/SettingsShowConnectionsFragment.java", "license": "gpl-3.0", "size": 10533 }
[ "org.tvheadend.tvhclient.DatabaseHelper", "org.tvheadend.tvhclient.model.Connection" ]
import org.tvheadend.tvhclient.DatabaseHelper; import org.tvheadend.tvhclient.model.Connection;
import org.tvheadend.tvhclient.*; import org.tvheadend.tvhclient.model.*;
[ "org.tvheadend.tvhclient" ]
org.tvheadend.tvhclient;
2,759,612
public ServiceFuture<Map<String, Integer>> getIntegerValidAsync(final ServiceCallback<Map<String, Integer>> serviceCallback) { return ServiceFuture.fromResponse(getIntegerValidWithServiceResponseAsync(), serviceCallback); }
ServiceFuture<Map<String, Integer>> function(final ServiceCallback<Map<String, Integer>> serviceCallback) { return ServiceFuture.fromResponse(getIntegerValidWithServiceResponseAsync(), serviceCallback); }
/** * Get integer dictionary value {"0": 1, "1": -1, "2": 3, "3": 300}. * * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArgumentException thrown if parameters fail the validation * @return the {@link ServiceFuture} object */
Get integer dictionary value {"0": 1, "1": -1, "2": 3, "3": 300}
getIntegerValidAsync
{ "repo_name": "balajikris/autorest", "path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/bodydictionary/implementation/DictionarysImpl.java", "license": "mit", "size": 243390 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture", "java.util.Map" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import java.util.Map;
import com.microsoft.rest.*; import java.util.*;
[ "com.microsoft.rest", "java.util" ]
com.microsoft.rest; java.util;
1,317,376
EClass getTProvide();
EClass getTProvide();
/** * Returns the meta object for class '{@link org.eclipse.bpel.apache.ode.deploy.model.dd.TProvide <em>TProvide</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>TProvide</em>'. * @see org.eclipse.bpel.apache.ode.deploy.model.dd.TProvide * @generated */
Returns the meta object for class '<code>org.eclipse.bpel.apache.ode.deploy.model.dd.TProvide TProvide</code>'.
getTProvide
{ "repo_name": "Drifftr/devstudio-tooling-bps", "path": "plugins/org.eclipse.bpel.apache.ode.deploy.model/src/org/eclipse/bpel/apache/ode/deploy/model/dd/ddPackage.java", "license": "apache-2.0", "size": 68076 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,518,231
@Modified protected void modified(final BundleContext bundleContext, final ResourceResolverFactoryConfig config) { this.deactivate(); this.activate(bundleContext, config); }
void function(final BundleContext bundleContext, final ResourceResolverFactoryConfig config) { this.deactivate(); this.activate(bundleContext, config); }
/** * Modifies this component (called by SCR to update this component) */
Modifies this component (called by SCR to update this component)
modified
{ "repo_name": "mikibrv/sling", "path": "bundles/resourceresolver/src/main/java/org/apache/sling/resourceresolver/impl/ResourceResolverFactoryActivator.java", "license": "apache-2.0", "size": 25217 }
[ "org.osgi.framework.BundleContext" ]
import org.osgi.framework.BundleContext;
import org.osgi.framework.*;
[ "org.osgi.framework" ]
org.osgi.framework;
2,458,820
public static long readFsRightsInheriting(Node node, WasmMemory memory, int address) { return memory.load_i64(node, address + 16); }
static long function(Node node, WasmMemory memory, int address) { return memory.load_i64(node, address + 16); }
/** * Reads maximum set of rights that may be installed on new file descriptors that are created * through this file descriptor, e.g., through {@code path_open}. */
Reads maximum set of rights that may be installed on new file descriptors that are created through this file descriptor, e.g., through path_open
readFsRightsInheriting
{ "repo_name": "smarr/Truffle", "path": "wasm/src/org.graalvm.wasm/src/org/graalvm/wasm/predefined/wasi/types/Fdstat.java", "license": "gpl-2.0", "size": 4411 }
[ "com.oracle.truffle.api.nodes.Node", "org.graalvm.wasm.memory.WasmMemory" ]
import com.oracle.truffle.api.nodes.Node; import org.graalvm.wasm.memory.WasmMemory;
import com.oracle.truffle.api.nodes.*; import org.graalvm.wasm.memory.*;
[ "com.oracle.truffle", "org.graalvm.wasm" ]
com.oracle.truffle; org.graalvm.wasm;
1,585,308
public static void checkArgument( boolean expression, @Nullable String errorMessageTemplate, @Nullable Object... errorMessageArgs) { if (!expression) { throw new IllegalArgumentException(format(errorMessageTemplate, errorMessageArgs)); } }
static void function( boolean expression, @Nullable String errorMessageTemplate, @Nullable Object... errorMessageArgs) { if (!expression) { throw new IllegalArgumentException(format(errorMessageTemplate, errorMessageArgs)); } }
/** * Ensures the truth of an expression involving one or more parameters to the calling method. * * @param expression a boolean expression * @param errorMessageTemplate a template for the exception message should the check fail. The * message is formed by ...
Ensures the truth of an expression involving one or more parameters to the calling method
checkArgument
{ "repo_name": "cymcsg/UltimateAndroid", "path": "UltimateAndroid/ultimateandroid/src/main/java/com/marshalchen/ua/common/commonUtils/basicUtils/Preconditions.java", "license": "apache-2.0", "size": 52256 }
[ "android.support.annotation.Nullable" ]
import android.support.annotation.Nullable;
import android.support.annotation.*;
[ "android.support" ]
android.support;
1,040,348
private static void applyInvokeWithSecurityPolicy(Arguments args, Credentials peer, String peerSecurityContext) throws ZygoteSecurityException { int peerUid = peer.getUid(); if (args.invokeWith != null && peerUid != 0) { throw new ZygoteSecurityException("Peer is...
static void function(Arguments args, Credentials peer, String peerSecurityContext) throws ZygoteSecurityException { int peerUid = peer.getUid(); if (args.invokeWith != null && peerUid != 0) { throw new ZygoteSecurityException(STR + STR); } if (args.invokeWith != null) { boolean allowed = SELinux.checkSELinuxAccess(peer...
/** * Applies zygote security policy. * Based on the credentials of the process issuing a zygote command: * <ol> * <li> uid 0 (root) may specify --invoke-with to launch Zygote with a * wrapper command. * <li> Any other uid may not specify any invoke-with argument. * </ul> * ...
Applies zygote security policy. Based on the credentials of the process issuing a zygote command: uid 0 (root) may specify --invoke-with to launch Zygote with a wrapper command. Any other uid may not specify any invoke-with argument.
applyInvokeWithSecurityPolicy
{ "repo_name": "indashnet/InDashNet.Open.UN2000", "path": "android/frameworks/base/core/java/com/android/internal/os/ZygoteConnection.java", "license": "apache-2.0", "size": 39416 }
[ "android.net.Credentials", "android.os.SELinux" ]
import android.net.Credentials; import android.os.SELinux;
import android.net.*; import android.os.*;
[ "android.net", "android.os" ]
android.net; android.os;
1,584,391
public List<String> getParameters() { return super.getParameters(); }
List<String> function() { return super.getParameters(); }
/** * Gets parameters in the order they were inserted. * No safety precautions, should only be used in messaging * between system components (never for user input). */
Gets parameters in the order they were inserted. No safety precautions, should only be used in messaging between system components (never for user input)
getParameters
{ "repo_name": "ilarischeinin/chipster", "path": "src/main/java/fi/csc/microarray/messaging/message/CommandMessage.java", "license": "gpl-3.0", "size": 3617 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,012,240
@Test public void testComplexTemplateWithDefaultAndPrefixResolved() { System.setProperty("simple", "value"); ExpressionTemplate t = new ExpressionTemplate("a${simple:c}"); assertEquals("a" + StringUtils.createKey(0), t.getTemplate()); assertEquals(1, t.getEntities().size()); asser...
void function() { System.setProperty(STR, "value"); ExpressionTemplate t = new ExpressionTemplate(STR); assertEquals("a" + StringUtils.createKey(0), t.getTemplate()); assertEquals(1, t.getEntities().size()); assertEquals(STR, t.getEntities().get(StringUtils.createKey(0)).getKey()); assertEquals(STR, t.getSubstitution()...
/** * Test a complex template with a default value and prefix resolved */
Test a complex template with a default value and prefix resolved
testComplexTemplateWithDefaultAndPrefixResolved
{ "repo_name": "jandsu/ironjacamar", "path": "testsuite/src/test/java/org/ironjacamar/common/metadata/common/ExpressionTemplateTestCase.java", "license": "epl-1.0", "size": 33024 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
1,959,566
void filter(Direction direction, List<Header> headers);
void filter(Direction direction, List<Header> headers);
/** * This method filters (removes) headers from the given header list. * <i>Out</i> direction refers to processing headers from a Camel message to an * CXF message. <i>In</i> direction is the reverse direction. * * @param direction the direction of the processing * @param header...
This method filters (removes) headers from the given header list. Out direction refers to processing headers from a Camel message to an CXF message. In direction is the reverse direction
filter
{ "repo_name": "CandleCandle/camel", "path": "components/camel-cxf-transport/src/main/java/org/apache/camel/component/cxf/common/header/MessageHeaderFilter.java", "license": "apache-2.0", "size": 1669 }
[ "java.util.List", "org.apache.camel.spi.HeaderFilterStrategy", "org.apache.cxf.headers.Header" ]
import java.util.List; import org.apache.camel.spi.HeaderFilterStrategy; import org.apache.cxf.headers.Header;
import java.util.*; import org.apache.camel.spi.*; import org.apache.cxf.headers.*;
[ "java.util", "org.apache.camel", "org.apache.cxf" ]
java.util; org.apache.camel; org.apache.cxf;
999,778
private static PersonCassandra prepareData(String rowKey, int age) { PersonCassandra o = new PersonCassandra(); o.setPersonId(rowKey); o.setPersonName("karthik"); o.setAge(age); o.setDay(Day.friday); o.setMonth(Month.MAY); return o; }
static PersonCassandra function(String rowKey, int age) { PersonCassandra o = new PersonCassandra(); o.setPersonId(rowKey); o.setPersonName(STR); o.setAge(age); o.setDay(Day.friday); o.setMonth(Month.MAY); return o; }
/** * Prepare data. * * @param rowKey * the row key * @param age * the age * @return the person cassandra */
Prepare data
prepareData
{ "repo_name": "impetus-opensource/Kundera", "path": "src/kundera-cassandra/cassandra-ds-driver/src/test/java/com/impetus/client/crud/CassandraScalarQueriesTest.java", "license": "apache-2.0", "size": 10218 }
[ "com.impetus.client.crud.PersonCassandra" ]
import com.impetus.client.crud.PersonCassandra;
import com.impetus.client.crud.*;
[ "com.impetus.client" ]
com.impetus.client;
1,834,918
ImagePrediction detectImage(UUID projectId, String publishedName, byte[] imageData, DetectImageOptionalParameter detectImageOptionalParameter);
ImagePrediction detectImage(UUID projectId, String publishedName, byte[] imageData, DetectImageOptionalParameter detectImageOptionalParameter);
/** * Detect objects in an image and saves the result. * * @param projectId The project id. * @param publishedName Specifies the name of the model to evaluate against. * @param imageData Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports images up to 4MB. * @param d...
Detect objects in an image and saves the result
detectImage
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/cognitiveservices/ms-azure-cs-customvision-prediction/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/prediction/Predictions.java", "license": "mit", "size": 38351 }
[ "com.microsoft.azure.cognitiveservices.vision.customvision.prediction.models.DetectImageOptionalParameter", "com.microsoft.azure.cognitiveservices.vision.customvision.prediction.models.ImagePrediction" ]
import com.microsoft.azure.cognitiveservices.vision.customvision.prediction.models.DetectImageOptionalParameter; import com.microsoft.azure.cognitiveservices.vision.customvision.prediction.models.ImagePrediction;
import com.microsoft.azure.cognitiveservices.vision.customvision.prediction.models.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
1,305,339
public static boolean safelyTradeBetweenInventories(Inventory formerInventory, ItemStack[] formerItems, Inventory latterInventory, ItemStack[] latterItems) { Preconditions.checkArgument(isValidInventory(formerInventory)); Preconditions.checkArgument(isValidInventory(latterInventory)); Inventory f...
static boolean function(Inventory formerInventory, ItemStack[] formerItems, Inventory latterInventory, ItemStack[] latterItems) { Preconditions.checkArgument(isValidInventory(formerInventory)); Preconditions.checkArgument(isValidInventory(latterInventory)); Inventory formerClone = InventoryAPI.cloneInventory(formerInve...
/** * Will safely trade items between inventories. If not all items are traded, the trade is cancelled. * * @param formerInventory The first inventory. * @param formerItems The items to trade from the first inventory to give to the second inventory. * @param latterInventory The second inventory. * @param la...
Will safely trade items between inventories. If not all items are traded, the trade is cancelled
safelyTradeBetweenInventories
{ "repo_name": "psygate/CivModCore", "path": "src/main/java/vg/civcraft/mc/civmodcore/api/InventoryAPI.java", "license": "bsd-3-clause", "size": 13556 }
[ "com.google.common.base.Preconditions", "org.bukkit.inventory.Inventory", "org.bukkit.inventory.ItemStack" ]
import com.google.common.base.Preconditions; import org.bukkit.inventory.Inventory; import org.bukkit.inventory.ItemStack;
import com.google.common.base.*; import org.bukkit.inventory.*;
[ "com.google.common", "org.bukkit.inventory" ]
com.google.common; org.bukkit.inventory;
1,276,566
File createTmpFile(Block b) throws IOException { File f = new File(tmpDir, b.getBlockName()); return DatanodeUtil.createTmpFile(b, f); }
File createTmpFile(Block b) throws IOException { File f = new File(tmpDir, b.getBlockName()); return DatanodeUtil.createTmpFile(b, f); }
/** * Temporary files. They get moved to the finalized block directory when * the block is finalized. */
Temporary files. They get moved to the finalized block directory when the block is finalized
createTmpFile
{ "repo_name": "ZhangXFeng/hadoop", "path": "src/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/BlockPoolSlice.java", "license": "apache-2.0", "size": 23288 }
[ "java.io.File", "java.io.IOException", "org.apache.hadoop.hdfs.protocol.Block", "org.apache.hadoop.hdfs.server.datanode.DatanodeUtil" ]
import java.io.File; import java.io.IOException; import org.apache.hadoop.hdfs.protocol.Block; import org.apache.hadoop.hdfs.server.datanode.DatanodeUtil;
import java.io.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.server.datanode.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
2,626,472
private void uninstallKeyboardShortcuts(RSyntaxTextArea textArea) { InputMap im = textArea.getInputMap(); ActionMap am = textArea.getActionMap(); int c = textArea.getToolkit().getMenuShortcutKeyMask(); int shift = InputEvent.SHIFT_MASK; im.remove(KeyStroke.getKeyStroke(KeyEvent.VK_O, c|shift)); ...
void function(RSyntaxTextArea textArea) { InputMap im = textArea.getInputMap(); ActionMap am = textArea.getActionMap(); int c = textArea.getToolkit().getMenuShortcutKeyMask(); int shift = InputEvent.SHIFT_MASK; im.remove(KeyStroke.getKeyStroke(KeyEvent.VK_O, c shift)); am.remove(STR); } private static class ImportToAdd...
/** * Uninstalls any keyboard shortcuts specific to this language support. * * @param textArea The text area to uninstall the actions from. */
Uninstalls any keyboard shortcuts specific to this language support
uninstallKeyboardShortcuts
{ "repo_name": "ZenHarbinger/RSTALanguageSupport", "path": "src/main/java/org/fife/rsta/ac/java/JavaLanguageSupport.java", "license": "bsd-3-clause", "size": 18726 }
[ "java.awt.event.InputEvent", "java.awt.event.KeyEvent", "java.beans.PropertyChangeListener", "javax.swing.ActionMap", "javax.swing.InputMap", "javax.swing.KeyStroke", "org.fife.ui.rsyntaxtextarea.RSyntaxTextArea" ]
import java.awt.event.InputEvent; import java.awt.event.KeyEvent; import java.beans.PropertyChangeListener; import javax.swing.ActionMap; import javax.swing.InputMap; import javax.swing.KeyStroke; import org.fife.ui.rsyntaxtextarea.RSyntaxTextArea;
import java.awt.event.*; import java.beans.*; import javax.swing.*; import org.fife.ui.rsyntaxtextarea.*;
[ "java.awt", "java.beans", "javax.swing", "org.fife.ui" ]
java.awt; java.beans; javax.swing; org.fife.ui;
588,658
public AddLocationPage clickOnAddButton() { addButton.click(); LogManager.info("'+Add'button has been clicked"); return new AddLocationPage(); }
AddLocationPage function() { addButton.click(); LogManager.info(STR); return new AddLocationPage(); }
/** * Clicks on "(+)Add" button. * @return a new "Add Location" page. */
Clicks on "(+)Add" button
clickOnAddButton
{ "repo_name": "hcoca/RMAutomationUIFramework", "path": "Projects/RMAutomationUIFramework/src/main/java/org/fundacionjala/automation/framework/pages/admin/locations/LocationPage.java", "license": "cc0-1.0", "size": 6993 }
[ "org.fundacionjala.automation.framework.utils.common.LogManager" ]
import org.fundacionjala.automation.framework.utils.common.LogManager;
import org.fundacionjala.automation.framework.utils.common.*;
[ "org.fundacionjala.automation" ]
org.fundacionjala.automation;
1,995,808
final Credentials[] provider = new Credentials[1]; Subject subj = SecuritySupport.getSubject(); final String currentUser = previous.isPresent() ? previous.get().getUsername() : subj == null ? null : SecuritySupport.getSubjectName(subj); org.eclipse.swt.widgets.Display.getDefault().sy...
final Credentials[] provider = new Credentials[1]; Subject subj = SecuritySupport.getSubject(); final String currentUser = previous.isPresent() ? previous.get().getUsername() : subj == null ? null : SecuritySupport.getSubjectName(subj); org.eclipse.swt.widgets.Display.getDefault().syncExec(() -> { String username = nul...
/** * Loads the username and password from the preferences or shows the dialog where user can enter his credentials. * * @param previous version of credentials that did not work * @return credentials if confirmed or an empty object if cancelled */
Loads the username and password from the preferences or shows the dialog where user can enter his credentials
getCredentials
{ "repo_name": "css-iter/cs-studio", "path": "applications/saverestore/saverestore-plugins/org.csstudio.saverestore.git/src/org/csstudio/saverestore/git/CredentialUtilities.java", "license": "epl-1.0", "size": 7762 }
[ "java.util.Optional", "javax.security.auth.Subject", "org.csstudio.security.SecuritySupport", "org.csstudio.ui.fx.util.Credentials", "org.csstudio.ui.fx.util.UsernameAndPasswordDialog", "org.eclipse.ui.PlatformUI" ]
import java.util.Optional; import javax.security.auth.Subject; import org.csstudio.security.SecuritySupport; import org.csstudio.ui.fx.util.Credentials; import org.csstudio.ui.fx.util.UsernameAndPasswordDialog; import org.eclipse.ui.PlatformUI;
import java.util.*; import javax.security.auth.*; import org.csstudio.security.*; import org.csstudio.ui.fx.util.*; import org.eclipse.ui.*;
[ "java.util", "javax.security", "org.csstudio.security", "org.csstudio.ui", "org.eclipse.ui" ]
java.util; javax.security; org.csstudio.security; org.csstudio.ui; org.eclipse.ui;
2,608,747
public static ParallelExecutionQueue forGPUs(ArrayList<StartNativeProcessGpuTask> tasks) throws NeuralDecoderException { return executeStartTasks(tasks); }
static ParallelExecutionQueue function(ArrayList<StartNativeProcessGpuTask> tasks) throws NeuralDecoderException { return executeStartTasks(tasks); }
/** * This method launches multiple NeuralDecoder processes that must be run on GPU * and returns the list of NativeProcess objects to interact with them. * * @param tasks a list of StartNativeProcessGpuTask to execute * @return the list of NativeProcess object resulting from the execution of a...
This method launches multiple NeuralDecoder processes that must be run on GPU and returns the list of NativeProcess objects to interact with them
forGPUs
{ "repo_name": "letconex/MMT", "path": "src/decoder-neural/src/main/java/eu/modernmt/decoder/neural/execution/ParallelExecutionQueue.java", "license": "apache-2.0", "size": 4958 }
[ "eu.modernmt.decoder.neural.NeuralDecoderException", "java.util.ArrayList" ]
import eu.modernmt.decoder.neural.NeuralDecoderException; import java.util.ArrayList;
import eu.modernmt.decoder.neural.*; import java.util.*;
[ "eu.modernmt.decoder", "java.util" ]
eu.modernmt.decoder; java.util;
440,134
@Test() public void testConstructor7() throws Exception { Control[] controls = { new Control("1.2.3.4"), new Control("1.2.3.5", true, null) }; CompareRequest compareRequest = new CompareRequest(new DN("dc=example,dc=com"), "description", "foo", ...
@Test() void function() throws Exception { Control[] controls = { new Control(STR), new Control(STR, true, null) }; CompareRequest compareRequest = new CompareRequest(new DN(STR), STR, "foo", controls); compareRequest = compareRequest.duplicate(); assertNotNull(compareRequest.getDN()); assertEquals(compareRequest.getDN...
/** * Tests the seventh constructor, which takes a DN object, string attribute * name and assertion value, and set of controls. * * @throws Exception If an unexpected problem occurs. */
Tests the seventh constructor, which takes a DN object, string attribute name and assertion value, and set of controls
testConstructor7
{ "repo_name": "UnboundID/ldapsdk", "path": "tests/unit/src/com/unboundid/ldap/sdk/CompareRequestTestCase.java", "license": "gpl-2.0", "size": 23284 }
[ "java.util.ArrayList", "java.util.Arrays", "org.testng.annotations.Test" ]
import java.util.ArrayList; import java.util.Arrays; import org.testng.annotations.Test;
import java.util.*; import org.testng.annotations.*;
[ "java.util", "org.testng.annotations" ]
java.util; org.testng.annotations;
2,373,535
public static ResourceId convertUriToRid(String uri) { ResourceData resourceData = convertJsonToDataNode(uri, null); return resourceData.resourceId(); }
static ResourceId function(String uri) { ResourceData resourceData = convertJsonToDataNode(uri, null); return resourceData.resourceId(); }
/** * Convert URI to ResourceId. * * @param uri URI of the data resource * @return resource identifier */
Convert URI to ResourceId
convertUriToRid
{ "repo_name": "sdnwiselab/onos", "path": "apps/restconf/utils/src/main/java/org/onosproject/restconf/utils/RestconfUtils.java", "license": "apache-2.0", "size": 6207 }
[ "org.onosproject.yang.model.ResourceData", "org.onosproject.yang.model.ResourceId" ]
import org.onosproject.yang.model.ResourceData; import org.onosproject.yang.model.ResourceId;
import org.onosproject.yang.model.*;
[ "org.onosproject.yang" ]
org.onosproject.yang;
174,082
List<AbstractStorageLabel<?>> getAllLabels();
List<AbstractStorageLabel<?>> getAllLabels();
/** * Returns all labels registered on the CMR. * * @return Returns all labels registered on the CMR. */
Returns all labels registered on the CMR
getAllLabels
{ "repo_name": "mariusoe/inspectIT", "path": "inspectit.server/src/main/java/rocks/inspectit/server/dao/StorageDataDao.java", "license": "agpl-3.0", "size": 4366 }
[ "java.util.List", "rocks.inspectit.shared.cs.storage.label.AbstractStorageLabel" ]
import java.util.List; import rocks.inspectit.shared.cs.storage.label.AbstractStorageLabel;
import java.util.*; import rocks.inspectit.shared.cs.storage.label.*;
[ "java.util", "rocks.inspectit.shared" ]
java.util; rocks.inspectit.shared;
1,175,602
@ApiModelProperty(value = "Link to the previous subset of resources qualified. \n" + "Empty if current subset is the first subset returned.") @JsonProperty("previous") public String getPrevious() { return previous; }
@ApiModelProperty(value = STR + STR) @JsonProperty(STR) String function() { return previous; }
/** * Link to the previous subset of resources qualified. \nEmpty if current subset is the first subset returned. */
Link to the previous subset of resources qualified. \nEmpty if current subset is the first subset returned
getPrevious
{ "repo_name": "charithag/carbon-device-mgt", "path": "components/certificate-mgt/org.wso2.carbon.certificate.mgt.cert.admin.v09.api/src/main/java/org/wso2/carbon/certificate/mgt/cert/jaxrs/api/beans/BasePaginatedResult.java", "license": "apache-2.0", "size": 2150 }
[ "com.fasterxml.jackson.annotation.JsonProperty", "io.swagger.annotations.ApiModelProperty" ]
import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.annotations.ApiModelProperty;
import com.fasterxml.jackson.annotation.*; import io.swagger.annotations.*;
[ "com.fasterxml.jackson", "io.swagger.annotations" ]
com.fasterxml.jackson; io.swagger.annotations;
1,254,048
public void terminate() throws InterruptedException, IOException { final Computer computer = toComputer(); if (computer != null) { computer.recordTermination(); } try { // TODO: send the output to somewhere real _terminate(new StreamTaskListener(Sy...
void function() throws InterruptedException, IOException { final Computer computer = toComputer(); if (computer != null) { computer.recordTermination(); } try { _terminate(new StreamTaskListener(System.out, Charset.defaultCharset())); } finally { try { Jenkins.getInstance().removeNode(this); } catch (IOException e) { L...
/** * Releases and removes this slave. */
Releases and removes this slave
terminate
{ "repo_name": "ns163/jenkins", "path": "core/src/main/java/hudson/slaves/AbstractCloudSlave.java", "license": "mit", "size": 3616 }
[ "hudson.model.Computer", "hudson.util.StreamTaskListener", "java.io.IOException", "java.nio.charset.Charset", "java.util.logging.Level" ]
import hudson.model.Computer; import hudson.util.StreamTaskListener; import java.io.IOException; import java.nio.charset.Charset; import java.util.logging.Level;
import hudson.model.*; import hudson.util.*; import java.io.*; import java.nio.charset.*; import java.util.logging.*;
[ "hudson.model", "hudson.util", "java.io", "java.nio", "java.util" ]
hudson.model; hudson.util; java.io; java.nio; java.util;
1,517,974
private Property processXmlAttribute(XmlAttribute xmlAttribute, Property oldProperty, TypeInfo typeInfo, NamespaceInfo nsInfo, JavaType javaType) { // reset any existing values resetProperty(oldProperty, typeInfo); // handle xml-id if (xmlAttribute.isXmlId()) { oldProper...
Property function(XmlAttribute xmlAttribute, Property oldProperty, TypeInfo typeInfo, NamespaceInfo nsInfo, JavaType javaType) { resetProperty(oldProperty, typeInfo); if (xmlAttribute.isXmlId()) { oldProperty.setIsXmlId(true); oldProperty.setIsXmlIdExtension(true); typeInfo.setIDProperty(oldProperty); } else { if (type...
/** * XmlAttribute override will completely replace the existing values. * * @param xmlAttribute * @param oldProperty * @param nsInfo * @return */
XmlAttribute override will completely replace the existing values
processXmlAttribute
{ "repo_name": "RallySoftware/eclipselink.runtime", "path": "moxy/org.eclipse.persistence.moxy/src/org/eclipse/persistence/jaxb/compiler/XMLProcessor.java", "license": "epl-1.0", "size": 103686 }
[ "javax.xml.bind.JAXBElement", "javax.xml.namespace.QName", "org.eclipse.persistence.internal.oxm.Constants", "org.eclipse.persistence.jaxb.javamodel.JavaClass", "org.eclipse.persistence.jaxb.xmlmodel.JavaType", "org.eclipse.persistence.jaxb.xmlmodel.XmlAbstractNullPolicy", "org.eclipse.persistence.jaxb....
import javax.xml.bind.JAXBElement; import javax.xml.namespace.QName; import org.eclipse.persistence.internal.oxm.Constants; import org.eclipse.persistence.jaxb.javamodel.JavaClass; import org.eclipse.persistence.jaxb.xmlmodel.JavaType; import org.eclipse.persistence.jaxb.xmlmodel.XmlAbstractNullPolicy; import org.eclip...
import javax.xml.bind.*; import javax.xml.namespace.*; import org.eclipse.persistence.internal.oxm.*; import org.eclipse.persistence.jaxb.javamodel.*; import org.eclipse.persistence.jaxb.xmlmodel.*;
[ "javax.xml", "org.eclipse.persistence" ]
javax.xml; org.eclipse.persistence;
339,952
private void LoadSelections() { final SharedPreferences settingsActivity = getPreferences(MODE_PRIVATE); if (settingsActivity.contains(String.valueOf(reqDB))) { final String savedItems = settingsActivity.getString( String.valueOf(reqDB), ""); selectedItems.addAll(Arrays.asList(savedItems.split(",")));...
void function() { final SharedPreferences settingsActivity = getPreferences(MODE_PRIVATE); if (settingsActivity.contains(String.valueOf(reqDB))) { final String savedItems = settingsActivity.getString( String.valueOf(reqDB), STR,"))); final int count = mainListView.getAdapter().getCount(); for (int i = 0; i < count; i++...
/** * load all the selection preferences */
load all the selection preferences
LoadSelections
{ "repo_name": "clebi/PickMeal", "path": "src/com/pickmeal/Category.java", "license": "gpl-3.0", "size": 5086 }
[ "android.content.SharedPreferences", "com.data.ProductBase" ]
import android.content.SharedPreferences; import com.data.ProductBase;
import android.content.*; import com.data.*;
[ "android.content", "com.data" ]
android.content; com.data;
2,778,233
public String[] getList(String uuid, String path, Registry registry) { try { String[] lifeCycleList = GovernanceUtils.getAvailableAspects(); if (lifeCycleList != null) { List<String> output = new ArrayList<String>(Arrays.asList(lifeCycleList)); output....
String[] function(String uuid, String path, Registry registry) { try { String[] lifeCycleList = GovernanceUtils.getAvailableAspects(); if (lifeCycleList != null) { List<String> output = new ArrayList<String>(Arrays.asList(lifeCycleList)); output.add(0, "None"); return output.toArray(new String[output.size()]); } } catc...
/** * Method to obtain the list of strings to be displayed and this method only used in publisher. * * @param uuid UUID of the resource. * @param path The HTTP servlet configuration. * @param registry The Registry instance * @return the list of strings. */
Method to obtain the list of strings to be displayed and this method only used in publisher
getList
{ "repo_name": "laki88/carbon-governance", "path": "components/governance/org.wso2.carbon.governance.generic.ui/src/main/java/org/wso2/carbon/governance/generic/ui/utils/LifecycleListPopulator.java", "license": "apache-2.0", "size": 3328 }
[ "java.util.ArrayList", "java.util.Arrays", "java.util.List", "org.wso2.carbon.governance.api.util.GovernanceUtils", "org.wso2.carbon.registry.core.Registry", "org.wso2.carbon.registry.core.exceptions.RegistryException" ]
import java.util.ArrayList; import java.util.Arrays; import java.util.List; import org.wso2.carbon.governance.api.util.GovernanceUtils; import org.wso2.carbon.registry.core.Registry; import org.wso2.carbon.registry.core.exceptions.RegistryException;
import java.util.*; import org.wso2.carbon.governance.api.util.*; import org.wso2.carbon.registry.core.*; import org.wso2.carbon.registry.core.exceptions.*;
[ "java.util", "org.wso2.carbon" ]
java.util; org.wso2.carbon;
719,486
public void writeTo(DataOutputStream out) throws IOException, InterruptedException;
void function(DataOutputStream out) throws IOException, InterruptedException;
/** * Write the next chunk of data to the Bluetooth socket. Called repeatedly * by the Bluetooth write thread. */
Write the next chunk of data to the Bluetooth socket. Called repeatedly by the Bluetooth write thread
writeTo
{ "repo_name": "talah/BBTH", "path": "engineSrc/bbth/engine/net/bluetooth/Protocol.java", "license": "mit", "size": 673 }
[ "java.io.DataOutputStream", "java.io.IOException" ]
import java.io.DataOutputStream; import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,501,385
@Idempotent Stream<BatchingVisitable<RowResult<byte[]>>> getRangesLazy( TableReference tableRef, Iterable<RangeRequest> rangeRequests);
Stream<BatchingVisitable<RowResult<byte[]>>> getRangesLazy( TableReference tableRef, Iterable<RangeRequest> rangeRequests);
/** * Returns visitibles that scan the provided ranges. This does no pre-fetching so visiting the resulting * visitibles will incur database reads on first access. * * Streams and visitables must be read within the scope of this transaction. */
Returns visitibles that scan the provided ranges. This does no pre-fetching so visiting the resulting visitibles will incur database reads on first access. Streams and visitables must be read within the scope of this transaction
getRangesLazy
{ "repo_name": "palantir/atlasdb", "path": "atlasdb-api/src/main/java/com/palantir/atlasdb/transaction/api/Transaction.java", "license": "apache-2.0", "size": 19445 }
[ "com.palantir.atlasdb.keyvalue.api.RangeRequest", "com.palantir.atlasdb.keyvalue.api.RowResult", "com.palantir.atlasdb.keyvalue.api.TableReference", "com.palantir.common.base.BatchingVisitable", "java.util.stream.Stream" ]
import com.palantir.atlasdb.keyvalue.api.RangeRequest; import com.palantir.atlasdb.keyvalue.api.RowResult; import com.palantir.atlasdb.keyvalue.api.TableReference; import com.palantir.common.base.BatchingVisitable; import java.util.stream.Stream;
import com.palantir.atlasdb.keyvalue.api.*; import com.palantir.common.base.*; import java.util.stream.*;
[ "com.palantir.atlasdb", "com.palantir.common", "java.util" ]
com.palantir.atlasdb; com.palantir.common; java.util;
488,151
public boolean isWordPart(char c) { //ok, we have to test for scientific notation e.g.: 10.9e10 if ((c == 'x' || c == 'X') && buffer.length() == 1 && buffer.charAt(0) == '0') { //it is an hexadecimal buffer.append(c); isInHexa = true; ...
boolean function(char c) { if ((c == 'x' c == 'X') && buffer.length() == 1 && buffer.charAt(0) == '0') { buffer.append(c); isInHexa = true; return true; } else { buffer.append(c); } if (isInHexa) { return Character.isDigit(c) c == 'a' c == 'A' c == 'b' c == 'B' c == 'c' c == 'C' c == 'd' c == 'D' c == 'e' c == 'E' c ==...
/** * Check if we are still in the number */
Check if we are still in the number
isWordPart
{ "repo_name": "siddhika1889/Pydev-Editor", "path": "src/org/python/pydev/editor/PyCodeScanner.java", "license": "epl-1.0", "size": 8726 }
[ "org.python.pydev.shared_core.callbacks.ICallbackListener", "org.python.pydev.ui.ColorAndStyleCache" ]
import org.python.pydev.shared_core.callbacks.ICallbackListener; import org.python.pydev.ui.ColorAndStyleCache;
import org.python.pydev.shared_core.callbacks.*; import org.python.pydev.ui.*;
[ "org.python.pydev" ]
org.python.pydev;
1,253,914
return this.endpoint; } private final WebPubSubServiceVersion serviceVersion;
return this.endpoint; } private final WebPubSubServiceVersion serviceVersion;
/** * Gets HTTP or HTTPS endpoint for the Web PubSub service instance. * * @return the endpoint value. */
Gets HTTP or HTTPS endpoint for the Web PubSub service instance
getEndpoint
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/webpubsub/azure-messaging-webpubsub/src/main/java/com/azure/messaging/webpubsub/implementation/AzureWebPubSubServiceRestApiImpl.java", "license": "mit", "size": 4708 }
[ "com.azure.messaging.webpubsub.WebPubSubServiceVersion" ]
import com.azure.messaging.webpubsub.WebPubSubServiceVersion;
import com.azure.messaging.webpubsub.*;
[ "com.azure.messaging" ]
com.azure.messaging;
116,521
public UInt8Array decrypt(UInt8Array encrypted) { throw new SubclassResponsibilityException(); }
UInt8Array function(UInt8Array encrypted) { throw new SubclassResponsibilityException(); }
/** * Decrypt data with the current private key. */
Decrypt data with the current private key
decrypt
{ "repo_name": "jonesd/udanax-gold2java", "path": "abora-gold/src/generated-sources/translator/info/dgjones/abora/gold/lock/Encrypter.java", "license": "mit", "size": 12135 }
[ "info.dgjones.abora.gold.collection.basic.UInt8Array", "info.dgjones.abora.gold.java.exception.SubclassResponsibilityException" ]
import info.dgjones.abora.gold.collection.basic.UInt8Array; import info.dgjones.abora.gold.java.exception.SubclassResponsibilityException;
import info.dgjones.abora.gold.collection.basic.*; import info.dgjones.abora.gold.java.exception.*;
[ "info.dgjones.abora" ]
info.dgjones.abora;
1,743,587
public ServiceFuture<Void> beginDeleteAsync(String resourceGroupName, String networkWatcherName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, networkWatcherName), serviceCallback); }
ServiceFuture<Void> function(String resourceGroupName, String networkWatcherName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(beginDeleteWithServiceResponseAsync(resourceGroupName, networkWatcherName), serviceCallback); }
/** * Deletes the specified network watcher resource. * * @param resourceGroupName The name of the resource group. * @param networkWatcherName The name of the network watcher. * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @throws IllegalArg...
Deletes the specified network watcher resource
beginDeleteAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/network/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/network/v2020_03_01/implementation/NetworkWatchersInner.java", "license": "mit", "size": 190989 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
2,227,844
@Override public void onClick(View v) { if (group != null) { if (v.getId() == R.id.image) { ImageDialog dialog = ImageDialog.newInstance(group.getResponse().getGroup().getWikiImage()); dialog.show(getChildFragmentManager(), "image_dialog"); } else if (v.getId() == R.id.artist_a) { viewArtist.vie...
void function(View v) { if (group != null) { if (v.getId() == R.id.image) { ImageDialog dialog = ImageDialog.newInstance(group.getResponse().getGroup().getWikiImage()); dialog.show(getChildFragmentManager(), STR); } else if (v.getId() == R.id.artist_a) { viewArtist.viewArtist(group.getResponse().getGroup().getMusicInfo...
/** * When the image in the header is clicked toggle expand/hide on it */
When the image in the header is clicked toggle expand/hide on it
onClick
{ "repo_name": "stuxo/PTHAndroid", "path": "PTHAndroid/src/main/java/me/passtheheadphones/torrentgroup/group/TorrentGroupOverviewFragment.java", "license": "bsd-2-clause", "size": 6376 }
[ "android.view.View", "me.passtheheadphones.views.ImageDialog" ]
import android.view.View; import me.passtheheadphones.views.ImageDialog;
import android.view.*; import me.passtheheadphones.views.*;
[ "android.view", "me.passtheheadphones.views" ]
android.view; me.passtheheadphones.views;
2,130,540
public ModelPlayer getPlayerModel() { return (ModelPlayer)super.getMainModel(); }
ModelPlayer function() { return (ModelPlayer)super.getMainModel(); }
/** * returns the more specialized type of the model as the player model. */
returns the more specialized type of the model as the player model
getPlayerModel
{ "repo_name": "trixmot/mod1", "path": "build/tmp/recompileMc/sources/net/minecraft/client/renderer/entity/RenderPlayer.java", "license": "lgpl-2.1", "size": 11780 }
[ "net.minecraft.client.model.ModelPlayer" ]
import net.minecraft.client.model.ModelPlayer;
import net.minecraft.client.model.*;
[ "net.minecraft.client" ]
net.minecraft.client;
1,968,462
public Observable<ServiceResponse<Void>> deleteWithServiceResponseAsync(String resourceGroupName, String circuitName, String peeringName) { if (resourceGroupName == null) { throw new IllegalArgumentException("Parameter resourceGroupName is required and cannot be null."); } if (ci...
Observable<ServiceResponse<Void>> function(String resourceGroupName, String circuitName, String peeringName) { if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (circuitName == null) { throw new IllegalArgumentException(STR); } if (peeringName == null) { throw new IllegalArgumentException(S...
/** * Deletes the specified peering from the specified express route circuit. * * @param resourceGroupName The name of the resource group. * @param circuitName The name of the express route circuit. * @param peeringName The name of the peering. * @throws IllegalArgumentException thrown if ...
Deletes the specified peering from the specified express route circuit
deleteWithServiceResponseAsync
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/ExpressRouteCircuitPeeringsInner.java", "license": "mit", "size": 46944 }
[ "com.google.common.reflect.TypeToken", "com.microsoft.rest.ServiceResponse" ]
import com.google.common.reflect.TypeToken; import com.microsoft.rest.ServiceResponse;
import com.google.common.reflect.*; import com.microsoft.rest.*;
[ "com.google.common", "com.microsoft.rest" ]
com.google.common; com.microsoft.rest;
2,658,657
@Override public ESBDebugPoint getESBDebugPoint(EsbServer esbServer, IResource resource, AbstractMediator part, String commandArgument) throws ESBDebuggerException, CoreException { int lineNumber = -1; ESBInboundEndpointDebugPointMessage inboundDebugPoint = (ESBInboundEndpointDebugP...
ESBDebugPoint function(EsbServer esbServer, IResource resource, AbstractMediator part, String commandArgument) throws ESBDebuggerException, CoreException { int lineNumber = -1; ESBInboundEndpointDebugPointMessage inboundDebugPoint = (ESBInboundEndpointDebugPointMessage)getESBDebugPointMessage(esbServer, part, commandAr...
/** * This method returns the ESBDebugPoint object for the selection * * @throws ESBDebuggerException * @throws CoreException */
This method returns the ESBDebugPoint object for the selection
getESBDebugPoint
{ "repo_name": "nwnpallewela/devstudio-tooling-esb", "path": "plugins/org.wso2.developerstudio.eclipse.gmf.esb.diagram/src/org/wso2/developerstudio/eclipse/gmf/esb/diagram/debugger/debugpoint/builder/impl/InboundEndpointDebugPointBuilder.java", "license": "apache-2.0", "size": 5070 }
[ "org.eclipse.core.resources.IResource", "org.eclipse.core.runtime.CoreException", "org.wso2.developerstudio.eclipse.gmf.esb.EsbServer", "org.wso2.developerstudio.eclipse.gmf.esb.diagram.custom.AbstractMediator", "org.wso2.developerstudio.eclipse.gmf.esb.diagram.debugger.debugpoint.impl.ESBDebugPoint", "or...
import org.eclipse.core.resources.IResource; import org.eclipse.core.runtime.CoreException; import org.wso2.developerstudio.eclipse.gmf.esb.EsbServer; import org.wso2.developerstudio.eclipse.gmf.esb.diagram.custom.AbstractMediator; import org.wso2.developerstudio.eclipse.gmf.esb.diagram.debugger.debugpoint.impl.ESBDebu...
import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*; import org.wso2.developerstudio.eclipse.gmf.esb.*; import org.wso2.developerstudio.eclipse.gmf.esb.diagram.custom.*; import org.wso2.developerstudio.eclipse.gmf.esb.diagram.debugger.debugpoint.impl.*; import org.wso2.developerstudio.eclipse.gmf.esb...
[ "org.eclipse.core", "org.wso2.developerstudio" ]
org.eclipse.core; org.wso2.developerstudio;
2,544,832
public ParsedQuery parseQuery(BytesReference source) { try { ParsedQuery parsedQuery = null; XContentParser parser = XContentHelper.createParser(source); for (XContentParser.Token token = parser.nextToken(); token != XContentParser.Token.END_OBJECT; token = parser.nextTok...
ParsedQuery function(BytesReference source) { try { ParsedQuery parsedQuery = null; XContentParser parser = XContentHelper.createParser(source); for (XContentParser.Token token = parser.nextToken(); token != XContentParser.Token.END_OBJECT; token = parser.nextToken()) { if (token == XContentParser.Token.FIELD_NAME) { S...
/** * Selectively parses a query from a top level query or query_binary json field from the specified source. */
Selectively parses a query from a top level query or query_binary json field from the specified source
parseQuery
{ "repo_name": "zuoyebushiwo/elasticsearch1.7-study", "path": "src/main/java/org/elasticsearch/index/query/IndexQueryParserService.java", "license": "apache-2.0", "size": 15845 }
[ "org.elasticsearch.common.bytes.BytesReference", "org.elasticsearch.common.xcontent.XContentFactory", "org.elasticsearch.common.xcontent.XContentHelper", "org.elasticsearch.common.xcontent.XContentParser" ]
import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.common.xcontent.XContentHelper; import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.common.bytes.*; import org.elasticsearch.common.xcontent.*;
[ "org.elasticsearch.common" ]
org.elasticsearch.common;
1,118,829
public static int findInsertPosition( DesignElementHandle parent, DesignElementHandle element, String content ) { if ( element == null ) { return parent.getContentCount( content ); // SlotHandle slotHandle = parent.getSlot( slotID ); // if ( slotHandle != null ) // { // return slotHandle.getCo...
static int function( DesignElementHandle parent, DesignElementHandle element, String content ) { if ( element == null ) { return parent.getContentCount( content ); } return element.getIndex( ); }
/** * Find the position of the element. If the element is null, the position is * last * * @param parent * @param element * @param content * @return */
Find the position of the element. If the element is null, the position is last
findInsertPosition
{ "repo_name": "sguan-actuate/birt", "path": "UI/org.eclipse.birt.report.designer.core/src/org/eclipse/birt/report/designer/util/DEUtil.java", "license": "epl-1.0", "size": 91152 }
[ "org.eclipse.birt.report.model.api.DesignElementHandle" ]
import org.eclipse.birt.report.model.api.DesignElementHandle;
import org.eclipse.birt.report.model.api.*;
[ "org.eclipse.birt" ]
org.eclipse.birt;
1,870,386
public Transformation<?> translateToPlan(Planner planner) { return source.translateToPlan(planner); }
Transformation<?> function(Planner planner) { return source.translateToPlan(planner); }
/** * Translates this edge into a Flink operator. * * @param planner The {@link Planner} of the translated Table. */
Translates this edge into a Flink operator
translateToPlan
{ "repo_name": "tillrohrmann/flink", "path": "flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/ExecEdge.java", "license": "apache-2.0", "size": 8561 }
[ "org.apache.flink.api.dag.Transformation", "org.apache.flink.table.delegation.Planner" ]
import org.apache.flink.api.dag.Transformation; import org.apache.flink.table.delegation.Planner;
import org.apache.flink.api.dag.*; import org.apache.flink.table.delegation.*;
[ "org.apache.flink" ]
org.apache.flink;
130,127
return new Date(reset.getTime() * 1000); }
return new Date(reset.getTime() * 1000); }
/** * Non-epoch date */
Non-epoch date
getResetDate
{ "repo_name": "appbank2020/GitRobot", "path": "src/org/kohsuke/github/GHRateLimit.java", "license": "apache-2.0", "size": 776 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
616,885
public boolean hidePage(String pageId) throws SakaiException { EventTrackingService.post( EventTrackingService.newEvent(PAGE_HIDE, "/site/" + site.getId() + "/page/" + pageId, false)); return pageVisibilityHelper(pageId, false, true); }
boolean function(String pageId) throws SakaiException { EventTrackingService.post( EventTrackingService.newEvent(PAGE_HIDE, STR + site.getId() + STR + pageId, false)); return pageVisibilityHelper(pageId, false, true); }
/** * Hides a page from any user who doesn't have site.upd * Implies enabled * * @param pageId The Id of the Page * @return true for sucess, false for failuer * @throws IdUnusedException, PermissionException */
Hides a page from any user who doesn't have site.upd Implies enabled
hidePage
{ "repo_name": "OpenCollabZA/sakai", "path": "site-manage/pageorder/tool/src/java/org/sakaiproject/site/tool/helper/order/impl/SitePageEditHandler.java", "license": "apache-2.0", "size": 30830 }
[ "org.sakaiproject.event.cover.EventTrackingService", "org.sakaiproject.exception.SakaiException" ]
import org.sakaiproject.event.cover.EventTrackingService; import org.sakaiproject.exception.SakaiException;
import org.sakaiproject.event.cover.*; import org.sakaiproject.exception.*;
[ "org.sakaiproject.event", "org.sakaiproject.exception" ]
org.sakaiproject.event; org.sakaiproject.exception;
1,648,827
public static ZonedDateTime zonedDateTimeOf(final Date time) { return zonedDateTimeOf(time.getTime()); }
static ZonedDateTime function(final Date time) { return zonedDateTimeOf(time.getTime()); }
/** * Gets ZonedDateTime for Date. * * @param time Time object to be converted. * @return ZonedDateTime representing time */
Gets ZonedDateTime for Date
zonedDateTimeOf
{ "repo_name": "robertoschwald/cas", "path": "core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/DateTimeUtils.java", "license": "apache-2.0", "size": 9289 }
[ "java.time.ZonedDateTime", "java.util.Date" ]
import java.time.ZonedDateTime; import java.util.Date;
import java.time.*; import java.util.*;
[ "java.time", "java.util" ]
java.time; java.util;
1,959,683
public static <T> ArrayList<T> newArrayList() { return new ArrayList<T>(); }
static <T> ArrayList<T> function() { return new ArrayList<T>(); }
/** * new ArrayList * * @return */
new ArrayList
newArrayList
{ "repo_name": "mattxia/unique-web", "path": "src/main/java/org/unique/common/tools/CollectionUtil.java", "license": "apache-2.0", "size": 3172 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
280,403
private boolean checkAttributes(final Map<String, String> attributesMap) { if (attributesMap.keySet().size() == 1) { return false; } final String lastname = attributesMap.get(ShibbolethModule.getLastName()); final String firstname = attributesMap.get(ShibbolethModule.getF...
boolean function(final Map<String, String> attributesMap) { if (attributesMap.keySet().size() == 1) { return false; } final String lastname = attributesMap.get(ShibbolethModule.getLastName()); final String firstname = attributesMap.get(ShibbolethModule.getFirstName()); final String email = ShibbolethHelper.getFirstValu...
/** * Check if all required attributes are here. * * @param attributesMap * @return true if all required attributes are present, false otherwise. */
Check if all required attributes are here
checkAttributes
{ "repo_name": "huihoo/olat", "path": "OLAT-LMS/src/main/java/org/olat/presentation/security/authentication/shibboleth/ShibbolethDispatcher.java", "license": "apache-2.0", "size": 13468 }
[ "java.util.Map", "org.olat.lms.security.authentication.shibboleth.ShibbolethHelper", "org.olat.lms.security.authentication.shibboleth.ShibbolethModule" ]
import java.util.Map; import org.olat.lms.security.authentication.shibboleth.ShibbolethHelper; import org.olat.lms.security.authentication.shibboleth.ShibbolethModule;
import java.util.*; import org.olat.lms.security.authentication.shibboleth.*;
[ "java.util", "org.olat.lms" ]
java.util; org.olat.lms;
702,325