method
stringlengths
13
441k
clean_method
stringlengths
7
313k
doc
stringlengths
17
17.3k
comment
stringlengths
3
1.42k
method_name
stringlengths
1
273
extra
dict
imports
list
imports_info
stringlengths
19
34.8k
cluster_imports_info
stringlengths
15
3.66k
libraries
list
libraries_info
stringlengths
6
661
id
int64
0
2.92M
public void setDocumentBuilder(DocumentBuilder builder);
void function(DocumentBuilder builder);
/** * Sets the Document Builder factory */
Sets the Document Builder factory
setDocumentBuilder
{ "repo_name": "boneman1231/org.apache.felix", "path": "trunk/mosgi/jmx.httpconnector/src/main/java/org/apache/felix/mosgi/jmx/httpconnector/mx4j/tools/adaptor/http/HttpCommandProcessor.java", "license": "apache-2.0", "size": 1763 }
[ "javax.xml.parsers.DocumentBuilder" ]
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.*;
[ "javax.xml" ]
javax.xml;
1,349,834
protected static void checkMandatoryModulesStarted() throws ModuleException { List<String> mandatoryModuleIds = getMandatoryModules(); Set<String> startedModuleIds = ModuleFactory.getStartedModulesMap().keySet(); mandatoryModuleIds.removeAll(startedModuleIds); // any module ids left in the list are ...
static void function() throws ModuleException { List<String> mandatoryModuleIds = getMandatoryModules(); Set<String> startedModuleIds = ModuleFactory.getStartedModulesMap().keySet(); mandatoryModuleIds.removeAll(startedModuleIds); if (mandatoryModuleIds.size() > 0) { throw new MandatoryModuleException(mandatoryModuleId...
/** * Looks at the &lt;moduleid&gt;.mandatory properties and at the currently started modules to make * sure that all mandatory modules have been started successfully. * * @throws ModuleException if a mandatory module isn't started * @should throw ModuleException if a mandatory module is not started */
Looks at the &lt;moduleid&gt;.mandatory properties and at the currently started modules to make sure that all mandatory modules have been started successfully
checkMandatoryModulesStarted
{ "repo_name": "kabariyamilind/openMRSDEV", "path": "api/src/main/java/org/openmrs/module/ModuleUtil.java", "license": "mpl-2.0", "size": 41586 }
[ "java.util.List", "java.util.Set" ]
import java.util.List; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
1,589,980
public SearchResultList findTranslationsForQuery(String terminology, String version, String query, PfsParameter pfs) throws Exception;
SearchResultList function(String terminology, String version, String query, PfsParameter pfs) throws Exception;
/** * Find translations for query. * * @param terminology the terminology * @param version the version * @param query the query * @param pfs the pfs * @return the search result list * @throws Exception the exception */
Find translations for query
findTranslationsForQuery
{ "repo_name": "WestCoastInformatics/ihtsdo-refset-tool", "path": "services/src/main/java/org/ihtsdo/otf/refset/services/ProjectService.java", "license": "apache-2.0", "size": 10024 }
[ "org.ihtsdo.otf.refset.helpers.PfsParameter", "org.ihtsdo.otf.refset.helpers.SearchResultList" ]
import org.ihtsdo.otf.refset.helpers.PfsParameter; import org.ihtsdo.otf.refset.helpers.SearchResultList;
import org.ihtsdo.otf.refset.helpers.*;
[ "org.ihtsdo.otf" ]
org.ihtsdo.otf;
1,219,276
@Test public void testRejectedThreadWithNoFallback() { TestCircuitBreaker circuitBreaker = new TestCircuitBreaker(); SingleThreadedPoolWithQueue pool = new SingleThreadedPoolWithQueue(1); // fill up the queue pool.queue.add(new Runnable() {
void function() { TestCircuitBreaker circuitBreaker = new TestCircuitBreaker(); SingleThreadedPoolWithQueue pool = new SingleThreadedPoolWithQueue(1); pool.queue.add(new Runnable() {
/** * Test when a command fails to get queued up in the threadpool where the command didn't implement getFallback. * <p> * We specifically want to protect against developers getting random thread exceptions and instead just correctly receiving HystrixRuntimeException when no fallback exists. */
Test when a command fails to get queued up in the threadpool where the command didn't implement getFallback. We specifically want to protect against developers getting random thread exceptions and instead just correctly receiving HystrixRuntimeException when no fallback exists
testRejectedThreadWithNoFallback
{ "repo_name": "manwithharmonica/Hystrix", "path": "hystrix-core/src/test/java/com/netflix/hystrix/HystrixCommandTest.java", "license": "apache-2.0", "size": 265467 }
[ "com.netflix.hystrix.HystrixCircuitBreakerTest" ]
import com.netflix.hystrix.HystrixCircuitBreakerTest;
import com.netflix.hystrix.*;
[ "com.netflix.hystrix" ]
com.netflix.hystrix;
920,193
public ModelAndView handleHelpKKDKnutepunktReportPage01(HttpServletRequest request, HttpServletResponse response) throws ServletException { String viewName = "kkdKnutepunktHelpScreenPage01View"; return new ModelAndView(viewName); }
ModelAndView function(HttpServletRequest request, HttpServletResponse response) throws ServletException { String viewName = STR; return new ModelAndView(viewName); }
/** * Custom handler handleHelpKKDKnutepunktReportPage01. * * @param request current HTTP request * @param response current HTTP response * @return a ModelAndView to render the response */
Custom handler handleHelpKKDKnutepunktReportPage01
handleHelpKKDKnutepunktReportPage01
{ "repo_name": "NationalLibraryOfNorway/Bibliotekstatistikk", "path": "abmstatistikk-main/src/main/java/no/abmu/abmstatistikk/web/ABMStatistikkHelpController.java", "license": "gpl-2.0", "size": 61831 }
[ "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse", "org.springframework.web.servlet.ModelAndView" ]
import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.web.servlet.ModelAndView;
import javax.servlet.*; import javax.servlet.http.*; import org.springframework.web.servlet.*;
[ "javax.servlet", "org.springframework.web" ]
javax.servlet; org.springframework.web;
2,867,019
public static Order defaultTaskOrder() { return Order.asc(Functions.caseStatement(Task.DUE_DATE.eq(0), Functions.now() + "*2", adjustedDueDateFunction()) + " + " + (2 * DateUtilities.ONE_DAY) + " * " + Task.IMPORTANCE + " + 2*" + Task.COMPLETION_DATE); }
static Order function() { return Order.asc(Functions.caseStatement(Task.DUE_DATE.eq(0), Functions.now() + "*2", adjustedDueDateFunction()) + STR + (2 * DateUtilities.ONE_DAY) + STR + Task.IMPORTANCE + STR + Task.COMPLETION_DATE); }
/** * Returns SQL task ordering that is astrid's default algorithm */
Returns SQL task ordering that is astrid's default algorithm
defaultTaskOrder
{ "repo_name": "cinash/tasks", "path": "api/src/main/java/com/todoroo/astrid/core/SortHelper.java", "license": "gpl-3.0", "size": 5125 }
[ "com.todoroo.andlib.sql.Functions", "com.todoroo.andlib.sql.Order", "com.todoroo.andlib.utility.DateUtilities", "com.todoroo.astrid.data.Task" ]
import com.todoroo.andlib.sql.Functions; import com.todoroo.andlib.sql.Order; import com.todoroo.andlib.utility.DateUtilities; import com.todoroo.astrid.data.Task;
import com.todoroo.andlib.sql.*; import com.todoroo.andlib.utility.*; import com.todoroo.astrid.data.*;
[ "com.todoroo.andlib", "com.todoroo.astrid" ]
com.todoroo.andlib; com.todoroo.astrid;
1,924,250
@Test public void steamIdBySteamId64() throws Exception { when(parser.parse("http://steamcommunity.com/profiles/76561197985077150?xml=1")) .thenReturn(loadXml("gutomaia.xml")); SteamId steamId = SteamId.create(76561197985077150l, true, true); verify(factory).newDocumentBuilder(); verify(parser).parse...
void function() throws Exception { when(parser.parse(STRgutomaia.xmlSTRhttp: assertEquals(76561197985077150l, steamId.getSteamId64()); assertEquals(STR, steamId.getNickname()); assertEquals(STR, steamId.getCustomUrl()); assertEquals( STRhttp: steamId.getAvatarIconUrl()); assertEquals( STRSalvador, Bahia, Brazil", steam...
/** * This test tries to aquire information from a online Steam ID. This test * only passes if the parsing of the XML document works */
This test tries to aquire information from a online Steam ID. This test only passes if the parsing of the XML document works
steamIdBySteamId64
{ "repo_name": "gutomaia/steam-condenser-java", "path": "src/test/java/com/github/koraktor/steamcondenser/steam/community/SteamCommunityTest.java", "license": "bsd-3-clause", "size": 7220 }
[ "org.junit.Assert", "org.mockito.Mockito" ]
import org.junit.Assert; import org.mockito.Mockito;
import org.junit.*; import org.mockito.*;
[ "org.junit", "org.mockito" ]
org.junit; org.mockito;
2,118,874
public IndexRequest source(byte[] source, int offset, int length, XContentType xContentType) { return source(new BytesArray(source, offset, length), xContentType); }
IndexRequest function(byte[] source, int offset, int length, XContentType xContentType) { return source(new BytesArray(source, offset, length), xContentType); }
/** * Sets the document to index in bytes form (assumed to be safe to be used from different * threads). * * @param source The source to index * @param offset The offset in the byte array * @param length The length of the data */
Sets the document to index in bytes form (assumed to be safe to be used from different threads)
source
{ "repo_name": "strapdata/elassandra5-rc", "path": "core/src/main/java/org/elasticsearch/action/index/IndexRequest.java", "license": "apache-2.0", "size": 25743 }
[ "org.elasticsearch.common.bytes.BytesArray", "org.elasticsearch.common.xcontent.XContentType" ]
import org.elasticsearch.common.bytes.BytesArray; import org.elasticsearch.common.xcontent.XContentType;
import org.elasticsearch.common.bytes.*; import org.elasticsearch.common.xcontent.*;
[ "org.elasticsearch.common" ]
org.elasticsearch.common;
1,111,501
default FtpsEndpointConsumerBuilder sorter(Comparator<Object> sorter) { setProperty("sorter", sorter); return this; }
default FtpsEndpointConsumerBuilder sorter(Comparator<Object> sorter) { setProperty(STR, sorter); return this; }
/** * Pluggable sorter as a java.util.Comparator class. * * The option is a: * <code>java.util.Comparator&lt;org.apache.camel.component.file.GenericFile&lt;org.apache.commons.net.ftp.FTPFile&gt;&gt;</code> type. * * Group: sort */
Pluggable sorter as a java.util.Comparator class. The option is a: <code>java.util.Comparator&lt;org.apache.camel.component.file.GenericFile&lt;org.apache.commons.net.ftp.FTPFile&gt;&gt;</code> type. Group: sort
sorter
{ "repo_name": "Fabryprog/camel", "path": "core/camel-endpointdsl/src/main/java/org/apache/camel/builder/endpoint/dsl/FtpsEndpointBuilderFactory.java", "license": "apache-2.0", "size": 228885 }
[ "java.util.Comparator" ]
import java.util.Comparator;
import java.util.*;
[ "java.util" ]
java.util;
1,655,478
static void generatePolicyFile(OutputStream policyOutStream, List<String> localDirs, List<String> groupPolicyPaths, Map<org.apache.hadoop.fs.Path, List<String>> resources, Configuration conf) throws IOException { String policyFilePath = conf.get(YarnConfiguration.YAR...
static void generatePolicyFile(OutputStream policyOutStream, List<String> localDirs, List<String> groupPolicyPaths, Map<org.apache.hadoop.fs.Path, List<String>> resources, Configuration conf) throws IOException { String policyFilePath = conf.get(YarnConfiguration.YARN_CONTAINER_SANDBOX_POLICY); String filePermissions =...
/** * Write new policy file to policyOutStream which will include read access * to localize resources. Optionally a default policyFilePath can be * specified to append a custom policy implementation to the new policy file * @param policyOutStream OutputStream pointing to java.policy file * @pa...
Write new policy file to policyOutStream which will include read access to localize resources. Optionally a default policyFilePath can be specified to append a custom policy implementation to the new policy file
generatePolicyFile
{ "repo_name": "xiao-chen/hadoop", "path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/linux/runtime/JavaSandboxLinuxContainerRuntime.java", "license": "apache-2.0", "size": 22553 }
[ "java.io.IOException", "java.io.OutputStream", "java.nio.charset.StandardCharsets", "java.nio.file.Files", "java.nio.file.Path", "java.nio.file.Paths", "java.util.Formatter", "java.util.HashSet", "java.util.List", "java.util.Map", "java.util.Set", "org.apache.hadoop.conf.Configuration", "org...
import java.io.IOException; import java.io.OutputStream; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.Formatter; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; import org.apache...
import java.io.*; import java.nio.charset.*; import java.nio.file.*; import java.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.io.*; import org.apache.hadoop.yarn.conf.*;
[ "java.io", "java.nio", "java.util", "org.apache.hadoop" ]
java.io; java.nio; java.util; org.apache.hadoop;
2,572,166
@Nullable public BytesReference readOptionalBytesReference() throws IOException { int length = readVInt() - 1; if (length < 0) { return null; } return readBytesReference(length); }
BytesReference function() throws IOException { int length = readVInt() - 1; if (length < 0) { return null; } return readBytesReference(length); }
/** * Reads an optional bytes reference from this stream. It might hold an actual reference to the underlying bytes of the stream. Use this * only if you must differentiate null from empty. Use {@link StreamInput#readBytesReference()} and * {@link StreamOutput#writeBytesReference(BytesReference)} if you ...
Reads an optional bytes reference from this stream. It might hold an actual reference to the underlying bytes of the stream. Use this only if you must differentiate null from empty. Use <code>StreamInput#readBytesReference()</code> and <code>StreamOutput#writeBytesReference(BytesReference)</code> if you do not
readOptionalBytesReference
{ "repo_name": "crate/crate", "path": "server/src/main/java/org/elasticsearch/common/io/stream/StreamInput.java", "license": "apache-2.0", "size": 44326 }
[ "java.io.IOException", "org.elasticsearch.common.bytes.BytesReference" ]
import java.io.IOException; import org.elasticsearch.common.bytes.BytesReference;
import java.io.*; import org.elasticsearch.common.bytes.*;
[ "java.io", "org.elasticsearch.common" ]
java.io; org.elasticsearch.common;
2,627,637
@WebMethod @Path("/disallowAllFunctionsForRole") @Produces("text/plain") @GET public String disallowAllFunctionsForRole( @WebParam(name = "sessionid", partName = "sessionid") @QueryParam("sessionid") String sessionid, @WebParam(name = "authzgroupid", partName = "authzgroupid"...
@Path(STR) @Produces(STR) String function( @WebParam(name = STR, partName = STR) @QueryParam(STR) String sessionid, @WebParam(name = STR, partName = STR) @QueryParam(STR) String authzgroupid, @WebParam(name = STR, partName = STR) @QueryParam(STR) String roleid) { Session session = establishSession(sessionid); try { Aut...
/** * Remove all functions from a role in an authzgroup (realm) * * @param sessionid the id of a valid session * @param authzgroupid the id of the authzgroup that the role is in * @param roleid the id of the role to remove the functions from * @return success or exception message ...
Remove all functions from a role in an authzgroup (realm)
disallowAllFunctionsForRole
{ "repo_name": "rodriguezdevera/sakai", "path": "webservices/cxf/src/java/org/sakaiproject/webservices/SakaiScript.java", "license": "apache-2.0", "size": 213282 }
[ "javax.jws.WebParam", "javax.ws.rs.Path", "javax.ws.rs.Produces", "javax.ws.rs.QueryParam", "org.sakaiproject.authz.api.AuthzGroup", "org.sakaiproject.authz.api.Role", "org.sakaiproject.tool.api.Session" ]
import javax.jws.WebParam; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import org.sakaiproject.authz.api.AuthzGroup; import org.sakaiproject.authz.api.Role; import org.sakaiproject.tool.api.Session;
import javax.jws.*; import javax.ws.rs.*; import org.sakaiproject.authz.api.*; import org.sakaiproject.tool.api.*;
[ "javax.jws", "javax.ws", "org.sakaiproject.authz", "org.sakaiproject.tool" ]
javax.jws; javax.ws; org.sakaiproject.authz; org.sakaiproject.tool;
2,016,022
private void addSuperColumns(String family, CassandraQuery<K, T> cassandraQuery, CassandraResultSet<K> cassandraResultSet) { List<SuperRow<K, String, ByteBuffer, ByteBuffer>> superRows = this.cassandraClient.executeSuper(cassandraQuery, family); for (SuperRow<K, String, ByteBuffer, ByteBuffer> superRo...
void function(String family, CassandraQuery<K, T> cassandraQuery, CassandraResultSet<K> cassandraResultSet) { List<SuperRow<K, String, ByteBuffer, ByteBuffer>> superRows = this.cassandraClient.executeSuper(cassandraQuery, family); for (SuperRow<K, String, ByteBuffer, ByteBuffer> superRow: superRows) { K key = superRow....
/** * When we add supercolumns, Gora keys are mapped to Cassandra partition keys only. * This is because we follow the Cassandra logic where column family data is * partitioned across nodes based on row Key. */
When we add supercolumns, Gora keys are mapped to Cassandra partition keys only. This is because we follow the Cassandra logic where column family data is partitioned across nodes based on row Key
addSuperColumns
{ "repo_name": "SwathiMystery/gora", "path": "gora-cassandra/src/main/java/org/apache/gora/cassandra/store/CassandraStore.java", "license": "apache-2.0", "size": 26492 }
[ "java.nio.ByteBuffer", "java.util.LinkedHashMap", "java.util.List", "me.prettyprint.hector.api.beans.HSuperColumn", "me.prettyprint.hector.api.beans.SuperRow", "me.prettyprint.hector.api.beans.SuperSlice", "org.apache.gora.cassandra.query.CassandraQuery", "org.apache.gora.cassandra.query.CassandraResu...
import java.nio.ByteBuffer; import java.util.LinkedHashMap; import java.util.List; import me.prettyprint.hector.api.beans.HSuperColumn; import me.prettyprint.hector.api.beans.SuperRow; import me.prettyprint.hector.api.beans.SuperSlice; import org.apache.gora.cassandra.query.CassandraQuery; import org.apache.gora.cassan...
import java.nio.*; import java.util.*; import me.prettyprint.hector.api.beans.*; import org.apache.gora.cassandra.query.*; import org.apache.gora.persistency.impl.*;
[ "java.nio", "java.util", "me.prettyprint.hector", "org.apache.gora" ]
java.nio; java.util; me.prettyprint.hector; org.apache.gora;
438,255
protected void setDaylight(Vector daylights) { }
protected void setDaylight(Vector daylights) { }
/** * Methods which should be implemented by a subclass in order to store * additional data, not supported by JSR75. */
Methods which should be implemented by a subclass in order to store additional data, not supported by JSR75
setTZ
{ "repo_name": "zhangdakun/funasyn", "path": "externals/java-sdk/pim/src/main/java-me/com/funambol/common/pim/xvcalendar/XVCalendarParserListener.java", "license": "agpl-3.0", "size": 12213 }
[ "java.util.Vector" ]
import java.util.Vector;
import java.util.*;
[ "java.util" ]
java.util;
312,136
void internalSend(MqttWireMessage message, MqttToken token) throws MqttException { final String methodName = "internalSend"; //@TRACE 200=internalSend key={0} message={1} token={2} log.fine(className, methodName, "200", new Object[]{message.getKey(), message, token}); if (token.getClient() == null ) { //...
void internalSend(MqttWireMessage message, MqttToken token) throws MqttException { final String methodName = STR; log.fine(className, methodName, "200", new Object[]{message.getKey(), message, token}); if (token.getClient() == null ) { token.internalTok.setClient(getClient()); } else { log.fine(className, methodName, "...
/** * Sends a message to the server. Does not check if connected this validation must be done * by invoking routines. * @param message * @param token * @throws MqttException */
Sends a message to the server. Does not check if connected this validation must be done by invoking routines
internalSend
{ "repo_name": "tuckervento/usTwo", "path": "MQTT/org.eclipse.paho.client.mqttv3/src/main/java-templates/org/eclipse/paho/client/mqttv3/internal/ClientComms.java", "license": "apache-2.0", "size": 19415 }
[ "org.eclipse.paho.client.mqttv3.MqttException", "org.eclipse.paho.client.mqttv3.MqttToken", "org.eclipse.paho.client.mqttv3.internal.wire.MqttPublish", "org.eclipse.paho.client.mqttv3.internal.wire.MqttWireMessage" ]
import org.eclipse.paho.client.mqttv3.MqttException; import org.eclipse.paho.client.mqttv3.MqttToken; import org.eclipse.paho.client.mqttv3.internal.wire.MqttPublish; import org.eclipse.paho.client.mqttv3.internal.wire.MqttWireMessage;
import org.eclipse.paho.client.mqttv3.*; import org.eclipse.paho.client.mqttv3.internal.wire.*;
[ "org.eclipse.paho" ]
org.eclipse.paho;
569,874
public void setAmount (BigDecimal Amount) { set_Value (COLUMNNAME_Amount, Amount); }
void function (BigDecimal Amount) { set_Value (COLUMNNAME_Amount, Amount); }
/** Set Amount. @param Amount Amount in a defined currency */
Set Amount
setAmount
{ "repo_name": "neuroidss/adempiere", "path": "base/src/org/compiere/model/X_C_CashLine.java", "license": "gpl-2.0", "size": 11830 }
[ "java.math.BigDecimal" ]
import java.math.BigDecimal;
import java.math.*;
[ "java.math" ]
java.math;
455,743
public void moveAndRename( String entryDn, String newDn, boolean deleteOldRdn ) throws LdapException { moveAndRename( new Dn( schemaManager, entryDn ), new Dn( schemaManager, newDn ), deleteOldRdn ); } /** * {@inheritDoc}
void function( String entryDn, String newDn, boolean deleteOldRdn ) throws LdapException { moveAndRename( new Dn( schemaManager, entryDn ), new Dn( schemaManager, newDn ), deleteOldRdn ); } /** * {@inheritDoc}
/** * Moves and renames the given entryDn.The old Rdn will be deleted if requested * * @param entryDn The original entry Dn * @param newDn The new Entry Dn * @param deleteOldRdn Tells if the old Rdn must be removed */
Moves and renames the given entryDn.The old Rdn will be deleted if requested
moveAndRename
{ "repo_name": "darranl/directory-server", "path": "core-api/src/main/java/org/apache/directory/server/core/api/LdapCoreSessionConnection.java", "license": "apache-2.0", "size": 35237 }
[ "org.apache.directory.api.ldap.model.exception.LdapException", "org.apache.directory.api.ldap.model.name.Dn" ]
import org.apache.directory.api.ldap.model.exception.LdapException; import org.apache.directory.api.ldap.model.name.Dn;
import org.apache.directory.api.ldap.model.exception.*; import org.apache.directory.api.ldap.model.name.*;
[ "org.apache.directory" ]
org.apache.directory;
2,570,708
public void addCheckingPath(TreePath path);
void function(TreePath path);
/** * add a path to the checking set. * * @param path * the path to be added. */
add a path to the checking set
addCheckingPath
{ "repo_name": "llecaroz/JOCheckboxTreeTable", "path": "src/main/java/name/lecaroz/java/swing/jocheckboxtree/TreeCheckingModel.java", "license": "gpl-2.0", "size": 6394 }
[ "javax.swing.tree.TreePath" ]
import javax.swing.tree.TreePath;
import javax.swing.tree.*;
[ "javax.swing" ]
javax.swing;
2,401,839
protected Set<Classifier> rawAccumulateAllValuesOfelem(final Object[] parameters) { Set<Classifier> results = new HashSet<Classifier>(); rawAccumulateAllValues(POSITION_ELEM, parameters, results); return results; }
Set<Classifier> function(final Object[] parameters) { Set<Classifier> results = new HashSet<Classifier>(); rawAccumulateAllValues(POSITION_ELEM, parameters, results); return results; }
/** * Retrieve the set of values that occur in matches for elem. * @return the Set of all values, null if no parameter with the given name exists, empty set if there are no matches * */
Retrieve the set of values that occur in matches for elem
rawAccumulateAllValuesOfelem
{ "repo_name": "ELTE-Soft/xUML-RT-Executor", "path": "plugins/hu.eltesoft.modelexecution.validation/src-gen/hu/eltesoft/modelexecution/validation/UseCaseMatcher.java", "license": "epl-1.0", "size": 9971 }
[ "java.util.HashSet", "java.util.Set", "org.eclipse.uml2.uml.Classifier" ]
import java.util.HashSet; import java.util.Set; import org.eclipse.uml2.uml.Classifier;
import java.util.*; import org.eclipse.uml2.uml.*;
[ "java.util", "org.eclipse.uml2" ]
java.util; org.eclipse.uml2;
1,520,464
@Test public void testValidProjectUrl() throws Exception { final String projectUrl = "https://svn.apache.org/repos/asf/subversion/trunk/"; presenter.onProjectUrlChanged(projectUrl); verify(view).setProjectName(eq("trunk")); verify(view).setProjectUrlErrorHighlight(eq(false)); ...
void function() throws Exception { final String projectUrl = STRtrunk")); verify(view).setProjectUrlErrorHighlight(eq(false)); verify(dataObject.getSource()).setLocation(projectUrl); verify(updateDelegate, times(1)).updateControls(); verify(view, never()).setProjectNameErrorHighlight(eq(false)); }
/** * Test for {@link SubversionProjectImporterPresenter#onProjectUrlChanged(String projectUrl)} with a valid URL value. * * @throws Exception if anything goes wrong */
Test for <code>SubversionProjectImporterPresenter#onProjectUrlChanged(String projectUrl)</code> with a valid URL value
testValidProjectUrl
{ "repo_name": "kaloyan-raev/che", "path": "plugins/plugin-svn/che-plugin-svn-ext-ide/src/test/java/org/eclipse/che/plugin/svn/ide/importer/SubversionProjectImporterPresenterTest.java", "license": "epl-1.0", "size": 7037 }
[ "org.mockito.Mockito" ]
import org.mockito.Mockito;
import org.mockito.*;
[ "org.mockito" ]
org.mockito;
977,824
void actuallyPutNextEntry(ZipEntry entry) throws IOException;
void actuallyPutNextEntry(ZipEntry entry) throws IOException;
/** * Called by {@link CustomZipOutputStream#putNextEntry(ZipEntry)} and used by impls to put the * next entry into the zip file. It is guaranteed that the {@code entry} won't be null and the * stream will be open. It is also guaranteed that there's no current entry open. * * @param entry The {...
Called by <code>CustomZipOutputStream#putNextEntry(ZipEntry)</code> and used by impls to put the next entry into the zip file. It is guaranteed that the entry won't be null and the stream will be open. It is also guaranteed that there's no current entry open
actuallyPutNextEntry
{ "repo_name": "shybovycha/buck", "path": "src/com/facebook/buck/util/zip/CustomZipOutputStream.java", "license": "apache-2.0", "size": 5057 }
[ "java.io.IOException", "java.util.zip.ZipEntry" ]
import java.io.IOException; import java.util.zip.ZipEntry;
import java.io.*; import java.util.zip.*;
[ "java.io", "java.util" ]
java.io; java.util;
2,774,890
private boolean isRequestSecure(ContainerRequestContext requestContext) { return requestContext.getSecurityContext().isSecure() || hasSecureForwardedHeader(requestContext) || hasSecureXForwardedProtoHeader(requestContext); }
boolean function(ContainerRequestContext requestContext) { return requestContext.getSecurityContext().isSecure() hasSecureForwardedHeader(requestContext) hasSecureXForwardedProtoHeader(requestContext); }
/** * Checks if the request was made from a secure context or not. * @param requestContext The {@link ContainerRequestContext} object containing the container request headers. * @return true if the request was made from a secure context, false otherwise. */
Checks if the request was made from a secure context or not
isRequestSecure
{ "repo_name": "cerner/beadledom", "path": "jaxrs/src/main/java/com/cerner/beadledom/jaxrs/provider/ForwardedHeaderFilter.java", "license": "apache-2.0", "size": 3524 }
[ "javax.ws.rs.container.ContainerRequestContext" ]
import javax.ws.rs.container.ContainerRequestContext;
import javax.ws.rs.container.*;
[ "javax.ws" ]
javax.ws;
649,867
public int fillValue(int[] valuesArr, int valuesIdx, int variableValueIdx, Map<String, Integer> position);
int function(int[] valuesArr, int valuesIdx, int variableValueIdx, Map<String, Integer> position);
/** * Fills variable value to the array of values. If given map is not null * then stores index of this value to the map where variable name points * to the index of its value in value array. * * @param valuesArr * array of values of all variables ...
Fills variable value to the array of values. If given map is not null then stores index of this value to the map where variable name points to the index of its value in value array
fillValue
{ "repo_name": "lottie-c/spl_tests_new", "path": "src/java/cz/cuni/mff/spl/formula/expander/Expander.java", "license": "bsd-3-clause", "size": 15142 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,870,265
public void killJob() throws IOException;
void function() throws IOException;
/** * Kill the running job. Blocks until all job tasks have been killed as well. * If the job is no longer running, it simply returns. * * @throws IOException */
Kill the running job. Blocks until all job tasks have been killed as well. If the job is no longer running, it simply returns
killJob
{ "repo_name": "tseen/Federated-HDFS", "path": "tseenliu/FedHDFS-hadoop-src/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapred/RunningJob.java", "license": "apache-2.0", "size": 7151 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
1,048,064
protected void handleSetBounds(final int width, final int height) { assert Display.getCurrent() != null; // On SWT event thread populate(); if (verboseSizeLayout) { System.err.println("SWT thread: setBounds called: " + width + " x " + height); } // If the size of the frame automatically tracks the size ...
void function(final int width, final int height) { assert Display.getCurrent() != null; populate(); if (verboseSizeLayout) { System.err.println(STR + width + STR + height); } if (!AUTOMATIC_SET_AWT_SIZE PlatformHelper.isLinux() && PlatformHelper.JAVA_VERSION < PlatformHelper.javaVersion(1, 6, 0)) { synchronized (this) ...
/** * Called when the SWT layout or client code assigns a size and position to this Control. */
Called when the SWT layout or client code assigns a size and position to this Control
handleSetBounds
{ "repo_name": "gama-platform/gama.cloud", "path": "ummisco.gama.java2d_web/internal_src/ummisco/gama/java2d/swing/SwingControl.java", "license": "agpl-3.0", "size": 63023 }
[ "org.eclipse.swt.widgets.Display" ]
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.*;
[ "org.eclipse.swt" ]
org.eclipse.swt;
2,455,176
public void setCredentials(GSSCredential credentials) { setSourceCredentials(credentials); setDestinationCredentials(credentials); }
void function(GSSCredential credentials) { setSourceCredentials(credentials); setDestinationCredentials(credentials); }
/** * Sets credentials to use for both sides. * * @param credentials user credentials */
Sets credentials to use for both sides
setCredentials
{ "repo_name": "jglobus/JGlobus", "path": "io/src/main/java/org/globus/io/urlcopy/UrlCopy.java", "license": "apache-2.0", "size": 27698 }
[ "org.ietf.jgss.GSSCredential" ]
import org.ietf.jgss.GSSCredential;
import org.ietf.jgss.*;
[ "org.ietf.jgss" ]
org.ietf.jgss;
325,877
@Test public void testSetDirect() throws Exception { Stream s = new Builder("test") .isDirect(true) .build(); Assert.assertTrue(s.isDirect()); }
void function() throws Exception { Stream s = new Builder("test") .isDirect(true) .build(); Assert.assertTrue(s.isDirect()); }
/** * Assert that we can set the direct stream flag. * * @throws Exception An unexpected exception. */
Assert that we can set the direct stream flag
testSetDirect
{ "repo_name": "krotscheck/storm-toolkit", "path": "storm-toolkit-core/src/test/java/net/krotscheck/stk/stream/StreamTest.java", "license": "apache-2.0", "size": 11580 }
[ "net.krotscheck.stk.stream.Stream", "org.junit.Assert" ]
import net.krotscheck.stk.stream.Stream; import org.junit.Assert;
import net.krotscheck.stk.stream.*; import org.junit.*;
[ "net.krotscheck.stk", "org.junit" ]
net.krotscheck.stk; org.junit;
1,730,162
private void reassign(GridServiceDeployment dep, long topVer) throws IgniteCheckedException { ServiceConfiguration cfg = dep.configuration(); Object nodeFilter = cfg.getNodeFilter(); if (nodeFilter != null) ctx.resource().injectGeneric(nodeFilter); int totalCnt = cfg.g...
void function(GridServiceDeployment dep, long topVer) throws IgniteCheckedException { ServiceConfiguration cfg = dep.configuration(); Object nodeFilter = cfg.getNodeFilter(); if (nodeFilter != null) ctx.resource().injectGeneric(nodeFilter); int totalCnt = cfg.getTotalCount(); int maxPerNodeCnt = cfg.getMaxPerNodeCount(...
/** * Reassigns service to nodes. * * @param dep Service deployment. * @param topVer Topology version. * @throws IgniteCheckedException If failed. */
Reassigns service to nodes
reassign
{ "repo_name": "agura/incubator-ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/processors/service/GridServiceProcessor.java", "license": "apache-2.0", "size": 54242 }
[ "java.util.ArrayList", "java.util.Collection", "java.util.Collections", "java.util.HashMap", "java.util.HashSet", "java.util.List", "java.util.Map", "org.apache.ignite.IgniteCheckedException", "org.apache.ignite.cluster.ClusterNode", "org.apache.ignite.internal.cluster.ClusterTopologyCheckedExcept...
import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.cluster.ClusterNode; import org.apache.ignite.internal.cluster...
import java.util.*; import org.apache.ignite.*; import org.apache.ignite.cluster.*; import org.apache.ignite.internal.cluster.*; import org.apache.ignite.internal.processors.affinity.*; import org.apache.ignite.internal.processors.cache.transactions.*; import org.apache.ignite.internal.util.typedef.internal.*; import o...
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
2,578,807
public String createSignedUrl(String method, String bucketName, String objectKey, String specialParamName, Map<String, Object> headersMap, long secondsSinceEpoch, boolean isVirtualHost, boolean isHttps, boolean isDnsBucketNamingDisabled) { String s3Endpoint = this.getEndpoint(); ...
String function(String method, String bucketName, String objectKey, String specialParamName, Map<String, Object> headersMap, long secondsSinceEpoch, boolean isVirtualHost, boolean isHttps, boolean isDnsBucketNamingDisabled) { String s3Endpoint = this.getEndpoint(); String uriPath; String hostname = (isVirtualHost ? buc...
/** * Generates a signed URL string that will grant access to an S3 resource (bucket or object) * to whoever uses the URL up until the time specified. * * @param method * the HTTP method to sign, such as GET or PUT (note that S3 does not support POST requests). * @param bucketName * t...
Generates a signed URL string that will grant access to an S3 resource (bucket or object) to whoever uses the URL up until the time specified
createSignedUrl
{ "repo_name": "rjainqb/jets3t-rj", "path": "src/org/jets3t/service/S3Service.java", "license": "apache-2.0", "size": 171545 }
[ "java.util.HashMap", "java.util.Map", "org.jets3t.service.utils.ServiceUtils" ]
import java.util.HashMap; import java.util.Map; import org.jets3t.service.utils.ServiceUtils;
import java.util.*; import org.jets3t.service.utils.*;
[ "java.util", "org.jets3t.service" ]
java.util; org.jets3t.service;
367,510
List<String> getApiVersionsMatchingApiName(String apiName,String username) throws APIManagementException;
List<String> getApiVersionsMatchingApiName(String apiName,String username) throws APIManagementException;
/** * Returns a list of api versions that matches the given context template * * @param apiName api name in the payload * @return api versions that matches context template * @throws APIManagementException If failed to get the list of api versions */
Returns a list of api versions that matches the given context template
getApiVersionsMatchingApiName
{ "repo_name": "hevayo/carbon-apimgt", "path": "components/apimgt/org.wso2.carbon.apimgt.api/src/main/java/org/wso2/carbon/apimgt/api/APIManager.java", "license": "apache-2.0", "size": 25015 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
873,597
public static void validateCustomActionMethods(ActionsDefineable actionsDefineable) { CustomAction[] customActions = actionsDefineable.defineActions(); Method[] methods = actionsDefineable.getClass().getMethods(); for (int i = 0; i < customActions.length; i++) { CustomAction ca =...
static void function(ActionsDefineable actionsDefineable) { CustomAction[] customActions = actionsDefineable.defineActions(); Method[] methods = actionsDefineable.getClass().getMethods(); for (int i = 0; i < customActions.length; i++) { CustomAction ca = customActions[i]; if (ca == null) { throw new IllegalArgumentExce...
/** * Takes a set of custom actions and validates them * @param actionsDefineable an entity provider which uses custom actions * @param customActions * @throws IllegalArgumentException if the custom actions are invalid */
Takes a set of custom actions and validates them
validateCustomActionMethods
{ "repo_name": "harfalm/Sakai-10.1", "path": "entitybroker/utils/src/java/org/sakaiproject/entitybroker/util/core/EntityProviderMethodStoreImpl.java", "license": "apache-2.0", "size": 23470 }
[ "java.lang.reflect.Method", "org.sakaiproject.entitybroker.entityprovider.capabilities.ActionsDefineable", "org.sakaiproject.entitybroker.entityprovider.extension.CustomAction" ]
import java.lang.reflect.Method; import org.sakaiproject.entitybroker.entityprovider.capabilities.ActionsDefineable; import org.sakaiproject.entitybroker.entityprovider.extension.CustomAction;
import java.lang.reflect.*; import org.sakaiproject.entitybroker.entityprovider.capabilities.*; import org.sakaiproject.entitybroker.entityprovider.extension.*;
[ "java.lang", "org.sakaiproject.entitybroker" ]
java.lang; org.sakaiproject.entitybroker;
1,353,920
@Test public void testSerialization() { RingPlot p1 = new RingPlot(null); GradientPaint gp = new GradientPaint(1.0f, 2.0f, Color.yellow, 3.0f, 4.0f, Color.red); p1.setSeparatorPaint(gp); RingPlot p2 = (RingPlot) TestUtilities.serialised(p1); assertEquals(p...
void function() { RingPlot p1 = new RingPlot(null); GradientPaint gp = new GradientPaint(1.0f, 2.0f, Color.yellow, 3.0f, 4.0f, Color.red); p1.setSeparatorPaint(gp); RingPlot p2 = (RingPlot) TestUtilities.serialised(p1); assertEquals(p1, p2); }
/** * Serialize an instance, restore it, and check for equality. */
Serialize an instance, restore it, and check for equality
testSerialization
{ "repo_name": "simon04/jfreechart", "path": "src/test/java/org/jfree/chart/plot/RingPlotTest.java", "license": "lgpl-2.1", "size": 5629 }
[ "java.awt.Color", "java.awt.GradientPaint", "org.jfree.chart.TestUtilities", "org.junit.Assert" ]
import java.awt.Color; import java.awt.GradientPaint; import org.jfree.chart.TestUtilities; import org.junit.Assert;
import java.awt.*; import org.jfree.chart.*; import org.junit.*;
[ "java.awt", "org.jfree.chart", "org.junit" ]
java.awt; org.jfree.chart; org.junit;
291,924
@Override public GeoPos getGeoPos(final PixelPos pixelPos, GeoPos geoPos) { initialize(); if (geoPos == null) { geoPos = new GeoPos(); } geoPos.setInvalid(); if (pixelPos.isValid()) { int x0 = (int) Math.floor(pixelPos.getX()); int y0 =...
GeoPos function(final PixelPos pixelPos, GeoPos geoPos) { initialize(); if (geoPos == null) { geoPos = new GeoPos(); } geoPos.setInvalid(); if (pixelPos.isValid()) { int x0 = (int) Math.floor(pixelPos.getX()); int y0 = (int) Math.floor(pixelPos.getY()); if (x0 >= 0 && x0 < rasterWidth && y0 >= 0 && y0 < rasterHeight) {...
/** * Returns the latitude and longitude value for a given pixel co-ordinate. * * @param pixelPos the pixel's co-ordinates given as x,y * @param geoPos an instance of <code>GeoPos</code> to be used as retun value. If this parameter is * <code>null</code>, the method creates a ...
Returns the latitude and longitude value for a given pixel co-ordinate
getGeoPos
{ "repo_name": "seadas/beam", "path": "beam-core/src/main/java/org/esa/beam/framework/datamodel/PixelGeoCoding.java", "license": "gpl-3.0", "size": 60141 }
[ "java.awt.Rectangle", "java.awt.image.Raster" ]
import java.awt.Rectangle; import java.awt.image.Raster;
import java.awt.*; import java.awt.image.*;
[ "java.awt" ]
java.awt;
290,785
public static void updateFurnaceBlockState(boolean par0, World par1World, int par2, int par3, int par4) { int l = par1World.getBlockMetadata(par2, par3, par4); TileEntity tileentity = par1World.getBlockTileEntity(par2, par3, par4); keepFurnaceInventory = true; if (par0) ...
static void function(boolean par0, World par1World, int par2, int par3, int par4) { int l = par1World.getBlockMetadata(par2, par3, par4); TileEntity tileentity = par1World.getBlockTileEntity(par2, par3, par4); keepFurnaceInventory = true; if (par0) { par1World.setBlock(par2, par3, par4, MinersTech.blockMinerFurnaceActi...
/** * Update which block ID the furnace is using depending on whether or not it is burning */
Update which block ID the furnace is using depending on whether or not it is burning
updateFurnaceBlockState
{ "repo_name": "ZippyIO/MinersTech", "path": "src/Blocks/MinersFurnace.java", "license": "gpl-2.0", "size": 12308 }
[ "net.minecraft.tileentity.TileEntity", "net.minecraft.world.World" ]
import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World;
import net.minecraft.tileentity.*; import net.minecraft.world.*;
[ "net.minecraft.tileentity", "net.minecraft.world" ]
net.minecraft.tileentity; net.minecraft.world;
2,701,474
Page<JobSearchResult> findJobs( final String id, final String name, final String user, final Set<JobStatus> statuses, final Set<String> tags, final String clusterName, final String clusterId, final String commandName, final String commandId, ...
Page<JobSearchResult> findJobs( final String id, final String name, final String user, final Set<JobStatus> statuses, final Set<String> tags, final String clusterName, final String clusterId, final String commandName, final String commandId, final Date minStarted, final Date maxStarted, final Date minFinished, final Da...
/** * Search for jobs which match the given filter criteria. * * @param id id for job * @param name name of job (can be a SQL-style pattern such as HIVE%) * @param user user who submitted job * @param statuses statuses of job * @param tags tags for the...
Search for jobs which match the given filter criteria
findJobs
{ "repo_name": "irontable/genie", "path": "genie-core/src/main/java/com/netflix/genie/core/services/JobSearchService.java", "license": "apache-2.0", "size": 6528 }
[ "com.netflix.genie.common.dto.JobStatus", "com.netflix.genie.common.dto.search.JobSearchResult", "java.util.Date", "java.util.Set", "javax.validation.constraints.NotNull", "org.springframework.data.domain.Page", "org.springframework.data.domain.Pageable" ]
import com.netflix.genie.common.dto.JobStatus; import com.netflix.genie.common.dto.search.JobSearchResult; import java.util.Date; import java.util.Set; import javax.validation.constraints.NotNull; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable;
import com.netflix.genie.common.dto.*; import com.netflix.genie.common.dto.search.*; import java.util.*; import javax.validation.constraints.*; import org.springframework.data.domain.*;
[ "com.netflix.genie", "java.util", "javax.validation", "org.springframework.data" ]
com.netflix.genie; java.util; javax.validation; org.springframework.data;
2,620,156
public JMenuItem createMenuItem(Action action) { JMenuItem item = new JMenuItem(action); item.setName((String)(action.getValue(Action.NAME))); // could (should?) ensure everything is set correctly return item; }
JMenuItem function(Action action) { JMenuItem item = new JMenuItem(action); item.setName((String)(action.getValue(Action.NAME))); return item; }
/** * Create a menu item for an action. * The name of the item is set to the action name. * @param action from which to create the menu item * @return the menu item that was created * @see #createMenu(String, Action[]) */
Create a menu item for an action. The name of the item is set to the action name
createMenuItem
{ "repo_name": "otmarjr/jtreg-fork", "path": "dist-with-aspectj/jtreg/lib/javatest/com/sun/javatest/tool/UIFactory.java", "license": "gpl-2.0", "size": 141944 }
[ "javax.swing.Action", "javax.swing.JMenuItem" ]
import javax.swing.Action; import javax.swing.JMenuItem;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
1,112,901
protected double[] decompSol(final double[][] doubMat, final double[] doubVec) { final LUDecompositionResult result = _luObj.evaluate(new DoubleMatrix2D(doubMat)); final double[][] lMat = result.getL().getData(); final double[][] uMat = result.getU().getData(); final double[] doubVecMod = ((DoubleMat...
double[] function(final double[][] doubMat, final double[] doubVec) { final LUDecompositionResult result = _luObj.evaluate(new DoubleMatrix2D(doubMat)); final double[][] lMat = result.getL().getData(); final double[][] uMat = result.getU().getData(); final double[] doubVecMod = ((DoubleMatrix1D) OG_ALGEBRA.multiply(res...
/** * Linear problem Ax=b where A is a square matrix and x,b are vector can be solved by LU decomposition. * * @param doubMat * Matrix A * @param doubVec * Vector B * @return Solution to the linear equation, x */
Linear problem Ax=b where A is a square matrix and x,b are vector can be solved by LU decomposition
decompSol
{ "repo_name": "McLeodMoores/starling", "path": "projects/analytics/src/main/java/com/opengamma/analytics/financial/model/volatility/smile/fitting/MixedBivariateLogNormalCorrelationFinder.java", "license": "apache-2.0", "size": 26161 }
[ "com.opengamma.analytics.math.linearalgebra.LUDecompositionResult", "com.opengamma.analytics.math.matrix.DoubleMatrix1D", "com.opengamma.analytics.math.matrix.DoubleMatrix2D" ]
import com.opengamma.analytics.math.linearalgebra.LUDecompositionResult; import com.opengamma.analytics.math.matrix.DoubleMatrix1D; import com.opengamma.analytics.math.matrix.DoubleMatrix2D;
import com.opengamma.analytics.math.linearalgebra.*; import com.opengamma.analytics.math.matrix.*;
[ "com.opengamma.analytics" ]
com.opengamma.analytics;
1,091,545
short getShort(int index, ByteOrder byteOrder);
short getShort(int index, ByteOrder byteOrder);
/** * Get the value at a given index. * * @param index in bytes from which to get. * @param byteOrder of the value to be read. * @return the value at a given index. */
Get the value at a given index
getShort
{ "repo_name": "tbrooks8/Agrona", "path": "agrona/src/main/java/org/agrona/DirectBuffer.java", "license": "apache-2.0", "size": 14061 }
[ "java.nio.ByteOrder" ]
import java.nio.ByteOrder;
import java.nio.*;
[ "java.nio" ]
java.nio;
627,231
void setLibraryPath(Collection<File> paths);
void setLibraryPath(Collection<File> paths);
/** * Sets a list of SWC files or directories that contain SWC files. * This is equivalent to using the <code>compiler.library-path</code> option of the mxmlc or compc compilers. * * @param paths An array of <code>File</code> objects. The <code>File.isDirectory()</code> method should return *...
Sets a list of SWC files or directories that contain SWC files. This is equivalent to using the <code>compiler.library-path</code> option of the mxmlc or compc compilers
setLibraryPath
{ "repo_name": "adufilie/flex-falcon", "path": "compiler/src/org/apache/flex/compiler/internal/config/ICompilerSettings.java", "license": "apache-2.0", "size": 29924 }
[ "java.io.File", "java.util.Collection" ]
import java.io.File; import java.util.Collection;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,033,734
protected static EventListener removeInternal(EventListener l, EventListener oldl) { if (l == oldl || l == null) { return null; } else if (l instanceof DnDEventMulticaster) { return ((DnDEventMulticaster)l).remove(oldl); } else { return l; // it'...
static EventListener function(EventListener l, EventListener oldl) { if (l == oldl l == null) { return null; } else if (l instanceof DnDEventMulticaster) { return ((DnDEventMulticaster)l).remove(oldl); } else { return l; } }
/** * Returns the resulting multicast listener after removing the * old listener from listener-l. * If listener-l equals the old listener OR listener-l is null, * returns null. * Else if listener-l is an instance of AWTEventMulticaster, * then it removes the old listener from it. * El...
Returns the resulting multicast listener after removing the old listener from listener-l. If listener-l equals the old listener OR listener-l is null, returns null. Else if listener-l is an instance of AWTEventMulticaster, then it removes the old listener from it. Else, returns listener l
removeInternal
{ "repo_name": "flyzsd/java-code-snippets", "path": "ibm.jdk8/src/java/awt/dnd/DnDEventMulticaster.java", "license": "mit", "size": 7851 }
[ "java.util.EventListener" ]
import java.util.EventListener;
import java.util.*;
[ "java.util" ]
java.util;
2,766,452
@NonNull public ApiVersion getMinSdkVersion() { ApiVersion minSdkVersion = mMergedFlavor.getMinSdkVersion(); if (minSdkVersion == null) { // read it from the main manifest File manifestLocation = mDefaultSourceProvider.getManifestFile(); minSdkVersion = Defau...
ApiVersion function() { ApiVersion minSdkVersion = mMergedFlavor.getMinSdkVersion(); if (minSdkVersion == null) { File manifestLocation = mDefaultSourceProvider.getManifestFile(); minSdkVersion = DefaultApiVersion.create( sManifestParser.getMinSdkVersion(manifestLocation)); } return minSdkVersion; }
/** * Return the minSdkVersion for this variant. * <p> * This uses both the value from the manifest (if present), and the override coming * from the flavor(s) (if present). * * @return the minSdkVersion */
Return the minSdkVersion for this variant. This uses both the value from the manifest (if present), and the override coming from the flavor(s) (if present)
getMinSdkVersion
{ "repo_name": "tranleduy2000/javaide", "path": "aosp/builder/src/main/java/com/android/builder/core/VariantConfiguration.java", "license": "gpl-3.0", "size": 54231 }
[ "com.android.builder.model.ApiVersion", "java.io.File" ]
import com.android.builder.model.ApiVersion; import java.io.File;
import com.android.builder.model.*; import java.io.*;
[ "com.android.builder", "java.io" ]
com.android.builder; java.io;
383,933
public @Nonnull MachineImage createdAt(@Nonnegative long timestamp) { this.creationTimestamp = timestamp; return this; }
@Nonnull MachineImage function(@Nonnegative long timestamp) { this.creationTimestamp = timestamp; return this; }
/** * Indicates the Unix timestamp when this image was created. * @param timestamp the Unix timestamp in milliseconds when this image was created * @return this */
Indicates the Unix timestamp when this image was created
createdAt
{ "repo_name": "daniellemayne/dasein-cloud-core_old", "path": "src/main/java/org/dasein/cloud/compute/MachineImage.java", "license": "apache-2.0", "size": 28169 }
[ "javax.annotation.Nonnegative", "javax.annotation.Nonnull" ]
import javax.annotation.Nonnegative; import javax.annotation.Nonnull;
import javax.annotation.*;
[ "javax.annotation" ]
javax.annotation;
6,411
@ServiceMethod(returns = ReturnType.SINGLE) Response<List<MicrosoftGraphServicePrincipalInner>> deltaWithResponse(Context context);
@ServiceMethod(returns = ReturnType.SINGLE) Response<List<MicrosoftGraphServicePrincipalInner>> deltaWithResponse(Context context);
/** * Invoke function delta. * * @param context The context to associate with this operation. * @throws IllegalArgumentException thrown if parameters fail the validation. * @throws com.azure.resourcemanager.authorization.fluent.models.OdataErrorMainException thrown if the request is * ...
Invoke function delta
deltaWithResponse
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/fluent/ServicePrincipalsClient.java", "license": "mit", "size": 228379 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.Response", "com.azure.core.util.Context", "com.azure.resourcemanager.authorization.fluent.models.MicrosoftGraphServicePrincipalInner", "java.util.List" ]
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.authorization.fluent.models.MicrosoftGraphServicePrincipalInner; import java.util.List;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.authorization.fluent.models.*; import java.util.*;
[ "com.azure.core", "com.azure.resourcemanager", "java.util" ]
com.azure.core; com.azure.resourcemanager; java.util;
107,319
void onDismiss(View view, Object token); } public SwipeDismissTouchListener(View view, Object token, DismissCallbacks callbacks) { ViewConfiguration vc = ViewConfiguration.get(view.getContext()); mSlop = vc.getScaledTouchSlop(); mMinFlingVelocity = vc.getScaledMinimumFlingV...
void onDismiss(View view, Object token); } public SwipeDismissTouchListener(View view, Object token, DismissCallbacks callbacks) { ViewConfiguration vc = ViewConfiguration.get(view.getContext()); mSlop = vc.getScaledTouchSlop(); mMinFlingVelocity = vc.getScaledMinimumFlingVelocity() * 16; mMaxFlingVelocity = vc.getScal...
/** * Called when the user has indicated they she would like to dismiss the view. * * @param view The originating {@link View} to be dismissed. * @param token The optional token passed to this object's constructor. */
Called when the user has indicated they she would like to dismiss the view
onDismiss
{ "repo_name": "pigfly/sms-smap-gateway", "path": "app/src/main/java/com/android/smap/ui/SwipeDismissTouchListener.java", "license": "gpl-3.0", "size": 10902 }
[ "android.view.View", "android.view.ViewConfiguration" ]
import android.view.View; import android.view.ViewConfiguration;
import android.view.*;
[ "android.view" ]
android.view;
358,857
TextAttributes getTextAttributes();
TextAttributes getTextAttributes();
/** * Returns visual representation of selection. * * @return Selection attributes. */
Returns visual representation of selection
getTextAttributes
{ "repo_name": "liveqmock/platform-tools-idea", "path": "platform/platform-api/src/com/intellij/openapi/editor/SelectionModel.java", "license": "apache-2.0", "size": 8810 }
[ "com.intellij.openapi.editor.markup.TextAttributes" ]
import com.intellij.openapi.editor.markup.TextAttributes;
import com.intellij.openapi.editor.markup.*;
[ "com.intellij.openapi" ]
com.intellij.openapi;
524,166
void putAll(Collection<FlowFileRecord> flowFiles);
void putAll(Collection<FlowFileRecord> flowFiles);
/** * Adds the given FlowFiles to this partition * @param flowFiles the FlowFiles to add */
Adds the given FlowFiles to this partition
putAll
{ "repo_name": "mcgilman/nifi", "path": "nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/queue/clustered/partition/QueuePartition.java", "license": "apache-2.0", "size": 3897 }
[ "java.util.Collection", "org.apache.nifi.controller.repository.FlowFileRecord" ]
import java.util.Collection; import org.apache.nifi.controller.repository.FlowFileRecord;
import java.util.*; import org.apache.nifi.controller.repository.*;
[ "java.util", "org.apache.nifi" ]
java.util; org.apache.nifi;
1,628,573
ControlMessageEvent updateStatsInfo(ProviderId providerId, DeviceId deviceId, Set<ControlMessage> controlMessages);
ControlMessageEvent updateStatsInfo(ProviderId providerId, DeviceId deviceId, Set<ControlMessage> controlMessages);
/** * Updates the control message statistics of the specified device. * * @param providerId provider identifier * @param deviceId device identifier * @param controlMessages a collection of control message stats * @return ready to send event describing what occurred */
Updates the control message statistics of the specified device
updateStatsInfo
{ "repo_name": "sonu283304/onos", "path": "apps/cpman/api/src/main/java/org/onosproject/cpman/message/ControlMessageStore.java", "license": "apache-2.0", "size": 1476 }
[ "java.util.Set", "org.onosproject.cpman.ControlMessage", "org.onosproject.net.DeviceId", "org.onosproject.net.provider.ProviderId" ]
import java.util.Set; import org.onosproject.cpman.ControlMessage; import org.onosproject.net.DeviceId; import org.onosproject.net.provider.ProviderId;
import java.util.*; import org.onosproject.cpman.*; import org.onosproject.net.*; import org.onosproject.net.provider.*;
[ "java.util", "org.onosproject.cpman", "org.onosproject.net" ]
java.util; org.onosproject.cpman; org.onosproject.net;
1,445,536
final boolean isDefiningProject( final List<Xpp3Dom> rulesFromModel, final Xpp3Dom invokingRule ) { for ( final Xpp3Dom rule : rulesFromModel ) { if ( rule.equals( invokingRule ) ) { return true; } } return false; }
final boolean isDefiningProject( final List<Xpp3Dom> rulesFromModel, final Xpp3Dom invokingRule ) { for ( final Xpp3Dom rule : rulesFromModel ) { if ( rule.equals( invokingRule ) ) { return true; } } return false; }
/** * Checks whether ruleDom is in the list of rules from the model. * * @param rulesFromModel * @param invokingRule * @return true when the rules contain the invoking rule. */
Checks whether ruleDom is in the list of rules from the model
isDefiningProject
{ "repo_name": "mojohaus/extra-enforcer-rules", "path": "src/main/java/org/apache/maven/plugins/enforcer/RequirePropertyDiverges.java", "license": "apache-2.0", "size": 16774 }
[ "java.util.List", "org.codehaus.plexus.util.xml.Xpp3Dom" ]
import java.util.List; import org.codehaus.plexus.util.xml.Xpp3Dom;
import java.util.*; import org.codehaus.plexus.util.xml.*;
[ "java.util", "org.codehaus.plexus" ]
java.util; org.codehaus.plexus;
638,792
public static void write(char[] data, OutputStream output, String encoding) throws IOException { if (data != null) { if (encoding == null) { write(data, output); } else { output.write(new String(data).getBytes(encoding)); ...
static void function(char[] data, OutputStream output, String encoding) throws IOException { if (data != null) { if (encoding == null) { write(data, output); } else { output.write(new String(data).getBytes(encoding)); } } }
/** * Writes chars from a <code>char[]</code> to bytes on an * <code>OutputStream</code> using the specified character encoding. * <p> * Character encoding names can be found at * <a href="http://www.iana.org/assignments/character-sets">IANA</a>. * <p> * This method uses {@link...
Writes chars from a <code>char[]</code> to bytes on an <code>OutputStream</code> using the specified character encoding. Character encoding names can be found at IANA. This method uses <code>String#String(char[])</code> and <code>String#getBytes(String)</code>
write
{ "repo_name": "arteam/unitils", "path": "unitils-core/src/main/java/org/unitils/thirdparty/org/apache/commons/io/IOUtils.java", "license": "apache-2.0", "size": 40609 }
[ "java.io.IOException", "java.io.OutputStream" ]
import java.io.IOException; import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
1,143,668
public Resource getRoot() { return root; }
Resource function() { return root; }
/** * Return the root resource in a local model. Should be used only * for retrival, all modifications should be done via the other Description methods. */
Return the root resource in a local model. Should be used only for retrival, all modifications should be done via the other Description methods
getRoot
{ "repo_name": "UKGovLD/registry-core", "path": "src/main/java/com/epimorphics/registry/core/Description.java", "license": "apache-2.0", "size": 6457 }
[ "org.apache.jena.rdf.model.Resource" ]
import org.apache.jena.rdf.model.Resource;
import org.apache.jena.rdf.model.*;
[ "org.apache.jena" ]
org.apache.jena;
1,035,564
public void attemptRegister() { if (mIsWorking) { return; } // Reset errors. mErrorView.setVisibility(View.GONE); mUserView.setError(null); mEmailView.setError(null); mPasswordView.setError(null); // Store values at the time of the login ...
void function() { if (mIsWorking) { return; } mErrorView.setVisibility(View.GONE); mUserView.setError(null); mEmailView.setError(null); mPasswordView.setError(null); String user = mUserView.getText().toString(); String email = mEmailView.getText().toString(); String password = mPasswordView.getText().toString(); boolea...
/** * Attempts to sign in or register the account specified by the login form. * If there are form errors (invalid email, missing fields, etc.), the * errors are presented and no actual login attempt is made. */
Attempts to sign in or register the account specified by the login form. If there are form errors (invalid email, missing fields, etc.), the errors are presented and no actual login attempt is made
attemptRegister
{ "repo_name": "MaStanford/AnglishWordbook", "path": "app/src/main/java/com/stanford/anglishwordbook/activities/RegisterActivity.java", "license": "apache-2.0", "size": 11836 }
[ "android.text.TextUtils", "android.view.View" ]
import android.text.TextUtils; import android.view.View;
import android.text.*; import android.view.*;
[ "android.text", "android.view" ]
android.text; android.view;
2,752,915
public boolean updateState(TaskExecutionState state) { assertRunningInJobMasterMainThread(); final Execution attempt = currentExecutions.get(state.getID()); if (attempt != null) { try { final boolean stateUpdated = updateStateInternal(state, attempt); maybeReleasePartitions(attempt); return sta...
boolean function(TaskExecutionState state) { assertRunningInJobMasterMainThread(); final Execution attempt = currentExecutions.get(state.getID()); if (attempt != null) { try { final boolean stateUpdated = updateStateInternal(state, attempt); maybeReleasePartitions(attempt); return stateUpdated; } catch (Throwable t) { ...
/** * Updates the state of one of the ExecutionVertex's Execution attempts. * If the new status if "FINISHED", this also updates the accumulators. * * @param state The state update. * @return True, if the task update was properly applied, false, if the execution attempt was not found. */
Updates the state of one of the ExecutionVertex's Execution attempts. If the new status if "FINISHED", this also updates the accumulators
updateState
{ "repo_name": "fhueske/flink", "path": "flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraph.java", "license": "apache-2.0", "size": 64112 }
[ "org.apache.flink.runtime.taskmanager.TaskExecutionState", "org.apache.flink.util.ExceptionUtils" ]
import org.apache.flink.runtime.taskmanager.TaskExecutionState; import org.apache.flink.util.ExceptionUtils;
import org.apache.flink.runtime.taskmanager.*; import org.apache.flink.util.*;
[ "org.apache.flink" ]
org.apache.flink;
2,079,303
private String[] getImageNames() { String[] names = new String[slideSet.getNumRows()]; for (int i = 0; i < slideSet.getNumRows(); i++) { names[i] = String.valueOf(i + 1) + ": " + new File(slideSet.getItemText(imageReaders.get(curImageSet).getColumnNum(), i)).getName()...
String[] function() { String[] names = new String[slideSet.getNumRows()]; for (int i = 0; i < slideSet.getNumRows(); i++) { names[i] = String.valueOf(i + 1) + STR + new File(slideSet.getItemText(imageReaders.get(curImageSet).getColumnNum(), i)).getName(); } return names; }
/** * Get the short names of image files to put in the list, prefixed by the * row number to avoid name duplications which cause problems with * {@code DefaultComboBoxModel}. */
Get the short names of image files to put in the list, prefixed by the row number to avoid name duplications which cause problems with DefaultComboBoxModel
getImageNames
{ "repo_name": "bnanes/slideset", "path": "src/main/java/org/nanes/slideset/ui/RoiEditorIJ1.java", "license": "bsd-2-clause", "size": 32536 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
382,590
public ObjectName[] getServiceNames() { ObjectName onames[]=new ObjectName[ services.length ]; for( int i=0; i<services.length; i++ ) { onames[i]=((StandardService)services[i]).getObjectName(); } return onames; }
ObjectName[] function() { ObjectName onames[]=new ObjectName[ services.length ]; for( int i=0; i<services.length; i++ ) { onames[i]=((StandardService)services[i]).getObjectName(); } return onames; }
/** * Return the JMX service names. */
Return the JMX service names
getServiceNames
{ "repo_name": "WhiteBearSolutions/WBSAirback", "path": "packages/wbsairback-tomcat/wbsairback-tomcat-7.0.22/java/org/apache/catalina/core/StandardServer.java", "license": "apache-2.0", "size": 24448 }
[ "javax.management.ObjectName" ]
import javax.management.ObjectName;
import javax.management.*;
[ "javax.management" ]
javax.management;
2,778,750
public void testSetMergeThreshold() throws Exception { if (!versionMeetsMinimum(5, 7, 6)) { return; } Map<String, Integer> keyMergeThresholds = new HashMap<>(); keyMergeThresholds.put("k2", 45); keyMergeThresholds.put("k3", 40); keyMergeThresholds.put("k2...
void function() throws Exception { if (!versionMeetsMinimum(5, 7, 6)) { return; } Map<String, Integer> keyMergeThresholds = new HashMap<>(); keyMergeThresholds.put("k2", 45); keyMergeThresholds.put("k3", 40); keyMergeThresholds.put("k23", 35); keyMergeThresholds.put("k24", 30); int tableMergeThreshold = 25; createTable...
/** * WL#6747 - InnoDB: make fill factor settable. * * Tests support for new syntax for setting indices MERGE_THRESHOLD on CREATE TABLE. * * index_option: * COMMENT 'MERGE_THRESHOLD=n' */
Tests support for new syntax for setting indices MERGE_THRESHOLD on CREATE TABLE. index_option: COMMENT 'MERGE_THRESHOLD=n'
testSetMergeThreshold
{ "repo_name": "ac2cz/FoxTelem", "path": "lib/mysql-connector-java-8.0.13/src/test/java/testsuite/regression/SyntaxRegressionTest.java", "license": "gpl-3.0", "size": 115295 }
[ "java.util.HashMap", "java.util.Map" ]
import java.util.HashMap; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,474,933
allRenderedPropertyPaths = Collections.synchronizedSet(new HashSet<String>()); addedCollectionObjects = Collections.synchronizedMap(new HashMap<String, List<Object>>()); }
allRenderedPropertyPaths = Collections.synchronizedSet(new HashSet<String>()); addedCollectionObjects = Collections.synchronizedMap(new HashMap<String, List<Object>>()); }
/** * Invoked after the lifecycle is complete to perform an necessary cleaning. */
Invoked after the lifecycle is complete to perform an necessary cleaning
cleanAfterLifecycle
{ "repo_name": "ricepanda/rice", "path": "rice-framework/krad-web-framework/src/main/java/org/kuali/rice/krad/uif/lifecycle/ViewPostMetadata.java", "license": "apache-2.0", "size": 21036 }
[ "java.util.Collections", "java.util.HashMap", "java.util.HashSet", "java.util.List" ]
import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,859,223
private void setTaskOutputDir() { if (this.jobState.contains(ConfigurationKeys.WRITER_OUTPUT_DIR)) { LOG.warn(String.format("Property %s is deprecated. No need to use it if %s is specified.", ConfigurationKeys.WRITER_OUTPUT_DIR, ConfigurationKeys.TASK_DATA_ROOT_DIR_KEY)); } else { String...
void function() { if (this.jobState.contains(ConfigurationKeys.WRITER_OUTPUT_DIR)) { LOG.warn(String.format(STR, ConfigurationKeys.WRITER_OUTPUT_DIR, ConfigurationKeys.TASK_DATA_ROOT_DIR_KEY)); } else { String workingDir = this.jobState.getProp(ConfigurationKeys.TASK_DATA_ROOT_DIR_KEY); this.jobState.setProp(Configurat...
/** * If {@link ConfigurationKeys#WRITER_OUTPUT_DIR} (which is deprecated) is specified, use its value. * * Otherwise, if {@link ConfigurationKeys#TASK_DATA_ROOT_DIR_KEY} is specified, use its value * plus {@link #TASK_OUTPUT_DIR_NAME}. */
If <code>ConfigurationKeys#WRITER_OUTPUT_DIR</code> (which is deprecated) is specified, use its value. Otherwise, if <code>ConfigurationKeys#TASK_DATA_ROOT_DIR_KEY</code> is specified, use its value plus <code>#TASK_OUTPUT_DIR_NAME</code>
setTaskOutputDir
{ "repo_name": "jenniferzheng/gobblin", "path": "gobblin-runtime/src/main/java/org/apache/gobblin/runtime/JobContext.java", "license": "apache-2.0", "size": 21064 }
[ "org.apache.gobblin.configuration.ConfigurationKeys", "org.apache.hadoop.fs.Path" ]
import org.apache.gobblin.configuration.ConfigurationKeys; import org.apache.hadoop.fs.Path;
import org.apache.gobblin.configuration.*; import org.apache.hadoop.fs.*;
[ "org.apache.gobblin", "org.apache.hadoop" ]
org.apache.gobblin; org.apache.hadoop;
2,499,597
@Override public int findColumn(String columnLabel) throws SQLException { if (columnLabel != null && columns != null) { for (int i = 0, size = columns.size(); i < size; i++) { if (columnLabel.equalsIgnoreCase(getColumn(i).name)) { return i + 1; ...
int function(String columnLabel) throws SQLException { if (columnLabel != null && columns != null) { for (int i = 0, size = columns.size(); i < size; i++) { if (columnLabel.equalsIgnoreCase(getColumn(i).name)) { return i + 1; } } } throw DbException.get(ErrorCode.COLUMN_NOT_FOUND_1, columnLabel) .getSQLException(); }
/** * Searches for a specific column in the result set. A case-insensitive * search is made. * * @param columnLabel the column label * @return the column index (1,2,...) * @throws SQLException if the column is not found or if the result set is * closed */
Searches for a specific column in the result set. A case-insensitive search is made
findColumn
{ "repo_name": "miloszpiglas/h2mod", "path": "src/main/org/h2/tools/SimpleResultSet.java", "license": "mpl-2.0", "size": 55168 }
[ "java.sql.SQLException", "org.h2.api.ErrorCode", "org.h2.message.DbException" ]
import java.sql.SQLException; import org.h2.api.ErrorCode; import org.h2.message.DbException;
import java.sql.*; import org.h2.api.*; import org.h2.message.*;
[ "java.sql", "org.h2.api", "org.h2.message" ]
java.sql; org.h2.api; org.h2.message;
1,053,673
public RowMetaInterface getStepFields(StepMeta stepMeta, ProgressMonitorListener monitor) throws KettleStepException { clearStepFieldsCachce(); return getStepFields(stepMeta, null, monitor); }
RowMetaInterface function(StepMeta stepMeta, ProgressMonitorListener monitor) throws KettleStepException { clearStepFieldsCachce(); return getStepFields(stepMeta, null, monitor); }
/** * Returns the fields that are emitted by a certain step * * @param stepMeta * The step to be queried. * @param monitor * The progress monitor for progress dialog. (null if not used!) * @return A row containing the fields emitted. */
Returns the fields that are emitted by a certain step
getStepFields
{ "repo_name": "panbasten/imeta", "path": "imeta2.x/imeta-src/imeta/src/main/java/com/panet/imeta/trans/TransMeta.java", "license": "gpl-2.0", "size": 209743 }
[ "com.panet.imeta.core.ProgressMonitorListener", "com.panet.imeta.core.exception.KettleStepException", "com.panet.imeta.core.row.RowMetaInterface", "com.panet.imeta.trans.step.StepMeta" ]
import com.panet.imeta.core.ProgressMonitorListener; import com.panet.imeta.core.exception.KettleStepException; import com.panet.imeta.core.row.RowMetaInterface; import com.panet.imeta.trans.step.StepMeta;
import com.panet.imeta.core.*; import com.panet.imeta.core.exception.*; import com.panet.imeta.core.row.*; import com.panet.imeta.trans.step.*;
[ "com.panet.imeta" ]
com.panet.imeta;
2,303,830
protected void setExpandedState(TreePath path, boolean state) { if(path != null) { // Make sure all parents of path are expanded. Stack<TreePath> stack; TreePath parentPath = path.getParentPath(); if (expandedStack.size() == 0) { stack = new S...
void function(TreePath path, boolean state) { if(path != null) { Stack<TreePath> stack; TreePath parentPath = path.getParentPath(); if (expandedStack.size() == 0) { stack = new Stack<TreePath>(); } else { stack = expandedStack.pop(); } try { while(parentPath != null) { if(isExpanded(parentPath)) { parentPath = null; } ...
/** * Sets the expanded state of this <code>JTree</code>. * If <code>state</code> is * true, all parents of <code>path</code> and path are marked as * expanded. If <code>state</code> is false, all parents of * <code>path</code> are marked EXPANDED, but <code>path</code> itself * is marked ...
Sets the expanded state of this <code>JTree</code>. If <code>state</code> is true, all parents of <code>path</code> and path are marked as expanded. If <code>state</code> is false, all parents of <code>path</code> are marked EXPANDED, but <code>path</code> itself is marked collapsed. This will fail if a <code>TreeWillE...
setExpandedState
{ "repo_name": "mirkosertic/Bytecoder", "path": "classlib/java.desktop/src/main/resources/META-INF/modules/java.desktop/classes/javax/swing/JTree.java", "license": "apache-2.0", "size": 215008 }
[ "java.util.Enumeration", "java.util.Stack", "javax.swing.tree.ExpandVetoException", "javax.swing.tree.TreePath" ]
import java.util.Enumeration; import java.util.Stack; import javax.swing.tree.ExpandVetoException; import javax.swing.tree.TreePath;
import java.util.*; import javax.swing.tree.*;
[ "java.util", "javax.swing" ]
java.util; javax.swing;
1,403,473
@Override public void drawSeries(Canvas canvas, Paint paint, List<Float> points, XYSeriesRenderer seriesRenderer, float yAxisValue, int seriesIndex, int startIndex) { mCharts[seriesIndex].setScreenR(getScreenR()); mCharts[seriesIndex].setCalcRange(getCalcRange(mDataset.getSeriesAt(seriesIndex) ...
void function(Canvas canvas, Paint paint, List<Float> points, XYSeriesRenderer seriesRenderer, float yAxisValue, int seriesIndex, int startIndex) { mCharts[seriesIndex].setScreenR(getScreenR()); mCharts[seriesIndex].setCalcRange(getCalcRange(mDataset.getSeriesAt(seriesIndex) .getScaleNumber()), 0); mCharts[seriesIndex]...
/** * The graphical representation of a series. * * @param canvas the canvas to paint to * @param paint the paint to be used for drawing * @param points the array of points to be used for drawing the series * @param seriesRenderer the series renderer * @param yAxisValue the minimum value of the y ...
The graphical representation of a series
drawSeries
{ "repo_name": "mksmbrtsh/timestatistic", "path": "app/src/main/java/org/achartengine/chart/CombinedXYChart.java", "license": "gpl-3.0", "size": 6583 }
[ "android.graphics.Canvas", "android.graphics.Paint", "java.util.List", "org.achartengine.renderer.XYSeriesRenderer" ]
import android.graphics.Canvas; import android.graphics.Paint; import java.util.List; import org.achartengine.renderer.XYSeriesRenderer;
import android.graphics.*; import java.util.*; import org.achartengine.renderer.*;
[ "android.graphics", "java.util", "org.achartengine.renderer" ]
android.graphics; java.util; org.achartengine.renderer;
1,387,846
void setIncompatibleParameters(List<String> parameters);
void setIncompatibleParameters(List<String> parameters);
/** * Sets a list of incompatible parameters. * <hr> * @param parameters List of incompatible parameters name to set. */
Sets a list of incompatible parameters.
setIncompatibleParameters
{ "repo_name": "ressec/demeter", "path": "demeter-base/src/main/java/com/heliosphere/demeter/base/runner/parameter/configuration/IParameterConfiguration.java", "license": "apache-2.0", "size": 5389 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,181,899
JRMeasuredText measure(JRStyledText styledText, int remainingTextStart, int availableStretchHeight, boolean canOverflow);
JRMeasuredText measure(JRStyledText styledText, int remainingTextStart, int availableStretchHeight, boolean canOverflow);
/** * Fit a text chunk in a given space. * * @param styledText the full text * @param remainingTextStart the start index of the remaining text * @param availableStretchHeight the available stretch height * @param canOverflow whether the text element is able to overflow * @return text measuring informati...
Fit a text chunk in a given space
measure
{ "repo_name": "OpenSoftwareSolutions/PDFReporter", "path": "pdfreporter-core/src/org/oss/pdfreporter/engine/fill/JRTextMeasurer.java", "license": "lgpl-3.0", "size": 1887 }
[ "org.oss.pdfreporter.engine.util.JRStyledText" ]
import org.oss.pdfreporter.engine.util.JRStyledText;
import org.oss.pdfreporter.engine.util.*;
[ "org.oss.pdfreporter" ]
org.oss.pdfreporter;
578,593
private static List convertArrayToList(Object array) { int len = Array.getLength(array); List list = new ArrayList(len); for (int i = 0; i < len; i++) { list.add(Array.get(array, i)); } return list; }
static List function(Object array) { int len = Array.getLength(array); List list = new ArrayList(len); for (int i = 0; i < len; i++) { list.add(Array.get(array, i)); } return list; }
/** * This is an ugly utility method to convert an array of primitives to an * array of primitive wrapper objects. This method simplifies processing * LDAP filters since the special case of primitive arrays can be ignored. * * @param array * An array of primitive types. * @return An correspondi...
This is an ugly utility method to convert an array of primitives to an array of primitive wrapper objects. This method simplifies processing LDAP filters since the special case of primitive arrays can be ignored
convertArrayToList
{ "repo_name": "digimead-specific/PojoSRX", "path": "src/main/java/de/kalpatec/pojosr/framework/felix/framework/capabilityset/CapabilitySet.java", "license": "apache-2.0", "size": 14007 }
[ "java.lang.reflect.Array", "java.util.ArrayList", "java.util.List" ]
import java.lang.reflect.Array; import java.util.ArrayList; import java.util.List;
import java.lang.reflect.*; import java.util.*;
[ "java.lang", "java.util" ]
java.lang; java.util;
1,571,722
void delete(String name) throws CertificateException, IOException;
void delete(String name) throws CertificateException, IOException;
/** * Deletes an attribute value from this CertAttrSet. * * @param name the name of the attribute to delete. * * @exception CertificateException on attribute handling errors. * @exception IOException on other errors. */
Deletes an attribute value from this CertAttrSet
delete
{ "repo_name": "nypgit/alto", "path": "src/alto/sec/x509/CertAttrSet.java", "license": "lgpl-3.0", "size": 4817 }
[ "java.io.IOException", "java.security.cert.CertificateException" ]
import java.io.IOException; import java.security.cert.CertificateException;
import java.io.*; import java.security.cert.*;
[ "java.io", "java.security" ]
java.io; java.security;
353,418
final MongoDbException exception = new MongoDbException(); assertNull(exception.getCause()); assertNull(exception.getMessage()); }
final MongoDbException exception = new MongoDbException(); assertNull(exception.getCause()); assertNull(exception.getMessage()); }
/** * Test method for {@link MongoDbException#MongoDbException()}. */
Test method for <code>MongoDbException#MongoDbException()</code>
testMongoDbException
{ "repo_name": "allanbank/mongodb-async-driver", "path": "src/test/java/com/allanbank/mongodb/MongoDbExceptionTest.java", "license": "apache-2.0", "size": 2513 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
2,827,253
@Override public List<String> assembleUpdate() { // TODO Auto-generated method stub List<String> jsonInString = new LinkedList<String>(); LDHAUtils parser = new LDHAUtils(); String preprocess = new String (synLDUList.toString()); // Flatten the updates and strip off leading [ if(preprocess.startsWit...
List<String> function() { List<String> jsonInString = new LinkedList<String>(); LDHAUtils parser = new LDHAUtils(); String preprocess = new String (synLDUList.toString()); if(preprocess.startsWith("[")){ preprocess = preprocess.substring(1, preprocess.length()); } String chunk = new String(preprocess.toString()); if(! ...
/** * This function is used to assemble the LDupdates into * a JSON string using JSON Jackson API * @return JSON string */
This function is used to assemble the LDupdates into a JSON string using JSON Jackson API
assembleUpdate
{ "repo_name": "onebsv1/floodlightworkbench", "path": "src/main/java/net/floodlightcontroller/hasupport/linkdiscovery/LDHAWorker.java", "license": "apache-2.0", "size": 5181 }
[ "java.util.LinkedList", "java.util.List" ]
import java.util.LinkedList; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,654,221
void updateLastLookupTime(Hash key) { long time = System.currentTimeMillis(); getKBucket(key).setLastLookupTime(time); sBucket.setLastLookupTime(key, time); }
void updateLastLookupTime(Hash key) { long time = System.currentTimeMillis(); getKBucket(key).setLastLookupTime(time); sBucket.setLastLookupTime(key, time); }
/** * Updates the time at which the k-bucket for a DHT key, and the s-bucket, * was last refreshed. * @param key */
Updates the time at which the k-bucket for a DHT key, and the s-bucket, was last refreshed
updateLastLookupTime
{ "repo_name": "NoYouShutup/CryptMeme", "path": "CryptMeme/src/java/i2p/bote/network/kademlia/BucketManager.java", "license": "mit", "size": 12399 }
[ "net.i2p.data.Hash" ]
import net.i2p.data.Hash;
import net.i2p.data.*;
[ "net.i2p.data" ]
net.i2p.data;
2,305,894
protected void updateStatus(ThingStatus status, ThingStatusDetail statusDetail, String description) { synchronized (this) { if (this.callback != null) { ThingStatusInfoBuilder statusBuilder = ThingStatusInfoBuilder.create(status, statusDetail); ThingStatusInfo sta...
void function(ThingStatus status, ThingStatusDetail statusDetail, String description) { synchronized (this) { if (this.callback != null) { ThingStatusInfoBuilder statusBuilder = ThingStatusInfoBuilder.create(status, statusDetail); ThingStatusInfo statusInfo = statusBuilder.withDescription(description).build(); this.cal...
/** * Updates the status of the thing. * * @param status the status * @param statusDetail the detail of the status * @param description the description of the status * * @throws IllegalStateException * if handler is not initialized correctly, because no callback is pr...
Updates the status of the thing
updateStatus
{ "repo_name": "fatihboy/smarthome", "path": "bundles/core/org.eclipse.smarthome.core.thing/src/main/java/org/eclipse/smarthome/core/thing/binding/BaseThingHandler.java", "license": "epl-1.0", "size": 20690 }
[ "org.eclipse.smarthome.core.thing.ThingStatus", "org.eclipse.smarthome.core.thing.ThingStatusDetail", "org.eclipse.smarthome.core.thing.ThingStatusInfo", "org.eclipse.smarthome.core.thing.binding.builder.ThingStatusInfoBuilder" ]
import org.eclipse.smarthome.core.thing.ThingStatus; import org.eclipse.smarthome.core.thing.ThingStatusDetail; import org.eclipse.smarthome.core.thing.ThingStatusInfo; import org.eclipse.smarthome.core.thing.binding.builder.ThingStatusInfoBuilder;
import org.eclipse.smarthome.core.thing.*; import org.eclipse.smarthome.core.thing.binding.builder.*;
[ "org.eclipse.smarthome" ]
org.eclipse.smarthome;
2,005,102
Optional<AfterPreviousExecutionState> getAfterPreviousExecutionState();
Optional<AfterPreviousExecutionState> getAfterPreviousExecutionState();
/** * Returns the execution state after the previous execution if available. * Empty when execution history is not available. */
Returns the execution state after the previous execution if available. Empty when execution history is not available
getAfterPreviousExecutionState
{ "repo_name": "robinverduijn/gradle", "path": "subprojects/execution/src/main/java/org/gradle/internal/execution/AfterPreviousExecutionContext.java", "license": "apache-2.0", "size": 1067 }
[ "java.util.Optional", "org.gradle.internal.execution.history.AfterPreviousExecutionState" ]
import java.util.Optional; import org.gradle.internal.execution.history.AfterPreviousExecutionState;
import java.util.*; import org.gradle.internal.execution.history.*;
[ "java.util", "org.gradle.internal" ]
java.util; org.gradle.internal;
671,391
public void put( final CacheKey key, CloseableReference<PooledByteBuffer> byteBuffer) { Preconditions.checkNotNull(key); Preconditions.checkArgument(CloseableReference.isValid(byteBuffer)); // Store byteBuffer in staging area mStagingArea.put(key, byteBuffer);
void function( final CacheKey key, CloseableReference<PooledByteBuffer> byteBuffer) { Preconditions.checkNotNull(key); Preconditions.checkArgument(CloseableReference.isValid(byteBuffer)); mStagingArea.put(key, byteBuffer);
/** * Associates byteBuffer with given key in disk cache. Disk write is performed on background * thread, so the caller of this method is not blocked */
Associates byteBuffer with given key in disk cache. Disk write is performed on background thread, so the caller of this method is not blocked
put
{ "repo_name": "ppamorim/fresco", "path": "imagepipeline/src/main/java/com/facebook/imagepipeline/cache/BufferedDiskCache.java", "license": "bsd-3-clause", "size": 8507 }
[ "com.facebook.cache.common.CacheKey", "com.facebook.common.internal.Preconditions", "com.facebook.common.references.CloseableReference", "com.facebook.imagepipeline.memory.PooledByteBuffer" ]
import com.facebook.cache.common.CacheKey; import com.facebook.common.internal.Preconditions; import com.facebook.common.references.CloseableReference; import com.facebook.imagepipeline.memory.PooledByteBuffer;
import com.facebook.cache.common.*; import com.facebook.common.internal.*; import com.facebook.common.references.*; import com.facebook.imagepipeline.memory.*;
[ "com.facebook.cache", "com.facebook.common", "com.facebook.imagepipeline" ]
com.facebook.cache; com.facebook.common; com.facebook.imagepipeline;
383,312
void reset(TreeImageDisplay container, int type, Collection<TreeImageDisplay> objects , long currentGroupId, long userID) { this.dataType = type; this.objects = objects; this.container = container; populateUIWithDisplayData(findWithId(groups, currentGroupId), userID); setI...
void reset(TreeImageDisplay container, int type, Collection<TreeImageDisplay> objects , long currentGroupId, long userID) { this.dataType = type; this.objects = objects; this.container = container; populateUIWithDisplayData(findWithId(groups, currentGroupId), userID); setInputsEnabled(true); }
/** * Resets the display to the selection and group specified. * * @param container The container that is selected * @param type The data type identifier (Project / SCreen) * @param objects The objects to use. * @param currentGroupId The currently active user group. * @param userID The id of the user. ...
Resets the display to the selection and group specified
reset
{ "repo_name": "emilroz/openmicroscopy", "path": "components/insight/SRC/org/openmicroscopy/shoola/agents/fsimporter/chooser/LocationDialog.java", "license": "gpl-2.0", "size": 52206 }
[ "java.util.Collection", "org.openmicroscopy.shoola.agents.util.browser.TreeImageDisplay" ]
import java.util.Collection; import org.openmicroscopy.shoola.agents.util.browser.TreeImageDisplay;
import java.util.*; import org.openmicroscopy.shoola.agents.util.browser.*;
[ "java.util", "org.openmicroscopy.shoola" ]
java.util; org.openmicroscopy.shoola;
1,963,135
private List<TaskLockPosse> findLockPossesForTask(final Task task) { giant.lock(); try { final Iterable<TaskLockPosse> searchSpace; // Scan through all locks for this datasource final NavigableMap<Interval, TaskLockPosse> dsRunning = running.get(task.getDataSource()); if (dsRunning...
List<TaskLockPosse> function(final Task task) { giant.lock(); try { final Iterable<TaskLockPosse> searchSpace; final NavigableMap<Interval, TaskLockPosse> dsRunning = running.get(task.getDataSource()); if (dsRunning == null) { searchSpace = ImmutableList.of(); } else { searchSpace = dsRunning.values(); } return Immutab...
/** * Return the currently-active lock posses for some task. * * @param task task for which to locate locks */
Return the currently-active lock posses for some task
findLockPossesForTask
{ "repo_name": "praveev/druid", "path": "indexing-service/src/main/java/io/druid/indexing/overlord/TaskLockbox.java", "license": "apache-2.0", "size": 22008 }
[ "com.google.common.collect.ImmutableList", "com.google.common.collect.Iterables", "io.druid.indexing.common.task.Task", "java.util.List", "java.util.NavigableMap", "org.joda.time.Interval" ]
import com.google.common.collect.ImmutableList; import com.google.common.collect.Iterables; import io.druid.indexing.common.task.Task; import java.util.List; import java.util.NavigableMap; import org.joda.time.Interval;
import com.google.common.collect.*; import io.druid.indexing.common.task.*; import java.util.*; import org.joda.time.*;
[ "com.google.common", "io.druid.indexing", "java.util", "org.joda.time" ]
com.google.common; io.druid.indexing; java.util; org.joda.time;
2,603,422
public void saveState(String key, Bundle bundle) { bundle.putString(key + BUNDLE_SUFFIX_DESC, mDescription); if (mBackgroundColor != null) bundle.putInt(key + BUNDLE_SUFFIX_BGCOLOR, mBackgroundColor); bundle.putBoolean(key + BUNDLE_SUFFIX_POIS_ALLOWED, mPoisAllowed); }
void function(String key, Bundle bundle) { bundle.putString(key + BUNDLE_SUFFIX_DESC, mDescription); if (mBackgroundColor != null) bundle.putInt(key + BUNDLE_SUFFIX_BGCOLOR, mBackgroundColor); bundle.putBoolean(key + BUNDLE_SUFFIX_POIS_ALLOWED, mPoisAllowed); }
/** * Saves the state of this <code>PeriodInfo</code> to a {@link Bundle}. * @param key A String to uniquely distinguish this <code>PeriodInfo</code> from any other * objects that might be stored in the same Bundle. * @param bundle The Bundle to which to save this information. */
Saves the state of this <code>PeriodInfo</code> to a <code>Bundle</code>
saveState
{ "repo_name": "czlee/debatekeeper-old", "path": "src/net/czlee/debatekeeper/debateformat/PeriodInfo.java", "license": "gpl-3.0", "size": 7947 }
[ "android.os.Bundle" ]
import android.os.Bundle;
import android.os.*;
[ "android.os" ]
android.os;
905,619
private static <T> T getMBean(String mxbeanName, Class<T> mxbeanItf) { try { MBeanServer srv = ManagementFactory.getPlatformMBeanServer(); return ManagementFactory.newPlatformMXBeanProxy(srv, mxbeanName, mxbeanItf); } catch (IOException e) { throw new Ign...
static <T> T function(String mxbeanName, Class<T> mxbeanItf) { try { MBeanServer srv = ManagementFactory.getPlatformMBeanServer(); return ManagementFactory.newPlatformMXBeanProxy(srv, mxbeanName, mxbeanItf); } catch (IOException e) { throw new IgniteException(e); } } @SuppressWarnings({STR, STR}) public static class It...
/** * Get MXBean from the platform MBeanServer. * * @param mxbeanName The name for uniquely identifying the MXBean within an MBeanServer. * @param mxbeanItf The MXBean interface. * @return A proxy for a platform MXBean interface. */
Get MXBean from the platform MBeanServer
getMBean
{ "repo_name": "ascherbakoff/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/util/GridDebug.java", "license": "apache-2.0", "size": 12004 }
[ "java.io.IOException", "java.lang.management.ManagementFactory", "javax.management.MBeanServer", "org.apache.ignite.IgniteException" ]
import java.io.IOException; import java.lang.management.ManagementFactory; import javax.management.MBeanServer; import org.apache.ignite.IgniteException;
import java.io.*; import java.lang.management.*; import javax.management.*; import org.apache.ignite.*;
[ "java.io", "java.lang", "javax.management", "org.apache.ignite" ]
java.io; java.lang; javax.management; org.apache.ignite;
380,047
public List findRelatedOrdered( IDOLegacyEntity fromEntity, Class returningEntityClass, String returningEntityColumnToOrderBy, boolean ascending) throws IDOFinderException { try { List theReturn = findRelatedOrdered( fromEntity, com.idega.data.GenericEntity.getStaticInstance(returningEnt...
List function( IDOLegacyEntity fromEntity, Class returningEntityClass, String returningEntityColumnToOrderBy, boolean ascending) throws IDOFinderException { try { List theReturn = findRelatedOrdered( fromEntity, com.idega.data.GenericEntity.getStaticInstance(returningEntityClass), returningEntityColumnToOrderBy, ascend...
/** * Finds all instances of the returningEntityClass where it is has a * relationship (n-to-n, where n=[1..x]) with the fromEntity ordered by * column "returningEntityColumnToOrderBy" , if ascending==true ordering is * descending, else it is ascending, returns empty List if no match */
Finds all instances of the returningEntityClass where it is has a relationship (n-to-n, where n=[1..x]) with the fromEntity ordered by column "returningEntityColumnToOrderBy" , if ascending==true ordering is descending, else it is ascending, returns empty List if no match
findRelatedOrdered
{ "repo_name": "idega/platform2", "path": "src/com/idega/data/EntityFinder.java", "license": "gpl-3.0", "size": 39017 }
[ "com.idega.util.ListUtil", "java.sql.SQLException", "java.util.List" ]
import com.idega.util.ListUtil; import java.sql.SQLException; import java.util.List;
import com.idega.util.*; import java.sql.*; import java.util.*;
[ "com.idega.util", "java.sql", "java.util" ]
com.idega.util; java.sql; java.util;
1,280,189
@Test public void testFromFudgeMsg() { assertNull(ExternalIdBundleWithDatesFudgeBuilder.fromFudgeMsg(new FudgeDeserializer(OpenGammaFudgeContext.getInstance()), null)); }
void function() { assertNull(ExternalIdBundleWithDatesFudgeBuilder.fromFudgeMsg(new FudgeDeserializer(OpenGammaFudgeContext.getInstance()), null)); }
/** * Tests conversion from a null Fudge message. */
Tests conversion from a null Fudge message
testFromFudgeMsg
{ "repo_name": "McLeodMoores/starling", "path": "projects/util/src/test/java/com/opengamma/id/ExternalIdBundleWithDatesFudgeEncodingTest.java", "license": "apache-2.0", "size": 2940 }
[ "com.opengamma.util.fudgemsg.OpenGammaFudgeContext", "org.fudgemsg.mapping.FudgeDeserializer", "org.testng.AssertJUnit" ]
import com.opengamma.util.fudgemsg.OpenGammaFudgeContext; import org.fudgemsg.mapping.FudgeDeserializer; import org.testng.AssertJUnit;
import com.opengamma.util.fudgemsg.*; import org.fudgemsg.mapping.*; import org.testng.*;
[ "com.opengamma.util", "org.fudgemsg.mapping", "org.testng" ]
com.opengamma.util; org.fudgemsg.mapping; org.testng;
12,372
public SortableBehavior setChangeEvent(JsScopeUiEvent change) { this.options.put("change", change); return this; }
SortableBehavior function(JsScopeUiEvent change) { this.options.put(STR, change); return this; }
/** * Set's the callback during sorting, but only when the DOM position has changed. * * @param change * @return instance of the current behavior */
Set's the callback during sorting, but only when the DOM position has changed
setChangeEvent
{ "repo_name": "WiQuery/wiquery", "path": "wiquery-jquery-ui/src/main/java/org/odlabs/wiquery/ui/sortable/SortableBehavior.java", "license": "mit", "size": 31703 }
[ "org.odlabs.wiquery.ui.core.JsScopeUiEvent" ]
import org.odlabs.wiquery.ui.core.JsScopeUiEvent;
import org.odlabs.wiquery.ui.core.*;
[ "org.odlabs.wiquery" ]
org.odlabs.wiquery;
2,452,587
ExecutionSummary readPausedExecution(Long executionId, String branchId);
ExecutionSummary readPausedExecution(Long executionId, String branchId);
/** * Returns the execution if its status is Paused*. Otherwise returns null. * * @param executionId id of the execution * @param branchId id of the branch * @return the execution if its status is Paused*. Otherwise returns null. */
Returns the execution if its status is Paused*. Otherwise returns null
readPausedExecution
{ "repo_name": "orius123/slite", "path": "engine/orchestrator/score-orchestrator-api/src/main/java/org/openscore/orchestrator/services/PauseResumeService.java", "license": "apache-2.0", "size": 2931 }
[ "org.openscore.facade.execution.ExecutionSummary" ]
import org.openscore.facade.execution.ExecutionSummary;
import org.openscore.facade.execution.*;
[ "org.openscore.facade" ]
org.openscore.facade;
2,062,111
public int getNumObjectType() { if ( objectType == null ) { objectType = (MFString)getField( "objectType" ); } return( objectType.getSize( ) ); }
int function() { if ( objectType == null ) { objectType = (MFString)getField( STR ); } return( objectType.getSize( ) ); }
/** Return the number of MFString items in the objectType field. * @return the number of MFString items in the objectType field. */
Return the number of MFString items in the objectType field
getNumObjectType
{ "repo_name": "Norkart/NK-VirtualGlobe", "path": "Xj3D/src/java/org/xj3d/sai/internal/node/pickingsensor/SAIPrimitivePicker.java", "license": "gpl-2.0", "size": 6633 }
[ "org.web3d.x3d.sai.MFString" ]
import org.web3d.x3d.sai.MFString;
import org.web3d.x3d.sai.*;
[ "org.web3d.x3d" ]
org.web3d.x3d;
208,443
protected HttpResponse doGet(ServiceRequestContext ctx, HttpRequest req) throws Exception { return HttpResponse.of(HttpStatus.METHOD_NOT_ALLOWED); }
HttpResponse function(ServiceRequestContext ctx, HttpRequest req) throws Exception { return HttpResponse.of(HttpStatus.METHOD_NOT_ALLOWED); }
/** * Handles a {@link HttpMethod#GET GET} request. * This method sends a {@link HttpStatus#METHOD_NOT_ALLOWED 405 Method Not Allowed} response by default. */
Handles a <code>HttpMethod#GET GET</code> request. This method sends a <code>HttpStatus#METHOD_NOT_ALLOWED 405 Method Not Allowed</code> response by default
doGet
{ "repo_name": "minwoox/armeria", "path": "core/src/main/java/com/linecorp/armeria/server/AbstractHttpService.java", "license": "apache-2.0", "size": 5658 }
[ "com.linecorp.armeria.common.HttpRequest", "com.linecorp.armeria.common.HttpResponse", "com.linecorp.armeria.common.HttpStatus" ]
import com.linecorp.armeria.common.HttpRequest; import com.linecorp.armeria.common.HttpResponse; import com.linecorp.armeria.common.HttpStatus;
import com.linecorp.armeria.common.*;
[ "com.linecorp.armeria" ]
com.linecorp.armeria;
2,048,372
public void testReceive_UnconnectedBufEmpty() throws Exception { this.channel1.configureBlocking(false); assertFalse(this.channel1.isConnected()); ByteBuffer dst = ByteBuffer.allocateDirect(CAPACITY_NORMAL); assertNull(this.channel1.receive(dst)); }
void function() throws Exception { this.channel1.configureBlocking(false); assertFalse(this.channel1.isConnected()); ByteBuffer dst = ByteBuffer.allocateDirect(CAPACITY_NORMAL); assertNull(this.channel1.receive(dst)); }
/** * Test method for 'DatagramChannelImpl.receive(ByteBuffer)' */
Test method for 'DatagramChannelImpl.receive(ByteBuffer)'
testReceive_UnconnectedBufEmpty
{ "repo_name": "bandcampdotcom/j2objc", "path": "jre_emul/android/platform/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/nio/channels/DatagramChannelTest.java", "license": "apache-2.0", "size": 90487 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
1,478,265
public void setCancelAction(IAction cancelAction) { this.cancelAction = cancelAction; }
void function(IAction cancelAction) { this.cancelAction = cancelAction; }
/** * Assigns the action to execute when the user cancels the option. * * @param cancelAction * the cancelAction to set. */
Assigns the action to execute when the user cancels the option
setCancelAction
{ "repo_name": "jspresso/jspresso-ce", "path": "application/src/main/java/org/jspresso/framework/application/frontend/action/flow/YesNoCancelAction.java", "license": "lgpl-3.0", "size": 3567 }
[ "org.jspresso.framework.action.IAction" ]
import org.jspresso.framework.action.IAction;
import org.jspresso.framework.action.*;
[ "org.jspresso.framework" ]
org.jspresso.framework;
840,970
@Test public void whenGetAllThenExpectedArray() { this.init(); this.resultArray = tracker.getAll(); assertArrayEquals(this.expectedArray, this.resultArray); }
void function() { this.init(); this.resultArray = tracker.getAll(); assertArrayEquals(this.expectedArray, this.resultArray); }
/** * Tests getAll method of the tracker. */
Tests getAll method of the tracker
whenGetAllThenExpectedArray
{ "repo_name": "dionisius1976/java-a-to-z", "path": "chapter_002/6_abstract/src/test/java/ru/dionisius/service/TrackerTest.java", "license": "apache-2.0", "size": 3256 }
[ "org.junit.Assert" ]
import org.junit.Assert;
import org.junit.*;
[ "org.junit" ]
org.junit;
519,378
public Adapter createDistributedSystemAdapter() { if (distributedSystemItemProvider == null) { distributedSystemItemProvider = new DistributedSystemItemProvider(this); } return distributedSystemItemProvider; } protected RoleItemProvider roleItemProvider;
Adapter function() { if (distributedSystemItemProvider == null) { distributedSystemItemProvider = new DistributedSystemItemProvider(this); } return distributedSystemItemProvider; } protected RoleItemProvider roleItemProvider;
/** * This creates an adapter for a {@link model.DistributedSystem}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This creates an adapter for a <code>model.DistributedSystem</code>.
createDistributedSystemAdapter
{ "repo_name": "alexlenk/CloudStandby", "path": "org/cloudstandby/model.edit/src/model/provider/ModelItemProviderAdapterFactory.java", "license": "agpl-3.0", "size": 21445 }
[ "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,642,984
void onTestsLoadingFinished(boolean success, final Collection<String> testNames);
void onTestsLoadingFinished(boolean success, final Collection<String> testNames);
/** * Callback method is called on finishing loading of a test binary. * @param success an indicator whether loading succeed or not * @param testNames a list of test names read from the test binary */
Callback method is called on finishing loading of a test binary
onTestsLoadingFinished
{ "repo_name": "NeutrinoProject/TestRunner", "path": "src/com/neutrinoproject/testrunner/ui/TestRunnerHandler.java", "license": "mit", "size": 1410 }
[ "java.util.Collection" ]
import java.util.Collection;
import java.util.*;
[ "java.util" ]
java.util;
2,750,117
public static AsyncCompressedCubemapTexture get() { if (sInstance != null) { return sInstance; } synchronized (AsyncBitmapTexture.class) { sInstance = new AsyncCompressedCubemapTexture(); } return sInstance; } private AsyncCompressedCubemapT...
static AsyncCompressedCubemapTexture function() { if (sInstance != null) { return sInstance; } synchronized (AsyncBitmapTexture.class) { sInstance = new AsyncCompressedCubemapTexture(); } return sInstance; } private AsyncCompressedCubemapTexture() { AsyncManager.get().registerDatatype(TEXTURE_CLASS, new AsyncLoaderFact...
/** * Gets the {@link AsyncCompressedCubemapTexture} singleton for loading bitmap textures. * @return The {@link AsyncCompressedCubemapTexture} singleton. */
Gets the <code>AsyncCompressedCubemapTexture</code> singleton for loading bitmap textures
get
{ "repo_name": "mingsong/GearVRf", "path": "GVRf/Framework/src/org/gearvrf/asynchronous/AsyncCompressedCubemapTexture.java", "license": "apache-2.0", "size": 5915 }
[ "org.gearvrf.GVRCompressedCubemapTexture", "org.gearvrf.asynchronous.Throttler" ]
import org.gearvrf.GVRCompressedCubemapTexture; import org.gearvrf.asynchronous.Throttler;
import org.gearvrf.*; import org.gearvrf.asynchronous.*;
[ "org.gearvrf", "org.gearvrf.asynchronous" ]
org.gearvrf; org.gearvrf.asynchronous;
1,918,504
void commitSegment(Segment segment) throws IOException;
void commitSegment(Segment segment) throws IOException;
/** * Call this function when data load or compaction is completed successfully. */
Call this function when data load or compaction is completed successfully
commitSegment
{ "repo_name": "nehabhardwaj01/incubator-carbondata", "path": "hadoop/src/main/java/org/apache/carbondata/hadoop/internal/segment/SegmentManager.java", "license": "apache-2.0", "size": 1749 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
577,864
@Deprecated private void updateFlow(String feedName, boolean isStream, String feedProcessGroupId, Collection<NifiFlowProcessor> processors, Collection<NifiFlowConnection> connections, boolean notifyClusterMembers) { feedProcessorIdProcessorMap.put(feedName, toProcessorIdProc...
void function(String feedName, boolean isStream, String feedProcessGroupId, Collection<NifiFlowProcessor> processors, Collection<NifiFlowConnection> connections, boolean notifyClusterMembers) { feedProcessorIdProcessorMap.put(feedName, toProcessorIdProcessorMap(processors)); updateProcessorIdMaps(feedProcessGroupId, pr...
/** * updateFlowForFeed is now being used */
updateFlowForFeed is now being used
updateFlow
{ "repo_name": "claudiu-stanciu/kylo", "path": "services/feed-manager-service/feed-manager-controller/src/main/java/com/thinkbiganalytics/feedmgr/nifi/cache/NifiFlowCacheImpl.java", "license": "apache-2.0", "size": 38026 }
[ "com.thinkbiganalytics.nifi.rest.model.flow.NifiFlowConnection", "com.thinkbiganalytics.nifi.rest.model.flow.NifiFlowProcessor", "java.util.Collection", "java.util.Map", "java.util.stream.Collectors", "org.joda.time.DateTime" ]
import com.thinkbiganalytics.nifi.rest.model.flow.NifiFlowConnection; import com.thinkbiganalytics.nifi.rest.model.flow.NifiFlowProcessor; import java.util.Collection; import java.util.Map; import java.util.stream.Collectors; import org.joda.time.DateTime;
import com.thinkbiganalytics.nifi.rest.model.flow.*; import java.util.*; import java.util.stream.*; import org.joda.time.*;
[ "com.thinkbiganalytics.nifi", "java.util", "org.joda.time" ]
com.thinkbiganalytics.nifi; java.util; org.joda.time;
2,865,486
int vaoID = createVAO(); this.storeDataInAttributeList(0, dimensions, positions); unbindVAO(); return new RawModel(vaoID, positions.length / dimensions); }
int vaoID = createVAO(); this.storeDataInAttributeList(0, dimensions, positions); unbindVAO(); return new RawModel(vaoID, positions.length / dimensions); }
/** * Load an array of positions and a dimension * * @param positions * Array of Positions * @param dimensions * Dimension * @return RawModel */
Load an array of positions and a dimension
loadToVAO
{ "repo_name": "Guerra24/NanoUI", "path": "nanoui-core/src/main/java/net/luxvacuos/nanoui/rendering/opengl/GLResourceLoader.java", "license": "gpl-3.0", "size": 7508 }
[ "net.luxvacuos.nanoui.rendering.objects.RawModel" ]
import net.luxvacuos.nanoui.rendering.objects.RawModel;
import net.luxvacuos.nanoui.rendering.objects.*;
[ "net.luxvacuos.nanoui" ]
net.luxvacuos.nanoui;
2,670,808
public String getKeyFields() { if (ClassKeyHelper.hasKeyFields(classKeys, endCls)) { return StringUtil.prettyList(ClassKeyHelper.getKeyFieldNames(classKeys, endCls), true); } return null; }
String function() { if (ClassKeyHelper.hasKeyFields(classKeys, endCls)) { return StringUtil.prettyList(ClassKeyHelper.getKeyFieldNames(classKeys, endCls), true); } return null; }
/** * Return the key fields for this path as a formatted string, for use in LOOKUP help message. * @return a formatted string listing key fields for this path */
Return the key fields for this path as a formatted string, for use in LOOKUP help message
getKeyFields
{ "repo_name": "julie-sullivan/phytomine", "path": "intermine/web/main/src/org/intermine/web/logic/query/DisplayConstraint.java", "license": "lgpl-2.1", "size": 33676 }
[ "org.intermine.api.config.ClassKeyHelper", "org.intermine.metadata.StringUtil" ]
import org.intermine.api.config.ClassKeyHelper; import org.intermine.metadata.StringUtil;
import org.intermine.api.config.*; import org.intermine.metadata.*;
[ "org.intermine.api", "org.intermine.metadata" ]
org.intermine.api; org.intermine.metadata;
353,332
public void mapContexts() { PathMap contextMap = new PathMap(); Handler[] branches = getHandlers(); for (int b=0;branches!=null && b<branches.length;b++) { Handler[] handlers=null; if (branches[b] instanceof ContextHandl...
void function() { PathMap contextMap = new PathMap(); Handler[] branches = getHandlers(); for (int b=0;branches!=null && b<branches.length;b++) { Handler[] handlers=null; if (branches[b] instanceof ContextHandler) { handlers = new Handler[]{ branches[b] }; } else if (branches[b] instanceof HandlerContainer) { handlers ...
/** * Remap the context paths. */
Remap the context paths
mapContexts
{ "repo_name": "xmpace/jetty-read", "path": "jetty-server/src/main/java/org/eclipse/jetty/server/handler/ContextHandlerCollection.java", "license": "apache-2.0", "size": 11505 }
[ "java.util.HashMap", "java.util.Map", "org.eclipse.jetty.http.PathMap", "org.eclipse.jetty.server.Handler", "org.eclipse.jetty.server.HandlerContainer", "org.eclipse.jetty.util.LazyList" ]
import java.util.HashMap; import java.util.Map; import org.eclipse.jetty.http.PathMap; import org.eclipse.jetty.server.Handler; import org.eclipse.jetty.server.HandlerContainer; import org.eclipse.jetty.util.LazyList;
import java.util.*; import org.eclipse.jetty.http.*; import org.eclipse.jetty.server.*; import org.eclipse.jetty.util.*;
[ "java.util", "org.eclipse.jetty" ]
java.util; org.eclipse.jetty;
689,567
protected Keyword[] getKeywordsForJoinType() { return new Keyword[0]; }
Keyword[] function() { return new Keyword[0]; }
/** * Get keywords for join type. * * @return new Keyword object array */
Get keywords for join type
getKeywordsForJoinType
{ "repo_name": "dangdangdotcom/sharding-jdbc", "path": "sharding-core/src/main/java/io/shardingsphere/core/parsing/parser/clause/TableReferencesClauseParser.java", "license": "apache-2.0", "size": 9014 }
[ "io.shardingsphere.core.parsing.lexer.token.Keyword" ]
import io.shardingsphere.core.parsing.lexer.token.Keyword;
import io.shardingsphere.core.parsing.lexer.token.*;
[ "io.shardingsphere.core" ]
io.shardingsphere.core;
1,571,781
public static boolean hasKerberosTicket(Subject subject) { return !subject.getPrivateCredentials(KerberosTicket.class).isEmpty(); }
static boolean function(Subject subject) { return !subject.getPrivateCredentials(KerberosTicket.class).isEmpty(); }
/** * Check if the subject contains Kerberos ticket. * * * @param subject subject to be checked * @return true if the subject contains Kerberos ticket */
Check if the subject contains Kerberos ticket
hasKerberosTicket
{ "repo_name": "dennishuo/hadoop", "path": "hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/util/KerberosUtil.java", "license": "apache-2.0", "size": 15495 }
[ "javax.security.auth.Subject", "javax.security.auth.kerberos.KerberosTicket" ]
import javax.security.auth.Subject; import javax.security.auth.kerberos.KerberosTicket;
import javax.security.auth.*; import javax.security.auth.kerberos.*;
[ "javax.security" ]
javax.security;
918,926
public void testSubmitWithDoneFlag() throws Exception { Configuration conf = new XConfiguration(); String appPath = "file://" + getTestCaseDir() + File.separator + "coordinator.xml"; String appXml = "<coordinator-app name=\"NAME\" frequency=\"${coord:days(1)}\" start=\"2009-02-01T01:00Z\" en...
void function() throws Exception { Configuration conf = new XConfiguration(); String appPath = STR<coordinator-app name=\"NAME\" frequency=\STR start=\STR end=\STR timezone=\"UTC\" STRxmlns=\STR> <controls> <timeout>10</timeout> <concurrency>2</concurrency> STR<execution>LIFO</execution> </controls> <datasets> STR<data...
/** * Test Done Flag in Schema * * @throws Exception */
Test Done Flag in Schema
testSubmitWithDoneFlag
{ "repo_name": "terrancesnyder/oozie-hadoop2", "path": "core/src/test/java/org/apache/oozie/command/coord/TestCoordSubmitXCommand.java", "license": "apache-2.0", "size": 54061 }
[ "org.apache.hadoop.conf.Configuration", "org.apache.oozie.util.XConfiguration" ]
import org.apache.hadoop.conf.Configuration; import org.apache.oozie.util.XConfiguration;
import org.apache.hadoop.conf.*; import org.apache.oozie.util.*;
[ "org.apache.hadoop", "org.apache.oozie" ]
org.apache.hadoop; org.apache.oozie;
1,945,507
@RunsInEDT public void selectTab(@Nonnull JTabbedPane tabbedPane, @Nonnull Pattern pattern) { selectTab(tabbedPane, new PatternTextMatcher(pattern)); }
void function(@Nonnull JTabbedPane tabbedPane, @Nonnull Pattern pattern) { selectTab(tabbedPane, new PatternTextMatcher(pattern)); }
/** * Simulates a user selecting the tab whose title matches the given regular expression pattern. * * @param tabbedPane the target {@code JTabbedPane}. * @param pattern the regular expression pattern to match. * @throws IllegalStateException if the {@code JTabbedPane} is disabled. * @throws IllegalSt...
Simulates a user selecting the tab whose title matches the given regular expression pattern
selectTab
{ "repo_name": "google/fest", "path": "third_party/fest-swing/src/main/java/org/fest/swing/driver/JTabbedPaneDriver.java", "license": "apache-2.0", "size": 12117 }
[ "java.util.regex.Pattern", "javax.annotation.Nonnull", "javax.swing.JTabbedPane", "org.fest.swing.util.PatternTextMatcher" ]
import java.util.regex.Pattern; import javax.annotation.Nonnull; import javax.swing.JTabbedPane; import org.fest.swing.util.PatternTextMatcher;
import java.util.regex.*; import javax.annotation.*; import javax.swing.*; import org.fest.swing.util.*;
[ "java.util", "javax.annotation", "javax.swing", "org.fest.swing" ]
java.util; javax.annotation; javax.swing; org.fest.swing;
131,526
protected void sequence_Language(ISerializationContext context, Language semanticObject) { genericSequencer.createSequence(context, semanticObject); }
void function(ISerializationContext context, Language semanticObject) { genericSequencer.createSequence(context, semanticObject); }
/** * Contexts: * Element returns Language * Language returns Language * * Constraint: * ( * (xmof=STRING | fileExtension=STRING | annotations+=Annotation)? * (xtext+=STRING xtext+=STRING*)? * (sirius+=STRING sirius+=STRING*)? * (exactTypeName=ValidID e...
Contexts: Element returns Language Language returns Language Constraint: ( (xmof=STRING | fileExtension=STRING | annotations+=Annotation)? (xtext+=STRING xtext+=STRING*)? (sirius+=STRING sirius+=STRING*)? (exactTypeName=ValidID exactTypeUri=STRING?)? (ecl+=STRING ecl+=STRING*)? (resourceType=ResourceType (resourceUri=S...
sequence_Language
{ "repo_name": "diverse-project/melange", "path": "plugins/fr.inria.diverse.melange/src-gen/fr/inria/diverse/melange/serializer/MelangeSemanticSequencer.java", "license": "epl-1.0", "size": 31055 }
[ "fr.inria.diverse.melange.metamodel.melange.Language", "org.eclipse.xtext.serializer.ISerializationContext" ]
import fr.inria.diverse.melange.metamodel.melange.Language; import org.eclipse.xtext.serializer.ISerializationContext;
import fr.inria.diverse.melange.metamodel.melange.*; import org.eclipse.xtext.serializer.*;
[ "fr.inria.diverse", "org.eclipse.xtext" ]
fr.inria.diverse; org.eclipse.xtext;
684,670
public ControlRow getLeftChild(OpenBTree open_btree) throws StandardException { return(ControlRow.get(open_btree, this.getLeftChildPageno())); }
ControlRow function(OpenBTree open_btree) throws StandardException { return(ControlRow.get(open_btree, this.getLeftChildPageno())); }
/** * Return the left child pointer for the page. * <p> * Leaf pages don't have children, so they override this and return null. * * @return The page which is the leftmost child of this page. * * @param open_btree The open btree to associate latches/locks with. * * @exception St...
Return the left child pointer for the page. Leaf pages don't have children, so they override this and return null
getLeftChild
{ "repo_name": "lpxz/grail-derby104", "path": "java/engine/org/apache/derby/impl/store/access/btree/BranchControlRow.java", "license": "apache-2.0", "size": 53906 }
[ "org.apache.derby.iapi.error.StandardException" ]
import org.apache.derby.iapi.error.StandardException;
import org.apache.derby.iapi.error.*;
[ "org.apache.derby" ]
org.apache.derby;
2,630,144
public Bitmap getIconBitmap() { String icon = options.optString("icon", "icon"); Bitmap bmp; try{ Uri uri = Uri.parse(options.optString("iconUri")); bmp = assets.getIconFromUri(uri); } catch (Exception e){ bmp = assets.getIconFromDrawable(...
Bitmap function() { String icon = options.optString("icon", "icon"); Bitmap bmp; try{ Uri uri = Uri.parse(options.optString(STR)); bmp = assets.getIconFromUri(uri); } catch (Exception e){ bmp = assets.getIconFromDrawable(icon); } return bmp; }
/** * Icon bitmap for the local notification. */
Icon bitmap for the local notification
getIconBitmap
{ "repo_name": "sysfolko/sysfolko-de.appplant.cordova.plugin.local-notification-sysfo-fix", "path": "src/android/notification/Options.java", "license": "apache-2.0", "size": 9896 }
[ "android.graphics.Bitmap", "android.net.Uri" ]
import android.graphics.Bitmap; import android.net.Uri;
import android.graphics.*; import android.net.*;
[ "android.graphics", "android.net" ]
android.graphics; android.net;
1,588,478
public List<Series> findByUnfreezedate(Timestamp unfreezedate);
List<Series> function(Timestamp unfreezedate);
/** * Find Series by unfreezedate */
Find Series by unfreezedate
findByUnfreezedate
{ "repo_name": "faramir/ZawodyWeb", "path": "database/src/main/java/pl/umk/mat/zawodyweb/database/SeriesDAO.java", "license": "bsd-2-clause", "size": 1610 }
[ "java.sql.Timestamp", "java.util.List", "pl.umk.mat.zawodyweb.database.pojo.Series" ]
import java.sql.Timestamp; import java.util.List; import pl.umk.mat.zawodyweb.database.pojo.Series;
import java.sql.*; import java.util.*; import pl.umk.mat.zawodyweb.database.pojo.*;
[ "java.sql", "java.util", "pl.umk.mat" ]
java.sql; java.util; pl.umk.mat;
1,847,649