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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
private void updateBackgroundColor() {
mBackgroundColorPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
mBackgroundColorPaint.setColor(mProgressBackgroundColor);
mBackgroundColorPaint.setStyle(Paint.Style.STROKE);
mBackgroundColorPaint.setStrokeWidth(mCircleStrokeWidth);
invalidate... | void function() { mBackgroundColorPaint = new Paint(Paint.ANTI_ALIAS_FLAG); mBackgroundColorPaint.setColor(mProgressBackgroundColor); mBackgroundColorPaint.setStyle(Paint.Style.STROKE); mBackgroundColorPaint.setStrokeWidth(mCircleStrokeWidth); invalidate(); } | /**
* updates the paint of the background
*/ | updates the paint of the background | updateBackgroundColor | {
"repo_name": "xiayouli0122/Wardroid",
"path": "src/com/example/ward/view/progressbar/HoloCircularProgressBar.java",
"license": "apache-2.0",
"size": 20400
} | [
"android.graphics.Paint"
] | import android.graphics.Paint; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 2,601,203 |
void enterConstNull(@NotNull CQLParser.ConstNullContext ctx);
void exitConstNull(@NotNull CQLParser.ConstNullContext ctx); | void enterConstNull(@NotNull CQLParser.ConstNullContext ctx); void exitConstNull(@NotNull CQLParser.ConstNullContext ctx); | /**
* Exit a parse tree produced by {@link CQLParser#constNull}.
* @param ctx the parse tree
*/ | Exit a parse tree produced by <code>CQLParser#constNull</code> | exitConstNull | {
"repo_name": "jack6215/StreamCQL",
"path": "cql/src/main/java/com/huawei/streaming/cql/semanticanalyzer/parser/CQLParserListener.java",
"license": "apache-2.0",
"size": 62500
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 2,115,576 |
private synchronized void stop(int numOfServicesStarted,
boolean stopOnlyStartedServices) {
// stop in reverse order of start
Exception firstException = null;
List<Service> services = getServices();
for (int i = numOfServicesStarted - 1; i >= 0; i--) {
Service se... | synchronized void function(int numOfServicesStarted, boolean stopOnlyStartedServices) { Exception firstException = null; List<Service> services = getServices(); for (int i = numOfServicesStarted - 1; i >= 0; i--) { Service service = services.get(i); if (LOG.isDebugEnabled()) { LOG.debug(STR + i + STR + service); } STAT... | /**
* Stop the services in reverse order
*
* @param numOfServicesStarted index from where the stop should work
* @param stopOnlyStartedServices flag to say "only start services that are
* started, not those that are NOTINITED or INITED.
* @throws RuntimeException the first exception raised during the
... | Stop the services in reverse order | stop | {
"repo_name": "jsrudani/HadoopHDFSProject",
"path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/service/CompositeService.java",
"license": "apache-2.0",
"size": 6170
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,410,606 |
public void loadUrl(String url, Map<String, String> additionalHttpHeaders) {
checkThread();
if (DebugFlags.TRACE_API) Log.d(LOGTAG, "loadUrl(extra headers)=" + url);
mProvider.loadUrl(url, additionalHttpHeaders);
} | void function(String url, Map<String, String> additionalHttpHeaders) { checkThread(); if (DebugFlags.TRACE_API) Log.d(LOGTAG, STR + url); mProvider.loadUrl(url, additionalHttpHeaders); } | /**
* Loads the given URL with the specified additional HTTP headers.
*
* @param url the URL of the resource to load
* @param additionalHttpHeaders the additional headers to be used in the
* HTTP request for this URL, specified as a map from name to
* value. Note that... | Loads the given URL with the specified additional HTTP headers | loadUrl | {
"repo_name": "JuudeDemos/android-sdk-20",
"path": "src/android/webkit/WebView.java",
"license": "apache-2.0",
"size": 90292
} | [
"android.util.Log",
"java.util.Map"
] | import android.util.Log; import java.util.Map; | import android.util.*; import java.util.*; | [
"android.util",
"java.util"
] | android.util; java.util; | 767,681 |
@SuppressWarnings("unused")
public void setContextMap(final Map<String, String> map) {
// this entity is write-only
} | @SuppressWarnings(STR) void function(final Map<String, String> map) { } | /**
* A no-op mutator to satisfy JPA requirements, as this entity is write-only.
*
* @param map Ignored.
*/ | A no-op mutator to satisfy JPA requirements, as this entity is write-only | setContextMap | {
"repo_name": "xnslong/logging-log4j2",
"path": "log4j-core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/AbstractLogEventWrapperEntity.java",
"license": "apache-2.0",
"size": 11513
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 298,748 |
private void assertContent(String expected, HttpURLConnection connection, int limit)
throws IOException {
connection.connect();
assertEquals(expected, readAscii(connection.getInputStream(), limit));
} | void function(String expected, HttpURLConnection connection, int limit) throws IOException { connection.connect(); assertEquals(expected, readAscii(connection.getInputStream(), limit)); } | /**
* Reads at most {@code limit} characters from {@code in} and asserts that content equals {@code
* expected}.
*/ | Reads at most limit characters from in and asserts that content equals expected | assertContent | {
"repo_name": "germanattanasio/okhttp",
"path": "okhttp-tests/src/test/java/okhttp3/URLConnectionTest.java",
"license": "apache-2.0",
"size": 144279
} | [
"java.io.IOException",
"java.net.HttpURLConnection",
"org.junit.Assert"
] | import java.io.IOException; import java.net.HttpURLConnection; import org.junit.Assert; | import java.io.*; import java.net.*; import org.junit.*; | [
"java.io",
"java.net",
"org.junit"
] | java.io; java.net; org.junit; | 1,339,890 |
static public String sendHttpDeleteRequest(String url) {
return HttpUtil.executeUrl("DELETE", url, 1000);
}
| static String function(String url) { return HttpUtil.executeUrl(STR, url, 1000); } | /**
* Send out a DELETE-HTTP request. Errors will be logged, returned values just ignored.
*
* @param url the URL to be used for the DELETE request.
* @return the response body or <code>NULL</code> when the request went wrong
*/ | Send out a DELETE-HTTP request. Errors will be logged, returned values just ignored | sendHttpDeleteRequest | {
"repo_name": "Shibonja/openhab2",
"path": "bundles/core/org.openhab.core.compat1x/src/main/java/org/openhab/io/net/actions/HTTP.java",
"license": "epl-1.0",
"size": 3512
} | [
"org.openhab.io.net.http.HttpUtil"
] | import org.openhab.io.net.http.HttpUtil; | import org.openhab.io.net.http.*; | [
"org.openhab.io"
] | org.openhab.io; | 1,440,167 |
private static Element addElement(Document doc, Node parent, String tagName,
String attr1, String val1, String attr2, String val2) {
Element elem = doc.createElement(tagName);
if (attr1 != null)
elem.setAttribute(attr1, val1);
if (attr2 != null)
elem.setAttr... | static Element function(Document doc, Node parent, String tagName, String attr1, String val1, String attr2, String val2) { Element elem = doc.createElement(tagName); if (attr1 != null) elem.setAttribute(attr1, val1); if (attr2 != null) elem.setAttribute(attr2, val2); parent.appendChild(elem); return elem; } | /**
* Add element to XML document.
*
* @param doc XML document.
* @param parent Parent XML node.
* @param tagName XML tag name.
* @param attr1 Name for first attr.
* @param val1 Value for first attribute.
* @param attr2 Name for second attr.
* @param val2 Value for second at... | Add element to XML document | addElement | {
"repo_name": "DoudTechData/ignite",
"path": "modules/schema-import/src/main/java/org/apache/ignite/schema/generator/XmlGenerator.java",
"license": "apache-2.0",
"size": 17319
} | [
"org.w3c.dom.Document",
"org.w3c.dom.Element",
"org.w3c.dom.Node"
] | import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 16,964 |
public final StoredSortedMap getShipmentMap() {
return shipmentMap;
} | final StoredSortedMap function() { return shipmentMap; } | /**
* Return a map view of the shipment storage container.
*/ | Return a map view of the shipment storage container | getShipmentMap | {
"repo_name": "mxrrow/zaicoin",
"path": "src/deps/db/examples_java/src/collections/ship/index/SampleViews.java",
"license": "mit",
"size": 5178
} | [
"com.sleepycat.collections.StoredSortedMap"
] | import com.sleepycat.collections.StoredSortedMap; | import com.sleepycat.collections.*; | [
"com.sleepycat.collections"
] | com.sleepycat.collections; | 149,818 |
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException,
NoSuchMethodException, SecurityException, IllegalArgumentException,
InvocationTargetException
{
CustomClassLoader loader = new CustomClassLoader();
... | static void function(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException, NoSuchMethodException, SecurityException, IllegalArgumentException, InvocationTargetException { CustomClassLoader loader = new CustomClassLoader(); Class<?> c = loader.findClass(STR); Object o = c.newInsta... | /**
* Simple usage of the CustomClassLoader implementation
*
* @param args
* @throws ClassNotFoundException
* @throws IllegalAccessException
* @throws InstantiationException
* @throws SecurityException
* @throws NoSuchMethodException
* @throws InvocationTargetException
... | Simple usage of the CustomClassLoader implementation | main | {
"repo_name": "notarip/appinfo",
"path": "semantic/analisis/src/main/java/ar/com/notarip/semantic/analisis/util/CustomClassLoader.java",
"license": "mit",
"size": 2901
} | [
"java.lang.reflect.InvocationTargetException",
"java.lang.reflect.Method"
] | import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 1,086,541 |
public boolean isClientInCollection(ClientId searchParam, Iterable<ClientId> searched) {
ClientId searchResult = Iterables.find(searched,
input -> (input.memberEquals(searchParam)
&& Objects.equals(input.getSubsystemCode(), searchParam.getSubsystemCode())), null);
... | boolean function(ClientId searchParam, Iterable<ClientId> searched) { ClientId searchResult = Iterables.find(searched, input -> (input.memberEquals(searchParam) && Objects.equals(input.getSubsystemCode(), searchParam.getSubsystemCode())), null); return (searchResult != null); } | /**
* Takes one ClientId object, and searches whether it is in searched group of ClientIds
* @param searchParam ClientId to search
* @param searched collection to search from
* @return true if ClientId is in the collection
*/ | Takes one ClientId object, and searches whether it is in searched group of ClientIds | isClientInCollection | {
"repo_name": "ria-ee/X-Road",
"path": "src/addons/messagelog/src/main/java/ee/ria/xroad/proxy/messagelog/SoapMessageBodyManipulator.java",
"license": "mit",
"size": 6025
} | [
"com.google.common.collect.Iterables",
"ee.ria.xroad.common.identifier.ClientId",
"java.util.Objects"
] | import com.google.common.collect.Iterables; import ee.ria.xroad.common.identifier.ClientId; import java.util.Objects; | import com.google.common.collect.*; import ee.ria.xroad.common.identifier.*; import java.util.*; | [
"com.google.common",
"ee.ria.xroad",
"java.util"
] | com.google.common; ee.ria.xroad; java.util; | 2,664,951 |
public TimeZoneFormat setDefaultParseOptions(EnumSet<ParseOption> options) {
// Currently, only ALL_STYLES is supported
_parseAllStyles = options.contains(ParseOption.ALL_STYLES);
return this;
} | TimeZoneFormat function(EnumSet<ParseOption> options) { _parseAllStyles = options.contains(ParseOption.ALL_STYLES); return this; } | /**
* Sets the default parse options.
* <p>
* <b>Note:</b> By default, an instance of <code>TimeZoneFormat></code>
* created by {#link {@link #getInstance(ULocale)} has no parse options set.
*
* @param options the default parse options.
* @return this object.
* @see ParseOption
... | Sets the default parse options. Note: By default, an instance of <code>TimeZoneFormat></code> created by {#link <code>#getInstance(ULocale)</code> has no parse options set | setDefaultParseOptions | {
"repo_name": "Miracle121/quickdic-dictionary.dictionary",
"path": "jars/icu4j-52_1/main/classes/core/src/com/ibm/icu/text/TimeZoneFormat.java",
"license": "apache-2.0",
"size": 123550
} | [
"java.util.EnumSet"
] | import java.util.EnumSet; | import java.util.*; | [
"java.util"
] | java.util; | 1,546,527 |
public CommentPersistence getCommentPersistence() {
return commentPersistence;
} | CommentPersistence function() { return commentPersistence; } | /**
* Returns the Comment persistence.
*
* @return the Comment persistence
*/ | Returns the Comment persistence | getCommentPersistence | {
"repo_name": "p-gebhard/QuickAnswer",
"path": "docroot/WEB-INF/src/it/gebhard/qa/service/base/VoteLocalServiceBaseImpl.java",
"license": "gpl-3.0",
"size": 23504
} | [
"it.gebhard.qa.service.persistence.CommentPersistence"
] | import it.gebhard.qa.service.persistence.CommentPersistence; | import it.gebhard.qa.service.persistence.*; | [
"it.gebhard.qa"
] | it.gebhard.qa; | 791,737 |
protected Element createCollectionRootElement() {
return collectionRootElement().create();
} | Element function() { return collectionRootElement().create(); } | /**
* Create the root element for the collection view of this object.
*/ | Create the root element for the collection view of this object | createCollectionRootElement | {
"repo_name": "NCIP/psc",
"path": "core/src/main/java/edu/northwestern/bioinformatics/studycalendar/xml/AbstractStudyCalendarXmlCollectionSerializer.java",
"license": "bsd-3-clause",
"size": 3300
} | [
"org.dom4j.Element"
] | import org.dom4j.Element; | import org.dom4j.*; | [
"org.dom4j"
] | org.dom4j; | 198,185 |
@Test
public void testToX509KeyDescriptorsXML() throws IOException, CertificateEncodingException {
Saml2Settings settings = new SettingsBuilder().fromFile("config/config.all.properties").build();
Metadata metadataObj = new Metadata(settings);
String metadataStr = metadataObj.getMetadataString();
String key... | void function() throws IOException, CertificateEncodingException { Saml2Settings settings = new SettingsBuilder().fromFile(STR).build(); Metadata metadataObj = new Metadata(settings); String metadataStr = metadataObj.getMetadataString(); String keyDescriptorSignStr = STRsigning\STRhttp: String keyDescriptorEncStr = STR... | /**
* Tests the toX509KeyDescriptorsXML method of Metadata
*
* @throws IOException
* @throws CertificateEncodingException
*
* @see com.onelogin.saml2.settings.Metadata#toX509KeyDescriptorsXML
*/ | Tests the toX509KeyDescriptorsXML method of Metadata | testToX509KeyDescriptorsXML | {
"repo_name": "jacklotusho/java-saml",
"path": "core/src/test/java/com/onelogin/saml2/test/settings/MetadataTest.java",
"license": "mit",
"size": 13968
} | [
"com.onelogin.saml2.settings.Metadata",
"com.onelogin.saml2.settings.Saml2Settings",
"com.onelogin.saml2.settings.SettingsBuilder",
"java.io.IOException",
"java.security.cert.CertificateEncodingException",
"org.hamcrest.CoreMatchers",
"org.junit.Assert"
] | import com.onelogin.saml2.settings.Metadata; import com.onelogin.saml2.settings.Saml2Settings; import com.onelogin.saml2.settings.SettingsBuilder; import java.io.IOException; import java.security.cert.CertificateEncodingException; import org.hamcrest.CoreMatchers; import org.junit.Assert; | import com.onelogin.saml2.settings.*; import java.io.*; import java.security.cert.*; import org.hamcrest.*; import org.junit.*; | [
"com.onelogin.saml2",
"java.io",
"java.security",
"org.hamcrest",
"org.junit"
] | com.onelogin.saml2; java.io; java.security; org.hamcrest; org.junit; | 2,618,208 |
private Config getCoordinatorSystemConfig(JobInstance jobInstance) {
try {
InstallationRecord record = installFinder.getAllInstalledJobs().get(jobInstance);
ConfigFactory configFactory =
ReflectionUtil.getObj(getClass().getClassLoader(), taskResourceConfig.getJobConfigFactory(),
... | Config function(JobInstance jobInstance) { try { InstallationRecord record = installFinder.getAllInstalledJobs().get(jobInstance); ConfigFactory configFactory = ReflectionUtil.getObj(getClass().getClassLoader(), taskResourceConfig.getJobConfigFactory(), ConfigFactory.class); Config config = configFactory.getConfig(new ... | /**
* Builds coordinator system config for the {@param jobInstance}.
* @param jobInstance the job instance to get the jobModel for.
* @return the constructed coordinator system config.
*/ | Builds coordinator system config for the jobInstance | getCoordinatorSystemConfig | {
"repo_name": "Swrrt/Samza",
"path": "samza-rest/src/main/java/org/apache/samza/rest/proxy/task/SamzaTaskProxy.java",
"license": "apache-2.0",
"size": 7767
} | [
"org.apache.samza.SamzaException",
"org.apache.samza.config.Config",
"org.apache.samza.config.ConfigFactory",
"org.apache.samza.rest.proxy.installation.InstallationRecord",
"org.apache.samza.rest.proxy.job.JobInstance",
"org.apache.samza.util.ReflectionUtil"
] | import org.apache.samza.SamzaException; import org.apache.samza.config.Config; import org.apache.samza.config.ConfigFactory; import org.apache.samza.rest.proxy.installation.InstallationRecord; import org.apache.samza.rest.proxy.job.JobInstance; import org.apache.samza.util.ReflectionUtil; | import org.apache.samza.*; import org.apache.samza.config.*; import org.apache.samza.rest.proxy.installation.*; import org.apache.samza.rest.proxy.job.*; import org.apache.samza.util.*; | [
"org.apache.samza"
] | org.apache.samza; | 810,071 |
@Override
public boolean getTransformation(long currentTime, Transformation outTransformation) {
hideOrShowHeader(toHeight);
return super.getTransformation(currentTime, outTransformation);
}
} | boolean function(long currentTime, Transformation outTransformation) { hideOrShowHeader(toHeight); return super.getTransformation(currentTime, outTransformation); } } | /**
* Used at the end of the animation to hide completely the header if it's required (toHeight == 0).
*
* @see android.view.animation.Animation#getTransformation(long, android.view.animation.Transformation)
*/ | Used at the end of the animation to hide completely the header if it's required (toHeight == 0) | getTransformation | {
"repo_name": "thoinv/kaorisan",
"path": "trunk/C_Source_Code/refreshlistview_library/src/com/github/jeremiemartinez/refreshlistview/RefreshListView.java",
"license": "gpl-3.0",
"size": 12891
} | [
"android.view.animation.Transformation"
] | import android.view.animation.Transformation; | import android.view.animation.*; | [
"android.view"
] | android.view; | 204,105 |
public int addWord(Word word)
{
int position = -1;
for ( int i = FIRST_MEMORY_POSITION; i <= LAST_MEMORY_POSITION; i++ )
{
if ( memory.get(i) == null )
{
memory.set(i, word);
position = i;
break;
}
}
if ( position == -1 )
{
throw new IllegalStateException("SimpleMemory out of mem... | int function(Word word) { int position = -1; for ( int i = FIRST_MEMORY_POSITION; i <= LAST_MEMORY_POSITION; i++ ) { if ( memory.get(i) == null ) { memory.set(i, word); position = i; break; } } if ( position == -1 ) { throw new IllegalStateException(STR); } return position; } | /**
* Add a word to first available memory index
* @param word
* @return
*/ | Add a word to first available memory index | addWord | {
"repo_name": "ryyaan2004/SimpleTron",
"path": "src/main/java/org/ryyaan2004/simpletron/register/SimpleMemory.java",
"license": "mit",
"size": 3103
} | [
"org.ryyaan2004.simpletron.register.word.Word"
] | import org.ryyaan2004.simpletron.register.word.Word; | import org.ryyaan2004.simpletron.register.word.*; | [
"org.ryyaan2004.simpletron"
] | org.ryyaan2004.simpletron; | 2,712,247 |
private Object getValueFromEvent(PersistedEventImpl ev) {
if (ev.getOperation().isDestroy()) {
return Token.TOMBSTONE;
} else if (ev.getOperation().isInvalidate()) {
return Token.INVALID;
}
return ev.getValue();
} | Object function(PersistedEventImpl ev) { if (ev.getOperation().isDestroy()) { return Token.TOMBSTONE; } else if (ev.getOperation().isInvalidate()) { return Token.INVALID; } return ev.getValue(); } | /**
* gets the value from event, deserializing if necessary.
*/ | gets the value from event, deserializing if necessary | getValueFromEvent | {
"repo_name": "nchandrappa/incubator-geode",
"path": "gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/HDFSRegionMapDelegate.java",
"license": "apache-2.0",
"size": 20848
} | [
"com.gemstone.gemfire.cache.hdfs.internal.PersistedEventImpl"
] | import com.gemstone.gemfire.cache.hdfs.internal.PersistedEventImpl; | import com.gemstone.gemfire.cache.hdfs.internal.*; | [
"com.gemstone.gemfire"
] | com.gemstone.gemfire; | 2,835,390 |
public boolean addAll(Collection<? extends E> elements) {
return getDelegate().addAll(elements);
} | boolean function(Collection<? extends E> elements) { return getDelegate().addAll(elements); } | /**
* Appends all of the elements in the specified collection to the end of
* this list.
*
* @param elements
* The collection of elements to append.
*/ | Appends all of the elements in the specified collection to the end of this list | addAll | {
"repo_name": "pecko/debrief",
"path": "org.mwc.asset.comms/docs/restlet_src/org.restlet/org/restlet/util/WrapperList.java",
"license": "epl-1.0",
"size": 10238
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 2,222,664 |
protected void addAddPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_MultiAttributeOperation_add_feature"),
getString("_UI_PropertyDescriptor_d... | void function(Object object) { itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), OperationsPackage.Literals.MULTI_ATTRIBUTE_OPERATION__ADD, true, false, false, ItemPropertyDescr... | /**
* This adds a property descriptor for the Add feature.
* <!-- begin-user-doc
* --> <!-- end-user-doc -->
*
* @generated
*/ | This adds a property descriptor for the Add feature. | addAddPropertyDescriptor | {
"repo_name": "edgarmueller/emfstore-rest",
"path": "bundles/org.eclipse.emf.emfstore.server.model.edit/src/org/eclipse/emf/emfstore/internal/server/model/versioning/operations/provider/MultiAttributeOperationItemProvider.java",
"license": "epl-1.0",
"size": 6888
} | [
"org.eclipse.emf.edit.provider.ComposeableAdapterFactory",
"org.eclipse.emf.edit.provider.ItemPropertyDescriptor",
"org.eclipse.emf.emfstore.internal.server.model.versioning.operations.OperationsPackage"
] | import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; import org.eclipse.emf.emfstore.internal.server.model.versioning.operations.OperationsPackage; | import org.eclipse.emf.edit.provider.*; import org.eclipse.emf.emfstore.internal.server.model.versioning.operations.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 130,745 |
private int processOutgoingFullyFormatted(byte[] plaintext, SessionKey kt) {
BlockCipher sessionCipher = kt.sessionCipher;
if(logMINOR) Logger.minor(this, "Encrypting with "+HexUtil.bytesToHex(kt.sessionKey));
if(sessionCipher == null) {
Logger.error(this, "Dropping packet send - have not handshaked yet");
... | int function(byte[] plaintext, SessionKey kt) { BlockCipher sessionCipher = kt.sessionCipher; if(logMINOR) Logger.minor(this, STR+HexUtil.bytesToHex(kt.sessionKey)); if(sessionCipher == null) { Logger.error(this, STR); return 0; } int blockSize = sessionCipher.getBlockSize() >> 3; if(sessionCipher.getKeySize() != sessi... | /**
* Encrypt and send a packet.
* @param plaintext The packet's plaintext, including all formatting,
* including acks and resend requests. Is clobbered.
*/ | Encrypt and send a packet | processOutgoingFullyFormatted | {
"repo_name": "spencerjackson/fred-staging",
"path": "src/freenet/node/FNPPacketMangler.java",
"license": "gpl-2.0",
"size": 126341
} | [
"java.security.MessageDigest"
] | import java.security.MessageDigest; | import java.security.*; | [
"java.security"
] | java.security; | 1,136,718 |
OperationCompletionRS uploadPhoto(String username, MultipartFile file); | OperationCompletionRS uploadPhoto(String username, MultipartFile file); | /**
* Upload photo
*
* @param username Name of user
* @param file New photo
* @return Completion result
*/ | Upload photo | uploadPhoto | {
"repo_name": "reportportal/service-api",
"path": "src/main/java/com/epam/ta/reportportal/core/user/EditUserHandler.java",
"license": "apache-2.0",
"size": 1953
} | [
"com.epam.ta.reportportal.ws.model.OperationCompletionRS",
"org.springframework.web.multipart.MultipartFile"
] | import com.epam.ta.reportportal.ws.model.OperationCompletionRS; import org.springframework.web.multipart.MultipartFile; | import com.epam.ta.reportportal.ws.model.*; import org.springframework.web.multipart.*; | [
"com.epam.ta",
"org.springframework.web"
] | com.epam.ta; org.springframework.web; | 1,135,354 |
public void addPendingDelete(Index index, IndexSettings settings) {
PendingDelete pendingDelete = new PendingDelete(index, settings);
addPendingDelete(index, pendingDelete);
} | void function(Index index, IndexSettings settings) { PendingDelete pendingDelete = new PendingDelete(index, settings); addPendingDelete(index, pendingDelete); } | /**
* Adds a pending delete for the given index.
*/ | Adds a pending delete for the given index | addPendingDelete | {
"repo_name": "strapdata/elassandra5-rc",
"path": "core/src/main/java/org/elasticsearch/indices/IndicesService.java",
"license": "apache-2.0",
"size": 65029
} | [
"org.elasticsearch.index.Index",
"org.elasticsearch.index.IndexSettings"
] | import org.elasticsearch.index.Index; import org.elasticsearch.index.IndexSettings; | import org.elasticsearch.index.*; | [
"org.elasticsearch.index"
] | org.elasticsearch.index; | 389,198 |
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable<ServerKeyInner> listByServer(String resourceGroupName, String serverName, Context context) {
return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context));
} | @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<ServerKeyInner> function(String resourceGroupName, String serverName, Context context) { return new PagedIterable<>(listByServerAsync(resourceGroupName, serverName, context)); } | /**
* Gets a list of server keys.
*
* @param resourceGroupName The name of the resource group that contains the resource. You can obtain this value
* from the Azure Resource Manager API or the portal.
* @param serverName The name of the server.
* @param context The context to associate... | Gets a list of server keys | listByServer | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-sql/src/main/java/com/azure/resourcemanager/sql/implementation/ServerKeysClientImpl.java",
"license": "mit",
"size": 56869
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedIterable",
"com.azure.core.util.Context",
"com.azure.resourcemanager.sql.fluent.models.ServerKeyInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; import com.azure.resourcemanager.sql.fluent.models.ServerKeyInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.sql.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 518,033 |
void onSwitched(View view, int position);
} | void onSwitched(View view, int position); } | /**
* This method is called when a new View has been scrolled to.
*
* @param view
* the {@link View} currently in focus.
* @param position
* The position in the adapter of the {@link View} currently in focus.
*/ | This method is called when a new View has been scrolled to | onSwitched | {
"repo_name": "Liyueyang/NewXmPluginSDK",
"path": "common_ui/src/main/java/com/xiaomi/smarthome/common/ui/widget/viewflow/ViewFlow.java",
"license": "apache-2.0",
"size": 24986
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 1,830,878 |
public Map<Layer,String> getGDSLayers() {
Foundry foundry = getSelectedFoundry();
Map<Layer,String> gdsLayers = Collections.emptyMap();
if (foundry != null) gdsLayers = foundry.getGDSLayers();
return gdsLayers;
} | Map<Layer,String> function() { Foundry foundry = getSelectedFoundry(); Map<Layer,String> gdsLayers = Collections.emptyMap(); if (foundry != null) gdsLayers = foundry.getGDSLayers(); return gdsLayers; } | /**
* Method to return the map from Layers of this Technology to their GDS names in current foundry.
* Only Layers with non-empty GDS names are present in the map
* @return the map from Layers to GDS names
*/ | Method to return the map from Layers of this Technology to their GDS names in current foundry. Only Layers with non-empty GDS names are present in the map | getGDSLayers | {
"repo_name": "imr/Electric8",
"path": "com/sun/electric/technology/Technology.java",
"license": "gpl-3.0",
"size": 194212
} | [
"java.util.Collections",
"java.util.Map"
] | import java.util.Collections; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,180,388 |
public CSVConfiguration getCSVConfiguration( File xmlSource, Class<?>... annSources )
throws FileNotFoundException
{
return getCSVConfiguration( xmlSource, Charset.defaultCharset(), annSources );
}
| CSVConfiguration function( File xmlSource, Class<?>... annSources ) throws FileNotFoundException { return getCSVConfiguration( xmlSource, Charset.defaultCharset(), annSources ); } | /**
* Returns the {@link CSVConfiguration} parsed from the given source.
*
* @param xmlSource the source to parse.
* @param annSources the classes containing the annotations to parse.
* @return a new {@link CSVConfiguration}.
*
* @throws FileNotFoundException if configuation source... | Returns the <code>CSVConfiguration</code> parsed from the given source | getCSVConfiguration | {
"repo_name": "nerd4j/nerd4j-csv",
"path": "src/main/java/org/nerd4j/csv/conf/CSVConfigurationFactory.java",
"license": "lgpl-3.0",
"size": 8096
} | [
"java.io.File",
"java.io.FileNotFoundException",
"java.nio.charset.Charset",
"org.nerd4j.csv.conf.mapping.CSVConfiguration"
] | import java.io.File; import java.io.FileNotFoundException; import java.nio.charset.Charset; import org.nerd4j.csv.conf.mapping.CSVConfiguration; | import java.io.*; import java.nio.charset.*; import org.nerd4j.csv.conf.mapping.*; | [
"java.io",
"java.nio",
"org.nerd4j.csv"
] | java.io; java.nio; org.nerd4j.csv; | 1,987,908 |
public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random)
{
if (!par1World.isRemote)
{
{
for (int l = 0; l < 4; ++l)
{
int i1 = par2 + par5Random.nextInt(3) - 1;
int j1 = par3 + par... | void function(World par1World, int par2, int par3, int par4, Random par5Random) { if (!par1World.isRemote) { { for (int l = 0; l < 4; ++l) { int i1 = par2 + par5Random.nextInt(3) - 1; int j1 = par3 + par5Random.nextInt(5) - 3; int k1 = par4 + par5Random.nextInt(3) - 1; if (par1World.getBlockId(i1, j1, k1) != 0 && par1W... | /**
* Block update.
*/ | Block update | updateTick | {
"repo_name": "CliffracerX/CliffiesGoos",
"path": "cliffracerx/mods/cliffiestaints/src/NormalTaint.java",
"license": "gpl-2.0",
"size": 2018
} | [
"java.util.Random",
"net.minecraft.block.Block",
"net.minecraft.world.World"
] | import java.util.Random; import net.minecraft.block.Block; import net.minecraft.world.World; | import java.util.*; import net.minecraft.block.*; import net.minecraft.world.*; | [
"java.util",
"net.minecraft.block",
"net.minecraft.world"
] | java.util; net.minecraft.block; net.minecraft.world; | 65,735 |
public DenyAssignmentPermission withNotDataActions(List<String> notDataActions) {
this.notDataActions = notDataActions;
return this;
} | DenyAssignmentPermission function(List<String> notDataActions) { this.notDataActions = notDataActions; return this; } | /**
* Set the notDataActions property: Data actions to exclude from that the deny assignment does not grant access.
*
* @param notDataActions the notDataActions value to set.
* @return the DenyAssignmentPermission object itself.
*/ | Set the notDataActions property: Data actions to exclude from that the deny assignment does not grant access | withNotDataActions | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-authorization/src/main/java/com/azure/resourcemanager/authorization/models/DenyAssignmentPermission.java",
"license": "mit",
"size": 4010
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,493,502 |
NegativeCacheKey getCacheKey(Context context); | NegativeCacheKey getCacheKey(Context context); | /**
* Retrieves the cache key based on context.
*
* @param context view context
* @return cache key
*/ | Retrieves the cache key based on context | getCacheKey | {
"repo_name": "sonatype/nexus-public",
"path": "components/nexus-repository-services/src/main/java/org/sonatype/nexus/repository/cache/NegativeCacheFacet.java",
"license": "epl-1.0",
"size": 2131
} | [
"org.sonatype.nexus.repository.view.Context"
] | import org.sonatype.nexus.repository.view.Context; | import org.sonatype.nexus.repository.view.*; | [
"org.sonatype.nexus"
] | org.sonatype.nexus; | 1,556,619 |
public void setPlayer(Player player) {
if (simulation != null) {
throw new SimulationException(this + " can't change player once is in simulation");
}
this.player = player;
for (Entity entity : attachedEntities) {
entity.setPlayer(player);
}
} | void function(Player player) { if (simulation != null) { throw new SimulationException(this + STR); } this.player = player; for (Entity entity : attachedEntities) { entity.setPlayer(player); } } | /**
* Set entity player
*
* @param player to set
*/ | Set entity player | setPlayer | {
"repo_name": "IonAgorria/Ouroboros",
"path": "src/com/agorria/ouroboros/simulation/entity/Entity.java",
"license": "gpl-3.0",
"size": 50202
} | [
"com.agorria.ouroboros.simulation.SimulationException",
"com.agorria.ouroboros.simulation.enviroment.Player"
] | import com.agorria.ouroboros.simulation.SimulationException; import com.agorria.ouroboros.simulation.enviroment.Player; | import com.agorria.ouroboros.simulation.*; import com.agorria.ouroboros.simulation.enviroment.*; | [
"com.agorria.ouroboros"
] | com.agorria.ouroboros; | 1,074,386 |
public Map<String, MappedClass> getMappedClasses() {
return Collections.unmodifiableMap(mapper.getMappedClasses());
} | Map<String, MappedClass> function() { return Collections.unmodifiableMap(mapper.getMappedClasses()); } | /**
* Get a set of all classes that are mapped by this instance.
*
* @return all classes that are mapped by this instance
*/ | Get a set of all classes that are mapped by this instance | getMappedClasses | {
"repo_name": "crazycode/morphia",
"path": "src/main/java/com/google/code/morphia/Morphia.java",
"license": "apache-2.0",
"size": 5630
} | [
"com.google.code.morphia.mapping.MappedClass",
"java.util.Collections",
"java.util.Map"
] | import com.google.code.morphia.mapping.MappedClass; import java.util.Collections; import java.util.Map; | import com.google.code.morphia.mapping.*; import java.util.*; | [
"com.google.code",
"java.util"
] | com.google.code; java.util; | 1,100,985 |
public static RexNode andJoinFilters(
RexBuilder rexBuilder,
RexNode left,
RexNode right) {
// don't bother AND'ing in expressions that always evaluate to
// true
if ((left != null) && !left.isAlwaysTrue()) {
if ((right != null) && !right.isAlwaysTrue()) {
left =
... | static RexNode function( RexBuilder rexBuilder, RexNode left, RexNode right) { if ((left != null) && !left.isAlwaysTrue()) { if ((right != null) && !right.isAlwaysTrue()) { left = rexBuilder.makeCall( SqlStdOperatorTable.AND, left, right); } } else { left = right; } if (left == null) { left = rexBuilder.makeLiteral(tru... | /**
* Ands two sets of join filters together, either of which can be null.
*
* @param rexBuilder rexBuilder to create AND expression
* @param left filter on the left that the right will be AND'd to
* @param right filter on the right
* @return AND'd filter
*
* @see org.apache.calcite.r... | Ands two sets of join filters together, either of which can be null | andJoinFilters | {
"repo_name": "amoghmargoor/incubator-calcite",
"path": "core/src/main/java/org/apache/calcite/plan/RelOptUtil.java",
"license": "apache-2.0",
"size": 126739
} | [
"org.apache.calcite.rex.RexBuilder",
"org.apache.calcite.rex.RexNode",
"org.apache.calcite.sql.fun.SqlStdOperatorTable"
] | import org.apache.calcite.rex.RexBuilder; import org.apache.calcite.rex.RexNode; import org.apache.calcite.sql.fun.SqlStdOperatorTable; | import org.apache.calcite.rex.*; import org.apache.calcite.sql.fun.*; | [
"org.apache.calcite"
] | org.apache.calcite; | 2,013,825 |
public static boolean showUserPoolInfo(
String user,
Set<String> userFilterSet, PoolInfo poolInfo,
Set<String> poolGroupFilterSet, Set<PoolInfo> poolInfoFilterSet) {
boolean showUser = false;
if (userFilterSet.isEmpty() || userFilterSet.contains(user)) {
showUser = true;
}
ret... | static boolean function( String user, Set<String> userFilterSet, PoolInfo poolInfo, Set<String> poolGroupFilterSet, Set<PoolInfo> poolInfoFilterSet) { boolean showUser = false; if (userFilterSet.isEmpty() userFilterSet.contains(user)) { showUser = true; } return showUser && showPoolInfo(poolInfo, poolGroupFilterSet, po... | /**
* True if should be shown for this filtering.
* @param user User to check
* @param userFilterSet Set of valid users
* @param poolInfo Pool info to check
* @param poolGroupFilterSet Set of valid pool groups
* @param poolInfoFilterSet Set of valid pool infos
* @return True if should be shown.
... | True if should be shown for this filtering | showUserPoolInfo | {
"repo_name": "iVCE/RDFS",
"path": "src/contrib/corona/src/java/org/apache/hadoop/util/WebUtils.java",
"license": "apache-2.0",
"size": 7597
} | [
"java.util.Set",
"org.apache.hadoop.corona.PoolInfo"
] | import java.util.Set; import org.apache.hadoop.corona.PoolInfo; | import java.util.*; import org.apache.hadoop.corona.*; | [
"java.util",
"org.apache.hadoop"
] | java.util; org.apache.hadoop; | 1,465,943 |
public boolean canDropFromExplosion(Explosion explosionIn)
{
return false;
} | boolean function(Explosion explosionIn) { return false; } | /**
* Return whether this block can drop from an explosion.
*/ | Return whether this block can drop from an explosion | canDropFromExplosion | {
"repo_name": "aebert1/BigTransport",
"path": "build/tmp/recompileMc/sources/net/minecraft/block/BlockTNT.java",
"license": "gpl-3.0",
"size": 5975
} | [
"net.minecraft.world.Explosion"
] | import net.minecraft.world.Explosion; | import net.minecraft.world.*; | [
"net.minecraft.world"
] | net.minecraft.world; | 1,886,679 |
EAttribute getLoadMgmtRecord_LoadReduction(); | EAttribute getLoadMgmtRecord_LoadReduction(); | /**
* Returns the meta object for the attribute '{@link gluemodel.CIM.IEC61970.Informative.InfLoadControl.LoadMgmtRecord#getLoadReduction <em>Load Reduction</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Load Reduction</em>'.
* @see gluemodel.CIM.IEC... | Returns the meta object for the attribute '<code>gluemodel.CIM.IEC61970.Informative.InfLoadControl.LoadMgmtRecord#getLoadReduction Load Reduction</code>'. | getLoadMgmtRecord_LoadReduction | {
"repo_name": "georghinkel/ttc2017smartGrids",
"path": "solutions/eMoflon/rgse.ttc17.metamodels.src/src/gluemodel/CIM/IEC61970/Informative/InfLoadControl/InfLoadControlPackage.java",
"license": "mit",
"size": 49615
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 873,227 |
private String getItemNameForAddress(MochadX10Address address) {
for (MochadX10BindingProvider provider : this.providers) {
Collection<String> itemNames = provider.getItemNames();
for (String itemName : itemNames) {
MochadX10BindingConfig bindingConfig = provider.getI... | String function(MochadX10Address address) { for (MochadX10BindingProvider provider : this.providers) { Collection<String> itemNames = provider.getItemNames(); for (String itemName : itemNames) { MochadX10BindingConfig bindingConfig = provider.getItemConfig(itemName); if (bindingConfig.getAddress().equals(address.toStri... | /**
* Given an X10 address (<houseCode><unitCode>) find the name of the
* corresponding bounded item
*
* @param address The X10 address
* @return The name of the corresponding item, null if no corresponding
* item could be found.
*/ | Given an X10 address () find the name of the corresponding bounded item | getItemNameForAddress | {
"repo_name": "sedstef/openhab",
"path": "bundles/binding/org.openhab.binding.mochadx10/src/main/java/org/openhab/binding/mochadx10/internal/MochadX10Binding.java",
"license": "epl-1.0",
"size": 19106
} | [
"java.util.Collection",
"org.openhab.binding.mochadx10.MochadX10BindingProvider",
"org.openhab.binding.mochadx10.commands.MochadX10Address"
] | import java.util.Collection; import org.openhab.binding.mochadx10.MochadX10BindingProvider; import org.openhab.binding.mochadx10.commands.MochadX10Address; | import java.util.*; import org.openhab.binding.mochadx10.*; import org.openhab.binding.mochadx10.commands.*; | [
"java.util",
"org.openhab.binding"
] | java.util; org.openhab.binding; | 1,480,706 |
private Message createMessage(OutputWireRecord wireRecord)
throws DatabaseException {
long txnId = wireRecord.getCommitTxnId();
if (txnId != 0) {
MasterTxn ackTxn = repNode.getFeederTxns().getAckTxn(txnId);
if (ackTxn != null... | Message function(OutputWireRecord wireRecord) throws DatabaseException { long txnId = wireRecord.getCommitTxnId(); if (txnId != 0) { MasterTxn ackTxn = repNode.getFeederTxns().getAckTxn(txnId); if (ackTxn != null) { ackTxn.stampRepWriteTime(); long messageTransferMs = ackTxn.messageTransferMs(); totalTransferDelay += m... | /**
* Converts a log entry into a specific Message to be sent out by the
* Feeder.
*
* @param logBytes the bytes representing the log entry
*
* @return the Message representing the entry
*
* @throws DatabaseException
*/ | Converts a log entry into a specific Message to be sent out by the Feeder | createMessage | {
"repo_name": "bjorndm/prebake",
"path": "code/third_party/bdb/src/com/sleepycat/je/rep/impl/node/Feeder.java",
"license": "apache-2.0",
"size": 35473
} | [
"com.sleepycat.je.DatabaseException",
"com.sleepycat.je.Durability",
"com.sleepycat.je.rep.stream.OutputWireRecord",
"com.sleepycat.je.rep.txn.MasterTxn",
"com.sleepycat.je.rep.utilint.BinaryProtocol",
"com.sleepycat.je.utilint.LoggerUtils"
] | import com.sleepycat.je.DatabaseException; import com.sleepycat.je.Durability; import com.sleepycat.je.rep.stream.OutputWireRecord; import com.sleepycat.je.rep.txn.MasterTxn; import com.sleepycat.je.rep.utilint.BinaryProtocol; import com.sleepycat.je.utilint.LoggerUtils; | import com.sleepycat.je.*; import com.sleepycat.je.rep.stream.*; import com.sleepycat.je.rep.txn.*; import com.sleepycat.je.rep.utilint.*; import com.sleepycat.je.utilint.*; | [
"com.sleepycat.je"
] | com.sleepycat.je; | 1,146,507 |
EReference getPSCH_GrdRx(); | EReference getPSCH_GrdRx(); | /**
* Returns the meta object for the reference '{@link gluemodel.substationStandard.LNNodes.LNGroupP.PSCH#getGrdRx <em>Grd Rx</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Grd Rx</em>'.
* @see gluemodel.substationStandard.LNNodes.LNGroupP.PSCH#getG... | Returns the meta object for the reference '<code>gluemodel.substationStandard.LNNodes.LNGroupP.PSCH#getGrdRx Grd Rx</code>'. | getPSCH_GrdRx | {
"repo_name": "georghinkel/ttc2017smartGrids",
"path": "solutions/eMoflon/rgse.ttc17.metamodels.src/src/gluemodel/substationStandard/LNNodes/LNGroupP/LNGroupPPackage.java",
"license": "mit",
"size": 291175
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 555,113 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<PagedResponse<AvailabilitySetInner>> listSinglePageAsync(String expand, Context context) {
if (this.client.getEndpoint() == null) {
return Mono
.error(
new IllegalArgumentException(
... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<PagedResponse<AvailabilitySetInner>> function(String expand, Context context) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } if (this.client.getSubscriptionId() == null) { return Mono .error( new IllegalArgumentExcep... | /**
* Lists all availability sets in a subscription.
*
* @param expand The expand expression to apply to the operation. Allowed values are 'instanceView'.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
... | Lists all availability sets in a subscription | listSinglePageAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/AvailabilitySetsClientImpl.java",
"license": "mit",
"size": 74440
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedResponse",
"com.azure.core.http.rest.PagedResponseBase",
"com.azure.core.util.Context",
"com.azure.resourcemanager.compute.fluent.models.AvailabilitySetInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.util.Context; import com.azure.resourcemanager.compute.fluent.models.AvailabilitySetInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.compute.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 128,177 |
RFuture<Map<String, Map<StreamMessageId, Map<K, V>>>> readAsync(StreamMessageId id, Map<String, StreamMessageId> nameToId); | RFuture<Map<String, Map<StreamMessageId, Map<K, V>>>> readAsync(StreamMessageId id, Map<String, StreamMessageId> nameToId); | /**
* Read stream data by specified stream id mapped by name including this stream.
*
* @param id - id of this stream
* @param nameToId - stream id mapped by name
* @return stream data mapped by key and Stream ID
*/ | Read stream data by specified stream id mapped by name including this stream | readAsync | {
"repo_name": "mrniko/redisson",
"path": "redisson/src/main/java/org/redisson/api/RStreamAsync.java",
"license": "apache-2.0",
"size": 33502
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,858,415 |
public void setDatabases(final ArrayList<DatabaseBackupSetting> databasesValue) {
this.databases = databasesValue;
}
private boolean ignoreConflictingHostNames; | void function(final ArrayList<DatabaseBackupSetting> databasesValue) { this.databases = databasesValue; } private boolean ignoreConflictingHostNames; | /**
* Optional. Database settings for backup.
* @param databasesValue The Databases value.
*/ | Optional. Database settings for backup | setDatabases | {
"repo_name": "southworkscom/azure-sdk-for-java",
"path": "resource-management/azure-mgmt-websites/src/main/java/com/microsoft/azure/management/websites/models/WebSiteRestoreDiscoverProperties.java",
"license": "apache-2.0",
"size": 5645
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 1,490,718 |
private void readObject(ObjectInputStream stream) throws IOException,
ClassNotFoundException {
stream.defaultReadObject();
this.thermometerStroke = SerialUtilities.readStroke(stream);
this.thermometerPaint = SerialUtilities.readPaint(stream);
this.valuePaint = Serial... | void function(ObjectInputStream stream) throws IOException, ClassNotFoundException { stream.defaultReadObject(); this.thermometerStroke = SerialUtilities.readStroke(stream); this.thermometerPaint = SerialUtilities.readPaint(stream); this.valuePaint = SerialUtilities.readPaint(stream); this.mercuryPaint = SerialUtilitie... | /**
* Provides serialization support.
*
* @param stream the input stream.
*
* @throws IOException if there is an I/O error.
* @throws ClassNotFoundException if there is a classpath problem.
*/ | Provides serialization support | readObject | {
"repo_name": "ilyessou/jfreechart",
"path": "source/org/jfree/chart/plot/ThermometerPlot.java",
"license": "lgpl-2.1",
"size": 56273
} | [
"java.awt.Paint",
"java.io.IOException",
"java.io.ObjectInputStream",
"org.jfree.chart.util.SerialUtilities"
] | import java.awt.Paint; import java.io.IOException; import java.io.ObjectInputStream; import org.jfree.chart.util.SerialUtilities; | import java.awt.*; import java.io.*; import org.jfree.chart.util.*; | [
"java.awt",
"java.io",
"org.jfree.chart"
] | java.awt; java.io; org.jfree.chart; | 778,022 |
public static boolean isAutofocus(WebElement element) {
return Attribute.isSet(element, "autofocus");
} | static boolean function(WebElement element) { return Attribute.isSet(element, STR); } | /**
* return if WebElement have autofocus tag
*
* @param element WebElement
* @return boolean
*/ | return if WebElement have autofocus tag | isAutofocus | {
"repo_name": "pierrepinon/fsti",
"path": "src/main/java/fr/edf/esip/pierrepinon/selenium/helpers/Attribute.java",
"license": "mit",
"size": 11446
} | [
"org.openqa.selenium.WebElement"
] | import org.openqa.selenium.WebElement; | import org.openqa.selenium.*; | [
"org.openqa.selenium"
] | org.openqa.selenium; | 1,215,680 |
public String getSimOperator(boolean force) {
if (mSimOperator.isEmpty() || force) {
try {
if (tm.getSimState() == TelephonyManager.SIM_STATE_READY) {
mSimOperator = (tm.getSimOperator() != null) ? tm.getSimOperator() : "N/A";
} else {
... | String function(boolean force) { if (mSimOperator.isEmpty() force) { try { if (tm.getSimState() == TelephonyManager.SIM_STATE_READY) { mSimOperator = (tm.getSimOperator() != null) ? tm.getSimOperator() : "N/A"; } else { mSimOperator = "N/A"; } } catch (Exception e) { mSimOperator = "N/A"; Log.e(TAG, STR + e); } } if (m... | /**
* SIM Operator
*
* @return string of SIM Operator data
*/ | SIM Operator | getSimOperator | {
"repo_name": "0359xiaodong/Android-IMSI-Catcher-Detector",
"path": "app/src/main/java/com/SecUpwN/AIMSICD/service/AimsicdService.java",
"license": "gpl-3.0",
"size": 70120
} | [
"android.telephony.TelephonyManager",
"android.util.Log"
] | import android.telephony.TelephonyManager; import android.util.Log; | import android.telephony.*; import android.util.*; | [
"android.telephony",
"android.util"
] | android.telephony; android.util; | 1,509,263 |
protected void childValueAssignment(Production node, Node child)
throws ParseException {
node.addChild(child);
} | void function(Production node, Node child) throws ParseException { node.addChild(child); } | /**
* Called when adding a child to a parse tree node.
*
* @param node the parent node
* @param child the child node, or null
*
* @throws ParseException if the node analysis discovered errors
*/ | Called when adding a child to a parse tree node | childValueAssignment | {
"repo_name": "richb-hanover/mibble-2.9.2",
"path": "src/java/net/percederberg/mibble/asn1/Asn1Analyzer.java",
"license": "gpl-2.0",
"size": 275483
} | [
"net.percederberg.grammatica.parser.Node",
"net.percederberg.grammatica.parser.ParseException",
"net.percederberg.grammatica.parser.Production"
] | import net.percederberg.grammatica.parser.Node; import net.percederberg.grammatica.parser.ParseException; import net.percederberg.grammatica.parser.Production; | import net.percederberg.grammatica.parser.*; | [
"net.percederberg.grammatica"
] | net.percederberg.grammatica; | 447,707 |
public String readStringNull(int limit) throws IOException {
return readStringNull(limit, DEFAULT_CHARSET);
} | String function(int limit) throws IOException { return readStringNull(limit, DEFAULT_CHARSET); } | /**
* Reads a null-terminated string without byte padding, using the ASCII charset.
*
* @param limit maximum amount of bytes to read before truncation
* @param charset character set to use when converting the bytes to string
* @return string
* @throws IOException
*/ | Reads a null-terminated string without byte padding, using the ASCII charset | readStringNull | {
"repo_name": "pingzing/dota2-sound-editor",
"path": "jvpklib-master/src/info/ata4/io/DataInputReader.java",
"license": "mit",
"size": 3163
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,373,050 |
public File getToObf()
{
Object toObf = null;
if (toObfGenerator != null)
toObf = toObfGenerator.call();
if (toObf == null)
return null;
else if (toObf instanceof File)
return (File) toObf;
else
return new File(toObf.toStri... | File function() { Object toObf = null; if (toObfGenerator != null) toObf = toObfGenerator.call(); if (toObf == null) return null; else if (toObf instanceof File) return (File) toObf; else return new File(toObf.toString()); } | /**
* The file that is to be obfuscated.
* @return The file. May be {@code null} if unknown at this time.
*/ | The file that is to be obfuscated | getToObf | {
"repo_name": "14mRh4X0r/ForgeGradle",
"path": "src/main/java/net/minecraftforge/gradle/tasks/user/reobf/ObfArtifact.java",
"license": "epl-1.0",
"size": 10913
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,775,785 |
@Test
public void isUnexpiringNotExpiredPast() {
final AssetBase unit = unit();
unit.setExpired(false);
Assert.assertFalse(unit.isExpired());
unit.setExpiresAt(past());
Assert.assertFalse(unit.isUnexpiring());
} | void function() { final AssetBase unit = unit(); unit.setExpired(false); Assert.assertFalse(unit.isExpired()); unit.setExpiresAt(past()); Assert.assertFalse(unit.isUnexpiring()); } | /**
* Tests {@link AssetBase#isUnexpiring()} with not expired and a past expiresAt date.
*/ | Tests <code>AssetBase#isUnexpiring()</code> with not expired and a past expiresAt date | isUnexpiringNotExpiredPast | {
"repo_name": "palava/palava-media",
"path": "src/test/java/de/cosmcode/palava/media/AssetBaseTest.java",
"license": "apache-2.0",
"size": 7802
} | [
"de.cosmocode.palava.media.asset.AssetBase",
"org.junit.Assert"
] | import de.cosmocode.palava.media.asset.AssetBase; import org.junit.Assert; | import de.cosmocode.palava.media.asset.*; import org.junit.*; | [
"de.cosmocode.palava",
"org.junit"
] | de.cosmocode.palava; org.junit; | 627,163 |
public static Enumeration<String> getActions() {
return actions.keys();
}
| static Enumeration<String> function() { return actions.keys(); } | /**
* Returns an enumeration of all available actions.
*/ | Returns an enumeration of all available actions | getActions | {
"repo_name": "aborg0/rapidminer-vega",
"path": "src/com/rapidminer/gui/tools/syntax/InputHandler.java",
"license": "agpl-3.0",
"size": 31603
} | [
"java.util.Enumeration"
] | import java.util.Enumeration; | import java.util.*; | [
"java.util"
] | java.util; | 761,864 |
private void validateExceptionOnSending(ClientProducer producer, ClientMessage message) {
ActiveMQException expected = null;
try {
// after the address is full this send should fail (since the address full policy is FAIL)
producer.send(message);
} catch (ActiveMQException e) {
... | void function(ClientProducer producer, ClientMessage message) { ActiveMQException expected = null; try { producer.send(message); } catch (ActiveMQException e) { expected = e; } assertNotNull(expected); assertEquals(ActiveMQExceptionType.ADDRESS_FULL, expected.getType()); } | /**
* This method validates if sending a message will throw an exception
*/ | This method validates if sending a message will throw an exception | validateExceptionOnSending | {
"repo_name": "jbertram/activemq-artemis",
"path": "tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/PagingTest.java",
"license": "apache-2.0",
"size": 225754
} | [
"org.apache.activemq.artemis.api.core.ActiveMQException",
"org.apache.activemq.artemis.api.core.ActiveMQExceptionType",
"org.apache.activemq.artemis.api.core.client.ClientMessage",
"org.apache.activemq.artemis.api.core.client.ClientProducer"
] | import org.apache.activemq.artemis.api.core.ActiveMQException; import org.apache.activemq.artemis.api.core.ActiveMQExceptionType; import org.apache.activemq.artemis.api.core.client.ClientMessage; import org.apache.activemq.artemis.api.core.client.ClientProducer; | import org.apache.activemq.artemis.api.core.*; import org.apache.activemq.artemis.api.core.client.*; | [
"org.apache.activemq"
] | org.apache.activemq; | 528,096 |
private void disableEntryExpiryTasks() {
int oldTimeToLive = this.region.getEntryTimeToLive().getTimeout();
if (oldTimeToLive > 0) {
ExpirationAttributes ea = new ExpirationAttributes(0, // disables expiration
ExpirationAction.LOCAL_INVALIDATE);
this.region.se... | void function() { int oldTimeToLive = this.region.getEntryTimeToLive().getTimeout(); if (oldTimeToLive > 0) { ExpirationAttributes ea = new ExpirationAttributes(0, ExpirationAction.LOCAL_INVALIDATE); this.region.setEntryTimeToLive(ea); this.region.setCustomEntryTimeToLive(new ThreadIdentifierCustomExpiry()); logger.inf... | /**
* Disables EntryExpiryTask for the HARegion (<code>this.region</code>).
*
*/ | Disables EntryExpiryTask for the HARegion (<code>this.region</code>) | disableEntryExpiryTasks | {
"repo_name": "SnappyDataInc/snappy-store",
"path": "gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/ha/HARegionQueue.java",
"license": "apache-2.0",
"size": 145094
} | [
"com.gemstone.gemfire.cache.ExpirationAction",
"com.gemstone.gemfire.cache.ExpirationAttributes",
"com.gemstone.gemfire.internal.i18n.LocalizedStrings"
] | import com.gemstone.gemfire.cache.ExpirationAction; import com.gemstone.gemfire.cache.ExpirationAttributes; import com.gemstone.gemfire.internal.i18n.LocalizedStrings; | import com.gemstone.gemfire.cache.*; import com.gemstone.gemfire.internal.i18n.*; | [
"com.gemstone.gemfire"
] | com.gemstone.gemfire; | 2,732,073 |
public Iterator getElementsIterator(Object collection, SessionImplementor session) {
if ( session.getEntityMode()==EntityMode.DOM4J ) {
final SessionFactoryImplementor factory = session.getFactory();
final CollectionPersister persister = factory.getCollectionPersister( getRole() );
final Type elementType ... | Iterator function(Object collection, SessionImplementor session) { if ( session.getEntityMode()==EntityMode.DOM4J ) { final SessionFactoryImplementor factory = session.getFactory(); final CollectionPersister persister = factory.getCollectionPersister( getRole() ); final Type elementType = persister.getElementType(); Li... | /**
* Get an iterator over the element set of the collection, which may not yet be wrapped
*
* @param collection The collection to be iterated
* @param session The session from which the request is originating.
* @return The iterator.
*/ | Get an iterator over the element set of the collection, which may not yet be wrapped | getElementsIterator | {
"repo_name": "cacheonix/cacheonix-core",
"path": "3rdparty/hibernate-3.2/src/org/hibernate/type/CollectionType.java",
"license": "lgpl-2.1",
"size": 21343
} | [
"java.util.ArrayList",
"java.util.Iterator",
"java.util.List",
"org.dom4j.Element",
"org.hibernate.EntityMode",
"org.hibernate.engine.SessionFactoryImplementor",
"org.hibernate.engine.SessionImplementor",
"org.hibernate.persister.collection.CollectionPersister"
] | import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.dom4j.Element; import org.hibernate.EntityMode; import org.hibernate.engine.SessionFactoryImplementor; import org.hibernate.engine.SessionImplementor; import org.hibernate.persister.collection.CollectionPersister; | import java.util.*; import org.dom4j.*; import org.hibernate.*; import org.hibernate.engine.*; import org.hibernate.persister.collection.*; | [
"java.util",
"org.dom4j",
"org.hibernate",
"org.hibernate.engine",
"org.hibernate.persister"
] | java.util; org.dom4j; org.hibernate; org.hibernate.engine; org.hibernate.persister; | 656,648 |
public void setChar(String alignChar) {
_theadTag.registerAttribute(AbstractHtmlState.ATTR_GENERAL, HtmlConstants.CHAR, alignChar);
} | void function(String alignChar) { _theadTag.registerAttribute(AbstractHtmlState.ATTR_GENERAL, HtmlConstants.CHAR, alignChar); } | /**
* Sets the value of the horizontal alignment character attribute rendered by the HTML thead tag.
*
* @param alignChar the alignment character
* @jsptagref.attributedescription The horizontal alignment character rendered by the HTML thead tag.
* @jsptagref.attributesyntaxvalue <i>string_alig... | Sets the value of the horizontal alignment character attribute rendered by the HTML thead tag | setChar | {
"repo_name": "moparisthebest/beehive",
"path": "beehive-netui-tags/src/main/java/org/apache/beehive/netui/tags/databinding/datagrid/Header.java",
"license": "apache-2.0",
"size": 21884
} | [
"org.apache.beehive.netui.tags.html.HtmlConstants",
"org.apache.beehive.netui.tags.rendering.AbstractHtmlState"
] | import org.apache.beehive.netui.tags.html.HtmlConstants; import org.apache.beehive.netui.tags.rendering.AbstractHtmlState; | import org.apache.beehive.netui.tags.html.*; import org.apache.beehive.netui.tags.rendering.*; | [
"org.apache.beehive"
] | org.apache.beehive; | 831,552 |
public HueSettings getSettings() {
String json = getSettingsJson();
return json != null ? new HueSettings(json) : null;
} | HueSettings function() { String json = getSettingsJson(); return json != null ? new HueSettings(json) : null; } | /**
* Requests the settings of the Hue bridge that also contains the settings
* of all connected Hue devices.
*
* @return The settings determined from the bridge. Null if they could not
* be requested.
*/ | Requests the settings of the Hue bridge that also contains the settings of all connected Hue devices | getSettings | {
"repo_name": "magcode/openhab",
"path": "bundles/binding/org.openhab.binding.hue/src/main/java/org/openhab/binding/hue/internal/hardware/HueBridge.java",
"license": "epl-1.0",
"size": 5169
} | [
"org.openhab.binding.hue.internal.data.HueSettings"
] | import org.openhab.binding.hue.internal.data.HueSettings; | import org.openhab.binding.hue.internal.data.*; | [
"org.openhab.binding"
] | org.openhab.binding; | 813,715 |
public void browseSchema() {
DatabaseMeta databaseMeta = jobMeta.findDatabase( getConfig().getDatabase() );
Database database = new Database( jobMeta.getParent(), databaseMeta );
try {
database.connect();
String[] schemas = database.getSchemas();
if ( null != schemas && schemas.length >... | void function() { DatabaseMeta databaseMeta = jobMeta.findDatabase( getConfig().getDatabase() ); Database database = new Database( jobMeta.getParent(), databaseMeta ); try { database.connect(); String[] schemas = database.getSchemas(); if ( null != schemas && schemas.length > 0 ) { schemas = Const.sortStrings( schemas ... | /**
* Show the schema browse dialog if schemas can be detected and exist for the give database. Set the selected schema
* to {@link SqoopConfig#setSchema(String) getConfig().setSchema(schema)}.
*/ | Show the schema browse dialog if schemas can be detected and exist for the give database. Set the selected schema to <code>SqoopConfig#setSchema(String) getConfig().setSchema(schema)</code> | browseSchema | {
"repo_name": "stepanovdg/big-data-plugin",
"path": "kettle-plugins/sqoop/src/main/java/org/pentaho/big/data/kettle/plugins/sqoop/ui/AbstractSqoopJobEntryController.java",
"license": "apache-2.0",
"size": 39379
} | [
"org.pentaho.big.data.kettle.plugins.sqoop.AbstractSqoopJobEntry",
"org.pentaho.di.core.Const",
"org.pentaho.di.core.database.Database",
"org.pentaho.di.core.database.DatabaseMeta",
"org.pentaho.di.i18n.BaseMessages",
"org.pentaho.di.ui.core.dialog.EnterSelectionDialog"
] | import org.pentaho.big.data.kettle.plugins.sqoop.AbstractSqoopJobEntry; import org.pentaho.di.core.Const; import org.pentaho.di.core.database.Database; import org.pentaho.di.core.database.DatabaseMeta; import org.pentaho.di.i18n.BaseMessages; import org.pentaho.di.ui.core.dialog.EnterSelectionDialog; | import org.pentaho.big.data.kettle.plugins.sqoop.*; import org.pentaho.di.core.*; import org.pentaho.di.core.database.*; import org.pentaho.di.i18n.*; import org.pentaho.di.ui.core.dialog.*; | [
"org.pentaho.big",
"org.pentaho.di"
] | org.pentaho.big; org.pentaho.di; | 975,298 |
public boolean isParentOf(ConfigurationPropertyName name) {
Assert.notNull(name, "Name must not be null");
if (this.getNumberOfElements() != name.getNumberOfElements() - 1) {
return false;
}
return isAncestorOf(name);
} | boolean function(ConfigurationPropertyName name) { Assert.notNull(name, STR); if (this.getNumberOfElements() != name.getNumberOfElements() - 1) { return false; } return isAncestorOf(name); } | /**
* Returns {@code true} if this element is an immediate parent of the specified name.
* @param name the name to check
* @return {@code true} if this name is an ancestor
*/ | Returns true if this element is an immediate parent of the specified name | isParentOf | {
"repo_name": "habuma/spring-boot",
"path": "spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/properties/source/ConfigurationPropertyName.java",
"license": "apache-2.0",
"size": 20248
} | [
"org.springframework.util.Assert"
] | import org.springframework.util.Assert; | import org.springframework.util.*; | [
"org.springframework.util"
] | org.springframework.util; | 2,814,500 |
protected Path getHadoopTestDir() {
Path testDir = TEST_DIR_HADOOP_TL.get();
if (testDir == null) {
throw new IllegalStateException("This test does not use @TestHadoop");
}
return testDir;
}
/**
* Returns a Hadoop <code>JobConf</code> preconfigured with the Hadoop cluster
* settings f... | Path function() { Path testDir = TEST_DIR_HADOOP_TL.get(); if (testDir == null) { throw new IllegalStateException(STR); } return testDir; } /** * Returns a Hadoop <code>JobConf</code> preconfigured with the Hadoop cluster * settings for testing. This configuration is only available whe the test * method has been annota... | /**
* Returns the HDFS test directory for the current test, only available when the
* test method has been annotated with {@link TestHadoop}.
*
* @return the HDFS test directory for the current test. It is an full/absolute
* <code>Path</code>.
*/ | Returns the HDFS test directory for the current test, only available when the test method has been annotated with <code>TestHadoop</code> | getHadoopTestDir | {
"repo_name": "showyou/hoop-webhdfs-hue",
"path": "hoop-testng/src/main/java/com/cloudera/circus/test/XTest.java",
"license": "apache-2.0",
"size": 28945
} | [
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.mapred.JobConf"
] | import org.apache.hadoop.fs.Path; import org.apache.hadoop.mapred.JobConf; | import org.apache.hadoop.fs.*; import org.apache.hadoop.mapred.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 526,021 |
public void onCreate(Bundle savedInstanceState) {
overrideRedditSwipeAnywhere();
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_gif);
if (Reddit.imageViewerSolidBackground) {
findViewById(R.id.root).setBackgroundColor(ContextCompat.getColo... | void function(Bundle savedInstanceState) { overrideRedditSwipeAnywhere(); super.onCreate(savedInstanceState); setContentView(R.layout.activity_gif); if (Reddit.imageViewerSolidBackground) { findViewById(R.id.root).setBackgroundColor(ContextCompat.getColor(this, R.color.darkbg)); } final MediaVideoView v = (MediaVideoVi... | /**
* Called when the activity is first created.
*/ | Called when the activity is first created | onCreate | {
"repo_name": "530farm/Slide",
"path": "app/src/main/java/me/ccrama/redditslide/Activities/GifView.java",
"license": "gpl-3.0",
"size": 45963
} | [
"android.os.Bundle",
"android.support.v4.content.ContextCompat",
"me.ccrama.redditslide.Reddit",
"me.ccrama.redditslide.Views"
] | import android.os.Bundle; import android.support.v4.content.ContextCompat; import me.ccrama.redditslide.Reddit; import me.ccrama.redditslide.Views; | import android.os.*; import android.support.v4.content.*; import me.ccrama.redditslide.*; | [
"android.os",
"android.support",
"me.ccrama.redditslide"
] | android.os; android.support; me.ccrama.redditslide; | 2,185,003 |
public final void setActionButton(DialogAction which, @StringRes int titleRes) {
setActionButton(which, getContext().getText(titleRes));
} | final void function(DialogAction which, @StringRes int titleRes) { setActionButton(which, getContext().getText(titleRes)); } | /**
* Updates an action button's title, causing invalidation to check if the action buttons should be stacked.
*
* @param which The action button to update.
* @param titleRes The string resource of the new title of the action button.
*/ | Updates an action button's title, causing invalidation to check if the action buttons should be stacked | setActionButton | {
"repo_name": "playerchenhe/material-dialogs",
"path": "core/src/main/java/com/afollestad/materialdialogs/MaterialDialog.java",
"license": "mit",
"size": 75115
} | [
"android.support.annotation.StringRes"
] | import android.support.annotation.StringRes; | import android.support.annotation.*; | [
"android.support"
] | android.support; | 1,363,974 |
boolean isAuthenticationRequested(
HttpResponse response,
HttpContext context); | boolean isAuthenticationRequested( HttpResponse response, HttpContext context); | /**
* Determines if the given HTTP response response represents
* an authentication challenge that was sent back as a result
* of authentication failure
* @param response HTTP response.
* @param context HTTP context.
* @return <code>true</code> if user authentication is required,
* ... | Determines if the given HTTP response response represents an authentication challenge that was sent back as a result of authentication failure | isAuthenticationRequested | {
"repo_name": "wilebeast/FireFox-OS",
"path": "B2G/gecko/mobile/android/base/httpclientandroidlib/client/AuthenticationHandler.java",
"license": "apache-2.0",
"size": 3790
} | [
"ch.boye.httpclientandroidlib.HttpResponse",
"ch.boye.httpclientandroidlib.protocol.HttpContext"
] | import ch.boye.httpclientandroidlib.HttpResponse; import ch.boye.httpclientandroidlib.protocol.HttpContext; | import ch.boye.httpclientandroidlib.*; import ch.boye.httpclientandroidlib.protocol.*; | [
"ch.boye.httpclientandroidlib"
] | ch.boye.httpclientandroidlib; | 2,781,920 |
default Optional<String> getSafariInitialUrl() {
return Optional.ofNullable((String) getCapability(SAFARI_INITIAL_URL_OPTION));
} | default Optional<String> getSafariInitialUrl() { return Optional.ofNullable((String) getCapability(SAFARI_INITIAL_URL_OPTION)); } | /**
* Get the initial safari url.
*
* @return Initial safari url.
*/ | Get the initial safari url | getSafariInitialUrl | {
"repo_name": "appium/java-client",
"path": "src/main/java/io/appium/java_client/ios/options/webview/SupportsSafariInitialUrlOption.java",
"license": "apache-2.0",
"size": 1619
} | [
"java.util.Optional"
] | import java.util.Optional; | import java.util.*; | [
"java.util"
] | java.util; | 1,278,281 |
static ByteBuffer stashString(ByteBuffer target, String string) {
return stashString(target, string, StandardCharsets.UTF_8);
} | static ByteBuffer stashString(ByteBuffer target, String string) { return stashString(target, string, StandardCharsets.UTF_8); } | /**
* Store string using UTF 8 charset.
*
* @param target buffer to write to
* @param string string to store
*/ | Store string using UTF 8 charset | stashString | {
"repo_name": "sormuras/stash",
"path": "com.github.sormuras.stash/main/java/com/github/sormuras/stash/Stashable.java",
"license": "apache-2.0",
"size": 11354
} | [
"java.nio.ByteBuffer",
"java.nio.charset.StandardCharsets"
] | import java.nio.ByteBuffer; import java.nio.charset.StandardCharsets; | import java.nio.*; import java.nio.charset.*; | [
"java.nio"
] | java.nio; | 2,052,825 |
public List<OpenHABConfigurationRecord> getConfiguration(String domain); | List<OpenHABConfigurationRecord> function(String domain); | /**
* Gets the configuration items for a domain.
*
* @param domain
* @returns
*/ | Gets the configuration items for a domain | getConfiguration | {
"repo_name": "pravinw/openhab",
"path": "bundles/binding/org.openhab.binding.zwave/src/main/java/org/openhab/binding/zwave/internal/config/OpenHABConfigurationService.java",
"license": "epl-1.0",
"size": 1910
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,063,394 |
@Test
public void updateWatermarkWithWatermarkHolds() {
CommittedBundle<Integer> createdBundle = timestampedBundle(createdInts,
TimestampedValue.of(1, new Instant(1_000_000L)),
TimestampedValue.of(2, new Instant(1234L)),
TimestampedValue.of(3, new Instant(-1000L)));
manager.updateWat... | void function() { CommittedBundle<Integer> createdBundle = timestampedBundle(createdInts, TimestampedValue.of(1, new Instant(1_000_000L)), TimestampedValue.of(2, new Instant(1234L)), TimestampedValue.of(3, new Instant(-1000L))); manager.updateWatermarks( null, TimerUpdate.empty(), graph.getProducer(createdInts), null, ... | /**
* Demonstrates that the watermark of an {@link AppliedPTransform} is held to the provided
* watermark hold.
*/ | Demonstrates that the watermark of an <code>AppliedPTransform</code> is held to the provided watermark hold | updateWatermarkWithWatermarkHolds | {
"repo_name": "tgroh/incubator-beam",
"path": "runners/direct-java/src/test/java/org/apache/beam/runners/direct/WatermarkManagerTest.java",
"license": "apache-2.0",
"size": 70424
} | [
"java.util.Collections",
"org.apache.beam.runners.direct.WatermarkManager",
"org.apache.beam.sdk.transforms.windowing.BoundedWindow",
"org.apache.beam.sdk.values.KV",
"org.apache.beam.sdk.values.TimestampedValue",
"org.hamcrest.Matchers",
"org.joda.time.Instant",
"org.junit.Assert"
] | import java.util.Collections; import org.apache.beam.runners.direct.WatermarkManager; import org.apache.beam.sdk.transforms.windowing.BoundedWindow; import org.apache.beam.sdk.values.KV; import org.apache.beam.sdk.values.TimestampedValue; import org.hamcrest.Matchers; import org.joda.time.Instant; import org.junit.Asse... | import java.util.*; import org.apache.beam.runners.direct.*; import org.apache.beam.sdk.transforms.windowing.*; import org.apache.beam.sdk.values.*; import org.hamcrest.*; import org.joda.time.*; import org.junit.*; | [
"java.util",
"org.apache.beam",
"org.hamcrest",
"org.joda.time",
"org.junit"
] | java.util; org.apache.beam; org.hamcrest; org.joda.time; org.junit; | 2,801,542 |
@SuppressWarnings("unused")
private void computeNonLocals() {
nonLocalRegisters = new HashSet<Register>(20);
Enumeration<BasicBlock> blocks = ir.getBasicBlocks();
while (blocks.hasMoreElements()) {
HashSet<Register> killed = new HashSet<Register>(5);
BasicBlock block = blocks.nextElement();
... | @SuppressWarnings(STR) void function() { nonLocalRegisters = new HashSet<Register>(20); Enumeration<BasicBlock> blocks = ir.getBasicBlocks(); while (blocks.hasMoreElements()) { HashSet<Register> killed = new HashSet<Register>(5); BasicBlock block = blocks.nextElement(); Enumeration<Instruction> instrs = block.forwardRe... | /**
* Pass through the IR and calculate which registers are not
* local to a basic block. Store the result in the <code> nonLocalRegisters
* </code> field.
*/ | Pass through the IR and calculate which registers are not local to a basic block. Store the result in the <code> nonLocalRegisters </code> field | computeNonLocals | {
"repo_name": "CodeOffloading/JikesRVM-CCO",
"path": "jikesrvm-3.1.3/rvm/src/org/jikesrvm/compilers/opt/ssa/EnterSSA.java",
"license": "epl-1.0",
"size": 44804
} | [
"java.util.Enumeration",
"java.util.HashSet",
"org.jikesrvm.compilers.opt.ir.BasicBlock",
"org.jikesrvm.compilers.opt.ir.Instruction",
"org.jikesrvm.compilers.opt.ir.Register",
"org.jikesrvm.compilers.opt.ir.operand.Operand",
"org.jikesrvm.compilers.opt.ir.operand.RegisterOperand"
] | import java.util.Enumeration; import java.util.HashSet; import org.jikesrvm.compilers.opt.ir.BasicBlock; import org.jikesrvm.compilers.opt.ir.Instruction; import org.jikesrvm.compilers.opt.ir.Register; import org.jikesrvm.compilers.opt.ir.operand.Operand; import org.jikesrvm.compilers.opt.ir.operand.RegisterOperand; | import java.util.*; import org.jikesrvm.compilers.opt.ir.*; import org.jikesrvm.compilers.opt.ir.operand.*; | [
"java.util",
"org.jikesrvm.compilers"
] | java.util; org.jikesrvm.compilers; | 1,513,568 |
public ServiceCall<Void> deleteAsync(String resourceGroupName, String name, final ServiceCallback<Void> serviceCallback) {
return ServiceCall.create(deleteWithServiceResponseAsync(resourceGroupName, name), serviceCallback);
} | ServiceCall<Void> function(String resourceGroupName, String name, final ServiceCallback<Void> serviceCallback) { return ServiceCall.create(deleteWithServiceResponseAsync(resourceGroupName, name), serviceCallback); } | /**
* Deletes a redis cache. This operation takes a while to complete.
*
* @param resourceGroupName The name of the resource group.
* @param name The name of the redis cache.
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @return the {@link ... | Deletes a redis cache. This operation takes a while to complete | deleteAsync | {
"repo_name": "herveyw/azure-sdk-for-java",
"path": "azure-mgmt-redis/src/main/java/com/microsoft/azure/management/redis/implementation/RedisInner.java",
"license": "mit",
"size": 90834
} | [
"com.microsoft.rest.ServiceCall",
"com.microsoft.rest.ServiceCallback"
] | import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 1,304,897 |
return nsdname;
}
private final transient ImmutableMap<String, Object> delegate; | return nsdname; } private final transient ImmutableMap<String, Object> delegate; | /**
* domain-name which specifies a host which should be authoritative for the
* specified class and domain.
*/ | domain-name which specifies a host which should be authoritative for the specified class and domain | getNsdname | {
"repo_name": "yanzhijun/jclouds-aliyun",
"path": "providers/dynect/src/main/java/org/jclouds/dynect/v3/domain/rdata/NSData.java",
"license": "apache-2.0",
"size": 2706
} | [
"com.google.common.collect.ImmutableMap"
] | import com.google.common.collect.ImmutableMap; | import com.google.common.collect.*; | [
"com.google.common"
] | com.google.common; | 2,816,855 |
public static int availablePort(int prefered) {
int rtn = -1;
try {
rtn = tryPort(prefered);
} catch (IOException e) {
}
return rtn;
}
| static int function(int prefered) { int rtn = -1; try { rtn = tryPort(prefered); } catch (IOException e) { } return rtn; } | /**
* Check whether the port is available to binding
*
* @param prefered
* @return -1 means not available, others means available
*/ | Check whether the port is available to binding | availablePort | {
"repo_name": "zhangjunfang/jstorm-0.9.6.3-",
"path": "jstorm-client-extension/src/main/java/com/alibaba/jstorm/utils/NetWorkUtils.java",
"license": "apache-2.0",
"size": 2603
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,915,495 |
public void measureChild(View child, int widthUsed, int heightUsed) {
final LayoutParams lp = (LayoutParams) child.getLayoutParams();
final Rect insets = mRecyclerView.getItemDecorInsetsForChild(child);
widthUsed += insets.left + insets.right;
heightUsed += inset... | void function(View child, int widthUsed, int heightUsed) { final LayoutParams lp = (LayoutParams) child.getLayoutParams(); final Rect insets = mRecyclerView.getItemDecorInsetsForChild(child); widthUsed += insets.left + insets.right; heightUsed += insets.top + insets.bottom; final int widthSpec = getChildMeasureSpec(get... | /**
* Measure a child view using standard measurement policy, taking the padding
* of the parent RecyclerView and any added item decorations into account.
*
* <p>If the RecyclerView can be scrolled in either dimension the caller may
* pass 0 as the widthUsed or heightUsed pa... | Measure a child view using standard measurement policy, taking the padding of the parent RecyclerView and any added item decorations into account. If the RecyclerView can be scrolled in either dimension the caller may pass 0 as the widthUsed or heightUsed parameters as they will be irrelevant | measureChild | {
"repo_name": "rugram/RuGram",
"path": "TMessagesProj/src/main/java/org/telegram/android/support/widget/RecyclerView.java",
"license": "gpl-2.0",
"size": 416898
} | [
"android.graphics.Rect",
"android.view.View"
] | import android.graphics.Rect; import android.view.View; | import android.graphics.*; import android.view.*; | [
"android.graphics",
"android.view"
] | android.graphics; android.view; | 434,639 |
private Set<QName> save(NodeRef nodeRef)
{
Set<QName> assocs = null;
// register this service
AlfrescoTransactionSupport.bindListener(this);
// get the event list
Map<NodeRef, Set<QName>> nodes = getNodes();
if (nodes == null)
{... | Set<QName> function(NodeRef nodeRef) { Set<QName> assocs = null; AlfrescoTransactionSupport.bindListener(this); Map<NodeRef, Set<QName>> nodes = getNodes(); if (nodes == null) { nodes = new HashMap<NodeRef, Set<QName>>(31, 0.75F); AlfrescoTransactionSupport.bindResource(KEY_NODES, nodes); } if (nodes.containsKey(nodeRe... | /**
* Ensures that this service is registered with the transaction and saves the node
* reference for use (property check) later.
*
* @param nodeRef
*/ | Ensures that this service is registered with the transaction and saves the node reference for use (property check) later | save | {
"repo_name": "daniel-he/community-edition",
"path": "projects/repository/source/java/org/alfresco/repo/node/integrity/IncompleteNodeTagger.java",
"license": "lgpl-3.0",
"size": 22012
} | [
"java.util.HashMap",
"java.util.Map",
"java.util.Set",
"org.alfresco.repo.transaction.AlfrescoTransactionSupport",
"org.alfresco.service.cmr.repository.NodeRef",
"org.alfresco.service.namespace.QName"
] | import java.util.HashMap; import java.util.Map; import java.util.Set; import org.alfresco.repo.transaction.AlfrescoTransactionSupport; import org.alfresco.service.cmr.repository.NodeRef; import org.alfresco.service.namespace.QName; | import java.util.*; import org.alfresco.repo.transaction.*; import org.alfresco.service.cmr.repository.*; import org.alfresco.service.namespace.*; | [
"java.util",
"org.alfresco.repo",
"org.alfresco.service"
] | java.util; org.alfresco.repo; org.alfresco.service; | 494,025 |
public static java.util.Set extractReferralERODSet(ims.domain.ILightweightDomainFactory domainFactory, ims.careuk.vo.ReferralERODForBookAppointmentVoCollection voCollection)
{
return extractReferralERODSet(domainFactory, voCollection, null, new HashMap());
}
| static java.util.Set function(ims.domain.ILightweightDomainFactory domainFactory, ims.careuk.vo.ReferralERODForBookAppointmentVoCollection voCollection) { return extractReferralERODSet(domainFactory, voCollection, null, new HashMap()); } | /**
* Create the ims.careuk.domain.objects.ReferralEROD set from the value object collection.
* @param domainFactory - used to create existing (persistent) domain objects.
* @param voCollection - the collection of value objects
*/ | Create the ims.careuk.domain.objects.ReferralEROD set from the value object collection | extractReferralERODSet | {
"repo_name": "openhealthcare/openMAXIMS",
"path": "openmaxims_workspace/ValueObjects/src/ims/careuk/vo/domain/ReferralERODForBookAppointmentVoAssembler.java",
"license": "agpl-3.0",
"size": 21791
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 1,872,699 |
public boolean isProfileDisabled(User loggedInUser, String profileLabel) {
KickstartData ksData = lookupKsData(profileLabel, loggedInUser.getOrg());
return !ksData.isActive();
} | boolean function(User loggedInUser, String profileLabel) { KickstartData ksData = lookupKsData(profileLabel, loggedInUser.getOrg()); return !ksData.isActive(); } | /**
* Returns whether a kickstart profile is disabled
*
* @param loggedInUser The current user
* @param profileLabel kickstart profile label
* @return true if profile is disabled
*
* @xmlrpc.doc Returns whether a kickstart profile is disabled
* @xmlrpc.param #session_key()
*... | Returns whether a kickstart profile is disabled | isProfileDisabled | {
"repo_name": "hustodemon/spacewalk",
"path": "java/code/src/com/redhat/rhn/frontend/xmlrpc/kickstart/KickstartHandler.java",
"license": "gpl-2.0",
"size": 34773
} | [
"com.redhat.rhn.domain.kickstart.KickstartData",
"com.redhat.rhn.domain.user.User"
] | import com.redhat.rhn.domain.kickstart.KickstartData; import com.redhat.rhn.domain.user.User; | import com.redhat.rhn.domain.kickstart.*; import com.redhat.rhn.domain.user.*; | [
"com.redhat.rhn"
] | com.redhat.rhn; | 491,673 |
private Reader getReader()
{
return
reader_ != null
? reader_
: readerFor( System.in);
} | Reader function() { return reader_ != null ? reader_ : readerFor( System.in); } | /**
* Returns the Reader for this document.
*/ | Returns the Reader for this document | getReader | {
"repo_name": "Cornutum/tcases",
"path": "tcases-openapi/src/main/java/org/cornutum/tcases/openapi/reader/OpenApiReader.java",
"license": "mit",
"size": 6545
} | [
"java.io.Reader"
] | import java.io.Reader; | import java.io.*; | [
"java.io"
] | java.io; | 1,301,424 |
public static Hirdeto loadByFbId(String fbId) {
Hirdeto hirdeto = null;
Query<Hirdeto> query = MongoUtils.getDatastore().createQuery(Hirdeto.class);
query.criteria("facebookId").equal(fbId);
hirdeto = query.get();
return hirdeto;
}
| static Hirdeto function(String fbId) { Hirdeto hirdeto = null; Query<Hirdeto> query = MongoUtils.getDatastore().createQuery(Hirdeto.class); query.criteria(STR).equal(fbId); hirdeto = query.get(); return hirdeto; } | /**
* Megkeresi a Hirdetot a Facebook id mezoje alapjan. FB belepesnel hasznaljuk.
* @param fbId
* @return Az azonositott Hirdeto, vagy null
*/ | Megkeresi a Hirdetot a Facebook id mezoje alapjan. FB belepesnel hasznaljuk | loadByFbId | {
"repo_name": "bvamos/aprocom-server",
"path": "src/main/java/com/aprohirdetes/model/HirdetoHelper.java",
"license": "gpl-3.0",
"size": 2755
} | [
"com.aprohirdetes.utils.MongoUtils",
"org.mongodb.morphia.query.Query"
] | import com.aprohirdetes.utils.MongoUtils; import org.mongodb.morphia.query.Query; | import com.aprohirdetes.utils.*; import org.mongodb.morphia.query.*; | [
"com.aprohirdetes.utils",
"org.mongodb.morphia"
] | com.aprohirdetes.utils; org.mongodb.morphia; | 473,580 |
public void setPostTablificationTransformations(List<AccountingLineTableTransformation> postTablificationTransformations) {
this.postTablificationTransformations = postTablificationTransformations;
}
| void function(List<AccountingLineTableTransformation> postTablificationTransformations) { this.postTablificationTransformations = postTablificationTransformations; } | /**
* Sets the postTablificationTransformations attribute value.
* @param postTablificationTransformations The postTablificationTransformations to set.
*/ | Sets the postTablificationTransformations attribute value | setPostTablificationTransformations | {
"repo_name": "ua-eas/ua-kfs-5.3",
"path": "work/src/org/kuali/kfs/sys/document/service/impl/AccountingLineRenderingServiceImpl.java",
"license": "agpl-3.0",
"size": 20475
} | [
"java.util.List",
"org.kuali.kfs.sys.document.service.AccountingLineTableTransformation"
] | import java.util.List; import org.kuali.kfs.sys.document.service.AccountingLineTableTransformation; | import java.util.*; import org.kuali.kfs.sys.document.service.*; | [
"java.util",
"org.kuali.kfs"
] | java.util; org.kuali.kfs; | 2,094,372 |
@XmlElement(name = "scopeId")
@XmlJavaTypeAdapter(KapuaIdAdapter.class)
KapuaId getScopeId(); | @XmlElement(name = STR) @XmlJavaTypeAdapter(KapuaIdAdapter.class) KapuaId getScopeId(); | /**
* Gets the scope {@link KapuaId}.
*
* @return The scope {@link KapuaId}.
* @since 1.0.0
*/ | Gets the scope <code>KapuaId</code> | getScopeId | {
"repo_name": "stzilli/kapua",
"path": "service/commons/storable/api/src/main/java/org/eclipse/kapua/service/storable/model/query/StorableQuery.java",
"license": "epl-1.0",
"size": 6401
} | [
"javax.xml.bind.annotation.XmlElement",
"javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter",
"org.eclipse.kapua.model.id.KapuaId",
"org.eclipse.kapua.model.id.KapuaIdAdapter"
] | import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; import org.eclipse.kapua.model.id.KapuaId; import org.eclipse.kapua.model.id.KapuaIdAdapter; | import javax.xml.bind.annotation.*; import javax.xml.bind.annotation.adapters.*; import org.eclipse.kapua.model.id.*; | [
"javax.xml",
"org.eclipse.kapua"
] | javax.xml; org.eclipse.kapua; | 857,749 |
public List<Stop> restore (String agencyId) {
DB targetTx = VersionedDataStore.getRawAgencyTx(agencyId);
for (String obj : targetTx.getAll().keySet()) {
if (obj.equals("snapshotVersion") || obj.equals("stops"))
// except don't overwrite the counter that keeps track of snapshot versions
// we also don... | List<Stop> function (String agencyId) { DB targetTx = VersionedDataStore.getRawAgencyTx(agencyId); for (String obj : targetTx.getAll().keySet()) { if (obj.equals(STR) obj.equals("stops")) continue; else targetTx.delete(obj); } int rcount, ccount, ecount, pcount, tcount; if (tx.exists(STR)) rcount = pump(targetTx, STR, ... | /**
* restore into an agency. this will OVERWRITE ALL DATA IN THE AGENCY's MASTER BRANCH, with the exception of stops
* @return any stop IDs that had been deleted and were restored so that this snapshot would be valid.
*/ | restore into an agency. this will OVERWRITE ALL DATA IN THE AGENCY's MASTER BRANCH, with the exception of stops | restore | {
"repo_name": "dcunited001/gtfs-editor",
"path": "app/datastore/SnapshotTx.java",
"license": "mit",
"size": 5213
} | [
"com.conveyal.gtfs.model.Calendar",
"java.util.ArrayList",
"java.util.List",
"org.mapdb.BTreeMap",
"org.mapdb.Fun"
] | import com.conveyal.gtfs.model.Calendar; import java.util.ArrayList; import java.util.List; import org.mapdb.BTreeMap; import org.mapdb.Fun; | import com.conveyal.gtfs.model.*; import java.util.*; import org.mapdb.*; | [
"com.conveyal.gtfs",
"java.util",
"org.mapdb"
] | com.conveyal.gtfs; java.util; org.mapdb; | 2,027,630 |
private void getAttributes(AttributeSet attrs) {
TypedArray typedArray = mContext.obtainStyledAttributes(attrs, R.styleable.PickerUI, 0, 0);
if (typedArray != null) {
try {
mUseBlur = typedArray.getBoolean(R.styleable.PickerUI_blur,
PickerUIBlur.D... | void function(AttributeSet attrs) { TypedArray typedArray = mContext.obtainStyledAttributes(attrs, R.styleable.PickerUI, 0, 0); if (typedArray != null) { try { mUseBlur = typedArray.getBoolean(R.styleable.PickerUI_blur, PickerUIBlur.DEFAULT_USE_BLUR); mBlurRadius = typedArray.getInteger(R.styleable.PickerUI_blur_radius... | /**
* Retrieve styles attributes
*/ | Retrieve styles attributes | getAttributes | {
"repo_name": "chenyi2013/PickerUI",
"path": "library/src/main/java/com/dpizarro/uipicker/library/blur/PickerUIBlurHelper.java",
"license": "apache-2.0",
"size": 12138
} | [
"android.content.res.TypedArray",
"android.util.AttributeSet",
"android.util.Log"
] | import android.content.res.TypedArray; import android.util.AttributeSet; import android.util.Log; | import android.content.res.*; import android.util.*; | [
"android.content",
"android.util"
] | android.content; android.util; | 730,718 |
public ArrayList<String> serviceName_database_GET(String serviceName, OvhModeEnum mode, String name, String server, OvhDatabaseTypeEnum type, String user) throws IOException {
String qPath = "/hosting/web/{serviceName}/database";
StringBuilder sb = path(qPath, serviceName);
query(sb, "mode", mode);
query(sb,... | ArrayList<String> function(String serviceName, OvhModeEnum mode, String name, String server, OvhDatabaseTypeEnum type, String user) throws IOException { String qPath = STR; StringBuilder sb = path(qPath, serviceName); query(sb, "mode", mode); query(sb, "name", name); query(sb, STR, server); query(sb, "type", type); que... | /**
* Databases linked to your hosting
*
* REST: GET /hosting/web/{serviceName}/database
* @param type [required] Filter the value of type property (=)
* @param mode [required] Filter the value of mode property (=)
* @param server [required] Filter the value of server property (like)
* @param user [requir... | Databases linked to your hosting | serviceName_database_GET | {
"repo_name": "UrielCh/ovh-java-sdk",
"path": "ovh-java-sdk-hostingweb/src/main/java/net/minidev/ovh/api/ApiOvhHostingweb.java",
"license": "bsd-3-clause",
"size": 99470
} | [
"java.io.IOException",
"java.util.ArrayList",
"net.minidev.ovh.api.hosting.web.database.OvhDatabaseTypeEnum",
"net.minidev.ovh.api.hosting.web.database.OvhModeEnum"
] | import java.io.IOException; import java.util.ArrayList; import net.minidev.ovh.api.hosting.web.database.OvhDatabaseTypeEnum; import net.minidev.ovh.api.hosting.web.database.OvhModeEnum; | import java.io.*; import java.util.*; import net.minidev.ovh.api.hosting.web.database.*; | [
"java.io",
"java.util",
"net.minidev.ovh"
] | java.io; java.util; net.minidev.ovh; | 318,223 |
List<ReportData> reportData = Collections.emptyList();
ReportResponse response = new ReportResponse(reportData);
response.setError(true);
response.setErrorMessage(msg);
return response;
}
public ReportResponse(List<ReportData> reportData) {
this.reportData = reportD... | List<ReportData> reportData = Collections.emptyList(); ReportResponse response = new ReportResponse(reportData); response.setError(true); response.setErrorMessage(msg); return response; } public ReportResponse(List<ReportData> reportData) { this.reportData = reportData; } | /**
* Creates an error response object
* @param msg Error message
* @return Error response object
*/ | Creates an error response object | reportsFailure | {
"repo_name": "CPSC319-2017w1/coast.the-terminal",
"path": "code/backend/src/main/java/server/rest/responses/ReportResponse.java",
"license": "bsd-3-clause",
"size": 1076
} | [
"java.util.Collections",
"java.util.List"
] | import java.util.Collections; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 91,050 |
public synchronized void dispose() {
if (!isDisposed) {
isDisposed = true;
if (mhfTracker != null) {
mhfTracker.close();
mhfTracker = null;
}
for (Iterator<RuntimeRule> it = rules.values().iterator(); it.hasNext();) {
... | synchronized void function() { if (!isDisposed) { isDisposed = true; if (mhfTracker != null) { mhfTracker.close(); mhfTracker = null; } for (Iterator<RuntimeRule> it = rules.values().iterator(); it.hasNext();) { RuntimeRule r = it.next(); removeRuleEntry(r); it.remove(); } if (compositeFactory != null) { compositeFacto... | /**
* The method clean used resource by rule engine when it is stopped.
*/ | The method clean used resource by rule engine when it is stopped | dispose | {
"repo_name": "adimova/smarthome",
"path": "bundles/automation/org.eclipse.smarthome.automation.core/src/main/java/org/eclipse/smarthome/automation/core/internal/RuleEngine.java",
"license": "epl-1.0",
"size": 58681
} | [
"java.util.Iterator",
"java.util.concurrent.Future"
] | import java.util.Iterator; import java.util.concurrent.Future; | import java.util.*; import java.util.concurrent.*; | [
"java.util"
] | java.util; | 2,406,595 |
if (value instanceof IQuantity) {
throw MathException.of(value);
}
return QuantityImpl.of(value, unit);
} | if (value instanceof IQuantity) { throw MathException.of(value); } return QuantityImpl.of(value, unit); } | /**
* Hint: function does not check parameters for null, although null as input is likely to cause
* problems subsequently.
*
* @param value
* @param unit for instance Unit.of("m*s^-1")
* @return
* @throws Exception if value is instance of {@code Quantity}
*/ | Hint: function does not check parameters for null, although null as input is likely to cause problems subsequently | of | {
"repo_name": "axkr/symja_android_library",
"path": "symja_android_library/matheclipse-core/src/main/java/org/matheclipse/core/tensor/qty/IQuantity.java",
"license": "gpl-3.0",
"size": 3724
} | [
"org.matheclipse.parser.client.math.MathException"
] | import org.matheclipse.parser.client.math.MathException; | import org.matheclipse.parser.client.math.*; | [
"org.matheclipse.parser"
] | org.matheclipse.parser; | 163,590 |
@NbBundle.Messages({
"ConfigVisualPanel1.messageLabel.noExternalDriveFound=No drive found",
"# {0} - root", "# {1} - description", "# {2} - size with unit", "# {3} - file system",
"ConfigVisualPanel1.driveListItem={0} ({1}) ({2}) - File system: {3}"
})
private void refreshDriveList()... | @NbBundle.Messages({ STR, STR, STR, STR, STR, STR }) void function() { List<String> listData = new ArrayList<>(); File[] roots = File.listRoots(); int firstRemovableDrive = -1; int i = 0; for (File root : roots) { if (DriveListUtils.isNetworkDrive(root.toString().replace(":\\", STRvolume:isRemovableSTRUnable to select ... | /**
* Refresh the list of local drives on the current machine
*/ | Refresh the list of local drives on the current machine | refreshDriveList | {
"repo_name": "sleuthkit/autopsy",
"path": "Core/src/org/sleuthkit/autopsy/logicalimager/configuration/ConfigVisualPanel1.java",
"license": "apache-2.0",
"size": 23869
} | [
"java.io.File",
"java.util.ArrayList",
"java.util.List",
"org.openide.util.NbBundle",
"org.sleuthkit.autopsy.logicalimager.dsp.DriveListUtils"
] | import java.io.File; import java.util.ArrayList; import java.util.List; import org.openide.util.NbBundle; import org.sleuthkit.autopsy.logicalimager.dsp.DriveListUtils; | import java.io.*; import java.util.*; import org.openide.util.*; import org.sleuthkit.autopsy.logicalimager.dsp.*; | [
"java.io",
"java.util",
"org.openide.util",
"org.sleuthkit.autopsy"
] | java.io; java.util; org.openide.util; org.sleuthkit.autopsy; | 58,646 |
@Named("role:list")
@GET
@SelectJson("roles")
@Consumes(MediaType.APPLICATION_JSON)
@Fallback(EmptyFluentIterableOnNotFoundOr404.class)
FluentIterable<? extends Role> list(); | @Named(STR) @SelectJson("roles") @Consumes(MediaType.APPLICATION_JSON) @Fallback(EmptyFluentIterableOnNotFoundOr404.class) FluentIterable<? extends Role> list(); | /**
* Returns a summary list of roles.
*
* @return The list of roles
*/ | Returns a summary list of roles | list | {
"repo_name": "yanzhijun/jclouds-aliyun",
"path": "apis/openstack-keystone/src/main/java/org/jclouds/openstack/keystone/v2_0/extensions/RoleAdminApi.java",
"license": "apache-2.0",
"size": 3214
} | [
"com.google.common.collect.FluentIterable",
"javax.inject.Named",
"javax.ws.rs.Consumes",
"javax.ws.rs.core.MediaType",
"org.jclouds.Fallbacks",
"org.jclouds.openstack.keystone.v2_0.domain.Role",
"org.jclouds.rest.annotations.Fallback",
"org.jclouds.rest.annotations.SelectJson"
] | import com.google.common.collect.FluentIterable; import javax.inject.Named; import javax.ws.rs.Consumes; import javax.ws.rs.core.MediaType; import org.jclouds.Fallbacks; import org.jclouds.openstack.keystone.v2_0.domain.Role; import org.jclouds.rest.annotations.Fallback; import org.jclouds.rest.annotations.SelectJson; | import com.google.common.collect.*; import javax.inject.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.jclouds.*; import org.jclouds.openstack.keystone.v2_0.domain.*; import org.jclouds.rest.annotations.*; | [
"com.google.common",
"javax.inject",
"javax.ws",
"org.jclouds",
"org.jclouds.openstack",
"org.jclouds.rest"
] | com.google.common; javax.inject; javax.ws; org.jclouds; org.jclouds.openstack; org.jclouds.rest; | 893,449 |
@Test
public void testGetBooleanFromResource() {
String key = "goodBoolean";
Locale locale = JComponent.getDefaultLocale();
String columnString = UIManagerExt.getString(key, locale);
if (columnString == null) {
LOG.info("cant run test - no resource found for key: " + ... | void function() { String key = STR; Locale locale = JComponent.getDefaultLocale(); String columnString = UIManagerExt.getString(key, locale); if (columnString == null) { LOG.info(STR + key); return; } Object value = UIManagerExt.getBoolean(key, locale); assertNotNull(value); assertEquals(Boolean.valueOf(columnString), ... | /**
* test that we get a boolean from the localized resource.
*/ | test that we get a boolean from the localized resource | testGetBooleanFromResource | {
"repo_name": "syncer/swingx",
"path": "swingx-plaf/src/test/java/org/jdesktop/swingx/plaf/UIManagerExtTest.java",
"license": "lgpl-2.1",
"size": 10186
} | [
"java.util.Locale",
"javax.swing.JComponent",
"org.junit.Assert"
] | import java.util.Locale; import javax.swing.JComponent; import org.junit.Assert; | import java.util.*; import javax.swing.*; import org.junit.*; | [
"java.util",
"javax.swing",
"org.junit"
] | java.util; javax.swing; org.junit; | 2,417,190 |
public Map<ChannelOption, Object> getChannelOptions() {
return channelOptions;
} | Map<ChannelOption, Object> function() { return channelOptions; } | /**
* Getter for @channelOptions
*
* @return
*/ | Getter for @channelOptions | getChannelOptions | {
"repo_name": "betacraft/transporter",
"path": "netty4x/src/main/java/com/rc/transporter/netty4x/NettyTransportClientConfig.java",
"license": "gpl-2.0",
"size": 7319
} | [
"io.netty.channel.ChannelOption",
"java.util.Map"
] | import io.netty.channel.ChannelOption; import java.util.Map; | import io.netty.channel.*; import java.util.*; | [
"io.netty.channel",
"java.util"
] | io.netty.channel; java.util; | 2,629,040 |
@RequestMapping(value="/trip/", method=RequestMethod.POST, consumes={JSON}, produces={JSON})
public @ResponseBody EntityResponse<Trip> create(@RequestBody Trip toCreate) {
return super.create(toCreate);
}
| @RequestMapping(value=STR, method=RequestMethod.POST, consumes={JSON}, produces={JSON}) @ResponseBody EntityResponse<Trip> function(@RequestBody Trip toCreate) { return super.create(toCreate); } | /** Creates a new Trip.
*
* @param toCreate The trip to create
* @return The created trip
*/ | Creates a new Trip | create | {
"repo_name": "mwcaisse/CarTracker",
"path": "CarTracker.Web/src/main/java/com/ricex/cartracker/web/controller/api/TripController.java",
"license": "mit",
"size": 5408
} | [
"com.ricex.cartracker.common.entity.Trip",
"com.ricex.cartracker.common.viewmodel.EntityResponse",
"org.springframework.web.bind.annotation.RequestBody",
"org.springframework.web.bind.annotation.RequestMapping",
"org.springframework.web.bind.annotation.RequestMethod",
"org.springframework.web.bind.annotat... | import com.ricex.cartracker.common.entity.Trip; import com.ricex.cartracker.common.viewmodel.EntityResponse; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework... | import com.ricex.cartracker.common.entity.*; import com.ricex.cartracker.common.viewmodel.*; import org.springframework.web.bind.annotation.*; | [
"com.ricex.cartracker",
"org.springframework.web"
] | com.ricex.cartracker; org.springframework.web; | 1,551,193 |
public void setServerAdmin() {
User overlord = userService.getUser(User.USERNAME_OVERLORD);
if (overlord == null) {
throw new IllegalStateException("overlord not in database");
}
servletContext.setAttribute(CosmoConstants.SC_ATTR_SERVER_ADMIN,
... | void function() { User overlord = userService.getUser(User.USERNAME_OVERLORD); if (overlord == null) { throw new IllegalStateException(STR); } servletContext.setAttribute(CosmoConstants.SC_ATTR_SERVER_ADMIN, overlord.getEmail()); } | /**
* Sets the {@link CosmoConstants#SC_ATTR_SERVER_ADMIN} servlet context
* attribute by looking up the root user's email address.
*/ | Sets the <code>CosmoConstants#SC_ATTR_SERVER_ADMIN</code> servlet context attribute by looking up the root user's email address | setServerAdmin | {
"repo_name": "Eisler/cosmo",
"path": "cosmo-core/src/main/java/org/unitedinternet/cosmo/servletcontext/ServletContextConfigurer.java",
"license": "apache-2.0",
"size": 2257
} | [
"org.unitedinternet.cosmo.CosmoConstants",
"org.unitedinternet.cosmo.model.User"
] | import org.unitedinternet.cosmo.CosmoConstants; import org.unitedinternet.cosmo.model.User; | import org.unitedinternet.cosmo.*; import org.unitedinternet.cosmo.model.*; | [
"org.unitedinternet.cosmo"
] | org.unitedinternet.cosmo; | 1,847,923 |
public StyleMap getCascadedStyleMap(CSSStylableElement elt,
String pseudo) {
int props = getNumberOfProperties();
final StyleMap result = new StyleMap(props);
// Apply the user-agent style-sheet to the result.
if (userAgentStyleSheet != null) ... | StyleMap function(CSSStylableElement elt, String pseudo) { int props = getNumberOfProperties(); final StyleMap result = new StyleMap(props); if (userAgentStyleSheet != null) { ArrayList rules = new ArrayList(); addMatchingRules(rules, userAgentStyleSheet, elt, pseudo); addRules(elt, pseudo, result, rules, StyleMap.USER... | /**
* Returns the cascaded style of the given element/pseudo-element.
* @param elt The stylable element.
* @param pseudo Optional pseudo-element string (null if none).
*/ | Returns the cascaded style of the given element/pseudo-element | getCascadedStyleMap | {
"repo_name": "apache/batik",
"path": "batik-css/src/main/java/org/apache/batik/css/engine/CSSEngine.java",
"license": "apache-2.0",
"size": 90735
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 1,934,115 |
public synchronized Session openSession() throws IOException {
if (tm == null)
throw new IllegalStateException(
"Cannot open session, you need to establish a connection first.");
if (!authenticated)
throw new IllegalStateException(
"Cannot open session, connection is not authenticated.");... | synchronized Session function() throws IOException { if (tm == null) throw new IllegalStateException( STR); if (!authenticated) throw new IllegalStateException( STR); return new Session(cm, getOrCreateSecureRND()); } | /**
* Open a new {@link Session} on this connection. Works only after one has
* passed successfully the authentication step. There is no limit on the
* number of concurrent sessions.
*
* @return A {@link Session} object.
* @throws IOException
*/ | Open a new <code>Session</code> on this connection. Works only after one has passed successfully the authentication step. There is no limit on the number of concurrent sessions | openSession | {
"repo_name": "bestdpf/sshtunnel",
"path": "src/com/trilead/ssh2/Connection.java",
"license": "gpl-3.0",
"size": 56886
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 730,701 |
private void setDeviceConnectionState(int device, int state, @NonNull String deviceAddress, @NonNull String deviceName) {
Class<?> audioSystem = getAudioSystem();
try {
Method method = audioSystem.getMethod("setDeviceConnectionState", Integer.TYPE, Integer.TYPE, String.class, String.cla... | void function(int device, int state, @NonNull String deviceAddress, @NonNull String deviceName) { Class<?> audioSystem = getAudioSystem(); try { Method method = audioSystem.getMethod(STR, Integer.TYPE, Integer.TYPE, String.class, String.class); int status = (int)method.invoke(audioSystem, device, state, deviceAddress, ... | /**
* Set the device connection state
*
* @param device device kind id
* @param state DEVICE_STATE_AVAILABLE or DEVICE_STATE_UNAVAILABLE
* @param deviceAddress device address
* @param deviceName device name
*/ | Set the device connection state | setDeviceConnectionState | {
"repo_name": "klinster/School-Work",
"path": "490/smartmirror/app/src/main/java/org/main/smartmirror/smartmirror/HeadphoneAudioCanceller.java",
"license": "mit",
"size": 4415
} | [
"android.support.annotation.NonNull",
"android.util.Log",
"java.lang.reflect.Method"
] | import android.support.annotation.NonNull; import android.util.Log; import java.lang.reflect.Method; | import android.support.annotation.*; import android.util.*; import java.lang.reflect.*; | [
"android.support",
"android.util",
"java.lang"
] | android.support; android.util; java.lang; | 1,829,086 |
public static String classNamesToString(Collection<Class<?>> classes) {
if (CollectionUtils.isEmpty(classes)) {
return "[]";
}
StringBuilder sb = new StringBuilder("[");
for (Iterator<Class<?>> it = classes.iterator(); it.hasNext(); ) {
Class<?> clazz = it.next();
sb.append(clazz.getName());
... | static String function(Collection<Class<?>> classes) { if (CollectionUtils.isEmpty(classes)) { return "[]"; } StringBuilder sb = new StringBuilder("["); for (Iterator<Class<?>> it = classes.iterator(); it.hasNext(); ) { Class<?> clazz = it.next(); sb.append(clazz.getName()); if (it.hasNext()) { sb.append(STR); } } sb.a... | /**
* Build a String that consists of the names of the classes/interfaces
* in the given collection.
* <p>Basically like {@code AbstractCollection.toString()}, but stripping
* the "class "/"interface " prefix before every class name.
* @param classes a Collection of Class objects (may be {@code null})
... | Build a String that consists of the names of the classes/interfaces in the given collection. Basically like AbstractCollection.toString(), but stripping the "class "/"interface " prefix before every class name | classNamesToString | {
"repo_name": "fantesy84/java-code-tutorials",
"path": "java-code-tutorials-tools/src/main/java/net/fantesy84/common/util/ClassUtil.java",
"license": "gpl-2.0",
"size": 45597
} | [
"java.util.Collection",
"java.util.Iterator"
] | import java.util.Collection; import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 720,038 |
public void initialize(String name, final Scheduler scheduler, ClassLoadHelper classLoadHelper)
throws SchedulerException {
getLog().info("Registering Quartz shutdown hook."); | void function(String name, final Scheduler scheduler, ClassLoadHelper classLoadHelper) throws SchedulerException { getLog().info(STR); | /**
* <p>
* Called during creation of the <code>Scheduler</code> in order to give
* the <code>SchedulerPlugin</code> a chance to initialize.
* </p>
*
* @throws SchedulerConfigException
* if there is an error initializing.
*/ | Called during creation of the <code>Scheduler</code> in order to give the <code>SchedulerPlugin</code> a chance to initialize. | initialize | {
"repo_name": "suthat/signal",
"path": "vendor/quartz-2.2.0/src/org/quartz/plugins/management/ShutdownHookPlugin.java",
"license": "apache-2.0",
"size": 4335
} | [
"org.quartz.Scheduler",
"org.quartz.SchedulerException",
"org.quartz.spi.ClassLoadHelper"
] | import org.quartz.Scheduler; import org.quartz.SchedulerException; import org.quartz.spi.ClassLoadHelper; | import org.quartz.*; import org.quartz.spi.*; | [
"org.quartz",
"org.quartz.spi"
] | org.quartz; org.quartz.spi; | 2,046,997 |
public void testLongRunningTask(HttpServletRequest request, PrintWriter out) throws Exception {
SharedFailingTask.clear();
SharedFailingTask.execProps.put(ManagedTask.LONGRUNNING_HINT, Boolean.TRUE.toString());
try {
Callable<Long> task = new SharedFailingTask();
Task... | void function(HttpServletRequest request, PrintWriter out) throws Exception { SharedFailingTask.clear(); SharedFailingTask.execProps.put(ManagedTask.LONGRUNNING_HINT, Boolean.TRUE.toString()); try { Callable<Long> task = new SharedFailingTask(); TaskStatus<Long> status = scheduler.schedule(task, 22, TimeUnit.NANOSECOND... | /**
* Attempt to schedule a task with the long running hint set to true. Verify it is rejected.
*/ | Attempt to schedule a task with the long running hint set to true. Verify it is rejected | testLongRunningTask | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.concurrent.persistent_fat_errorpaths/test-applications/persistenterrtest/src/web/PersistentErrorTestServlet.java",
"license": "epl-1.0",
"size": 67702
} | [
"com.ibm.websphere.concurrent.persistent.TaskStatus",
"java.io.PrintWriter",
"java.util.concurrent.Callable",
"java.util.concurrent.RejectedExecutionException",
"java.util.concurrent.TimeUnit",
"javax.enterprise.concurrent.ManagedTask",
"javax.servlet.http.HttpServletRequest"
] | import com.ibm.websphere.concurrent.persistent.TaskStatus; import java.io.PrintWriter; import java.util.concurrent.Callable; import java.util.concurrent.RejectedExecutionException; import java.util.concurrent.TimeUnit; import javax.enterprise.concurrent.ManagedTask; import javax.servlet.http.HttpServletRequest; | import com.ibm.websphere.concurrent.persistent.*; import java.io.*; import java.util.concurrent.*; import javax.enterprise.concurrent.*; import javax.servlet.http.*; | [
"com.ibm.websphere",
"java.io",
"java.util",
"javax.enterprise",
"javax.servlet"
] | com.ibm.websphere; java.io; java.util; javax.enterprise; javax.servlet; | 2,838,143 |
@Override
public Result search(String query) {
logger.info("Starting search for " + query + " ...");
Request request = Request.newBuilder().setQuery(query).build();
ListenableFuture<Result> resultFuture = googleFutureClient.search(request);
return Try.ofFailable(() -> resultFut... | Result function(String query) { logger.info(STR + query + STR); Request request = Request.newBuilder().setQuery(query).build(); ListenableFuture<Result> resultFuture = googleFutureClient.search(request); return Try.ofFailable(() -> resultFuture.get(1000, TimeUnit.MILLISECONDS)) .onSuccess(r -> logger.info(STR + r)) .on... | /**
* Search searches query in async way in Search engine backend.
*/ | Search searches query in async way in Search engine backend | search | {
"repo_name": "mateuszdyminski/grpc",
"path": "jvm/src/main/java/com/grpc/search/clients/AsyncClient.java",
"license": "mit",
"size": 1975
} | [
"com.google.common.util.concurrent.ListenableFuture",
"com.grpc.common.Try",
"com.grpc.search.Request",
"com.grpc.search.Result",
"java.util.concurrent.TimeUnit",
"java.util.logging.Level"
] | import com.google.common.util.concurrent.ListenableFuture; import com.grpc.common.Try; import com.grpc.search.Request; import com.grpc.search.Result; import java.util.concurrent.TimeUnit; import java.util.logging.Level; | import com.google.common.util.concurrent.*; import com.grpc.common.*; import com.grpc.search.*; import java.util.concurrent.*; import java.util.logging.*; | [
"com.google.common",
"com.grpc.common",
"com.grpc.search",
"java.util"
] | com.google.common; com.grpc.common; com.grpc.search; java.util; | 2,886,923 |
private static AC parseAxisConstraint(String s, boolean isCols) {
s = s.trim();
if (s.length() == 0) {
return new AC(); // Short circuit for performance.
}
s = s.toLowerCase();
ArrayList<String> parts = getRowColAndGapsTrimmed(s);
BoundSize[] gaps = ... | static AC function(String s, boolean isCols) { s = s.trim(); if (s.length() == 0) { return new AC(); } s = s.toLowerCase(); ArrayList<String> parts = getRowColAndGapsTrimmed(s); BoundSize[] gaps = new BoundSize[(parts.size() >> 1) + 1]; for (int i = 0, iSz = parts.size(), gIx = 0; i < iSz; i += 2, gIx++) { gaps[gIx] = ... | /**
* Parses the column or rows constraints. They normally looks something like
* <code>"[min:pref]rel[10px][]"</code>.
*
* @param s The string to parse. Not <code>null</code>.
* @param isCols If this for columns rather than rows.
* @return An array of {@link DimConstraint}s that is as man... | Parses the column or rows constraints. They normally looks something like <code>"[min:pref]rel[10px][]"</code> | parseAxisConstraint | {
"repo_name": "sannysanoff/CodenameOne",
"path": "CodenameOne/src/com/codename1/ui/layouts/mig/ConstraintParser.java",
"license": "gpl-2.0",
"size": 65141
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 1,469,239 |
ServiceFuture<FirewallRule> updateAsync(String resourceGroupName, String accountName, String firewallRuleName, UpdateFirewallRuleParameters parameters, final ServiceCallback<FirewallRule> serviceCallback); | ServiceFuture<FirewallRule> updateAsync(String resourceGroupName, String accountName, String firewallRuleName, UpdateFirewallRuleParameters parameters, final ServiceCallback<FirewallRule> serviceCallback); | /**
* Updates the specified firewall rule.
*
* @param resourceGroupName The name of the Azure resource group that contains the Data Lake Analytics account.
* @param accountName The name of the Data Lake Analytics account to which to update the firewall rule.
* @param firewallRuleName The name o... | Updates the specified firewall rule | updateAsync | {
"repo_name": "jianghaolu/azure-sdk-for-java",
"path": "azure-mgmt-datalake-analytics/src/main/java/com/microsoft/azure/management/datalake/analytics/FirewallRules.java",
"license": "mit",
"size": 21632
} | [
"com.microsoft.azure.management.datalake.analytics.models.FirewallRule",
"com.microsoft.azure.management.datalake.analytics.models.UpdateFirewallRuleParameters",
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.azure.management.datalake.analytics.models.FirewallRule; import com.microsoft.azure.management.datalake.analytics.models.UpdateFirewallRuleParameters; import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.azure.management.datalake.analytics.models.*; import com.microsoft.rest.*; | [
"com.microsoft.azure",
"com.microsoft.rest"
] | com.microsoft.azure; com.microsoft.rest; | 2,626,404 |
ReplicationQueue getQueue(String name) throws ReplicationQueueException;
/**
* Synchronously sends a {@link ReplicationRequest} waiting for a {@link ReplicationResponse}
*
* @param replicationRequest the replication request
* @return a {@link ReplicationResponse} | ReplicationQueue getQueue(String name) throws ReplicationQueueException; /** * Synchronously sends a {@link ReplicationRequest} waiting for a {@link ReplicationResponse} * * @param replicationRequest the replication request * @return a {@link ReplicationResponse} | /**
* get the agent queue with the given name
*
* @param name a queue name as a <code>String</code>
* @return a {@link ReplicationQueue} with the given name bound to this agent, if it exists, <code>null</code> otherwise
* @throws ReplicationQueueException
*/ | get the agent queue with the given name | getQueue | {
"repo_name": "MRivas-XumaK/slingBuild",
"path": "contrib/extensions/replication/core/src/main/java/org/apache/sling/replication/agent/ReplicationAgent.java",
"license": "apache-2.0",
"size": 3066
} | [
"org.apache.sling.replication.communication.ReplicationRequest",
"org.apache.sling.replication.communication.ReplicationResponse",
"org.apache.sling.replication.queue.ReplicationQueue",
"org.apache.sling.replication.queue.ReplicationQueueException"
] | import org.apache.sling.replication.communication.ReplicationRequest; import org.apache.sling.replication.communication.ReplicationResponse; import org.apache.sling.replication.queue.ReplicationQueue; import org.apache.sling.replication.queue.ReplicationQueueException; | import org.apache.sling.replication.communication.*; import org.apache.sling.replication.queue.*; | [
"org.apache.sling"
] | org.apache.sling; | 1,058,962 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.