method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public Observable<ServiceResponse<Void>> beginResetAADProfileWithServiceResponseAsync(String resourceGroupName, String resourceName, ManagedClusterAADProfile parameters) {
if (this.client.subscriptionId() == null) {
throw new IllegalArgumentException("Parameter this.client.subscriptionId() is re... | Observable<ServiceResponse<Void>> function(String resourceGroupName, String resourceName, ManagedClusterAADProfile parameters) { if (this.client.subscriptionId() == null) { throw new IllegalArgumentException(STR); } if (resourceGroupName == null) { throw new IllegalArgumentException(STR); } if (resourceName == null) { ... | /**
* Reset AAD Profile of a managed cluster.
* Update the AAD Profile for a managed cluster.
*
* @param resourceGroupName The name of the resource group.
* @param resourceName The name of the managed cluster resource.
* @param parameters Parameters supplied to the Reset AAD Profile operat... | Reset AAD Profile of a managed cluster. Update the AAD Profile for a managed cluster | beginResetAADProfileWithServiceResponseAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/containerservice/mgmt-v2019_04_01/src/main/java/com/microsoft/azure/management/containerservice/v2019_04_01/implementation/ManagedClustersInner.java",
"license": "mit",
"size": 126956
} | [
"com.microsoft.azure.management.containerservice.v2019_04_01.ManagedClusterAADProfile",
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.azure.management.containerservice.v2019_04_01.ManagedClusterAADProfile; import com.microsoft.rest.ServiceResponse; | import com.microsoft.azure.management.containerservice.v2019_04_01.*; import com.microsoft.rest.*; | [
"com.microsoft.azure",
"com.microsoft.rest"
] | com.microsoft.azure; com.microsoft.rest; | 1,471,195 |
protected JSONObject executeAction() throws JSONException, CmsException {
final JSONObject result = new JSONObject();
final HttpServletRequest request = getRequest();
if (!checkParameters(request, result, ReqParam.ACTION, ReqParam.LOCALE, ReqParam.ALBUM)) {
return result;
... | JSONObject function() throws JSONException, CmsException { final JSONObject result = new JSONObject(); final HttpServletRequest request = getRequest(); if (!checkParameters(request, result, ReqParam.ACTION, ReqParam.LOCALE, ReqParam.ALBUM)) { return result; } final String actionParam = request.getParameter(ReqParam.ACT... | /**
* Handles all requests.<p>
*
* @return the result
*
* @throws JSONException if there is any problem with JSON
* @throws CmsException if there is a problem with the cms context
*/ | Handles all requests | executeAction | {
"repo_name": "cernio/ocamg",
"path": "com.alkacon.opencms.mediaalbum/src/com/alkacon/opencms/mediaalbum/CmsMediaAlbumBean.java",
"license": "gpl-3.0",
"size": 31319
} | [
"javax.servlet.http.HttpServletRequest",
"org.opencms.file.CmsObject",
"org.opencms.file.CmsResource",
"org.opencms.i18n.CmsLocaleManager",
"org.opencms.json.JSONException",
"org.opencms.json.JSONObject",
"org.opencms.main.CmsException",
"org.opencms.util.CmsUUID"
] | import javax.servlet.http.HttpServletRequest; import org.opencms.file.CmsObject; import org.opencms.file.CmsResource; import org.opencms.i18n.CmsLocaleManager; import org.opencms.json.JSONException; import org.opencms.json.JSONObject; import org.opencms.main.CmsException; import org.opencms.util.CmsUUID; | import javax.servlet.http.*; import org.opencms.file.*; import org.opencms.i18n.*; import org.opencms.json.*; import org.opencms.main.*; import org.opencms.util.*; | [
"javax.servlet",
"org.opencms.file",
"org.opencms.i18n",
"org.opencms.json",
"org.opencms.main",
"org.opencms.util"
] | javax.servlet; org.opencms.file; org.opencms.i18n; org.opencms.json; org.opencms.main; org.opencms.util; | 2,071,600 |
@SuppressForbidden
@Nullable
private String deviceInstallPackageViaSd(IDevice device, String apk) {
try {
// Figure out where the SD card is mounted.
String externalStorage = deviceGetExternalStorage(device);
if (externalStorage == null) {
return "Cannot get external storage location... | String function(IDevice device, String apk) { try { String externalStorage = deviceGetExternalStorage(device); if (externalStorage == null) { return STR; } String remotePackage = String.format(STR, externalStorage, UUID.randomUUID()); device.pushFile(apk, remotePackage); device.installRemotePackage(remotePackage, true)... | /**
* Installs apk on device, copying apk to external storage first.
*/ | Installs apk on device, copying apk to external storage first | deviceInstallPackageViaSd | {
"repo_name": "sdwilsh/buck",
"path": "src/com/facebook/buck/android/AdbHelper.java",
"license": "apache-2.0",
"size": 36252
} | [
"com.android.ddmlib.IDevice",
"java.util.UUID"
] | import com.android.ddmlib.IDevice; import java.util.UUID; | import com.android.ddmlib.*; import java.util.*; | [
"com.android.ddmlib",
"java.util"
] | com.android.ddmlib; java.util; | 2,669,090 |
private void cleanExpiredSessions ()
throws Exception
{
Connection connection = null;
List<String> expiredSessionIds = new ArrayList<String>();
try
{
connection = getConnection();
connection.setTransactionIsolation(Connection.TRANSACTION_SERIALIZA... | void function () throws Exception { Connection connection = null; List<String> expiredSessionIds = new ArrayList<String>(); try { connection = getConnection(); connection.setTransactionIsolation(Connection.TRANSACTION_SERIALIZABLE); connection.setAutoCommit(false); PreparedStatement statement = connection.prepareStatem... | /**
* Get rid of sessions and sessionids from sessions that have already expired
* @throws Exception
*/ | Get rid of sessions and sessionids from sessions that have already expired | cleanExpiredSessions | {
"repo_name": "whiteley/jetty8",
"path": "jetty-server/src/main/java/org/eclipse/jetty/server/session/JDBCSessionIdManager.java",
"license": "apache-2.0",
"size": 31306
} | [
"java.sql.Connection",
"java.sql.PreparedStatement",
"java.sql.ResultSet",
"java.sql.SQLException",
"java.sql.Statement",
"java.util.ArrayList",
"java.util.List"
] | import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; import java.util.ArrayList; import java.util.List; | import java.sql.*; import java.util.*; | [
"java.sql",
"java.util"
] | java.sql; java.util; | 474,039 |
public long getTableRowCount(String tableName) throws SQLException {
throw new UnsupportedOperationException();
} | long function(String tableName) throws SQLException { throw new UnsupportedOperationException(); } | /**
* Returns the count of all rows that exist in the given table.
* @param tableName the name of the table which will be queried.
* @return the number of rows present in the given table.
* @throws SQLException if an error occurs during execution
* @throws UnsupportedOperationException if the connection ... | Returns the count of all rows that exist in the given table | getTableRowCount | {
"repo_name": "cloudbow/sqoop-couchbase-pass-fix",
"path": "src/java/org/apache/sqoop/manager/ConnManager.java",
"license": "apache-2.0",
"size": 26182
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 904,582 |
@Exported
public List<Result> getErrorResults() {
rebuildFilteredResults();
return errorResults;
} | List<Result> function() { rebuildFilteredResults(); return errorResults; } | /**
* Gets the results of the analysis.
* @return the results of the analysis
*/ | Gets the results of the analysis | getErrorResults | {
"repo_name": "Sergio-Mira/build-output-analyzer",
"path": "src/main/java/sergio/mira/buildoutputanalyzer/BuildAnalyzerAction.java",
"license": "mit",
"size": 3053
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,046,354 |
@Override
public final DirectPosition getDirectPosition() {
return this;
} | final DirectPosition function() { return this; } | /**
* Returns the direct position, which is itself.
*/ | Returns the direct position, which is itself | getDirectPosition | {
"repo_name": "apache/sis",
"path": "core/sis-referencing-by-identifiers/src/main/java/org/apache/sis/referencing/gazetteer/SimpleLocation.java",
"license": "apache-2.0",
"size": 19658
} | [
"org.opengis.geometry.DirectPosition"
] | import org.opengis.geometry.DirectPosition; | import org.opengis.geometry.*; | [
"org.opengis.geometry"
] | org.opengis.geometry; | 280,771 |
@Test
public void whenTeacherTeachesStudentsThenIsResult() {
Teacher teacher = new Teacher("prof", 20);
final String result = teacher.teach("Java", new Profession("student1", 19), new Profession("student2", 19));
final String except = String.format("Професор prof учит student1 предмету ... | void function() { Teacher teacher = new Teacher("prof", 20); final String result = teacher.teach("Java", new Profession(STR, 19), new Profession(STR, 19)); final String except = String.format(STR, System.getProperty(STR), System.getProperty(STR)); assertThat(result, is(except)); } | /**
* Test teach().
*/ | Test teach() | whenTeacherTeachesStudentsThenIsResult | {
"repo_name": "reallyserg/k_serg",
"path": "chapter_002/profession/src/test/java/kochetov/TeacherTest.java",
"license": "apache-2.0",
"size": 1586
} | [
"org.hamcrest.core.Is",
"org.junit.Assert"
] | import org.hamcrest.core.Is; import org.junit.Assert; | import org.hamcrest.core.*; import org.junit.*; | [
"org.hamcrest.core",
"org.junit"
] | org.hamcrest.core; org.junit; | 1,833,374 |
public void setSession(Session session) {
this.session = session;
} | void function(Session session) { this.session = session; } | /**
* Specifies the mail session that camel should use for all mail interactions. Useful in scenarios where
* mail sessions are created and managed by some other resource, such as a JavaEE container.
* If this is not specified, Camel automatically creates the mail session for you.
*/ | Specifies the mail session that camel should use for all mail interactions. Useful in scenarios where mail sessions are created and managed by some other resource, such as a JavaEE container. If this is not specified, Camel automatically creates the mail session for you | setSession | {
"repo_name": "allancth/camel",
"path": "components/camel-mail/src/main/java/org/apache/camel/component/mail/MailConfiguration.java",
"license": "apache-2.0",
"size": 25397
} | [
"javax.mail.Session"
] | import javax.mail.Session; | import javax.mail.*; | [
"javax.mail"
] | javax.mail; | 323,537 |
public Object setObjectValue(StringToObjectConverter pConverter, Object pMap, String pKey, Object pValue)
throws IllegalAccessException, InvocationTargetException {
Map<Object,Object> map = (Map<Object,Object>) pMap;
Object oldValue = null;
Object oldKey = pKey;
for (Map.... | Object function(StringToObjectConverter pConverter, Object pMap, String pKey, Object pValue) throws IllegalAccessException, InvocationTargetException { Map<Object,Object> map = (Map<Object,Object>) pMap; Object oldValue = null; Object oldKey = pKey; for (Map.Entry entry : map.entrySet()) { if(pKey.equals(entry.getKey()... | /**
* Set the value within a map, where the attribute is taken as key into the map.
*
* @param pConverter the global converter in order to be able do dispatch for
* serializing inner data types
* @param pMap map on which to set the value
* @param pKey key in the map where to put the... | Set the value within a map, where the attribute is taken as key into the map | setObjectValue | {
"repo_name": "cinhtau/jolokia",
"path": "agent/core/src/main/java/org/jolokia/converter/json/MapExtractor.java",
"license": "apache-2.0",
"size": 6348
} | [
"java.lang.reflect.InvocationTargetException",
"java.util.Map",
"org.jolokia.converter.object.StringToObjectConverter"
] | import java.lang.reflect.InvocationTargetException; import java.util.Map; import org.jolokia.converter.object.StringToObjectConverter; | import java.lang.reflect.*; import java.util.*; import org.jolokia.converter.object.*; | [
"java.lang",
"java.util",
"org.jolokia.converter"
] | java.lang; java.util; org.jolokia.converter; | 2,175,273 |
default FileEndpointConsumerBuilder scheduledExecutorService(
ScheduledExecutorService scheduledExecutorService) {
doSetProperty("scheduledExecutorService", scheduledExecutorService);
return this;
} | default FileEndpointConsumerBuilder scheduledExecutorService( ScheduledExecutorService scheduledExecutorService) { doSetProperty(STR, scheduledExecutorService); return this; } | /**
* Allows for configuring a custom/shared thread pool to use for the
* consumer. By default each consumer has its own single threaded thread
* pool.
*
* The option is a:
* <code>java.util.concurrent.ScheduledExecutorService</code> type.
*
... | Allows for configuring a custom/shared thread pool to use for the consumer. By default each consumer has its own single threaded thread pool. The option is a: <code>java.util.concurrent.ScheduledExecutorService</code> type. Group: scheduler | scheduledExecutorService | {
"repo_name": "pax95/camel",
"path": "core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/FileEndpointBuilderFactory.java",
"license": "apache-2.0",
"size": 172264
} | [
"java.util.concurrent.ScheduledExecutorService"
] | import java.util.concurrent.ScheduledExecutorService; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 668,718 |
@SuppressWarnings("unchecked")
static <P> LightMetaProperty<P> of(
MetaBean metaBean,
Field field,
final Method method,
final String propertyName,
int constructorIndex) { | @SuppressWarnings(STR) static <P> LightMetaProperty<P> of( MetaBean metaBean, Field field, final Method method, final String propertyName, int constructorIndex) { | /**
* Creates an instance from a {@code Method}.
*
* @param <P> the property type
* @param metaBean the meta bean, not null
* @param method the method, not null
* @param constructorIndex the index of the property in the constructor
* @return the property, not null
*/ | Creates an instance from a Method | of | {
"repo_name": "fengshao0907/joda-beans",
"path": "src/main/java/org/joda/beans/impl/light/LightMetaProperty.java",
"license": "apache-2.0",
"size": 7284
} | [
"java.lang.reflect.Field",
"java.lang.reflect.Method",
"org.joda.beans.MetaBean"
] | import java.lang.reflect.Field; import java.lang.reflect.Method; import org.joda.beans.MetaBean; | import java.lang.reflect.*; import org.joda.beans.*; | [
"java.lang",
"org.joda.beans"
] | java.lang; org.joda.beans; | 1,137,379 |
public LeoDeployDescriptor setTopDescriptor(String filename, boolean byName) throws IOException, InvalidXMLException {
this.setTopDescriptor(new LeoAEDescriptor(filename, byName));
return this;
}//setTopDescriptor method filename input | LeoDeployDescriptor function(String filename, boolean byName) throws IOException, InvalidXMLException { this.setTopDescriptor(new LeoAEDescriptor(filename, byName)); return this; } | /**
* Set the top descriptor for this deployment by importing the descriptor by name or value.
*
* @param filename descriptor to import by name or location
* @param byName if true import filename by name in classpath
* if false import filename by location
* @throws java.i... | Set the top descriptor for this deployment by importing the descriptor by name or value | setTopDescriptor | {
"repo_name": "department-of-veterans-affairs/Leo",
"path": "core/src/main/java/gov/va/vinci/leo/descriptors/LeoDeployDescriptor.java",
"license": "apache-2.0",
"size": 13961
} | [
"java.io.IOException",
"org.apache.uima.util.InvalidXMLException"
] | import java.io.IOException; import org.apache.uima.util.InvalidXMLException; | import java.io.*; import org.apache.uima.util.*; | [
"java.io",
"org.apache.uima"
] | java.io; org.apache.uima; | 2,287,497 |
public void setModifiable(boolean value) {
this.modifiable = value;
}
}
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
... | void function(boolean value) { this.modifiable = value; } } @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = STRsidSTRordinalNumberSTRrequirement" }) public static class ProductRequirement { protected Long sid; protected int ordinalNumber; @XmlElement(required = true) protected String requirement; /** * Gets the v... | /**
* Sets the value of the modifiable property.
*
*/ | Sets the value of the modifiable property | setModifiable | {
"repo_name": "simokhov/schemas44",
"path": "src/main/java/ru/gov/zakupki/oos/types/_1/NotificationEFType.java",
"license": "mit",
"size": 143275
} | [
"javax.xml.bind.annotation.XmlAccessType",
"javax.xml.bind.annotation.XmlAccessorType",
"javax.xml.bind.annotation.XmlElement",
"javax.xml.bind.annotation.XmlType"
] | import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlType; | import javax.xml.bind.annotation.*; | [
"javax.xml"
] | javax.xml; | 1,717,049 |
public ByteBuffer serialize(short version, ResponseHeader responseHeader) {
return RequestUtils.serialize(responseHeader.toStruct(), toStruct(version));
} | ByteBuffer function(short version, ResponseHeader responseHeader) { return RequestUtils.serialize(responseHeader.toStruct(), toStruct(version)); } | /**
* Visible for testing, typically {@link #toSend(String, ResponseHeader, short)} should be used instead.
*/ | Visible for testing, typically <code>#toSend(String, ResponseHeader, short)</code> should be used instead | serialize | {
"repo_name": "sslavic/kafka",
"path": "clients/src/main/java/org/apache/kafka/common/requests/AbstractResponse.java",
"license": "apache-2.0",
"size": 9501
} | [
"java.nio.ByteBuffer"
] | import java.nio.ByteBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 1,105,786 |
void encrypt(ByteBuffer src) throws SSLException {
if (!handshakeComplete) {
throw new IllegalStateException();
}
if (!src.hasRemaining()) {
if (outNetBuffer == null) {
outNetBuffer = emptyBuffer;
}
return;
}
c... | void encrypt(ByteBuffer src) throws SSLException { if (!handshakeComplete) { throw new IllegalStateException(); } if (!src.hasRemaining()) { if (outNetBuffer == null) { outNetBuffer = emptyBuffer; } return; } createOutNetBuffer(src.remaining()); while (src.hasRemaining()) { SSLEngineResult result = sslEngine.wrap(src, ... | /**
* Encrypt provided buffer. Encrypted data returned by getOutNetBuffer().
*
* @param src
* data to encrypt
* @throws SSLException
* on errors
*/ | Encrypt provided buffer. Encrypted data returned by getOutNetBuffer() | encrypt | {
"repo_name": "zuoyebushiwo/apache-mina-2.0.9",
"path": "src/mina-core/src/main/java/org/apache/mina/filter/ssl/SslHandler.java",
"license": "apache-2.0",
"size": 28593
} | [
"java.nio.ByteBuffer",
"javax.net.ssl.SSLEngineResult",
"javax.net.ssl.SSLException"
] | import java.nio.ByteBuffer; import javax.net.ssl.SSLEngineResult; import javax.net.ssl.SSLException; | import java.nio.*; import javax.net.ssl.*; | [
"java.nio",
"javax.net"
] | java.nio; javax.net; | 1,634,708 |
protected Collection<IAction> generateCreateChildActions(Collection<?> descriptors, ISelection selection) {
Collection<IAction> actions = new ArrayList<IAction>();
if (descriptors != null) {
for (Object descriptor : descriptors) {
actions.add(new CreateChildAction(activeEditorPart, selection, descriptor))... | Collection<IAction> function(Collection<?> descriptors, ISelection selection) { Collection<IAction> actions = new ArrayList<IAction>(); if (descriptors != null) { for (Object descriptor : descriptors) { actions.add(new CreateChildAction(activeEditorPart, selection, descriptor)); } } return actions; } | /**
* This generates a {@link org.eclipse.emf.edit.ui.action.CreateChildAction} for each object in <code>descriptors</code>,
* and returns the collection of these actions.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This generates a <code>org.eclipse.emf.edit.ui.action.CreateChildAction</code> for each object in <code>descriptors</code>, and returns the collection of these actions. | generateCreateChildActions | {
"repo_name": "BaSys-PC1/models",
"path": "de.dfki.iui.basys.model.domain.editor/src/de/dfki/iui/basys/model/domain/productinstance/presentation/ProductinstanceActionBarContributor.java",
"license": "epl-1.0",
"size": 14137
} | [
"java.util.ArrayList",
"java.util.Collection",
"org.eclipse.emf.edit.ui.action.CreateChildAction",
"org.eclipse.jface.action.IAction",
"org.eclipse.jface.viewers.ISelection"
] | import java.util.ArrayList; import java.util.Collection; import org.eclipse.emf.edit.ui.action.CreateChildAction; import org.eclipse.jface.action.IAction; import org.eclipse.jface.viewers.ISelection; | import java.util.*; import org.eclipse.emf.edit.ui.action.*; import org.eclipse.jface.action.*; import org.eclipse.jface.viewers.*; | [
"java.util",
"org.eclipse.emf",
"org.eclipse.jface"
] | java.util; org.eclipse.emf; org.eclipse.jface; | 1,369,356 |
List<Facility> getFacilitiesByPerunBean(PerunSession sess, PerunBean perunBean) throws InternalErrorException; | List<Facility> getFacilitiesByPerunBean(PerunSession sess, PerunBean perunBean) throws InternalErrorException; | /**
* !!! Not Complete yet, need to implement all perunBeans !!!
*
* Get perunBean and try to find all connected Facilities
*
* @param sess
* @param perunBean
* @return list of facilities connected with perunBeans
* @throws InternalErrorException
*/ | !!! Not Complete yet, need to implement all perunBeans !!! Get perunBean and try to find all connected Facilities | getFacilitiesByPerunBean | {
"repo_name": "Simcsa/perun",
"path": "perun-core/src/main/java/cz/metacentrum/perun/core/bl/FacilitiesManagerBl.java",
"license": "bsd-2-clause",
"size": 39157
} | [
"cz.metacentrum.perun.core.api.Facility",
"cz.metacentrum.perun.core.api.PerunBean",
"cz.metacentrum.perun.core.api.PerunSession",
"cz.metacentrum.perun.core.api.exceptions.InternalErrorException",
"java.util.List"
] | import cz.metacentrum.perun.core.api.Facility; import cz.metacentrum.perun.core.api.PerunBean; import cz.metacentrum.perun.core.api.PerunSession; import cz.metacentrum.perun.core.api.exceptions.InternalErrorException; import java.util.List; | import cz.metacentrum.perun.core.api.*; import cz.metacentrum.perun.core.api.exceptions.*; import java.util.*; | [
"cz.metacentrum.perun",
"java.util"
] | cz.metacentrum.perun; java.util; | 2,848,450 |
public static void onError(Subscriber<?> subscriber, Throwable ex,
AtomicInteger wip, AtomicThrowable errors) {
if (errors.tryAddThrowableOrReport(ex)) {
if (wip.getAndIncrement() == 0) {
errors.tryTerminateConsumer(subscriber);
}
}
} | static void function(Subscriber<?> subscriber, Throwable ex, AtomicInteger wip, AtomicThrowable errors) { if (errors.tryAddThrowableOrReport(ex)) { if (wip.getAndIncrement() == 0) { errors.tryTerminateConsumer(subscriber); } } } | /**
* Emits the given exception if possible or adds it to the given error container to
* be emitted by a concurrent onNext if one is running.
* Undeliverable exceptions are sent to the RxJavaPlugins.onError.
* @param subscriber the target Subscriber to emit to
* @param ex the Throwable to emit
... | Emits the given exception if possible or adds it to the given error container to be emitted by a concurrent onNext if one is running. Undeliverable exceptions are sent to the RxJavaPlugins.onError | onError | {
"repo_name": "ReactiveX/RxJava",
"path": "src/main/java/io/reactivex/rxjava3/internal/util/HalfSerializer.java",
"license": "apache-2.0",
"size": 5420
} | [
"java.util.concurrent.atomic.AtomicInteger",
"org.reactivestreams.Subscriber"
] | import java.util.concurrent.atomic.AtomicInteger; import org.reactivestreams.Subscriber; | import java.util.concurrent.atomic.*; import org.reactivestreams.*; | [
"java.util",
"org.reactivestreams"
] | java.util; org.reactivestreams; | 2,268,926 |
@RequestMapping(value = "/{type}/{name}/{version:.+}", method = RequestMethod.GET)
@ResponseStatus(HttpStatus.OK)
public DetailedAppRegistrationResource info(@PathVariable("type") ApplicationType type,
@PathVariable("name") String name, @PathVariable("version") String version,
@RequestParam(required = false,... | @RequestMapping(value = STR, method = RequestMethod.GET) @ResponseStatus(HttpStatus.OK) DetailedAppRegistrationResource function(@PathVariable("type") ApplicationType type, @PathVariable("name") String name, @PathVariable(STR) String version, @RequestParam(required = false, name = STR) boolean exhaustive) { return getI... | /**
* Retrieve detailed information about a particular application.
*
* @param type application type
* @param name application name
* @param version application version
* @param exhaustive if set to true all properties are returned
* @return detailed application information
*/ | Retrieve detailed information about a particular application | info | {
"repo_name": "spring-cloud/spring-cloud-dataflow",
"path": "spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/controller/AppRegistryController.java",
"license": "apache-2.0",
"size": 20004
} | [
"org.springframework.cloud.dataflow.core.ApplicationType",
"org.springframework.cloud.dataflow.rest.resource.DetailedAppRegistrationResource",
"org.springframework.http.HttpStatus",
"org.springframework.web.bind.annotation.PathVariable",
"org.springframework.web.bind.annotation.RequestMapping",
"org.sprin... | import org.springframework.cloud.dataflow.core.ApplicationType; import org.springframework.cloud.dataflow.rest.resource.DetailedAppRegistrationResource; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping;... | import org.springframework.cloud.dataflow.core.*; import org.springframework.cloud.dataflow.rest.resource.*; import org.springframework.http.*; import org.springframework.web.bind.annotation.*; | [
"org.springframework.cloud",
"org.springframework.http",
"org.springframework.web"
] | org.springframework.cloud; org.springframework.http; org.springframework.web; | 1,667,340 |
public void setAsText(final String p1)
{
final Enumeration<NamedColor> enumer = _theColors.elements();
while (enumer.hasMoreElements())
{
final NamedColor cl = (NamedColor) enumer.nextElement();
if (cl.name.equals(p1))
{
setValue(cl.color);
break;
}
... | void function(final String p1) { final Enumeration<NamedColor> enumer = _theColors.elements(); while (enumer.hasMoreElements()) { final NamedColor cl = (NamedColor) enumer.nextElement(); if (cl.name.equals(p1)) { setValue(cl.color); break; } } } | /**
* user has selected one of the String tags, update accordingly
*
* @param p1 new value as String
*/ | user has selected one of the String tags, update accordingly | setAsText | {
"repo_name": "alastrina123/debrief",
"path": "org.mwc.cmap.legacy/src/MWC/GUI/Properties/ColorPropertyEditor.java",
"license": "epl-1.0",
"size": 8851
} | [
"java.util.Enumeration"
] | import java.util.Enumeration; | import java.util.*; | [
"java.util"
] | java.util; | 1,913,312 |
public static void setQualifier(
Qualifier[][] qualifiers,
Qualifier qualifier,
int position_1,
int position_2)
{
qualifiers[position_1][position_2] = qualifier;
} | static void function( Qualifier[][] qualifiers, Qualifier qualifier, int position_1, int position_2) { qualifiers[position_1][position_2] = qualifier; } | /**
* Set a Qualifier in a 2 dimensional array of Qualifiers.
*
* Set a single Qualifier into one slot of a 2 dimensional array of
* Qualifiers. @see Qualifier for detailed description of layout of
* the 2-d array.
*
* @param qualifiers The array of Qualifiers
* @param qualifier The Quali... | Set a Qualifier in a 2 dimensional array of Qualifiers. Set a single Qualifier into one slot of a 2 dimensional array of Qualifiers. @see Qualifier for detailed description of layout of the 2-d array | setQualifier | {
"repo_name": "gemxd/gemfirexd-oss",
"path": "gemfirexd/core/src/main/java/com/pivotal/gemfirexd/internal/impl/sql/execute/BaseActivation.java",
"license": "apache-2.0",
"size": 78926
} | [
"com.pivotal.gemfirexd.internal.iapi.store.access.Qualifier"
] | import com.pivotal.gemfirexd.internal.iapi.store.access.Qualifier; | import com.pivotal.gemfirexd.internal.iapi.store.access.*; | [
"com.pivotal.gemfirexd"
] | com.pivotal.gemfirexd; | 174,411 |
public void addModifyListener(ModifyListener listener) {
if (fProjectText == null) {
waitingForProjectTextToExist.add(listener);
} else {
fProjectText.addModifyListener(listener);
for (ModifyListener l : waitingForProjectTextToExist) {
fProjectText... | void function(ModifyListener listener) { if (fProjectText == null) { waitingForProjectTextToExist.add(listener); } else { fProjectText.addModifyListener(listener); for (ModifyListener l : waitingForProjectTextToExist) { fProjectText.addModifyListener(l); } waitingForProjectTextToExist.clear(); } } List<ModifyListener> ... | /**
* Adds a modification listener to the current control.
*
* This is used to update the module browse button, depending
* on the project's python nature.
*
* @param listener The listener to use
*/ | Adds a modification listener to the current control. This is used to update the module browse button, depending on the project's python nature | addModifyListener | {
"repo_name": "RandallDW/Aruba_plugin",
"path": "plugins/org.python.pydev.debug/src/org/python/pydev/debug/ui/blocks/ProjectBlock.java",
"license": "epl-1.0",
"size": 9096
} | [
"java.util.ArrayList",
"java.util.List",
"org.eclipse.swt.events.ModifyListener"
] | import java.util.ArrayList; import java.util.List; import org.eclipse.swt.events.ModifyListener; | import java.util.*; import org.eclipse.swt.events.*; | [
"java.util",
"org.eclipse.swt"
] | java.util; org.eclipse.swt; | 2,553,699 |
private void initializeCORBA()
{
System.out.println("Initializing CORBA...");
// ORB stanza
java.util.Properties orbprops = java.lang.System.getProperties();
// to make code completely independed, properties have to be set using JVM -D mechanism
// ORBacus
//orbprops.put("org.omg.CORBA.ORBClass", "co... | void function() { System.out.println(STR); java.util.Properties orbprops = java.lang.System.getProperties(); orb = org.omg.CORBA.ORB.init(new String[0], orbprops); POA rootPOA = null; try { rootPOA = POAHelper.narrow(orb.resolve_initial_references(STR)); } catch (org.omg.CORBA.ORBPackage.InvalidName in) { throw new Ill... | /**
* Initializes CORBA.
*/ | Initializes CORBA | initializeCORBA | {
"repo_name": "ACS-Community/ACS",
"path": "LGPL/CommonSoftware/jmanager/test/com/cosylab/acs/maci/manager/BlockingPingClient.java",
"license": "lgpl-2.1",
"size": 7369
} | [
"org.omg.CORBA",
"org.omg.PortableServer"
] | import org.omg.CORBA; import org.omg.PortableServer; | import org.omg.*; | [
"org.omg"
] | org.omg; | 2,091,666 |
public DTMIterator cloneWithReset() throws CloneNotSupportedException
{
NodeSequence seq = (NodeSequence)super.clone();
seq.m_next = 0;
if (m_cache != null) {
// In making this clone of an iterator we are making
// another NodeSequence object it has a reference
// to the sa... | DTMIterator function() throws CloneNotSupportedException { NodeSequence seq = (NodeSequence)super.clone(); seq.m_next = 0; if (m_cache != null) { m_cache.increaseUseCount(); } return seq; } | /**
* Note: Not a deep clone.
* @see DTMIterator#cloneWithReset()
*/ | Note: Not a deep clone | cloneWithReset | {
"repo_name": "srnsw/xena",
"path": "xena/ext/src/xalan-j_2_7_1/src/org/apache/xpath/axes/NodeSequence.java",
"license": "gpl-3.0",
"size": 25200
} | [
"org.apache.xml.dtm.DTMIterator"
] | import org.apache.xml.dtm.DTMIterator; | import org.apache.xml.dtm.*; | [
"org.apache.xml"
] | org.apache.xml; | 2,013,699 |
private void generateMeasureGrpnItemCountQDMEntries(MeasureExport me,
XmlProcessor dataCriteriaXMLProcessor,
NodeList measureGroupingItemCountList) throws XPathExpressionException {
if((measureGroupingItemCountList==null) ||
(measureGroupingItemCountList.getLength()<1)){
return;
}
List<String>... | void function(MeasureExport me, XmlProcessor dataCriteriaXMLProcessor, NodeList measureGroupingItemCountList) throws XPathExpressionException { if((measureGroupingItemCountList==null) (measureGroupingItemCountList.getLength()<1)){ return; } List<String> itemCountIDList = new ArrayList<String>(); for(int i=0; i<measureG... | /**
* Generate measure grp item count qdm entries.
*
* @param me the me
* @param dataCriteriaXMLProcessor the data criteria xml processor
* @param measureGroupingItemCountList the measure grouping item count list
* @throws XPathExpressionException the x path expression exception
*/ | Generate measure grp item count qdm entries | generateMeasureGrpnItemCountQDMEntries | {
"repo_name": "MeasureAuthoringTool/MeasureAuthoringTool_Release",
"path": "mat/src/main/java/mat/server/hqmf/qdm_5_4/HQMFDataCriteriaElementGenerator.java",
"license": "cc0-1.0",
"size": 35371
} | [
"java.util.ArrayList",
"java.util.List",
"javax.xml.xpath.XPathExpressionException",
"org.w3c.dom.NodeList"
] | import java.util.ArrayList; import java.util.List; import javax.xml.xpath.XPathExpressionException; import org.w3c.dom.NodeList; | import java.util.*; import javax.xml.xpath.*; import org.w3c.dom.*; | [
"java.util",
"javax.xml",
"org.w3c.dom"
] | java.util; javax.xml; org.w3c.dom; | 171,390 |
BufferedImage getDisplayedImage() {
if (displayedImage == null && isBigImage()) {
BufferedImage bi = new BufferedImage(getTiledImageSizeX(),
getTiledImageSizeY(), BufferedImage.TYPE_INT_RGB);
//build it from the tiles.
// Create a graphics which can be ... | BufferedImage getDisplayedImage() { if (displayedImage == null && isBigImage()) { BufferedImage bi = new BufferedImage(getTiledImageSizeX(), getTiledImageSizeY(), BufferedImage.TYPE_INT_RGB); Graphics2D g2D = bi.createGraphics(); ImagePaintingFactory.setGraphicRenderingSettings(g2D, isInterpolation()); Map<Integer, Til... | /**
* Returns the image to paint on screen. This image is a transformed
* version of the rendered image. We apply several transformations to the
* {@link #renderedImage} e.g. zooming.
*
* @return See above.
*/ | Returns the image to paint on screen. This image is a transformed version of the rendered image. We apply several transformations to the <code>#renderedImage</code> e.g. zooming | getDisplayedImage | {
"repo_name": "simleo/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/imviewer/browser/BrowserModel.java",
"license": "gpl-2.0",
"size": 37604
} | [
"java.awt.Graphics2D",
"java.awt.image.BufferedImage",
"java.util.Map",
"org.openmicroscopy.shoola.agents.imviewer.util.ImagePaintingFactory",
"org.openmicroscopy.shoola.env.rnd.data.Region",
"org.openmicroscopy.shoola.env.rnd.data.Tile"
] | import java.awt.Graphics2D; import java.awt.image.BufferedImage; import java.util.Map; import org.openmicroscopy.shoola.agents.imviewer.util.ImagePaintingFactory; import org.openmicroscopy.shoola.env.rnd.data.Region; import org.openmicroscopy.shoola.env.rnd.data.Tile; | import java.awt.*; import java.awt.image.*; import java.util.*; import org.openmicroscopy.shoola.agents.imviewer.util.*; import org.openmicroscopy.shoola.env.rnd.data.*; | [
"java.awt",
"java.util",
"org.openmicroscopy.shoola"
] | java.awt; java.util; org.openmicroscopy.shoola; | 1,275,000 |
@OAuthEndpoint(PAYMENTS_SCOPE)
@GET
@Path("person/payments")
@Produces(JSON_UTF8)
public FenixPayment personPayments() {
Person person = getPerson();
List<PaymentEvent> payed = new ArrayList<>();
for (Entry entry : person.getPayments()) {
String id = entry.getE... | @OAuthEndpoint(PAYMENTS_SCOPE) @Path(STR) @Produces(JSON_UTF8) FenixPayment function() { Person person = getPerson(); List<PaymentEvent> payed = new ArrayList<>(); for (Entry entry : person.getPayments()) { String id = entry.getExternalId(); String amount = entry.getOriginalAmount().getAmountAsString(); String name = e... | /**
* Information about gratuity payments (payed and not payed)
*
* @summary Gratuity payments
* @return
* @servicetag PAYMENTS_SCOPE
*/ | Information about gratuity payments (payed and not payed) | personPayments | {
"repo_name": "Luis-Cruz/fenixedu-academic-api-example",
"path": "src/main/java/pt/ist/fenixedu/integration/api/FenixAPIv1.java",
"license": "lgpl-3.0",
"size": 69139
} | [
"java.util.ArrayList",
"java.util.List",
"javax.ws.rs.Path",
"javax.ws.rs.Produces",
"org.fenixedu.academic.domain.Person",
"org.fenixedu.academic.domain.accounting.Entry",
"org.fenixedu.academic.domain.accounting.Event",
"org.fenixedu.academic.domain.accounting.paymentCodes.AccountingEventPaymentCode... | import java.util.ArrayList; import java.util.List; import javax.ws.rs.Path; import javax.ws.rs.Produces; import org.fenixedu.academic.domain.Person; import org.fenixedu.academic.domain.accounting.Entry; import org.fenixedu.academic.domain.accounting.Event; import org.fenixedu.academic.domain.accounting.paymentCodes.Acc... | import java.util.*; import javax.ws.rs.*; import org.fenixedu.academic.domain.*; import org.fenixedu.academic.domain.accounting.*; import org.fenixedu.bennu.oauth.annotation.*; import pt.ist.fenixedu.integration.api.beans.*; import pt.ist.fenixedu.integration.api.beans.publico.*; | [
"java.util",
"javax.ws",
"org.fenixedu.academic",
"org.fenixedu.bennu",
"pt.ist.fenixedu"
] | java.util; javax.ws; org.fenixedu.academic; org.fenixedu.bennu; pt.ist.fenixedu; | 2,354,316 |
public void updateState(X509Certificate cert)
throws CertificateException, IOException, CertPathValidatorException {
if (cert == null) {
return;
}
subjectDN = cert.getSubjectX500Principal();
X509CertImpl icert = X509CertImpl.toImpl(cert);
... | void function(X509Certificate cert) throws CertificateException, IOException, CertPathValidatorException { if (cert == null) { return; } subjectDN = cert.getSubjectX500Principal(); X509CertImpl icert = X509CertImpl.toImpl(cert); PublicKey newKey = cert.getPublicKey(); if (newKey instanceof DSAPublicKey && (((DSAPublicK... | /**
* Update the state with the next certificate added to the path.
*
* @param cert the certificate which is used to update the state
*/ | Update the state with the next certificate added to the path | updateState | {
"repo_name": "andreagenso/java2scala",
"path": "test/J2s/java/openjdk-6-src-b27/jdk/src/share/classes/sun/security/provider/certpath/ReverseState.java",
"license": "apache-2.0",
"size": 13523
} | [
"java.io.IOException",
"java.security.PublicKey",
"java.security.cert.CertPathValidatorException",
"java.security.cert.CertificateException",
"java.security.cert.X509Certificate",
"java.security.interfaces.DSAPublicKey"
] | import java.io.IOException; import java.security.PublicKey; import java.security.cert.CertPathValidatorException; import java.security.cert.CertificateException; import java.security.cert.X509Certificate; import java.security.interfaces.DSAPublicKey; | import java.io.*; import java.security.*; import java.security.cert.*; import java.security.interfaces.*; | [
"java.io",
"java.security"
] | java.io; java.security; | 1,812,634 |
@ServiceMethod(returns = ReturnType.COLLECTION)
PagedFlux<DdosProtectionPlanInner> listAsync(); | @ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux<DdosProtectionPlanInner> listAsync(); | /**
* Gets all DDoS protection plans in a subscription.
*
* @throws com.azure.core.management.exception.ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return all DDoS protection... | Gets all DDoS protection plans in a subscription | listAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/DdosProtectionPlansClient.java",
"license": "mit",
"size": 23252
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedFlux",
"com.azure.resourcemanager.network.fluent.models.DdosProtectionPlanInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedFlux; import com.azure.resourcemanager.network.fluent.models.DdosProtectionPlanInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.network.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,857,284 |
GlobalContactExportSettings getGlobalExportSettingsByOrganization(Integer organizationId); | GlobalContactExportSettings getGlobalExportSettingsByOrganization(Integer organizationId); | /**
* Finds the given {@code organizationId} corresponding {@link GlobalContactExportSettings}.
*
* @param organizationId
* The {@link Organization} id.
* @return The given {@code organizationId} corresponding {@link GlobalContactExportSettings}.
*/ | Finds the given organizationId corresponding <code>GlobalContactExportSettings</code> | getGlobalExportSettingsByOrganization | {
"repo_name": "Raphcal/sigmah",
"path": "src/main/java/org/sigmah/server/dao/GlobalContactExportSettingsDAO.java",
"license": "gpl-3.0",
"size": 1505
} | [
"org.sigmah.server.domain.export.GlobalContactExportSettings"
] | import org.sigmah.server.domain.export.GlobalContactExportSettings; | import org.sigmah.server.domain.export.*; | [
"org.sigmah.server"
] | org.sigmah.server; | 716,651 |
private static String queryRewrite(String query, File alignFile) {
try {
File jarFile = new File(libsFolder, "mediation/mediation.jar");
return CommandUtil.executeCommand("cd \"%s\" && java -jar \"%s\" \"%s\" \"%s\"",
jarFile.getParentFile().getAbsolutePath(),
jarFile.getAbsolutePath(),
... | static String function(String query, File alignFile) { try { File jarFile = new File(libsFolder, STR); return CommandUtil.executeCommand(STR%s\STR%s\STR%s\STR%s\STR\nSTR ")); } catch (Exception e) { GryphonUtil.logError(e); return null; } } | /**
* Rewrites SPARQL queries using <b>Mediation</b>
* @param query The query that needs to be rewritten
* @param alignFile The alignment file
* @return The rewritten query
*/ | Rewrites SPARQL queries using Mediation | queryRewrite | {
"repo_name": "eudesf/GryphonFramework",
"path": "src/br/ufpe/cin/aac3/gryphon/Gryphon.java",
"license": "mit",
"size": 11342
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,477,612 |
private void updateSearchRecords(boolean isRefresh, String query) {
if (isRefresh && isViewingAllApps()) {
// Refreshing while viewing all apps (for instance app installed or uninstalled in the background)
Searcher searcher = new ApplicationsSearcher(this);
searcher.setRe... | void function(boolean isRefresh, String query) { if (isRefresh && isViewingAllApps()) { Searcher searcher = new ApplicationsSearcher(this); searcher.setRefresh(isRefresh); runTask(searcher); return; } resetTask(); dismissPopup(); forwarderManager.updateSearchRecords(isRefresh, query); if (query.isEmpty()) { systemUiVis... | /**
* This function gets called on query changes.
* It will ask all the providers for data
* This function is not called for non search-related changes! Have a look at onDataSetChanged() if that's what you're looking for :)
*
* @param isRefresh whether the query is refreshing the existing resul... | This function gets called on query changes. It will ask all the providers for data This function is not called for non search-related changes! Have a look at onDataSetChanged() if that's what you're looking for :) | updateSearchRecords | {
"repo_name": "Neamar/KISS",
"path": "app/src/main/java/fr/neamar/kiss/MainActivity.java",
"license": "gpl-3.0",
"size": 34380
} | [
"fr.neamar.kiss.searcher.ApplicationsSearcher",
"fr.neamar.kiss.searcher.QuerySearcher",
"fr.neamar.kiss.searcher.Searcher"
] | import fr.neamar.kiss.searcher.ApplicationsSearcher; import fr.neamar.kiss.searcher.QuerySearcher; import fr.neamar.kiss.searcher.Searcher; | import fr.neamar.kiss.searcher.*; | [
"fr.neamar.kiss"
] | fr.neamar.kiss; | 1,894,425 |
logger.trace("Looking up authentication interface '" + url + "'");
return (T) (PAActiveObject.lookupActive(clazz.getName(), url));
} | logger.trace(STR + url + "'"); return (T) (PAActiveObject.lookupActive(clazz.getName(), url)); } | /**
* Lookup of authentication active object
*
* @param url the URL of the service to join.
* @throws Exception if something wrong append
*/ | Lookup of authentication active object | lookupAuthentication | {
"repo_name": "tobwiens/scheduling",
"path": "common/common-client/src/main/java/org/ow2/proactive/authentication/Connection.java",
"license": "agpl-3.0",
"size": 9998
} | [
"org.objectweb.proactive.api.PAActiveObject"
] | import org.objectweb.proactive.api.PAActiveObject; | import org.objectweb.proactive.api.*; | [
"org.objectweb.proactive"
] | org.objectweb.proactive; | 1,923,487 |
public static boolean empty(Object o) {
if (o == null) {
return true;
}
if (o instanceof CharSequence) {
return onlyWhitespace((CharSequence) o);
}
if (o.getClass().isArray()) {
return Array.getLength(o) == 0;
}
if (o instan... | static boolean function(Object o) { if (o == null) { return true; } if (o instanceof CharSequence) { return onlyWhitespace((CharSequence) o); } if (o.getClass().isArray()) { return Array.getLength(o) == 0; } if (o instanceof Collection) { return ((Collection<?>) o).isEmpty(); } if (o instanceof Map) { return ((Map<?, ?... | /**
* Checks if the given object is empty. Here empty is defined as: <ul> <li>a null {@link Object}</li> <li>an empty {@link String}</li>
* <li>an empty {@link Array}</li> <li>an empty {@link Collection}</li> <li>an empty {@link Map}</li> <li>an empty {@link Optional}</li></ul>
*
* @param o
* @... | Checks if the given object is empty. Here empty is defined as: a null <code>Object</code> an empty <code>String</code> an empty <code>Array</code> an empty <code>Collection</code> an empty <code>Map</code> an empty <code>Optional</code> | empty | {
"repo_name": "iZettle/izettle-toolbox",
"path": "izettle-java/src/main/java/com/izettle/java/ValueChecks.java",
"license": "apache-2.0",
"size": 11377
} | [
"java.lang.reflect.Array",
"java.util.Collection",
"java.util.Map",
"java.util.Optional"
] | import java.lang.reflect.Array; import java.util.Collection; import java.util.Map; import java.util.Optional; | import java.lang.reflect.*; import java.util.*; | [
"java.lang",
"java.util"
] | java.lang; java.util; | 53,793 |
protected Clusters getClusters() {
return clusters;
} | Clusters function() { return clusters; } | /**
* The Clusters object for this KerberosServerAction
*
* @return a Clusters object
*/ | The Clusters object for this KerberosServerAction | getClusters | {
"repo_name": "alexryndin/ambari",
"path": "ambari-server/src/main/java/org/apache/ambari/server/serveraction/kerberos/KerberosServerAction.java",
"license": "apache-2.0",
"size": 23624
} | [
"org.apache.ambari.server.state.Clusters"
] | import org.apache.ambari.server.state.Clusters; | import org.apache.ambari.server.state.*; | [
"org.apache.ambari"
] | org.apache.ambari; | 2,346,101 |
public void drawResultBitmap(Bitmap barcode) {
resultBitmap = barcode;
invalidate();
}
// public void addPossibleResultPoint(ResultPoint point) {
// possibleResultPoints.add(point);
// } | void function(Bitmap barcode) { resultBitmap = barcode; invalidate(); } | /**
* Draw a bitmap with the result points highlighted instead of the live
* scanning display.
*
* @param barcode
* An image of the decoded barcode.
*/ | Draw a bitmap with the result points highlighted instead of the live scanning display | drawResultBitmap | {
"repo_name": "treejames/OpenAtlasExtension",
"path": "Samples/QRCode/app/src/main/java/com/google/zxing/client/android/view/ViewfinderView.java",
"license": "mit",
"size": 8275
} | [
"android.graphics.Bitmap"
] | import android.graphics.Bitmap; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 896,931 |
public void resetData(Connection conn) throws SQLException {
deleteData(conn, sqlQueries.getSqlString("deleteHamTokens", true));
deleteData(conn, sqlQueries.getSqlString("deleteSpamTokens", true));
deleteData(conn, sqlQueries.getSqlString("deleteMessageCounts", true));
} | void function(Connection conn) throws SQLException { deleteData(conn, sqlQueries.getSqlString(STR, true)); deleteData(conn, sqlQueries.getSqlString(STR, true)); deleteData(conn, sqlQueries.getSqlString(STR, true)); } | /**
* Reset all trained data
*
* @param conn
* The connection for accessing the database
* @throws SQLException
* If a database error occours
*/ | Reset all trained data | resetData | {
"repo_name": "chibenwa/james",
"path": "container/util/src/main/java/org/apache/james/util/bayesian/JDBCBayesianAnalyzer.java",
"license": "apache-2.0",
"size": 14320
} | [
"java.sql.Connection",
"java.sql.SQLException"
] | import java.sql.Connection; import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 769,895 |
private JTable getDayTable() {
if (dayTable == null) {
dayTable = new javax.swing.JTable();
dayTable.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_ALL_COLUMNS);
dayTable.setRowHeight(18);
//dayTable.setOpaque(false);
dayTable.setPreferredSize(new java.awt.Dimension(100,80));
... | JTable function() { if (dayTable == null) { dayTable = new javax.swing.JTable(); dayTable.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_ALL_COLUMNS); dayTable.setRowHeight(18); dayTable.setPreferredSize(new java.awt.Dimension(100,80)); dayTable.setModel(internalModel); dayTable.setShowGrid(true); dayTable.setGridCol... | /**
* This method initializes dayTable
*
* @return javax.swing.JTable
*/ | This method initializes dayTable | getDayTable | {
"repo_name": "shookees/SmartFood_old",
"path": "lib/JDatePicker-1.3.2-dist/src/net/sourceforge/jdatepicker/impl/JDatePanelImpl.java",
"license": "mit",
"size": 29019
} | [
"java.awt.Color",
"javax.swing.JTable",
"javax.swing.ListSelectionModel",
"javax.swing.table.TableColumn"
] | import java.awt.Color; import javax.swing.JTable; import javax.swing.ListSelectionModel; import javax.swing.table.TableColumn; | import java.awt.*; import javax.swing.*; import javax.swing.table.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 2,737,598 |
@SuppressWarnings("unchecked")
private static List<ScheduledTask> getScheduledTasks(final Scheduler scheduler, final boolean sequential, final String group) throws SchedulerException {
final List<ScheduledTask> result = new ArrayList<ScheduledTask>(100);
final String[] groupNames = scheduler.getJobGrou... | @SuppressWarnings(STR) static List<ScheduledTask> function(final Scheduler scheduler, final boolean sequential, final String group) throws SchedulerException { final List<ScheduledTask> result = new ArrayList<ScheduledTask>(100); final String[] groupNames = scheduler.getJobGroupNames(); String[] jobNames; JobDetail job... | /**
* sheduled tasks getter
* @param scheduler
* @param sequential
* @param group
* @return
* @throws SchedulerException
*/ | sheduled tasks getter | getScheduledTasks | {
"repo_name": "dotCMS/core",
"path": "dotCMS/src/main/java/com/dotmarketing/quartz/QuartzUtils.java",
"license": "gpl-3.0",
"size": 24729
} | [
"java.util.ArrayList",
"java.util.HashMap",
"java.util.List",
"org.quartz.CronTrigger",
"org.quartz.JobDetail",
"org.quartz.Scheduler",
"org.quartz.SchedulerException",
"org.quartz.SimpleTrigger",
"org.quartz.Trigger"
] | import java.util.ArrayList; import java.util.HashMap; import java.util.List; import org.quartz.CronTrigger; import org.quartz.JobDetail; import org.quartz.Scheduler; import org.quartz.SchedulerException; import org.quartz.SimpleTrigger; import org.quartz.Trigger; | import java.util.*; import org.quartz.*; | [
"java.util",
"org.quartz"
] | java.util; org.quartz; | 2,876,295 |
public static DynamicTableSource createTableSource(
@Nullable Catalog catalog,
ObjectIdentifier objectIdentifier,
CatalogTable catalogTable,
ReadableConfig configuration,
ClassLoader classLoader,
boolean isTemporary) {
final DefaultDyna... | static DynamicTableSource function( @Nullable Catalog catalog, ObjectIdentifier objectIdentifier, CatalogTable catalogTable, ReadableConfig configuration, ClassLoader classLoader, boolean isTemporary) { final DefaultDynamicTableContext context = new DefaultDynamicTableContext( objectIdentifier, catalogTable, configurat... | /**
* Creates a {@link DynamicTableSource} from a {@link CatalogTable}.
*
* <p>It considers {@link Catalog#getFactory()} if provided.
*/ | Creates a <code>DynamicTableSource</code> from a <code>CatalogTable</code>. It considers <code>Catalog#getFactory()</code> if provided | createTableSource | {
"repo_name": "kl0u/flink",
"path": "flink-table/flink-table-common/src/main/java/org/apache/flink/table/factories/FactoryUtil.java",
"license": "apache-2.0",
"size": 31130
} | [
"java.util.stream.Collectors",
"javax.annotation.Nullable",
"org.apache.flink.configuration.ReadableConfig",
"org.apache.flink.table.api.ValidationException",
"org.apache.flink.table.catalog.Catalog",
"org.apache.flink.table.catalog.CatalogTable",
"org.apache.flink.table.catalog.ObjectIdentifier",
"or... | import java.util.stream.Collectors; import javax.annotation.Nullable; import org.apache.flink.configuration.ReadableConfig; import org.apache.flink.table.api.ValidationException; import org.apache.flink.table.catalog.Catalog; import org.apache.flink.table.catalog.CatalogTable; import org.apache.flink.table.catalog.Obje... | import java.util.stream.*; import javax.annotation.*; import org.apache.flink.configuration.*; import org.apache.flink.table.api.*; import org.apache.flink.table.catalog.*; import org.apache.flink.table.connector.source.*; | [
"java.util",
"javax.annotation",
"org.apache.flink"
] | java.util; javax.annotation; org.apache.flink; | 2,345,896 |
private void addRestResourceClasses(Set<Class<?>> resources) {
//resources.add(JClouds_Adapter.Tenant.class);
resources.add(API.EASTAPI.Link.class);
//resources.add(NTHAPI.NetworkResource.class);
resources.add(API.EASTAPI.LinksResource.class);
//resources.add(NTHAPI.SiteResou... | void function(Set<Class<?>> resources) { resources.add(API.EASTAPI.Link.class); resources.add(API.EASTAPI.LinksResource.class); resources.add(API.EASTAPI.NetworkSegmentResource.class); resources.add(API.EASTAPI.NetworksegmentResource.class); resources.add(API.EASTAPI.UserResource.class); resources.add(API.EASTAPI.Users... | /**
* Do not modify addRestResourceClasses() method.
* It is automatically populated with
* all resources defined in the project.
* If required, comment out calling this method in getClasses().
*/ | Do not modify addRestResourceClasses() method. It is automatically populated with all resources defined in the project. If required, comment out calling this method in getClasses() | addRestResourceClasses | {
"repo_name": "Beacon-Unime/OSFFM",
"path": "src/java/API/ApplicationConfig.java",
"license": "apache-2.0",
"size": 2565
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,194,054 |
public ImmutableOpenMap<String, DiscoveryNode> getMasterNodes() {
return masterNodes();
} | ImmutableOpenMap<String, DiscoveryNode> function() { return masterNodes(); } | /**
* Get a {@link Map} of the discovered master nodes arranged by their ids
*
* @return {@link Map} of the discovered master nodes arranged by their ids
*/ | Get a <code>Map</code> of the discovered master nodes arranged by their ids | getMasterNodes | {
"repo_name": "vrkansagara/elasticsearch",
"path": "src/main/java/org/elasticsearch/cluster/node/DiscoveryNodes.java",
"license": "apache-2.0",
"size": 23610
} | [
"org.elasticsearch.common.collect.ImmutableOpenMap"
] | import org.elasticsearch.common.collect.ImmutableOpenMap; | import org.elasticsearch.common.collect.*; | [
"org.elasticsearch.common"
] | org.elasticsearch.common; | 14,913 |
public CreateIndexRequest settings(Map source) {
try {
XContentBuilder builder = XContentFactory.contentBuilder(XContentType.JSON);
builder.map(source);
settings(builder.string());
} catch (IOException e) {
throw new ElasticSearchGenerationException("F... | CreateIndexRequest function(Map source) { try { XContentBuilder builder = XContentFactory.contentBuilder(XContentType.JSON); builder.map(source); settings(builder.string()); } catch (IOException e) { throw new ElasticSearchGenerationException(STR + source + "]", e); } return this; } | /**
* The settings to crete the index with (either json/yaml/properties format)
*/ | The settings to crete the index with (either json/yaml/properties format) | settings | {
"repo_name": "Kreolwolf1/Elastic",
"path": "src/main/java/org/elasticsearch/action/admin/indices/create/CreateIndexRequest.java",
"license": "apache-2.0",
"size": 13026
} | [
"java.io.IOException",
"java.util.Map",
"org.elasticsearch.ElasticSearchGenerationException",
"org.elasticsearch.common.xcontent.XContentBuilder",
"org.elasticsearch.common.xcontent.XContentFactory",
"org.elasticsearch.common.xcontent.XContentType"
] | import java.io.IOException; import java.util.Map; import org.elasticsearch.ElasticSearchGenerationException; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentFactory; import org.elasticsearch.common.xcontent.XContentType; | import java.io.*; import java.util.*; import org.elasticsearch.*; import org.elasticsearch.common.xcontent.*; | [
"java.io",
"java.util",
"org.elasticsearch",
"org.elasticsearch.common"
] | java.io; java.util; org.elasticsearch; org.elasticsearch.common; | 878,249 |
public static List<String> findNodeTerms(final Node node, final byte[] expression) {
final Set<String> terms = new LinkedHashSet<>();
if (node.getType() == NodeType.TERM) {
final String data = DocumentVisibilityUtil.getTermNodeData(node, expression);
terms.add(data);
... | static List<String> function(final Node node, final byte[] expression) { final Set<String> terms = new LinkedHashSet<>(); if (node.getType() == NodeType.TERM) { final String data = DocumentVisibilityUtil.getTermNodeData(node, expression); terms.add(data); } for (final Node child : node.getChildren()) { switch (node.get... | /**
* Searches a node for all unique terms in its expression and returns them.
* Duplicates are not included.
* @param node the {@link Node}.
* @return an unmodifiable {@link List} of string terms without duplicates.
*/ | Searches a node for all unique terms in its expression and returns them. Duplicates are not included | findNodeTerms | {
"repo_name": "meiercaleb/incubator-rya",
"path": "dao/mongodb.rya/src/main/java/org/apache/rya/mongodb/document/util/DisjunctiveNormalFormConverter.java",
"license": "apache-2.0",
"size": 10917
} | [
"com.google.common.collect.Lists",
"java.util.Collections",
"java.util.LinkedHashSet",
"java.util.List",
"java.util.Set",
"org.apache.accumulo.core.security.ColumnVisibility"
] | import com.google.common.collect.Lists; import java.util.Collections; import java.util.LinkedHashSet; import java.util.List; import java.util.Set; import org.apache.accumulo.core.security.ColumnVisibility; | import com.google.common.collect.*; import java.util.*; import org.apache.accumulo.core.security.*; | [
"com.google.common",
"java.util",
"org.apache.accumulo"
] | com.google.common; java.util; org.apache.accumulo; | 721,726 |
public AkamaiAccessControl withAkamaiSignatureHeaderAuthenticationKeyList(List<AkamaiSignatureHeaderAuthenticationKey> akamaiSignatureHeaderAuthenticationKeyList) {
this.akamaiSignatureHeaderAuthenticationKeyList = akamaiSignatureHeaderAuthenticationKeyList;
return this;
} | AkamaiAccessControl function(List<AkamaiSignatureHeaderAuthenticationKey> akamaiSignatureHeaderAuthenticationKeyList) { this.akamaiSignatureHeaderAuthenticationKeyList = akamaiSignatureHeaderAuthenticationKeyList; return this; } | /**
* Set authentication key list.
*
* @param akamaiSignatureHeaderAuthenticationKeyList the akamaiSignatureHeaderAuthenticationKeyList value to set
* @return the AkamaiAccessControl object itself.
*/ | Set authentication key list | withAkamaiSignatureHeaderAuthenticationKeyList | {
"repo_name": "hovsepm/azure-sdk-for-java",
"path": "mediaservices/resource-manager/v2018_30_30_preview/src/main/java/com/microsoft/azure/management/mediaservices/v2018_30_30_preview/AkamaiAccessControl.java",
"license": "mit",
"size": 1508
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,138,331 |
public static void validateEmail(String s, String name) throws ClientException {
if (!EMAIL_PATTERN.matcher(s).matches()) {
throw new ClientException("ValidationError", MessageFormat.format("{0} must be an email", name));
}
} | static void function(String s, String name) throws ClientException { if (!EMAIL_PATTERN.matcher(s).matches()) { throw new ClientException(STR, MessageFormat.format(STR, name)); } } | /**
* Checks if the string is an email.
*
* @param s String to validate
* @param name Name of the parameter
* @throws ClientException
*/ | Checks if the string is an email | validateEmail | {
"repo_name": "sismics/docs",
"path": "docs-web-common/src/main/java/com/sismics/rest/util/ValidationUtil.java",
"license": "gpl-2.0",
"size": 7658
} | [
"com.sismics.rest.exception.ClientException",
"java.text.MessageFormat"
] | import com.sismics.rest.exception.ClientException; import java.text.MessageFormat; | import com.sismics.rest.exception.*; import java.text.*; | [
"com.sismics.rest",
"java.text"
] | com.sismics.rest; java.text; | 2,805,367 |
public AssetEntryPersistence getAssetEntryPersistence() {
return assetEntryPersistence;
} | AssetEntryPersistence function() { return assetEntryPersistence; } | /**
* Returns the asset entry persistence.
*
* @return the asset entry persistence
*/ | Returns the asset entry persistence | getAssetEntryPersistence | {
"repo_name": "lovettli/blade",
"path": "maven/blade.servicebuilder/blade.servicebuilder.service/src/main/java/blade/servicebuilder/service/base/FooServiceBaseImpl.java",
"license": "apache-2.0",
"size": 13295
} | [
"com.liferay.portlet.asset.service.persistence.AssetEntryPersistence"
] | import com.liferay.portlet.asset.service.persistence.AssetEntryPersistence; | import com.liferay.portlet.asset.service.persistence.*; | [
"com.liferay.portlet"
] | com.liferay.portlet; | 568,254 |
@Override
public void setStoreLocation(String location, Job job) throws IOException {
String prefix = "hbase://";
if (location.startsWith(prefix)) {
tableName = location.substring(prefix.length());
}
config = new PhoenixPigConfiguration(job.getConfiguration());
config.configure(server, tableName, batch... | void function(String location, Job job) throws IOException { String prefix = "hbase: if (location.startsWith(prefix)) { tableName = location.substring(prefix.length()); } config = new PhoenixPigConfiguration(job.getConfiguration()); config.configure(server, tableName, batchSize); String serializedSchema = getUDFPropert... | /**
* Parse the HBase table name and configure job
*/ | Parse the HBase table name and configure job | setStoreLocation | {
"repo_name": "forcedotcom/phoenix",
"path": "phoenix-pig/src/main/java/com/salesforce/phoenix/pig/PhoenixHBaseStorage.java",
"license": "bsd-3-clause",
"size": 7091
} | [
"java.io.IOException",
"org.apache.hadoop.mapreduce.Job",
"org.apache.pig.ResourceSchema",
"org.apache.pig.impl.util.ObjectSerializer"
] | import java.io.IOException; import org.apache.hadoop.mapreduce.Job; import org.apache.pig.ResourceSchema; import org.apache.pig.impl.util.ObjectSerializer; | import java.io.*; import org.apache.hadoop.mapreduce.*; import org.apache.pig.*; import org.apache.pig.impl.util.*; | [
"java.io",
"org.apache.hadoop",
"org.apache.pig"
] | java.io; org.apache.hadoop; org.apache.pig; | 1,619,034 |
public static boolean isCompareOperator(BinaryOperator bOp)
{
return ( bOp.fn instanceof LessThan || bOp.fn instanceof LessThanEquals // For operators <, <=,
|| bOp.fn instanceof GreaterThan || bOp.fn instanceof GreaterThanEquals // >, >=
|| bOp.fn instanceof Equals || bOp.fn instanceof NotEquals); ... | static boolean function(BinaryOperator bOp) { return ( bOp.fn instanceof LessThan bOp.fn instanceof LessThanEquals bOp.fn instanceof GreaterThan bOp.fn instanceof GreaterThanEquals bOp.fn instanceof Equals bOp.fn instanceof NotEquals); } | /**
* This will return if uaggOp is of type RowIndexMin
*
* @param bOp binary operator
* @return true/false, based on if its one of the six operators (<, <=, >, >=, == and !=)
*/ | This will return if uaggOp is of type RowIndexMin | isCompareOperator | {
"repo_name": "nakul02/incubator-systemml",
"path": "src/main/java/org/apache/sysml/runtime/matrix/data/LibMatrixOuterAgg.java",
"license": "apache-2.0",
"size": 42804
} | [
"org.apache.sysml.runtime.functionobjects.Equals",
"org.apache.sysml.runtime.functionobjects.GreaterThan",
"org.apache.sysml.runtime.functionobjects.GreaterThanEquals",
"org.apache.sysml.runtime.functionobjects.LessThan",
"org.apache.sysml.runtime.functionobjects.LessThanEquals",
"org.apache.sysml.runtime... | import org.apache.sysml.runtime.functionobjects.Equals; import org.apache.sysml.runtime.functionobjects.GreaterThan; import org.apache.sysml.runtime.functionobjects.GreaterThanEquals; import org.apache.sysml.runtime.functionobjects.LessThan; import org.apache.sysml.runtime.functionobjects.LessThanEquals; import org.apa... | import org.apache.sysml.runtime.functionobjects.*; import org.apache.sysml.runtime.matrix.operators.*; | [
"org.apache.sysml"
] | org.apache.sysml; | 2,406,175 |
private void writeRequest(String methodName, Object arguments, HttpRequest httpRequest) throws IOException {
ObjectNode request = mapper.createObjectNode();
request.put(ID, nextId.getAndIncrement());
request.put(JSONRPC, JsonRpcBasicServer.VERSION);
request.put(METHOD, methodName);
if (arguments != null ... | void function(String methodName, Object arguments, HttpRequest httpRequest) throws IOException { ObjectNode request = mapper.createObjectNode(); request.put(ID, nextId.getAndIncrement()); request.put(JSONRPC, JsonRpcBasicServer.VERSION); request.put(METHOD, methodName); if (arguments != null && arguments.getClass().isA... | /**
* Writes a request.
*
* @param methodName the method name
* @param arguments the arguments
* @param httpRequest the stream on error
*/ | Writes a request | writeRequest | {
"repo_name": "aplgithub/jsonrpc4j",
"path": "src/main/java/com/googlecode/jsonrpc4j/JsonRpcHttpAsyncClient.java",
"license": "mit",
"size": 20476
} | [
"com.fasterxml.jackson.databind.node.ObjectNode",
"java.io.ByteArrayOutputStream",
"java.io.IOException",
"java.util.Collection",
"java.util.Map",
"java.util.concurrent.Future",
"org.apache.http.HttpEntity",
"org.apache.http.HttpEntityEnclosingRequest",
"org.apache.http.HttpRequest",
"org.apache.h... | import com.fasterxml.jackson.databind.node.ObjectNode; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.util.Collection; import java.util.Map; import java.util.concurrent.Future; import org.apache.http.HttpEntity; import org.apache.http.HttpEntityEnclosingRequest; import org.apache.http.Htt... | import com.fasterxml.jackson.databind.node.*; import java.io.*; import java.util.*; import java.util.concurrent.*; import org.apache.http.*; import org.apache.http.entity.*; | [
"com.fasterxml.jackson",
"java.io",
"java.util",
"org.apache.http"
] | com.fasterxml.jackson; java.io; java.util; org.apache.http; | 418,567 |
@Override
public void close() throws IOException {
if (this.buffer == null) {
this.allocate();
}
this.buffer.close();
} | void function() throws IOException { if (this.buffer == null) { this.allocate(); } this.buffer.close(); } | /**
* This method is used to ensure the buffer can be closed. Once the buffer
* is closed it is an immutable collection of bytes and can not longer be
* modified. This ensures that it can be passed by value without the risk of
* modification of the bytes.
*/ | This method is used to ensure the buffer can be closed. Once the buffer is closed it is an immutable collection of bytes and can not longer be modified. This ensures that it can be passed by value without the risk of modification of the bytes | close | {
"repo_name": "TehSomeLuigi/someluigis-peripherals",
"path": "slp_common/org/simpleframework/util/buffer/BufferAllocator.java",
"license": "gpl-3.0",
"size": 8448
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,284,385 |
stubFor(get(urlEqualTo(AUTHENTICATE))
.withHeader("Authorization", absent())
.willReturn(aResponse()
.withStatus(HttpServletResponse.SC_UNAUTHORIZED)));
Download t = makeProjectAndTask();
t.src(wireMock.url(AUTHENTICATE));
File dst = newTe... | stubFor(get(urlEqualTo(AUTHENTICATE)) .withHeader(STR, absent()) .willReturn(aResponse() .withStatus(HttpServletResponse.SC_UNAUTHORIZED))); Download t = makeProjectAndTask(); t.src(wireMock.url(AUTHENTICATE)); File dst = newTempFile(); t.dest(dst); Assertions.setMaxStackTraceElementsDisplayed(1000); assertThatThrownBy... | /**
* Tests if the plugin can handle failed authentication
* @throws Exception if anything goes wrong
*/ | Tests if the plugin can handle failed authentication | noAuthorization | {
"repo_name": "michel-kraemer/gradle-download-task",
"path": "src/test/java/de/undercouch/gradle/tasks/download/AuthenticationTest.java",
"license": "apache-2.0",
"size": 6963
} | [
"com.github.tomakehurst.wiremock.client.WireMock",
"java.io.File",
"javax.servlet.http.HttpServletResponse",
"org.apache.hc.client5.http.ClientProtocolException",
"org.assertj.core.api.Assertions",
"org.gradle.workers.WorkerExecutionException"
] | import com.github.tomakehurst.wiremock.client.WireMock; import java.io.File; import javax.servlet.http.HttpServletResponse; import org.apache.hc.client5.http.ClientProtocolException; import org.assertj.core.api.Assertions; import org.gradle.workers.WorkerExecutionException; | import com.github.tomakehurst.wiremock.client.*; import java.io.*; import javax.servlet.http.*; import org.apache.hc.client5.http.*; import org.assertj.core.api.*; import org.gradle.workers.*; | [
"com.github.tomakehurst",
"java.io",
"javax.servlet",
"org.apache.hc",
"org.assertj.core",
"org.gradle.workers"
] | com.github.tomakehurst; java.io; javax.servlet; org.apache.hc; org.assertj.core; org.gradle.workers; | 424,465 |
public void clearMousePressedRecord() {
Arrays.fill(mousePressed, false);
}
| void function() { Arrays.fill(mousePressed, false); } | /**
* Clear the state for the <code>isMousePressed</code> method. This will
* resort in all mouse buttons returning that they haven't been pressed, until
* they are pressed again
*/ | Clear the state for the <code>isMousePressed</code> method. This will resort in all mouse buttons returning that they haven't been pressed, until they are pressed again | clearMousePressedRecord | {
"repo_name": "CyboticCatfish/code404",
"path": "CodingGame/lib/slick/src/org/newdawn/slick/Input.java",
"license": "gpl-2.0",
"size": 43080
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 2,419,990 |
@Override
public void characters(char[] text, int start, int length) throws SAXException {
if (!readCharacterStatus) {
contentBuffer = new StringBuffer(new String(text, start, length));
} else {
contentBuffer.append(new String(text, start, length));
}
readCharacterStatus = true;
} | void function(char[] text, int start, int length) throws SAXException { if (!readCharacterStatus) { contentBuffer = new StringBuffer(new String(text, start, length)); } else { contentBuffer.append(new String(text, start, length)); } readCharacterStatus = true; } | /**
* This method is called when the SAX parser encounts text in the XML doc.
* Here we calculate the end indices for all the elements present inside the
* stack and update with the new values. For entities, this method is called
* separatley regardless of the text sourinding the entity.
*/ | This method is called when the SAX parser encounts text in the XML doc. Here we calculate the end indices for all the elements present inside the stack and update with the new values. For entities, this method is called separatley regardless of the text sourinding the entity | characters | {
"repo_name": "GateNLP/gate-core",
"path": "src/main/java/gate/xml/XmlDocumentHandler.java",
"license": "lgpl-3.0",
"size": 29209
} | [
"org.xml.sax.SAXException"
] | import org.xml.sax.SAXException; | import org.xml.sax.*; | [
"org.xml.sax"
] | org.xml.sax; | 1,139,255 |
private void constructLopsCovariance() {
if ( _op != OpOp3.COV )
throw new HopsException("Unexpected operation: " + _op + ", expecting " + OpOp3.COV );
ExecType et = optFindExecType();
if ( et == ExecType.MR )
{
// combineTertiary -> CoVariance -> CastAsScalar
CombineTernary combine = Combine... | void function() { if ( _op != OpOp3.COV ) throw new HopsException(STR + _op + STR + OpOp3.COV ); ExecType et = optFindExecType(); if ( et == ExecType.MR ) { CombineTernary combine = CombineTernary .constructCombineLop( CombineTernary.OperationTypes.PreCovWeighted, getInput().get(0).constructLops(), getInput().get(1).co... | /**
* Method to construct LOPs when op = COVARIANCE.
*/ | Method to construct LOPs when op = COVARIANCE | constructLopsCovariance | {
"repo_name": "nakul02/incubator-systemml",
"path": "src/main/java/org/apache/sysml/hops/TernaryOp.java",
"license": "apache-2.0",
"size": 35362
} | [
"org.apache.sysml.lops.CoVariance",
"org.apache.sysml.lops.CombineBinary",
"org.apache.sysml.lops.CombineTernary",
"org.apache.sysml.lops.LopProperties",
"org.apache.sysml.lops.UnaryCP",
"org.apache.sysml.parser.Expression"
] | import org.apache.sysml.lops.CoVariance; import org.apache.sysml.lops.CombineBinary; import org.apache.sysml.lops.CombineTernary; import org.apache.sysml.lops.LopProperties; import org.apache.sysml.lops.UnaryCP; import org.apache.sysml.parser.Expression; | import org.apache.sysml.lops.*; import org.apache.sysml.parser.*; | [
"org.apache.sysml"
] | org.apache.sysml; | 2,355,396 |
public void init() {
state.a = new ArrayList<Double>();
state.n = 0;
} | void function() { state.a = new ArrayList<Double>(); state.n = 0; } | /**
* Reset the state.
*/ | Reset the state | init | {
"repo_name": "alanfgates/hive",
"path": "contrib/src/java/org/apache/hadoop/hive/contrib/udaf/example/UDAFExampleMaxMinNUtil.java",
"license": "apache-2.0",
"size": 6067
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 2,716,354 |
public Optional<Reader> getReaderIfFileExists(Path pathRelativeToProjectRoot) {
Path fileToRead = getPathForRelativePath(pathRelativeToProjectRoot);
if (Files.isRegularFile(fileToRead)) {
try {
return Optional.of(
(Reader) new BufferedReader(
new InputStreamReader(new... | Optional<Reader> function(Path pathRelativeToProjectRoot) { Path fileToRead = getPathForRelativePath(pathRelativeToProjectRoot); if (Files.isRegularFile(fileToRead)) { try { return Optional.of( (Reader) new BufferedReader( new InputStreamReader(newFileInputStream(pathRelativeToProjectRoot)))); } catch (Exception e) { t... | /**
* Attempts to open the file for future read access. Returns {@link Optional#absent()} if the file
* does not exist.
*/ | Attempts to open the file for future read access. Returns <code>Optional#absent()</code> if the file does not exist | getReaderIfFileExists | {
"repo_name": "janicduplessis/buck",
"path": "src/com/facebook/buck/io/ProjectFilesystem.java",
"license": "apache-2.0",
"size": 43780
} | [
"com.google.common.base.Optional",
"java.io.BufferedReader",
"java.io.InputStreamReader",
"java.io.Reader",
"java.nio.file.Files",
"java.nio.file.Path"
] | import com.google.common.base.Optional; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.Reader; import java.nio.file.Files; import java.nio.file.Path; | import com.google.common.base.*; import java.io.*; import java.nio.file.*; | [
"com.google.common",
"java.io",
"java.nio"
] | com.google.common; java.io; java.nio; | 2,677,999 |
List<DataElement> getDataElementsWithoutGroups(); | List<DataElement> getDataElementsWithoutGroups(); | /**
* Gets all data elements which are not members of any groups.
*/ | Gets all data elements which are not members of any groups | getDataElementsWithoutGroups | {
"repo_name": "uonafya/jphes-core",
"path": "dhis-2/dhis-api/src/main/java/org/hisp/dhis/dataintegrity/DataIntegrityService.java",
"license": "bsd-3-clause",
"size": 7902
} | [
"java.util.List",
"org.hisp.dhis.dataelement.DataElement"
] | import java.util.List; import org.hisp.dhis.dataelement.DataElement; | import java.util.*; import org.hisp.dhis.dataelement.*; | [
"java.util",
"org.hisp.dhis"
] | java.util; org.hisp.dhis; | 1,510,346 |
public void addPersonalization(Personalization personalization) {
if (this.personalization == null) {
this.personalization = new ArrayList<Personalization>();
this.personalization.add(personalization);
} else {
this.personalization.add(personalization);
}
} | void function(Personalization personalization) { if (this.personalization == null) { this.personalization = new ArrayList<Personalization>(); this.personalization.add(personalization); } else { this.personalization.add(personalization); } } | /**
* Add a personalizaton to the email.
* @param personalization a personalization.
*/ | Add a personalizaton to the email | addPersonalization | {
"repo_name": "julianjmaurer/sendgrid-java",
"path": "src/main/java/com/sendgrid/helpers/mail/Mail.java",
"license": "mit",
"size": 13599
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 201,302 |
public void execute() {
if (fileName == null) {
throw new BuildException("fileName parameter not set");
}
if (userProfileAlias == null) {
throw new BuildException("userProfileAlias parameter not set");
}
FileReader reader = null;
try {
... | void function() { if (fileName == null) { throw new BuildException(STR); } if (userProfileAlias == null) { throw new BuildException(STR); } FileReader reader = null; try { reader = new FileReader(fileName); } catch (IOException e) { throw new BuildException(STR + fileName, e); } ObjectStoreWriter uosw; try { uosw = Obj... | /**
* Execute the task - read the profiles.
* @throws BuildException if there is a problem while reading from the file or writing to the
* profiles.
*/ | Execute the task - read the profiles | execute | {
"repo_name": "drhee/toxoMine",
"path": "intermine/webtasks/main/src/org/intermine/web/task/TemplateTrackReadTask.java",
"license": "lgpl-2.1",
"size": 2492
} | [
"java.io.FileReader",
"java.io.IOException",
"org.apache.tools.ant.BuildException",
"org.intermine.api.tracker.xml.TemplateTrackBinding",
"org.intermine.objectstore.ObjectStoreWriter",
"org.intermine.objectstore.ObjectStoreWriterFactory"
] | import java.io.FileReader; import java.io.IOException; import org.apache.tools.ant.BuildException; import org.intermine.api.tracker.xml.TemplateTrackBinding; import org.intermine.objectstore.ObjectStoreWriter; import org.intermine.objectstore.ObjectStoreWriterFactory; | import java.io.*; import org.apache.tools.ant.*; import org.intermine.api.tracker.xml.*; import org.intermine.objectstore.*; | [
"java.io",
"org.apache.tools",
"org.intermine.api",
"org.intermine.objectstore"
] | java.io; org.apache.tools; org.intermine.api; org.intermine.objectstore; | 700,748 |
public void setDeployWorkingDir(File value); | void function(File value); | /**
* Sets the system's deploy working directory.
* @throws IllegalArgumentException if the specified value is not acceptable.
* @throws com.gemstone.gemfire.UnmodifiableException if this attribute can not be modified.
* @throws com.gemstone.gemfire.GemFireIOException if the set failure is caused by an erro... | Sets the system's deploy working directory | setDeployWorkingDir | {
"repo_name": "papicella/snappy-store",
"path": "gemfire-core/src/main/java/com/gemstone/gemfire/distributed/internal/DistributionConfig.java",
"license": "apache-2.0",
"size": 79519
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 327,930 |
public synchronized void addHeader(String name, String value) {
String nameLower = name.toLowerCase();
List<String> headerValueList = headerNameToValueListMap.get(nameLower);
if (null == headerValueList) {
headerValueList = new ArrayList<String>();
headerNameToValueLi... | synchronized void function(String name, String value) { String nameLower = name.toLowerCase(); List<String> headerValueList = headerNameToValueListMap.get(nameLower); if (null == headerValueList) { headerValueList = new ArrayList<String>(); headerNameToValueListMap.put(nameLower, headerValueList); headerNameList.add(na... | /**
* Method to add header values to this instance.
*
* @param name name of this header
* @param value value of this header
*/ | Method to add header values to this instance | addHeader | {
"repo_name": "WhiteBearSolutions/WBSAirback",
"path": "packages/wbsairback-tomcat/wbsairback-tomcat-7.0.22/java/org/apache/tomcat/util/http/fileupload/util/FileItemHeadersImpl.java",
"license": "apache-2.0",
"size": 3312
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,543,616 |
public boolean checkRunnabilityWithUpdate(
FiCaSchedulerApp attempt) {
boolean attemptCanRun = !exceedUserMaxParallelApps(attempt.getUser())
&& !exceedQueueMaxParallelApps(attempt.getCSLeafQueue());
attempt.setRunnable(attemptCanRun);
return attemptCanRun;
} | boolean function( FiCaSchedulerApp attempt) { boolean attemptCanRun = !exceedUserMaxParallelApps(attempt.getUser()) && !exceedQueueMaxParallelApps(attempt.getCSLeafQueue()); attempt.setRunnable(attemptCanRun); return attemptCanRun; } | /**
* Checks whether making the application runnable would exceed any
* maxRunningApps limits. Also sets the "runnable" flag on the
* attempt.
*
* @param attempt the app attempt being checked
* @return true if the application is runnable; false otherwise
*/ | Checks whether making the application runnable would exceed any maxRunningApps limits. Also sets the "runnable" flag on the attempt | checkRunnabilityWithUpdate | {
"repo_name": "apurtell/hadoop",
"path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/capacity/CSMaxRunningAppsEnforcer.java",
"license": "apache-2.0",
"size": 15141
} | [
"org.apache.hadoop.yarn.server.resourcemanager.scheduler.common.fica.FiCaSchedulerApp"
] | import org.apache.hadoop.yarn.server.resourcemanager.scheduler.common.fica.FiCaSchedulerApp; | import org.apache.hadoop.yarn.server.resourcemanager.scheduler.common.fica.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,432,677 |
public boolean cisEqual(CmsCI ci1, CmsCI ci2) {
if (ci1 == null || ci2 == null){
return false;
}
if (!(ci1.getCiName().equals(ci2.getCiName()))) {
return false;
}
if (!(ci2.getComments() != null && ci2.getComments().equals(ci1.getComments()))){
return false;
}
return ci1.getCiStateId() == ci2.... | boolean function(CmsCI ci1, CmsCI ci2) { if (ci1 == null ci2 == null){ return false; } if (!(ci1.getCiName().equals(ci2.getCiName()))) { return false; } if (!(ci2.getComments() != null && ci2.getComments().equals(ci1.getComments()))){ return false; } return ci1.getCiStateId() == ci2.getCiStateId(); } | /**
* Cis equal.
*
* @param ci1 the ci1
* @param ci2 the ci2
* @return true, if successful
*/ | Cis equal | cisEqual | {
"repo_name": "lkhusid/oneops",
"path": "cmsdal/src/main/java/com/oneops/cms/util/CmsCmValidator.java",
"license": "apache-2.0",
"size": 13424
} | [
"com.oneops.cms.cm.domain.CmsCI"
] | import com.oneops.cms.cm.domain.CmsCI; | import com.oneops.cms.cm.domain.*; | [
"com.oneops.cms"
] | com.oneops.cms; | 1,097,267 |
@Test
public void testEntireCycleWithCustomMatchersAndResponses()
throws Exception {
final SimpleProvider provider = new SimpleProvider();
final Connector connector = new SimpleConnector(provider);
final YMockServer server = new YMockServer(SimpleClient.ID, provider);
ser... | void function() throws Exception { final SimpleProvider provider = new SimpleProvider(); final Connector connector = new SimpleConnector(provider); final YMockServer server = new YMockServer(SimpleClient.ID, provider); server.when( new SimpleMatcher(YMockServerTest.REQUEST, false), new SimpleResponse(YMockServerTest.RE... | /**
* With custom matchers.
* @throws Exception If something goes wrong
*/ | With custom matchers | testEntireCycleWithCustomMatchersAndResponses | {
"repo_name": "yegor256/ymock",
"path": "ymock-server/src/test/java/com/ymock/server/YMockServerTest.java",
"license": "bsd-3-clause",
"size": 4917
} | [
"com.ymock.client.Connector"
] | import com.ymock.client.Connector; | import com.ymock.client.*; | [
"com.ymock.client"
] | com.ymock.client; | 2,234,317 |
public Adapter createMdfPrimitiveAdapter() {
if (mdfPrimitiveItemProvider == null) {
mdfPrimitiveItemProvider = new MdfPrimitiveItemProvider(this);
}
return mdfPrimitiveItemProvider;
}
protected MdfEnumerationItemProvider mdfEnumerationItemProvider; | Adapter function() { if (mdfPrimitiveItemProvider == null) { mdfPrimitiveItemProvider = new MdfPrimitiveItemProvider(this); } return mdfPrimitiveItemProvider; } protected MdfEnumerationItemProvider mdfEnumerationItemProvider; | /**
* This creates an adapter for a {@link com.odcgroup.mdf.metamodel.MdfPrimitive}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This creates an adapter for a <code>com.odcgroup.mdf.metamodel.MdfPrimitive</code>. | createMdfPrimitiveAdapter | {
"repo_name": "debabratahazra/DS",
"path": "designstudio/components/domain/ui/com.odcgroup.mdf.editor/source/com/odcgroup/mdf/editor/ui/editors/providers/MdfItemProviderAdapterFactory.java",
"license": "epl-1.0",
"size": 14973
} | [
"org.eclipse.emf.common.notify.Adapter"
] | import org.eclipse.emf.common.notify.Adapter; | import org.eclipse.emf.common.notify.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 735,443 |
@SuppressWarnings("PMD.AvoidInstantiatingObjectsInLoops")
private static Map<String, List<Request>> asMap(
final Collection<Request> reqs) throws IOException {
final Map<String, List<Request>> map = new HashMap<>(reqs.size());
for (final Request req : reqs) {
final String hea... | @SuppressWarnings(STR) static Map<String, List<Request>> function( final Collection<Request> reqs) throws IOException { final Map<String, List<Request>> map = new HashMap<>(reqs.size()); for (final Request req : reqs) { final String header = new RqHeaders.Smart(req).single(STR); final Matcher matcher = RqMtBase.NAME.ma... | /**
* Convert a list of requests to a map.
* @param reqs Requests
* @return Map of them
* @throws IOException If fails
*/ | Convert a list of requests to a map | asMap | {
"repo_name": "yegor256/takes",
"path": "src/main/java/org/takes/rq/multipart/RqMtBase.java",
"license": "mit",
"size": 11449
} | [
"java.io.FilterInputStream",
"java.io.IOException",
"java.io.InputStream",
"java.net.HttpURLConnection",
"java.util.Collection",
"java.util.HashMap",
"java.util.LinkedList",
"java.util.List",
"java.util.Map",
"java.util.regex.Matcher",
"org.takes.HttpException",
"org.takes.Request",
"org.tak... | import java.io.FilterInputStream; import java.io.IOException; import java.io.InputStream; import java.net.HttpURLConnection; import java.util.Collection; import java.util.HashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; import java.util.regex.Matcher; import org.takes.HttpException; im... | import java.io.*; import java.net.*; import java.util.*; import java.util.regex.*; import org.takes.*; import org.takes.rq.*; | [
"java.io",
"java.net",
"java.util",
"org.takes",
"org.takes.rq"
] | java.io; java.net; java.util; org.takes; org.takes.rq; | 1,822,014 |
void delete ( Role role ) throws DotDataException, DotStateException; | void delete ( Role role ) throws DotDataException, DotStateException; | /**
* Removes a given Role.
* <br>In order to remove a Role it is required first to remove the association
* of this Role with any user under it, remove its permissions and finally remove its layouts.
*
* @param role
* @throws DotDataException
* @throws DotStateException
*/ | Removes a given Role. In order to remove a Role it is required first to remove the association of this Role with any user under it, remove its permissions and finally remove its layouts | delete | {
"repo_name": "dotCMS/core",
"path": "dotCMS/src/main/java/com/dotmarketing/business/RoleAPI.java",
"license": "gpl-3.0",
"size": 11338
} | [
"com.dotmarketing.exception.DotDataException"
] | import com.dotmarketing.exception.DotDataException; | import com.dotmarketing.exception.*; | [
"com.dotmarketing.exception"
] | com.dotmarketing.exception; | 2,487,425 |
public boolean validateUIExpressionVsJaxb(ExternalExpression externalExpression, MappingSheetRow mappingSheetRow)
throws RuntimeException {
Expression expression = externalExpression.getExpression();
if (expression != null) {
if (!StringUtils.equals(expression.getId(), mappingSheetRow.getOperationID())) {
... | boolean function(ExternalExpression externalExpression, MappingSheetRow mappingSheetRow) throws RuntimeException { Expression expression = externalExpression.getExpression(); if (expression != null) { if (!StringUtils.equals(expression.getId(), mappingSheetRow.getOperationID())) { throw new RuntimeException( mappingShe... | /**
*
* validate ui expression data with external file data
*
* @param externalExpression
* @param mappingSheetRow
* @return
* @throws RuntimeException
*/ | validate ui expression data with external file data | validateUIExpressionVsJaxb | {
"repo_name": "capitalone/Hydrograph",
"path": "hydrograph.ui/hydrograph.ui.common/src/main/java/hydrograph/ui/common/util/ValidateExpressionOperation.java",
"license": "apache-2.0",
"size": 15580
} | [
"org.apache.commons.lang.StringUtils"
] | import org.apache.commons.lang.StringUtils; | import org.apache.commons.lang.*; | [
"org.apache.commons"
] | org.apache.commons; | 1,200,745 |
Properties getUserProperties(); | Properties getUserProperties(); | /**
* Gets the user properties to use for interpolation and profile activation. The user properties have been
* configured directly by the user on his discretion, e.g. via the {@code -Dkey=value} parameter on the command
* line.
*
* @return The user properties, never {@code null}.
*/ | Gets the user properties to use for interpolation and profile activation. The user properties have been configured directly by the user on his discretion, e.g. via the -Dkey=value parameter on the command line | getUserProperties | {
"repo_name": "rogerchina/maven",
"path": "maven-model-builder/src/main/java/org/apache/maven/model/building/ModelBuildingRequest.java",
"license": "apache-2.0",
"size": 13022
} | [
"java.util.Properties"
] | import java.util.Properties; | import java.util.*; | [
"java.util"
] | java.util; | 432,200 |
public NatAddressBuilder withGlobalEtrRlocAddress(LispAfiAddress globalEtrRlocAddress) {
this.globalEtrRlocAddress = globalEtrRlocAddress;
return this;
} | NatAddressBuilder function(LispAfiAddress globalEtrRlocAddress) { this.globalEtrRlocAddress = globalEtrRlocAddress; return this; } | /**
* Sets global ETR RLOC address.
*
* @param globalEtrRlocAddress global ETR RLOC address
* @return NatAddressBuilder object
*/ | Sets global ETR RLOC address | withGlobalEtrRlocAddress | {
"repo_name": "donNewtonAlpha/onos",
"path": "protocols/lisp/msg/src/main/java/org/onosproject/lisp/msg/types/lcaf/LispNatLcafAddress.java",
"license": "apache-2.0",
"size": 12775
} | [
"org.onosproject.lisp.msg.types.LispAfiAddress"
] | import org.onosproject.lisp.msg.types.LispAfiAddress; | import org.onosproject.lisp.msg.types.*; | [
"org.onosproject.lisp"
] | org.onosproject.lisp; | 745,359 |
public Bundle toBundle() {
return null;
} | Bundle function() { return null; } | /**
* Returns the created options as a Bundle, which can be passed to
* {@link ActivityCompat#startActivity(android.app.Activity, android.content.Intent, android.os.Bundle)}.
* Note that the returned Bundle is still owned by the ActivityOptions
* object; you must not modify it, but can supply it to ... | Returns the created options as a Bundle, which can be passed to <code>ActivityCompat#startActivity(android.app.Activity, android.content.Intent, android.os.Bundle)</code>. Note that the returned Bundle is still owned by the ActivityOptions object; you must not modify it, but can supply it to the startActivity methods t... | toBundle | {
"repo_name": "masconsult/android-recipes-app",
"path": "vendors/android-support-v7-appcompat/libs-src/android-support-v4/android/support/v4/app/ActivityOptionsCompat.java",
"license": "apache-2.0",
"size": 6344
} | [
"android.os.Bundle"
] | import android.os.Bundle; | import android.os.*; | [
"android.os"
] | android.os; | 2,574,441 |
interface WithVirtualNetworkGateway2 {
Update withVirtualNetworkGateway2(VirtualNetworkGatewayInner virtualNetworkGateway2);
}
} | interface WithVirtualNetworkGateway2 { Update withVirtualNetworkGateway2(VirtualNetworkGatewayInner virtualNetworkGateway2); } } | /**
* Specifies virtualNetworkGateway2.
* @param virtualNetworkGateway2 The reference to virtual network gateway resource
* @return the next update stage
*/ | Specifies virtualNetworkGateway2 | withVirtualNetworkGateway2 | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/VirtualNetworkGatewayConnection.java",
"license": "mit",
"size": 20504
} | [
"com.microsoft.azure.management.network.v2019_07_01.implementation.VirtualNetworkGatewayInner"
] | import com.microsoft.azure.management.network.v2019_07_01.implementation.VirtualNetworkGatewayInner; | import com.microsoft.azure.management.network.v2019_07_01.implementation.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 2,494,995 |
@SuppressWarnings({"CatchGenericClass"})
public static void close(Ignite ignite, IgniteLogger log) {
if (ignite != null)
try {
G.stop(ignite.name(), false);
}
catch (Throwable e) {
U.error(log, "Failed to stop grid: " + ignite.name(), e... | @SuppressWarnings({STR}) static void function(Ignite ignite, IgniteLogger log) { if (ignite != null) try { G.stop(ignite.name(), false); } catch (Throwable e) { U.error(log, STR + ignite.name(), e); } } | /**
* Silent stop grid.
* Method doesn't throw any exception.
*
* @param ignite Grid to stop.
* @param log Logger.
*/ | Silent stop grid. Method doesn't throw any exception | close | {
"repo_name": "wmz7year/ignite",
"path": "modules/core/src/test/java/org/apache/ignite/testframework/GridTestUtils.java",
"license": "apache-2.0",
"size": 65162
} | [
"org.apache.ignite.Ignite",
"org.apache.ignite.IgniteLogger",
"org.apache.ignite.internal.util.typedef.G",
"org.apache.ignite.internal.util.typedef.internal.U"
] | import org.apache.ignite.Ignite; import org.apache.ignite.IgniteLogger; import org.apache.ignite.internal.util.typedef.G; import org.apache.ignite.internal.util.typedef.internal.U; | import org.apache.ignite.*; import org.apache.ignite.internal.util.typedef.*; import org.apache.ignite.internal.util.typedef.internal.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 539,855 |
public void setEta(String eta) {
if (eta != null) {
parameters.put(Names.eta, eta);
} else {
parameters.remove(Names.eta);
}
}
| void function(String eta) { if (eta != null) { parameters.put(Names.eta, eta); } else { parameters.remove(Names.eta); } } | /**
* Sets a text field for estimated time of arrival
*
* @param eta
* a String value representing a text field for estimated time of
* arrival
* <p>
* <b>Notes: </b>Maxlength=500
*/ | Sets a text field for estimated time of arrival | setEta | {
"repo_name": "Luxoft/SDLP2",
"path": "SDL_Android/SmartDeviceLinkProxyAndroid/src/com/smartdevicelink/proxy/rpc/ShowConstantTBT.java",
"license": "lgpl-2.1",
"size": 8921
} | [
"com.smartdevicelink.proxy.constants.Names"
] | import com.smartdevicelink.proxy.constants.Names; | import com.smartdevicelink.proxy.constants.*; | [
"com.smartdevicelink.proxy"
] | com.smartdevicelink.proxy; | 1,520,745 |
@Override
public void deleteObserver(IObserver o) {
if (o.sameClass(Player.class)) {
observers.remove(o);
}
} | void function(IObserver o) { if (o.sameClass(Player.class)) { observers.remove(o); } } | /**
* Delete an observer from this observable object.
*
* @param o an observer.
*/ | Delete an observer from this observable object | deleteObserver | {
"repo_name": "JoshCode/SEM",
"path": "src/main/java/nl/joshuaslik/tudelft/SEM/control/gameObjects/Player.java",
"license": "apache-2.0",
"size": 10704
} | [
"nl.joshuaslik.tudelft.SEM"
] | import nl.joshuaslik.tudelft.SEM; | import nl.joshuaslik.tudelft.*; | [
"nl.joshuaslik.tudelft"
] | nl.joshuaslik.tudelft; | 1,643,539 |
public T caseFiniteEnumeration(FiniteEnumeration object) {
return null;
} | T function(FiniteEnumeration object) { return null; } | /**
* Returns the result of interpreting the object as an instance of '<em>Finite Enumeration</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result... | Returns the result of interpreting the object as an instance of 'Finite Enumeration'. This implementation returns null; returning a non-null result will terminate the switch. | caseFiniteEnumeration | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-SNNet/src/fr/lip6/move/pnml/symmetricnet/cyclicEnumerations/util/CyclicEnumerationsSwitch.java",
"license": "epl-1.0",
"size": 11840
} | [
"fr.lip6.move.pnml.symmetricnet.finiteEnumerations.FiniteEnumeration"
] | import fr.lip6.move.pnml.symmetricnet.finiteEnumerations.FiniteEnumeration; | import fr.lip6.move.pnml.symmetricnet.*; | [
"fr.lip6.move"
] | fr.lip6.move; | 188,194 |
@POST
@Path("/save")
@Consumes(MediaType.APPLICATION_XML)
@Produces(MediaType.APPLICATION_XML)
public Response save(Attribute command) throws IOException, Exception {
Hidra hidra;
ResultMessage result = new ResultMessage();
String path = command.getRepositoryPath();
... | @Path("/save") @Consumes(MediaType.APPLICATION_XML) @Produces(MediaType.APPLICATION_XML) Response function(Attribute command) throws IOException, Exception { Hidra hidra; ResultMessage result = new ResultMessage(); String path = command.getRepositoryPath(); String message = command.getSubmitMessage().isEmpty() ? DEFAUL... | /**
* Servico responsavel por gravar as alteracoes no repositorio. Consome XML
* padronizado (Attribute) contendo o caminho absoluto do repositorio que se
* deseja utilizar.
*
* @param command
* @return
* @throws java.io.IOException
*/ | Servico responsavel por gravar as alteracoes no repositorio. Consome XML padronizado (Attribute) contendo o caminho absoluto do repositorio que se deseja utilizar | save | {
"repo_name": "pedroSouzaJunior/HidraLEDES",
"path": "HidraRest/src/main/java/ledes/hidra/rest/Services.java",
"license": "gpl-2.0",
"size": 34118
} | [
"java.io.File",
"java.io.IOException",
"javax.ws.rs.Consumes",
"javax.ws.rs.Path",
"javax.ws.rs.Produces",
"javax.ws.rs.core.MediaType",
"javax.ws.rs.core.Response"
] | import java.io.File; import java.io.IOException; import javax.ws.rs.Consumes; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; | import java.io.*; import javax.ws.rs.*; import javax.ws.rs.core.*; | [
"java.io",
"javax.ws"
] | java.io; javax.ws; | 710,840 |
private static Configuration getConfigurationWithoutSharedEdits(
Configuration conf)
throws IOException {
List<URI> editsDirs = FSNamesystem.getNamespaceEditsDirs(conf, false);
String editsDirsString = Joiner.on(",").join(editsDirs);
Configuration confWithoutShared = new Configuration(conf);
... | static Configuration function( Configuration conf) throws IOException { List<URI> editsDirs = FSNamesystem.getNamespaceEditsDirs(conf, false); String editsDirsString = Joiner.on(",").join(editsDirs); Configuration confWithoutShared = new Configuration(conf); confWithoutShared.unset(DFSConfigKeys.DFS_NAMENODE_SHARED_EDI... | /**
* Clone the supplied configuration but remove the shared edits dirs.
*
* @param conf Supplies the original configuration.
* @return Cloned configuration without the shared edit dirs.
* @throws IOException on failure to generate the configuration.
*/ | Clone the supplied configuration but remove the shared edits dirs | getConfigurationWithoutSharedEdits | {
"repo_name": "1tylermitchell/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java",
"license": "apache-2.0",
"size": 73799
} | [
"com.google.common.base.Joiner",
"java.io.IOException",
"java.util.List",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.hdfs.DFSConfigKeys"
] | import com.google.common.base.Joiner; import java.io.IOException; import java.util.List; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hdfs.DFSConfigKeys; | import com.google.common.base.*; import java.io.*; import java.util.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.hdfs.*; | [
"com.google.common",
"java.io",
"java.util",
"org.apache.hadoop"
] | com.google.common; java.io; java.util; org.apache.hadoop; | 996,429 |
public Scan setTimeRange(long minStamp, long maxStamp)
throws IOException {
tr = new TimeRange(minStamp, maxStamp);
return this;
} | Scan function(long minStamp, long maxStamp) throws IOException { tr = new TimeRange(minStamp, maxStamp); return this; } | /**
* Get versions of columns only within the specified timestamp range,
* [minStamp, maxStamp). Note, default maximum versions to return is 1. If
* your time range spans more than one version and you want all versions
* returned, up the number of versions beyond the defaut.
* @param minStamp minimum t... | Get versions of columns only within the specified timestamp range, [minStamp, maxStamp). Note, default maximum versions to return is 1. If your time range spans more than one version and you want all versions returned, up the number of versions beyond the defaut | setTimeRange | {
"repo_name": "Shmuma/hbase-trunk",
"path": "src/main/java/org/apache/hadoop/hbase/client/Scan.java",
"license": "apache-2.0",
"size": 20442
} | [
"java.io.IOException",
"org.apache.hadoop.hbase.io.TimeRange"
] | import java.io.IOException; import org.apache.hadoop.hbase.io.TimeRange; | import java.io.*; import org.apache.hadoop.hbase.io.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 551,989 |
public static int DeserializeInt16(ByteBuffer block, int offset) {
return DeserializeInt16(block, offset, IS_LITTLE_ENDIAN);
} | static int function(ByteBuffer block, int offset) { return DeserializeInt16(block, offset, IS_LITTLE_ENDIAN); } | /**
* DeserializeInt( descriptor )( block, offset, isLittleEndian ), descriptor = Int16x8
*
* @param block
* the data block
* @param offset
* the data block offset
* @return the number value
*/ | DeserializeInt( descriptor )( block, offset, isLittleEndian ), descriptor = Int16x8 | DeserializeInt16 | {
"repo_name": "jugglinmike/es6draft",
"path": "src/main/java/com/github/anba/es6draft/runtime/objects/simd/SIMDType.java",
"license": "mit",
"size": 24396
} | [
"java.nio.ByteBuffer"
] | import java.nio.ByteBuffer; | import java.nio.*; | [
"java.nio"
] | java.nio; | 222,595 |
@NotNull
@Size(max = 20)
public String getHeadmasterContact() {
return (String) get(9);
} | @Size(max = 20) String function() { return (String) get(9); } | /**
* Getter for <code>isy.graduation_practice_unify.headmaster_contact</code>.
*/ | Getter for <code>isy.graduation_practice_unify.headmaster_contact</code> | getHeadmasterContact | {
"repo_name": "zbeboy/ISY",
"path": "src/main/java/top/zbeboy/isy/domain/tables/records/GraduationPracticeUnifyRecord.java",
"license": "mit",
"size": 14141
} | [
"javax.validation.constraints.Size"
] | import javax.validation.constraints.Size; | import javax.validation.constraints.*; | [
"javax.validation"
] | javax.validation; | 1,230,672 |
private synchronized void switchRemovedFromStore(DatapathId dpid) {
if (floodlightProvider.getRole() != HARole.STANDBY) {
return; // only read from store if slave
}
IOFSwitch oldSw = syncedSwitches.remove(dpid);
if (oldSw != null) {
addUpdateToQueue(new SwitchUpdate(dpid, SwitchUpdateType.REMOVED));
... | synchronized void function(DatapathId dpid) { if (floodlightProvider.getRole() != HARole.STANDBY) { return; } IOFSwitch oldSw = syncedSwitches.remove(dpid); if (oldSw != null) { addUpdateToQueue(new SwitchUpdate(dpid, SwitchUpdateType.REMOVED)); } else { } } | /**
* Called when we receive a store notification about a switch that
* has been removed from the sync store
* @param dpid
*/ | Called when we receive a store notification about a switch that has been removed from the sync store | switchRemovedFromStore | {
"repo_name": "zy-sdn/savi-floodlight",
"path": "src/main/java/net/floodlightcontroller/core/internal/OFSwitchManager.java",
"license": "apache-2.0",
"size": 41066
} | [
"net.floodlightcontroller.core.HARole",
"net.floodlightcontroller.core.IOFSwitch",
"org.projectfloodlight.openflow.types.DatapathId"
] | import net.floodlightcontroller.core.HARole; import net.floodlightcontroller.core.IOFSwitch; import org.projectfloodlight.openflow.types.DatapathId; | import net.floodlightcontroller.core.*; import org.projectfloodlight.openflow.types.*; | [
"net.floodlightcontroller.core",
"org.projectfloodlight.openflow"
] | net.floodlightcontroller.core; org.projectfloodlight.openflow; | 2,539,098 |
public static void lockerPuzzle(boolean[] lockers)
{
if (lockers.length < 1)
{
System.out.println("Error: The number of lockers must be greater than zero.");
System.exit(0);
}
Arrays.fill(lockers, false);
for (int student = 1; student <= lockers.length; student++)
{
for (int locker = stud... | static void function(boolean[] lockers) { if (lockers.length < 1) { System.out.println(STR); System.exit(0); } Arrays.fill(lockers, false); for (int student = 1; student <= lockers.length; student++) { for (int locker = student; locker <= lockers.length; locker += student) { lockers[locker - 1] = !(lockers[locker - 1])... | /**
* Solves the locker puzzle given the boolean array argument.
* <ul>
* <li>
* If the boolean array's size is 0, an error will be displayed.
* </li>
* </ul>
* <p>
* Every element of the boolean array will default to false before solving the puzzle.
*
* @param lockers array of lockers
*/ | Solves the locker puzzle given the boolean array argument. If the boolean array's size is 0, an error will be displayed. Every element of the boolean array will default to false before solving the puzzle | lockerPuzzle | {
"repo_name": "tliang1/Java-Practice",
"path": "Practice/Intro-To-Java-8th-Ed-Daniel-Y.-Liang/Chapter-6/Chapter06P23/src/main/LockerPuzzle.java",
"license": "mit",
"size": 1339
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 919,123 |
private void doLogAccess(HttpServletRequest request, HttpServletResponse response, int statusCode, Resource resource, TrackingInformationV1 trackInfo) {
// TBD: What about a cluster, performance/scalability? See for example http://www.oreillynet.com/cs/user/view/cs_msg/17399 (also see Tomcat conf/server.xml... | void function(HttpServletRequest request, HttpServletResponse response, int statusCode, Resource resource, TrackingInformationV1 trackInfo) { if ("1".equals(request.getHeader("DNT"))) { if (logDoNotTrack.isDebugEnabled()) { logDoNotTrack.debug(STR + request.getRemoteAddr()); } return; } try { Realm realm = map.getRealm... | /**
* Log browser history of each user
* @param request TODO
* @param response TODO
* @param resource Resource which handles the request
* @param statusCode HTTP response status code (because one is not able to get status code from response)
* @param trackInfo Tracking information bean
... | Log browser history of each user | doLogAccess | {
"repo_name": "wyona/yanel",
"path": "src/webapp/src/java/org/wyona/yanel/servlet/YanelServlet.java",
"license": "apache-2.0",
"size": 182219
} | [
"java.util.HashMap",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"javax.servlet.http.HttpSession",
"org.wyona.security.core.api.Identity",
"org.wyona.yanel.core.Resource",
"org.wyona.yanel.core.attributes.tracking.TrackingInformationV1",
"org.wyona.yanel.core.map... | import java.util.HashMap; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import org.wyona.security.core.api.Identity; import org.wyona.yanel.core.Resource; import org.wyona.yanel.core.attributes.tracking.TrackingInformationV1; import o... | import java.util.*; import javax.servlet.http.*; import org.wyona.security.core.api.*; import org.wyona.yanel.core.*; import org.wyona.yanel.core.attributes.tracking.*; import org.wyona.yanel.core.map.*; | [
"java.util",
"javax.servlet",
"org.wyona.security",
"org.wyona.yanel"
] | java.util; javax.servlet; org.wyona.security; org.wyona.yanel; | 787,158 |
@Override
protected void onConnect() {
super.onConnect();
sendQueuedN2NMs();
}
// File transfer offers
// FIXME this should probably be somewhere else, along with the N2NM stuff... but where?
// FIXME this should be persistent across node restarts
private final HashMap<Long, FileOffer> myFileOffersByUI... | void function() { super.onConnect(); sendQueuedN2NMs(); } private final HashMap<Long, FileOffer> myFileOffersByUID = new HashMap<Long, FileOffer>(); private final HashMap<Long, FileOffer> hisFileOffersByUID = new HashMap<Long, FileOffer>(); | /**
* A method to be called once at the beginning of every time isConnected() is true
*/ | A method to be called once at the beginning of every time isConnected() is true | onConnect | {
"repo_name": "Thynix/fred-staging",
"path": "src/freenet/node/DarknetPeerNode.java",
"license": "gpl-2.0",
"size": 61947
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 1,756,620 |
final public VFile copyTo(VDir parentDir,String newName) throws VlException
{
return (VFile)this.getTransferManager().doCopyMove(this,parentDir,newName,false);
//return (VFile)doCopyMoveTo(parentDir,newName,false );
} | final VFile function(VDir parentDir,String newName) throws VlException { return (VFile)this.getTransferManager().doCopyMove(this,parentDir,newName,false); } | /**
* Copy to remote directory. Method will overwrite existing destination file.
* Parameter newName is optional new name of remote file.
* @throws VlException
*/ | Copy to remote directory. Method will overwrite existing destination file. Parameter newName is optional new name of remote file | copyTo | {
"repo_name": "skoulouzis/vlet-1.5.0",
"path": "source/core/nl.uva.vlet.vrs.core/source/main/nl/uva/vlet/vfs/VFile.java",
"license": "apache-2.0",
"size": 17765
} | [
"nl.uva.vlet.exception.VlException"
] | import nl.uva.vlet.exception.VlException; | import nl.uva.vlet.exception.*; | [
"nl.uva.vlet"
] | nl.uva.vlet; | 174,489 |
boolean compare( CompareOperationContext compareContext ) throws LdapException; | boolean compare( CompareOperationContext compareContext ) throws LdapException; | /**
* The Compare operation
*
* @param compareContext The context for the compare operation
* @return true if the compare operation was successful, false otherwise
* @throws LdapException If we had an issue during the operation
*/ | The Compare operation | compare | {
"repo_name": "apache/directory-server",
"path": "core-api/src/main/java/org/apache/directory/server/core/api/partition/PartitionNexus.java",
"license": "apache-2.0",
"size": 5656
} | [
"org.apache.directory.api.ldap.model.exception.LdapException",
"org.apache.directory.server.core.api.interceptor.context.CompareOperationContext"
] | import org.apache.directory.api.ldap.model.exception.LdapException; import org.apache.directory.server.core.api.interceptor.context.CompareOperationContext; | import org.apache.directory.api.ldap.model.exception.*; import org.apache.directory.server.core.api.interceptor.context.*; | [
"org.apache.directory"
] | org.apache.directory; | 2,011,271 |
String type = Utility.signatureToString(field.getSignature());
String name = field.getName();
String access = Utility.accessToString(field.getAccessFlags());
Attribute[] attributes;
access = Utility.replace(access, " ", " ");
file.print("<TR><TD><FONT COLOR=\"#FF0000\">" + a... | String type = Utility.signatureToString(field.getSignature()); String name = field.getName(); String access = Utility.accessToString(field.getAccessFlags()); Attribute[] attributes; access = Utility.replace(access, " ", STR); file.print(STR#FF0000\">" + access + STR + Class2HTML.referenceType(type) + STRfieldSTR\">STR<... | /**
* Print field of class.
*
* @param field field to print
* @exception java.io.IOException
*/ | Print field of class | writeField | {
"repo_name": "mohanaraosv/commons-bcel",
"path": "src/main/java/org/apache/commons/bcel6/util/MethodHTML.java",
"license": "apache-2.0",
"size": 7065
} | [
"org.apache.commons.bcel6.Constants",
"org.apache.commons.bcel6.classfile.Attribute",
"org.apache.commons.bcel6.classfile.ConstantValue",
"org.apache.commons.bcel6.classfile.Utility"
] | import org.apache.commons.bcel6.Constants; import org.apache.commons.bcel6.classfile.Attribute; import org.apache.commons.bcel6.classfile.ConstantValue; import org.apache.commons.bcel6.classfile.Utility; | import org.apache.commons.bcel6.*; import org.apache.commons.bcel6.classfile.*; | [
"org.apache.commons"
] | org.apache.commons; | 2,814,561 |
public static Map<String, String> strToMap(String text) {
return strToMap(text, ",", "=");
} | static Map<String, String> function(String text) { return strToMap(text, ",", "="); } | /**
* Creates a map by parsing text. Split text into key-value pairs
* using two delimiters. The first delimiter separates pairs, and the
* second delimiter separates key and value. If only one parameter is given,
* default delimiters are used: ',' as delimiter1 and '=' as delimiter2.
* @param text the input ... | Creates a map by parsing text. Split text into key-value pairs using two delimiters. The first delimiter separates pairs, and the second delimiter separates key and value. If only one parameter is given, default delimiters are used: ',' as delimiter1 and '=' as delimiter2 | strToMap | {
"repo_name": "bowenli86/flink",
"path": "flink-table/flink-table-runtime-blink/src/main/java/org/apache/flink/table/runtime/functions/SqlFunctionUtils.java",
"license": "apache-2.0",
"size": 30260
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,613,270 |
private synchronized void loadCaptchas() {
LOGGER.info("Loading captchas....");
try {
captchas = new Image[CAPTCHA_COUNT];
final URL captchaURL = SoloServletListener.class.getClassLoader().getResource("captcha_static.zip");
final ZipFile zipFile = new Zip... | synchronized void function() { LOGGER.info(STR); try { captchas = new Image[CAPTCHA_COUNT]; final URL captchaURL = SoloServletListener.class.getClassLoader().getResource(STR); final ZipFile zipFile = new ZipFile(captchaURL.getFile()); final Enumeration<? extends ZipEntry> entries = zipFile.entries(); int i = 0; while (... | /**
* Loads captcha.
*/ | Loads captcha | loadCaptchas | {
"repo_name": "cgm1521/b3log-solo",
"path": "core/src/main/java/org/b3log/solo/processor/CaptchaProcessor.java",
"license": "apache-2.0",
"size": 5278
} | [
"java.io.BufferedInputStream",
"java.util.Enumeration",
"java.util.zip.ZipEntry",
"java.util.zip.ZipFile",
"org.b3log.latke.image.Image",
"org.b3log.solo.SoloServletListener"
] | import java.io.BufferedInputStream; import java.util.Enumeration; import java.util.zip.ZipEntry; import java.util.zip.ZipFile; import org.b3log.latke.image.Image; import org.b3log.solo.SoloServletListener; | import java.io.*; import java.util.*; import java.util.zip.*; import org.b3log.latke.image.*; import org.b3log.solo.*; | [
"java.io",
"java.util",
"org.b3log.latke",
"org.b3log.solo"
] | java.io; java.util; org.b3log.latke; org.b3log.solo; | 2,015,647 |
List<Matcher<Object>> matchers = new ArrayList<>();
matchers.add(eq(b));
return new DecomposableMatchBuilder0<>(matchers, new PrimitiveFieldExtractor<>(Byte.class));
} | List<Matcher<Object>> matchers = new ArrayList<>(); matchers.add(eq(b)); return new DecomposableMatchBuilder0<>(matchers, new PrimitiveFieldExtractor<>(Byte.class)); } | /**
* Matches a byte.
*/ | Matches a byte | caseByte | {
"repo_name": "johnlcox/motif",
"path": "motif/src/main/java/com/leacox/motif/cases/PrimitiveCases.java",
"license": "apache-2.0",
"size": 7222
} | [
"com.leacox.motif.extract.DecomposableMatchBuilder0",
"com.leacox.motif.extract.matchers.Matcher",
"java.util.ArrayList",
"java.util.List"
] | import com.leacox.motif.extract.DecomposableMatchBuilder0; import com.leacox.motif.extract.matchers.Matcher; import java.util.ArrayList; import java.util.List; | import com.leacox.motif.extract.*; import com.leacox.motif.extract.matchers.*; import java.util.*; | [
"com.leacox.motif",
"java.util"
] | com.leacox.motif; java.util; | 810,454 |
public static Map<String, String> getAttributesFromXmlFile(File xmlFile) {
if (xmlFile == null || !xmlFile.exists())
return Collections.emptyMap();
try (Reader reader = createReader(xmlFile)) {
return getAttributesFromXmlReader(reader);
}
catch (IOException |... | static Map<String, String> function(File xmlFile) { if (xmlFile == null !xmlFile.exists()) return Collections.emptyMap(); try (Reader reader = createReader(xmlFile)) { return getAttributesFromXmlReader(reader); } catch (IOException RuntimeException e) { return Collections.emptyMap(); } } | /**
* Returns all the available attributes from the given XML file.
* @param xmlFile provided data file
* @return the available attributes in a map, maybe empty but never null
*/ | Returns all the available attributes from the given XML file | getAttributesFromXmlFile | {
"repo_name": "depryf/naaccr-xml",
"path": "src/main/java/com/imsweb/naaccrxml/NaaccrXmlUtils.java",
"license": "bsd-3-clause",
"size": 24417
} | [
"java.io.File",
"java.io.IOException",
"java.io.Reader",
"java.util.Collections",
"java.util.Map"
] | import java.io.File; import java.io.IOException; import java.io.Reader; import java.util.Collections; import java.util.Map; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 739,189 |
IntSet getLastSet(); | IntSet getLastSet(); | /**
* Returns the <code>IntSet</code> of <code>Intervals</code> which
* are visible at the logical end of the the expression.
*/ | Returns the <code>IntSet</code> of <code>Intervals</code> which are visible at the logical end of the the expression | getLastSet | {
"repo_name": "inxar/syntacs",
"path": "src/org/inxar/syntacs/grammar/regular/RegularExpression.java",
"license": "gpl-2.0",
"size": 2639
} | [
"org.inxar.syntacs.util.IntSet"
] | import org.inxar.syntacs.util.IntSet; | import org.inxar.syntacs.util.*; | [
"org.inxar.syntacs"
] | org.inxar.syntacs; | 561,403 |
@Override
public String loginDisabled() {
AuthResult result = brokerSession.authenticate("dummy", "dummy", null);
return result.status == AuthStatus.NOLOGINS ? result.reason : null;
} | String function() { AuthResult result = brokerSession.authenticate("dummy", "dummy", null); return result.status == AuthStatus.NOLOGINS ? result.reason : null; } | /**
* Return login disabled message.
*/ | Return login disabled message | loginDisabled | {
"repo_name": "carewebframework/carewebframework-vista",
"path": "org.carewebframework.vista.security-parent/org.carewebframework.vista.security.base/src/main/java/org/carewebframework/vista/security/base/BaseSecurityService.java",
"license": "apache-2.0",
"size": 2980
} | [
"org.carewebframework.vista.mbroker.Security"
] | import org.carewebframework.vista.mbroker.Security; | import org.carewebframework.vista.mbroker.*; | [
"org.carewebframework.vista"
] | org.carewebframework.vista; | 2,825,118 |
public KeyNamePair getKeyNamePair()
{
return new KeyNamePair(get_ID(), getName());
} | KeyNamePair function() { return new KeyNamePair(get_ID(), getName()); } | /** Get Record ID/ColumnName
@return ID/ColumnName pair
*/ | Get Record ID/ColumnName | getKeyNamePair | {
"repo_name": "klst-com/metasfresh",
"path": "de.metas.adempiere.adempiere/base/src/main/java-gen/org/compiere/model/X_AD_Client.java",
"license": "gpl-2.0",
"size": 16942
} | [
"org.compiere.util.KeyNamePair"
] | import org.compiere.util.KeyNamePair; | import org.compiere.util.*; | [
"org.compiere.util"
] | org.compiere.util; | 987,960 |
public void testMonitorNormalFile() throws IOException
{
File testFile = File.createTempFile("testMonitorFile", ".log");
testFile.deleteOnExit();
//Ensure that we can create a monitor on a file
try
{
_monitor = new LogMonitor(testFile);
assertEqua... | void function() throws IOException { File testFile = File.createTempFile(STR, ".log"); testFile.deleteOnExit(); try { _monitor = new LogMonitor(testFile); assertEquals(testFile, _monitor.getMonitoredFile()); } catch (IOException ioe) { fail(STR + ioe); } } | /**
* Test that creation of a monitor on an existing file is possible
*
* This also tests taht getMonitoredFile works
*
* @throws IOException if there is a problem creating the temporary file
*/ | Test that creation of a monitor on an existing file is possible This also tests taht getMonitoredFile works | testMonitorNormalFile | {
"repo_name": "wso2/andes",
"path": "modules/andes-core/systests/src/main/java/org/wso2/andes/util/LogMonitorTest.java",
"license": "apache-2.0",
"size": 8449
} | [
"java.io.File",
"java.io.IOException"
] | import java.io.File; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,760,743 |
String clientName = socket.getInetAddress().toString();
try {
server.broadcast(new TextMessage(clientName + " has joined."));
while (connectionOpen) {
try {
Object msg = inputStream.readObject();
handleIncomingMessage(clientName, msg);
} catch (ClassNotFoundException e) {
e.prin... | String clientName = socket.getInetAddress().toString(); try { server.broadcast(new TextMessage(clientName + STR)); while (connectionOpen) { try { Object msg = inputStream.readObject(); handleIncomingMessage(clientName, msg); } catch (ClassNotFoundException e) { e.printStackTrace(); } } } catch (IOException ex) { if (!e... | /**
* waits for incoming messages from the socket
*/ | waits for incoming messages from the socket | run | {
"repo_name": "SergiyKolesnikov/fuji",
"path": "examples/Chat_casestudies/chat-thuem/build/FullGUI/Connection.java",
"license": "lgpl-3.0",
"size": 2932
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,827,368 |
CollectionMetricTokenizerStep<T> transform(
Function<String, String> function); | CollectionMetricTokenizerStep<T> transform( Function<String, String> function); | /**
* Adds a transform step to the metric. All tokens are transformed by
* the function. The function may not return null.
*
* @param function
* a function to transform tokens
* @return this for fluent chaining
*/ | Adds a transform step to the metric. All tokens are transformed by the function. The function may not return null | transform | {
"repo_name": "mpkorstanje/simmetrics",
"path": "simmetrics-core/src/main/java/com/github/mpkorstanje/simmetrics/builders/StringMetricBuilder.java",
"license": "apache-2.0",
"size": 18033
} | [
"java.util.function.Function"
] | import java.util.function.Function; | import java.util.function.*; | [
"java.util"
] | java.util; | 3,935 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.