method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
private void jButton3ActionPerformed(final java.awt.event.ActionEvent evt) //GEN-FIRST:event_jButton3ActionPerformed
{ //GEN-HEADEREND:event_jButton3ActionPerformed
for (final Object o : jXList2.getSelectedValuesList()) {
... | void function(final java.awt.event.ActionEvent evt) { for (final Object o : jXList2.getSelectedValuesList()) { ((DefaultListModel)jXList2.getModel()).removeElement(o); } } | /**
* DOCUMENT ME!
*
* @param evt DOCUMENT ME!
*/ | DOCUMENT ME | jButton3ActionPerformed | {
"repo_name": "cismet/cids-custom-crisma-pilot-d",
"path": "src/main/java/de/cismet/cids/custom/crisma/pilotD/model/ChooseModelVisualPanel.java",
"license": "lgpl-3.0",
"size": 20404
} | [
"java.awt.event.ActionEvent",
"javax.swing.DefaultListModel"
] | import java.awt.event.ActionEvent; import javax.swing.DefaultListModel; | import java.awt.event.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 1,176,670 |
SecurityContext securityContext = SecurityContextHolder.getContext();
return Optional.ofNullable(securityContext.getAuthentication())
.map(authentication -> {
if (authentication.getPrincipal() instanceof UserDetails) {
UserDetails springSecurityUser = (UserDetails... | SecurityContext securityContext = SecurityContextHolder.getContext(); return Optional.ofNullable(securityContext.getAuthentication()) .map(authentication -> { if (authentication.getPrincipal() instanceof UserDetails) { UserDetails springSecurityUser = (UserDetails) authentication.getPrincipal(); return springSecurityUs... | /**
* Get the login of the current user.
*
* @return the login of the current user
*/ | Get the login of the current user | getCurrentUserLogin | {
"repo_name": "iMartinezMateu/gamecraft",
"path": "gamecraft-pipeline-manager/src/main/java/com/gamecraft/security/SecurityUtils.java",
"license": "mit",
"size": 2973
} | [
"java.util.Optional",
"org.springframework.security.core.context.SecurityContext",
"org.springframework.security.core.context.SecurityContextHolder",
"org.springframework.security.core.userdetails.UserDetails"
] | import java.util.Optional; import org.springframework.security.core.context.SecurityContext; import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.core.userdetails.UserDetails; | import java.util.*; import org.springframework.security.core.context.*; import org.springframework.security.core.userdetails.*; | [
"java.util",
"org.springframework.security"
] | java.util; org.springframework.security; | 1,560,136 |
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
return new SystemUiHiderHoneycomb(activity, anchorView, flags);
} else {
return new SystemUiHiderBase(activity, anchorView, flags);
}
}
protected SystemUiHider(Activity activity, View anchorView, int flags) {
... | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) { return new SystemUiHiderHoneycomb(activity, anchorView, flags); } else { return new SystemUiHiderBase(activity, anchorView, flags); } } protected SystemUiHider(Activity activity, View anchorView, int flags) { mActivity = activity; mAnchorView = anchorView; m... | /**
* Creates and returns an instance of {@link SystemUiHider} that is
* appropriate for this device. The object will be either a
* {@link SystemUiHiderBase} or {@link SystemUiHiderHoneycomb} depending on
* the device.
*
* @param activity The activity whose window's system UI should be
... | Creates and returns an instance of <code>SystemUiHider</code> that is appropriate for this device. The object will be either a <code>SystemUiHiderBase</code> or <code>SystemUiHiderHoneycomb</code> depending on the device | getInstance | {
"repo_name": "basking2/airqso",
"path": "AirQso/src/main/java/org/sdsai/airqso/util/SystemUiHider.java",
"license": "mit",
"size": 5809
} | [
"android.app.Activity",
"android.os.Build",
"android.view.View"
] | import android.app.Activity; import android.os.Build; import android.view.View; | import android.app.*; import android.os.*; import android.view.*; | [
"android.app",
"android.os",
"android.view"
] | android.app; android.os; android.view; | 2,703,319 |
public boolean isValid( Object value ) throws ValidationException
{
// TODO: look into whether null is ever a valid value. for now we assume "no".
if( value == null )
{
throw new ValidationException( getErrorBoxTitle(), getErrorBoxText() );
}
if( !isCorrectDataType( value ) )
{
throw new Valida... | boolean function( Object value ) throws ValidationException { if( value == null ) { throw new ValidationException( getErrorBoxTitle(), getErrorBoxText() ); } if( !isCorrectDataType( value ) ) { throw new ValidationException( getErrorBoxTitle(), getErrorBoxText() ); } if( value instanceof Date ) { double d = DateConvert... | /**
* Determine if the value passed in is valid for
* this validation
*
* @param value
* @return
*/ | Determine if the value passed in is valid for this validation | isValid | {
"repo_name": "Maxels88/openxls",
"path": "src/main/java/org/openxls/formats/XLS/Dv.java",
"license": "gpl-3.0",
"size": 42816
} | [
"java.util.Date",
"org.openxls.ExtenXLS"
] | import java.util.Date; import org.openxls.ExtenXLS; | import java.util.*; import org.openxls.*; | [
"java.util",
"org.openxls"
] | java.util; org.openxls; | 1,202,305 |
logger.info("Chii2 Home Automation Server Init.");
// With a valid set of arguments, the real work of
// driving the client API can begin
try {
// Perform the specified action
connect();
subscribe("/Chii2/Server", 1);
publish("/Chii2/Server", 1, "H... | logger.info(STR); try { connect(); subscribe(STR, 1); publish(STR, 1, STR.getBytes()); publish(STR, 1, STR.getBytes()); publish(STR, 1, STR.getBytes()); publish(STR, 1, STR.getBytes()); publish(STR, 1, STR.getBytes()); } catch (MqttException me) { System.out.println(STR + me.getReasonCode()); System.out.println(STR + m... | /**
* OSGi life cycle init
*/ | OSGi life cycle init | init | {
"repo_name": "longkerdandy/chii2mqtt",
"path": "chii2.mqtt.server.sample/src/main/java/org/chii2/mqtt/server/sample/OSGiClient.java",
"license": "apache-2.0",
"size": 1988
} | [
"org.eclipse.paho.client.mqttv3.MqttException"
] | import org.eclipse.paho.client.mqttv3.MqttException; | import org.eclipse.paho.client.mqttv3.*; | [
"org.eclipse.paho"
] | org.eclipse.paho; | 2,354,963 |
public List<Taxon> getSpeciesByTaxonList(
List<Taxon> taxonList,
int offset,
int quantity); | List<Taxon> function( List<Taxon> taxonList, int offset, int quantity); | /**
* Return species associated with any Taxon in taxonList
* @param taxonList list of taxon to search in...
* @return
*/ | Return species associated with any Taxon in taxonList | getSpeciesByTaxonList | {
"repo_name": "INBio/NeoPortal",
"path": "neoportal-core/src/main/java/org/inbio/neoportal/core/dao/TaxonDAO.java",
"license": "gpl-3.0",
"size": 4223
} | [
"java.util.List",
"org.inbio.neoportal.core.entity.Taxon"
] | import java.util.List; import org.inbio.neoportal.core.entity.Taxon; | import java.util.*; import org.inbio.neoportal.core.entity.*; | [
"java.util",
"org.inbio.neoportal"
] | java.util; org.inbio.neoportal; | 2,878,908 |
public static MessageDialog newInstance(int icon, String title, String message, Fragment fragment) {
MessageDialog confirmDialog = new MessageDialog();
Bundle args = new Bundle();
args.putInt(ARG_ICON, icon);
args.putString(ARG_TITLE, title);
args.putString(ARG_MESSAGE, message);
confirmDialog.setArgumen... | static MessageDialog function(int icon, String title, String message, Fragment fragment) { MessageDialog confirmDialog = new MessageDialog(); Bundle args = new Bundle(); args.putInt(ARG_ICON, icon); args.putString(ARG_TITLE, title); args.putString(ARG_MESSAGE, message); confirmDialog.setArguments(args); if (fragment !=... | /**
* Use from Activities.
*
* @param icon dialog icon
* @param title dialog title
* @param message dialog message
* @param fragment target fragment
* @return a new instance of MessageDialog
*/ | Use from Activities | newInstance | {
"repo_name": "weiwenqiang/GitHub",
"path": "ListView/FlexibleAdapter-master/flexible-adapter-app/src/main/java/eu/davidea/samples/flexibleadapter/dialogs/MessageDialog.java",
"license": "apache-2.0",
"size": 2668
} | [
"android.app.Fragment",
"android.os.Bundle"
] | import android.app.Fragment; import android.os.Bundle; | import android.app.*; import android.os.*; | [
"android.app",
"android.os"
] | android.app; android.os; | 2,093,137 |
void expireTheEventOrThreadIdentifier(EntryEvent event) throws CacheException {
final boolean isDebugEnabled = logger.isDebugEnabled();
if (isDebugEnabled) {
logger.debug(
"HARegionQueue::afterInvalidate. Entry Event being invalidated:{}, isPrimaryQueue:{}",
event, HARegionQueue.this... | void expireTheEventOrThreadIdentifier(EntryEvent event) throws CacheException { final boolean isDebugEnabled = logger.isDebugEnabled(); if (isDebugEnabled) { logger.debug( STR, event, HARegionQueue.this.isPrimary()); } Object key = event.getKey(); if (key instanceof ThreadIdentifier) { DispatchedAndCurrentEvents dace =... | /**
* This function is invoked by the createCacheListenerForHARegion for theHARegionQueue & also by
* overridden function createCacheListenerForHARegion of the HARegionQueueJUnitTest class for the
* test testConcurrentEventExpiryAndTake. This function provides the meaningful functionality for
* expiry of th... | This function is invoked by the createCacheListenerForHARegion for theHARegionQueue & also by overridden function createCacheListenerForHARegion of the HARegionQueueJUnitTest class for the test testConcurrentEventExpiryAndTake. This function provides the meaningful functionality for expiry of the Event object as well a... | expireTheEventOrThreadIdentifier | {
"repo_name": "charliemblack/geode",
"path": "geode-core/src/main/java/org/apache/geode/internal/cache/ha/HARegionQueue.java",
"license": "apache-2.0",
"size": 141169
} | [
"org.apache.geode.cache.CacheException",
"org.apache.geode.cache.EntryEvent",
"org.apache.geode.internal.Assert",
"org.apache.geode.internal.cache.Conflatable",
"org.apache.geode.internal.cache.EventID"
] | import org.apache.geode.cache.CacheException; import org.apache.geode.cache.EntryEvent; import org.apache.geode.internal.Assert; import org.apache.geode.internal.cache.Conflatable; import org.apache.geode.internal.cache.EventID; | import org.apache.geode.cache.*; import org.apache.geode.internal.*; import org.apache.geode.internal.cache.*; | [
"org.apache.geode"
] | org.apache.geode; | 1,854,742 |
public PactDslJsonArray or(Object value, MatchingRule... rules) {
if (value != null) {
body.put(value);
} else {
body.put(JSONObject.NULL);
}
matchers.setRules(rootPath + appendArrayIndex(0), new MatchingRuleGroup(Arrays.asList(rules), RuleLogic.OR));
return this;
} | PactDslJsonArray function(Object value, MatchingRule... rules) { if (value != null) { body.put(value); } else { body.put(JSONObject.NULL); } matchers.setRules(rootPath + appendArrayIndex(0), new MatchingRuleGroup(Arrays.asList(rules), RuleLogic.OR)); return this; } | /**
* Combine all the matchers using OR
* @param value Attribute example value
* @param rules Matching rules to apply
*/ | Combine all the matchers using OR | or | {
"repo_name": "DiUS/pact-jvm",
"path": "consumer/src/main/java/au/com/dius/pact/consumer/dsl/PactDslJsonArray.java",
"license": "apache-2.0",
"size": 45650
} | [
"au.com.dius.pact.core.model.matchingrules.MatchingRule",
"au.com.dius.pact.core.model.matchingrules.MatchingRuleGroup",
"au.com.dius.pact.core.model.matchingrules.RuleLogic",
"java.util.Arrays",
"org.json.JSONObject"
] | import au.com.dius.pact.core.model.matchingrules.MatchingRule; import au.com.dius.pact.core.model.matchingrules.MatchingRuleGroup; import au.com.dius.pact.core.model.matchingrules.RuleLogic; import java.util.Arrays; import org.json.JSONObject; | import au.com.dius.pact.core.model.matchingrules.*; import java.util.*; import org.json.*; | [
"au.com.dius",
"java.util",
"org.json"
] | au.com.dius; java.util; org.json; | 1,586,180 |
public List<DmDependencyTO> getDirectDependencies() {
List<DmDependencyTO> dependencyTO = new FastList<DmDependencyTO>();
if(_components!=null)
dependencyTO.addAll(_components);
if(_documents!=null)
dependencyTO.addAll(_documents);
if(_assets!=null)
dependencyTO.add... | List<DmDependencyTO> function() { List<DmDependencyTO> dependencyTO = new FastList<DmDependencyTO>(); if(_components!=null) dependencyTO.addAll(_components); if(_documents!=null) dependencyTO.addAll(_documents); if(_assets!=null) dependencyTO.addAll(_assets); if (_levelDescriptors != null) dependencyTO.addAll(_levelDes... | /**
* Return Component, Documents and Assets direct dependencies unlike the _flattenChildren
*
* @return
*/ | Return Component, Documents and Assets direct dependencies unlike the _flattenChildren | getDirectDependencies | {
"repo_name": "hlim/studio",
"path": "alfresco-svcs/src/main/java/org/craftercms/cstudio/alfresco/dm/to/DmDependencyTO.java",
"license": "gpl-3.0",
"size": 9743
} | [
"java.util.List",
"javolution.util.FastList"
] | import java.util.List; import javolution.util.FastList; | import java.util.*; import javolution.util.*; | [
"java.util",
"javolution.util"
] | java.util; javolution.util; | 2,003,527 |
private void initilizeMap() {
if (googleMap == null) {
googleMap = ((MapFragment) getFragmentManager().findFragmentById(
R.id.map)).getMap();
// googleMap.setMyLocationEnabled(true);
googleMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);
googleMap.getUiSettings().setCompassEnabled(false);
googleMap.g... | void function() { if (googleMap == null) { googleMap = ((MapFragment) getFragmentManager().findFragmentById( R.id.map)).getMap(); googleMap.setMapType(GoogleMap.MAP_TYPE_NORMAL); googleMap.getUiSettings().setCompassEnabled(false); googleMap.getUiSettings().setZoomControlsEnabled(false); if (latitude != 0 && longitude !... | /**
* function to load map. If map is not created it will create it for you
*
* @param storeModelList2
* */ | function to load map. If map is not created it will create it for you | initilizeMap | {
"repo_name": "Jayconsystems/Hiro-App-Android",
"path": "HiroApp/src/com/hiroapp/main/MapActivity.java",
"license": "apache-2.0",
"size": 2994
} | [
"android.widget.Toast",
"com.google.android.gms.maps.GoogleMap",
"com.google.android.gms.maps.MapFragment",
"com.google.android.gms.maps.model.LatLng",
"com.google.android.gms.maps.model.MarkerOptions"
] | import android.widget.Toast; import com.google.android.gms.maps.GoogleMap; import com.google.android.gms.maps.MapFragment; import com.google.android.gms.maps.model.LatLng; import com.google.android.gms.maps.model.MarkerOptions; | import android.widget.*; import com.google.android.gms.maps.*; import com.google.android.gms.maps.model.*; | [
"android.widget",
"com.google.android"
] | android.widget; com.google.android; | 2,757,499 |
public static <T> HandlerRegistration registerWithoutTransaction(String key, Consumer<T> handler) {
return registerWithoutTransaction(key, new LambdaHandler<T>(handler));
} | static <T> HandlerRegistration function(String key, Consumer<T> handler) { return registerWithoutTransaction(key, new LambdaHandler<T>(handler)); } | /**
* Registers the given {@link Consumer} as a handler for events, with the same semantics as
* {@link #registerWithoutTransaction(String, Object)}.
*
* The advantage of this method is that it is lambda-ready, removing the necessity of creating an {@link EventBus} compatible
* class.
*
... | Registers the given <code>Consumer</code> as a handler for events, with the same semantics as <code>#registerWithoutTransaction(String, Object)</code>. The advantage of this method is that it is lambda-ready, removing the necessity of creating an <code>EventBus</code> compatible class | registerWithoutTransaction | {
"repo_name": "nurv/bennu-signals",
"path": "src/main/java/org/fenixedu/bennu/signals/Signal.java",
"license": "lgpl-2.1",
"size": 9727
} | [
"java.util.function.Consumer"
] | import java.util.function.Consumer; | import java.util.function.*; | [
"java.util"
] | java.util; | 2,625,028 |
protected String getLocalizationBundlePath() {
return LocalizationBundle.GENERAL_BUNDLE_NAME;
} | String function() { return LocalizationBundle.GENERAL_BUNDLE_NAME; } | /**
* Gets the path of the localization bundle to load. By default, returns the general translations.
* For more specific localized text to use in the notification, override this method.
* @return the path of the localization bundle.
*/ | Gets the path of the localization bundle to load. By default, returns the general translations. For more specific localized text to use in the notification, override this method | getLocalizationBundlePath | {
"repo_name": "SilverDav/Silverpeas-Core",
"path": "core-library/src/main/java/org/silverpeas/core/notification/user/builder/AbstractUserNotificationBuilder.java",
"license": "agpl-3.0",
"size": 15290
} | [
"org.silverpeas.core.util.LocalizationBundle"
] | import org.silverpeas.core.util.LocalizationBundle; | import org.silverpeas.core.util.*; | [
"org.silverpeas.core"
] | org.silverpeas.core; | 252,758 |
@NonNull
public String format(double amount, @NonNull Unit unit) {
return formatValueUnit(decimalFormat.format(amount), getUnitName(unit));
} | String function(double amount, @NonNull Unit unit) { return formatValueUnit(decimalFormat.format(amount), getUnitName(unit)); } | /**
* Formats amount as "{amount} {unit_name}"
*/ | Formats amount as "{amount} {unit_name}" | format | {
"repo_name": "st1hy/Count-Them-Calories",
"path": "app/src/main/java/com/github/st1hy/countthemcalories/activities/addmeal/model/PhysicalQuantitiesModel.java",
"license": "mit",
"size": 9738
} | [
"android.support.annotation.NonNull",
"com.github.st1hy.countthemcalories.database.unit.Unit"
] | import android.support.annotation.NonNull; import com.github.st1hy.countthemcalories.database.unit.Unit; | import android.support.annotation.*; import com.github.st1hy.countthemcalories.database.unit.*; | [
"android.support",
"com.github.st1hy"
] | android.support; com.github.st1hy; | 2,043,950 |
void updateLocalRepository( LocalRepository repository )
throws RepositoryServiceException; | void updateLocalRepository( LocalRepository repository ) throws RepositoryServiceException; | /**
* Update the local repository
*
* @param repository the local repository to update
* @throws RepositoryServiceException
*/ | Update the local repository | updateLocalRepository | {
"repo_name": "apache/continuum",
"path": "continuum-api/src/main/java/org/apache/continuum/repository/RepositoryService.java",
"license": "apache-2.0",
"size": 3452
} | [
"org.apache.continuum.model.repository.LocalRepository"
] | import org.apache.continuum.model.repository.LocalRepository; | import org.apache.continuum.model.repository.*; | [
"org.apache.continuum"
] | org.apache.continuum; | 2,718,751 |
public Account getCashOffsetAccount() {
return cashOffsetAccount;
} | Account function() { return cashOffsetAccount; } | /**
* Gets the cashOffsetAccount attribute.
*
* @return Returns the cashOffsetAccount.
*/ | Gets the cashOffsetAccount attribute | getCashOffsetAccount | {
"repo_name": "Ariah-Group/Finance",
"path": "af_webapp/src/main/java/org/kuali/kfs/sys/businessobject/Bank.java",
"license": "apache-2.0",
"size": 13563
} | [
"org.kuali.kfs.coa.businessobject.Account"
] | import org.kuali.kfs.coa.businessobject.Account; | import org.kuali.kfs.coa.businessobject.*; | [
"org.kuali.kfs"
] | org.kuali.kfs; | 1,084,829 |
private void initEJB() {
if (versioning_bm == null) {
try {
VersioningBmHome vscEjbHome = EJBUtilitaire.getEJBObjectRef(
JNDINames.VERSIONING_EJBHOME, VersioningBmHome.class);
versioning_bm = vscEjbHome.create();
} catch (Exception e) {
throw new VersioningRuntimeEx... | void function() { if (versioning_bm == null) { try { VersioningBmHome vscEjbHome = EJBUtilitaire.getEJBObjectRef( JNDINames.VERSIONING_EJBHOME, VersioningBmHome.class); versioning_bm = vscEjbHome.create(); } catch (Exception e) { throw new VersioningRuntimeException( STR, SilverTrace.TRACE_LEVEL_ERROR, STR, e); } } } | /**
* to initilize the Versioning EJB
* @exception VersioningRuntimeException when can't initialized the home object of EJB Versioning
*/ | to initilize the Versioning EJB | initEJB | {
"repo_name": "NicolasEYSSERIC/Silverpeas-Core",
"path": "war-core/src/main/java/com/stratelia/silverpeas/versioningPeas/control/VersioningSessionController.java",
"license": "agpl-3.0",
"size": 61070
} | [
"com.stratelia.silverpeas.silvertrace.SilverTrace",
"com.stratelia.silverpeas.versioning.ejb.VersioningBmHome",
"com.stratelia.silverpeas.versioning.ejb.VersioningRuntimeException",
"com.stratelia.webactiv.util.EJBUtilitaire",
"com.stratelia.webactiv.util.JNDINames"
] | import com.stratelia.silverpeas.silvertrace.SilverTrace; import com.stratelia.silverpeas.versioning.ejb.VersioningBmHome; import com.stratelia.silverpeas.versioning.ejb.VersioningRuntimeException; import com.stratelia.webactiv.util.EJBUtilitaire; import com.stratelia.webactiv.util.JNDINames; | import com.stratelia.silverpeas.silvertrace.*; import com.stratelia.silverpeas.versioning.ejb.*; import com.stratelia.webactiv.util.*; | [
"com.stratelia.silverpeas",
"com.stratelia.webactiv"
] | com.stratelia.silverpeas; com.stratelia.webactiv; | 930,308 |
public String getTrapped()
{
return info.getNameAsString( COSName.TRAPPED );
} | String function() { return info.getNameAsString( COSName.TRAPPED ); } | /**
* This will get the trapped value for the document.
* This will return null if one is not found.
*
* @return The trapped value for the document.
*/ | This will get the trapped value for the document. This will return null if one is not found | getTrapped | {
"repo_name": "myrridin/qz-print",
"path": "pdfbox_1.8.4_qz/src/org/apache/pdfbox/pdmodel/PDDocumentInformation.java",
"license": "lgpl-2.1",
"size": 8591
} | [
"org.apache.pdfbox.cos.COSName"
] | import org.apache.pdfbox.cos.COSName; | import org.apache.pdfbox.cos.*; | [
"org.apache.pdfbox"
] | org.apache.pdfbox; | 2,762,269 |
//-----------------------------------------------------------------------
public DoubleArray getParameters() {
return parameters;
} | DoubleArray function() { return parameters; } | /**
* Gets the model parameters.
* <p>
* This must be an array of length 4.
* The parameters in the array are in the order of alpha, beta, rho and nu.
* The constraints for the parameters are defined in {@link #isAllowed(int, double)}.
* @return the value of the property, not null
*/ | Gets the model parameters. This must be an array of length 4. The parameters in the array are in the order of alpha, beta, rho and nu. The constraints for the parameters are defined in <code>#isAllowed(int, double)</code> | getParameters | {
"repo_name": "OpenGamma/Strata",
"path": "modules/pricer/src/main/java/com/opengamma/strata/pricer/impl/volatility/smile/SabrFormulaData.java",
"license": "apache-2.0",
"size": 7467
} | [
"com.opengamma.strata.collect.array.DoubleArray"
] | import com.opengamma.strata.collect.array.DoubleArray; | import com.opengamma.strata.collect.array.*; | [
"com.opengamma.strata"
] | com.opengamma.strata; | 334,821 |
public static <T extends DataSet> void assertCanWrite( T dataSet ) throws AuthorizationException {
SecurityUtil.assertCan( dataSet, "You are not permitted to write/delete this data set", ProtectionType.WRITE );
} | static <T extends DataSet> void function( T dataSet ) throws AuthorizationException { SecurityUtil.assertCan( dataSet, STR, ProtectionType.WRITE ); } | /**
* Assert that current user has write right for provided data set,
* exception is being thrown otherwise. <br />
* <b>Please note:</b> This only checks on permission level, no release management
* is being considered!
*
* @param <T>
* data set type
* @param dataSet
* data set... | Assert that current user has write right for provided data set, exception is being thrown otherwise. Please note: This only checks on permission level, no release management is being considered | assertCanWrite | {
"repo_name": "PE-INTERNATIONAL/soda4lca",
"path": "Node/src/main/java/de/iai/ilcd/security/SecurityUtil.java",
"license": "gpl-3.0",
"size": 15791
} | [
"de.iai.ilcd.model.common.DataSet",
"org.apache.shiro.authz.AuthorizationException"
] | import de.iai.ilcd.model.common.DataSet; import org.apache.shiro.authz.AuthorizationException; | import de.iai.ilcd.model.common.*; import org.apache.shiro.authz.*; | [
"de.iai.ilcd",
"org.apache.shiro"
] | de.iai.ilcd; org.apache.shiro; | 1,483,548 |
private void executeQuery()
{
log.info("");
statusBar.setStatusLine("");
int AD_Client_ID = Env.getAD_Client_ID(Env.getCtx());
// Create SQL
int index = 0;
Timestamp startDate = Env.getContextAsDate(Env.getCtx(), "#Date");
Timestamp actualDate = Env.getContextAsDate(Env.getCtx(), "#Date");... | void function() { log.info(STRSTR#DateSTR#DateSTRSELECT distinct i.C_Invoice_ID, o.Name, i.DocumentNo, nf.DocumentNo, bp.Name, pt.Name, min(i.DateInvoiced) as DateInvoiced, i.GrandTotal STRFROM C_Invoice i STRINNER JOIN AD_Org o ON i.AD_Org_ID=o.AD_Org_ID STRINNER JOIN C_DocType d ON i.C_DocTypeTarget_ID=d.C_DocType_ID... | /**
* Query Info
*/ | Query Info | executeQuery | {
"repo_name": "arthurmelo88/palmetalADP",
"path": "palmetal_to_lbrk/boleto/src/org/adempierelbr/apps/form/VFormBoleto.java",
"license": "gpl-2.0",
"size": 24199
} | [
"java.sql.PreparedStatement",
"java.sql.ResultSet",
"java.sql.SQLException",
"java.sql.Timestamp",
"java.util.logging.Level",
"org.compiere.minigrid.IDColumn",
"org.compiere.util.DB"
] | import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Timestamp; import java.util.logging.Level; import org.compiere.minigrid.IDColumn; import org.compiere.util.DB; | import java.sql.*; import java.util.logging.*; import org.compiere.minigrid.*; import org.compiere.util.*; | [
"java.sql",
"java.util",
"org.compiere.minigrid",
"org.compiere.util"
] | java.sql; java.util; org.compiere.minigrid; org.compiere.util; | 1,495,236 |
public IniDefinition addUnsupported(String name, String deflt, int scope)
{
return addUnsupported(name,
IniDefinition.Type.STRING,
StringValue.create(deflt),
scope);
} | IniDefinition function(String name, String deflt, int scope) { return addUnsupported(name, IniDefinition.Type.STRING, StringValue.create(deflt), scope); } | /**
* Add an unsupported ini default for an ini that has a string value.
*/ | Add an unsupported ini default for an ini that has a string value | addUnsupported | {
"repo_name": "dwango/quercus",
"path": "src/main/java/com/caucho/quercus/module/IniDefinitions.java",
"license": "gpl-2.0",
"size": 5141
} | [
"com.caucho.quercus.env.StringValue"
] | import com.caucho.quercus.env.StringValue; | import com.caucho.quercus.env.*; | [
"com.caucho.quercus"
] | com.caucho.quercus; | 1,907,685 |
@SimpleFunction(description = "Toggle the direction of motors.")
public void ToggleDirection() {
String functionName = "ToggleDirection";
try {
setOutputDirection(functionName, 0, motorPortBitField, 0); // assume layer = 0
directionReversed = !directionReversed;
} catch (IllegalArgumentExcep... | @SimpleFunction(description = STR) void function() { String functionName = STR; try { setOutputDirection(functionName, 0, motorPortBitField, 0); directionReversed = !directionReversed; } catch (IllegalArgumentException e) { form.dispatchErrorOccurredEvent(this, functionName, ErrorMessages.ERROR_EV3_ILLEGAL_ARGUMENT, fu... | /**
* Toggle the direction of motors.
*/ | Toggle the direction of motors | ToggleDirection | {
"repo_name": "ewpatton/appinventor-sources",
"path": "appinventor/components/src/com/google/appinventor/components/runtime/Ev3Motors.java",
"license": "apache-2.0",
"size": 31217
} | [
"com.google.appinventor.components.annotations.SimpleFunction",
"com.google.appinventor.components.runtime.util.ErrorMessages"
] | import com.google.appinventor.components.annotations.SimpleFunction; import com.google.appinventor.components.runtime.util.ErrorMessages; | import com.google.appinventor.components.annotations.*; import com.google.appinventor.components.runtime.util.*; | [
"com.google.appinventor"
] | com.google.appinventor; | 1,227,592 |
@Nullable
private static String getIkePhase1Policy(
Map<String, IkePhase1Policy> ikePhase1Policies, Ip remoteAddress, String localInterface) {
for (Entry<String, IkePhase1Policy> e : ikePhase1Policies.entrySet()) {
IkePhase1Policy ikePhase1Policy = e.getValue();
String ikePhase1PolicyLocalInte... | static String function( Map<String, IkePhase1Policy> ikePhase1Policies, Ip remoteAddress, String localInterface) { for (Entry<String, IkePhase1Policy> e : ikePhase1Policies.entrySet()) { IkePhase1Policy ikePhase1Policy = e.getValue(); String ikePhase1PolicyLocalInterface = ikePhase1Policy.getLocalInterface(); IpSpace r... | /**
* Returns the first {@link IkePhase1Policy} name matching {@code remoteAddress} and {@code
* localInterface}, null is returned if no matching {@link IkePhase1Policy} could not be found
*/ | Returns the first <code>IkePhase1Policy</code> name matching remoteAddress and localInterface, null is returned if no matching <code>IkePhase1Policy</code> could not be found | getIkePhase1Policy | {
"repo_name": "dhalperi/batfish",
"path": "projects/batfish/src/main/java/org/batfish/representation/cisco_asa/AsaConversions.java",
"license": "apache-2.0",
"size": 86628
} | [
"com.google.common.base.MoreObjects",
"com.google.common.collect.ImmutableMap",
"java.util.Map",
"org.batfish.datamodel.EmptyIpSpace",
"org.batfish.datamodel.IkePhase1Policy",
"org.batfish.datamodel.Ip",
"org.batfish.datamodel.IpSpace"
] | import com.google.common.base.MoreObjects; import com.google.common.collect.ImmutableMap; import java.util.Map; import org.batfish.datamodel.EmptyIpSpace; import org.batfish.datamodel.IkePhase1Policy; import org.batfish.datamodel.Ip; import org.batfish.datamodel.IpSpace; | import com.google.common.base.*; import com.google.common.collect.*; import java.util.*; import org.batfish.datamodel.*; | [
"com.google.common",
"java.util",
"org.batfish.datamodel"
] | com.google.common; java.util; org.batfish.datamodel; | 1,197,208 |
private Color createColor(RGB rgb) {
if (this.display == null) {
Display display = Display.getCurrent();
if (display == null) {
throw new IllegalStateException();
}
this.display = display;
if (cleanOnDisplayDisposal) {
hookDisplayDispose();
}
}
ret... | Color function(RGB rgb) { if (this.display == null) { Display display = Display.getCurrent(); if (display == null) { throw new IllegalStateException(); } this.display = display; if (cleanOnDisplayDisposal) { hookDisplayDispose(); } } return new Color(display, rgb); } | /**
* Create a new <code>Color</code> on the receivers <code>Display</code>.
*
* @param rgb the <code>RGB</code> data for the color.
* @return the new <code>Color</code> object.
*
* @since 3.1
*/ | Create a new <code>Color</code> on the receivers <code>Display</code> | createColor | {
"repo_name": "ghillairet/gef-gwt",
"path": "src/main/java/org/eclipse/jface/resource/ColorRegistry.java",
"license": "epl-1.0",
"size": 9938
} | [
"org.eclipse.swt.graphics.Color",
"org.eclipse.swt.widgets.Display"
] | import org.eclipse.swt.graphics.Color; import org.eclipse.swt.widgets.Display; | import org.eclipse.swt.graphics.*; import org.eclipse.swt.widgets.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 2,644,446 |
public List<PortalGroup> toPortalGroupList(
final Object[] groupArrayList) {
List<PortalGroup> result = new ArrayList<PortalGroup>();
for (Object groupArrayItem : groupArrayList) {
Object[] groupArray = (Object[]) groupArrayItem;
result.add(toPortalGroup(groupArray));
}
return result;
}
| List<PortalGroup> function( final Object[] groupArrayList) { List<PortalGroup> result = new ArrayList<PortalGroup>(); for (Object groupArrayItem : groupArrayList) { Object[] groupArray = (Object[]) groupArrayItem; result.add(toPortalGroup(groupArray)); } return result; } | /**
* Convert an array into a list of PortalGroup.
* @param groupArrayList
* @return the converted value.
*/ | Convert an array into a list of PortalGroup | toPortalGroupList | {
"repo_name": "vbonamy/esup-uportal",
"path": "uportal-war/src/main/java/org/esupportail/portal/ws/client/support/uportal/BasicUportalServiceImpl.java",
"license": "apache-2.0",
"size": 11612
} | [
"java.util.ArrayList",
"java.util.List",
"org.esupportail.portal.ws.client.PortalGroup"
] | import java.util.ArrayList; import java.util.List; import org.esupportail.portal.ws.client.PortalGroup; | import java.util.*; import org.esupportail.portal.ws.client.*; | [
"java.util",
"org.esupportail.portal"
] | java.util; org.esupportail.portal; | 134,697 |
void addPropertyChangeListener(String propertyName, IPropertyChangeListener<?> listener); | void addPropertyChangeListener(String propertyName, IPropertyChangeListener<?> listener); | /**
* Registers the given {@link IPropertyChangeListener} for the specified property. The listener
* will be notified only for changes to the specified property.
*
* @param propertyName The name of the property for which the listener was registered
* @param listener The listener to be notified ... | Registers the given <code>IPropertyChangeListener</code> for the specified property. The listener will be notified only for changes to the specified property | addPropertyChangeListener | {
"repo_name": "RallySoftware/eclipselink.runtime",
"path": "jpa/org.eclipse.persistence.jpa.jpql/src/org/eclipse/persistence/jpa/jpql/tools/model/query/StateObject.java",
"license": "epl-1.0",
"size": 8494
} | [
"org.eclipse.persistence.jpa.jpql.tools.model.IPropertyChangeListener"
] | import org.eclipse.persistence.jpa.jpql.tools.model.IPropertyChangeListener; | import org.eclipse.persistence.jpa.jpql.tools.model.*; | [
"org.eclipse.persistence"
] | org.eclipse.persistence; | 556,057 |
public List<T> execute(String p1, Map context) throws DataAccessException {
return execute(new Object[] {p1}, context);
} | List<T> function(String p1, Map context) throws DataAccessException { return execute(new Object[] {p1}, context); } | /**
* Convenient method to execute with a single String parameter and context.
* @param p1 single String parameter
* @param context the contextual information for object creation
*/ | Convenient method to execute with a single String parameter and context | execute | {
"repo_name": "kingtang/spring-learn",
"path": "spring-jdbc/src/main/java/org/springframework/jdbc/object/SqlQuery.java",
"license": "gpl-3.0",
"size": 13142
} | [
"java.util.List",
"java.util.Map",
"org.springframework.dao.DataAccessException"
] | import java.util.List; import java.util.Map; import org.springframework.dao.DataAccessException; | import java.util.*; import org.springframework.dao.*; | [
"java.util",
"org.springframework.dao"
] | java.util; org.springframework.dao; | 620,525 |
@GET
@Path("searchByOwners")
List<QualifiedName> searchByOwners(
@QueryParam("owner")
Set<String> owners
); | @Path(STR) List<QualifiedName> searchByOwners( @QueryParam("owner") Set<String> owners ); | /**
* Returns the list of qualified names owned by the given owners.
*
* @param owners set of owners
* @return the list of qualified names owned by the given owners
*/ | Returns the list of qualified names owned by the given owners | searchByOwners | {
"repo_name": "tgianos/metacat",
"path": "metacat-client/src/main/java/com/netflix/metacat/client/api/MetadataV1.java",
"license": "apache-2.0",
"size": 3942
} | [
"com.netflix.metacat.common.QualifiedName",
"java.util.List",
"java.util.Set",
"javax.ws.rs.Path",
"javax.ws.rs.QueryParam"
] | import com.netflix.metacat.common.QualifiedName; import java.util.List; import java.util.Set; import javax.ws.rs.Path; import javax.ws.rs.QueryParam; | import com.netflix.metacat.common.*; import java.util.*; import javax.ws.rs.*; | [
"com.netflix.metacat",
"java.util",
"javax.ws"
] | com.netflix.metacat; java.util; javax.ws; | 2,013,973 |
private String getResponse(String url) throws IOException, EZExceptionResponseNot200Exception {
HttpClient client = new HttpClient();
int statusCode = client.sendGetForStatusCode(url);
if (statusCode != 200)
throw new EZExceptionResponseNot200Exception(url, statusCode);
return client.s... | String function(String url) throws IOException, EZExceptionResponseNot200Exception { HttpClient client = new HttpClient(); int statusCode = client.sendGetForStatusCode(url); if (statusCode != 200) throw new EZExceptionResponseNot200Exception(url, statusCode); return client.sendGet(url); } } public static class EzCache ... | /**
* Call the API ending for the given URL
* @param url the url of the end point.
* @return the response.
* @throws IOException
* @throws EZExceptionResponseNot200Exception
*/ | Call the API ending for the given URL | getResponse | {
"repo_name": "fn-faisal/restez",
"path": "restez/src/main/java/com/appzspot/restez/RestEz.java",
"license": "apache-2.0",
"size": 23031
} | [
"com.appzspot.restez.net.HttpClient",
"com.appzspot.restez.util.exceptions.EZExceptionResponseNot200Exception",
"java.io.IOException",
"java.util.HashMap"
] | import com.appzspot.restez.net.HttpClient; import com.appzspot.restez.util.exceptions.EZExceptionResponseNot200Exception; import java.io.IOException; import java.util.HashMap; | import com.appzspot.restez.net.*; import com.appzspot.restez.util.exceptions.*; import java.io.*; import java.util.*; | [
"com.appzspot.restez",
"java.io",
"java.util"
] | com.appzspot.restez; java.io; java.util; | 836,215 |
public static SecretKey createKeyForAES(
int bitLength,
SecureRandom random)
throws NoSuchAlgorithmException, NoSuchProviderException
{
KeyGenerator generator = KeyGenerator.getInstance("AES", "BC");
generator.init(256, random);
... | static SecretKey function( int bitLength, SecureRandom random) throws NoSuchAlgorithmException, NoSuchProviderException { KeyGenerator generator = KeyGenerator.getInstance("AES", "BC"); generator.init(256, random); return generator.generateKey(); } | /**
* Create a key for use with AES.
*
* @param bitLength
* @param random
* @return an AES key.
* @throws NoSuchAlgorithmException
* @throws NoSuchProviderException
*/ | Create a key for use with AES | createKeyForAES | {
"repo_name": "danielmelogpi/experimentos-certificados",
"path": "resource/beg-crypto-examples/src/chapter3/Utils.java",
"license": "apache-2.0",
"size": 3595
} | [
"java.security.NoSuchAlgorithmException",
"java.security.NoSuchProviderException",
"java.security.SecureRandom",
"javax.crypto.KeyGenerator",
"javax.crypto.SecretKey"
] | import java.security.NoSuchAlgorithmException; import java.security.NoSuchProviderException; import java.security.SecureRandom; import javax.crypto.KeyGenerator; import javax.crypto.SecretKey; | import java.security.*; import javax.crypto.*; | [
"java.security",
"javax.crypto"
] | java.security; javax.crypto; | 2,767,374 |
public Map<TextAttribute,?> getAttributes(){
return new AttributeMap(getAttributeValues());
} | Map<TextAttribute,?> function(){ return new AttributeMap(getAttributeValues()); } | /**
* Returns a map of font attributes available in this
* {@code Font}. Attributes include things like ligatures and
* glyph substitution.
* @return the attributes map of this {@code Font}.
*/ | Returns a map of font attributes available in this Font. Attributes include things like ligatures and glyph substitution | getAttributes | {
"repo_name": "mirkosertic/Bytecoder",
"path": "classlib/java.desktop/src/main/resources/META-INF/modules/java.desktop/classes/java/awt/Font.java",
"license": "apache-2.0",
"size": 117520
} | [
"java.awt.font.TextAttribute",
"java.util.Map"
] | import java.awt.font.TextAttribute; import java.util.Map; | import java.awt.font.*; import java.util.*; | [
"java.awt",
"java.util"
] | java.awt; java.util; | 341,737 |
protected Exchange defensiveCopyExchangeIfNeeded(Exchange exchange) {
// only do a defensive copy if redelivery is enabled
if (redeliveryEnabled) {
return ExchangeHelper.createCopy(exchange, true);
} else {
return null;
}
} | Exchange function(Exchange exchange) { if (redeliveryEnabled) { return ExchangeHelper.createCopy(exchange, true); } else { return null; } } | /**
* Performs a defensive copy of the exchange if needed
*
* @param exchange the exchange
* @return the defensive copy, or <tt>null</tt> if not needed (redelivery is not enabled).
*/ | Performs a defensive copy of the exchange if needed | defensiveCopyExchangeIfNeeded | {
"repo_name": "grgrzybek/camel",
"path": "camel-core/src/main/java/org/apache/camel/processor/RedeliveryErrorHandler.java",
"license": "apache-2.0",
"size": 61474
} | [
"org.apache.camel.Exchange",
"org.apache.camel.util.ExchangeHelper"
] | import org.apache.camel.Exchange; import org.apache.camel.util.ExchangeHelper; | import org.apache.camel.*; import org.apache.camel.util.*; | [
"org.apache.camel"
] | org.apache.camel; | 41,058 |
@Public
@InterfaceStability.Unstable
public long getResourceValue(String resource)
throws ResourceNotFoundException {
return getResourceInformation(resource).getValue();
} | @InterfaceStability.Unstable long function(String resource) throws ResourceNotFoundException { return getResourceInformation(resource).getValue(); } | /**
* Get the value for a specified resource. No information about the units is
* returned.
*
* @param resource name of the resource
* @return the value for the resource
* @throws ResourceNotFoundException if the resource can't be found
*/ | Get the value for a specified resource. No information about the units is returned | getResourceValue | {
"repo_name": "ctrezzo/hadoop",
"path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-api/src/main/java/org/apache/hadoop/yarn/api/records/Resource.java",
"license": "apache-2.0",
"size": 15626
} | [
"org.apache.hadoop.classification.InterfaceStability",
"org.apache.hadoop.yarn.exceptions.ResourceNotFoundException"
] | import org.apache.hadoop.classification.InterfaceStability; import org.apache.hadoop.yarn.exceptions.ResourceNotFoundException; | import org.apache.hadoop.classification.*; import org.apache.hadoop.yarn.exceptions.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,045,074 |
public void asyncPut(PayloadCallbackPair payloadCallbackPair, ScheduledExecutorService scheduler) {
synchronized (this.commandsQueue) {
if (this.commandsQueue.isEmpty()) {
this.commandsQueue.offer(payloadCallbackPair);
final Future<?> job = this.job;
... | void function(PayloadCallbackPair payloadCallbackPair, ScheduledExecutorService scheduler) { synchronized (this.commandsQueue) { if (this.commandsQueue.isEmpty()) { this.commandsQueue.offer(payloadCallbackPair); final Future<?> job = this.job; if (job == null job.isDone()) { this.job = scheduler.submit(() -> executeCom... | /**
* Asynchronously executes a PUT on the resource with a payload and provides the result to a given callback.
*
* @param payloadCallbackPair object which holds the payload and callback process the PUT request
* @param scheduler scheduler to be used for sending commands
*/ | Asynchronously executes a PUT on the resource with a payload and provides the result to a given callback | asyncPut | {
"repo_name": "theoweiss/openhab2",
"path": "bundles/org.openhab.binding.tradfri/src/main/java/org/openhab/binding/tradfri/internal/TradfriCoapClient.java",
"license": "epl-1.0",
"size": 5406
} | [
"java.util.concurrent.Future",
"java.util.concurrent.ScheduledExecutorService"
] | import java.util.concurrent.Future; import java.util.concurrent.ScheduledExecutorService; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 2,621,656 |
@Override
public void storeOperational(HealthAwareStore store) {
if (store.getClass().getSuperclass().isInstance(AndesContextStore.class)) {
isContextStoreOperational.set(true);
log.info("AndesRecoveryTask became operational.");
}
} | void function(HealthAwareStore store) { if (store.getClass().getSuperclass().isInstance(AndesContextStore.class)) { isContextStoreOperational.set(true); log.info(STR); } } | /**
* Invoked when specified store becomes operational
*
* @param store Reference to the operational store
*/ | Invoked when specified store becomes operational | storeOperational | {
"repo_name": "prabathariyaratna/andes",
"path": "modules/andes-core/broker/src/main/java/org/wso2/andes/kernel/AndesRecoveryTask.java",
"license": "apache-2.0",
"size": 5427
} | [
"org.wso2.andes.store.HealthAwareStore"
] | import org.wso2.andes.store.HealthAwareStore; | import org.wso2.andes.store.*; | [
"org.wso2.andes"
] | org.wso2.andes; | 2,250,176 |
@FIXVersion(introduced = "4.2")
@TagNumRef(tagNum = TagNum.MDEntryType)
public Character getMdEntryType() {
return mdEntryType;
} | @FIXVersion(introduced = "4.2") @TagNumRef(tagNum = TagNum.MDEntryType) Character function() { return mdEntryType; } | /**
* Message field getter.
* @return field value
*/ | Message field getter | getMdEntryType | {
"repo_name": "marvisan/HadesFIX",
"path": "Model/src/main/java/net/hades/fix/message/group/MDEntryTypeGroup.java",
"license": "gpl-3.0",
"size": 6590
} | [
"net.hades.fix.message.anno.FIXVersion",
"net.hades.fix.message.anno.TagNumRef",
"net.hades.fix.message.type.TagNum"
] | import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.anno.TagNumRef; import net.hades.fix.message.type.TagNum; | import net.hades.fix.message.anno.*; import net.hades.fix.message.type.*; | [
"net.hades.fix"
] | net.hades.fix; | 2,860,660 |
public static MozuUrl getPaymentUrl(String paymentId, String responseFields, String returnId)
{
UrlFormatter formatter = new UrlFormatter("/api/commerce/returns/{returnId}/payments/{paymentId}?responseFields={responseFields}");
formatter.formatUrl("paymentId", paymentId);
formatter.formatUrl("responseFiel... | static MozuUrl function(String paymentId, String responseFields, String returnId) { UrlFormatter formatter = new UrlFormatter(STR); formatter.formatUrl(STR, paymentId); formatter.formatUrl(STR, responseFields); formatter.formatUrl(STR, returnId); return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT... | /**
* Get Resource Url for GetPayment
* @param paymentId Unique identifier of the payment for which to perform the action.
* @param responseFields Use this field to include those fields which are not included by default.
* @param returnId Unique identifier of the return whose items you want to get.
* @re... | Get Resource Url for GetPayment | getPaymentUrl | {
"repo_name": "johngatti/mozu-java",
"path": "mozu-javaasync-core/src/main/java/com/mozu/api/urls/commerce/ReturnUrl.java",
"license": "mit",
"size": 12457
} | [
"com.mozu.api.MozuUrl",
"com.mozu.api.utils.UrlFormatter"
] | import com.mozu.api.MozuUrl; import com.mozu.api.utils.UrlFormatter; | import com.mozu.api.*; import com.mozu.api.utils.*; | [
"com.mozu.api"
] | com.mozu.api; | 2,242,531 |
public Set<Integer> getIds() {
return ids;
} | Set<Integer> function() { return ids; } | /**
* Returns the Set of object IDs present in the bag that correspond to the type specified.
*
* @return a Set of Integers
*/ | Returns the Set of object IDs present in the bag that correspond to the type specified | getIds | {
"repo_name": "JoeCarlson/intermine",
"path": "intermine/objectstore/main/src/org/intermine/objectstore/query/QueryClassBag.java",
"license": "lgpl-2.1",
"size": 5604
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 907,282 |
if (set instanceof Unmodifiable) {
return set;
}
return new UnmodifiableEntrySet(set);
}
//-----------------------------------------------------------------------
private UnmodifiableEntrySet(Set set) {
super(set);
}
| if (set instanceof Unmodifiable) { return set; } return new UnmodifiableEntrySet(set); } private UnmodifiableEntrySet(Set set) { super(set); } | /**
* Factory method to create an unmodifiable set of Map Entry objects.
*
* @param set the set to decorate, must not be null
* @throws IllegalArgumentException if set is null
*/ | Factory method to create an unmodifiable set of Map Entry objects | decorate | {
"repo_name": "ProfilingLabs/Usemon2",
"path": "usemon-agent-commons-java/src/main/java/com/usemon/lib/org/apache/commons/collections/map/UnmodifiableEntrySet.java",
"license": "mpl-2.0",
"size": 5476
} | [
"com.usemon.lib.org.apache.commons.collections.Unmodifiable",
"java.util.Set"
] | import com.usemon.lib.org.apache.commons.collections.Unmodifiable; import java.util.Set; | import com.usemon.lib.org.apache.commons.collections.*; import java.util.*; | [
"com.usemon.lib",
"java.util"
] | com.usemon.lib; java.util; | 311,361 |
@Nonnull
public IdentityProviderBaseRequest select(@Nonnull final String value) {
addSelectOption(value);
return this;
} | IdentityProviderBaseRequest function(@Nonnull final String value) { addSelectOption(value); return this; } | /**
* Sets the select clause for the request
*
* @param value the select clause
* @return the updated request
*/ | Sets the select clause for the request | select | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/requests/IdentityProviderBaseRequest.java",
"license": "mit",
"size": 6873
} | [
"javax.annotation.Nonnull"
] | import javax.annotation.Nonnull; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 1,254,149 |
private boolean checkThemingAllowed() {
// Do not apply the theme color if there are any security issues on the page.
final int securityLevel =
SecurityStateModel.getSecurityLevelForWebContents(mTab.getWebContents());
return securityLevel != ConnectionSecurityLevel.DANGEROUS
... | boolean function() { final int securityLevel = SecurityStateModel.getSecurityLevelForWebContents(mTab.getWebContents()); return securityLevel != ConnectionSecurityLevel.DANGEROUS && securityLevel != ConnectionSecurityLevel.SECURE_WITH_POLICY_INSTALLED_CERT && (mTab.getActivity() == null !mTab.getActivity().isTablet()) ... | /**
* Returns whether theming the activity is allowed (either by the web contents or by the
* activity).
*/ | Returns whether theming the activity is allowed (either by the web contents or by the activity) | checkThemingAllowed | {
"repo_name": "endlessm/chromium-browser",
"path": "chrome/android/java/src/org/chromium/chrome/browser/tab/TabThemeColorHelper.java",
"license": "bsd-3-clause",
"size": 9895
} | [
"org.chromium.chrome.browser.previews.Previews",
"org.chromium.components.security_state.ConnectionSecurityLevel",
"org.chromium.components.security_state.SecurityStateModel"
] | import org.chromium.chrome.browser.previews.Previews; import org.chromium.components.security_state.ConnectionSecurityLevel; import org.chromium.components.security_state.SecurityStateModel; | import org.chromium.chrome.browser.previews.*; import org.chromium.components.security_state.*; | [
"org.chromium.chrome",
"org.chromium.components"
] | org.chromium.chrome; org.chromium.components; | 88,557 |
public void setLegendItemPaint(Paint paint) {
ParamChecks.nullNotPermitted(paint, "paint");
this.legendItemPaint = paint;
}
| void function(Paint paint) { ParamChecks.nullNotPermitted(paint, "paint"); this.legendItemPaint = paint; } | /**
* Sets the legend item paint.
*
* @param paint the paint (<code>null</code> not permitted).
*
* @see #getLegendItemPaint()
*/ | Sets the legend item paint | setLegendItemPaint | {
"repo_name": "sebkur/JFreeChart",
"path": "src/main/java/org/jfree/chart/StandardChartTheme.java",
"license": "lgpl-3.0",
"size": 60532
} | [
"java.awt.Paint",
"org.jfree.chart.util.ParamChecks"
] | import java.awt.Paint; import org.jfree.chart.util.ParamChecks; | import java.awt.*; import org.jfree.chart.util.*; | [
"java.awt",
"org.jfree.chart"
] | java.awt; org.jfree.chart; | 2,796,887 |
public static int readInt(InputStream in) throws IOException {
int ch1 = in.read();
int ch2 = in.read();
int ch3 = in.read();
int ch4 = in.read();
if ((ch1 | ch2 | ch3 | ch4) < 0) {
throw new EOFException();
}
return ((ch1 << 24) + (ch2 << 16) + (c... | static int function(InputStream in) throws IOException { int ch1 = in.read(); int ch2 = in.read(); int ch3 = in.read(); int ch4 = in.read(); if ((ch1 ch2 ch3 ch4) < 0) { throw new EOFException(); } return ((ch1 << 24) + (ch2 << 16) + (ch3 << 8) + (ch4 << 0)); } | /**
* read an integer from the input stream
*
* @param in
* @return
* @throws IOException
*/ | read an integer from the input stream | readInt | {
"repo_name": "hfdiao/eurpc",
"path": "src/main/java/easyuse/rpc/util/IOUtils.java",
"license": "bsd-2-clause",
"size": 5224
} | [
"java.io.EOFException",
"java.io.IOException",
"java.io.InputStream"
] | import java.io.EOFException; import java.io.IOException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 545,422 |
public void write(Image image, String fileName) {
write(image, Texture2D.class, fileName);
} | void function(Image image, String fileName) { write(image, Texture2D.class, fileName); } | /**
* Writes a 2D image from the given image in a KTX file named from the fileName param
* Note that the fileName should contain the extension (.ktx sounds like a wise choice)
* @param image the image to write
* @param fileName the name of the file to write
*/ | Writes a 2D image from the given image in a KTX file named from the fileName param Note that the fileName should contain the extension (.ktx sounds like a wise choice) | write | {
"repo_name": "PlanetWaves/clockworkengine",
"path": "trunk/jme3-core/src/plugins/java/com/jme3/texture/plugins/ktx/KTXWriter.java",
"license": "apache-2.0",
"size": 10226
} | [
"com.jme3.texture.Image",
"com.jme3.texture.Texture2D"
] | import com.jme3.texture.Image; import com.jme3.texture.Texture2D; | import com.jme3.texture.*; | [
"com.jme3.texture"
] | com.jme3.texture; | 2,837,791 |
public void removeTag(Id.Stream.View viewId, String tagToRemove)
throws IOException, UnauthenticatedException, NotFoundException, BadRequestException, UnauthorizedException {
removeTag(viewId, constructPath(viewId), tagToRemove);
} | void function(Id.Stream.View viewId, String tagToRemove) throws IOException, UnauthenticatedException, NotFoundException, BadRequestException, UnauthorizedException { removeTag(viewId, constructPath(viewId), tagToRemove); } | /**
* Removes a tag from a view.
*
* @param viewId view to remove tag from
* @param tagToRemove tag to be removed
*/ | Removes a tag from a view | removeTag | {
"repo_name": "caskdata/cdap",
"path": "cdap-common/src/main/java/co/cask/cdap/common/metadata/AbstractMetadataClient.java",
"license": "apache-2.0",
"size": 48748
} | [
"co.cask.cdap.common.BadRequestException",
"co.cask.cdap.common.NotFoundException",
"co.cask.cdap.common.UnauthenticatedException",
"co.cask.cdap.proto.Id",
"co.cask.cdap.security.spi.authorization.UnauthorizedException",
"java.io.IOException"
] | import co.cask.cdap.common.BadRequestException; import co.cask.cdap.common.NotFoundException; import co.cask.cdap.common.UnauthenticatedException; import co.cask.cdap.proto.Id; import co.cask.cdap.security.spi.authorization.UnauthorizedException; import java.io.IOException; | import co.cask.cdap.common.*; import co.cask.cdap.proto.*; import co.cask.cdap.security.spi.authorization.*; import java.io.*; | [
"co.cask.cdap",
"java.io"
] | co.cask.cdap; java.io; | 1,381,890 |
public void Move_Function_008(Pokemon d, Pokemon a, int damage){
// TODO -> Nincs időjárás, majd a battlefieldbe lesz beépítve.
d.setHp(d.getHp()-damage);
d.setParalyze(1);
} | void function(Pokemon d, Pokemon a, int damage){ d.setHp(d.getHp()-damage); d.setParalyze(1); } | /**
* Function code: 008.
* Paralyzes the target. Hits some semi-invulnerable targets. (Thunder)
* Always hits in rain.
* (Handled in pbCheck): Accuracy 50% in sunshine.
* */ | Function code: 008. Paralyzes the target. Hits some semi-invulnerable targets. (Thunder) Always hits in rain. (Handled in pbCheck): Accuracy 50% in sunshine | Move_Function_008 | {
"repo_name": "Adiss/ProgTechPokemon",
"path": "src/main/java/hu/experiment_team/Move_Functions.java",
"license": "apache-2.0",
"size": 12961
} | [
"hu.experiment_team.models.Pokemon"
] | import hu.experiment_team.models.Pokemon; | import hu.experiment_team.models.*; | [
"hu.experiment_team.models"
] | hu.experiment_team.models; | 1,406,788 |
public void setSeguradora(final String seguradora) {
DFStringValidador.tamanho30(seguradora, "Nome da Seguradora");
this.seguradora = seguradora;
} | void function(final String seguradora) { DFStringValidador.tamanho30(seguradora, STR); this.seguradora = seguradora; } | /**
* Nome da Seguradora
*/ | Nome da Seguradora | setSeguradora | {
"repo_name": "fincatto/nfe",
"path": "src/main/java/com/fincatto/documentofiscal/mdfe3/classes/nota/MDFInfoSeguroInfo.java",
"license": "apache-2.0",
"size": 1445
} | [
"com.fincatto.documentofiscal.validadores.DFStringValidador"
] | import com.fincatto.documentofiscal.validadores.DFStringValidador; | import com.fincatto.documentofiscal.validadores.*; | [
"com.fincatto.documentofiscal"
] | com.fincatto.documentofiscal; | 710,284 |
private int generatorAnswersList() throws IOException {
File answerFile = new File(this.getClass().getResource("/answers.txt").getPath());
if (!answerFile.exists()) {
System.out.println("The file answers not found!");
}
try (RandomAccessFile raf = new RandomAccessFile(ans... | int function() throws IOException { File answerFile = new File(this.getClass().getResource(STR).getPath()); if (!answerFile.exists()) { System.out.println(STR); } try (RandomAccessFile raf = new RandomAccessFile(answerFile, "r")) { int countLine = 0; String line; while ((line = raf.readLine()) != null) { if (!"".equals... | /**
* This method generate the list of answers and return count acceptable responses.
*
* @return count acceptable responses.
* @throws IOException is exception.
*/ | This method generate the list of answers and return count acceptable responses | generatorAnswersList | {
"repo_name": "amezgin/amezgin",
"path": "chapter_003/input-output/src/main/java/ru/job4j/ConsoleChat.java",
"license": "apache-2.0",
"size": 4519
} | [
"java.io.File",
"java.io.IOException",
"java.io.RandomAccessFile"
] | import java.io.File; import java.io.IOException; import java.io.RandomAccessFile; | import java.io.*; | [
"java.io"
] | java.io; | 771,389 |
public boolean declareSemanticWebPrefixes() {
boolean containsPrefix=false;
for (Map.Entry<String,String> entry : s_semanticWebPrefixes.entrySet())
if (declarePrefixRaw(entry.getKey(),entry.getValue()))
containsPrefix=true;
buildPrefixIRIMatchingPattern();
... | boolean function() { boolean containsPrefix=false; for (Map.Entry<String,String> entry : s_semanticWebPrefixes.entrySet()) if (declarePrefixRaw(entry.getKey(),entry.getValue())) containsPrefix=true; buildPrefixIRIMatchingPattern(); return containsPrefix; } | /**
* Registers the well-known Semantic Web prefixes.
*
* @return 'true' if this object already contained one of the well-known prefixes
*/ | Registers the well-known Semantic Web prefixes | declareSemanticWebPrefixes | {
"repo_name": "wolpertinger-reasoner/Wolpertinger",
"path": "wolpertinger-reasoner/src/main/java/org/semanticweb/wolpertinger/Prefixes.java",
"license": "lgpl-3.0",
"size": 14318
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 466,957 |
private void processLine(HashMap<String, Integer> positions, StringBuilder strBuilder, List<String> values) {
List<String> orderredColumns = Arrays.asList(STICS_HEADER.split(INPUT_CSV_SEPARATOR));
for (String column : orderredColumns) {
Integer position = positions.get(column.toLowerCase());
log.debug("col... | void function(HashMap<String, Integer> positions, StringBuilder strBuilder, List<String> values) { List<String> orderredColumns = Arrays.asList(STICS_HEADER.split(INPUT_CSV_SEPARATOR)); for (String column : orderredColumns) { Integer position = positions.get(column.toLowerCase()); log.debug(STR + column.toLowerCase() +... | /**
* Process a line of csv
*
* @param positions a map with csv column positions indexed by column name
* @param strBuilder the string builder used to store converted data
* @param values the list of data to convert
*/ | Process a line of csv | processLine | {
"repo_name": "jcufi/translator-stics",
"path": "src/main/java/org/agmip/translators/stics/acmo/OutFileTranslator.java",
"license": "bsd-3-clause",
"size": 9645
} | [
"java.util.Arrays",
"java.util.HashMap",
"java.util.List"
] | import java.util.Arrays; import java.util.HashMap; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 564,946 |
@RequiredScope({})
@ResponseStatus(HttpStatus.NO_CONTENT)
@RequestMapping(value = UrlHelpers.AUTH_SESSION, method = RequestMethod.PUT)
public void revalidate(
@RequestBody Session session)
throws NotFoundException {
authenticationService.revalidate(session.getSessionToken());
}
| @RequiredScope({}) @ResponseStatus(HttpStatus.NO_CONTENT) @RequestMapping(value = UrlHelpers.AUTH_SESSION, method = RequestMethod.PUT) void function( @RequestBody Session session) throws NotFoundException { authenticationService.revalidate(session.getSessionToken()); } | /**
* Refresh a session token to render it usable for another 24 hours.
*/ | Refresh a session token to render it usable for another 24 hours | revalidate | {
"repo_name": "zimingd/Synapse-Repository-Services",
"path": "services/repository/src/main/java/org/sagebionetworks/auth/controller/AuthenticationController.java",
"license": "apache-2.0",
"size": 19453
} | [
"org.sagebionetworks.repo.model.auth.Session",
"org.sagebionetworks.repo.web.NotFoundException",
"org.sagebionetworks.repo.web.RequiredScope",
"org.sagebionetworks.repo.web.UrlHelpers",
"org.springframework.http.HttpStatus",
"org.springframework.web.bind.annotation.RequestBody",
"org.springframework.web... | import org.sagebionetworks.repo.model.auth.Session; import org.sagebionetworks.repo.web.NotFoundException; import org.sagebionetworks.repo.web.RequiredScope; import org.sagebionetworks.repo.web.UrlHelpers; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.RequestBody; import org... | import org.sagebionetworks.repo.model.auth.*; import org.sagebionetworks.repo.web.*; import org.springframework.http.*; import org.springframework.web.bind.annotation.*; | [
"org.sagebionetworks.repo",
"org.springframework.http",
"org.springframework.web"
] | org.sagebionetworks.repo; org.springframework.http; org.springframework.web; | 2,330,469 |
public Edge edgeFromJson(final JSONObject json, final Vertex out, final Vertex in) throws IOException {
return this.edgeFromJson(json.toString(), out, in);
} | Edge function(final JSONObject json, final Vertex out, final Vertex in) throws IOException { return this.edgeFromJson(json.toString(), out, in); } | /**
* Creates an edge from GraphSON using settings supplied in the constructor.
*/ | Creates an edge from GraphSON using settings supplied in the constructor | edgeFromJson | {
"repo_name": "echinopsii/net.echinopsii.3rdparty.blueprints",
"path": "blueprints-core/src/main/java/com/tinkerpop/blueprints/util/io/graphson/GraphSONUtility.java",
"license": "bsd-3-clause",
"size": 37947
} | [
"com.tinkerpop.blueprints.Edge",
"com.tinkerpop.blueprints.Vertex",
"java.io.IOException",
"org.codehaus.jettison.json.JSONObject"
] | import com.tinkerpop.blueprints.Edge; import com.tinkerpop.blueprints.Vertex; import java.io.IOException; import org.codehaus.jettison.json.JSONObject; | import com.tinkerpop.blueprints.*; import java.io.*; import org.codehaus.jettison.json.*; | [
"com.tinkerpop.blueprints",
"java.io",
"org.codehaus.jettison"
] | com.tinkerpop.blueprints; java.io; org.codehaus.jettison; | 383,318 |
@Test
@Assumption(methods = {"isMacOSX"}, methodClass = PlatformAssumptions.class)
public void testUnsafeCharacterUnsafetyMacOSX() throws IOException {
testUnsafeCharacterUnsafety(FilePathRestrictionInstance.UNIX_REQUIRED);
} | @Assumption(methods = {STR}, methodClass = PlatformAssumptions.class) void function() throws IOException { testUnsafeCharacterUnsafety(FilePathRestrictionInstance.UNIX_REQUIRED); } | /**
* On Apple Mac OS X, test that data cannot be stored in files named using unsafe characters.
* @throws IOException unexpected
*/ | On Apple Mac OS X, test that data cannot be stored in files named using unsafe characters | testUnsafeCharacterUnsafetyMacOSX | {
"repo_name": "ximenesuk/openmicroscopy",
"path": "components/blitz/test/ome/services/blitz/test/utests/MakePathComponentSafeTest.java",
"license": "gpl-2.0",
"size": 14425
} | [
"java.io.IOException",
"nl.javadude.assumeng.Assumption"
] | import java.io.IOException; import nl.javadude.assumeng.Assumption; | import java.io.*; import nl.javadude.assumeng.*; | [
"java.io",
"nl.javadude.assumeng"
] | java.io; nl.javadude.assumeng; | 1,966,532 |
public static MozuClient<com.mozu.api.contracts.customer.Visit> getVisitClient(String visitId, String responseFields) throws Exception
{
MozuUrl url = com.mozu.api.urls.commerce.customer.VisitUrl.getVisitUrl(responseFields, visitId);
String verb = "GET";
Class<?> clz = com.mozu.api.contracts.customer.Visi... | static MozuClient<com.mozu.api.contracts.customer.Visit> function(String visitId, String responseFields) throws Exception { MozuUrl url = com.mozu.api.urls.commerce.customer.VisitUrl.getVisitUrl(responseFields, visitId); String verb = "GET"; Class<?> clz = com.mozu.api.contracts.customer.Visit.class; MozuClient<com.moz... | /**
* Retrieves the details of the customer visit specified in the request.
* <p><pre><code>
* MozuClient<com.mozu.api.contracts.customer.Visit> mozuClient=GetVisitClient( visitId, responseFields);
* client.setBaseAddress(url);
* client.executeRequest();
* Visit visit = client.Result();
* </code><... | Retrieves the details of the customer visit specified in the request. <code><code> MozuClient mozuClient=GetVisitClient( visitId, responseFields); client.setBaseAddress(url); client.executeRequest(); Visit visit = client.Result(); </code></code> | getVisitClient | {
"repo_name": "johngatti/mozu-java",
"path": "mozu-java-core/src/main/java/com/mozu/api/clients/commerce/customer/VisitClient.java",
"license": "mit",
"size": 10357
} | [
"com.mozu.api.MozuClient",
"com.mozu.api.MozuClientFactory",
"com.mozu.api.MozuUrl"
] | import com.mozu.api.MozuClient; import com.mozu.api.MozuClientFactory; import com.mozu.api.MozuUrl; | import com.mozu.api.*; | [
"com.mozu.api"
] | com.mozu.api; | 308,709 |
public List<User> getSelectedUsers() {
return tableModel.generateSelectedUsers();
} | List<User> function() { return tableModel.generateSelectedUsers(); } | /**
* Gets the selected users. This method will generates and returns a new {@link List} of users
* for each call, so method callers should cache the returned value when possible.
*
* @return the selected users
*/ | Gets the selected users. This method will generates and returns a new <code>List</code> of users for each call, so method callers should cache the returned value when possible | getSelectedUsers | {
"repo_name": "psiinon/zaproxy",
"path": "zap/src/main/java/org/zaproxy/zap/view/widgets/UsersMultiSelectTable.java",
"license": "apache-2.0",
"size": 6632
} | [
"java.util.List",
"org.zaproxy.zap.users.User"
] | import java.util.List; import org.zaproxy.zap.users.User; | import java.util.*; import org.zaproxy.zap.users.*; | [
"java.util",
"org.zaproxy.zap"
] | java.util; org.zaproxy.zap; | 2,344,310 |
@Override public void exitVariable(@NotNull PQLParser.VariableContext ctx) { } | @Override public void exitVariable(@NotNull PQLParser.VariableContext ctx) { } | /**
* {@inheritDoc}
* <p/>
* The default implementation does nothing.
*/ | The default implementation does nothing | enterVariable | {
"repo_name": "processquerying/PQL",
"path": "src/org/pql/antlr/PQLBaseListener.java",
"license": "lgpl-3.0",
"size": 23062
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 2,651,916 |
EbookFileMapper selectByPrimaryKey(Integer id); | EbookFileMapper selectByPrimaryKey(Integer id); | /**
* This method was generated by MyBatis Generator. This method corresponds to the database table ebook_file_mapper
* @mbggenerated Tue Oct 20 22:18:39 CST 2015
*/ | This method was generated by MyBatis Generator. This method corresponds to the database table ebook_file_mapper | selectByPrimaryKey | {
"repo_name": "Sherkyoung/kinbook",
"path": "src/main/java/com/kindle/kinbook/dao/EbookFileMapperMapper.java",
"license": "apache-2.0",
"size": 1450
} | [
"com.kindle.kinbook.bean.EbookFileMapper"
] | import com.kindle.kinbook.bean.EbookFileMapper; | import com.kindle.kinbook.bean.*; | [
"com.kindle.kinbook"
] | com.kindle.kinbook; | 2,110,910 |
private void _upPressed() {
_swap(true);
}
private Button _addButton;
private Composite _buttonBox;
private Button _downButton;
private List _list;
private Button _modifyButton;
private Button _removeButton;
private SelectionListener _selectionListener;
private Button _upButton; | void function() { _swap(true); } private Button _addButton; private Composite _buttonBox; private Button _downButton; private List _list; private Button _modifyButton; private Button _removeButton; private SelectionListener _selectionListener; private Button _upButton; | /**
* Notifies that the Up button has been pressed.
*/ | Notifies that the Up button has been pressed | _upPressed | {
"repo_name": "Ixenit/eclipsemembersort",
"path": "src/com/ixenit/membersort/preferences/editor/ListEditor.java",
"license": "apache-2.0",
"size": 12357
} | [
"org.eclipse.swt.events.SelectionListener",
"org.eclipse.swt.widgets.Button",
"org.eclipse.swt.widgets.Composite",
"org.eclipse.swt.widgets.List"
] | import org.eclipse.swt.events.SelectionListener; import org.eclipse.swt.widgets.Button; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.List; | import org.eclipse.swt.events.*; import org.eclipse.swt.widgets.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 209,444 |
ImmutableSet<Artifact> getMandatoryOutputs(); | ImmutableSet<Artifact> getMandatoryOutputs(); | /**
* Returns the set of output Artifacts that are required to be saved. This is
* used to identify items that would otherwise be potentially identified as
* orphaned (not consumed by any downstream {@link Action}s and potentially
* discarded during the build process.
*/ | Returns the set of output Artifacts that are required to be saved. This is used to identify items that would otherwise be potentially identified as orphaned (not consumed by any downstream <code>Action</code>s and potentially discarded during the build process | getMandatoryOutputs | {
"repo_name": "juhalindfors/bazel-patches",
"path": "src/main/java/com/google/devtools/build/lib/actions/ActionAnalysisMetadata.java",
"license": "apache-2.0",
"size": 7551
} | [
"com.google.common.collect.ImmutableSet"
] | import com.google.common.collect.ImmutableSet; | import com.google.common.collect.*; | [
"com.google.common"
] | com.google.common; | 1,948,658 |
private void assertExecutable()
throws ModbusException {
if (m_Request == null ||
m_SerialCon == null) {
throw new ModbusException(
"Assertion failed, transaction not executable"
);
}
}//assertExecuteable | void function() throws ModbusException { if (m_Request == null m_SerialCon == null) { throw new ModbusException( STR ); } } | /**
* Asserts if this <tt>ModbusTCPTransaction</tt> is
* executable.
*
* @throws ModbusException if the transaction cannot be asserted.
*/ | Asserts if this ModbusTCPTransaction is executable | assertExecutable | {
"repo_name": "pulseenergy/jamod",
"path": "src/net/wimpi/modbus/io/ModbusSerialTransaction.java",
"license": "bsd-3-clause",
"size": 7416
} | [
"net.wimpi.modbus.ModbusException"
] | import net.wimpi.modbus.ModbusException; | import net.wimpi.modbus.*; | [
"net.wimpi.modbus"
] | net.wimpi.modbus; | 548,796 |
public void writeBoolean(boolean v)
throws IOException, CardTerminalException {
this.write(v ? 1 : 0);
}
| void function(boolean v) throws IOException, CardTerminalException { this.write(v ? 1 : 0); } | /** Writes a boolean.
*
* @param v
* The boolean value
* @exception java.io.IOException
* Thrown if an I/O error has occurred.
* @exception opencard.core.terminal.CardTerminalException
* Thrown when the smart card has been removed.
*/ | Writes a boolean | writeBoolean | {
"repo_name": "zeroDenial/CNSReader",
"path": "ocf/opencard/opt/iso/fs/CardRandomByteAccess.java",
"license": "gpl-2.0",
"size": 23305
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,202,040 |
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Icepick.restoreInstanceState(this, savedInstanceState);
} | void function(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); Icepick.restoreInstanceState(this, savedInstanceState); } | /**
* Handles restoring state with Icepick
*
* @param savedInstanceState old state
*/ | Handles restoring state with Icepick | onCreate | {
"repo_name": "BeeeOn/android",
"path": "BeeeOn/app/src/main/java/com/rehivetech/beeeon/gui/fragment/BaseApplicationFragment.java",
"license": "bsd-3-clause",
"size": 1575
} | [
"android.os.Bundle",
"android.support.annotation.Nullable"
] | import android.os.Bundle; import android.support.annotation.Nullable; | import android.os.*; import android.support.annotation.*; | [
"android.os",
"android.support"
] | android.os; android.support; | 2,194,806 |
private void setActiveProjectProperty(final String propertyName, final String propertyValue) {
final Project activeProject = getProject();
if (activeProject != null) {
activeProject.setProperty(propertyName, propertyValue);
}
} | void function(final String propertyName, final String propertyValue) { final Project activeProject = getProject(); if (activeProject != null) { activeProject.setProperty(propertyName, propertyValue); } } | /**
* Sets property in active ant project with name specified inpropertyName,
* and value specified in propertyValue parameter
*/ | Sets property in active ant project with name specified inpropertyName, and value specified in propertyValue parameter | setActiveProjectProperty | {
"repo_name": "zanyants/dita-ot",
"path": "src/main/plugins/org.dita.pdf2/src/com/suite/sol/ditaot/DetectLang.java",
"license": "apache-2.0",
"size": 6144
} | [
"org.apache.tools.ant.Project"
] | import org.apache.tools.ant.Project; | import org.apache.tools.ant.*; | [
"org.apache.tools"
] | org.apache.tools; | 980,283 |
public BatchManager authenticate(TokenCredential credential, AzureProfile profile) {
Objects.requireNonNull(credential, "'credential' cannot be null.");
Objects.requireNonNull(profile, "'profile' cannot be null.");
StringBuilder userAgentBuilder = new StringBuilder();
... | BatchManager function(TokenCredential credential, AzureProfile profile) { Objects.requireNonNull(credential, STR); Objects.requireNonNull(profile, STR); StringBuilder userAgentBuilder = new StringBuilder(); userAgentBuilder .append(STR) .append("-") .append(STR) .append("/") .append(STR); if (!Configuration.getGlobalCo... | /**
* Creates an instance of Batch service API entry point.
*
* @param credential the credential to use.
* @param profile the Azure profile for client.
* @return the Batch service API instance.
*/ | Creates an instance of Batch service API entry point | authenticate | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/batch/azure-resourcemanager-batch/src/main/java/com/azure/resourcemanager/batch/BatchManager.java",
"license": "mit",
"size": 13250
} | [
"com.azure.core.credential.TokenCredential",
"com.azure.core.http.HttpPipeline",
"com.azure.core.http.HttpPipelineBuilder",
"com.azure.core.http.policy.AddDatePolicy",
"com.azure.core.http.policy.HttpLoggingPolicy",
"com.azure.core.http.policy.HttpPipelinePolicy",
"com.azure.core.http.policy.HttpPolicyP... | import com.azure.core.credential.TokenCredential; import com.azure.core.http.HttpPipeline; import com.azure.core.http.HttpPipelineBuilder; import com.azure.core.http.policy.AddDatePolicy; import com.azure.core.http.policy.HttpLoggingPolicy; import com.azure.core.http.policy.HttpPipelinePolicy; import com.azure.core.htt... | import com.azure.core.credential.*; import com.azure.core.http.*; import com.azure.core.http.policy.*; import com.azure.core.management.http.policy.*; import com.azure.core.management.profile.*; import com.azure.core.util.*; import java.time.temporal.*; import java.util.*; | [
"com.azure.core",
"java.time",
"java.util"
] | com.azure.core; java.time; java.util; | 359,291 |
private MetaView findGridView(String gridName, String refModel) {
MetaView gridView = null;
if (gridName != null) {
gridView = metaViewRepo.findByName(gridName);
}
if (gridView == null) {
gridView = metaViewRepo.all()
.filter("self.type = 'grid' and self.model = ?", refModel)
.fetchOne();
... | MetaView function(String gridName, String refModel) { MetaView gridView = null; if (gridName != null) { gridView = metaViewRepo.findByName(gridName); } if (gridView == null) { gridView = metaViewRepo.all() .filter(STR, refModel) .fetchOne(); } return gridView; } | /**
* Find MetaView record from given gridName and reference model.
*
* @param gridName
* Name of grid view.
* @param refModel
* Model of grid view.
* @return MetaView record searched.
*/ | Find MetaView record from given gridName and reference model | findGridView | {
"repo_name": "jph-axelor/axelor-business-suite",
"path": "axelor-studio/src/main/java/com/axelor/studio/service/builder/ReportBuilderService.java",
"license": "agpl-3.0",
"size": 17063
} | [
"com.axelor.meta.db.MetaView"
] | import com.axelor.meta.db.MetaView; | import com.axelor.meta.db.*; | [
"com.axelor.meta"
] | com.axelor.meta; | 1,580,782 |
public ServiceFuture<Void> deleteAsync(String resourceGroupName, String accountName, String backupPolicyName, final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, accountName, backupPolicyName), serviceCallback);
} | ServiceFuture<Void> function(String resourceGroupName, String accountName, String backupPolicyName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, accountName, backupPolicyName), serviceCallback); } | /**
* Delete a backup policy.
* Delete backup policy.
*
* @param resourceGroupName The name of the resource group.
* @param accountName The name of the NetApp account
* @param backupPolicyName Backup policy Name which uniquely identify backup policy.
* @param serviceCallback the async... | Delete a backup policy. Delete backup policy | deleteAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/netapp/mgmt-v2020_06_01/src/main/java/com/microsoft/azure/management/netapp/v2020_06_01/implementation/BackupPoliciesInner.java",
"license": "mit",
"size": 44376
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 2,635,239 |
public ArrayList getRows() {
return rows;
} | ArrayList function() { return rows; } | /**
* Gets an arraylist with all the rows in the table.
*
* @return an arraylist
*/ | Gets an arraylist with all the rows in the table | getRows | {
"repo_name": "shitalm/jsignpdf2",
"path": "src/main/java/com/lowagie/text/pdf/PdfPTable.java",
"license": "gpl-2.0",
"size": 50346
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 301,753 |
@Test(dataProvider = "gracefulUnload")
public void testBrokerSubscriptionRecovery(boolean unloadBundleGracefully) throws Exception {
log.info("-- Starting {} test --", methodName);
final String topicName = "persistent://my-property/use/my-ns/unacked-topic";
final String subscriberName =... | @Test(dataProvider = STR) void function(boolean unloadBundleGracefully) throws Exception { log.info(STR, methodName); final String topicName = STRsubscriber-1STRpersistent: producerConf); CountDownLatch latch = new CountDownLatch(totalProducedMsgs); for (int i = 0; i < totalProducedMsgs; i++) { String message = STR + i... | /**
* <pre>
* It verifies that cursor-recovery
* 1. recovers individualDeletedMessages
* 2. sets readPosition with last acked-message
* 3. replay all unack messages
* </pre>
*
* @throws Exception
*/ | <code> It verifies that cursor-recovery 1. recovers individualDeletedMessages 2. sets readPosition with last acked-message 3. replay all unack messages </code> | testBrokerSubscriptionRecovery | {
"repo_name": "bradtm/pulsar",
"path": "pulsar-broker/src/test/java/org/apache/pulsar/client/api/DispatcherBlockConsumerTest.java",
"license": "apache-2.0",
"size": 48251
} | [
"java.util.Set",
"java.util.concurrent.CountDownLatch",
"java.util.concurrent.TimeUnit",
"java.util.function.Supplier",
"java.util.stream.Collectors",
"jersey.repackaged.com.google.common.collect.Sets",
"org.apache.pulsar.broker.namespace.NamespaceService",
"org.apache.pulsar.client.api.Message",
"o... | import java.util.Set; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import java.util.function.Supplier; import java.util.stream.Collectors; import jersey.repackaged.com.google.common.collect.Sets; import org.apache.pulsar.broker.namespace.NamespaceService; import org.apache.pulsar.cl... | import java.util.*; import java.util.concurrent.*; import java.util.function.*; import java.util.stream.*; import jersey.repackaged.com.google.common.collect.*; import org.apache.pulsar.broker.namespace.*; import org.apache.pulsar.client.api.*; import org.mockito.*; import org.testng.*; import org.testng.annotations.*; | [
"java.util",
"jersey.repackaged.com",
"org.apache.pulsar",
"org.mockito",
"org.testng",
"org.testng.annotations"
] | java.util; jersey.repackaged.com; org.apache.pulsar; org.mockito; org.testng; org.testng.annotations; | 494,501 |
@Test(expected=IllegalStateException.class)
public void of_URLs_asFiles_Rename() throws IOException
{
// given
URL f1 = new File("src/test/resources/Thumbnailator/grid.png").toURL();
URL f2 = new File("src/test/resources/Thumbnailator/grid.jpg").toURL();
try
{
// when
Thumbnails.of(f... | @Test(expected=IllegalStateException.class) void function() throws IOException { URL f1 = new File(STR).toURL(); URL f2 = new File(STR).toURL(); try { Thumbnails.of(f1, f2) .size(50, 50) .asFiles(Rename.PREFIX_DOT_THUMBNAIL); } catch (IllegalStateException e) { assertEquals(STR, e.getMessage()); throw e; } } | /**
* Test for the {@link Thumbnails.Builder} class where,
* <ol>
* <li>Thumbnails.of(URL, URL)</li>
* <li>asFiles(Rename)</li>
* </ol>
* and the expected outcome is,
* <ol>
* <li>An IllegalStateException occurs.</li>
* </ol>
* @throws IOException
*/ | Test for the <code>Thumbnails.Builder</code> class where, Thumbnails.of(URL, URL) asFiles(Rename) and the expected outcome is, An IllegalStateException occurs. | of_URLs_asFiles_Rename | {
"repo_name": "passerby4j/thumbnailator",
"path": "src/test/java/net/coobird/thumbnailator/ThumbnailsBuilderInputOutputTest.java",
"license": "mit",
"size": 303967
} | [
"java.io.File",
"java.io.IOException",
"net.coobird.thumbnailator.name.Rename",
"org.junit.Assert",
"org.junit.Test"
] | import java.io.File; import java.io.IOException; import net.coobird.thumbnailator.name.Rename; import org.junit.Assert; import org.junit.Test; | import java.io.*; import net.coobird.thumbnailator.name.*; import org.junit.*; | [
"java.io",
"net.coobird.thumbnailator",
"org.junit"
] | java.io; net.coobird.thumbnailator; org.junit; | 272,318 |
EClass getPowerExpression(); | EClass getPowerExpression(); | /**
* Returns the meta object for class '{@link net.mlanoe.language.vhdl.expression.PowerExpression <em>Power Expression</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Power Expression</em>'.
* @see net.mlanoe.language.vhdl.expression.PowerExpression
* @ge... | Returns the meta object for class '<code>net.mlanoe.language.vhdl.expression.PowerExpression Power Expression</code>'. | getPowerExpression | {
"repo_name": "mlanoe/x-vhdl",
"path": "plugins/net.mlanoe.language.vhdl/src-gen/net/mlanoe/language/vhdl/expression/ExpressionPackage.java",
"license": "gpl-3.0",
"size": 106999
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 852,135 |
@Test
public void testModifyUrl2() {
String responseCorrect = "{\"urls\":[\"http://localhost:8080/RESTGateway/Consumer/example.com/second\", \"http://localhost:8080/RESTGateway/Consumer/example.com/second/\", \"http://localhost:8080/RESTGateway/Consumer/example.com/second?param1=value1\", \"http://local... | void function() { String responseCorrect = "{\"urls\":[\"http: String resourcePath = STR; String responseStr = "{\"urls\":[\"http: responseStr = ConsumerGatewayUtil.rewriteUrl(servletUrl, resourcePath, responseStr); assertEquals(responseCorrect, responseStr); } | /**
* Modify JSON string containing URLs beginning with http. ResourceId is
* defined.
*/ | Modify JSON string containing URLs beginning with http. ResourceId is defined | testModifyUrl2 | {
"repo_name": "vrk-kpa/REST-adapter-service",
"path": "src/src/test/java/fi/vrk/xroad/restadapterservice/util/ConsumerGatewayUtilTest.java",
"license": "mit",
"size": 45630
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 1,055,462 |
protected void validateContentType(T request) throws AuthProblemException {
String contentType = request.getContentType();
final String expectedContentType = Consts.ContentType.URL_ENCODED;
if (!AuthKit.hasContentType(contentType, expectedContentType)) {
throw AuthKit.handleBadCo... | void function(T request) throws AuthProblemException { String contentType = request.getContentType(); final String expectedContentType = Consts.ContentType.URL_ENCODED; if (!AuthKit.hasContentType(contentType, expectedContentType)) { throw AuthKit.handleBadContentTypeException(expectedContentType); } } | /**
* validate content type
* @param request
* @throws AuthProblemException
*/ | validate content type | validateContentType | {
"repo_name": "BruceZCQ/AuthServer",
"path": "src/java/cn/zhucongqi/validators/AuthValidator.java",
"license": "mit",
"size": 4484
} | [
"cn.zhucongqi.consts.Consts",
"cn.zhucongqi.exception.AuthProblemException",
"cn.zhucongqi.kit.AuthKit"
] | import cn.zhucongqi.consts.Consts; import cn.zhucongqi.exception.AuthProblemException; import cn.zhucongqi.kit.AuthKit; | import cn.zhucongqi.consts.*; import cn.zhucongqi.exception.*; import cn.zhucongqi.kit.*; | [
"cn.zhucongqi.consts",
"cn.zhucongqi.exception",
"cn.zhucongqi.kit"
] | cn.zhucongqi.consts; cn.zhucongqi.exception; cn.zhucongqi.kit; | 1,352,962 |
public void processNextPattern(boolean shufflePresentationOrder){
//If all priorities declared conform to specification then process the
//current stimulus-response pair.
if(this.checkPriorities()){
_model.setEngagedInExperiment();
_model.freeze (); // save all gui updates to the e... | void function(boolean shufflePresentationOrder){ if(this.checkPriorities()){ _model.setEngagedInExperiment(); _model.freeze (); if(shufflePresentationOrder){ this.shuffleStimulusResponsePairs(); } if(this._stimulusResponseNumber == 0){ this._responses.add( new HashMap<>() ); this._cheats.add( new HashMap<>() ); this._e... | /**
* Attempts to associate the second pattern with the first pattern of a
specified pattern if they are both learned or attempts to recogniseAndLearn and
associate them every millisecond until the presentation time specified is
reached.
*
* @param shufflePresentationOrder Set to true if the presentatio... | Attempts to associate the second pattern with the first pattern of a | processNextPattern | {
"repo_name": "mlk5060/jchrest",
"path": "src/main/java/jchrest/lib/PairedAssociateExperiment.java",
"license": "gpl-3.0",
"size": 30537
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 2,588,865 |
public OptionalInt bytesNeeded(Collection<T> records, ObjectSerializationCache serializationCache) {
int bytesNeeded = bytesNeededForRecords(
records,
serializationCache
);
if (!isOpenForAppends) {
return OptionalInt.of(batchHeaderSizeInBytes() + bytesNee... | OptionalInt function(Collection<T> records, ObjectSerializationCache serializationCache) { int bytesNeeded = bytesNeededForRecords( records, serializationCache ); if (!isOpenForAppends) { return OptionalInt.of(batchHeaderSizeInBytes() + bytesNeeded); } int approxUnusedSizeInBytes = maxBytes - approximateSizeInBytes(); ... | /**
* Check whether the batch has enough room for all the record values.
*
* Returns an empty {@link OptionalInt} if the batch builder has room for this list of records.
* Otherwise it returns the expected number of bytes needed for a batch to contain these records.
*
* @param records the ... | Check whether the batch has enough room for all the record values. Returns an empty <code>OptionalInt</code> if the batch builder has room for this list of records. Otherwise it returns the expected number of bytes needed for a batch to contain these records | bytesNeeded | {
"repo_name": "guozhangwang/kafka",
"path": "raft/src/main/java/org/apache/kafka/raft/internals/BatchBuilder.java",
"license": "apache-2.0",
"size": 12417
} | [
"java.util.Collection",
"java.util.OptionalInt",
"org.apache.kafka.common.protocol.ObjectSerializationCache"
] | import java.util.Collection; import java.util.OptionalInt; import org.apache.kafka.common.protocol.ObjectSerializationCache; | import java.util.*; import org.apache.kafka.common.protocol.*; | [
"java.util",
"org.apache.kafka"
] | java.util; org.apache.kafka; | 2,116,715 |
public static ITypeBinding[] getQualifierGuess(ASTNode searchRoot, final String selector, List<Expression> arguments, final IBinding context) {
final int nArgs= arguments.size();
final ArrayList<ITypeBinding> result= new ArrayList<ITypeBinding>();
// test if selector is a object method
ITypeBinding binding=... | static ITypeBinding[] function(ASTNode searchRoot, final String selector, List<Expression> arguments, final IBinding context) { final int nArgs= arguments.size(); final ArrayList<ITypeBinding> result= new ArrayList<ITypeBinding>(); ITypeBinding binding= searchRoot.getAST().resolveWellKnownType(STR); IMethodBinding[] ob... | /**
* Finds all type bindings that contain a method of a given signature
* @param searchRoot the ast node to start the search from
* @param selector the method name
* @param arguments the method arguments
* @param context the context in which the method would be called
* @return returns al... | Finds all type bindings that contain a method of a given signature | getQualifierGuess | {
"repo_name": "kumattau/JDTPatch",
"path": "org.eclipse.jdt.ui/src/org/eclipse/jdt/internal/ui/text/correction/ASTResolving.java",
"license": "epl-1.0",
"size": 44243
} | [
"java.util.ArrayList",
"java.util.HashSet",
"java.util.List",
"org.eclipse.jdt.core.dom.ASTNode",
"org.eclipse.jdt.core.dom.Expression",
"org.eclipse.jdt.core.dom.IBinding",
"org.eclipse.jdt.core.dom.IMethodBinding",
"org.eclipse.jdt.core.dom.ITypeBinding",
"org.eclipse.jdt.internal.corext.dom.TypeB... | import java.util.ArrayList; import java.util.HashSet; import java.util.List; import org.eclipse.jdt.core.dom.ASTNode; import org.eclipse.jdt.core.dom.Expression; import org.eclipse.jdt.core.dom.IBinding; import org.eclipse.jdt.core.dom.IMethodBinding; import org.eclipse.jdt.core.dom.ITypeBinding; import org.eclipse.jdt... | import java.util.*; import org.eclipse.jdt.core.dom.*; import org.eclipse.jdt.internal.corext.dom.*; | [
"java.util",
"org.eclipse.jdt"
] | java.util; org.eclipse.jdt; | 281,540 |
public Plan plan() {
return this.plan;
} | Plan function() { return this.plan; } | /**
* Get the plan value.
*
* @return the plan value
*/ | Get the plan value | plan | {
"repo_name": "navalev/azure-sdk-for-java",
"path": "sdk/compute/mgmt-v2017_03_30/src/main/java/com/microsoft/azure/management/compute/v2017_03_30/implementation/VirtualMachineScaleSetVMInner.java",
"license": "mit",
"size": 11363
} | [
"com.microsoft.azure.management.compute.v2017_03_30.Plan"
] | import com.microsoft.azure.management.compute.v2017_03_30.Plan; | import com.microsoft.azure.management.compute.v2017_03_30.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 154,078 |
private SqlNode nthSelectItem(int ordinal, final SqlParserPos pos) {
// TODO: Don't expand the list every time. Maybe keep an expanded
// version of each expression -- select lists and identifiers -- in
// the validator.
SqlNodeList expandedSelectList =
expandStar(
s... | SqlNode function(int ordinal, final SqlParserPos pos) { SqlNodeList expandedSelectList = expandStar( select.getSelectList(), select, false); SqlNode expr = expandedSelectList.get(ordinal); expr = stripAs(expr); if (expr instanceof SqlIdentifier) { expr = getScope().fullyQualify((SqlIdentifier) expr).identifier; } retur... | /**
* Returns the <code>ordinal</code>th item in the select list.
*/ | Returns the <code>ordinal</code>th item in the select list | nthSelectItem | {
"repo_name": "julianhyde/calcite",
"path": "core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java",
"license": "apache-2.0",
"size": 234622
} | [
"org.apache.calcite.sql.SqlIdentifier",
"org.apache.calcite.sql.SqlNode",
"org.apache.calcite.sql.SqlNodeList",
"org.apache.calcite.sql.SqlUtil",
"org.apache.calcite.sql.parser.SqlParserPos"
] | import org.apache.calcite.sql.SqlIdentifier; import org.apache.calcite.sql.SqlNode; import org.apache.calcite.sql.SqlNodeList; import org.apache.calcite.sql.SqlUtil; import org.apache.calcite.sql.parser.SqlParserPos; | import org.apache.calcite.sql.*; import org.apache.calcite.sql.parser.*; | [
"org.apache.calcite"
] | org.apache.calcite; | 1,297,938 |
public void deactivate(ComponentContext cc) throws IOException {
FaultToleranceProviderResolver.setInstance(null);
} | void function(ComponentContext cc) throws IOException { FaultToleranceProviderResolver.setInstance(null); } | /**
* Deactivate a context and set the instance to null
*
* @param cc
*/ | Deactivate a context and set the instance to null | deactivate | {
"repo_name": "kgibm/open-liberty",
"path": "dev/com.ibm.ws.microprofile.faulttolerance/src/com/ibm/ws/microprofile/faulttolerance/impl/AbstractProviderResolverImpl.java",
"license": "epl-1.0",
"size": 4580
} | [
"com.ibm.ws.microprofile.faulttolerance.spi.FaultToleranceProviderResolver",
"java.io.IOException",
"org.osgi.service.component.ComponentContext"
] | import com.ibm.ws.microprofile.faulttolerance.spi.FaultToleranceProviderResolver; import java.io.IOException; import org.osgi.service.component.ComponentContext; | import com.ibm.ws.microprofile.faulttolerance.spi.*; import java.io.*; import org.osgi.service.component.*; | [
"com.ibm.ws",
"java.io",
"org.osgi.service"
] | com.ibm.ws; java.io; org.osgi.service; | 1,005,585 |
public static List<Node> nodesTopologicalSorting(List<Node> givenNodes) {
List<Node> result = new ArrayList<Node>();
Stack<Node> roots = new Stack<Node>();
List<Node> loopComponents = new ArrayList<Node>();
// find root nodes - nodes without precedent nodes in the given list of nodes
for (Node givenNod... | static List<Node> function(List<Node> givenNodes) { List<Node> result = new ArrayList<Node>(); Stack<Node> roots = new Stack<Node>(); List<Node> loopComponents = new ArrayList<Node>(); for (Node givenNode : givenNodes) { if (findPrecedentNodes(givenNode, givenNodes).isEmpty()) { roots.add(givenNode); } else { if (given... | /**
* Components topological sorting based on Kahn algorithm.
* This algorithm is used for user friendly nodes visualisation
* and for single thread graph execution, see {@link SingleThreadWatchDog}.
*
* @param givenNodes scope in which the topological sorting is performed - only mentioned components are con... | Components topological sorting based on Kahn algorithm. This algorithm is used for user friendly nodes visualisation and for single thread graph execution, see <code>SingleThreadWatchDog</code> | nodesTopologicalSorting | {
"repo_name": "CloverETL/CloverETL-Engine",
"path": "cloveretl.engine/src/org/jetel/graph/TransformationGraphAnalyzer.java",
"license": "lgpl-2.1",
"size": 41449
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.Stack",
"org.jetel.graph.analyse.LoopsInspector"
] | import java.util.ArrayList; import java.util.List; import java.util.Stack; import org.jetel.graph.analyse.LoopsInspector; | import java.util.*; import org.jetel.graph.analyse.*; | [
"java.util",
"org.jetel.graph"
] | java.util; org.jetel.graph; | 1,376,879 |
public List<String> requiredZoneNames() {
return this.innerProperties() == null ? null : this.innerProperties().requiredZoneNames();
} | List<String> function() { return this.innerProperties() == null ? null : this.innerProperties().requiredZoneNames(); } | /**
* Get the requiredZoneNames property: Required private DNS zone names.
*
* @return the requiredZoneNames value.
*/ | Get the requiredZoneNames property: Required private DNS zone names | requiredZoneNames | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/signalr/azure-resourcemanager-signalr/src/main/java/com/azure/resourcemanager/signalr/fluent/models/PrivateLinkResourceInner.java",
"license": "mit",
"size": 5027
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,370,697 |
public void readAll() throws InterruptedException, IOException {
start();
close();
} | void function() throws InterruptedException, IOException { start(); close(); } | /**
* Reads the standard output and standard error from the process and waits
* for the process to complete.
*
* @throws InterruptedException thrown if the processing threads are
* interrupted
* @throws IOException thrown if there is an error reading from the process
*/ | Reads the standard output and standard error from the process and waits for the process to complete | readAll | {
"repo_name": "jeremylong/DependencyCheck",
"path": "utils/src/main/java/org/owasp/dependencycheck/utils/processing/ProcessReader.java",
"license": "apache-2.0",
"size": 5679
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,742,035 |
public byte[] encrypt(byte[] input, long msSinceStart) {
try {
Object key = TwoFish.makeKey(KEY);
Rand rand = new Rand(msSinceStart);
byte[] iv = this.makeIv(rand);
int blockCount = (input.length + 256) / 256;
int outputSize = (blockCount * 256) + 5;
byte[] output = new byte[outputSize];
out... | byte[] function(byte[] input, long msSinceStart) { try { Object key = TwoFish.makeKey(KEY); Rand rand = new Rand(msSinceStart); byte[] iv = this.makeIv(rand); int blockCount = (input.length + 256) / 256; int outputSize = (blockCount * 256) + 5; byte[] output = new byte[outputSize]; output[0] = (byte) (msSinceStart >> 2... | /**
* Encrypts the given signature
*
* @param input input data
* @param msSinceStart time since start
* @return encrypted signature
*/ | Encrypts the given signature | encrypt | {
"repo_name": "gegy1000/PokeGOAPI-Java",
"path": "library/src/main/java/com/pokegoapi/util/hash/crypto/Crypto.java",
"license": "gpl-3.0",
"size": 5257
} | [
"java.security.InvalidKeyException"
] | import java.security.InvalidKeyException; | import java.security.*; | [
"java.security"
] | java.security; | 2,486,110 |
@Nullable Term xy(Term t); | @Nullable Term xy(Term t); | /**
* the assigned value for x
*/ | the assigned value for x | xy | {
"repo_name": "automenta/narchy",
"path": "nal/src/main/java/nars/term/util/transform/Subst.java",
"license": "agpl-3.0",
"size": 1215
} | [
"org.jetbrains.annotations.Nullable"
] | import org.jetbrains.annotations.Nullable; | import org.jetbrains.annotations.*; | [
"org.jetbrains.annotations"
] | org.jetbrains.annotations; | 2,681,798 |
public int add (Cursor cursor)
{
int position;
int last;
int ret;
position = cursor.getPosition ();
if (0 == mCount)
{
ret = 0;
insertElementAt (position, ret);
}
else
{
last = mIndices[mCount - 1];
... | int function (Cursor cursor) { int position; int last; int ret; position = cursor.getPosition (); if (0 == mCount) { ret = 0; insertElementAt (position, ret); } else { last = mIndices[mCount - 1]; if (position == last) ret = mCount - 1; else if (position > last) { ret = mCount; insertElementAt (position, ret); } else {... | /**
* Add an element to the list
* @param cursor The element to add.
* @return The position at which the element was inserted or
* the index of the existing element if it is a duplicate.
*/ | Add an element to the list | add | {
"repo_name": "besom/bbossgroups-mvn",
"path": "bboss_taglib/src/main/java/org/htmlparser/lexer/PageIndex.java",
"license": "apache-2.0",
"size": 12007
} | [
"org.htmlparser.util.sort.Sort"
] | import org.htmlparser.util.sort.Sort; | import org.htmlparser.util.sort.*; | [
"org.htmlparser.util"
] | org.htmlparser.util; | 2,184,277 |
public static Path getClusterHighAvailableStoragePath(Configuration configuration) {
final String storagePath = configuration.getValue(HighAvailabilityOptions.HA_STORAGE_PATH);
if (isNullOrWhitespaceOnly(storagePath)) {
throw new IllegalConfigurationException(
"Confi... | static Path function(Configuration configuration) { final String storagePath = configuration.getValue(HighAvailabilityOptions.HA_STORAGE_PATH); if (isNullOrWhitespaceOnly(storagePath)) { throw new IllegalConfigurationException( STR + HighAvailabilityOptions.HA_STORAGE_PATH); } final Path path; try { path = new Path(sto... | /**
* Gets the cluster high available storage path from the provided configuration.
*
* <p>The format is {@code HA_STORAGE_PATH/HA_CLUSTER_ID}.
*
* @param configuration containing the configuration values
* @return Path under which all highly available cluster artifacts are being stored
... | Gets the cluster high available storage path from the provided configuration. The format is HA_STORAGE_PATH/HA_CLUSTER_ID | getClusterHighAvailableStoragePath | {
"repo_name": "StephanEwen/incubator-flink",
"path": "flink-runtime/src/main/java/org/apache/flink/runtime/highavailability/HighAvailabilityServicesUtils.java",
"license": "apache-2.0",
"size": 13815
} | [
"org.apache.flink.configuration.Configuration",
"org.apache.flink.configuration.HighAvailabilityOptions",
"org.apache.flink.configuration.IllegalConfigurationException",
"org.apache.flink.core.fs.Path"
] | import org.apache.flink.configuration.Configuration; import org.apache.flink.configuration.HighAvailabilityOptions; import org.apache.flink.configuration.IllegalConfigurationException; import org.apache.flink.core.fs.Path; | import org.apache.flink.configuration.*; import org.apache.flink.core.fs.*; | [
"org.apache.flink"
] | org.apache.flink; | 1,139,617 |
public boolean hasTaxons(Set<String> taxonIds) {
Set<String> taxonIdSet = new HashSet<String>();
for (MultiKey key : orgIdMaps.keySet()) {
taxonIdSet.add((String) key.getKey(0));
}
return taxonIdSet.containsAll(taxonIds);
} | boolean function(Set<String> taxonIds) { Set<String> taxonIdSet = new HashSet<String>(); for (MultiKey key : orgIdMaps.keySet()) { taxonIdSet.add((String) key.getKey(0)); } return taxonIdSet.containsAll(taxonIds); } | /**
* Return true if the idResolver contains information about a collection of taxon id.
* @param taxonIds a collection of organism to check for
* @return true if data about this taxon id
*/ | Return true if the idResolver contains information about a collection of taxon id | hasTaxons | {
"repo_name": "elsiklab/intermine",
"path": "bio/core/main/src/org/intermine/bio/dataconversion/IdResolver.java",
"license": "lgpl-2.1",
"size": 23378
} | [
"java.util.HashSet",
"java.util.Set",
"org.apache.commons.collections.keyvalue.MultiKey"
] | import java.util.HashSet; import java.util.Set; import org.apache.commons.collections.keyvalue.MultiKey; | import java.util.*; import org.apache.commons.collections.keyvalue.*; | [
"java.util",
"org.apache.commons"
] | java.util; org.apache.commons; | 2,826,238 |
public void sendTransformationXMLToSlaveServer( TransMeta transMeta,
TransExecutionConfiguration executionConfiguration ) {
try {
Trans.sendToSlaveServer( transMeta, executionConfiguration, rep, metaStore );
} catch ( Exception e ) {
new ErrorDialog( shell, "Error", "Error sending transformati... | void function( TransMeta transMeta, TransExecutionConfiguration executionConfiguration ) { try { Trans.sendToSlaveServer( transMeta, executionConfiguration, rep, metaStore ); } catch ( Exception e ) { new ErrorDialog( shell, "Error", STR, e ); } } | /**
* Sends transformation to slave server
*
* @param executionConfiguration
*/ | Sends transformation to slave server | sendTransformationXMLToSlaveServer | {
"repo_name": "GauravAshara/pentaho-kettle",
"path": "ui/src/org/pentaho/di/ui/spoon/Spoon.java",
"license": "apache-2.0",
"size": 340195
} | [
"org.pentaho.di.trans.Trans",
"org.pentaho.di.trans.TransExecutionConfiguration",
"org.pentaho.di.trans.TransMeta",
"org.pentaho.di.ui.core.dialog.ErrorDialog"
] | import org.pentaho.di.trans.Trans; import org.pentaho.di.trans.TransExecutionConfiguration; import org.pentaho.di.trans.TransMeta; import org.pentaho.di.ui.core.dialog.ErrorDialog; | import org.pentaho.di.trans.*; import org.pentaho.di.ui.core.dialog.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 830,192 |
public SecuritySubject authenticatedSubject(UUID subjId) throws IgniteException; | SecuritySubject function(UUID subjId) throws IgniteException; | /**
* Gets security subject based on subject ID.
*
* @param subjId Subject ID.
* @return Authorized security subject.
* @throws IgniteException If any exception occurs.
*/ | Gets security subject based on subject ID | authenticatedSubject | {
"repo_name": "samaitra/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/spi/IgniteSpiContext.java",
"license": "apache-2.0",
"size": 14487
} | [
"org.apache.ignite.IgniteException",
"org.apache.ignite.plugin.security.SecuritySubject"
] | import org.apache.ignite.IgniteException; import org.apache.ignite.plugin.security.SecuritySubject; | import org.apache.ignite.*; import org.apache.ignite.plugin.security.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 1,071,616 |
private SubstringSearchResult bufferSubstringSearch(boolean isDaemon, File file, int fileLength, int offsetToBuf,
int initBufOffset, BufferedInputStream stream, Integer bytesSkipped,
int bytesRead, ByteBu... | SubstringSearchResult function(boolean isDaemon, File file, int fileLength, int offsetToBuf, int initBufOffset, BufferedInputStream stream, Integer bytesSkipped, int bytesRead, ByteBuffer haystack, byte[] needle, List<Map<String, Object>> initialMatches, Integer numMatches, byte[] beforeBytes) throws IOException { int ... | /**
* As the file is read into a buffer, 1/2 the buffer's size at a time, we search the buffer for matches of the
* substring and return a list of zero or more matches.
*/ | As the file is read into a buffer, 1/2 the buffer's size at a time, we search the buffer for matches of the substring and return a list of zero or more matches | bufferSubstringSearch | {
"repo_name": "knusbaum/incubator-storm",
"path": "storm-webapp/src/main/java/org/apache/storm/daemon/logviewer/handler/LogviewerLogSearchHandler.java",
"license": "apache-2.0",
"size": 32797
} | [
"java.io.BufferedInputStream",
"java.io.File",
"java.io.IOException",
"java.nio.ByteBuffer",
"java.util.Arrays",
"java.util.List",
"java.util.Map",
"org.apache.storm.daemon.utils.ListFunctionalSupport"
] | import java.io.BufferedInputStream; import java.io.File; import java.io.IOException; import java.nio.ByteBuffer; import java.util.Arrays; import java.util.List; import java.util.Map; import org.apache.storm.daemon.utils.ListFunctionalSupport; | import java.io.*; import java.nio.*; import java.util.*; import org.apache.storm.daemon.utils.*; | [
"java.io",
"java.nio",
"java.util",
"org.apache.storm"
] | java.io; java.nio; java.util; org.apache.storm; | 884,968 |
@Override
public void onMoved(int fromPosition, int toPosition) {
if (DEBUG){
Log.e(TAG, "onMoved: ");
}
notifyItemRangeChanged(fromPosition, toPosition - fromPosition + 1);
} | void function(int fromPosition, int toPosition) { if (DEBUG){ Log.e(TAG, STR); } notifyItemRangeChanged(fromPosition, toPosition - fromPosition + 1); } | /**
* Currently Leanback support library doesn't support move operation, use item range
* changed method to replace it as a temporal solution.
* @param fromPosition from position.
* @param toPosition to position.
*/ | Currently Leanback support library doesn't support move operation, use item range changed method to replace it as a temporal solution | onMoved | {
"repo_name": "googlearchive/leanback-showcase",
"path": "app/src/main/java/android/support/v17/leanback/supportleanbackshowcase/app/room/adapter/ListAdapter.java",
"license": "apache-2.0",
"size": 9530
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 105,117 |
protected void addHttpData(InterfaceHttpData data) {
if (data == null) {
return;
}
List<InterfaceHttpData> datas = bodyMapHttpData.get(data.getName());
if (datas == null) {
datas = new ArrayList<>(1);
bodyMapHttpData.put(data.getName(), datas);
... | void function(InterfaceHttpData data) { if (data == null) { return; } List<InterfaceHttpData> datas = bodyMapHttpData.get(data.getName()); if (datas == null) { datas = new ArrayList<>(1); bodyMapHttpData.put(data.getName(), datas); } datas.add(data); bodyListHttpData.add(data); } | /**
* Utility function to add a new decoded data
*/ | Utility function to add a new decoded data | addHttpData | {
"repo_name": "gerdriesselmann/netty",
"path": "codec-http/src/main/java/io/netty/handler/codec/http/multipart/HttpPostMultipartRequestDecoder.java",
"license": "apache-2.0",
"size": 60251
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 507,700 |
public void setAgents(Collection pagents)
{
agents = pagents;
} | void function(Collection pagents) { agents = pagents; } | /**
* set the agent collection
*
* @param pagents the collection
*/ | set the agent collection | setAgents | {
"repo_name": "rodriguezdevera/sakai",
"path": "samigo/samigo-app/src/java/org/sakaiproject/tool/assessment/ui/bean/evaluation/TotalScoresBean.java",
"license": "apache-2.0",
"size": 33629
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,721,580 |
public void parse(PrettyConfigBuilder builder, InputStream resource) throws IOException, SAXException; | void function(PrettyConfigBuilder builder, InputStream resource) throws IOException, SAXException; | /**
* Parses the input stream and feeds configuration elements to the builder.
*
* @param builder
* target builder, must not be <code>null</code>.
* @param resource
* input stream to be parsed, must not be <code>null</code>
* @throws IOException
* ... | Parses the input stream and feeds configuration elements to the builder | parse | {
"repo_name": "ocpsoft/prettyfaces",
"path": "core/src/main/java/com/ocpsoft/pretty/faces/config/PrettyConfigParser.java",
"license": "apache-2.0",
"size": 1440
} | [
"java.io.IOException",
"java.io.InputStream",
"org.xml.sax.SAXException"
] | import java.io.IOException; import java.io.InputStream; import org.xml.sax.SAXException; | import java.io.*; import org.xml.sax.*; | [
"java.io",
"org.xml.sax"
] | java.io; org.xml.sax; | 1,642,081 |
public static SmeltEvent.Tick createSmeltEventTick(Cause cause, ItemStackSnapshot fuel, Furnace targetTile, List<? extends Transaction<ItemStackSnapshot>> transactions) {
HashMap<String, Object> values = new HashMap<>();
values.put("cause", cause);
values.put("fuel", fuel);
values.pu... | static SmeltEvent.Tick function(Cause cause, ItemStackSnapshot fuel, Furnace targetTile, List<? extends Transaction<ItemStackSnapshot>> transactions) { HashMap<String, Object> values = new HashMap<>(); values.put("cause", cause); values.put("fuel", fuel); values.put(STR, targetTile); values.put(STR, transactions); retu... | /**
* AUTOMATICALLY GENERATED, DO NOT EDIT.
* Creates a new instance of
* {@link org.spongepowered.api.event.block.tileentity.SmeltEvent.Tick}.
*
* @param cause The cause
* @param fuel The fuel
* @param targetTile The target tile
* @param transactions The transactions
* @ret... | AUTOMATICALLY GENERATED, DO NOT EDIT. Creates a new instance of <code>org.spongepowered.api.event.block.tileentity.SmeltEvent.Tick</code> | createSmeltEventTick | {
"repo_name": "kashike/SpongeAPI",
"path": "src/main/java/org/spongepowered/api/event/SpongeEventFactory.java",
"license": "mit",
"size": 215110
} | [
"java.util.HashMap",
"java.util.List",
"org.spongepowered.api.block.tileentity.carrier.Furnace",
"org.spongepowered.api.data.Transaction",
"org.spongepowered.api.event.block.tileentity.SmeltEvent",
"org.spongepowered.api.event.cause.Cause",
"org.spongepowered.api.item.inventory.ItemStackSnapshot"
] | import java.util.HashMap; import java.util.List; import org.spongepowered.api.block.tileentity.carrier.Furnace; import org.spongepowered.api.data.Transaction; import org.spongepowered.api.event.block.tileentity.SmeltEvent; import org.spongepowered.api.event.cause.Cause; import org.spongepowered.api.item.inventory.ItemS... | import java.util.*; import org.spongepowered.api.block.tileentity.carrier.*; import org.spongepowered.api.data.*; import org.spongepowered.api.event.block.tileentity.*; import org.spongepowered.api.event.cause.*; import org.spongepowered.api.item.inventory.*; | [
"java.util",
"org.spongepowered.api"
] | java.util; org.spongepowered.api; | 1,946,666 |
public static ShoppingCartItem makeItem(Integer cartLocation, GenericValue product, BigDecimal selectedAmount,
BigDecimal quantity, BigDecimal unitPrice, Timestamp reservStart, BigDecimal reservLength, BigDecimal reservPersons,
String accommodationMapId,String accommodationSpotId,
... | static ShoppingCartItem function(Integer cartLocation, GenericValue product, BigDecimal selectedAmount, BigDecimal quantity, BigDecimal unitPrice, Timestamp reservStart, BigDecimal reservLength, BigDecimal reservPersons, String accommodationMapId,String accommodationSpotId, Timestamp shipBeforeDate, Timestamp shipAfter... | /**
* Makes a ShoppingCartItem and adds it to the cart.
* @param accommodationMapId Optional. reservations add into workeffort
* @param accommodationSpotId Optional. reservations add into workeffort
*/ | Makes a ShoppingCartItem and adds it to the cart | makeItem | {
"repo_name": "rohankarthik/Ofbiz",
"path": "applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/ShoppingCartItem.java",
"license": "apache-2.0",
"size": 126382
} | [
"java.math.BigDecimal",
"java.sql.Timestamp",
"java.util.Map",
"org.apache.ofbiz.base.util.Debug",
"org.apache.ofbiz.base.util.UtilDateTime",
"org.apache.ofbiz.base.util.UtilMisc",
"org.apache.ofbiz.base.util.UtilProperties",
"org.apache.ofbiz.entity.GenericValue",
"org.apache.ofbiz.order.shoppingca... | import java.math.BigDecimal; import java.sql.Timestamp; import java.util.Map; import org.apache.ofbiz.base.util.Debug; import org.apache.ofbiz.base.util.UtilDateTime; import org.apache.ofbiz.base.util.UtilMisc; import org.apache.ofbiz.base.util.UtilProperties; import org.apache.ofbiz.entity.GenericValue; import org.apa... | import java.math.*; import java.sql.*; import java.util.*; import org.apache.ofbiz.base.util.*; import org.apache.ofbiz.entity.*; import org.apache.ofbiz.order.shoppingcart.*; import org.apache.ofbiz.product.config.*; import org.apache.ofbiz.service.*; | [
"java.math",
"java.sql",
"java.util",
"org.apache.ofbiz"
] | java.math; java.sql; java.util; org.apache.ofbiz; | 1,548,184 |
Endpoint getEndpoint(NormalizedEndpointUri uri); | Endpoint getEndpoint(NormalizedEndpointUri uri); | /**
* Resolves the given name to an {@link Endpoint} of the specified type. If the name has a singleton endpoint
* registered, then the singleton is returned. Otherwise, a new {@link Endpoint} is created and registered in the
* {@link org.apache.camel.spi.EndpointRegistry}.
*
* @param uri the ... | Resolves the given name to an <code>Endpoint</code> of the specified type. If the name has a singleton endpoint registered, then the singleton is returned. Otherwise, a new <code>Endpoint</code> is created and registered in the <code>org.apache.camel.spi.EndpointRegistry</code> | getEndpoint | {
"repo_name": "christophd/camel",
"path": "core/camel-api/src/main/java/org/apache/camel/ExtendedCamelContext.java",
"license": "apache-2.0",
"size": 29137
} | [
"org.apache.camel.spi.NormalizedEndpointUri"
] | import org.apache.camel.spi.NormalizedEndpointUri; | import org.apache.camel.spi.*; | [
"org.apache.camel"
] | org.apache.camel; | 2,479,349 |
public static Optional<String> getChannel(final RequestContext requestContext) {
return Optional.ofNullable((String) requestContext.getFlowScope().get("accepttoChannel"));
} | static Optional<String> function(final RequestContext requestContext) { return Optional.ofNullable((String) requestContext.getFlowScope().get(STR)); } | /**
* Gets channel.
*
* @param requestContext the request context
* @return the channel
*/ | Gets channel | getChannel | {
"repo_name": "apereo/cas",
"path": "support/cas-server-support-acceptto-mfa/src/main/java/org/apereo/cas/mfa/accepto/web/flow/AccepttoWebflowUtils.java",
"license": "apache-2.0",
"size": 5587
} | [
"java.util.Optional",
"org.springframework.webflow.execution.RequestContext"
] | import java.util.Optional; import org.springframework.webflow.execution.RequestContext; | import java.util.*; import org.springframework.webflow.execution.*; | [
"java.util",
"org.springframework.webflow"
] | java.util; org.springframework.webflow; | 1,573,063 |
@Override
public final Iterator<String> iterator() {
return this;
}
| final Iterator<String> function() { return this; } | /**
* Returns itself as an Iterator. <br />
* Allows for a quick iteration over the splitted Strings and the delimiters.
* @see java.lang.Iterable#iterator()
*/ | Returns itself as an Iterator. Allows for a quick iteration over the splitted Strings and the delimiters | iterator | {
"repo_name": "sergioag/cobol2java",
"path": "src/main/java/com/res/java/lib/StringTokenizerEx.java",
"license": "gpl-3.0",
"size": 7841
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 297,168 |
private void checkGeneratedFilesOverlap(BuildUnit<?> unit) throws IOException {
BuildUnit<?> other = generatedFiles.put(unit.getPersistentPath(), unit);
if (other != null && other != unit)
throw new DuplicateBuildUnitPathException("Build unit " + unit + " has same persistent path as build unit " + other... | void function(BuildUnit<?> unit) throws IOException { BuildUnit<?> other = generatedFiles.put(unit.getPersistentPath(), unit); if (other != null && other != unit) throw new DuplicateBuildUnitPathException(STR + unit + STR + other); Set<File> files = unit.getGeneratedFiles(); genBy.addForEach(files, unit.getPersistentPa... | /**
* The build unit must have a unique persistent path and may not generated
* files previously generated by another build unit.
*/ | The build unit must have a unique persistent path and may not generated files previously generated by another build unit | checkGeneratedFilesOverlap | {
"repo_name": "pluto-build/pluto",
"path": "src/build/pluto/builder/DynamicAnalysis.java",
"license": "apache-2.0",
"size": 8736
} | [
"build.pluto.BuildUnit",
"build.pluto.dependency.DuplicateBuildUnitPathException",
"build.pluto.dependency.DuplicateFileGenerationException",
"java.io.File",
"java.io.IOException",
"java.util.Set"
] | import build.pluto.BuildUnit; import build.pluto.dependency.DuplicateBuildUnitPathException; import build.pluto.dependency.DuplicateFileGenerationException; import java.io.File; import java.io.IOException; import java.util.Set; | import build.pluto.*; import build.pluto.dependency.*; import java.io.*; import java.util.*; | [
"build.pluto",
"build.pluto.dependency",
"java.io",
"java.util"
] | build.pluto; build.pluto.dependency; java.io; java.util; | 2,108,612 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.