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
ConcreteType createUnionWithSubTypes(ConcreteType type) { Set<ConcreteType> set = null; if (type.isInstance()) { set = getSubTypes(type.toInstance()); } return ConcreteType.createForTypes(set).unionWith(type); }
ConcreteType createUnionWithSubTypes(ConcreteType type) { Set<ConcreteType> set = null; if (type.isInstance()) { set = getSubTypes(type.toInstance()); } return ConcreteType.createForTypes(set).unionWith(type); }
/** * Returns a ConcreteType that is the union of the given type and all of its * subtypes. This assumes that the passed in type is an instance type, * otherwise an empty set is returned. The returned set will be instance * types. */
Returns a ConcreteType that is the union of the given type and all of its subtypes. This assumes that the passed in type is an instance type, otherwise an empty set is returned. The returned set will be instance types
createUnionWithSubTypes
{ "repo_name": "110035/kissy", "path": "tools/module-compiler/src/com/google/javascript/jscomp/TightenTypes.java", "license": "mit", "size": 51320 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
2,162,118
public ClassFile getClassFile(String name) throws IOException { if (name.indexOf('.') > 0) { int i = name.lastIndexOf('.'); String pathname = name.replace('.', File.separatorChar) + ".class"; if (baseFileName.equals(pathname) || baseFileName.equals(pat...
ClassFile function(String name) throws IOException { if (name.indexOf('.') > 0) { int i = name.lastIndexOf('.'); String pathname = name.replace('.', File.separatorChar) + STR; if (baseFileName.equals(pathname) baseFileName.equals(pathname.substring(0, i) + "$" + pathname.substring(i+1, pathname.length()))) { return rea...
/** * Returns the ClassFile matching the given binary name * or a fully-qualified class name. */
Returns the ClassFile matching the given binary name or a fully-qualified class name
getClassFile
{ "repo_name": "FauxFaux/jdk9-langtools", "path": "src/jdk.jdeps/share/classes/com/sun/tools/jdeps/ClassFileReader.java", "license": "gpl-2.0", "size": 14564 }
[ "com.sun.tools.classfile.ClassFile", "java.io.File", "java.io.IOException" ]
import com.sun.tools.classfile.ClassFile; import java.io.File; import java.io.IOException;
import com.sun.tools.classfile.*; import java.io.*;
[ "com.sun.tools", "java.io" ]
com.sun.tools; java.io;
315,390
public Channel getChannel();
Channel function();
/** * Gets the channel object someone was kicked from * * @return The Channel */
Gets the channel object someone was kicked from
getChannel
{ "repo_name": "abrowning80/solutions-geoevent-java", "path": "solutions-geoevent/transports/irc-transport/src/main/java/com/esri/geoevent/solutions/transport/irc/jerklib/events/KickEvent.java", "license": "apache-2.0", "size": 1125 }
[ "com.esri.geoevent.solutions.transport.irc.jerklib.Channel" ]
import com.esri.geoevent.solutions.transport.irc.jerklib.Channel;
import com.esri.geoevent.solutions.transport.irc.jerklib.*;
[ "com.esri.geoevent" ]
com.esri.geoevent;
1,001,139
private void removeNeighbor(TcpClNeighbor neighbor) throws BPException { _logger.fine("Dead Neighbor:" + " eid=" + neighbor.getEndPointIdStem().getEndPointIdString()); Route route = RouteTable.getInstance().findMatchingRoute(neighbor.getEndPointIdStem()); if (route != null && !(route instanceof DefaultR...
void function(TcpClNeighbor neighbor) throws BPException { _logger.fine(STR + STR + neighbor.getEndPointIdStem().getEndPointIdString()); Route route = RouteTable.getInstance().findMatchingRoute(neighbor.getEndPointIdStem()); if (route != null && !(route instanceof DefaultRoute)) { RouteTable.getInstance().removeRoute(r...
/** * Remove Neighbor and Route * @param neighbor Neighbor to Remove * @throws BPException on Errors */
Remove Neighbor and Route
removeNeighbor
{ "repo_name": "KritikalFabric/corefabric.io", "path": "src/contrib/java/com/cisco/qte/jdtn/apps/CafAdapterApp.java", "license": "apache-2.0", "size": 21420 }
[ "com.cisco.qte.jdtn.bp.BPException", "com.cisco.qte.jdtn.bp.DefaultRoute", "com.cisco.qte.jdtn.bp.Route", "com.cisco.qte.jdtn.bp.RouteTable", "com.cisco.qte.jdtn.component.EventBroadcaster", "com.cisco.qte.jdtn.events.CafNeighborRemovedEvent", "com.cisco.qte.jdtn.general.NeighborsList", "com.cisco.qte...
import com.cisco.qte.jdtn.bp.BPException; import com.cisco.qte.jdtn.bp.DefaultRoute; import com.cisco.qte.jdtn.bp.Route; import com.cisco.qte.jdtn.bp.RouteTable; import com.cisco.qte.jdtn.component.EventBroadcaster; import com.cisco.qte.jdtn.events.CafNeighborRemovedEvent; import com.cisco.qte.jdtn.general.NeighborsLis...
import com.cisco.qte.jdtn.bp.*; import com.cisco.qte.jdtn.component.*; import com.cisco.qte.jdtn.events.*; import com.cisco.qte.jdtn.general.*; import com.cisco.qte.jdtn.ltp.*; import com.cisco.qte.jdtn.tcpcl.*;
[ "com.cisco.qte" ]
com.cisco.qte;
2,187,793
synchronized List<JournalAndStream> getJournals() { return journalSet.getAllJournalStreams(); }
synchronized List<JournalAndStream> getJournals() { return journalSet.getAllJournalStreams(); }
/** * Get all the journals this edit log is currently operating on. */
Get all the journals this edit log is currently operating on
getJournals
{ "repo_name": "cnfire/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSEditLog.java", "license": "apache-2.0", "size": 56758 }
[ "java.util.List", "org.apache.hadoop.hdfs.server.namenode.JournalSet" ]
import java.util.List; import org.apache.hadoop.hdfs.server.namenode.JournalSet;
import java.util.*; import org.apache.hadoop.hdfs.server.namenode.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
635,151
public CreateContainerCmd withPortBindings(PortBinding... portBindings);
CreateContainerCmd function(PortBinding... portBindings);
/** * Add one or more {@link PortBinding}s. This corresponds to the <code>--publish</code> (<code>-p</code>) option of * the <code>docker run</code> CLI command. */
Add one or more <code>PortBinding</code>s. This corresponds to the <code>--publish</code> (<code>-p</code>) option of the <code>docker run</code> CLI command
withPortBindings
{ "repo_name": "tschoots/docker-java", "path": "src/main/java/com/github/dockerjava/api/command/CreateContainerCmd.java", "license": "apache-2.0", "size": 7977 }
[ "com.github.dockerjava.api.model.PortBinding" ]
import com.github.dockerjava.api.model.PortBinding;
import com.github.dockerjava.api.model.*;
[ "com.github.dockerjava" ]
com.github.dockerjava;
1,201,009
public String getAuthorPersonName() { KcPerson person = this.getKcPersonService().getKcPersonByUserName(getUpdateUser()); return ObjectUtils.isNull(person) ? "Person not found" : person.getFullName(); }
String function() { KcPerson person = this.getKcPersonService().getKcPersonByUserName(getUpdateUser()); return ObjectUtils.isNull(person) ? STR : person.getFullName(); }
/** * * This is ahelper method to get author person name * @return */
This is ahelper method to get author person name
getAuthorPersonName
{ "repo_name": "mukadder/kc", "path": "coeus-impl/src/main/java/org/kuali/kra/timeandmoney/transactions/AwardAmountTransaction.java", "license": "agpl-3.0", "size": 4054 }
[ "org.kuali.coeus.common.framework.person.KcPerson", "org.kuali.rice.krad.util.ObjectUtils" ]
import org.kuali.coeus.common.framework.person.KcPerson; import org.kuali.rice.krad.util.ObjectUtils;
import org.kuali.coeus.common.framework.person.*; import org.kuali.rice.krad.util.*;
[ "org.kuali.coeus", "org.kuali.rice" ]
org.kuali.coeus; org.kuali.rice;
1,159,067
public List<Candidate> generate(DifferentialEvolutionReceiver receiver, int index, Candidate parent);
List<Candidate> function(DifferentialEvolutionReceiver receiver, int index, Candidate parent);
/** * Generate a list of children for the specified index. * * @param receiver The engine receiver. * @param index The parent index. * @param parent The parent candidate. * @return The list of children. */
Generate a list of children for the specified index
generate
{ "repo_name": "syenkoc/evolution", "path": "src/main/java/com/chupacadabra/evolution/engine/ChildGeneration.java", "license": "mit", "size": 1677 }
[ "com.chupacadabra.evolution.Candidate", "java.util.List" ]
import com.chupacadabra.evolution.Candidate; import java.util.List;
import com.chupacadabra.evolution.*; import java.util.*;
[ "com.chupacadabra.evolution", "java.util" ]
com.chupacadabra.evolution; java.util;
2,032,272
void setPrivateKeyForTimeStamp(PrivateKey privateKey);
void setPrivateKeyForTimeStamp(PrivateKey privateKey);
/** * Private key required for sign timestamp request * * @param privateKey to be used for request timestamp */
Private key required for sign timestamp request
setPrivateKeyForTimeStamp
{ "repo_name": "demoiselle/signer", "path": "policy-impl-cades/src/main/java/org/demoiselle/signer/policy/impl/cades/Signer.java", "license": "lgpl-3.0", "size": 4529 }
[ "java.security.PrivateKey" ]
import java.security.PrivateKey;
import java.security.*;
[ "java.security" ]
java.security;
225,603
@Field(4) public AVIODirEntry modification_timestamp(long modification_timestamp) { this.io.setLongField(this, 4, modification_timestamp); return this; }
@Field(4) AVIODirEntry function(long modification_timestamp) { this.io.setLongField(this, 4, modification_timestamp); return this; }
/** * < Time of last modification in microseconds since unix<br> * epoch, -1 if unknown. */
epoch, -1 if unknown
modification_timestamp
{ "repo_name": "mutars/java_libav", "path": "wrapper/src/main/java/com/mutar/libav/bridge/avformat/AVIODirEntry.java", "license": "gpl-2.0", "size": 4355 }
[ "org.bridj.ann.Field" ]
import org.bridj.ann.Field;
import org.bridj.ann.*;
[ "org.bridj.ann" ]
org.bridj.ann;
1,288,199
@OnMessage public void onMessage(Session session, byte[] message, @PathParam("deviceType") String deviceType, @PathParam ("deviceId") String deviceId) { super.onMessage(session, message, deviceType, deviceId); }
void function(Session session, byte[] message, @PathParam(STR) String deviceType, (STR) String deviceId) { super.onMessage(session, message, deviceType, deviceId); }
/** * Web socket onMessage use when device sends a byte message * * @param session - Registered session. * @param message - Byte message which needs to send to peer * @param deviceType - DeviceType * @param deviceId - Device Identifier */
Web socket onMessage use when device sends a byte message
onMessage
{ "repo_name": "rasika/carbon-device-mgt-plugins", "path": "components/extensions/remote-session-extension/org.wso2.carbon.device.mgt.extensions.remote.session.endpoint/src/main/java/org/wso2/carbon/device/mgt/extensions/remote/session/endpoint/DeviceSessionSubscriptionEndpoint.java", "license": "apache-2.0", "...
[ "javax.websocket.Session", "javax.websocket.server.PathParam" ]
import javax.websocket.Session; import javax.websocket.server.PathParam;
import javax.websocket.*; import javax.websocket.server.*;
[ "javax.websocket" ]
javax.websocket;
2,075,498
private void run(String [] args) throws IOException { optionSet = parser.parse(args); OptionSpec<?> invalidSelection = null; Map.Entry<OptionSpec<?>, Action> spec = null; // figure out which primary action they selected and make sure they didn't choose two of them for (Map....
void function(String [] args) throws IOException { optionSet = parser.parse(args); OptionSpec<?> invalidSelection = null; Map.Entry<OptionSpec<?>, Action> spec = null; for (Map.Entry<OptionSpec<?>, Action> entry : actions.entrySet()) { if (optionSet.has(entry.getKey())) { if (spec != null) { invalidSelection = entry.ge...
/** * Handle parsing the command line args and directing the app path */
Handle parsing the command line args and directing the app path
run
{ "repo_name": "jtruelove/exovert", "path": "src/main/java/com/cyngn/exovert/RestCreator.java", "license": "apache-2.0", "size": 5559 }
[ "com.cyngn.vertx.async.Action", "java.io.IOException", "java.util.Map" ]
import com.cyngn.vertx.async.Action; import java.io.IOException; import java.util.Map;
import com.cyngn.vertx.async.*; import java.io.*; import java.util.*;
[ "com.cyngn.vertx", "java.io", "java.util" ]
com.cyngn.vertx; java.io; java.util;
2,730,317
void assignKey(DatabaseEntry keyData) throws DatabaseException;
void assignKey(DatabaseEntry keyData) throws DatabaseException;
/** * Assigns a new primary key value into the given data buffer. */
Assigns a new primary key value into the given data buffer
assignKey
{ "repo_name": "nologic/nabs", "path": "client/trunk/shared/libraries/je-3.2.74/src/com/sleepycat/collections/PrimaryKeyAssigner.java", "license": "gpl-2.0", "size": 843 }
[ "com.sleepycat.je.DatabaseEntry", "com.sleepycat.je.DatabaseException" ]
import com.sleepycat.je.DatabaseEntry; import com.sleepycat.je.DatabaseException;
import com.sleepycat.je.*;
[ "com.sleepycat.je" ]
com.sleepycat.je;
2,523,217
public org.grails.datastore.mapping.query.api.Criteria like(String propertyName, Object propertyValue) { if (!validateSimpleExpression()) { throwRuntimeException(new IllegalArgumentException("Call to [like] with propertyName [" + propertyName + "] and value [" + propertyValue...
org.grails.datastore.mapping.query.api.Criteria function(String propertyName, Object propertyValue) { if (!validateSimpleExpression()) { throwRuntimeException(new IllegalArgumentException(STR + propertyName + STR + propertyValue + STR)); } propertyName = calculatePropertyName(propertyName); propertyValue = calculatePro...
/** * Creates a Criterion with from the specified property name and "like" expression * @param propertyName The property name * @param propertyValue The like value * * @return A Criterion instance */
Creates a Criterion with from the specified property name and "like" expression
like
{ "repo_name": "erdi/grails-core", "path": "grails-hibernate/src/main/groovy/grails/orm/HibernateCriteriaBuilder.java", "license": "apache-2.0", "size": 75516 }
[ "org.hibernate.Criteria", "org.hibernate.criterion.Restrictions" ]
import org.hibernate.Criteria; import org.hibernate.criterion.Restrictions;
import org.hibernate.*; import org.hibernate.criterion.*;
[ "org.hibernate", "org.hibernate.criterion" ]
org.hibernate; org.hibernate.criterion;
734,192
protected float getDeviceResolution() { if (hints.containsKey(KEY_DEVICE_RESOLUTION)) { return ((Float)hints.get(KEY_DEVICE_RESOLUTION)).floatValue(); } else { return GraphicsConstants.DEFAULT_DPI; } }
float function() { if (hints.containsKey(KEY_DEVICE_RESOLUTION)) { return ((Float)hints.get(KEY_DEVICE_RESOLUTION)).floatValue(); } else { return GraphicsConstants.DEFAULT_DPI; } }
/** * Returns the device resolution that has been set up. * @return the device resolution (in dpi) */
Returns the device resolution that has been set up
getDeviceResolution
{ "repo_name": "StrategyObject/fop", "path": "src/java/org/apache/fop/svg/AbstractFOPTranscoder.java", "license": "apache-2.0", "size": 13855 }
[ "org.apache.xmlgraphics.image.GraphicsConstants" ]
import org.apache.xmlgraphics.image.GraphicsConstants;
import org.apache.xmlgraphics.image.*;
[ "org.apache.xmlgraphics" ]
org.apache.xmlgraphics;
1,919,941
private void setSafeZoneLimit(InboundEventContainer event, long sequence) { long safeZoneLimit = idGenerator.getNextId(); event.setSafeZoneLimit(safeZoneLimit); if(log.isDebugEnabled()){ log.debug("[ Sequence " + sequence + " ] Pre processing message. Setting the Safe Zone " + sa...
void function(InboundEventContainer event, long sequence) { long safeZoneLimit = idGenerator.getNextId(); event.setSafeZoneLimit(safeZoneLimit); if(log.isDebugEnabled()){ log.debug(STR + sequence + STR + safeZoneLimit); } } /** * Route the message to queue/queues of subscribers matching in AMQP way. Hierarchical topic ...
/** * Calculate the current safe zone for this node (using the last generated message ID) * @param event event * @param sequence position of the event at the event ring buffer */
Calculate the current safe zone for this node (using the last generated message ID)
setSafeZoneLimit
{ "repo_name": "Asitha/andes", "path": "modules/andes-core/broker/src/main/java/org/wso2/andes/kernel/disruptor/inbound/MessagePreProcessor.java", "license": "apache-2.0", "size": 15158 }
[ "org.wso2.andes.kernel.AndesMessage" ]
import org.wso2.andes.kernel.AndesMessage;
import org.wso2.andes.kernel.*;
[ "org.wso2.andes" ]
org.wso2.andes;
2,201,772
private MessageWrapper peek() { synchronized(queue) { if (messageThatIsBeingWritten == null) { return queue.peek(); } return messageThatIsBeingWritten; } }
MessageWrapper function() { synchronized(queue) { if (messageThatIsBeingWritten == null) { return queue.peek(); } return messageThatIsBeingWritten; } }
/** * Returns the messageThatIsBeingWritten, or the first in the queue, w/o setting messageThatIsBeingWritten * @return */
Returns the messageThatIsBeingWritten, or the first in the queue, w/o setting messageThatIsBeingWritten
peek
{ "repo_name": "michele-loreti/jResp", "path": "core/org.cmg.jresp.pastry/pastry-2.1/src/org/mpisws/p2p/transport/priority/PriorityTransportLayerImpl.java", "license": "epl-1.0", "size": 67829 }
[ "org.mpisws.p2p.transport.priority.PriorityTransportLayerImpl" ]
import org.mpisws.p2p.transport.priority.PriorityTransportLayerImpl;
import org.mpisws.p2p.transport.priority.*;
[ "org.mpisws.p2p" ]
org.mpisws.p2p;
520,430
private void destroySubcontext(LdapContext context, final String dn) { try { NamingEnumeration<Binding> enumeration = null; try { enumeration = context.listBindings(dn); while (enumeration.hasMore()) { Binding binding = enumeratio...
void function(LdapContext context, final String dn) { try { NamingEnumeration<Binding> enumeration = null; try { enumeration = context.listBindings(dn); while (enumeration.hasMore()) { Binding binding = enumeration.next(); String name = binding.getNameInNamespace(); destroySubcontext(context, name); } context.unbind(dn...
/** * <p> * Destroys a subcontext with the given DN from the LDAP tree. * </p> * * @param dn */
Destroys a subcontext with the given DN from the LDAP tree.
destroySubcontext
{ "repo_name": "lkubik/keycloak", "path": "federation/ldap/src/main/java/org/keycloak/federation/ldap/idm/store/ldap/LDAPOperationManager.java", "license": "apache-2.0", "size": 20531 }
[ "javax.naming.Binding", "javax.naming.NamingEnumeration", "javax.naming.ldap.LdapContext", "org.keycloak.models.ModelException" ]
import javax.naming.Binding; import javax.naming.NamingEnumeration; import javax.naming.ldap.LdapContext; import org.keycloak.models.ModelException;
import javax.naming.*; import javax.naming.ldap.*; import org.keycloak.models.*;
[ "javax.naming", "org.keycloak.models" ]
javax.naming; org.keycloak.models;
1,435,401
public static String buildQRcodeUrl(String product_id) { Map<String, Object> map = new HashMap<>(); map.put("appid", Configure.getAppid()); map.put("mch_id", Configure.getMchid()); map.put("time_stamp", System.currentTimeMillis() / 1000); map.put("nonce_str", RandomStringGene...
static String function(String product_id) { Map<String, Object> map = new HashMap<>(); map.put("appid", Configure.getAppid()); map.put(STR, Configure.getMchid()); map.put(STR, System.currentTimeMillis() / 1000); map.put(STR, RandomStringGenerator.getRandomStringByLength(Configure.NONCE_STR_LENGTH)); map.put(STR, produc...
/** * Build wxpay scan qrcode url. call QRCode.from(String) to build qrcode * * @see <a href="https://pay.weixin.qq.com/wiki/doc/api/native.php?chapter=6_4">https://pay.weixin.qq.com/wiki/doc/api/native.php?chapter=6_4</a> * @see <a href="https://pay.weixin.qq.com/wiki/doc/api/native.php?chapter=4_3...
Build wxpay scan qrcode url. call QRCode.from(String) to build qrcode
buildQRcodeUrl
{ "repo_name": "smjie2800/spring-cloud-microservice-redis-activemq-hibernate-mysql", "path": "microservice-provider-pay/src/main/java/com/boyuanitsm/pay/wxpay/common/Util.java", "license": "mit", "size": 5732 }
[ "java.util.HashMap", "java.util.Map" ]
import java.util.HashMap; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,751,843
public final Tile getSourceTile(RasterDataNode rasterDataNode, Rectangle region) throws OperatorException { return context.getSourceTile(rasterDataNode, region); }
final Tile function(RasterDataNode rasterDataNode, Rectangle region) throws OperatorException { return context.getSourceTile(rasterDataNode, region); }
/** * Gets a {@link Tile} for a given band and image region. * * @param rasterDataNode the raster data node of a data product, * e.g. a {@link org.esa.beam.framework.datamodel.Band Band} or * {@link org.esa.beam.framework.datamodel.TiePointGrid TiePoi...
Gets a <code>Tile</code> for a given band and image region
getSourceTile
{ "repo_name": "seadas/beam", "path": "beam-gpf/src/main/java/org/esa/beam/framework/gpf/Operator.java", "license": "gpl-3.0", "size": 19001 }
[ "java.awt.Rectangle", "org.esa.beam.framework.datamodel.RasterDataNode" ]
import java.awt.Rectangle; import org.esa.beam.framework.datamodel.RasterDataNode;
import java.awt.*; import org.esa.beam.framework.datamodel.*;
[ "java.awt", "org.esa.beam" ]
java.awt; org.esa.beam;
2,407,738
EReference getBaseMatrix_Values();
EReference getBaseMatrix_Values();
/** * Returns the meta object for the containment reference list '{@link uk.ac.kcl.inf.robotics.rigidBodies.BaseMatrix#getValues <em>Values</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the containment reference list '<em>Values</em>'. * @see uk.ac.kcl.inf.roboti...
Returns the meta object for the containment reference list '<code>uk.ac.kcl.inf.robotics.rigidBodies.BaseMatrix#getValues Values</code>'.
getBaseMatrix_Values
{ "repo_name": "szschaler/RigidBodies", "path": "uk.ac.kcl.inf.robotics.rigid_bodies/src-gen/uk/ac/kcl/inf/robotics/rigidBodies/RigidBodiesPackage.java", "license": "mit", "size": 163741 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
842,742
private ResultCollector executeOnAllBuckets(final Function function, final PartitionedRegionFunctionExecutor execution, ResultCollector rc, boolean isPRSingleHop) { Set<Integer> bucketSet = new HashSet<Integer>(); Iterator<Integer> itr = this.getRegionAdvisor().getBucketSet().iterator(); while...
ResultCollector function(final Function function, final PartitionedRegionFunctionExecutor execution, ResultCollector rc, boolean isPRSingleHop) { Set<Integer> bucketSet = new HashSet<Integer>(); Iterator<Integer> itr = this.getRegionAdvisor().getBucketSet().iterator(); while (itr.hasNext()) { try { bucketSet.add(itr.ne...
/** * Executes function on all bucket nodes * * @since GemFire 6.0 */
Executes function on all bucket nodes
executeOnAllBuckets
{ "repo_name": "davebarnes97/geode", "path": "geode-core/src/main/java/org/apache/geode/internal/cache/PartitionedRegion.java", "license": "apache-2.0", "size": 381189 }
[ "java.util.HashMap", "java.util.HashSet", "java.util.Iterator", "java.util.NoSuchElementException", "java.util.Set", "org.apache.geode.cache.execute.EmptyRegionFunctionException", "org.apache.geode.cache.execute.Function", "org.apache.geode.cache.execute.ResultCollector", "org.apache.geode.distribut...
import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.NoSuchElementException; import java.util.Set; import org.apache.geode.cache.execute.EmptyRegionFunctionException; import org.apache.geode.cache.execute.Function; import org.apache.geode.cache.execute.ResultCollector; import ...
import java.util.*; import org.apache.geode.cache.execute.*; import org.apache.geode.distributed.*; import org.apache.geode.distributed.internal.*; import org.apache.geode.distributed.internal.membership.*; import org.apache.geode.internal.cache.execute.*;
[ "java.util", "org.apache.geode" ]
java.util; org.apache.geode;
1,247,729
DataView valueSetView(Object singleKey) throws DatabaseException, KeyRangeException { KeyRange singleKeyRange = subRange(range, singleKey); DataView view = valueSetView(); view.range = singleKeyRange; return view; }
DataView valueSetView(Object singleKey) throws DatabaseException, KeyRangeException { KeyRange singleKeyRange = subRange(range, singleKey); DataView view = valueSetView(); view.range = singleKeyRange; return view; }
/** * Return a new value-set view for single key range. * * @param singleKey the single key value. * * @return the derived view. * * @throws DatabaseException if a database problem occurs. * * @throws KeyRangeException if the specified range is not within the * current ...
Return a new value-set view for single key range
valueSetView
{ "repo_name": "bjorndm/prebake", "path": "code/third_party/bdb/src/com/sleepycat/collections/DataView.java", "license": "apache-2.0", "size": 23518 }
[ "com.sleepycat.je.DatabaseException", "com.sleepycat.util.keyrange.KeyRange", "com.sleepycat.util.keyrange.KeyRangeException" ]
import com.sleepycat.je.DatabaseException; import com.sleepycat.util.keyrange.KeyRange; import com.sleepycat.util.keyrange.KeyRangeException;
import com.sleepycat.je.*; import com.sleepycat.util.keyrange.*;
[ "com.sleepycat.je", "com.sleepycat.util" ]
com.sleepycat.je; com.sleepycat.util;
774,211
public boolean removeLastOccurrence(Object o) { for (Entry<E> e = header.previous; e != header; e = e.previous) { if (o == e.element) { remove(e); return true; } } return false; } /** * Returns a list-iterator of the eleme...
boolean function(Object o) { for (Entry<E> e = header.previous; e != header; e = e.previous) { if (o == e.element) { remove(e); return true; } } return false; } /** * Returns a list-iterator of the elements in this list (in proper * sequence), starting at the specified position in the list. * Obeys the general contract...
/** * Removes the last occurrence of the specified element in this * list (when traversing the list from head to tail). If the list * does not contain the element, it is unchanged. * * @param o element to be removed from this list, if present * @return <tt>true</tt> if the list contained ...
Removes the last occurrence of the specified element in this list (when traversing the list from head to tail). If the list does not contain the element, it is unchanged
removeLastOccurrence
{ "repo_name": "TheTypoMaster/Scaper", "path": "openjdk/jdk/src/share/classes/sun/awt/util/IdentityLinkedList.java", "license": "gpl-2.0", "size": 29492 }
[ "java.util.ConcurrentModificationException", "java.util.Iterator", "java.util.List", "java.util.ListIterator" ]
import java.util.ConcurrentModificationException; import java.util.Iterator; import java.util.List; import java.util.ListIterator;
import java.util.*;
[ "java.util" ]
java.util;
2,363,503
@Override public void ignore () { wv.js (IgnoreButton.JS_CODE); }
void function () { wv.js (IgnoreButton.JS_CODE); }
/** * Runs the ignore button script. */
Runs the ignore button script
ignore
{ "repo_name": "xiprox/WaniKani-for-Android", "path": "WaniKani/src/tr/xip/wanikani/LocalIMEKeyboard.java", "license": "gpl-3.0", "size": 51741 }
[ "tr.xip.wanikani.userscripts.IgnoreButton" ]
import tr.xip.wanikani.userscripts.IgnoreButton;
import tr.xip.wanikani.userscripts.*;
[ "tr.xip.wanikani" ]
tr.xip.wanikani;
2,332,027
public DateType getDateProperty(String qualifiedName) { AbstractField prop = getAbstractProperty(qualifiedName); if (prop != null) { if (prop instanceof DateType) { return (DateType) prop; } else { ...
DateType function(String qualifiedName) { AbstractField prop = getAbstractProperty(qualifiedName); if (prop != null) { if (prop instanceof DateType) { return (DateType) prop; } else { throw new IllegalArgumentException(STR); } } return null; }
/** * Get the Date property with its name * * @param qualifiedName * The name of the property to get, it must include the namespace prefix, e.g. "pdf:Keywords". * @return Date Type property * */
Get the Date property with its name
getDateProperty
{ "repo_name": "gavanx/pdflearn", "path": "xmpbox/src/main/java/org/apache/xmpbox/schema/XMPSchema.java", "license": "apache-2.0", "size": 41334 }
[ "org.apache.xmpbox.type.AbstractField", "org.apache.xmpbox.type.DateType" ]
import org.apache.xmpbox.type.AbstractField; import org.apache.xmpbox.type.DateType;
import org.apache.xmpbox.type.*;
[ "org.apache.xmpbox" ]
org.apache.xmpbox;
339,454
//----------------------------------------------------------------------- public Set<Calendar> getExerciseCalendars() { return _exerciseCalendars; }
Set<Calendar> function() { return _exerciseCalendars; }
/** * Gets the exerciseCalendars. * @return the value of the property */
Gets the exerciseCalendars
getExerciseCalendars
{ "repo_name": "McLeodMoores/starling", "path": "projects/integration/src/main/java/com/opengamma/integration/tool/portfolio/xml/v1_0/jaxb/SwaptionTrade.java", "license": "apache-2.0", "size": 27209 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,780,053
public static String[] getExtSdCardPaths() { Context cxt = HentoidApp.getAppContext(); List<String> paths = new ArrayList<>(); for (File file : ContextCompat.getExternalFilesDirs(cxt, "external")) { if (file != null && !file.equals(cxt.getExternalFilesDir("external"))) { ...
static String[] function() { Context cxt = HentoidApp.getAppContext(); List<String> paths = new ArrayList<>(); for (File file : ContextCompat.getExternalFilesDirs(cxt, STR)) { if (file != null && !file.equals(cxt.getExternalFilesDir(STR))) { int index = file.getAbsolutePath().lastIndexOf(STR); if (index < 0) { Timber.w...
/** * Get a list of external SD card paths. (Kitkat+) * * @return A list of external SD card paths. */
Get a list of external SD card paths. (Kitkat+)
getExtSdCardPaths
{ "repo_name": "csaki/Hentoid", "path": "app/src/main/java/me/devsaki/hentoid/util/FileHelper.java", "license": "apache-2.0", "size": 20558 }
[ "android.content.Context", "android.support.v4.content.ContextCompat", "java.io.File", "java.io.IOException", "java.util.ArrayList", "java.util.List", "me.devsaki.hentoid.HentoidApp" ]
import android.content.Context; import android.support.v4.content.ContextCompat; import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.List; import me.devsaki.hentoid.HentoidApp;
import android.content.*; import android.support.v4.content.*; import java.io.*; import java.util.*; import me.devsaki.hentoid.*;
[ "android.content", "android.support", "java.io", "java.util", "me.devsaki.hentoid" ]
android.content; android.support; java.io; java.util; me.devsaki.hentoid;
102,940
public static void delay(int ms) { try { Thread.sleep(ms); } catch (InterruptedException e) { fail("test interrupted"); } }
static void function(int ms) { try { Thread.sleep(ms); } catch (InterruptedException e) { fail(STR); } }
/** * Suspends the current thread for a specified number of millis. * * @param ms number of millis */
Suspends the current thread for a specified number of millis
delay
{ "repo_name": "donNewtonAlpha/onos", "path": "utils/junit/src/main/java/org/onlab/junit/TestTools.java", "license": "apache-2.0", "size": 7426 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
904,987
private int increaseEdgeVisits(Edge edge) { int edgeVisits = increaseIntAttribute(edge, EDGE_VISITS); if (edgeVisits > maxEdgeVisits) { maxEdgeVisits = edgeVisits; } return edgeVisits; }
int function(Edge edge) { int edgeVisits = increaseIntAttribute(edge, EDGE_VISITS); if (edgeVisits > maxEdgeVisits) { maxEdgeVisits = edgeVisits; } return edgeVisits; }
/** * Increase {@code edgeVisits} attribute for the specified edge. * * @param edge * the edge * @return the new value */
Increase edgeVisits attribute for the specified edge
increaseEdgeVisits
{ "repo_name": "r-kober/ReCaLys", "path": "ReCaLys/src/de/upb/recalys/visualization/PieGraph.java", "license": "mit", "size": 12121 }
[ "org.graphstream.graph.Edge" ]
import org.graphstream.graph.Edge;
import org.graphstream.graph.*;
[ "org.graphstream.graph" ]
org.graphstream.graph;
199,237
public double calculate(Person person) throws BmiException;
double function(Person person) throws BmiException;
/** * Calculates body mass index of given person. * * @param person the person for which will be calculated the BMI. * @return Calculated BMI of given person. * @throws BmiException If some error occurs during BMI calculation. */
Calculates body mass index of given person
calculate
{ "repo_name": "mrfranta/jop", "path": "jop-examples/jop-example-01/src/main/java/cz/zcu/kiv/jop/example/bmi/BmiCalculator.java", "license": "apache-2.0", "size": 521 }
[ "cz.zcu.kiv.jop.example.domain.Person" ]
import cz.zcu.kiv.jop.example.domain.Person;
import cz.zcu.kiv.jop.example.domain.*;
[ "cz.zcu.kiv" ]
cz.zcu.kiv;
1,915,761
public Matrix getRotationMatrix() { return r; }
Matrix function() { return r; }
/** * Gets the rotation matrix from the last call to * {@link #calc_rmsd(Atom[], Atom[], int, boolean, boolean) calc_rmsd}. * @return The rotatiokn matrix */
Gets the rotation matrix from the last call to <code>#calc_rmsd(Atom[], Atom[], int, boolean, boolean) calc_rmsd</code>
getRotationMatrix
{ "repo_name": "sbliven/biojava", "path": "biojava3-structure/src/main/java/org/biojava/bio/structure/align/ce/CeCalculatorEnhanced.java", "license": "lgpl-2.1", "size": 65996 }
[ "org.biojava.bio.structure.jama.Matrix" ]
import org.biojava.bio.structure.jama.Matrix;
import org.biojava.bio.structure.jama.*;
[ "org.biojava.bio" ]
org.biojava.bio;
2,471,661
@Override public void mouseExited(MouseEvent e) { }
public void mouseExited(MouseEvent e) { }
/** * This method cannot be called directly. */
This method cannot be called directly
mouseEntered
{ "repo_name": "pratiksanglikar/Data-Structures", "path": "src/ds/pratiksanglikar/lib/Draw.java", "license": "gpl-3.0", "size": 45443 }
[ "java.awt.event.MouseEvent" ]
import java.awt.event.MouseEvent;
import java.awt.event.*;
[ "java.awt" ]
java.awt;
2,080,900
private void initialize() { this.setLayout(new BorderLayout()); this.add(getJScrollPane(), java.awt.BorderLayout.CENTER); }
void function() { this.setLayout(new BorderLayout()); this.add(getJScrollPane(), java.awt.BorderLayout.CENTER); }
/** * This method initializes this */
This method initializes this
initialize
{ "repo_name": "orgicus/ftd2xxj", "path": "eclipseFTD2XXJ/ftd2xxj/src/application/com/ftdichip/ftd2xx/ui/eeprom/EEPROMViewer.java", "license": "lgpl-3.0", "size": 3473 }
[ "java.awt.BorderLayout" ]
import java.awt.BorderLayout;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,481,812
public void testPeekFirst() { ConcurrentLinkedDeque q = populatedDeque(SIZE); for (int i = 0; i < SIZE; ++i) { assertEquals(i, q.peekFirst()); assertEquals(i, q.pollFirst()); assertTrue(q.peekFirst() == null || !q.peekFirst().equals(i)); ...
void function() { ConcurrentLinkedDeque q = populatedDeque(SIZE); for (int i = 0; i < SIZE; ++i) { assertEquals(i, q.peekFirst()); assertEquals(i, q.pollFirst()); assertTrue(q.peekFirst() == null !q.peekFirst().equals(i)); } assertNull(q.peekFirst()); }
/** * peekFirst() returns next element, or null if empty */
peekFirst() returns next element, or null if empty
testPeekFirst
{ "repo_name": "AdmireTheDistance/android_libcore", "path": "jsr166-tests/src/test/java/jsr166/ConcurrentLinkedDequeTest.java", "license": "gpl-2.0", "size": 26434 }
[ "java.util.concurrent.ConcurrentLinkedDeque" ]
import java.util.concurrent.ConcurrentLinkedDeque;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,196,745
public void clean() { try { writer.flush(); writer.close(); } catch (IOException e) { e.printStackTrace(); } for (T cp : performer) { cp.clean(); } }
void function() { try { writer.flush(); writer.close(); } catch (IOException e) { e.printStackTrace(); } for (T cp : performer) { cp.clean(); } }
/** * Clean up the database of all performer. */
Clean up the database of all performer
clean
{ "repo_name": "dresden-ocl/dresdenocl", "path": "othertools/org.dresdenocl.benchmark.sql/src/org/dresdenocl/benchmark/sql/Benchmark.java", "license": "lgpl-3.0", "size": 3637 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
205,161
@VisibleForTesting String createAttachmentDoc(NotesDocument crawlDoc, NotesDocument srcDoc, String AttachmentName, String MimeType) throws RepositoryException { final String METHOD = "createAttachmentDoc"; String AttachmentURL = null; LOGGER.entering(CLASS_NAME, METHOD); NotesEmbeddedObject eo...
String createAttachmentDoc(NotesDocument crawlDoc, NotesDocument srcDoc, String AttachmentName, String MimeType) throws RepositoryException { final String METHOD = STR; String AttachmentURL = null; LOGGER.entering(CLASS_NAME, METHOD); NotesEmbeddedObject eo = null; NotesDocument attachDoc = null; try { eo = srcDoc.getA...
/** * Creates a document for an attachment in the GSA Configuration database. If * the file size is exceeding the limit or the MIME type is not supported, * only metadata and the attachment file name will be indexed. * * @param crawlDoc document being crawled in the Crawl Queue view * @param srcDoc ...
Creates a document for an attachment in the GSA Configuration database. If the file size is exceeding the limit or the MIME type is not supported, only metadata and the attachment file name will be indexed
createAttachmentDoc
{ "repo_name": "xingh/google-enterprise-connector-notes", "path": "projects/notes-core/source/java/com/google/enterprise/connector/notes/NotesCrawlerThread.java", "license": "apache-2.0", "size": 36370 }
[ "com.google.enterprise.connector.notes.client.NotesDocument", "com.google.enterprise.connector.notes.client.NotesEmbeddedObject", "com.google.enterprise.connector.spi.RepositoryException", "com.google.enterprise.connector.spi.SpiConstants", "java.net.URLEncoder", "java.util.logging.Level" ]
import com.google.enterprise.connector.notes.client.NotesDocument; import com.google.enterprise.connector.notes.client.NotesEmbeddedObject; import com.google.enterprise.connector.spi.RepositoryException; import com.google.enterprise.connector.spi.SpiConstants; import java.net.URLEncoder; import java.util.logging.Level;
import com.google.enterprise.connector.notes.client.*; import com.google.enterprise.connector.spi.*; import java.net.*; import java.util.logging.*;
[ "com.google.enterprise", "java.net", "java.util" ]
com.google.enterprise; java.net; java.util;
1,267,333
public static INotesNativeAPI get() { //check if this failed the last time if (m_initError!=null) { if (m_initError instanceof RuntimeException) throw (RuntimeException) m_initError; else throw new NotesError(0, "Error initializing Domino JNA API", m_initError); } if (m_instanceWithoutCrashL...
static INotesNativeAPI function() { if (m_initError!=null) { if (m_initError instanceof RuntimeException) throw (RuntimeException) m_initError; else throw new NotesError(0, STR, m_initError); } if (m_instanceWithoutCrashLogging==null) { initialize(); if (m_initError!=null) { if (m_initError instanceof RuntimeException)...
/** * Returns the API instance used to call native Domino C API methods for 32 and 64 bit * * @return API */
Returns the API instance used to call native Domino C API methods for 32 and 64 bit
get
{ "repo_name": "klehmann/domino-jna", "path": "domino-jna/src/main/java/com/mindoo/domino/jna/internal/NotesNativeAPI.java", "license": "apache-2.0", "size": 10598 }
[ "com.mindoo.domino.jna.errors.NotesError", "com.mindoo.domino.jna.gc.NotesGC" ]
import com.mindoo.domino.jna.errors.NotesError; import com.mindoo.domino.jna.gc.NotesGC;
import com.mindoo.domino.jna.errors.*; import com.mindoo.domino.jna.gc.*;
[ "com.mindoo.domino" ]
com.mindoo.domino;
1,002,605
public File getFeed(String feedId);
File function(String feedId);
/** * Get a feed from this backend. * @param feedId the feed to retrieve * @return a File object referring to the feed */
Get a feed from this backend
getFeed
{ "repo_name": "conveyal/gtfs-validator", "path": "gtfs-validator-json/src/main/java/com/conveyal/gtfs/validator/json/backends/FeedBackend.java", "license": "mit", "size": 544 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,468,820
public boolean isLowerCaseFirst() { return (settings.readOnly().getCaseFirst() == CollationSettings.CASE_FIRST); }
boolean function() { return (settings.readOnly().getCaseFirst() == CollationSettings.CASE_FIRST); }
/** * Return true if a lowercase character is sorted before the corresponding uppercase character. See * setCaseFirst(boolean) for details. * * @see #setUpperCaseFirst * @see #setLowerCaseFirst * @see #isUpperCaseFirst * @see #setCaseFirstDefault * @return true lower cased chara...
Return true if a lowercase character is sorted before the corresponding uppercase character. See setCaseFirst(boolean) for details
isLowerCaseFirst
{ "repo_name": "google/j2objc", "path": "jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/RuleBasedCollator.java", "license": "apache-2.0", "size": 76069 }
[ "android.icu.impl.coll.CollationSettings" ]
import android.icu.impl.coll.CollationSettings;
import android.icu.impl.coll.*;
[ "android.icu" ]
android.icu;
2,317,585
public void undeployCarbonApplication(String applicationName) throws ApplicationAdminExceptionException, RemoteException { if (standaloneMode) { applicationAdminClient.deleteApplication(applicationName); // Wait for Capp to undeploy Awaitility.await() ...
void function(String applicationName) throws ApplicationAdminExceptionException, RemoteException { if (standaloneMode) { applicationAdminClient.deleteApplication(applicationName); Awaitility.await() .pollInterval(500, TimeUnit.MILLISECONDS) .atMost(ScenarioConstants.ARTIFACT_DEPLOYMENT_WAIT_TIME_MS, TimeUnit.MILLISECON...
/** * Function to undeploy carbon application * * @param applicationName name of the Carbon application to be undeployed * @throws ApplicationAdminExceptionException if an error occurs while undeploying carbon application * @throws RemoteException if the admin client becomes ...
Function to undeploy carbon application
undeployCarbonApplication
{ "repo_name": "wso2/product-ei", "path": "product-scenarios/scenarios-commons/src/main/java/org/wso2/carbon/esb/scenario/test/common/ScenarioTestBase.java", "license": "apache-2.0", "size": 20631 }
[ "java.rmi.RemoteException", "java.util.concurrent.TimeUnit", "org.awaitility.Awaitility", "org.wso2.carbon.application.mgt.stub.ApplicationAdminExceptionException" ]
import java.rmi.RemoteException; import java.util.concurrent.TimeUnit; import org.awaitility.Awaitility; import org.wso2.carbon.application.mgt.stub.ApplicationAdminExceptionException;
import java.rmi.*; import java.util.concurrent.*; import org.awaitility.*; import org.wso2.carbon.application.mgt.stub.*;
[ "java.rmi", "java.util", "org.awaitility", "org.wso2.carbon" ]
java.rmi; java.util; org.awaitility; org.wso2.carbon;
481,849
@Test public void testWith() { final AreaI area0 = AreaI.of(0, 100, 0, 100); final AreaI area1 = AreaI.of(1, 99, 1, 99); final QuadTreeRaycastResultI.Builder<Integer> b = QuadTreeRaycastResultI.builder(); b.setArea(area0); b.setDistance(23.0); b.setItem(Integer.valueOf(23)); f...
void function() { final AreaI area0 = AreaI.of(0, 100, 0, 100); final AreaI area1 = AreaI.of(1, 99, 1, 99); final QuadTreeRaycastResultI.Builder<Integer> b = QuadTreeRaycastResultI.builder(); b.setArea(area0); b.setDistance(23.0); b.setItem(Integer.valueOf(23)); final QuadTreeRaycastResultI<Integer> r0 = b.build(); fin...
/** * With tests. */
With tests
testWith
{ "repo_name": "io7m/jspatial", "path": "com.io7m.jspatial.tests/src/test/java/com/io7m/jspatial/tests/api/quadtrees/QuadTreeRaycastResultITest.java", "license": "isc", "size": 6658 }
[ "com.io7m.jregions.core.unparameterized.areas.AreaI", "com.io7m.jspatial.api.quadtrees.QuadTreeRaycastResultI", "org.junit.Assert" ]
import com.io7m.jregions.core.unparameterized.areas.AreaI; import com.io7m.jspatial.api.quadtrees.QuadTreeRaycastResultI; import org.junit.Assert;
import com.io7m.jregions.core.unparameterized.areas.*; import com.io7m.jspatial.api.quadtrees.*; import org.junit.*;
[ "com.io7m.jregions", "com.io7m.jspatial", "org.junit" ]
com.io7m.jregions; com.io7m.jspatial; org.junit;
605,668
public Class<? extends WorkerObserver>[] getWorkerObserverClasses() { return WORKER_OBSERVER_CLASSES.getArray(this); }
Class<? extends WorkerObserver>[] function() { return WORKER_OBSERVER_CLASSES.getArray(this); }
/** * Get array of WorkerObserver classes set in configuration. * * @return array of WorkerObserver classes. */
Get array of WorkerObserver classes set in configuration
getWorkerObserverClasses
{ "repo_name": "mmaro/giraph", "path": "giraph-core/src/main/java/org/apache/giraph/conf/GiraphConfiguration.java", "license": "apache-2.0", "size": 30136 }
[ "org.apache.giraph.worker.WorkerObserver" ]
import org.apache.giraph.worker.WorkerObserver;
import org.apache.giraph.worker.*;
[ "org.apache.giraph" ]
org.apache.giraph;
1,063,761
public static void saveBytes(@NotNull File file, @NotNull byte[] bytes) throws IOException { FileOutputStream stream = null; try { stream = new FileOutputStream(file); stream.write(bytes); } finally { if (stream != null) { stream.close(...
static void function(@NotNull File file, @NotNull byte[] bytes) throws IOException { FileOutputStream stream = null; try { stream = new FileOutputStream(file); stream.write(bytes); } finally { if (stream != null) { stream.close(); } } } /** * Reads the contents of a {@link File} into a <code>byte[]</code>. This relies ...
/** * Saves the contents of a <code>byte[]</code> to the specified {@link File}. */
Saves the contents of a <code>byte[]</code> to the specified <code>File</code>
saveBytes
{ "repo_name": "Widen/metadata-extractor", "path": "Source/com/drew/tools/FileUtil.java", "license": "apache-2.0", "size": 3352 }
[ "com.drew.lang.annotations.NotNull", "java.io.File", "java.io.FileOutputStream", "java.io.IOException" ]
import com.drew.lang.annotations.NotNull; import java.io.File; import java.io.FileOutputStream; import java.io.IOException;
import com.drew.lang.annotations.*; import java.io.*;
[ "com.drew.lang", "java.io" ]
com.drew.lang; java.io;
2,590,114
public static SecureRandom getInstance(String algorithm) throws NoSuchAlgorithmException { if (algorithm == null) { throw new NullPointerException(Messages.getString("security.01")); //$NON-NLS-1$ } synchronized (engine) { engine....
static SecureRandom function(String algorithm) throws NoSuchAlgorithmException { if (algorithm == null) { throw new NullPointerException(Messages.getString(STR)); } synchronized (engine) { engine.getInstance(algorithm, null); return new SecureRandom((SecureRandomSpi)engine.spi, engine.provider, algorithm); } }
/** * Returns a new instance of {@code SecureRandom} that utilizes the * specified algorithm. * * @param algorithm * the name of the algorithm to use. * @return a new instance of {@code SecureRandom} that utilizes the * specified algorithm. * @throws N...
Returns a new instance of SecureRandom that utilizes the specified algorithm
getInstance
{ "repo_name": "skyHALud/codenameone", "path": "Ports/iOSPort/xmlvm/apache-harmony-6.0-src-r991881/classlib/modules/security/src/main/java/common/java/security/SecureRandom.java", "license": "gpl-2.0", "size": 12146 }
[ "org.apache.harmony.security.internal.nls.Messages" ]
import org.apache.harmony.security.internal.nls.Messages;
import org.apache.harmony.security.internal.nls.*;
[ "org.apache.harmony" ]
org.apache.harmony;
2,188,431
default Set<String> rolesToAuthorities(Set<Role> roles) { if (roles == null) { return null; } return roles.stream().map(role -> role.getAuthority().getName()) .collect(Collectors.toSet()); }
default Set<String> rolesToAuthorities(Set<Role> roles) { if (roles == null) { return null; } return roles.stream().map(role -> role.getAuthority().getName()) .collect(Collectors.toSet()); }
/** * Map a set of {@link Role}s to a set of strings that are the authorities. * @param roles the roles to map * @return the authorities as a set of strings if roles is not null, null otherwise */
Map a set of <code>Role</code>s to a set of strings that are the authorities
rolesToAuthorities
{ "repo_name": "RADAR-CNS/ManagementPortal", "path": "src/main/java/org/radarcns/management/service/mapper/UserMapper.java", "license": "apache-2.0", "size": 3602 }
[ "java.util.Set", "java.util.stream.Collectors", "org.radarcns.management.domain.Role" ]
import java.util.Set; import java.util.stream.Collectors; import org.radarcns.management.domain.Role;
import java.util.*; import java.util.stream.*; import org.radarcns.management.domain.*;
[ "java.util", "org.radarcns.management" ]
java.util; org.radarcns.management;
981,893
public static String readTextFile(String filename, int maxNumLines, boolean startAtBeginning) { File f = new File(filename); if (!f.exists()) return null; FileInputStream fis = null; BufferedReader in = null; try { fis = new FileInputStream(f); in = ne...
static String function(String filename, int maxNumLines, boolean startAtBeginning) { File f = new File(filename); if (!f.exists()) return null; FileInputStream fis = null; BufferedReader in = null; try { fis = new FileInputStream(f); in = new BufferedReader(new InputStreamReader(fis, "UTF-8")); List<String> lines = new...
/** * Read in the last few lines of a (newline delimited) textfile, or null if * the file doesn't exist. * * Warning - this inefficiently allocates a StringBuilder of size maxNumLines*80, * so don't make it too big. * Warning - converts \r\n to \n * * @param startAtBe...
Read in the last few lines of a (newline delimited) textfile, or null if the file doesn't exist. Warning - this inefficiently allocates a StringBuilder of size maxNumLines*80, so don't make it too big. Warning - converts \r\n to \n
readTextFile
{ "repo_name": "NoYouShutup/CryptMeme", "path": "CryptMeme/core/java/src/net/i2p/util/FileUtil.java", "license": "mit", "size": 23538 }
[ "java.io.BufferedReader", "java.io.File", "java.io.FileInputStream", "java.io.IOException", "java.io.InputStreamReader", "java.util.ArrayList", "java.util.List" ]
import java.io.BufferedReader; import java.io.File; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,414,055
protected int updateItem(SyncItem item) throws SyncException { // a new item was replaced during the sync. we must notify our tracker boolean done = tracker.removeItem(item); return done ? SUCCESS_STATUS : ERROR_STATUS; }
int function(SyncItem item) throws SyncException { boolean done = tracker.removeItem(item); return done ? SUCCESS_STATUS : ERROR_STATUS; }
/** * The purpose of this implementation is simply to notify the tracker. * Classes that extends the TrackableSyncSource should invoke this method at * the end of their processing in the updateItem so that the tracker is * properly updated. Otherwise they are in charge of notifying the tracker. ...
The purpose of this implementation is simply to notify the tracker. Classes that extends the TrackableSyncSource should invoke this method at the end of their processing in the updateItem so that the tracker is properly updated. Otherwise they are in charge of notifying the tracker
updateItem
{ "repo_name": "zjujunge/funambol", "path": "externals/java-sdk/sync/src/main/java/com/funambol/sync/client/TrackableSyncSource.java", "license": "agpl-3.0", "size": 24782 }
[ "com.funambol.sync.SyncException", "com.funambol.sync.SyncItem" ]
import com.funambol.sync.SyncException; import com.funambol.sync.SyncItem;
import com.funambol.sync.*;
[ "com.funambol.sync" ]
com.funambol.sync;
644,718
public List<FieldResult<EntityResult<T>>> getAllFieldResult();
List<FieldResult<EntityResult<T>>> function();
/** * Returns all <code>field-result</code> elements * @return list of <code>field-result</code> */
Returns all <code>field-result</code> elements
getAllFieldResult
{ "repo_name": "forge/javaee-descriptors", "path": "api/src/main/java/org/jboss/shrinkwrap/descriptor/api/orm20/EntityResult.java", "license": "epl-1.0", "size": 3933 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,584,069
public JSType getRestrictedTypeGivenOutcome( Outcome outcome) { if (outcome.isTruthy() && identical(this, getNativeType(JSTypeNative.UNKNOWN_TYPE))) { return getNativeType(JSTypeNative.CHECKED_UNKNOWN_TYPE); } // Only `NULL_TYPE` and `VOID_TYPE` can really be nullish, // so the result for...
JSType function( Outcome outcome) { if (outcome.isTruthy() && identical(this, getNativeType(JSTypeNative.UNKNOWN_TYPE))) { return getNativeType(JSTypeNative.CHECKED_UNKNOWN_TYPE); } if (outcome.isNullish().toBoolean(false)) { if (identical(this, getNativeType(JSTypeNative.VOID_TYPE)) identical(this, getNativeType(JSTyp...
/** * Computes the restricted type of this type knowing that the * {@code ToBoolean} predicate has a specific value. For more information * about the {@code ToBoolean} predicate, see * {@link #getPossibleToBooleanOutcomes}. * * @param outcome the value of the {@code ToBoolean} predicate * * @ret...
Computes the restricted type of this type knowing that the ToBoolean predicate has a specific value. For more information about the ToBoolean predicate, see <code>#getPossibleToBooleanOutcomes</code>
getRestrictedTypeGivenOutcome
{ "repo_name": "GoogleChromeLabs/chromeos_smart_card_connector", "path": "third_party/closure-compiler/src/src/com/google/javascript/rhino/jstype/JSType.java", "license": "apache-2.0", "size": 56015 }
[ "com.google.javascript.jscomp.base.JSCompObjects", "com.google.javascript.rhino.Outcome" ]
import com.google.javascript.jscomp.base.JSCompObjects; import com.google.javascript.rhino.Outcome;
import com.google.javascript.jscomp.base.*; import com.google.javascript.rhino.*;
[ "com.google.javascript" ]
com.google.javascript;
2,267,679
private String getAlgoName(String classname) { ModifiedSelector sel = new ModifiedSelector(); // add the test classes to its classpath sel.addClasspath(testclasses); sel.setAlgorithmClass(classname); // let the selector do its checks sel.validate(); // extract...
String function(String classname) { ModifiedSelector sel = new ModifiedSelector(); sel.addClasspath(testclasses); sel.setAlgorithmClass(classname); sel.validate(); String s1 = sel.toString(); int posStart = s1.indexOf(STR) + 10; int posEnd = s1.indexOf(STR); String algo = s1.substring(posStart, posEnd); if (algo.starts...
/** * Extracts the real used algorithm name from the ModifiedSelector using * its toString() method. * @param classname the classname from the algorithm to use * @return the algorithm part from the toString() (without brackets) */
Extracts the real used algorithm name from the ModifiedSelector using its toString() method
getAlgoName
{ "repo_name": "Mayo-WE01051879/mayosapp", "path": "Build/src/tests/junit/org/apache/tools/ant/types/selectors/ModifiedSelectorTest.java", "license": "mit", "size": 35748 }
[ "org.apache.tools.ant.types.selectors.modifiedselector.ModifiedSelector" ]
import org.apache.tools.ant.types.selectors.modifiedselector.ModifiedSelector;
import org.apache.tools.ant.types.selectors.modifiedselector.*;
[ "org.apache.tools" ]
org.apache.tools;
820,694
public Object getTransferData( final java.awt.datatransfer.DataFlavor flavor) throws java.awt.datatransfer.UnsupportedFlavorException, java.io.IOException { // Native object if (flavor.equals(DATA_FLAVOR)) { return fetcher == null ? data : fetcher.getObject(); } // String if (flavor...
Object function( final java.awt.datatransfer.DataFlavor flavor) throws java.awt.datatransfer.UnsupportedFlavorException, java.io.IOException { if (flavor.equals(DATA_FLAVOR)) { return fetcher == null ? data : fetcher.getObject(); } if (flavor.equals(java.awt.datatransfer.DataFlavor.stringFlavor)) { return fetcher == nu...
/** * Returns the data encapsulated in this {@link TransferableObject}. If * the {@link Fetcher} constructor was used, then this is when the * {@link Fetcher#getObject getObject()} method will be called. If the * requested data flavor is not supported, then the * {@link Fetcher#getObject getObject()} met...
Returns the data encapsulated in this <code>TransferableObject</code>. If the <code>Fetcher</code> constructor was used, then this is when the <code>Fetcher#getObject getObject()</code> method will be called. If the requested data flavor is not supported, then the <code>Fetcher#getObject getObject()</code> method will ...
getTransferData
{ "repo_name": "mwager/jAM", "path": "src/be/hogent/tarsos/util/FileDrop.java", "license": "gpl-2.0", "size": 31863 }
[ "java.awt.datatransfer.DataFlavor", "java.io.IOException" ]
import java.awt.datatransfer.DataFlavor; import java.io.IOException;
import java.awt.datatransfer.*; import java.io.*;
[ "java.awt", "java.io" ]
java.awt; java.io;
659,783
private void printListOfKeywords() { List<String> list = Prism.getListOfKeywords(); mainLog.print("PRISM keywords:"); for (String s : list) { mainLog.print(" " + s); } mainLog.println(); }
void function() { List<String> list = Prism.getListOfKeywords(); mainLog.print(STR); for (String s : list) { mainLog.print(" " + s); } mainLog.println(); }
/** * Print out a list of all PRISM language keywords. */
Print out a list of all PRISM language keywords
printListOfKeywords
{ "repo_name": "nicodelpiano/prism", "path": "src/prism/PrismCL.java", "license": "gpl-2.0", "size": 86449 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,673,694
public void scElement(String uri, String localName, EncoderChannel channel) throws EXIException;
void function(String uri, String localName, EncoderChannel channel) throws EXIException;
/** * Receive notification of SC element. * * @param uri * namespaceURI of of SC element * @param localName * local-name of SC element * @param channel * encoder channel * * @throws EXIException * EXI exception */
Receive notification of SC element
scElement
{ "repo_name": "EXIficient/exificient-core", "path": "src/main/java/com/siemens/ct/exi/core/SelfContainedHandler.java", "license": "mit", "size": 1876 }
[ "com.siemens.ct.exi.core.exceptions.EXIException", "com.siemens.ct.exi.core.io.channel.EncoderChannel" ]
import com.siemens.ct.exi.core.exceptions.EXIException; import com.siemens.ct.exi.core.io.channel.EncoderChannel;
import com.siemens.ct.exi.core.exceptions.*; import com.siemens.ct.exi.core.io.channel.*;
[ "com.siemens.ct" ]
com.siemens.ct;
1,868,211
public final Selector getSelector() { return this.selector; }
final Selector function() { return this.selector; }
/** * Returns the selector used in this {@link Text}. * * @return The selector of this text */
Returns the selector used in this <code>Text</code>
getSelector
{ "repo_name": "kashike/SpongeAPI", "path": "src/main/java/org/spongepowered/api/text/SelectorText.java", "license": "mit", "size": 9827 }
[ "org.spongepowered.api.text.selector.Selector" ]
import org.spongepowered.api.text.selector.Selector;
import org.spongepowered.api.text.selector.*;
[ "org.spongepowered.api" ]
org.spongepowered.api;
1,987,362
public void onJoin(User u,Channel c,PrintStream out,PrintStream err){}
public void onJoin(User u,Channel c,PrintStream out,PrintStream err){}
/** * Run on a Slash-Me Action. * * @param u User who sent * @param c Channel sent to * @param l Line of Text * @param out Standard Output * @param err Standard Error */
Run on a Slash-Me Action
onSlashMe
{ "repo_name": "elTakisan/Takibat", "path": "src/ninja/pelirrojo/takibat/bot/BotPlugin.java", "license": "mit", "size": 2051 }
[ "java.io.PrintStream", "ninja.pelirrojo.takibat.irc.Channel", "ninja.pelirrojo.takibat.irc.User" ]
import java.io.PrintStream; import ninja.pelirrojo.takibat.irc.Channel; import ninja.pelirrojo.takibat.irc.User;
import java.io.*; import ninja.pelirrojo.takibat.irc.*;
[ "java.io", "ninja.pelirrojo.takibat" ]
java.io; ninja.pelirrojo.takibat;
20,989
@Override public FileStatus getFileLinkStatus(final Path f) throws IOException { FileStatus fi = getFileLinkStatusInternal(f, false); // getFileLinkStatus is supposed to return a symlink with a // qualified path if (fi.isSymlink()) { Path targetQual = FSLinkResolver.qualifySymlinkTarget(this.g...
FileStatus function(final Path f) throws IOException { FileStatus fi = getFileLinkStatusInternal(f, false); if (fi.isSymlink()) { Path targetQual = FSLinkResolver.qualifySymlinkTarget(this.getUri(), fi.getPath(), fi.getSymlink()); fi.setSymlink(targetQual); } return fi; }
/** * Return a FileStatus representing the given path. If the path refers * to a symlink return a FileStatus representing the link rather than * the object the link refers to. */
Return a FileStatus representing the given path. If the path refers to a symlink return a FileStatus representing the link rather than the object the link refers to
getFileLinkStatus
{ "repo_name": "Bizyroth/hadoop", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/RawLocalFileSystem.java", "license": "apache-2.0", "size": 28575 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
276,818
@Override public int rateResetValue(LPNTransitionPair ltPair){ / //*return upper <= 0 ? lower : upper; return upper<=0 ? lower : upper; }
int function(LPNTransitionPair ltPair){ / return upper<=0 ? lower : upper; }
/** * Gets the rate reset value. * @param ltPair The index for the continuous variable. * @return The value to reset to. */
Gets the rate reset value
rateResetValue
{ "repo_name": "MyersResearchGroup/iBioSim", "path": "verification/src/main/java/edu/utah/ece/async/lema/verification/timed_state_exploration/octagon/Octagon.java", "license": "apache-2.0", "size": 179493 }
[ "edu.utah.ece.async.lema.verification.timed_state_exploration.zoneProject.LPNTransitionPair" ]
import edu.utah.ece.async.lema.verification.timed_state_exploration.zoneProject.LPNTransitionPair;
import edu.utah.ece.async.lema.verification.timed_state_exploration.*;
[ "edu.utah.ece" ]
edu.utah.ece;
2,108,911
private boolean runOSCommand(ArrayList<String> command, Object console, final StringBuilder sb, boolean toBuffer, final JProgressBar prbCurrWork) { boolean ret_val = false; try { switch (this.CURR_OS) { case WINDOWS: ret_val = this.winCmd.executeC...
boolean function(ArrayList<String> command, Object console, final StringBuilder sb, boolean toBuffer, final JProgressBar prbCurrWork) { boolean ret_val = false; try { switch (this.CURR_OS) { case WINDOWS: ret_val = this.winCmd.executeCmd(command, console, sb, toBuffer, prbCurrWork); break; case UNIX: ret_val = this.uni...
/** * Execute the specified commands list in current operating system shell. * * @param command The {@literal ArrayList<String>} value for commands to * execute * @param console The JTextPane object to be used for output in swing GUI * @param sb The StringBuilder field for output ret...
Execute the specified commands list in current operating system shell
runOSCommand
{ "repo_name": "Corsol/MaNGOSUI-Dev", "path": "src/mangosui/CommandManager.java", "license": "gpl-2.0", "size": 73261 }
[ "java.io.IOException", "java.util.ArrayList", "java.util.concurrent.ExecutionException", "java.util.logging.Level", "javax.swing.JProgressBar" ]
import java.io.IOException; import java.util.ArrayList; import java.util.concurrent.ExecutionException; import java.util.logging.Level; import javax.swing.JProgressBar;
import java.io.*; import java.util.*; import java.util.concurrent.*; import java.util.logging.*; import javax.swing.*;
[ "java.io", "java.util", "javax.swing" ]
java.io; java.util; javax.swing;
2,533,884
private JSONObject createJSONObject(MotionEvent motionEvent, int pos, int pointerIndex) { PointF screenXY, pageXY; if (pos == CUR_EVENT) { pageXY = getEventLocInPageCoordinate(motionEvent, pointerIndex); screenXY = getEventLocInScreenCoordinate(motionEvent, pointerIndex); } else { pageXY...
JSONObject function(MotionEvent motionEvent, int pos, int pointerIndex) { PointF screenXY, pageXY; if (pos == CUR_EVENT) { pageXY = getEventLocInPageCoordinate(motionEvent, pointerIndex); screenXY = getEventLocInScreenCoordinate(motionEvent, pointerIndex); } else { pageXY = getEventLocInPageCoordinate(motionEvent, poin...
/** * Create a touchObject for a pointer at a certain moment. * @param motionEvent motionEvent, which contains all pointers event in a period of time * @param pos index used to retrieve a certain moment in a period of time. * @param pointerIndex pointerIndex * @return JSONObject represent a touch event ...
Create a touchObject for a pointer at a certain moment
createJSONObject
{ "repo_name": "lzyzsd/weex", "path": "android/sdk/src/main/java/com/taobao/weex/ui/view/gesture/WXGesture.java", "license": "apache-2.0", "size": 27970 }
[ "android.graphics.PointF", "android.view.MotionEvent", "com.alibaba.fastjson.JSONObject" ]
import android.graphics.PointF; import android.view.MotionEvent; import com.alibaba.fastjson.JSONObject;
import android.graphics.*; import android.view.*; import com.alibaba.fastjson.*;
[ "android.graphics", "android.view", "com.alibaba.fastjson" ]
android.graphics; android.view; com.alibaba.fastjson;
1,014,742
public boolean performFinish() { final String containerName = page.getContainerName(); final String fileName = page.getFileName(); this.newName = fileName; int seperatorIdx = newName.indexOf('.'); if (seperatorIdx != -1) { newName = newName.substring(0, seperatorIdx); } final IFile file; try { ...
boolean function() { final String containerName = page.getContainerName(); final String fileName = page.getFileName(); this.newName = fileName; int seperatorIdx = newName.indexOf('.'); if (seperatorIdx != -1) { newName = newName.substring(0, seperatorIdx); } final IFile file; try { file = getFile(fileName, containerNam...
/** * This method is called when 'Finish' button is pressed in the wizard. We will * create an operation and run it using the wizard as execution context. */
This method is called when 'Finish' button is pressed in the wizard. We will create an operation and run it using the wizard as execution context
performFinish
{ "repo_name": "dresden-ocl/dresdenocl", "path": "plugins/org.dresdenocl.language.ocl.resource.ocl.ui/src-gen/org/dresdenocl/language/ocl/resource/ocl/ui/OclNewFileWizard.java", "license": "lgpl-3.0", "size": 6449 }
[ "org.eclipse.core.resources.IFile", "org.eclipse.core.runtime.CoreException", "org.eclipse.swt.widgets.MessageBox" ]
import org.eclipse.core.resources.IFile; import org.eclipse.core.runtime.CoreException; import org.eclipse.swt.widgets.MessageBox;
import org.eclipse.core.resources.*; import org.eclipse.core.runtime.*; import org.eclipse.swt.widgets.*;
[ "org.eclipse.core", "org.eclipse.swt" ]
org.eclipse.core; org.eclipse.swt;
346,403
@SuppressWarnings("unchecked") public static Map<String, String> wf_actionData(String actionName) { ELEvaluator eval = ELEvaluator.getCurrent(); Properties props = (Properties) eval.getVariable(actionName + ACTION_ERROR_MESSAGE); if (props == null) { String data = getWorkflo...
@SuppressWarnings(STR) static Map<String, String> function(String actionName) { ELEvaluator eval = ELEvaluator.getCurrent(); Properties props = (Properties) eval.getVariable(actionName + ACTION_ERROR_MESSAGE); if (props == null) { String data = getWorkflow().getWorkflowInstance() .getVar(actionName + WorkflowInstance.N...
/** * Return the action data for an action. * * @param actionName action name. * @return value of the property. */
Return the action data for an action
wf_actionData
{ "repo_name": "sunmeng007/oozie", "path": "core/src/main/java/org/apache/oozie/DagELFunctions.java", "license": "apache-2.0", "size": 10860 }
[ "java.util.Map", "java.util.Properties", "org.apache.oozie.util.ELEvaluator", "org.apache.oozie.util.PropertiesUtils", "org.apache.oozie.workflow.WorkflowInstance" ]
import java.util.Map; import java.util.Properties; import org.apache.oozie.util.ELEvaluator; import org.apache.oozie.util.PropertiesUtils; import org.apache.oozie.workflow.WorkflowInstance;
import java.util.*; import org.apache.oozie.util.*; import org.apache.oozie.workflow.*;
[ "java.util", "org.apache.oozie" ]
java.util; org.apache.oozie;
555,851
@Override public ResolvedBinding resolveExport(String exportName, Map<ModuleRecord, Set<String>> resolveSet) throws IOException, MalformedNameException, ResolutionException { SourceTextModuleRecord module = this; Set<String> resolvedExports = resolveSet.get(module);...
ResolvedBinding function(String exportName, Map<ModuleRecord, Set<String>> resolveSet) throws IOException, MalformedNameException, ResolutionException { SourceTextModuleRecord module = this; Set<String> resolvedExports = resolveSet.get(module); if (resolvedExports == null) { resolveSet.put(module, resolvedExports = new...
/** * 15.2.1.16.3 ResolveExport(exportName, resolveSet) Concrete Method */
15.2.1.16.3 ResolveExport(exportName, resolveSet) Concrete Method
resolveExport
{ "repo_name": "anba/es6draft", "path": "src/main/java/com/github/anba/es6draft/runtime/modules/SourceTextModuleRecord.java", "license": "mit", "size": 29617 }
[ "com.github.anba.es6draft.runtime.modules.ModuleSemantics", "java.io.IOException", "java.util.HashSet", "java.util.Map", "java.util.Objects", "java.util.Set" ]
import com.github.anba.es6draft.runtime.modules.ModuleSemantics; import java.io.IOException; import java.util.HashSet; import java.util.Map; import java.util.Objects; import java.util.Set;
import com.github.anba.es6draft.runtime.modules.*; import java.io.*; import java.util.*;
[ "com.github.anba", "java.io", "java.util" ]
com.github.anba; java.io; java.util;
2,413,776
private static void readControlEvent(InputStream input, int code, OutputStream output) throws IOException { int length = 0; int type = (code & 0xF0); switch (type) { case 0x80: length = 2; break; case 0x90: length = ...
static void function(InputStream input, int code, OutputStream output) throws IOException { int length = 0; int type = (code & 0xF0); switch (type) { case 0x80: length = 2; break; case 0x90: length = 2; break; case 0xA0: length = 2; break; case 0xB0: length = 2; break; case 0xC0: length = 1; break; case 0xD0: length = ...
/** * Copies one midi control message from input to output. * @param input - The input stream to read from. * @param code - The code byte of the message. * @param output - The output stream to write to. * @throws IOException - On any kind of read error or invalid format. */
Copies one midi control message from input to output
readControlEvent
{ "repo_name": "UIKit0/music-synthesizer-for-android", "path": "core/src/com/levien/synthesizer/core/midi/MidiReader.java", "license": "apache-2.0", "size": 10389 }
[ "java.io.IOException", "java.io.InputStream", "java.io.OutputStream" ]
import java.io.IOException; import java.io.InputStream; import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
2,187,030
public Query getQuery() { return header.getQuery(); }
Query function() { return header.getQuery(); }
/** * This method is used to acquire the query part from the * HTTP request URI target. This will return only the values * that have been extracted from the request URI target. * * @return the query associated with the HTTP target URI */
This method is used to acquire the query part from the HTTP request URI target. This will return only the values that have been extracted from the request URI target
getQuery
{ "repo_name": "ael-code/preston", "path": "src/org/simpleframework/http/core/RequestMessage.java", "license": "gpl-2.0", "size": 12579 }
[ "org.simpleframework.http.Query" ]
import org.simpleframework.http.Query;
import org.simpleframework.http.*;
[ "org.simpleframework.http" ]
org.simpleframework.http;
1,439,866
void setMembers(List<Member> members);
void setMembers(List<Member> members);
/** * Set the static members of the cluster. This is used only with * <a href="http://afkham.org/2008/05/group-membership-management-schemes.html"> * static group membership </a> * * @param members Members to be added */
Set the static members of the cluster. This is used only with static group membership
setMembers
{ "repo_name": "intalio/axis2", "path": "modules/kernel/src/org/apache/axis2/clustering/ClusterManager.java", "license": "apache-2.0", "size": 7089 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,456,326
@AtMostOnce void createSymlink(String target, String link, FsPermission dirPerm, boolean createParent) throws IOException;
void createSymlink(String target, String link, FsPermission dirPerm, boolean createParent) throws IOException;
/** * Create symlink to a file or directory. * @param target The path of the destination that the * link points to. * @param link The path of the link being created. * @param dirPerm permissions to use when creating parent directories * @param createParent - if true then missing parent d...
Create symlink to a file or directory
createSymlink
{ "repo_name": "bitmybytes/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java", "license": "apache-2.0", "size": 61368 }
[ "java.io.IOException", "org.apache.hadoop.fs.permission.FsPermission" ]
import java.io.IOException; import org.apache.hadoop.fs.permission.FsPermission;
import java.io.*; import org.apache.hadoop.fs.permission.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
2,512,341
final RPAction listproducers = new RPAction(); listproducers.put("type", "listproducers"); ClientSingletonRepository.getClientFramework().send(listproducers); return true; }
final RPAction listproducers = new RPAction(); listproducers.put("type", STR); ClientSingletonRepository.getClientFramework().send(listproducers); return true; }
/** * Execute a chat command. * * @param params * The formal parameters. * @param remainder * Line content after parameters. * * @return <code>true</code> if command was handled. */
Execute a chat command
execute
{ "repo_name": "AntumDeluge/arianne-stendhal", "path": "src/games/stendhal/client/actions/ListProducersAction.java", "license": "gpl-2.0", "size": 1888 }
[ "games.stendhal.client.ClientSingletonRepository" ]
import games.stendhal.client.ClientSingletonRepository;
import games.stendhal.client.*;
[ "games.stendhal.client" ]
games.stendhal.client;
2,685,421
@Test public void testSetFullFileStatusFailInheritAcls() throws IOException { Configuration conf = new Configuration(); conf.set("dfs.namenode.acls.enabled", "true"); HdfsUtils.HadoopFileStatus mockHadoopFileStatus = mock(HdfsUtils.HadoopFileStatus.class); FileStatus mockSourceStatus = mock(FileSta...
void function() throws IOException { Configuration conf = new Configuration(); conf.set(STR, "true"); HdfsUtils.HadoopFileStatus mockHadoopFileStatus = mock(HdfsUtils.HadoopFileStatus.class); FileStatus mockSourceStatus = mock(FileStatus.class); AclStatus mockAclStatus = mock(AclStatus.class); FileSystem mockFs = mock(...
/** * Tests that link HdfsUtils#setFullFileStatus * does not thrown an exception when setting ACLs and without recursion. */
Tests that link HdfsUtils#setFullFileStatus does not thrown an exception when setting ACLs and without recursion
testSetFullFileStatusFailInheritAcls
{ "repo_name": "vineetgarg02/hive", "path": "standalone-metastore/metastore-server/src/test/java/org/apache/hadoop/hive/metastore/utils/TestHdfsUtils.java", "license": "apache-2.0", "size": 16042 }
[ "java.io.IOException", "java.util.List", "org.apache.hadoop.conf.Configuration", "org.apache.hadoop.fs.FileStatus", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.fs.Path", "org.apache.hadoop.fs.permission.AclStatus", "org.apache.hadoop.fs.permission.FsPermission", "org.mockito.ArgumentMatche...
import java.io.IOException; import java.util.List; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.permission.AclStatus; import org.apache.hadoop.fs.permission.FsPermission; import ...
import java.io.*; import java.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.fs.permission.*; import org.mockito.*;
[ "java.io", "java.util", "org.apache.hadoop", "org.mockito" ]
java.io; java.util; org.apache.hadoop; org.mockito;
80,607
public boolean attackEntityFrom(DamageSource par1DamageSource, int par2) { if (this.isEntityInvulnerable()) { return false; } else { if (!this.worldObj.isRemote && this.getIsBatHanging()) { this.setIsBatHanging(false); ...
boolean function(DamageSource par1DamageSource, int par2) { if (this.isEntityInvulnerable()) { return false; } else { if (!this.worldObj.isRemote && this.getIsBatHanging()) { this.setIsBatHanging(false); } return super.attackEntityFrom(par1DamageSource, par2); } }
/** * Called when the entity is attacked. */
Called when the entity is attacked
attackEntityFrom
{ "repo_name": "liquidgithub/Biotech", "path": "src/minecraft/biotech/entity/passive/bioBat.java", "license": "bsd-3-clause", "size": 9147 }
[ "net.minecraft.util.DamageSource" ]
import net.minecraft.util.DamageSource;
import net.minecraft.util.*;
[ "net.minecraft.util" ]
net.minecraft.util;
2,765,576
public void test2( Connection conn, int blob_size, int work_size, int total_work) throws SQLException { byte[] long_byteVal = new byte[blob_size]; byte[] short_byteVal = new byte[10]; beginTest( conn, "t...
void function( Connection conn, int blob_size, int work_size, int total_work) throws SQLException { byte[] long_byteVal = new byte[blob_size]; byte[] short_byteVal = new byte[10]; beginTest( conn, STR + work_size + STR + blob_size + STR + total_work); Arrays.fill(long_byteVal, (byte)'L'); Arrays.fill(short_byteVal, (by...
/** * Test reclaim of sequence of deleted blobs. * <p> * Simulates a "queue" of work of input "work_size". Inserts "work_size" * elements, and then subsequently in each transaction inserts a new * work item and deletes the oldest work item. Checks that the used * space reaches a steady ...
Test reclaim of sequence of deleted blobs. Simulates a "queue" of work of input "work_size". Inserts "work_size" elements, and then subsequently in each transaction inserts a new work item and deletes the oldest work item. Checks that the used space reaches a steady state, rather than constantly growing
test2
{ "repo_name": "papicella/snappy-store", "path": "gemfirexd/tools/src/testing/java/org/apache/derbyTesting/functionTests/tests/storetests/st_reclaim_longcol.java", "license": "apache-2.0", "size": 14839 }
[ "java.sql.Connection", "java.sql.PreparedStatement", "java.sql.SQLException", "java.util.Arrays" ]
import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; import java.util.Arrays;
import java.sql.*; import java.util.*;
[ "java.sql", "java.util" ]
java.sql; java.util;
793,074
Future<LoadBalancerGetResponse> getAsync(String resourceGroupName, String loadBalancerName);
Future<LoadBalancerGetResponse> getAsync(String resourceGroupName, String loadBalancerName);
/** * The Get ntework interface operation retreives information about the * specified network interface. * * @param resourceGroupName Required. The name of the resource group. * @param loadBalancerName Required. The name of the loadBalancer. * @return Response of a GET Load Balancer operation ...
The Get ntework interface operation retreives information about the specified network interface
getAsync
{ "repo_name": "southworkscom/azure-sdk-for-java", "path": "resource-management/azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/LoadBalancerOperations.java", "license": "apache-2.0", "size": 11929 }
[ "com.microsoft.azure.management.network.models.LoadBalancerGetResponse", "java.util.concurrent.Future" ]
import com.microsoft.azure.management.network.models.LoadBalancerGetResponse; import java.util.concurrent.Future;
import com.microsoft.azure.management.network.models.*; import java.util.concurrent.*;
[ "com.microsoft.azure", "java.util" ]
com.microsoft.azure; java.util;
1,993,230
public static DefaultHlsTrackSelector newSubtitleInstance() { return new DefaultHlsTrackSelector(null, TYPE_SUBTITLE); } private DefaultHlsTrackSelector(Context context, int type) { this.context = context; this.type = type; }
static DefaultHlsTrackSelector function() { return new DefaultHlsTrackSelector(null, TYPE_SUBTITLE); } private DefaultHlsTrackSelector(Context context, int type) { this.context = context; this.type = type; }
/** * Creates a {@link DefaultHlsTrackSelector} that selects subtitle renditions. * * @return The selector instance. */
Creates a <code>DefaultHlsTrackSelector</code> that selects subtitle renditions
newSubtitleInstance
{ "repo_name": "malizadehq/MyTelegram", "path": "TMessagesProj/src/main/java/org/telegram/messenger/exoplayer/hls/DefaultHlsTrackSelector.java", "license": "gpl-2.0", "size": 5069 }
[ "android.content.Context" ]
import android.content.Context;
import android.content.*;
[ "android.content" ]
android.content;
214,717
protected void connect(String host, int port) throws UnknownHostException, IOException { boolean connected = false; try { InetAddress address = InetAddress.getByName(host); this.port = port; this.address = address; connectToAddress(address...
void function(String host, int port) throws UnknownHostException, IOException { boolean connected = false; try { InetAddress address = InetAddress.getByName(host); this.port = port; this.address = address; connectToAddress(address, port, timeout); connected = true; } finally { if (!connected) { try { close(); } catch (...
/** * Creates a socket and connects it to the specified port on * the specified host. * @param host the specified host * @param port the specified port */
Creates a socket and connects it to the specified port on the specified host
connect
{ "repo_name": "bandcampdotcom/j2objc", "path": "jre_emul/android/platform/libcore/ojluni/src/main/java/java/net/AbstractPlainSocketImpl.java", "license": "apache-2.0", "size": 20737 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
2,255,449
private void readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException { ois.defaultReadObject(); MatrixUtils.deserializeRealMatrix(this, "tableau", ois); }
void function(ObjectInputStream ois) throws ClassNotFoundException, IOException { ois.defaultReadObject(); MatrixUtils.deserializeRealMatrix(this, STR, ois); }
/** * Deserialize the instance. * @param ois stream from which the object should be read * @throws ClassNotFoundException if a class in the stream cannot be found * @throws IOException if object cannot be read from the stream */
Deserialize the instance
readObject
{ "repo_name": "justinwm/astor", "path": "examples/math_2/src/main/java/org/apache/commons/math3/optimization/linear/SimplexTableau.java", "license": "gpl-2.0", "size": 23631 }
[ "java.io.IOException", "java.io.ObjectInputStream", "org.apache.commons.math3.linear.MatrixUtils" ]
import java.io.IOException; import java.io.ObjectInputStream; import org.apache.commons.math3.linear.MatrixUtils;
import java.io.*; import org.apache.commons.math3.linear.*;
[ "java.io", "org.apache.commons" ]
java.io; org.apache.commons;
1,503,998
public void setPrefs( String s ) { m_mappings.put( WikiContext.PREFS, s ); }
void function( String s ) { m_mappings.put( WikiContext.PREFS, s ); }
/** * Set the template for the PREFS context. * * @param s The template name. */
Set the template for the PREFS context
setPrefs
{ "repo_name": "tateshitah/jspwiki", "path": "jspwiki-war/src/main/java/org/apache/wiki/tags/ContentTag.java", "license": "apache-2.0", "size": 5466 }
[ "org.apache.wiki.WikiContext" ]
import org.apache.wiki.WikiContext;
import org.apache.wiki.*;
[ "org.apache.wiki" ]
org.apache.wiki;
1,163,021
public static Get toGet(final MutationProto proto, final CellScanner cellScanner) throws IOException { MutationType type = proto.getMutateType(); assert type == MutationType.INCREMENT || type == MutationType.APPEND : type.name(); byte[] row = proto.hasRow() ? proto.getRow().toByteArray() : null; ...
static Get function(final MutationProto proto, final CellScanner cellScanner) throws IOException { MutationType type = proto.getMutateType(); assert type == MutationType.INCREMENT type == MutationType.APPEND : type.name(); byte[] row = proto.hasRow() ? proto.getRow().toByteArray() : null; Get get = null; int cellCount ...
/** * Convert a protocol buffer Mutate to a Get. * @param proto the protocol buffer Mutate to convert. * @param cellScanner * @return the converted client get. * @throws IOException */
Convert a protocol buffer Mutate to a Get
toGet
{ "repo_name": "JingchengDu/hbase", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java", "license": "apache-2.0", "size": 69138 }
[ "com.google.protobuf.TextFormat", "java.io.IOException", "org.apache.hadoop.hbase.Cell", "org.apache.hadoop.hbase.CellScanner", "org.apache.hadoop.hbase.DoNotRetryIOException", "org.apache.hadoop.hbase.client.Get", "org.apache.hadoop.hbase.io.TimeRange", "org.apache.hadoop.hbase.protobuf.generated.Cli...
import com.google.protobuf.TextFormat; import java.io.IOException; import org.apache.hadoop.hbase.Cell; import org.apache.hadoop.hbase.CellScanner; import org.apache.hadoop.hbase.DoNotRetryIOException; import org.apache.hadoop.hbase.client.Get; import org.apache.hadoop.hbase.io.TimeRange; import org.apache.hadoop.hbase...
import com.google.protobuf.*; import java.io.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.io.*; import org.apache.hadoop.hbase.protobuf.generated.*; import org.apache.hadoop.hbase.util.*;
[ "com.google.protobuf", "java.io", "org.apache.hadoop" ]
com.google.protobuf; java.io; org.apache.hadoop;
858,051
public void prepareMessage(Thing thing, Channel channel, Command command) { if (getDevice() != null && getDevice().getInited() && channel != null) { JsonObject newObject = null; State state = null; String service = KM200Utils.checkParameterReplacement(channel, getDevice()...
void function(Thing thing, Channel channel, Command command) { if (getDevice() != null && getDevice().getInited() && channel != null) { JsonObject newObject = null; State state = null; String service = KM200Utils.checkParameterReplacement(channel, getDevice()); logger.debug(STR, channel.getLabel(), service); newObject ...
/** * Prepares a message for sending */
Prepares a message for sending
prepareMessage
{ "repo_name": "Snickermicker/openhab2", "path": "bundles/org.openhab.binding.km200/src/main/java/org/openhab/binding/km200/internal/handler/KM200GatewayHandler.java", "license": "epl-1.0", "size": 25907 }
[ "com.google.gson.JsonObject", "org.eclipse.smarthome.core.thing.Channel", "org.eclipse.smarthome.core.thing.Thing", "org.eclipse.smarthome.core.types.Command", "org.eclipse.smarthome.core.types.State", "org.openhab.binding.km200.internal.KM200Utils" ]
import com.google.gson.JsonObject; import org.eclipse.smarthome.core.thing.Channel; import org.eclipse.smarthome.core.thing.Thing; import org.eclipse.smarthome.core.types.Command; import org.eclipse.smarthome.core.types.State; import org.openhab.binding.km200.internal.KM200Utils;
import com.google.gson.*; import org.eclipse.smarthome.core.thing.*; import org.eclipse.smarthome.core.types.*; import org.openhab.binding.km200.internal.*;
[ "com.google.gson", "org.eclipse.smarthome", "org.openhab.binding" ]
com.google.gson; org.eclipse.smarthome; org.openhab.binding;
156,497
public final void setAttachment(FormBodyPart attachment) { this.attachments.add(attachment); } /** * Provides the document to process as a String * * Convenience method that allows setting the text. * "mime" is the mime expected by the server (e.g., text/query). * @param text Text to proces...
final void function(FormBodyPart attachment) { this.attachments.add(attachment); } /** * Provides the document to process as a String * * Convenience method that allows setting the text. * "mime" is the mime expected by the server (e.g., text/query). * @param text Text to process * @param mime Mime type as described in...
/** * Provides the document to process. * * The document is provided as an instance of FormBodyPart that already * includes the text and its mime. The mime must have been set to a valid * mime + character set. * * @param attachment document to process */
Provides the document to process. The document is provided as an instance of FormBodyPart that already includes the text and its mime. The mime must have been set to a valid mime + character set
setAttachment
{ "repo_name": "Idilia/idilia-java-sdk", "path": "src/main/java/com/idilia/services/text/DisambiguateRequest.java", "license": "apache-2.0", "size": 9291 }
[ "org.apache.http.entity.mime.FormBodyPart" ]
import org.apache.http.entity.mime.FormBodyPart;
import org.apache.http.entity.mime.*;
[ "org.apache.http" ]
org.apache.http;
751,387
EReference getResourceRole_ResourceAssignmentExpression();
EReference getResourceRole_ResourceAssignmentExpression();
/** * Returns the meta object for the containment reference '{@link org.eclipse.bpmn2.ResourceRole#getResourceAssignmentExpression <em>Resource Assignment Expression</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the containment reference '<em>Resource Assignment Express...
Returns the meta object for the containment reference '<code>org.eclipse.bpmn2.ResourceRole#getResourceAssignmentExpression Resource Assignment Expression</code>'.
getResourceRole_ResourceAssignmentExpression
{ "repo_name": "Rikkola/kie-wb-common", "path": "kie-wb-common-stunner/kie-wb-common-stunner-sets/kie-wb-common-stunner-bpmn/kie-wb-common-stunner-bpmn-emf/src/main/java/org/eclipse/bpmn2/Bpmn2Package.java", "license": "apache-2.0", "size": 929298 }
[ "org.eclipse.emf.ecore.EReference" ]
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,124,464
public void parse(Dictionary<String, ?> properties) throws ConfigurationException { valid = false; host = (String) properties.get(CONFIG_KEY_HOMEMATIC_HOST); if (StringUtils.isBlank(host)) { throw new ConfigurationException("homematic", "Parameter host is mandatory and must be configured. Please check...
void function(Dictionary<String, ?> properties) throws ConfigurationException { valid = false; host = (String) properties.get(CONFIG_KEY_HOMEMATIC_HOST); if (StringUtils.isBlank(host)) { throw new ConfigurationException(STR, STR); } callbackHost = (String) properties.get(CONFIG_KEY_CALLBACK_HOST); if (StringUtils.isBla...
/** * Parses and validates the properties in the openhab.cfg. */
Parses and validates the properties in the openhab.cfg
parse
{ "repo_name": "hubermi/openhab", "path": "bundles/binding/org.openhab.binding.homematic/src/main/java/org/openhab/binding/homematic/internal/common/HomematicConfig.java", "license": "epl-1.0", "size": 4711 }
[ "java.util.Dictionary", "org.apache.commons.lang.StringUtils", "org.openhab.binding.homematic.internal.util.LocalNetworkInterface", "org.osgi.service.cm.ConfigurationException" ]
import java.util.Dictionary; import org.apache.commons.lang.StringUtils; import org.openhab.binding.homematic.internal.util.LocalNetworkInterface; import org.osgi.service.cm.ConfigurationException;
import java.util.*; import org.apache.commons.lang.*; import org.openhab.binding.homematic.internal.util.*; import org.osgi.service.cm.*;
[ "java.util", "org.apache.commons", "org.openhab.binding", "org.osgi.service" ]
java.util; org.apache.commons; org.openhab.binding; org.osgi.service;
64,595
@Override public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) { if (fromUser) { mCurrentHsvValues[0] = mHueDetails.getValue(); mCurrentHsvValues[1] = mSaturationDetails.getValue() / 100.0f; mCurrentHsvValues[2] = mValueDetails.getValue() / 1...
void function(SeekBar seekBar, int progress, boolean fromUser) { if (fromUser) { mCurrentHsvValues[0] = mHueDetails.getValue(); mCurrentHsvValues[1] = mSaturationDetails.getValue() / 100.0f; mCurrentHsvValues[2] = mValueDetails.getValue() / 100.0f; mCurrentColor = Color.HSVToColor(mCurrentHsvValues); updateHueGradient(...
/** * Callback for when a slider is updated on the advanced view. * * @param seekBar The color slider that was updated. * @param progress The new value of the color slider. * @param fromUser Whether it was the user the changed the value, or whether * we were setting it up. ...
Callback for when a slider is updated on the advanced view
onProgressChanged
{ "repo_name": "gendeld/android-chromium-view", "path": "ui/src/org/chromium/ui/ColorPickerAdvanced.java", "license": "mit", "size": 8306 }
[ "android.graphics.Color", "android.widget.SeekBar" ]
import android.graphics.Color; import android.widget.SeekBar;
import android.graphics.*; import android.widget.*;
[ "android.graphics", "android.widget" ]
android.graphics; android.widget;
1,613,082
@ServiceMethod(returns = ReturnType.COLLECTION) private PagedFlux<WorkbookInner> listAsync(CategoryType category) { final List<String> tags = null; final Boolean canFetchContent = null; return new PagedFlux<>( () -> listSinglePageAsync(category, tags, canFetchContent), ...
@ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux<WorkbookInner> function(CategoryType category) { final List<String> tags = null; final Boolean canFetchContent = null; return new PagedFlux<>( () -> listSinglePageAsync(category, tags, canFetchContent), nextLink -> listBySubscriptionNextSinglePageAsync(nextLink)...
/** * Get all private workbooks defined within a specified subscription and category. * * @param category Category of workbook to return. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws WorkbookErrorDefinitionException thrown if the request is rejected by ...
Get all private workbooks defined within a specified subscription and category
listAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/applicationinsights/azure-resourcemanager-applicationinsights/src/main/java/com/azure/resourcemanager/applicationinsights/implementation/WorkbooksClientImpl.java", "license": "mit", "size": 99702 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedFlux", "com.azure.resourcemanager.applicationinsights.fluent.models.WorkbookInner", "com.azure.resourcemanager.applicationinsights.models.CategoryType", "java.util.List" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedFlux; import com.azure.resourcemanager.applicationinsights.fluent.models.WorkbookInner; import com.azure.resourcemanager.applicationinsights.models.CategoryType; import java.util.List;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.applicationinsights.fluent.models.*; import com.azure.resourcemanager.applicationinsights.models.*; import java.util.*;
[ "com.azure.core", "com.azure.resourcemanager", "java.util" ]
com.azure.core; com.azure.resourcemanager; java.util;
2,385,195
static void writeICC(ICC_Profile profile, ImageOutputStream ios) throws IOException { int LENGTH_LENGTH = 2; final String ID = "ICC_PROFILE"; int ID_LENGTH = ID.length()+1; // spec says it's null-terminated int COUNTS_LENGTH = 2; int MAX_ICC_CHUNK_SIZE = 6...
static void writeICC(ICC_Profile profile, ImageOutputStream ios) throws IOException { int LENGTH_LENGTH = 2; final String ID = STR; int ID_LENGTH = ID.length()+1; int COUNTS_LENGTH = 2; int MAX_ICC_CHUNK_SIZE = 65535 - LENGTH_LENGTH - ID_LENGTH - COUNTS_LENGTH; byte [] data = profile.getData(); int numChunks = data.len...
/** * Write out the given profile to the stream, embedded in * the necessary number of APP2 segments, per the ICC spec. * This is the only mechanism for writing an ICC profile * to a stream. */
Write out the given profile to the stream, embedded in the necessary number of APP2 segments, per the ICC spec. This is the only mechanism for writing an ICC profile to a stream
writeICC
{ "repo_name": "openjdk/jdk7u", "path": "jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JFIFMarkerSegment.java", "license": "gpl-2.0", "size": 59616 }
[ "java.awt.color.ColorSpace", "java.io.IOException", "java.util.ArrayList", "javax.imageio.IIOException", "javax.imageio.metadata.IIOInvalidTreeException", "javax.imageio.metadata.IIOMetadataNode", "javax.imageio.stream.ImageOutputStream", "org.w3c.dom.Node" ]
import java.awt.color.ColorSpace; import java.io.IOException; import java.util.ArrayList; import javax.imageio.IIOException; import javax.imageio.metadata.IIOInvalidTreeException; import javax.imageio.metadata.IIOMetadataNode; import javax.imageio.stream.ImageOutputStream; import org.w3c.dom.Node;
import java.awt.color.*; import java.io.*; import java.util.*; import javax.imageio.*; import javax.imageio.metadata.*; import javax.imageio.stream.*; import org.w3c.dom.*;
[ "java.awt", "java.io", "java.util", "javax.imageio", "org.w3c.dom" ]
java.awt; java.io; java.util; javax.imageio; org.w3c.dom;
1,272,345
EAttribute getRegularTimePoint_Value2();
EAttribute getRegularTimePoint_Value2();
/** * Returns the meta object for the attribute '{@link CIM.IEC61970.Core.RegularTimePoint#getValue2 <em>Value2</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for the attribute '<em>Value2</em>'. * @see CIM.IEC61970.Core.RegularTimePoint#getValue2() * @see #getRegularTim...
Returns the meta object for the attribute '<code>CIM.IEC61970.Core.RegularTimePoint#getValue2 Value2</code>'.
getRegularTimePoint_Value2
{ "repo_name": "georghinkel/ttc2017smartGrids", "path": "solutions/ModelJoin/src/main/java/CIM/IEC61970/Core/CorePackage.java", "license": "mit", "size": 253784 }
[ "org.eclipse.emf.ecore.EAttribute" ]
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,481,151
@Override public Calendar next() { if (spot.equals(endFinal)) { throw new NoSuchElementException(); } spot.add(Calendar.DATE, 1); return (Calendar) spot.clone(); }
Calendar function() { if (spot.equals(endFinal)) { throw new NoSuchElementException(); } spot.add(Calendar.DATE, 1); return (Calendar) spot.clone(); }
/** * Return the next calendar in the iteration * * @return Object calendar for the next date */
Return the next calendar in the iteration
next
{ "repo_name": "jacktan1991/commons-lang", "path": "src/main/java/org/apache/commons/lang3/time/DateUtils.java", "license": "apache-2.0", "size": 81155 }
[ "java.util.Calendar", "java.util.NoSuchElementException" ]
import java.util.Calendar; import java.util.NoSuchElementException;
import java.util.*;
[ "java.util" ]
java.util;
1,049,305
private static boolean clientIdMatchesRegex(String clientId, String clientIdValidatorRegex) { if (clientIdRegexPattern == null) { clientIdRegexPattern = Pattern.compile(clientIdValidatorRegex); } return clientIdRegexPattern.matcher(clientId).matches(); }
static boolean function(String clientId, String clientIdValidatorRegex) { if (clientIdRegexPattern == null) { clientIdRegexPattern = Pattern.compile(clientIdValidatorRegex); } return clientIdRegexPattern.matcher(clientId).matches(); }
/** * Validate client id according to the regex. * * @param clientId * @param clientIdValidatorRegex * @return validated or not */
Validate client id according to the regex
clientIdMatchesRegex
{ "repo_name": "IsuraD/identity-inbound-auth-oauth", "path": "components/org.wso2.carbon.identity.oauth.dcr/src/main/java/org/wso2/carbon/identity/oauth/dcr/service/DCRMService.java", "license": "apache-2.0", "size": 31159 }
[ "java.util.regex.Pattern" ]
import java.util.regex.Pattern;
import java.util.regex.*;
[ "java.util" ]
java.util;
1,323,440
public static void pullOutEqualities(CQIE query) { Unifier substitutions = new Unifier(); int[] newVarCounter = { 1 }; Set<Function> booleanAtoms = new HashSet<Function>(); List<Function> equalities = new LinkedList<Function>(); pullOutEqualities(query.getBody(), substitutions, equalities, newVarCounter, ...
static void function(CQIE query) { Unifier substitutions = new Unifier(); int[] newVarCounter = { 1 }; Set<Function> booleanAtoms = new HashSet<Function>(); List<Function> equalities = new LinkedList<Function>(); pullOutEqualities(query.getBody(), substitutions, equalities, newVarCounter, false); List body = query.getB...
/*** * This method introduces new variable names in each data atom and * equalities to account for JOIN operations. This method is called before * generating SQL queries and allows to avoid cross refrences in nested * JOINs, which generate wrong ON or WHERE conditions. * * * @param currentTerms * @par...
This method introduces new variable names in each data atom and equalities to account for JOIN operations. This method is called before generating SQL queries and allows to avoid cross refrences in nested JOINs, which generate wrong ON or WHERE conditions
pullOutEqualities
{ "repo_name": "clarkparsia/ontop", "path": "reformulation-core/src/main/java/it/unibz/krdb/obda/owlrefplatform/core/basicoperations/DatalogNormalizer.java", "license": "apache-2.0", "size": 27542 }
[ "it.unibz.krdb.obda.model.Function", "java.util.HashSet", "java.util.LinkedList", "java.util.List", "java.util.Set" ]
import it.unibz.krdb.obda.model.Function; import java.util.HashSet; import java.util.LinkedList; import java.util.List; import java.util.Set;
import it.unibz.krdb.obda.model.*; import java.util.*;
[ "it.unibz.krdb", "java.util" ]
it.unibz.krdb; java.util;
685,541
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // UncaughtExceptionHandlerを実装したクラスをセットする。 CustomUncaughtExceptionHandler customUncaughtExceptionHandler; customUncaughtExceptionHandler = new CustomUncaughtExceptionHandler(getApp...
void function(Bundle savedInstanceState) { super.onCreate(savedInstanceState); CustomUncaughtExceptionHandler customUncaughtExceptionHandler; customUncaughtExceptionHandler = new CustomUncaughtExceptionHandler(getApplicationContext()); Thread.setDefaultUncaughtExceptionHandler(customUncaughtExceptionHandler); mFragment...
/*********************************************** * Life Cycle * ***********************************************/
Life Cycle
onCreate
{ "repo_name": "hackugyo/ThoughtsCalendar_Android", "path": "app/src/main/java/jp/ne/hatena/hackugyo/thoughtscalendar/ui/AbsFragmentActivity.java", "license": "apache-2.0", "size": 17123 }
[ "android.os.Bundle", "jp.ne.hatena.hackugyo.thoughtscalendar.exception.CustomUncaughtExceptionHandler" ]
import android.os.Bundle; import jp.ne.hatena.hackugyo.thoughtscalendar.exception.CustomUncaughtExceptionHandler;
import android.os.*; import jp.ne.hatena.hackugyo.thoughtscalendar.exception.*;
[ "android.os", "jp.ne.hatena" ]
android.os; jp.ne.hatena;
2,400,773
public GridIntList copyWithout(GridIntList l) { assert l != null; if (idx == 0) return new GridIntList(); if (l.idx == 0) return new GridIntList(Arrays.copyOf(arr, idx)); int[] newArr = Arrays.copyOf(arr, idx); int newIdx = idx; for (int i ...
GridIntList function(GridIntList l) { assert l != null; if (idx == 0) return new GridIntList(); if (l.idx == 0) return new GridIntList(Arrays.copyOf(arr, idx)); int[] newArr = Arrays.copyOf(arr, idx); int newIdx = idx; for (int i = 0; i < l.size(); i++) { int rmVal = l.get(i); for (int j = 0; j < newIdx; j++) { if (new...
/** * Returns (possibly reordered) copy of this list, excluding all elements of given list. * * @param l List of elements to remove. * @return New list without all elements from {@code l}. */
Returns (possibly reordered) copy of this list, excluding all elements of given list
copyWithout
{ "repo_name": "alexzaitzev/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/util/GridIntList.java", "license": "apache-2.0", "size": 13980 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
2,411,081
protected Configuration getServiceConfig() { return serviceConfig; }
Configuration function() { return serviceConfig; }
/** * Returns the service configuration properties. Property * names are trimmed off from its prefix. * <p> * The sevice configuration properties are all properties * with names starting with <code>#SERVER#.#SERVICE#.</code> * in the server configuration. * * @return the service configuration pr...
Returns the service configuration properties. Property names are trimmed off from its prefix. The sevice configuration properties are all properties with names starting with <code>#SERVER#.#SERVICE#.</code> in the server configuration
getServiceConfig
{ "repo_name": "intel-hadoop/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs-httpfs/src/main/java/org/apache/hadoop/lib/server/BaseService.java", "license": "apache-2.0", "size": 5202 }
[ "org.apache.hadoop.conf.Configuration" ]
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
1,826,794
public MetaProperty<MarketDataFeed> marketDataFeed() { return marketDataFeed; }
MetaProperty<MarketDataFeed> function() { return marketDataFeed; }
/** * The meta-property for the {@code marketDataFeed} property. * @return the meta-property, not null */
The meta-property for the marketDataFeed property
marketDataFeed
{ "repo_name": "nssales/Strata", "path": "modules/function/src/main/java/com/opengamma/strata/function/marketdata/mapping/RateIndexCurveMapping.java", "license": "apache-2.0", "size": 11654 }
[ "com.opengamma.strata.basics.market.MarketDataFeed", "org.joda.beans.MetaProperty" ]
import com.opengamma.strata.basics.market.MarketDataFeed; import org.joda.beans.MetaProperty;
import com.opengamma.strata.basics.market.*; import org.joda.beans.*;
[ "com.opengamma.strata", "org.joda.beans" ]
com.opengamma.strata; org.joda.beans;
1,135,110
private static Map<Integer, String> loadMap(String fileName) { Map<Integer, String> map = new HashMap<>(); String[] values; final InputStream is = Resources.class.getResourceAsStream(fileName); final InputStreamReader isReader = new InputStreamReader(is, StandardCharsets.ISO_8859_1)...
static Map<Integer, String> function(String fileName) { Map<Integer, String> map = new HashMap<>(); String[] values; final InputStream is = Resources.class.getResourceAsStream(fileName); final InputStreamReader isReader = new InputStreamReader(is, StandardCharsets.ISO_8859_1); try (CSVReader reader = new CSVReader(isRe...
/** * Reads the given file and returns a map populated the values. It's assumed * the file is a Comma Separated Values file with the first column being an * integer (key) and the second column being the String (value) * * @param fileName * the name of the file to read * @re...
Reads the given file and returns a map populated the values. It's assumed the file is a Comma Separated Values file with the first column being an integer (key) and the second column being the String (value)
loadMap
{ "repo_name": "battjt/iumpr", "path": "src/net/soliddesign/iumpr/bus/j1939/Lookup.java", "license": "mit", "size": 4403 }
[ "com.opencsv.CSVReader", "java.io.InputStream", "java.io.InputStreamReader", "java.nio.charset.StandardCharsets", "java.util.HashMap", "java.util.Map", "java.util.logging.Level", "net.soliddesign.iumpr.IUMPR", "net.soliddesign.iumpr.resources.Resources" ]
import com.opencsv.CSVReader; import java.io.InputStream; import java.io.InputStreamReader; import java.nio.charset.StandardCharsets; import java.util.HashMap; import java.util.Map; import java.util.logging.Level; import net.soliddesign.iumpr.IUMPR; import net.soliddesign.iumpr.resources.Resources;
import com.opencsv.*; import java.io.*; import java.nio.charset.*; import java.util.*; import java.util.logging.*; import net.soliddesign.iumpr.*; import net.soliddesign.iumpr.resources.*;
[ "com.opencsv", "java.io", "java.nio", "java.util", "net.soliddesign.iumpr" ]
com.opencsv; java.io; java.nio; java.util; net.soliddesign.iumpr;
1,585,041
public static void postData(Reader data, URL endpoint, Writer output) throws Exception { HttpURLConnection urlc = null; try { urlc = (HttpURLConnection) endpoint.openConnection(); try { urlc.setRequestMethod("POST"); } catch (ProtocolException e) { throw new Exception("Shouldn't happen: HttpU...
static void function(Reader data, URL endpoint, Writer output) throws Exception { HttpURLConnection urlc = null; try { urlc = (HttpURLConnection) endpoint.openConnection(); try { urlc.setRequestMethod("POST"); } catch (ProtocolException e) { throw new Exception(STR, e); } urlc.setDoOutput(true); urlc.setDoInput(true); ...
/** * Reads data from the data reader and posts it to a server via POST request. * data - The data you want to send * endpoint - The server's address * output - writes the server's response to output * @throws Exception */
Reads data from the data reader and posts it to a server via POST request. data - The data you want to send endpoint - The server's address output - writes the server's response to output
postData
{ "repo_name": "usc-isi-i2/Web-Karma", "path": "karma-web/src/main/java/edu/isi/karma/linkedapi/server/HTTPClientTest.java", "license": "apache-2.0", "size": 7457 }
[ "edu.isi.karma.model.serialization.MimeType", "java.io.IOException", "java.io.InputStream", "java.io.InputStreamReader", "java.io.OutputStream", "java.io.OutputStreamWriter", "java.io.Reader", "java.io.Writer", "java.net.HttpURLConnection", "java.net.ProtocolException" ]
import edu.isi.karma.model.serialization.MimeType; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.Reader; import java.io.Writer; import java.net.HttpURLConnection; import java.net.ProtocolException;
import edu.isi.karma.model.serialization.*; import java.io.*; import java.net.*;
[ "edu.isi.karma", "java.io", "java.net" ]
edu.isi.karma; java.io; java.net;
141,386
private JobService removeBadJob(long id, String jobType, Handler<AsyncResult<Void>> handler) { String zid = RedisHelper.createFIFO(id); client.transaction().multi(null) .del(RedisHelper.getKey("job:" + id + ":log"), null) .del(RedisHelper.getKey("job:" + id), null) .zrem(RedisHelper.getKey("...
JobService function(long id, String jobType, Handler<AsyncResult<Void>> handler) { String zid = RedisHelper.createFIFO(id); client.transaction().multi(null) .del(RedisHelper.getKey("job:" + id + ":log"), null) .del(RedisHelper.getKey("job:" + id), null) .zrem(RedisHelper.getKey(STR), zid, null) .zrem(RedisHelper.getKey...
/** * Remove bad job by id (absolutely) * * @param id job id * @param handler result handler */
Remove bad job by id (absolutely)
removeBadJob
{ "repo_name": "Kayuii/examples-kue", "path": "kue-core/src/main/java/io/vertx/blueprint/kue/service/impl/JobServiceImpl.java", "license": "apache-2.0", "size": 9758 }
[ "io.vertx.blueprint.kue.service.JobService", "io.vertx.blueprint.kue.util.RedisHelper", "io.vertx.core.AsyncResult", "io.vertx.core.Future", "io.vertx.core.Handler" ]
import io.vertx.blueprint.kue.service.JobService; import io.vertx.blueprint.kue.util.RedisHelper; import io.vertx.core.AsyncResult; import io.vertx.core.Future; import io.vertx.core.Handler;
import io.vertx.blueprint.kue.service.*; import io.vertx.blueprint.kue.util.*; import io.vertx.core.*;
[ "io.vertx.blueprint", "io.vertx.core" ]
io.vertx.blueprint; io.vertx.core;
2,750,997
public void setHeight(int height) { mDropDownHeight = height; } /** * The ListView in {@link CCPListPopupWindow}
void function(int height) { mDropDownHeight = height; } /** * The ListView in {@link CCPListPopupWindow}
/** * Sets the height of the popup window in pixels. Can also be . * * @param height Height of the popup window. */
Sets the height of the popup window in pixels. Can also be
setHeight
{ "repo_name": "LSPOoO/com.lspooo.example", "path": "plugin_common/src/main/java/com/lspooo/plugin/common/view/CCPListPopupWindow.java", "license": "mit", "size": 44273 }
[ "android.widget.ListView" ]
import android.widget.ListView;
import android.widget.*;
[ "android.widget" ]
android.widget;
1,201,819
public Ability getAbilityById(final Integer id);
Ability function(final Integer id);
/** * Acquires an {@code Ability} based on its id. * * @param id * the {@code Ability} id * @return the {@code Ability} with that id */
Acquires an Ability based on its id
getAbilityById
{ "repo_name": "Bernardo-MG/dreadball-toolkit-ws", "path": "src/main/java/com/wandrell/tabletop/dreadball/ws/toolkit/business/service/unit/AbilityDataService.java", "license": "apache-2.0", "size": 1356 }
[ "com.wandrell.tabletop.dreadball.model.unit.stats.Ability" ]
import com.wandrell.tabletop.dreadball.model.unit.stats.Ability;
import com.wandrell.tabletop.dreadball.model.unit.stats.*;
[ "com.wandrell.tabletop" ]
com.wandrell.tabletop;
2,634,341
public IntentBuilder sizeLimit(int limit) { result.putExtra(MediaStore.EXTRA_SIZE_LIMIT, limit); return(this); }
IntentBuilder function(int limit) { result.putExtra(MediaStore.EXTRA_SIZE_LIMIT, limit); return(this); }
/** * Sets the maximum size of the video file in bytes. Maps * to EXTRA_SIZE_LIMIT. * * @param limit maximum video size in bytes * @return */
Sets the maximum size of the video file in bytes. Maps to EXTRA_SIZE_LIMIT
sizeLimit
{ "repo_name": "code-mc/FacerecognitionFlowpilots", "path": "cam2/src/main/java/com/commonsware/cwac/cam2/VideoRecorderActivity.java", "license": "gpl-3.0", "size": 4409 }
[ "android.provider.MediaStore" ]
import android.provider.MediaStore;
import android.provider.*;
[ "android.provider" ]
android.provider;
436,148
DataHandler getMediumImage(@WebParam(name = "mediumId") long mediumId) throws CillaServiceException;
DataHandler getMediumImage(@WebParam(name = STR) long mediumId) throws CillaServiceException;
/** * Returns the medium image. * * @param mediumId * ID of the Medium * @return {@link DataHandler} returning the medium */
Returns the medium image
getMediumImage
{ "repo_name": "shred/cilla", "path": "cilla-ws/src/main/java/org/shredzone/cilla/ws/page/PageWs.java", "license": "agpl-3.0", "size": 4820 }
[ "javax.activation.DataHandler", "javax.jws.WebParam", "org.shredzone.cilla.ws.exception.CillaServiceException" ]
import javax.activation.DataHandler; import javax.jws.WebParam; import org.shredzone.cilla.ws.exception.CillaServiceException;
import javax.activation.*; import javax.jws.*; import org.shredzone.cilla.ws.exception.*;
[ "javax.activation", "javax.jws", "org.shredzone.cilla" ]
javax.activation; javax.jws; org.shredzone.cilla;
60,006
public static Application fromFileStatus(FileStatus fileStatus) { if (!fileStatus.isFile()) { throw new IllegalArgumentException("Cannot create application from non-file: " + fileStatus); } // app id follows pattern: // app-YYYYMMDDHHmmss-SSSS[.inprogress] or local-1497733035840[.inprogress] ...
static Application function(FileStatus fileStatus) { if (!fileStatus.isFile()) { throw new IllegalArgumentException(STR + fileStatus); } String name = fileStatus.getPath().getName(); boolean inProgress = name.endsWith(STR); String appId = inProgress ? name.substring(0, name.lastIndexOf(STR)) : name; Application app = n...
/** * Create application instance from org.apache.hadoop.fs.FileStatus. * Only some properties that relate to event log are set. * If hadoop FileStatus is not a file, exception is thrown. * * @param fileStatus FileStatus instance * @return Application instance */
Create application instance from org.apache.hadoop.fs.FileStatus. Only some properties that relate to event log are set. If hadoop FileStatus is not a file, exception is thrown
fromFileStatus
{ "repo_name": "lightcopy/history-server", "path": "src/main/java/com/github/lightcopy/history/model/Application.java", "license": "apache-2.0", "size": 10633 }
[ "org.apache.hadoop.fs.FileStatus" ]
import org.apache.hadoop.fs.FileStatus;
import org.apache.hadoop.fs.*;
[ "org.apache.hadoop" ]
org.apache.hadoop;
2,734,384