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
@Message(id = 29, value = "Invalid rollout plan. Server group %s has a %s value of %s; cannot be less than 0.") String invalidRolloutPlanLess(String name, String propertyName, int value);
@Message(id = 29, value = STR) String invalidRolloutPlanLess(String name, String propertyName, int value);
/** * A message indicating an invalid rollout plan. The server group, represented by the {@code name} parameter, has an * invalid value and cannot be less than 0. * * @param name the name of the group. * @param propertyName the name of the property. * @param value the invali...
A message indicating an invalid rollout plan. The server group, represented by the name parameter, has an invalid value and cannot be less than 0
invalidRolloutPlanLess
{ "repo_name": "jamezp/wildfly-core", "path": "host-controller/src/main/java/org/jboss/as/domain/controller/logging/DomainControllerLogger.java", "license": "lgpl-2.1", "size": 34982 }
[ "org.jboss.logging.annotations.Message" ]
import org.jboss.logging.annotations.Message;
import org.jboss.logging.annotations.*;
[ "org.jboss.logging" ]
org.jboss.logging;
468,273
Flux<ResourceT> createAsync(List<Creatable<ResourceT>> creatables);
Flux<ResourceT> createAsync(List<Creatable<ResourceT>> creatables);
/** * Puts the requests to create a batch of resources into the queue and allow the HTTP client to execute it when * system resources are available. * * @param creatables the list of creatables in the batch * @return a {@link Mono} that emits the found resource asynchronously. */
Puts the requests to create a batch of resources into the queue and allow the HTTP client to execute it when system resources are available
createAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-resources/src/main/java/com/azure/resourcemanager/resources/fluentcore/collection/SupportsBatchCreation.java", "license": "mit", "size": 2287 }
[ "com.azure.resourcemanager.resources.fluentcore.model.Creatable", "java.util.List" ]
import com.azure.resourcemanager.resources.fluentcore.model.Creatable; import java.util.List;
import com.azure.resourcemanager.resources.fluentcore.model.*; import java.util.*;
[ "com.azure.resourcemanager", "java.util" ]
com.azure.resourcemanager; java.util;
2,622,230
public SemiSpaceAdminInterface getAdmin() { return this.admin; } protected class WrappedInternalWriter implements Runnable { private Object entry; private long leaseTimeMs; private Exception exception; private SemiLease lease;
SemiSpaceAdminInterface function() { return this.admin; } protected class WrappedInternalWriter implements Runnable { private Object entry; private long leaseTimeMs; private Exception exception; private SemiLease lease;
/** * Return admin element */
Return admin element
getAdmin
{ "repo_name": "nostra/semispace", "path": "semispace-main/src/main/java/org/semispace/SemiSpace.java", "license": "apache-2.0", "size": 31885 }
[ "org.semispace.admin.SemiSpaceAdminInterface" ]
import org.semispace.admin.SemiSpaceAdminInterface;
import org.semispace.admin.*;
[ "org.semispace.admin" ]
org.semispace.admin;
818,227
interface WithCookieName<ReturnT> { @Beta(SinceVersion.V1_4_0) WithAttach<ReturnT> withAffinityCookieName(String name); }
interface WithCookieName<ReturnT> { @Beta(SinceVersion.V1_4_0) WithAttach<ReturnT> withAffinityCookieName(String name); }
/** * Specifies the name for the affinity cookie. * @param name a name * @return the next stage of the definition */
Specifies the name for the affinity cookie
withAffinityCookieName
{ "repo_name": "martinsawicki/azure-sdk-for-java", "path": "azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayBackendHttpConfiguration.java", "license": "mit", "size": 35048 }
[ "com.microsoft.azure.management.apigeneration.Beta" ]
import com.microsoft.azure.management.apigeneration.Beta;
import com.microsoft.azure.management.apigeneration.*;
[ "com.microsoft.azure" ]
com.microsoft.azure;
924,474
public static TemplateModel wrapObjectStd(Object value, String wrapper, Environment env) throws TemplateModelException { return ObjectWrapperUtil.getObjectWrapperByName(wrapper, env).wrap(unwrap(value)); }
static TemplateModel function(Object value, String wrapper, Environment env) throws TemplateModelException { return ObjectWrapperUtil.getObjectWrapperByName(wrapper, env).wrap(unwrap(value)); }
/** * Standard/"dumb" (re-)wrapping method. will deep-unwrap the value if necessary (if TemplateModel). * <p> * Failure to unwrap TemplateModel first will throw exception. */
Standard/"dumb" (re-)wrapping method. will deep-unwrap the value if necessary (if TemplateModel). Failure to unwrap TemplateModel first will throw exception
wrapObjectStd
{ "repo_name": "ilscipio/scipio-erp", "path": "framework/webapp/src/com/ilscipio/scipio/ce/webapp/ftl/lang/LangFtlUtil.java", "license": "apache-2.0", "size": 88244 }
[ "freemarker.core.Environment", "freemarker.template.TemplateModel", "freemarker.template.TemplateModelException" ]
import freemarker.core.Environment; import freemarker.template.TemplateModel; import freemarker.template.TemplateModelException;
import freemarker.core.*; import freemarker.template.*;
[ "freemarker.core", "freemarker.template" ]
freemarker.core; freemarker.template;
1,629,932
@Override public Adapter createSystemOutputAdapter() { if (systemOutputItemProvider == null) { systemOutputItemProvider = new SystemOutputItemProvider(this); } return systemOutputItemProvider; } protected SystemFaultItemProvider systemFaultItemProvider;
Adapter function() { if (systemOutputItemProvider == null) { systemOutputItemProvider = new SystemOutputItemProvider(this); } return systemOutputItemProvider; } protected SystemFaultItemProvider systemFaultItemProvider;
/** * This creates an adapter for a {@link WTSpec4M.SystemOutput}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This creates an adapter for a <code>WTSpec4M.SystemOutput</code>.
createSystemOutputAdapter
{ "repo_name": "mondo-project/mondo-demo-wt", "path": "DSL-tao/org.mondo.wt.cstudy.edit/src/WTSpec4M/provider/WTSpec4MItemProviderAdapterFactory.java", "license": "epl-1.0", "size": 33599 }
[ "org.eclipse.emf.common.notify.Adapter" ]
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
1,868,291
@Test public void testDateSelectionSetSelectionNotFireIfSelected() { Date date = new Date(); model.setSelectionInterval(date, date); // sanity assertTrue(model.isSelected(date)); DateSelectionReport report = new DateSelectionReport(model); model.setSelectionInterv...
void function() { Date date = new Date(); model.setSelectionInterval(date, date); assertTrue(model.isSelected(date)); DateSelectionReport report = new DateSelectionReport(model); model.setSelectionInterval(date, date); assertEquals(STR, 0, report.getEventCount()); }
/** * related to #625-swingx: DateSelectionModel must not fire on clearing empty selection. */
related to #625-swingx: DateSelectionModel must not fire on clearing empty selection
testDateSelectionSetSelectionNotFireIfSelected
{ "repo_name": "syncer/swingx", "path": "swingx-core/src/test/java/org/jdesktop/swingx/calendar/SingleDaySelectionModelTest.java", "license": "lgpl-2.1", "size": 16027 }
[ "java.util.Date", "org.jdesktop.swingx.test.DateSelectionReport" ]
import java.util.Date; import org.jdesktop.swingx.test.DateSelectionReport;
import java.util.*; import org.jdesktop.swingx.test.*;
[ "java.util", "org.jdesktop.swingx" ]
java.util; org.jdesktop.swingx;
554,094
public synchronized boolean setTarget (EntityTarget target) { entity.interuptAction(); if (!entity.canMove()) { return false;//Unable to move } entity.stopAll(); if (!calculateTargetPath(target.getEntity())) { return false; } entity.queueUpdateBlock(new FaceEntityBlock(target.getEntity())); thi...
synchronized boolean function (EntityTarget target) { entity.interuptAction(); if (!entity.canMove()) { return false; } entity.stopAll(); if (!calculateTargetPath(target.getEntity())) { return false; } entity.queueUpdateBlock(new FaceEntityBlock(target.getEntity())); this.targetEntity = target; return true; }
/** * Sets the specified entity as the target for this entity * @param target The entity to set as a target * @return True if the target setting was successful, false otherwise */
Sets the specified entity as the target for this entity
setTarget
{ "repo_name": "Sundays211/VirtueRS3", "path": "src/main/java/org/virtue/game/map/movement/Movement.java", "license": "mit", "size": 19907 }
[ "org.virtue.network.protocol.update.block.FaceEntityBlock" ]
import org.virtue.network.protocol.update.block.FaceEntityBlock;
import org.virtue.network.protocol.update.block.*;
[ "org.virtue.network" ]
org.virtue.network;
1,524,449
Connection nextUnconnected() throws IOException { // Always prefer pooled connections over new connections. for (Connection pooled; (pooled = pool.get(address)) != null; ) { if (request.method().equals("GET") || Internal.instance.isReadable(pooled)) return pooled; pooled.getSocket().close(); }...
Connection nextUnconnected() throws IOException { for (Connection pooled; (pooled = pool.get(address)) != null; ) { if (request.method().equals("GET") Internal.instance.isReadable(pooled)) return pooled; pooled.getSocket().close(); } if (!hasNextTlsVersion()) { if (!hasNextInetSocketAddress()) { if (!hasNextProxy()) { ...
/** * Returns the next connection to attempt. * * @throws NoSuchElementException if there are no more routes to attempt. */
Returns the next connection to attempt
nextUnconnected
{ "repo_name": "10045125/okhttp", "path": "okhttp/src/main/java/com/squareup/okhttp/internal/http/RouteSelector.java", "license": "apache-2.0", "size": 11541 }
[ "com.squareup.okhttp.Connection", "com.squareup.okhttp.Route", "com.squareup.okhttp.internal.Internal", "java.io.IOException", "java.util.NoSuchElementException" ]
import com.squareup.okhttp.Connection; import com.squareup.okhttp.Route; import com.squareup.okhttp.internal.Internal; import java.io.IOException; import java.util.NoSuchElementException;
import com.squareup.okhttp.*; import com.squareup.okhttp.internal.*; import java.io.*; import java.util.*;
[ "com.squareup.okhttp", "java.io", "java.util" ]
com.squareup.okhttp; java.io; java.util;
476,518
public static TopologyDef parseFile(String inputFile, boolean dumpYaml, boolean processIncludes, Properties properties, boolean envSub) throws IOException { FileInputStream in = new FileInputStream(inputFile); TopologyDef topology = parseInputStream(in, dumpYa...
static TopologyDef function(String inputFile, boolean dumpYaml, boolean processIncludes, Properties properties, boolean envSub) throws IOException { FileInputStream in = new FileInputStream(inputFile); TopologyDef topology = parseInputStream(in, dumpYaml, processIncludes, properties, envSub); in.close(); return topolog...
/** * Parse a flux topology definition. * * @param inputFile source YAML file * @param dumpYaml if true, dump the parsed YAML to stdout * @param processIncludes whether or not to process includes * @param properties properties file for variable substitution * @param ...
Parse a flux topology definition
parseFile
{ "repo_name": "kishorvpatil/incubator-storm", "path": "flux/flux-core/src/main/java/org/apache/storm/flux/parser/FluxParser.java", "license": "apache-2.0", "size": 12190 }
[ "java.io.FileInputStream", "java.io.IOException", "java.util.Properties", "org.apache.storm.flux.model.TopologyDef" ]
import java.io.FileInputStream; import java.io.IOException; import java.util.Properties; import org.apache.storm.flux.model.TopologyDef;
import java.io.*; import java.util.*; import org.apache.storm.flux.model.*;
[ "java.io", "java.util", "org.apache.storm" ]
java.io; java.util; org.apache.storm;
2,549,435
public void pushStaticVipRoute(boolean inBound, Route route, IPClient client, LBMember member, IOFSwitch pinSwitch) { List<NodePortTuple> path = route.getPath(); if (path.size() > 0) { for (int i = 0; i < path.size(); i+=2) { DatapathId sw = path.get(i).getNodeId(); ...
void function(boolean inBound, Route route, IPClient client, LBMember member, IOFSwitch pinSwitch) { List<NodePortTuple> path = route.getPath(); if (path.size() > 0) { for (int i = 0; i < path.size(); i+=2) { DatapathId sw = path.get(i).getNodeId(); String entryName; Match.Builder mb = pinSwitch.getOFFactory().buildMat...
/** * used to push given route using static flow entry pusher * @param boolean inBound * @param Route route * @param IPClient client * @param LBMember member * @param long pinSwitch */
used to push given route using static flow entry pusher
pushStaticVipRoute
{ "repo_name": "alberthitanaya/floodlight-dnscollector", "path": "src/main/java/net/floodlightcontroller/loadbalancer/LoadBalancer.java", "license": "apache-2.0", "size": 35483 }
[ "java.util.ArrayList", "java.util.List", "net.floodlightcontroller.core.IOFSwitch", "net.floodlightcontroller.packet.IPv4", "net.floodlightcontroller.routing.Route", "net.floodlightcontroller.topology.NodePortTuple", "net.floodlightcontroller.util.FlowModUtils", "org.projectfloodlight.openflow.protoco...
import java.util.ArrayList; import java.util.List; import net.floodlightcontroller.core.IOFSwitch; import net.floodlightcontroller.packet.IPv4; import net.floodlightcontroller.routing.Route; import net.floodlightcontroller.topology.NodePortTuple; import net.floodlightcontroller.util.FlowModUtils; import org.projectfloo...
import java.util.*; import net.floodlightcontroller.core.*; import net.floodlightcontroller.packet.*; import net.floodlightcontroller.routing.*; import net.floodlightcontroller.topology.*; import net.floodlightcontroller.util.*; import org.projectfloodlight.openflow.protocol.*; import org.projectfloodlight.openflow.pro...
[ "java.util", "net.floodlightcontroller.core", "net.floodlightcontroller.packet", "net.floodlightcontroller.routing", "net.floodlightcontroller.topology", "net.floodlightcontroller.util", "org.projectfloodlight.openflow" ]
java.util; net.floodlightcontroller.core; net.floodlightcontroller.packet; net.floodlightcontroller.routing; net.floodlightcontroller.topology; net.floodlightcontroller.util; org.projectfloodlight.openflow;
2,699,976
public boolean zkMkPath(String path, CreateMode mode, boolean createParents, List<ACL> acls) throws IOException { checkServiceLive(); path = createFullPath(path); if (acls == null || acls.isEmpty()) { throw new NoPathPermissionsException(path, "Empty ACL list"); } tr...
boolean function(String path, CreateMode mode, boolean createParents, List<ACL> acls) throws IOException { checkServiceLive(); path = createFullPath(path); if (acls == null acls.isEmpty()) { throw new NoPathPermissionsException(path, STR); } try { RegistrySecurity.AclListInfo aclInfo = new RegistrySecurity.AclListInfo(...
/** * Create a directory. It is not an error if it already exists. * * @param path path to create * @param mode mode for path * @param createParents flag to trigger parent creation * @param acls ACL for path * @throws IOException any problem */
Create a directory. It is not an error if it already exists
zkMkPath
{ "repo_name": "JingchengDu/hadoop", "path": "hadoop-common-project/hadoop-registry/src/main/java/org/apache/hadoop/registry/client/impl/zk/CuratorService.java", "license": "apache-2.0", "size": 26909 }
[ "java.io.IOException", "java.util.List", "org.apache.curator.framework.api.CreateBuilder", "org.apache.hadoop.registry.client.exceptions.NoPathPermissionsException", "org.apache.zookeeper.CreateMode", "org.apache.zookeeper.KeeperException" ]
import java.io.IOException; import java.util.List; import org.apache.curator.framework.api.CreateBuilder; import org.apache.hadoop.registry.client.exceptions.NoPathPermissionsException; import org.apache.zookeeper.CreateMode; import org.apache.zookeeper.KeeperException;
import java.io.*; import java.util.*; import org.apache.curator.framework.api.*; import org.apache.hadoop.registry.client.exceptions.*; import org.apache.zookeeper.*;
[ "java.io", "java.util", "org.apache.curator", "org.apache.hadoop", "org.apache.zookeeper" ]
java.io; java.util; org.apache.curator; org.apache.hadoop; org.apache.zookeeper;
1,865,787
int updateByExampleSelective(@Param("record") Post record, @Param("example") PostExample example);
int updateByExampleSelective(@Param(STR) Post record, @Param(STR) PostExample example);
/** * This method was generated by MyBatis Generator. * This method corresponds to the database table POST * * @mbggenerated */
This method was generated by MyBatis Generator. This method corresponds to the database table POST
updateByExampleSelective
{ "repo_name": "konum/mybatis-dynamicJoin", "path": "src/main/java/model/PostMapper.java", "license": "gpl-2.0", "size": 2468 }
[ "org.apache.ibatis.annotations.Param" ]
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.*;
[ "org.apache.ibatis" ]
org.apache.ibatis;
2,294,162
public void preProcess() { if (!(from() == -1 && size() == -1)) { // from and size have been set. int numHits = from() + size(); if (numHits < 0) { String msg = "Result window is too large, from + size must be less than or equal to: [" + Integer.MAX_VALUE ...
void function() { if (!(from() == -1 && size() == -1)) { int numHits = from() + size(); if (numHits < 0) { String msg = STR + Integer.MAX_VALUE + STR + (((long) from()) + ((long) size())) + "]"; throw new QueryPhaseExecutionException(this, msg); } } if (query() == null) { parsedQuery(ParsedQuery.parsedMatchAllQuery());...
/** * Should be called before executing the main query and after all other parameters have been set. */
Should be called before executing the main query and after all other parameters have been set
preProcess
{ "repo_name": "combinatorist/elasticsearch", "path": "src/main/java/org/elasticsearch/search/internal/DefaultSearchContext.java", "license": "apache-2.0", "size": 19570 }
[ "org.apache.lucene.search.ConstantScoreQuery", "org.apache.lucene.search.Filter", "org.apache.lucene.search.FilteredQuery", "org.apache.lucene.search.Query", "org.elasticsearch.common.lucene.search.Queries", "org.elasticsearch.common.lucene.search.function.BoostScoreFunction", "org.elasticsearch.common....
import org.apache.lucene.search.ConstantScoreQuery; import org.apache.lucene.search.Filter; import org.apache.lucene.search.FilteredQuery; import org.apache.lucene.search.Query; import org.elasticsearch.common.lucene.search.Queries; import org.elasticsearch.common.lucene.search.function.BoostScoreFunction; import org.e...
import org.apache.lucene.search.*; import org.elasticsearch.common.lucene.search.*; import org.elasticsearch.common.lucene.search.function.*; import org.elasticsearch.index.query.*; import org.elasticsearch.search.query.*;
[ "org.apache.lucene", "org.elasticsearch.common", "org.elasticsearch.index", "org.elasticsearch.search" ]
org.apache.lucene; org.elasticsearch.common; org.elasticsearch.index; org.elasticsearch.search;
2,276,760
private void endRelatedTask(Event event, DocumentModel coreTypeDoc) { if (endTaskEvents.contains(event.getName()) && !event.getContext().getPrincipal() .isAdministrator() && DocumentUtils.isMutable(coreTypeDoc) && DialectUtils.isCoreType(coreTypeDoc.getType())) { Map<String, Serializable> p...
void function(Event event, DocumentModel coreTypeDoc) { if (endTaskEvents.contains(event.getName()) && !event.getContext().getPrincipal() .isAdministrator() && DocumentUtils.isMutable(coreTypeDoc) && DialectUtils.isCoreType(coreTypeDoc.getType())) { Map<String, Serializable> pageProviderProps = new HashMap<>(); pagePro...
/** * Will "cancel" tasks that are related to the current document Only applies to non system admin * operations, and mutable core documents * * @param event the current event handled in the bundle * @param coreTypeDoc the document to clear related tasks for */
Will "cancel" tasks that are related to the current document Only applies to non system admin operations, and mutable core documents
endRelatedTask
{ "repo_name": "First-Peoples-Cultural-Council/fv-web-ui", "path": "modules/common/firstvoices-maintenance/src/main/java/ca/firstvoices/maintenance/listeners/PostCommitCleanupListener.java", "license": "apache-2.0", "size": 11733 }
[ "ca.firstvoices.core.io.utils.DialectUtils", "ca.firstvoices.core.io.utils.DocumentUtils", "java.io.Serializable", "java.util.HashMap", "java.util.List", "java.util.Map", "org.nuxeo.ecm.core.api.DocumentModel", "org.nuxeo.ecm.core.event.Event", "org.nuxeo.ecm.platform.query.api.PageProvider", "org...
import ca.firstvoices.core.io.utils.DialectUtils; import ca.firstvoices.core.io.utils.DocumentUtils; import java.io.Serializable; import java.util.HashMap; import java.util.List; import java.util.Map; import org.nuxeo.ecm.core.api.DocumentModel; import org.nuxeo.ecm.core.event.Event; import org.nuxeo.ecm.platform.query...
import ca.firstvoices.core.io.utils.*; import java.io.*; import java.util.*; import org.nuxeo.ecm.core.api.*; import org.nuxeo.ecm.core.event.*; import org.nuxeo.ecm.platform.query.api.*; import org.nuxeo.ecm.platform.query.nxql.*; import org.nuxeo.runtime.api.*;
[ "ca.firstvoices.core", "java.io", "java.util", "org.nuxeo.ecm", "org.nuxeo.runtime" ]
ca.firstvoices.core; java.io; java.util; org.nuxeo.ecm; org.nuxeo.runtime;
1,447,541
public DBOSentMessage getSentMessage(String objectId, Long objectVersion, ObjectType objectType);
DBOSentMessage function(String objectId, Long objectVersion, ObjectType objectType);
/** * Fetch a sent message for a given object ID and type. * * @param objectId * @param objectType * @return */
Fetch a sent message for a given object ID and type
getSentMessage
{ "repo_name": "xschildw/Synapse-Repository-Services", "path": "lib/jdomodels/src/main/java/org/sagebionetworks/repo/model/dbo/dao/DBOChangeDAO.java", "license": "apache-2.0", "size": 5417 }
[ "org.sagebionetworks.repo.model.ObjectType", "org.sagebionetworks.repo.model.dbo.persistence.DBOSentMessage" ]
import org.sagebionetworks.repo.model.ObjectType; import org.sagebionetworks.repo.model.dbo.persistence.DBOSentMessage;
import org.sagebionetworks.repo.model.*; import org.sagebionetworks.repo.model.dbo.persistence.*;
[ "org.sagebionetworks.repo" ]
org.sagebionetworks.repo;
517,569
final byte[] created = new byte[current().nextInt(128)]; current().nextBytes(created); final byte[] encoded = new byte[created.length << 1]; final byte[] decoded = new byte[encoded.length >> 1]; new HexEncoderImpl().encode(wrap(created), wrap(encoded)); new HexDecoderImpl().decod...
final byte[] created = new byte[current().nextInt(128)]; current().nextBytes(created); final byte[] encoded = new byte[created.length << 1]; final byte[] decoded = new byte[encoded.length >> 1]; new HexEncoderImpl().encode(wrap(created), wrap(encoded)); new HexDecoderImpl().decode(wrap(encoded), wrap(decoded)); assertE...
/** * Encodes/decodes a random byte array. */
Encodes/decodes a random byte array
encodeDecodeBytes
{ "repo_name": "jinahya/verbose-java", "path": "hex-codec-lib/src/test/java/com/github/jinahya/verbose/hex/HexCodecImplTest.java", "license": "apache-2.0", "size": 1974 }
[ "java.nio.ByteBuffer", "java.util.concurrent.ThreadLocalRandom", "org.testng.Assert" ]
import java.nio.ByteBuffer; import java.util.concurrent.ThreadLocalRandom; import org.testng.Assert;
import java.nio.*; import java.util.concurrent.*; import org.testng.*;
[ "java.nio", "java.util", "org.testng" ]
java.nio; java.util; org.testng;
358,041
@Override public void sendDtmf(char c, Message result) { resultSuccess(result, null); }
void function(char c, Message result) { resultSuccess(result, null); }
/** * ar.exception carries exception on failure * ar.userObject contains the original value of result.obj * ar.result is null on success and failure */
ar.exception carries exception on failure ar.userObject contains the original value of result.obj ar.result is null on success and failure
sendDtmf
{ "repo_name": "syslover33/ctank", "path": "java/android-sdk-linux_r24.4.1_src/sources/android-23/com/android/internal/telephony/test/SimulatedCommands.java", "license": "gpl-3.0", "size": 53539 }
[ "android.os.Message" ]
import android.os.Message;
import android.os.*;
[ "android.os" ]
android.os;
852,095
protected boolean isReservedName(String name) { // check for parser terms String[] s = FunctionTool.parserNames; for(int i = 0; i<s.length; i++) { if(s[i].equals(name)) { return true; } } // check for localized "row" name if(DataTable.rowName.equals(name)) { return tr...
boolean function(String name) { String[] s = FunctionTool.parserNames; for(int i = 0; i<s.length; i++) { if(s[i].equals(name)) { return true; } } if(DataTable.rowName.equals(name)) { return true; } s = UserFunction.dummyVars; for(int i = 0; i<s.length; i++) { if(s[i].equals(name)) { return true; } } try { Double.parseD...
/** * Returns true if name is reserved by the OSP parser. * * @param name the proposed name * @return true if reserved */
Returns true if name is reserved by the OSP parser
isReservedName
{ "repo_name": "fschuett/osp", "path": "src/org/opensourcephysics/tools/DataToolTab.java", "license": "gpl-3.0", "size": 163748 }
[ "org.opensourcephysics.display.DataTable" ]
import org.opensourcephysics.display.DataTable;
import org.opensourcephysics.display.*;
[ "org.opensourcephysics.display" ]
org.opensourcephysics.display;
1,138,947
public static Date formattedDateToJavaDate(String dateInString) throws ParseException { Date date; SimpleDateFormat formatter; boolean fourDigitYear = false; if (dateInString == null) return null; // check if 2 year or 4 year int pos = dateInString.lastIndexOf("/"); if (pos+4 == dateInString.l...
static Date function(String dateInString) throws ParseException { Date date; SimpleDateFormat formatter; boolean fourDigitYear = false; if (dateInString == null) return null; int pos = dateInString.lastIndexOf("/"); if (pos+4 == dateInString.length()) { fourDigitYear = true; } formatter = (fourDigitYear)? new SimpleDat...
/** * Turns a string representation of a Date into a Java Date object. * @param dob can be like MM/DD/YYYY, MM/DD/YY * @return Date * @throws java.text.ParseException */
Turns a string representation of a Date into a Java Date object
formattedDateToJavaDate
{ "repo_name": "reimey/montessori-record-keeping", "path": "src/main/java/edu/montessori/Util.java", "license": "apache-2.0", "size": 1447 }
[ "java.text.ParseException", "java.text.SimpleDateFormat", "java.util.Date" ]
import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date;
import java.text.*; import java.util.*;
[ "java.text", "java.util" ]
java.text; java.util;
1,871,890
@Override public void close(String nodeId) { selector.close(nodeId); for (InFlightRequest request : inFlightRequests.clearAll(nodeId)) if (request.isInternalRequest && request.header.apiKey() == ApiKeys.METADATA.id) metadataUpdater.handleDisconnection(request.destinat...
void function(String nodeId) { selector.close(nodeId); for (InFlightRequest request : inFlightRequests.clearAll(nodeId)) if (request.isInternalRequest && request.header.apiKey() == ApiKeys.METADATA.id) metadataUpdater.handleDisconnection(request.destination); connectionStates.remove(nodeId); }
/** * Closes the connection to a particular node (if there is one). * * @param nodeId The id of the node */
Closes the connection to a particular node (if there is one)
close
{ "repo_name": "ijuma/kafka", "path": "clients/src/main/java/org/apache/kafka/clients/NetworkClient.java", "license": "apache-2.0", "size": 36920 }
[ "org.apache.kafka.common.protocol.ApiKeys" ]
import org.apache.kafka.common.protocol.ApiKeys;
import org.apache.kafka.common.protocol.*;
[ "org.apache.kafka" ]
org.apache.kafka;
636,123
@Test public final void testXPathInOrder() { Node a = testDoc.createTextNode("1234"); NodeOps.setOutOfOrder(a); Node b = testDoc.createCDATASection("56"); NodeOps.setInOrder(b); Node c = testDoc.createTextNode("78"); NodeOps.setInOrder(c); Element...
final void function() { Node a = testDoc.createTextNode("1234"); NodeOps.setOutOfOrder(a); Node b = testDoc.createCDATASection("56"); NodeOps.setInOrder(b); Node c = testDoc.createTextNode("78"); NodeOps.setInOrder(c); Element d = testDoc.createElement("nine"); NodeOps.setInOrder(d); parent.appendChild(a); parent.appen...
/** * Test counting of in-order XPath nodes. */
Test counting of in-order XPath nodes
testXPathInOrder
{ "repo_name": "amouat/diffxml", "path": "src/test/org/diffxml/diffxml/fmes/ChildNumberTest.java", "license": "apache-2.0", "size": 13891 }
[ "org.junit.Assert", "org.w3c.dom.Element", "org.w3c.dom.Node" ]
import org.junit.Assert; import org.w3c.dom.Element; import org.w3c.dom.Node;
import org.junit.*; import org.w3c.dom.*;
[ "org.junit", "org.w3c.dom" ]
org.junit; org.w3c.dom;
1,801,689
boolean isFor(HttpMethod method, ImmutableList<String> parts) { if (!this.method.equals(method)) { return false; } if (parts.size() != this.pathSegments.size()) { return false; } for (int i = 0; i < parts.size(); ++i) { String reqPart = parts.get(i); S...
boolean isFor(HttpMethod method, ImmutableList<String> parts) { if (!this.method.equals(method)) { return false; } if (parts.size() != this.pathSegments.size()) { return false; } for (int i = 0; i < parts.size(); ++i) { String reqPart = parts.get(i); String specPart = pathSegments.get(i); if (!(specPart.startsWith(":")...
/** * Returns whether this instance matches the provided HTTP request. * * @param method The request method. * @param parts The parsed request path segments. * @return Whether this instance matches the request. */
Returns whether this instance matches the provided HTTP request
isFor
{ "repo_name": "kalyanjvn1/selenium", "path": "java/client/src/org/openqa/selenium/remote/http/AbstractHttpCommandCodec.java", "license": "apache-2.0", "size": 19311 }
[ "com.google.common.collect.ImmutableList" ]
import com.google.common.collect.ImmutableList;
import com.google.common.collect.*;
[ "com.google.common" ]
com.google.common;
2,814,447
private void writeItemsetsToFile(NodeListTreeNode curNode, int sameCount) throws IOException { // create a stringuffer StringBuilder buffer = new StringBuilder(); if(curNode.support >= minSupport) { outputCount++; // append items from the itemset to the StringBuilder for (int i = 0;...
void function(NodeListTreeNode curNode, int sameCount) throws IOException { StringBuilder buffer = new StringBuilder(); if(curNode.support >= minSupport) { outputCount++; for (int i = 0; i < resultLen; i++) { buffer.append(item[result[i]].index); buffer.append(' '); } buffer.append(STR); buffer.append(curNode.support);...
/** * This method write an itemset to file + all itemsets that can be made * using its node list. * * @param curNode * the current node * @param sameCount * the same count * @throws IOException * exception if error reading/writting to file */
This method write an itemset to file + all itemsets that can be made using its node list
writeItemsetsToFile
{ "repo_name": "saurabhdas1/fyp", "path": "Final Year/src/pkgfinal/year/algorithms/frequentpatterns/fin_prepost/PrePost.java", "license": "gpl-3.0", "size": 18854 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,990,006
private boolean createNestedClass() { if (hasMaxIndexValue()) { // all new fields will be declared in the class from innerClassGenerator if (innerClassGenerator == null) { try { JDefinedClass innerClazz = clazz._class(JMod.NONE, clazz.name() + "0"); innerClassGenerator = ne...
boolean function() { if (hasMaxIndexValue()) { if (innerClassGenerator == null) { try { JDefinedClass innerClazz = clazz._class(JMod.NONE, clazz.name() + "0"); innerClassGenerator = new ClassGenerator<>(codeGenerator, mappings, sig, evaluationVisitor, innerClazz, model, optionManager); } catch (JClassAlreadyExistsExcep...
/** * Creates {@link #innerClassGenerator} with inner class * if {@link #hasMaxIndexValue()} returns {@code true}. * * @return true if splitting happened. */
Creates <code>#innerClassGenerator</code> with inner class if <code>#hasMaxIndexValue()</code> returns true
createNestedClass
{ "repo_name": "kkhatua/drill", "path": "exec/java-exec/src/main/java/org/apache/drill/exec/expr/ClassGenerator.java", "license": "apache-2.0", "size": 32097 }
[ "com.sun.codemodel.JClassAlreadyExistsException", "com.sun.codemodel.JDefinedClass", "com.sun.codemodel.JMod", "org.apache.drill.common.exceptions.DrillRuntimeException" ]
import com.sun.codemodel.JClassAlreadyExistsException; import com.sun.codemodel.JDefinedClass; import com.sun.codemodel.JMod; import org.apache.drill.common.exceptions.DrillRuntimeException;
import com.sun.codemodel.*; import org.apache.drill.common.exceptions.*;
[ "com.sun.codemodel", "org.apache.drill" ]
com.sun.codemodel; org.apache.drill;
1,352,084
Role createRole(NodeRef filePlan, String role, String roleDisplayLabel, Set<Capability> capabilities);
Role createRole(NodeRef filePlan, String role, String roleDisplayLabel, Set<Capability> capabilities);
/** * Create a new role * * @param filePlan file plan * @param role * @param roleDisplayLabel * @param capabilities * @return */
Create a new role
createRole
{ "repo_name": "dnacreative/records-management", "path": "rm-server/source/java/org/alfresco/module/org_alfresco_module_rm/role/FilePlanRoleService.java", "license": "lgpl-3.0", "size": 6374 }
[ "java.util.Set", "org.alfresco.module.org_alfresco_module_rm.capability.Capability", "org.alfresco.service.cmr.repository.NodeRef" ]
import java.util.Set; import org.alfresco.module.org_alfresco_module_rm.capability.Capability; import org.alfresco.service.cmr.repository.NodeRef;
import java.util.*; import org.alfresco.module.org_alfresco_module_rm.capability.*; import org.alfresco.service.cmr.repository.*;
[ "java.util", "org.alfresco.module", "org.alfresco.service" ]
java.util; org.alfresco.module; org.alfresco.service;
2,207,891
@ApiModelProperty(example = "null", value = "Forbidden message") public String getError() { return error; }
@ApiModelProperty(example = "null", value = STR) String function() { return error; }
/** * Forbidden message * @return error **/
Forbidden message
getError
{ "repo_name": "Tmin10/EVE-Security-Service", "path": "server-api/src/main/java/ru/tmin10/EVESecurityService/serverApi/model/PostCharactersCharacterIdMailLabelsForbidden.java", "license": "gpl-3.0", "size": 2233 }
[ "io.swagger.annotations.ApiModelProperty" ]
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.*;
[ "io.swagger.annotations" ]
io.swagger.annotations;
816,224
public void setTaskOutputFiles(List<OutputSelector> taskOutputFiles) { this.taskOutputFiles = taskOutputFiles; }
void function(List<OutputSelector> taskOutputFiles) { this.taskOutputFiles = taskOutputFiles; }
/** * Set the taskOutputFiles value to the given taskOutputFiles value * * @param taskOutputFiles the taskOutputFiles to set */
Set the taskOutputFiles value to the given taskOutputFiles value
setTaskOutputFiles
{ "repo_name": "youribonnaffe/scheduling", "path": "scheduler/scheduler-node/src/main/java/org/ow2/proactive/scheduler/task/TaskLauncherInitializer.java", "license": "agpl-3.0", "size": 10866 }
[ "java.util.List", "org.ow2.proactive.scheduler.common.task.dataspaces.OutputSelector" ]
import java.util.List; import org.ow2.proactive.scheduler.common.task.dataspaces.OutputSelector;
import java.util.*; import org.ow2.proactive.scheduler.common.task.dataspaces.*;
[ "java.util", "org.ow2.proactive" ]
java.util; org.ow2.proactive;
2,097,093
public final List<ApiMethod> getCandidates() { return candidates; }
final List<ApiMethod> function() { return candidates; }
/** * Returns candidate methods for this endpoint. * @return list of candidate methods. */
Returns candidate methods for this endpoint
getCandidates
{ "repo_name": "davidkarlsen/camel", "path": "core/camel-support/src/main/java/org/apache/camel/support/component/AbstractApiEndpoint.java", "license": "apache-2.0", "size": 10585 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,804,351
protected ZipEntry createZipEntry(String name) { ZipEntry zipEntry = super.createZipEntry(name); JarEntry jarEntry = new JarEntry(zipEntry); if (manifest != null) { jarEntry.attr = manifest.getAttributes(name); } return jarEntry; }
ZipEntry function(String name) { ZipEntry zipEntry = super.createZipEntry(name); JarEntry jarEntry = new JarEntry(zipEntry); if (manifest != null) { jarEntry.attr = manifest.getAttributes(name); } return jarEntry; }
/** * Creates a JarEntry for a particular name and consults the manifest * for the Attributes of the entry. * Used by <code>ZipEntry.getNextEntry()</code> * * @param name the name of the new entry */
Creates a JarEntry for a particular name and consults the manifest for the Attributes of the entry. Used by <code>ZipEntry.getNextEntry()</code>
createZipEntry
{ "repo_name": "aosm/gcc_40", "path": "libjava/java/util/jar/JarInputStream.java", "license": "gpl-2.0", "size": 6119 }
[ "java.util.zip.ZipEntry" ]
import java.util.zip.ZipEntry;
import java.util.zip.*;
[ "java.util" ]
java.util;
1,208,294
@Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); }
void function(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); }
/** * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing * the children that can be created under this object. <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */
This adds <code>org.eclipse.emf.edit.command.CommandParameter</code>s describing the children that can be created under this object.
collectNewChildDescriptors
{ "repo_name": "sebastiangoetz/slr-toolkit", "path": "plugins/de.tudresden.slr.model.bibtex.edit/src/de/tudresden/slr/model/bibtex/provider/DocumentItemProvider.java", "license": "epl-1.0", "size": 13957 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
1,776,111
// FIXME: prefix can be removed?! private static Map<String, String> readIconThemeFile(URL url, String prefix) { Objects.requireNonNull(url, "url"); Objects.requireNonNull(prefix, "prefix"); Map<String, String> result = new HashMap<>(); try (BufferedReader in = new BufferedRead...
static Map<String, String> function(URL url, String prefix) { Objects.requireNonNull(url, "url"); Objects.requireNonNull(prefix, STR); Map<String, String> result = new HashMap<>(); try (BufferedReader in = new BufferedReader( new InputStreamReader(url.openStream(), StandardCharsets.ISO_8859_1))) { String line; while ((...
/** * Read a typical java property url into a Map. Currently doesn't support escaping * of the '=' character - it simply looks for the first '=' to determine where the key ends. * Both the key and the value is trimmed for whitespace at the ends. * * @param url The URL to read information fro...
Read a typical java property url into a Map. Currently doesn't support escaping of the '=' character - it simply looks for the first '=' to determine where the key ends. Both the key and the value is trimmed for whitespace at the ends
readIconThemeFile
{ "repo_name": "mairdl/jabref", "path": "src/main/java/net/sf/jabref/gui/IconTheme.java", "license": "mit", "size": 12143 }
[ "java.io.BufferedReader", "java.io.IOException", "java.io.InputStreamReader", "java.nio.charset.StandardCharsets", "java.util.HashMap", "java.util.Map", "java.util.Objects" ]
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; import java.nio.charset.StandardCharsets; import java.util.HashMap; import java.util.Map; import java.util.Objects;
import java.io.*; import java.nio.charset.*; import java.util.*;
[ "java.io", "java.nio", "java.util" ]
java.io; java.nio; java.util;
2,018,480
public void testImportSibling() throws Throwable { CmsObject cms = getCmsObject(); echo("Testing to import an existing resource as sibling"); CmsProperty prop1 = new CmsProperty(CmsPropertyDefinition.PROPERTY_TITLE, "The title", null); CmsProperty prop2 = new CmsProperty(CmsPropert...
void function() throws Throwable { CmsObject cms = getCmsObject(); echo(STR); CmsProperty prop1 = new CmsProperty(CmsPropertyDefinition.PROPERTY_TITLE, STR, null); CmsProperty prop2 = new CmsProperty(CmsPropertyDefinition.PROPERTY_DESCRIPTION, STR, null); CmsProperty prop3 = new CmsProperty(CmsPropertyDefinition.PROPER...
/** * Test the import of a sibling.<p> * * @throws Throwable if something goes wrong */
Test the import of a sibling
testImportSibling
{ "repo_name": "serrapos/opencms-core", "path": "test/org/opencms/file/TestCreateWriteResource.java", "license": "lgpl-2.1", "size": 37276 }
[ "java.util.ArrayList", "java.util.List", "org.opencms.file.types.CmsResourceTypePlain", "org.opencms.main.OpenCms", "org.opencms.test.OpenCmsTestResourceConfigurableFilter", "org.opencms.test.OpenCmsTestResourceFilter", "org.opencms.util.CmsUUID" ]
import java.util.ArrayList; import java.util.List; import org.opencms.file.types.CmsResourceTypePlain; import org.opencms.main.OpenCms; import org.opencms.test.OpenCmsTestResourceConfigurableFilter; import org.opencms.test.OpenCmsTestResourceFilter; import org.opencms.util.CmsUUID;
import java.util.*; import org.opencms.file.types.*; import org.opencms.main.*; import org.opencms.test.*; import org.opencms.util.*;
[ "java.util", "org.opencms.file", "org.opencms.main", "org.opencms.test", "org.opencms.util" ]
java.util; org.opencms.file; org.opencms.main; org.opencms.test; org.opencms.util;
2,736,063
protected Application getInsInfo(ApplicationRegistration appReg, String appSecId, ServiceClient resource) throws TException { Application application = new Application(); if (appReg == null) { application.setId(appSecId); } else { application.setId(appReg.getId()); ...
Application function(ApplicationRegistration appReg, String appSecId, ServiceClient resource) throws TException { Application application = new Application(); if (appReg == null) { application.setId(appSecId); } else { application.setId(appReg.getId()); application.setAppName(appReg.getAppName()); application.setAllowe...
/** * Get INS information. Must pass either appReg or appSecId * * @param appReg The application registration from the Registration service * @param appSecId The application security id * @param resource The ServiceClient to get the pool and security client * @return Application object * @throws TExc...
Get INS information. Must pass either appReg or appSecId
getInsInfo
{ "repo_name": "ezbake/ezbake-registration", "path": "admin/src/main/java/ezbake/admin/web/AdminResource.java", "license": "apache-2.0", "size": 43491 }
[ "com.google.common.collect.Sets", "org.apache.thrift.TException" ]
import com.google.common.collect.Sets; import org.apache.thrift.TException;
import com.google.common.collect.*; import org.apache.thrift.*;
[ "com.google.common", "org.apache.thrift" ]
com.google.common; org.apache.thrift;
230,490
public void setPostitionEnabled(final int position, final boolean enabled) { new SwingWorker<Void, Void>() {
void function(final int position, final boolean enabled) { new SwingWorker<Void, Void>() {
/** * DOCUMENT ME! * * @param position DOCUMENT ME! * @param enabled DOCUMENT ME! */
DOCUMENT ME
setPostitionEnabled
{ "repo_name": "cismet/cismap-commons", "path": "src/main/java/de/cismet/cismap/commons/rasterservice/georeferencing/RasterGeoReferencingPanel.java", "license": "lgpl-3.0", "size": 50569 }
[ "javax.swing.SwingWorker" ]
import javax.swing.SwingWorker;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
1,130,286
public static void main(String[] args) { Interval1D[] intervals = new Interval1D[4]; intervals[0] = new Interval1D(15.0, 33.0); intervals[1] = new Interval1D(45.0, 60.0); intervals[2] = new Interval1D(20.0, 70.0); intervals[3] = new Interval1D(46.0, 55.0); StdOut.pri...
static void function(String[] args) { Interval1D[] intervals = new Interval1D[4]; intervals[0] = new Interval1D(15.0, 33.0); intervals[1] = new Interval1D(45.0, 60.0); intervals[2] = new Interval1D(20.0, 70.0); intervals[3] = new Interval1D(46.0, 55.0); StdOut.println(STR); for (int i = 0; i < intervals.length; i++) St...
/** * Unit tests the {@code Interval1D} data type. * * @param args the command-line arguments */
Unit tests the Interval1D data type
main
{ "repo_name": "afcrowther/algorithms", "path": "src/main/java/com/afcrowther/algorithms/library/Interval1D.java", "license": "mit", "size": 9165 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
1,885,053
public void updateInlinedMethods(StructuredGraph other) { if (inlinedMethods != null) { assert this != other; Map<ResolvedJavaMethod, Integer> otherInlinedMethods = other.inlinedMethods; if (otherInlinedMethods != null) { for (Map.Entry<ResolvedJavaMethod,...
void function(StructuredGraph other) { if (inlinedMethods != null) { assert this != other; Map<ResolvedJavaMethod, Integer> otherInlinedMethods = other.inlinedMethods; if (otherInlinedMethods != null) { for (Map.Entry<ResolvedJavaMethod, Integer> e : otherInlinedMethods.entrySet()) { ResolvedJavaMethod key = e.getKey()...
/** * If method inlining recording has not been {@linkplain #disableInlinedMethodRecording() * disabled}, updates the {@linkplain #getInlinedMethods() inlined methods} of this graph with * the inlined methods of another graph. Otherwise, this method does nothing. */
If method inlining recording has not been #disableInlinedMethodRecording() disabled, updates the #getInlinedMethods() inlined methods of this graph with the inlined methods of another graph. Otherwise, this method does nothing
updateInlinedMethods
{ "repo_name": "smarr/GraalCompiler", "path": "graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/StructuredGraph.java", "license": "gpl-2.0", "size": 25541 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,873,802
public void setInterpolator(Interpolator i) { mInterpolator = i; }
void function(Interpolator i) { mInterpolator = i; }
/** * Sets the acceleration curve for panel's animation. * * @param i The interpolator which defines the acceleration curve */
Sets the acceleration curve for panel's animation
setInterpolator
{ "repo_name": "arnaudbos/luscinia", "path": "src/org/miscwidgets/widget/Panel.java", "license": "gpl-3.0", "size": 18504 }
[ "android.view.animation.Interpolator" ]
import android.view.animation.Interpolator;
import android.view.animation.*;
[ "android.view" ]
android.view;
2,593,872
@Nullable public static String getDomainName(@Nullable String url) { if (url == null || url.isEmpty()) return ""; boolean ssl = URLUtil.isHttpsUrl(url); int index = url.indexOf('/', 8); if (index != -1) { url = url.substring(0, index); } URI uri; ...
static String function(@Nullable String url) { if (url == null url.isEmpty()) return STRwww.") ? domain.substring(4) : domain; }
/** * Extracts the domain name from a URL. * * @param url the URL to extract the domain from. * @return the domain name, or the URL if the domain * could not be extracted. The domain name may include * HTTPS if the URL is an SSL supported URL. */
Extracts the domain name from a URL
getDomainName
{ "repo_name": "eXGameStudio/Browser", "path": "app/src/main/java/acr/browser/lightning/utils/Utils.java", "license": "mpl-2.0", "size": 15872 }
[ "android.support.annotation.Nullable" ]
import android.support.annotation.Nullable;
import android.support.annotation.*;
[ "android.support" ]
android.support;
2,289,624
public void reset() { this.blockRadius = DEFAULT_RADIUS; for (BlockSettings settings : this.blockSettings.values()) {settings.draw = false; settings.color = Color.WHITE;} }
void function() { this.blockRadius = DEFAULT_RADIUS; for (BlockSettings settings : this.blockSettings.values()) {settings.draw = false; settings.color = Color.WHITE;} }
/** * Resets the xray radius to the default value * and disables xray for all blocks and resets their color to the default value */
Resets the xray radius to the default value and disables xray for all blocks and resets their color to the default value
reset
{ "repo_name": "MrNobody98/morecommands", "path": "src/main/java/com/mrnobody/morecommands/util/Xray.java", "license": "lgpl-3.0", "size": 13652 }
[ "java.awt.Color" ]
import java.awt.Color;
import java.awt.*;
[ "java.awt" ]
java.awt;
85,552
@Test public void testGetImagesBySplitFilesetsImageAsRootAll() throws Exception { // first create a project Image i1 = (Image) iUpdate .saveAndReturnObject(mmFactory.simpleImage()); Image i2 = (Image) iUpdate .saveAndReturnObject(mmFactory.simpleImage()); ...
void function() throws Exception { Image i1 = (Image) iUpdate .saveAndReturnObject(mmFactory.simpleImage()); Image i2 = (Image) iUpdate .saveAndReturnObject(mmFactory.simpleImage()); Fileset fileset = newFileset(); fileset.addImage(i1); fileset.addImage(i2); fileset = (Fileset) iUpdate.saveAndReturnObject(fileset); ass...
/** * Test the <code>getImagesBySplitFilesets</code> Image as root. * * @throws Exception * Thrown if an error occurred. */
Test the <code>getImagesBySplitFilesets</code> Image as root
testGetImagesBySplitFilesetsImageAsRootAll
{ "repo_name": "stelfrich/openmicroscopy", "path": "components/tools/OmeroJava/test/integration/PojosServiceTest.java", "license": "gpl-2.0", "size": 79848 }
[ "java.util.ArrayList", "java.util.HashMap", "java.util.List", "java.util.Map", "org.testng.AssertJUnit" ]
import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.testng.AssertJUnit;
import java.util.*; import org.testng.*;
[ "java.util", "org.testng" ]
java.util; org.testng;
1,796,357
void unregister(PlotPlayer player);
void unregister(PlotPlayer player);
/** * Unregister a PlotPlayer from cache e.g. if they have logged off * @param player */
Unregister a PlotPlayer from cache e.g. if they have logged off
unregister
{ "repo_name": "PiLogic/PlotSquared", "path": "src/main/java/com/intellectualcrafters/plot/IPlotMain.java", "license": "gpl-3.0", "size": 5316 }
[ "com.intellectualcrafters.plot.object.PlotPlayer" ]
import com.intellectualcrafters.plot.object.PlotPlayer;
import com.intellectualcrafters.plot.object.*;
[ "com.intellectualcrafters.plot" ]
com.intellectualcrafters.plot;
1,918,448
@Test public void syspropReplacementInArqXml() throws Exception { final String xml = desc.get().exportAsString(); System.out.println(xml); AssertXPath.assertXPath(xml, "/arquillian/container/@qualifier", VALUE_EL_OVERRIDE); } /** * {@inheritDoc}
void function() throws Exception { final String xml = desc.get().exportAsString(); System.out.println(xml); AssertXPath.assertXPath(xml, STR, VALUE_EL_OVERRIDE); } /** * {@inheritDoc}
/** * Ensures that we can load an arquillian.xml and perform sysprop * EL replacement upon it. */
Ensures that we can load an arquillian.xml and perform sysprop EL replacement upon it
syspropReplacementInArqXml
{ "repo_name": "aslakknutsen/arquillian-core", "path": "config/impl-base/src/test/java/org/jboss/arquillian/config/impl/extension/SyspropReplacementInArqXmlTestCase.java", "license": "apache-2.0", "size": 3343 }
[ "org.jboss.arquillian.config.descriptor.impl.AssertXPath" ]
import org.jboss.arquillian.config.descriptor.impl.AssertXPath;
import org.jboss.arquillian.config.descriptor.impl.*;
[ "org.jboss.arquillian" ]
org.jboss.arquillian;
1,435,644
@Nonnull static <U> Promise<U> supplyingExceptionallyDelayedSync(@Nonnull Callable<U> callable, long delayTicks) { Promise<U> p = empty(); return p.supplyExceptionallyDelayedSync(callable, delayTicks); }
static <U> Promise<U> supplyingExceptionallyDelayedSync(@Nonnull Callable<U> callable, long delayTicks) { Promise<U> p = empty(); return p.supplyExceptionallyDelayedSync(callable, delayTicks); }
/** * Returns a new Promise, and schedules it's population via the given callable, * after the delay has elapsed. * * @param callable the value callable * @param delayTicks the delay in ticks * @param <U> the result type * @return the promise */
Returns a new Promise, and schedules it's population via the given callable, after the delay has elapsed
supplyingExceptionallyDelayedSync
{ "repo_name": "lucko/helper", "path": "helper/src/main/java/me/lucko/helper/promise/Promise.java", "license": "mit", "size": 55811 }
[ "java.util.concurrent.Callable", "javax.annotation.Nonnull" ]
import java.util.concurrent.Callable; import javax.annotation.Nonnull;
import java.util.concurrent.*; import javax.annotation.*;
[ "java.util", "javax.annotation" ]
java.util; javax.annotation;
835,434
@GET public Response getAll() { final SortedSet<ZoneDto> zones = zoneService.getAll(); final Representation representation = zonesRepresentationFactory.newRepresentation(zones); return Response.ok(representation).build(); } /** * Returns a representation of a zone retrieved...
Response function() { final SortedSet<ZoneDto> zones = zoneService.getAll(); final Representation representation = zonesRepresentationFactory.newRepresentation(zones); return Response.ok(representation).build(); } /** * Returns a representation of a zone retrieved by its name. * * @param zoneName the name of a zone * @...
/** * Returns a representation of all zones. * * @return the representation of all zones */
Returns a representation of all zones
getAll
{ "repo_name": "xdeclercq/multiroom-mpd", "path": "src/main/java/com/autelhome/multiroom/zone/ZonesResource.java", "license": "mit", "size": 6151 }
[ "com.theoryinpractise.halbuilder.api.Representation", "java.util.SortedSet", "javax.ws.rs.core.Response" ]
import com.theoryinpractise.halbuilder.api.Representation; import java.util.SortedSet; import javax.ws.rs.core.Response;
import com.theoryinpractise.halbuilder.api.*; import java.util.*; import javax.ws.rs.core.*;
[ "com.theoryinpractise.halbuilder", "java.util", "javax.ws" ]
com.theoryinpractise.halbuilder; java.util; javax.ws;
1,573,546
public void testCallWithResultSet() throws Exception { Statement st = con.createStatement(); st.execute("create proc #testCallWithResultSet @in varchar(16), @out varchar(32) output as" + " begin" + " select 'result set' as ret" + " set @out ...
void function() throws Exception { Statement st = con.createStatement(); st.execute(STR + STR + STR + STR + STR + STR + STR); st.close(); CallableStatement cstmt = con.prepareCall(STR); cstmt.registerOutParameter(1, Types.INTEGER); cstmt.setString(2, "data"); cstmt.registerOutParameter(3, Types.VARCHAR); cstmt.execute(...
/** * Test retrieving multiple resultsets, the return value and an additional * output parameter from a single procedure call. */
Test retrieving multiple resultsets, the return value and an additional output parameter from a single procedure call
testCallWithResultSet
{ "repo_name": "TRITON-DLP/jtds-patch", "path": "src/test/net/sourceforge/jtds/jdbc/CallableStatementTest.java", "license": "gpl-2.0", "size": 44294 }
[ "java.sql.CallableStatement", "java.sql.ResultSet", "java.sql.Statement", "java.sql.Types" ]
import java.sql.CallableStatement; import java.sql.ResultSet; import java.sql.Statement; import java.sql.Types;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,657,697
model.addAttribute("today", new Date()); // TODO real user and pass model.addAttribute("basicUser", "admin"); model.addAttribute("basicPass", "admin"); // TODO real key and secret? model.addAttribute("oauthKey", "key"); model.addAttribute("oauthSecret", "secret"); ...
model.addAttribute("today", new Date()); model.addAttribute(STR, "admin"); model.addAttribute(STR, "admin"); model.addAttribute(STR, "key"); model.addAttribute(STR, STR); model.addAttribute("req", req); model.addAttribute(STR, req.getMethod() + " " + req.getRequestURI()); model.addAttribute(STR, principal != null ? pri...
/** * Just populate some common model stuff for less repeating * * @param req the request * @param principal the current security principal (if there is one) * @param model the model */
Just populate some common model stuff for less repeating
commonModelPopulate
{ "repo_name": "azeckoski/lti_starter", "path": "src/main/java/ltistarter/controllers/BaseController.java", "license": "apache-2.0", "size": 2141 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
2,539,932
public SecretKey getJobTokenSecret() { return this.tokenSecret; }
SecretKey function() { return this.tokenSecret; }
/** * Get the job token secret * @return the token secret */
Get the job token secret
getJobTokenSecret
{ "repo_name": "NJUJYB/disYarn", "path": "hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/Task.java", "license": "apache-2.0", "size": 61372 }
[ "javax.crypto.SecretKey" ]
import javax.crypto.SecretKey;
import javax.crypto.*;
[ "javax.crypto" ]
javax.crypto;
1,370,847
@Test public void txFailureIncrementsTxFailureChanges() { cachePerfStats.txFailure(1, 1, 1); assertThat(statistics.getInt(txFailureChangesId)).isEqualTo(1); }
void function() { cachePerfStats.txFailure(1, 1, 1); assertThat(statistics.getInt(txFailureChangesId)).isEqualTo(1); }
/** * Characterization test: Note that the only way to increment {@code txFailureChanges} is to * invoke {@code txFailure}. */
Characterization test: Note that the only way to increment txFailureChanges is to invoke txFailure
txFailureIncrementsTxFailureChanges
{ "repo_name": "davebarnes97/geode", "path": "geode-core/src/test/java/org/apache/geode/internal/cache/CachePerfStatsTest.java", "license": "apache-2.0", "size": 34945 }
[ "org.assertj.core.api.Assertions" ]
import org.assertj.core.api.Assertions;
import org.assertj.core.api.*;
[ "org.assertj.core" ]
org.assertj.core;
996,707
@Deprecated public static String getString(String key) throws TableKeyNotDefinedException { return table.getString(key); }
static String function(String key) throws TableKeyNotDefinedException { return table.getString(key); }
/** * Returns the string the key maps to. * @param key the key to look up * @return the value associated with the given key * @throws TableKeyNotDefinedException if there is no value associated with * the given key * @deprecated This exception-raising method has been replaced by the * defau...
Returns the string the key maps to
getString
{ "repo_name": "333fred/allwpilib", "path": "wpilibj/src/shared/java/edu/wpi/first/wpilibj/smartdashboard/SmartDashboard.java", "license": "bsd-3-clause", "size": 24155 }
[ "edu.wpi.first.wpilibj.tables.TableKeyNotDefinedException" ]
import edu.wpi.first.wpilibj.tables.TableKeyNotDefinedException;
import edu.wpi.first.wpilibj.tables.*;
[ "edu.wpi.first" ]
edu.wpi.first;
397,176
@Test public void testCheckCountSlaOverridesAggressiveCountPassesThenActs() { IScheduledTask task1 = makeTask("taskA", 1, RUNNING); IScheduledTask task2 = makeTask("taskB", 2, RUNNING); IScheduledTask task3 = makeTask("taskC", 3, RUNNING); // mock calls to fetch all active tasks for the job for sla...
void function() { IScheduledTask task1 = makeTask("taskA", 1, RUNNING); IScheduledTask task2 = makeTask("taskB", 2, RUNNING); IScheduledTask task3 = makeTask("taskC", 3, RUNNING); expect(storageUtil.taskStore.fetchTasks(Query.jobScoped(Tasks.getJob(task1)).active())) .andReturn(ImmutableSet.of(task1, task2, task3)); ex...
/** * Verifies that SLA check gets overridden, passes and the supplied {@link Storage.MutateWork} is * executed for a job that has and aggressive {@link CountSlaPolicy#count} > total number of * instances. */
Verifies that SLA check gets overridden, passes and the supplied <code>Storage.MutateWork</code> is executed for a job that has and aggressive <code>CountSlaPolicy#count</code> > total number of instances
testCheckCountSlaOverridesAggressiveCountPassesThenActs
{ "repo_name": "thinker0/aurora", "path": "src/test/java/org/apache/aurora/scheduler/sla/SlaManagerTest.java", "license": "apache-2.0", "size": 49619 }
[ "com.google.common.collect.ImmutableMap", "com.google.common.collect.ImmutableSet", "java.util.Optional", "org.apache.aurora.gen.CountSlaPolicy", "org.apache.aurora.gen.SlaPolicy", "org.apache.aurora.scheduler.base.Query", "org.apache.aurora.scheduler.base.Tasks", "org.apache.aurora.scheduler.storage....
import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import java.util.Optional; import org.apache.aurora.gen.CountSlaPolicy; import org.apache.aurora.gen.SlaPolicy; import org.apache.aurora.scheduler.base.Query; import org.apache.aurora.scheduler.base.Tasks; import org.apache.au...
import com.google.common.collect.*; import java.util.*; import org.apache.aurora.gen.*; import org.apache.aurora.scheduler.base.*; import org.apache.aurora.scheduler.storage.entities.*; import org.easymock.*;
[ "com.google.common", "java.util", "org.apache.aurora", "org.easymock" ]
com.google.common; java.util; org.apache.aurora; org.easymock;
2,755,783
public InterestType getItemInterest(String itemName);
InterestType function(String itemName);
/** * Gets the interest that a specific item subscribed * * @param itemName * @return */
Gets the interest that a specific item subscribed
getItemInterest
{ "repo_name": "paolodenti/openhab", "path": "bundles/binding/org.openhab.binding.ekey/src/main/java/org/openhab/binding/ekey/EKeyBindingProvider.java", "license": "epl-1.0", "size": 1221 }
[ "org.openhab.binding.ekey.internal.EKeyBindingConfig" ]
import org.openhab.binding.ekey.internal.EKeyBindingConfig;
import org.openhab.binding.ekey.internal.*;
[ "org.openhab.binding" ]
org.openhab.binding;
1,533,385
public List<QueryBuilder> should() { return this.shouldClauses; }
List<QueryBuilder> function() { return this.shouldClauses; }
/** * Gets the list of clauses that <b>should</b> be matched by the returned documents. * * @see #should(QueryBuilder) * @see #minimumNumberShouldMatch(int) */
Gets the list of clauses that should be matched by the returned documents
should
{ "repo_name": "strahanjen/strahanjen.github.io", "path": "elasticsearch-master/core/src/main/java/org/elasticsearch/index/query/BoolQueryBuilder.java", "license": "bsd-3-clause", "size": 21422 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,353,175
@Override public final CodeBlock[] getCommands() { return commands.toArray(new CodeBlock[]{}); }
final CodeBlock[] function() { return commands.toArray(new CodeBlock[]{}); }
/** * Get the commands to interpret. * * @return */
Get the commands to interpret
getCommands
{ "repo_name": "ZenHarbinger/torgo-android", "path": "app/src/main/java/org/tros/logo/LogoBlock.java", "license": "apache-2.0", "size": 6722 }
[ "org.tros.torgo.interpreter.CodeBlock" ]
import org.tros.torgo.interpreter.CodeBlock;
import org.tros.torgo.interpreter.*;
[ "org.tros.torgo" ]
org.tros.torgo;
2,407,428
@ServiceMethod(returns = ReturnType.SINGLE) public ServiceUnitResourceInner createOrUpdate( String resourceGroupName, String serviceTopologyName, String serviceName, String serviceUnitName, ServiceUnitResourceInner serviceUnitInfo) { return createOrUpdateAsync( ...
@ServiceMethod(returns = ReturnType.SINGLE) ServiceUnitResourceInner function( String resourceGroupName, String serviceTopologyName, String serviceName, String serviceUnitName, ServiceUnitResourceInner serviceUnitInfo) { return createOrUpdateAsync( resourceGroupName, serviceTopologyName, serviceName, serviceUnitName, s...
/** * This is an asynchronous operation and can be polled to completion using the operation resource returned by this * operation. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serviceTopologyName The name of the service topology . * @p...
This is an asynchronous operation and can be polled to completion using the operation resource returned by this operation
createOrUpdate
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/deploymentmanager/azure-resourcemanager-deploymentmanager/src/main/java/com/azure/resourcemanager/deploymentmanager/implementation/ServiceUnitsClientImpl.java", "license": "mit", "size": 51090 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.resourcemanager.deploymentmanager.fluent.models.ServiceUnitResourceInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.deploymentmanager.fluent.models.ServiceUnitResourceInner;
import com.azure.core.annotation.*; import com.azure.resourcemanager.deploymentmanager.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
543,702
protected void endArticle() throws IOException { output.write(getArticleEnd()); }
void function() throws IOException { output.write(getArticleEnd()); }
/** * End an article. Default implementation is to do nothing. Subclasses may provide additional information. * * @throws IOException If there is any error writing to the stream. */
End an article. Default implementation is to do nothing. Subclasses may provide additional information
endArticle
{ "repo_name": "benmccann/pdfbox", "path": "pdfbox/src/main/java/org/apache/pdfbox/text/PDFTextStripper.java", "license": "apache-2.0", "size": 72123 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,238,927
public void deleteObjectTags(String taggedObject, String type, String userName) { List<Tag> tags = getTags(null, taggedObject, type, userName); for (Tag tag : tags) { deleteTag(tag); } } public static class TagException extends Exception { private static...
void function(String taggedObject, String type, String userName) { List<Tag> tags = getTags(null, taggedObject, type, userName); for (Tag tag : tags) { deleteTag(tag); } } public static class TagException extends Exception { private static final long serialVersionUID = 8400582347265920471L; public TagException(String m...
/** * Deletes all tags assigned to a specified object. * @param taggedObject tagged object * @param type tag type * @param userName user name */
Deletes all tags assigned to a specified object
deleteObjectTags
{ "repo_name": "julie-sullivan/phytomine", "path": "intermine/api/main/src/org/intermine/api/profile/TagManager.java", "license": "lgpl-2.1", "size": 26133 }
[ "java.util.List", "org.intermine.api.tag.TagNames", "org.intermine.model.userprofile.Tag" ]
import java.util.List; import org.intermine.api.tag.TagNames; import org.intermine.model.userprofile.Tag;
import java.util.*; import org.intermine.api.tag.*; import org.intermine.model.userprofile.*;
[ "java.util", "org.intermine.api", "org.intermine.model" ]
java.util; org.intermine.api; org.intermine.model;
1,715,219
@Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
/** * Handles the HTTP <code>POST</code> method. * * @param request servlet request * @param response servlet response * * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */
Handles the HTTP <code>POST</code> method
doPost
{ "repo_name": "miguelpinia/laboratorio-is", "path": "lab-05-05-2015/Documentos/src/java/view/Documentos.java", "license": "apache-2.0", "size": 3120 }
[ "java.io.IOException", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import java.io.*; import javax.servlet.*; import javax.servlet.http.*;
[ "java.io", "javax.servlet" ]
java.io; javax.servlet;
709,385
public static byte[] asUnsignedByteArray( BigInteger value) { byte[] bytes = value.toByteArray(); if (bytes[0] == 0) { byte[] tmp = new byte[bytes.length - 1]; System.arraycopy(bytes, 1, tmp, 0, tmp.length); r...
static byte[] function( BigInteger value) { byte[] bytes = value.toByteArray(); if (bytes[0] == 0) { byte[] tmp = new byte[bytes.length - 1]; System.arraycopy(bytes, 1, tmp, 0, tmp.length); return tmp; } return bytes; }
/** * Return the passed in value as an unsigned byte array. * * @param value value to be converted. * @return a byte array without a leading zero byte if present in the signed encoding. */
Return the passed in value as an unsigned byte array
asUnsignedByteArray
{ "repo_name": "rex-xxx/mt6572_x201", "path": "mediatek/frameworks/base/tests/net/tests/src/mediatek/net/libcore/external/bouncycastle/util/BigIntegers.java", "license": "gpl-2.0", "size": 4388 }
[ "java.math.BigInteger" ]
import java.math.BigInteger;
import java.math.*;
[ "java.math" ]
java.math;
342,946
private List<WizardDescriptor.Panel<WizardDescriptor>> getPanels() { if (panels == null) { panels = new ArrayList<>(); panels.add(new DockerfileWizardPanel1()); String[] steps = createSteps(); for (int i = 0; i < panels.size(); i++) { Component...
List<WizardDescriptor.Panel<WizardDescriptor>> function() { if (panels == null) { panels = new ArrayList<>(); panels.add(new DockerfileWizardPanel1()); String[] steps = createSteps(); for (int i = 0; i < panels.size(); i++) { Component c = panels.get(i).getComponent(); if (steps[i] == null) { steps[i] = c.getName(); } ...
/** * Gets the panels. * * @return the panels */
Gets the panels
getPanels
{ "repo_name": "fafischer/te2m.de-netbeans", "path": "de.te2m.tools.netbeans.vertx/src/main/java/de/te2m/tools/netbeans/vertx/wizards/dockerfile/DockerfileWizardIterator.java", "license": "gpl-2.0", "size": 9626 }
[ "java.awt.Component", "java.util.ArrayList", "java.util.List", "javax.swing.JComponent", "org.openide.WizardDescriptor" ]
import java.awt.Component; import java.util.ArrayList; import java.util.List; import javax.swing.JComponent; import org.openide.WizardDescriptor;
import java.awt.*; import java.util.*; import javax.swing.*; import org.openide.*;
[ "java.awt", "java.util", "javax.swing", "org.openide" ]
java.awt; java.util; javax.swing; org.openide;
998,021
public void setObjectCodeService(ObjectCodeService objectCodeService) { this.objectCodeService = objectCodeService; }
void function(ObjectCodeService objectCodeService) { this.objectCodeService = objectCodeService; }
/** * Sets the local objectCodeService attribute. * @param objectCodeService The ObjectCodeService instance to be set. */
Sets the local objectCodeService attribute
setObjectCodeService
{ "repo_name": "ua-eas/ua-kfs-5.3", "path": "work/src/org/kuali/kfs/sys/service/impl/FlexibleOffsetAccountServiceImpl.java", "license": "agpl-3.0", "size": 10290 }
[ "org.kuali.kfs.coa.service.ObjectCodeService" ]
import org.kuali.kfs.coa.service.ObjectCodeService;
import org.kuali.kfs.coa.service.*;
[ "org.kuali.kfs" ]
org.kuali.kfs;
1,006,782
private void createEdge(Node fromNode, ControlFlowGraph.Branch branch, Node toNode) { cfg.createNode(fromNode); cfg.createNode(toNode); cfg.connectIfNotFound(fromNode, branch, toNode); }
void function(Node fromNode, ControlFlowGraph.Branch branch, Node toNode) { cfg.createNode(fromNode); cfg.createNode(toNode); cfg.connectIfNotFound(fromNode, branch, toNode); }
/** * Connects the two nodes in the control flow graph. * * @param fromNode Source. * @param toNode Destination. */
Connects the two nodes in the control flow graph
createEdge
{ "repo_name": "brad4d/closure-compiler", "path": "src/com/google/javascript/jscomp/ControlFlowAnalysis.java", "license": "apache-2.0", "size": 35131 }
[ "com.google.javascript.jscomp.ControlFlowGraph", "com.google.javascript.rhino.Node" ]
import com.google.javascript.jscomp.ControlFlowGraph; import com.google.javascript.rhino.Node;
import com.google.javascript.jscomp.*; import com.google.javascript.rhino.*;
[ "com.google.javascript" ]
com.google.javascript;
2,654,563
public void testNodebyteArray() throws Exception { byte[] bytz = StateHelper.decodeMACAddress("02-00-4C-4F-4F-50"); Node test = new Node(bytz); assertTrue(Arrays.equals(bytz, test.getNodeIdentifier())); assertTrue(test.getClockSequence() != 0); long last = test.getUUIDTime();...
void function() throws Exception { byte[] bytz = StateHelper.decodeMACAddress(STR); Node test = new Node(bytz); assertTrue(Arrays.equals(bytz, test.getNodeIdentifier())); assertTrue(test.getClockSequence() != 0); long last = test.getUUIDTime(); assertEquals(last, test.getLastTimestamp()); }
/** * <p>Test for constructor Node(byte[])</p> * * @throws Exception a test exception. */
Test for constructor Node(byte[])
testNodebyteArray
{ "repo_name": "glinmac/commons-id", "path": "src/test/org/apache/commons/id/uuid/state/NodeTest.java", "license": "apache-2.0", "size": 4570 }
[ "java.util.Arrays" ]
import java.util.Arrays;
import java.util.*;
[ "java.util" ]
java.util;
1,853,577
public UnaryCallSettings< GetDisplayVideo360AdvertiserLinkProposalRequest, DisplayVideo360AdvertiserLinkProposal> getDisplayVideo360AdvertiserLinkProposalSettings() { return ((AnalyticsAdminServiceStubSettings) getStubSettings()) .getDisplayVideo360AdvertiserLinkProposalSettings(); }
UnaryCallSettings< GetDisplayVideo360AdvertiserLinkProposalRequest, DisplayVideo360AdvertiserLinkProposal> function() { return ((AnalyticsAdminServiceStubSettings) getStubSettings()) .getDisplayVideo360AdvertiserLinkProposalSettings(); }
/** * Returns the object with the settings used for calls to * getDisplayVideo360AdvertiserLinkProposal. */
Returns the object with the settings used for calls to getDisplayVideo360AdvertiserLinkProposal
getDisplayVideo360AdvertiserLinkProposalSettings
{ "repo_name": "googleapis/java-analytics-admin", "path": "google-analytics-admin/src/main/java/com/google/analytics/admin/v1alpha/AnalyticsAdminServiceSettings.java", "license": "apache-2.0", "size": 62796 }
[ "com.google.analytics.admin.v1alpha.stub.AnalyticsAdminServiceStubSettings", "com.google.api.gax.rpc.UnaryCallSettings" ]
import com.google.analytics.admin.v1alpha.stub.AnalyticsAdminServiceStubSettings; import com.google.api.gax.rpc.UnaryCallSettings;
import com.google.analytics.admin.v1alpha.stub.*; import com.google.api.gax.rpc.*;
[ "com.google.analytics", "com.google.api" ]
com.google.analytics; com.google.api;
908,837
@Test public void testGetFunctionNameList2() { Class<?> returnType = FunctionManager.getInstance().getFunctionType(null); assertNull(returnType); List<FunctionName> functionNameList = FunctionManager.getInstance().getFunctionNameList(Object.class, null); Function...
void function() { Class<?> returnType = FunctionManager.getInstance().getFunctionType(null); assertNull(returnType); List<FunctionName> functionNameList = FunctionManager.getInstance().getFunctionNameList(Object.class, null); FunctionName propertyFunction = null; FunctionName idFunction = null; FunctionName areaFunctio...
/** * Test method for {@link * com.sldeditor.filter.v2.function.FunctionManager#getFunctionNameList(java.lang.Class)}. * Testing FunctionNameFilterRaster */
Test method for <code>com.sldeditor.filter.v2.function.FunctionManager#getFunctionNameList(java.lang.Class)</code>. Testing FunctionNameFilterRaster
testGetFunctionNameList2
{ "repo_name": "robward-scisys/sldeditor", "path": "modules/application/src/test/java/com/sldeditor/test/unit/filter/v2/function/FunctionManagerTest.java", "license": "gpl-3.0", "size": 9339 }
[ "com.sldeditor.filter.v2.function.FunctionManager", "com.sldeditor.filter.v2.function.namefilter.FunctionNameFilterInterface", "com.sldeditor.filter.v2.function.namefilter.FunctionNameFilterRaster", "java.util.ArrayList", "java.util.List", "org.junit.jupiter.api.Assertions", "org.opengis.filter.capabili...
import com.sldeditor.filter.v2.function.FunctionManager; import com.sldeditor.filter.v2.function.namefilter.FunctionNameFilterInterface; import com.sldeditor.filter.v2.function.namefilter.FunctionNameFilterRaster; import java.util.ArrayList; import java.util.List; import org.junit.jupiter.api.Assertions; import org.ope...
import com.sldeditor.filter.v2.function.*; import com.sldeditor.filter.v2.function.namefilter.*; import java.util.*; import org.junit.jupiter.api.*; import org.opengis.filter.capability.*;
[ "com.sldeditor.filter", "java.util", "org.junit.jupiter", "org.opengis.filter" ]
com.sldeditor.filter; java.util; org.junit.jupiter; org.opengis.filter;
2,472,909
public void run() { CollocatedOrbs.registerOrb(this); try { running = true; // Instantiate the port server for each socket. Iterator iter = connected_objects.entrySet().iterator(); Map.Entry m; Connected_objects.cObject obj; while (iter.hasNext()) ...
void function() { CollocatedOrbs.registerOrb(this); try { running = true; Iterator iter = connected_objects.entrySet().iterator(); Map.Entry m; Connected_objects.cObject obj; while (iter.hasNext()) { m = (Map.Entry) iter.next(); obj = (Connected_objects.cObject) m.getValue(); portServer subserver; if (obj.identity == n...
/** * Start the ORBs main working cycle (receive invocation - invoke on the local * object - send response - wait for another invocation). The method only * returns after calling {@link #shutdown(boolean)}. */
Start the ORBs main working cycle (receive invocation - invoke on the local object - send response - wait for another invocation). The method only returns after calling <code>#shutdown(boolean)</code>
run
{ "repo_name": "SanDisk-Open-Source/SSD_Dashboard", "path": "uefi/gcc/gcc-4.6.3/libjava/classpath/gnu/CORBA/OrbFunctional.java", "license": "gpl-2.0", "size": 55482 }
[ "java.util.Iterator", "java.util.Map" ]
import java.util.Iterator; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,604,208
public ServiceCall<Void> getAllWithValuesAsync(String localStringPath, String pathItemStringPath, String localStringQuery, String pathItemStringQuery, final ServiceCallback<Void> serviceCallback) { return ServiceCall.create(getAllWithValuesAsync(localStringPath, pathItemStringPath, localStringQuery, pathIte...
ServiceCall<Void> function(String localStringPath, String pathItemStringPath, String localStringQuery, String pathItemStringQuery, final ServiceCallback<Void> serviceCallback) { return ServiceCall.create(getAllWithValuesAsync(localStringPath, pathItemStringPath, localStringQuery, pathItemStringQuery), serviceCallback);...
/** * send globalStringPath='globalStringPath', pathItemStringPath='pathItemStringPath', localStringPath='localStringPath', globalStringQuery='globalStringQuery', pathItemStringQuery='pathItemStringQuery', localStringQuery='localStringQuery'. * * @param localStringPath should contain value 'localStringPa...
send globalStringPath='globalStringPath', pathItemStringPath='pathItemStringPath', localStringPath='localStringPath', globalStringQuery='globalStringQuery', pathItemStringQuery='pathItemStringQuery', localStringQuery='localStringQuery'
getAllWithValuesAsync
{ "repo_name": "haocs/autorest", "path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/url/implementation/PathItemsImpl.java", "license": "mit", "size": 38729 }
[ "com.microsoft.rest.ServiceCall", "com.microsoft.rest.ServiceCallback" ]
import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
708,655
public ServiceFuture<AlertInner> getAsync(String alertSettingName, final ServiceCallback<AlertInner> serviceCallback) { return ServiceFuture.fromResponse(getWithServiceResponseAsync(alertSettingName), serviceCallback); }
ServiceFuture<AlertInner> function(String alertSettingName, final ServiceCallback<AlertInner> serviceCallback) { return ServiceFuture.fromResponse(getWithServiceResponseAsync(alertSettingName), serviceCallback); }
/** * Gets an email notification(alert) configuration. * Gets the details of the specified email notification(alert) configuration. * * @param alertSettingName The name of the email notification configuration. * @param serviceCallback the async ServiceCallback to handle successful and failed re...
Gets an email notification(alert) configuration. Gets the details of the specified email notification(alert) configuration
getAsync
{ "repo_name": "navalev/azure-sdk-for-java", "path": "sdk/recoveryservices.siterecovery/mgmt-v2018_01_10/src/main/java/com/microsoft/azure/management/recoveryservices/siterecovery/v2018_01_10/implementation/ReplicationAlertSettingsInner.java", "license": "mit", "size": 32256 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
2,702,474
public void setReducerAccumulator(Accumulator<GenericRecord,GenericRecord> reducer) { this._reducer = reducer; }
void function(Accumulator<GenericRecord,GenericRecord> reducer) { this._reducer = reducer; }
/** * Set the accumulator for the reducer. * * @param reducer accumulator for the reducer */
Set the accumulator for the reducer
setReducerAccumulator
{ "repo_name": "shaohua-zhang/incubator-datafu", "path": "datafu-hourglass/src/main/java/datafu/hourglass/jobs/PartitionPreservingIncrementalJob.java", "license": "apache-2.0", "size": 4671 }
[ "org.apache.avro.generic.GenericRecord" ]
import org.apache.avro.generic.GenericRecord;
import org.apache.avro.generic.*;
[ "org.apache.avro" ]
org.apache.avro;
734,839
HdfsFileStatus createFileStatus(byte[] path, INode node, byte storagePolicy, int snapshot, boolean isRawPath, INodesInPath iip) throws IOException { long size = 0; // length is zero for directories short replication = 0; long blocksize = 0; final boolean isEncrypted; final FileEncr...
HdfsFileStatus createFileStatus(byte[] path, INode node, byte storagePolicy, int snapshot, boolean isRawPath, INodesInPath iip) throws IOException { long size = 0; short replication = 0; long blocksize = 0; final boolean isEncrypted; final FileEncryptionInfo feInfo = isRawPath ? null : getFileEncryptionInfo(node, snaps...
/** * Create FileStatus by file INode */
Create FileStatus by file INode
createFileStatus
{ "repo_name": "yncxcw/Yarn-SBlock", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java", "license": "apache-2.0", "size": 120183 }
[ "java.io.IOException", "org.apache.hadoop.fs.FileEncryptionInfo", "org.apache.hadoop.hdfs.protocol.HdfsFileStatus" ]
import java.io.IOException; import org.apache.hadoop.fs.FileEncryptionInfo; import org.apache.hadoop.hdfs.protocol.HdfsFileStatus;
import java.io.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hdfs.protocol.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
136,578
@Override protected void doHead(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { // Process request without content. processRequest(request, response, false); }
void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response, false); }
/** * Process HEAD request. This returns the same headers as GET request, but without content. * * @see HttpServlet#doHead(HttpServletRequest, HttpServletResponse). */
Process HEAD request. This returns the same headers as GET request, but without content
doHead
{ "repo_name": "mthatcher/lancaster", "path": "Lancaster/src/com/mthatcher/wtvcompressor/StreamingServlet.java", "license": "gpl-3.0", "size": 18222 }
[ "java.io.IOException", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import java.io.*; import javax.servlet.*; import javax.servlet.http.*;
[ "java.io", "javax.servlet" ]
java.io; javax.servlet;
1,722,121
public void addDomain( org.ontoware.rdf2go.model.node.Node value) { Base.add(this.model, this.getResource(), DOMAIN, value); }
void function( org.ontoware.rdf2go.model.node.Node value) { Base.add(this.model, this.getResource(), DOMAIN, value); }
/** * Adds a value to property Domain as an RDF2Go node * @param value the value to be added * * [Generated from RDFReactor template rule #add1dynamic] */
Adds a value to property Domain as an RDF2Go node
addDomain
{ "repo_name": "josectoledo/semweb4j", "path": "org.semweb4j.rdfreactor.runtime/src/main/java/org/ontoware/rdfreactor/schema/rdfs/Property.java", "license": "bsd-2-clause", "size": 36485 }
[ "org.ontoware.rdfreactor.runtime.Base" ]
import org.ontoware.rdfreactor.runtime.Base;
import org.ontoware.rdfreactor.runtime.*;
[ "org.ontoware.rdfreactor" ]
org.ontoware.rdfreactor;
2,326,330
@Override public Transformation createAndPersistDefaultCompleteObject() throws Exception { final String transformationName = "my transformation"; if (!cache.containsKey(transformationName)) { final String transformationDescription = "transformation which just makes use of one function"; final String tr...
Transformation function() throws Exception { final String transformationName = STR; if (!cache.containsKey(transformationName)) { final String transformationDescription = STR; final String transformationParameter = STR; final Component component = componentServiceTestUtils.createAndPersistDefaultCompleteObject(); final...
/** * note: result will be cache (temporarily - for re-utilisation in a test) * * @return * @throws Exception */
note: result will be cache (temporarily - for re-utilisation in a test)
createAndPersistDefaultCompleteObject
{ "repo_name": "zazi/dswarm", "path": "persistence/src/test/java/org/dswarm/persistence/service/job/test/utils/TransformationServiceTestUtils.java", "license": "apache-2.0", "size": 8067 }
[ "com.google.common.collect.Lists", "com.google.common.collect.Sets", "java.util.LinkedList", "java.util.Set", "org.dswarm.persistence.model.job.Component", "org.dswarm.persistence.model.job.Transformation" ]
import com.google.common.collect.Lists; import com.google.common.collect.Sets; import java.util.LinkedList; import java.util.Set; import org.dswarm.persistence.model.job.Component; import org.dswarm.persistence.model.job.Transformation;
import com.google.common.collect.*; import java.util.*; import org.dswarm.persistence.model.job.*;
[ "com.google.common", "java.util", "org.dswarm.persistence" ]
com.google.common; java.util; org.dswarm.persistence;
796,978
public boolean supportsSubqueriesInExists() throws SQLException { return this.conn.versionMeetsMinimum(4, 1, 0); }
boolean function() throws SQLException { return this.conn.versionMeetsMinimum(4, 1, 0); }
/** * Are subqueries in exists expressions supported? A JDBC compliant driver * always returns true. * * @return true if so * @throws SQLException * DOCUMENT ME! */
Are subqueries in exists expressions supported? A JDBC compliant driver always returns true
supportsSubqueriesInExists
{ "repo_name": "shubhanshu-gupta/Apache-Solr", "path": "example/solr/collection1/lib/mysql-connector-java-5.1.32/src/com/mysql/jdbc/DatabaseMetaData.java", "license": "apache-2.0", "size": 287958 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
371,116
ServiceCall<Void> post202Async(final ServiceCallback<Void> serviceCallback);
ServiceCall<Void> post202Async(final ServiceCallback<Void> serviceCallback);
/** * Post true Boolean value in request returns 202 (Accepted). * * @param serviceCallback the async ServiceCallback to handle successful and failed responses. * @return the {@link ServiceCall} object */
Post true Boolean value in request returns 202 (Accepted)
post202Async
{ "repo_name": "tbombach/autorest", "path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/http/HttpSuccess.java", "license": "mit", "size": 36703 }
[ "com.microsoft.rest.ServiceCall", "com.microsoft.rest.ServiceCallback" ]
import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
2,443,449
public void setConfiguration(ClientConfiguration clientConfiguration) { this.clientConfiguration = clientConfiguration; client = new NeteaseHttpClient(clientConfiguration); }
void function(ClientConfiguration clientConfiguration) { this.clientConfiguration = clientConfiguration; client = new NeteaseHttpClient(clientConfiguration); }
/** * Set configuration * * @param clientConfiguration clientConfiguration. */
Set configuration
setConfiguration
{ "repo_name": "NetEase-Cloudsearch/streamproxy-sdk-java", "path": "streamproxy-sdk-java/src/main/java/com/netease/cloud/client/DefaultClient.java", "license": "apache-2.0", "size": 2937 }
[ "com.netease.cloud.config.ClientConfiguration" ]
import com.netease.cloud.config.ClientConfiguration;
import com.netease.cloud.config.*;
[ "com.netease.cloud" ]
com.netease.cloud;
2,805,950
@RestrictTo(Scope.LIBRARY) default void onSourceStateChanged(@NonNull SourceState sourceState) { }
@RestrictTo(Scope.LIBRARY) default void onSourceStateChanged(@NonNull SourceState sourceState) { }
/** * Called when the state of the video frame producer is changed. * * @hide */
Called when the state of the video frame producer is changed
onSourceStateChanged
{ "repo_name": "AndroidX/androidx", "path": "camera/camera-video/src/main/java/androidx/camera/video/VideoOutput.java", "license": "apache-2.0", "size": 5827 }
[ "androidx.annotation.NonNull", "androidx.annotation.RestrictTo" ]
import androidx.annotation.NonNull; import androidx.annotation.RestrictTo;
import androidx.annotation.*;
[ "androidx.annotation" ]
androidx.annotation;
2,274,650
@Override public List getItems() { throw new UnsupportedOperationException("Items are not being handled in Bulk Receiving document"); }
List function() { throw new UnsupportedOperationException(STR); }
/** * It's not needed to implement PurapItemOperations methods in this class since bulk receiving doesn't support items. * Calling this method will throw an UnsupportedOperationException * @throws UnsupportedOperationException */
It's not needed to implement PurapItemOperations methods in this class since bulk receiving doesn't support items. Calling this method will throw an UnsupportedOperationException
getItems
{ "repo_name": "Ariah-Group/Finance", "path": "af_webapp/src/main/java/org/kuali/kfs/module/purap/document/BulkReceivingDocument.java", "license": "apache-2.0", "size": 21995 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,847,404
@Test public void loadAgilentExpressionArrayDesign() throws PlatformLoadingException { checkLoadAgilentExpressionArrayDesign(TestArrayDesignFiles.HUMAN_GENOME_CGH244A_ANNOTATION_FILE); checkLoadAgilentExpressionArrayDesign(TestArrayDesignFiles.AGILENT_G4502A_07_01_TCGA_ADF_ANNOTATION_FILE); ...
void function() throws PlatformLoadingException { checkLoadAgilentExpressionArrayDesign(TestArrayDesignFiles.HUMAN_GENOME_CGH244A_ANNOTATION_FILE); checkLoadAgilentExpressionArrayDesign(TestArrayDesignFiles.AGILENT_G4502A_07_01_TCGA_ADF_ANNOTATION_FILE); }
/** * Tests loading of Agilent Expression array designs. * @throws PlatformLoadingException on error */
Tests loading of Agilent Expression array designs
loadAgilentExpressionArrayDesign
{ "repo_name": "NCIP/caintegrator", "path": "caintegrator-war/test/src/gov/nih/nci/caintegrator/application/arraydata/ArrayDataServiceTest.java", "license": "bsd-3-clause", "size": 14495 }
[ "gov.nih.nci.caintegrator.TestArrayDesignFiles" ]
import gov.nih.nci.caintegrator.TestArrayDesignFiles;
import gov.nih.nci.caintegrator.*;
[ "gov.nih.nci" ]
gov.nih.nci;
2,872,829
public void removeGroup(IEntityGroup eg) throws GroupsException { Set newGroupKeys = copyGroupKeys(); newGroupKeys.remove(eg.getEntityIdentifier().getKey()); setGroupKeys(newGroupKeys); }
void function(IEntityGroup eg) throws GroupsException { Set newGroupKeys = copyGroupKeys(); newGroupKeys.remove(eg.getEntityIdentifier().getKey()); setGroupKeys(newGroupKeys); }
/** * Removes the key of the <code>IEntityGroup</code> from our <code>Set</code> of group keys * by copying the keys, updating the copy, and replacing the old keys with the copy. * This lets us confine synchronization to the getter and setter methods for the keys. * @param eg org.jasig.portal.groups.IEntityGroup *...
Removes the key of the <code>IEntityGroup</code> from our <code>Set</code> of group keys by copying the keys, updating the copy, and replacing the old keys with the copy. This lets us confine synchronization to the getter and setter methods for the keys
removeGroup
{ "repo_name": "drewwills/uPortal", "path": "uportal-war/src/main/java/org/jasig/portal/groups/GroupMemberImpl.java", "license": "apache-2.0", "size": 10381 }
[ "java.util.Set" ]
import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
453,482
public BaseAdapterHelper setTypeface(int viewId, Typeface typeface) { TextView view = retrieveView(viewId); view.setTypeface(typeface); view.setPaintFlags(view.getPaintFlags() | Paint.SUBPIXEL_TEXT_FLAG); return this; }
BaseAdapterHelper function(int viewId, Typeface typeface) { TextView view = retrieveView(viewId); view.setTypeface(typeface); view.setPaintFlags(view.getPaintFlags() Paint.SUBPIXEL_TEXT_FLAG); return this; }
/** * Apply the typeface to the given viewId, and enable subpixel rendering. */
Apply the typeface to the given viewId, and enable subpixel rendering
setTypeface
{ "repo_name": "hanhailong/base-adapter-helper-recyclerview", "path": "library/src/main/java/com/hhl/adapter/BaseAdapterHelper.java", "license": "apache-2.0", "size": 12118 }
[ "android.graphics.Paint", "android.graphics.Typeface", "android.widget.TextView" ]
import android.graphics.Paint; import android.graphics.Typeface; import android.widget.TextView;
import android.graphics.*; import android.widget.*;
[ "android.graphics", "android.widget" ]
android.graphics; android.widget;
1,765,247
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<AzureMonitorPrivateLinkScopeInner>> createOrUpdateWithResponseAsync( String resourceGroupName, String scopeName, AzureMonitorPrivateLinkScopeInner azureMonitorPrivateLinkScopePayload);
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<AzureMonitorPrivateLinkScopeInner>> createOrUpdateWithResponseAsync( String resourceGroupName, String scopeName, AzureMonitorPrivateLinkScopeInner azureMonitorPrivateLinkScopePayload);
/** * Creates (or updates) a Azure Monitor PrivateLinkScope. Note: You cannot specify a different value for * InstrumentationKey nor AppId in the Put operation. * * @param resourceGroupName The name of the resource group. * @param scopeName The name of the Azure Monitor PrivateLinkScope resourc...
Creates (or updates) a Azure Monitor PrivateLinkScope. Note: You cannot specify a different value for InstrumentationKey nor AppId in the Put operation
createOrUpdateWithResponseAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanagerhybrid/azure-resourcemanager-monitor/src/main/java/com/azure/resourcemanager/monitor/fluent/PrivateLinkScopesClient.java", "license": "mit", "size": 22062 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.resourcemanager.monitor.fluent.models.AzureMonitorPrivateLinkScopeInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.resourcemanager.monitor.fluent.models.AzureMonitorPrivateLinkScopeInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.monitor.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,922,984
public String getStatData() throws IOException { Jenkins j = Jenkins.getInstance(); JSONObject o = new JSONObject(); o.put("stat",1); o.put("install", j.getLegacyInstanceId()); o.put("servletContainer", j.servletContext.getServerInfo()); o.put("version", Jenkins.VERS...
String function() throws IOException { Jenkins j = Jenkins.getInstance(); JSONObject o = new JSONObject(); o.put("stat",1); o.put(STR, j.getLegacyInstanceId()); o.put(STR, j.servletContext.getServerInfo()); o.put(STR, Jenkins.VERSION); List<JSONObject> nodes = new ArrayList<JSONObject>(); for( Computer c : j.getCompute...
/** * Gets the encrypted usage stat data to be sent to the Hudson server. */
Gets the encrypted usage stat data to be sent to the Hudson server
getStatData
{ "repo_name": "escoem/jenkins", "path": "core/src/main/java/hudson/model/UsageStatistics.java", "license": "mit", "size": 11607 }
[ "com.jcraft.jzlib.GZIPOutputStream", "com.trilead.ssh2.crypto.Base64", "hudson.node_monitors.ArchitectureMonitor", "java.io.IOException", "java.io.OutputStream", "java.io.OutputStreamWriter", "java.security.GeneralSecurityException", "java.util.ArrayList", "java.util.List", "net.sf.json.JSONObject...
import com.jcraft.jzlib.GZIPOutputStream; import com.trilead.ssh2.crypto.Base64; import hudson.node_monitors.ArchitectureMonitor; import java.io.IOException; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.security.GeneralSecurityException; import java.util.ArrayList; import java.util.List; ...
import com.jcraft.jzlib.*; import com.trilead.ssh2.crypto.*; import hudson.node_monitors.*; import java.io.*; import java.security.*; import java.util.*; import net.sf.json.*; import org.apache.commons.io.output.*;
[ "com.jcraft.jzlib", "com.trilead.ssh2", "hudson.node_monitors", "java.io", "java.security", "java.util", "net.sf.json", "org.apache.commons" ]
com.jcraft.jzlib; com.trilead.ssh2; hudson.node_monitors; java.io; java.security; java.util; net.sf.json; org.apache.commons;
1,775,647
List<E> getAll(boolean includeRetired, PagingInfo paging);
List<E> getAll(boolean includeRetired, PagingInfo paging);
/** * Returns all metadata records that have the specified retirement status and paging. * @param includeRetired {@code true} to include retired metadata. * @param paging The paging information. * @return All the metadata records that have the specified retirement status. * @should return all metadata wh...
Returns all metadata records that have the specified retirement status and paging
getAll
{ "repo_name": "k-joseph/openmrs-module-openhmis.commons", "path": "api/src/main/java/org/openmrs/module/openhmis/commons/api/entity/IMetadataDataService.java", "license": "mpl-2.0", "size": 5195 }
[ "java.util.List", "org.openmrs.module.openhmis.commons.api.PagingInfo" ]
import java.util.List; import org.openmrs.module.openhmis.commons.api.PagingInfo;
import java.util.*; import org.openmrs.module.openhmis.commons.api.*;
[ "java.util", "org.openmrs.module" ]
java.util; org.openmrs.module;
279,701
protected SnmpCachedData updateCachedDatas(Object userData) { // We are getting all the input args final String[] args = JvmRuntimeImpl.getInputArguments(userData); // Time stamp for the cache final long time = System.currentTimeMillis(); SnmpOid in...
SnmpCachedData function(Object userData) { final String[] args = JvmRuntimeImpl.getInputArguments(userData); final long time = System.currentTimeMillis(); SnmpOid indexes[] = new SnmpOid[args.length]; for(int i = 0; i < args.length; i++) { indexes[i] = new SnmpOid(i + 1); } return new SnmpCachedData(time, indexes, args...
/** * Return a table handler containing the Thread indexes. * Indexes are computed from the ThreadId. **/
Return a table handler containing the Thread indexes. Indexes are computed from the ThreadId
updateCachedDatas
{ "repo_name": "TheTypoMaster/Scaper", "path": "openjdk/jdk/src/share/classes/sun/management/snmp/jvminstr/JvmRTInputArgsTableMetaImpl.java", "license": "gpl-2.0", "size": 10228 }
[ "com.sun.jmx.snmp.SnmpOid", "com.sun.jmx.snmp.agent.SnmpMib", "com.sun.jmx.snmp.agent.SnmpStandardObjectServer" ]
import com.sun.jmx.snmp.SnmpOid; import com.sun.jmx.snmp.agent.SnmpMib; import com.sun.jmx.snmp.agent.SnmpStandardObjectServer;
import com.sun.jmx.snmp.*; import com.sun.jmx.snmp.agent.*;
[ "com.sun.jmx" ]
com.sun.jmx;
610,576
public void start() throws CameraAccessException, IOException, IllegalAccessException { if (mTryOpenCamera) { mCamera = openCamera(); mCameraOwner = new GVRCameraSceneObject(getGVRContext(), mWidth / 2, mHeight / 2, mCamera); mCameraOwner.getTransform().setPos...
void function() throws CameraAccessException, IOException, IllegalAccessException { if (mTryOpenCamera) { mCamera = openCamera(); mCameraOwner = new GVRCameraSceneObject(getGVRContext(), mWidth / 2, mHeight / 2, mCamera); mCameraOwner.getTransform().setPositionZ(-200.0f); mTryOpenCamera = false; } if (isEnabled() && (m...
/** * Start body tracking from camera. * <p> * This function opens the camera and begins capturing camera previews. * It will throw exceptions if the camera cannot be accessed. * @throws CameraAccessException * @throws IOException * @throws IllegalAccessException */
Start body tracking from camera. This function opens the camera and begins capturing camera previews. It will throw exceptions if the camera cannot be accessed
start
{ "repo_name": "Samsung/GearVRf", "path": "GVRf/Framework/framework/src/main/java/org/gearvrf/animation/GVRBodyTracker.java", "license": "apache-2.0", "size": 10856 }
[ "android.hardware.camera2.CameraAccessException", "java.io.IOException", "org.gearvrf.scene_objects.GVRCameraSceneObject" ]
import android.hardware.camera2.CameraAccessException; import java.io.IOException; import org.gearvrf.scene_objects.GVRCameraSceneObject;
import android.hardware.camera2.*; import java.io.*; import org.gearvrf.scene_objects.*;
[ "android.hardware", "java.io", "org.gearvrf.scene_objects" ]
android.hardware; java.io; org.gearvrf.scene_objects;
1,452,834
@Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String test = request.getParameter("testMethod"); String fileName = request.getParameter("fileName"); PrintWriter out = response.getWriter(); try { ...
void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String test = request.getParameter(STR); String fileName = request.getParameter(STR); PrintWriter out = response.getWriter(); try { out.println(getClass().getSimpleName() + STR + test + "<br>"); System.out.pri...
/** * Invokes test name found in "test" parameter passed to servlet. */
Invokes test name found in "test" parameter passed to servlet
doGet
{ "repo_name": "kgibm/open-liberty", "path": "dev/com.ibm.ws.concurrent.persistent_fat/test-applications/schedtest/src/web/SchedulerFATServlet.java", "license": "epl-1.0", "size": 196518 }
[ "java.io.IOException", "java.io.PrintWriter", "java.lang.reflect.InvocationTargetException", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import java.io.IOException; import java.io.PrintWriter; import java.lang.reflect.InvocationTargetException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import java.io.*; import java.lang.reflect.*; import javax.servlet.*; import javax.servlet.http.*;
[ "java.io", "java.lang", "javax.servlet" ]
java.io; java.lang; javax.servlet;
2,398,476
@ServiceMethod(returns = ReturnType.SINGLE) private Mono<Response<VirtualNetworkGatewayConnectionInner>> getByResourceGroupWithResponseAsync( String resourceGroupName, String virtualNetworkGatewayConnectionName, Context context) { if (this.client.getEndpoint() == null) { return Mono ...
@ServiceMethod(returns = ReturnType.SINGLE) Mono<Response<VirtualNetworkGatewayConnectionInner>> function( String resourceGroupName, String virtualNetworkGatewayConnectionName, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (resourceGroupName ==...
/** * Gets the specified virtual network gateway connection by resource group. * * @param resourceGroupName The name of the resource group. * @param virtualNetworkGatewayConnectionName The name of the virtual network gateway connection. * @param context The context to associate with this operat...
Gets the specified virtual network gateway connection by resource group
getByResourceGroupWithResponseAsync
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/VirtualNetworkGatewayConnectionsClientImpl.java", "license": "mit", "size": 187423 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.Context", "com.azure.resourcemanager.network.fluent.models.VirtualNetworkGatewayConnectionInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.Response; import com.azure.core.util.Context; import com.azure.resourcemanager.network.fluent.models.VirtualNetworkGatewayConnectionInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.network.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,590,305
public void fillToStream( JasperReport jasperReport, OutputStream outputStream, Map<String,Object> parameters ) throws JRException { JasperPrint jasperPrint = fill(jasperReport, parameters); JRSaver.saveObject(jasperPrint, outputStream); }
void function( JasperReport jasperReport, OutputStream outputStream, Map<String,Object> parameters ) throws JRException { JasperPrint jasperPrint = fill(jasperReport, parameters); JRSaver.saveObject(jasperPrint, outputStream); }
/** * Fills the compiled report design supplied as the first parameter and writes * the generated report object to the output stream specified by the second parameter. * * @param jasperReport compiled report design object to use for filling * @param outputStream output stream to write the generated report ob...
Fills the compiled report design supplied as the first parameter and writes the generated report object to the output stream specified by the second parameter
fillToStream
{ "repo_name": "sikachu/jasperreports", "path": "src/net/sf/jasperreports/engine/JasperFillManager.java", "license": "lgpl-3.0", "size": 30087 }
[ "java.io.OutputStream", "java.util.Map", "net.sf.jasperreports.engine.util.JRSaver" ]
import java.io.OutputStream; import java.util.Map; import net.sf.jasperreports.engine.util.JRSaver;
import java.io.*; import java.util.*; import net.sf.jasperreports.engine.util.*;
[ "java.io", "java.util", "net.sf.jasperreports" ]
java.io; java.util; net.sf.jasperreports;
92,640
public LegalHoldProperties withTags(List<TagProperty> tags) { this.tags = tags; return this; }
LegalHoldProperties function(List<TagProperty> tags) { this.tags = tags; return this; }
/** * Set the tags value. * * @param tags the tags value to set * @return the LegalHoldProperties object itself. */
Set the tags value
withTags
{ "repo_name": "hovsepm/azure-sdk-for-java", "path": "storage/resource-manager/v2018_02_01/src/main/java/com/microsoft/azure/management/storage/v2018_02_01/LegalHoldProperties.java", "license": "mit", "size": 1654 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
407,272
public static void fadeOut(final View view) { fadeOut(view, null); }
static void function(final View view) { fadeOut(view, null); }
/** * Fades out a view. * @param view The currently visible view to be faded out */
Fades out a view
fadeOut
{ "repo_name": "anirudh24seven/apps-android-wikipedia", "path": "app/src/main/java/org/wikipedia/ViewAnimations.java", "license": "apache-2.0", "size": 4793 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
1,172,934
ServiceFuture<Void> deleteAsync(String resourceGroupName, String accountName, String storageAccountName, final ServiceCallback<Void> serviceCallback);
ServiceFuture<Void> deleteAsync(String resourceGroupName, String accountName, String storageAccountName, final ServiceCallback<Void> serviceCallback);
/** * Updates the specified Data Lake Analytics account to remove an Azure Storage account. * * @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account. * @param accountName The name of the Data Lake Analytics account from which to remove the Azure...
Updates the specified Data Lake Analytics account to remove an Azure Storage account
deleteAsync
{ "repo_name": "martinsawicki/azure-sdk-for-java", "path": "azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/StorageAccounts.java", "license": "mit", "size": 47488 }
[ "com.microsoft.rest.ServiceCallback", "com.microsoft.rest.ServiceFuture" ]
import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
2,006,602
private void updateTypeAnswerInfo() { mTypeCorrect = null; String q = mCurrentCard.q(false); Matcher m = sTypeAnsPat.matcher(q); int clozeIdx = 0; if (!m.find()) { return; } String fld = m.group(1); // if it's a cloze, extract data ...
void function() { mTypeCorrect = null; String q = mCurrentCard.q(false); Matcher m = sTypeAnsPat.matcher(q); int clozeIdx = 0; if (!m.find()) { return; } String fld = m.group(1); if (fld.startsWith(STR, 0)) { clozeIdx = mCurrentCard.getOrd() + 1; fld = fld.split(":")[1]; } try { JSONArray ja = mCurrentCard.model().getJ...
/** * Extract type answer/cloze text and font/size */
Extract type answer/cloze text and font/size
updateTypeAnswerInfo
{ "repo_name": "EldonMcGuinness/Anki-Android", "path": "src/com/ichi2/anki/AbstractFlashcardViewer.java", "license": "gpl-3.0", "size": 121788 }
[ "java.util.regex.Matcher", "org.json.JSONArray", "org.json.JSONException" ]
import java.util.regex.Matcher; import org.json.JSONArray; import org.json.JSONException;
import java.util.regex.*; import org.json.*;
[ "java.util", "org.json" ]
java.util; org.json;
1,797,533
@Nullable public static IURLProtocol getProtocol (@Nullable final String sURL) { if (sURL != null) { s_aRWLock.readLock ().lock (); try { for (final IURLProtocol aProtocol : s_aProtocols.values ()) if (aProtocol.isUsedInURL (sURL)) return aProtocol; } ...
static IURLProtocol function (@Nullable final String sURL) { if (sURL != null) { s_aRWLock.readLock ().lock (); try { for (final IURLProtocol aProtocol : s_aProtocols.values ()) if (aProtocol.isUsedInURL (sURL)) return aProtocol; } finally { s_aRWLock.readLock ().unlock (); } } return null; }
/** * Try to evaluate the matching URL protocol from the passed URL * * @param sURL * The URL to get the protocol from * @return The corresponding URL protocol or <code>null</code> if unresolved */
Try to evaluate the matching URL protocol from the passed URL
getProtocol
{ "repo_name": "lsimons/phloc-schematron-standalone", "path": "phloc-commons/src/main/java/com/phloc/commons/url/URLProtocolRegistry.java", "license": "apache-2.0", "size": 6277 }
[ "javax.annotation.Nullable" ]
import javax.annotation.Nullable;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
586,258
protected ChannelBuffer sendImpl(final SendablePacket packet) { final ChannelBuffer buffer = getBuffer(); packet.setByteBuffer(buffer); packet.setOpCode(this.packetService.getServerPacketopCode(packet)); packet.write(); return packet.getByteBuffer(); }
ChannelBuffer function(final SendablePacket packet) { final ChannelBuffer buffer = getBuffer(); packet.setByteBuffer(buffer); packet.setOpCode(this.packetService.getServerPacketopCode(packet)); packet.write(); return packet.getByteBuffer(); }
/** * Send impl. * * @param packet * the packet * @return the channel buffer */
Send impl
sendImpl
{ "repo_name": "Furt/JMaNGOS", "path": "Commons/src/main/java/org/jmangos/commons/network/sender/NettyPacketSender.java", "license": "gpl-2.0", "size": 4263 }
[ "org.jboss.netty.buffer.ChannelBuffer", "org.jmangos.commons.network.model.SendablePacket" ]
import org.jboss.netty.buffer.ChannelBuffer; import org.jmangos.commons.network.model.SendablePacket;
import org.jboss.netty.buffer.*; import org.jmangos.commons.network.model.*;
[ "org.jboss.netty", "org.jmangos.commons" ]
org.jboss.netty; org.jmangos.commons;
895,260
public Date getDate(int row) throws DataTypeException { if ( canGetDate() ) { return (Date)get(row); } else { throw new DataTypeException(Date.class); } }
Date function(int row) throws DataTypeException { if ( canGetDate() ) { return (Date)get(row); } else { throw new DataTypeException(Date.class); } }
/** * Get the data value at the specified row as a Date * @param row the row from which to retrieve the value * @return the data value as a Date * @throws DataTypeException if this column does not * support the Date type */
Get the data value at the specified row as a Date
getDate
{ "repo_name": "giacomovagni/Prefuse", "path": "src/prefuse/data/column/AbstractColumn.java", "license": "bsd-3-clause", "size": 21964 }
[ "java.util.Date" ]
import java.util.Date;
import java.util.*;
[ "java.util" ]
java.util;
1,156,870
@SuppressWarnings("unchecked") public static void _init(Page page, ClientRequest request, Synchronizer synchronizer) { page.synchronizer = synchronizer; page.session = request.getSession(); page.browserInfo.putAll((Map<String, Object>) request.getData()); page._attach(page); ...
@SuppressWarnings(STR) static void function(Page page, ClientRequest request, Synchronizer synchronizer) { page.synchronizer = synchronizer; page.session = request.getSession(); page.browserInfo.putAll((Map<String, Object>) request.getData()); page._attach(page); } public Page() { src = null; } private Page(String src)...
/** * Performs final initialization of a newly created page. For internal use only. * * @param page The page to initialize. * @param request The initialization request from the client. * @param synchronizer The synchronizer that the page will use. */
Performs final initialization of a newly created page. For internal use only
_init
{ "repo_name": "fujion/fujion-framework", "path": "fujion-core/src/main/java/org/fujion/component/Page.java", "license": "apache-2.0", "size": 13157 }
[ "java.util.Map", "org.fujion.client.ClientRequest", "org.fujion.client.Synchronizer", "org.fujion.page.PageRegistry" ]
import java.util.Map; import org.fujion.client.ClientRequest; import org.fujion.client.Synchronizer; import org.fujion.page.PageRegistry;
import java.util.*; import org.fujion.client.*; import org.fujion.page.*;
[ "java.util", "org.fujion.client", "org.fujion.page" ]
java.util; org.fujion.client; org.fujion.page;
1,473,344
public Link getLink() { return link; }
Link function() { return link; }
/** * Gets the link. * * @return the link */
Gets the link
getLink
{ "repo_name": "marosmars/dhcp", "path": "Jagornet-DHCP/src/com/jagornet/dhcp/server/config/DhcpLink.java", "license": "gpl-3.0", "size": 5000 }
[ "com.jagornet.dhcp.xml.Link" ]
import com.jagornet.dhcp.xml.Link;
import com.jagornet.dhcp.xml.*;
[ "com.jagornet.dhcp" ]
com.jagornet.dhcp;
2,482,794
public DeploymentInfo addOuterHandlerChainWrapper(final HandlerWrapper wrapper) { outerHandlerChainWrappers.add(wrapper); return this; }
DeploymentInfo function(final HandlerWrapper wrapper) { outerHandlerChainWrappers.add(wrapper); return this; }
/** * Adds an outer handler wrapper. This handler will be run after the servlet initial handler, * but before any other handlers. These are only run on REQUEST invocations, they * are not invoked on a FORWARD or INCLUDE. * * @param wrapper The wrapper */
Adds an outer handler wrapper. This handler will be run after the servlet initial handler, but before any other handlers. These are only run on REQUEST invocations, they are not invoked on a FORWARD or INCLUDE
addOuterHandlerChainWrapper
{ "repo_name": "jasonchaffee/undertow", "path": "servlet/src/main/java/io/undertow/servlet/api/DeploymentInfo.java", "license": "apache-2.0", "size": 47709 }
[ "io.undertow.server.HandlerWrapper" ]
import io.undertow.server.HandlerWrapper;
import io.undertow.server.*;
[ "io.undertow.server" ]
io.undertow.server;
2,872,722
return Resources.toByteArray(BinaryFixtureHelpers.class.getResource(filename)); }
return Resources.toByteArray(BinaryFixtureHelpers.class.getResource(filename)); }
/** * Reads the given fixture file from {@code src/test/resources} and returns its contents as a * byte array. * * @param filename the filename of the fixture file * * @return the contents of {@code src/test/resources/{filename}} * * @throws java.io.IOException if {@code filename} doesn't exist ...
Reads the given fixture file from src/test/resources and returns its contents as a byte array
fixture
{ "repo_name": "bitcoin-solutions/error-reporting-service", "path": "error-reporting-rest/src/test/java/org/multibit/hd/error_reporting/testing/BinaryFixtureHelpers.java", "license": "mit", "size": 874 }
[ "com.google.common.io.Resources" ]
import com.google.common.io.Resources;
import com.google.common.io.*;
[ "com.google.common" ]
com.google.common;
2,448,090