method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public void writeLongIntMap(DataOutput out, Map<Long, Integer> map) throws IOException {
SerializationHelper.writeObject(out, map);
}
| void function(DataOutput out, Map<Long, Integer> map) throws IOException { SerializationHelper.writeObject(out, map); } | /**
* Writes a Map of Long key and Integer value pairs. This method handles
* the case when the Map is <tt>null</tt>.
*
* @param out the output stream.
* @param map the Map of Long key/Integer value pairs.
* @throws IOException if an error occurs.
*/ | Writes a Map of Long key and Integer value pairs. This method handles the case when the Map is null | writeLongIntMap | {
"repo_name": "surevine/openfire-bespoke",
"path": "src/plugins/hazelcast/src/java/com/jivesoftware/util/cache/ClusterExternalizableUtil.java",
"license": "gpl-2.0",
"size": 10497
} | [
"com.hazelcast.nio.SerializationHelper",
"java.io.DataOutput",
"java.io.IOException",
"java.util.Map"
] | import com.hazelcast.nio.SerializationHelper; import java.io.DataOutput; import java.io.IOException; import java.util.Map; | import com.hazelcast.nio.*; import java.io.*; import java.util.*; | [
"com.hazelcast.nio",
"java.io",
"java.util"
] | com.hazelcast.nio; java.io; java.util; | 2,799,505 |
public Object transcribe( Chromosome c ) throws TranscriberException; | Object function( Chromosome c ) throws TranscriberException; | /**
* Sub-classes must implement this method to convert the genotype to a phenotype.
* @param c chromosome to transcribe
* @return phenotype
* @throws TranscriberException
*/ | Sub-classes must implement this method to convert the genotype to a phenotype | transcribe | {
"repo_name": "jasoyode/gasneat",
"path": "src/main/java/com/anji/integration/Transcriber.java",
"license": "gpl-3.0",
"size": 1433
} | [
"org.jgap.Chromosome"
] | import org.jgap.Chromosome; | import org.jgap.*; | [
"org.jgap"
] | org.jgap; | 34,620 |
boolean refresh() {
String scope = TextUtils.join(OAuth.SCOPE_DELIMITER, this.session.getScopes());
String refreshToken = this.session.getRefreshToken();
if (TextUtils.isEmpty(refreshToken)) {
return false;
}
RefreshAccessTokenRequest request =
n... | boolean refresh() { String scope = TextUtils.join(OAuth.SCOPE_DELIMITER, this.session.getScopes()); String refreshToken = this.session.getRefreshToken(); if (TextUtils.isEmpty(refreshToken)) { return false; } RefreshAccessTokenRequest request = new RefreshAccessTokenRequest(this.httpClient, this.clientId, refreshToken,... | /**
* Refreshes the previously created session.
*
* @return true if the session was successfully refreshed.
*/ | Refreshes the previously created session | refresh | {
"repo_name": "red13dotnet/keepass2android",
"path": "src/java/JavaFileStorage/src/com/microsoft/live/LiveAuthClient.java",
"license": "gpl-3.0",
"size": 25192
} | [
"android.text.TextUtils"
] | import android.text.TextUtils; | import android.text.*; | [
"android.text"
] | android.text; | 1,069,986 |
SortedSet<BasicInterval> headSetInclusive(int upperBound) {
BasicInterval newUpperBound = new BasicInterval(upperBound + 1, upperBound + 1);
return headSet(newUpperBound);
} | SortedSet<BasicInterval> headSetInclusive(int upperBound) { BasicInterval newUpperBound = new BasicInterval(upperBound + 1, upperBound + 1); return headSet(newUpperBound); } | /**
* Compute the headSet() [from java.util.SortedSet] but include all
* elements less than upperBound <em>inclusive</em>
*/ | Compute the headSet() [from java.util.SortedSet] but include all elements less than upperBound inclusive | headSetInclusive | {
"repo_name": "CodeOffloading/JikesRVM-CCO",
"path": "jikesrvm-3.1.3/rvm/src/org/jikesrvm/compilers/opt/regalloc/LinearScan.java",
"license": "epl-1.0",
"size": 88417
} | [
"java.util.SortedSet"
] | import java.util.SortedSet; | import java.util.*; | [
"java.util"
] | java.util; | 2,182,424 |
return array == null ?
com.google.common.collect.Lists.<T>newArrayList() : Arrays.asList(array);
} | return array == null ? com.google.common.collect.Lists.<T>newArrayList() : Arrays.asList(array); } | /**
* Transform an array T[] into a List of T.
*
* @param array the generic T[] to transform
* @return a converted List of Ts
*/ | Transform an array T[] into a List of T | asList | {
"repo_name": "stoksey69/googleads-java-lib",
"path": "modules/adwords_axis_utility_extension/src/main/java/com/google/api/ads/adwords/axis/utility/extension/util/ListUtil.java",
"license": "apache-2.0",
"size": 2005
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 1,076,160 |
Properties properties = getProperties(PROPERTIES_FILENAME);
try {
youtube = new YouTube.Builder(new NetHttpTransport(), new JacksonFactory(), request -> {
}).setApplicationName("ZTVDC").build();
YouTube.Search.List search = youtube.search().list("id,snippet");
S... | Properties properties = getProperties(PROPERTIES_FILENAME); try { youtube = new YouTube.Builder(new NetHttpTransport(), new JacksonFactory(), request -> { }).setApplicationName("ZTVDC").build(); YouTube.Search.List search = youtube.search().list(STR); String apiKey = properties.getProperty(STR); search.setKey(apiKey); ... | /**
* Searches youtube for a given query
*
* @param query - Search query
* @return An ArrayList of String-String maps, where each map is a single search result, and each map contains the
* following keys:
* - title: contains title of video
* - url: contains embed url of video
... | Searches youtube for a given query | search | {
"repo_name": "s-zeng/Zengyatta",
"path": "src/main/java/Searcher.java",
"license": "apache-2.0",
"size": 4941
} | [
"com.google.api.client.googleapis.json.GoogleJsonResponseException",
"com.google.api.client.http.javanet.NetHttpTransport",
"com.google.api.client.json.jackson2.JacksonFactory",
"com.google.api.services.youtube.YouTube",
"com.google.api.services.youtube.model.SearchListResponse",
"java.io.IOException",
... | import com.google.api.client.googleapis.json.GoogleJsonResponseException; import com.google.api.client.http.javanet.NetHttpTransport; import com.google.api.client.json.jackson2.JacksonFactory; import com.google.api.services.youtube.YouTube; import com.google.api.services.youtube.model.SearchListResponse; import java.io... | import com.google.api.client.googleapis.json.*; import com.google.api.client.http.javanet.*; import com.google.api.client.json.jackson2.*; import com.google.api.services.youtube.*; import com.google.api.services.youtube.model.*; import java.io.*; import java.util.*; | [
"com.google.api",
"java.io",
"java.util"
] | com.google.api; java.io; java.util; | 1,645,907 |
public C getTransitionEntity(IAuthorizationContext pContext) {
return null;
}
private transient org.eclipse.persistence.queries.FetchGroup fg;
private transient Session sn;
| C function(IAuthorizationContext pContext) { return null; } private transient org.eclipse.persistence.queries.FetchGroup fg; private transient Session sn; | /**
* Get the entity linked to this transition. Therefor, {@link #getTransitionEntityId()
* } and the provided AuthorizationContext are be used to query the
* according data source. The internal call may also fail. In that case,
* 'null' might be returned by this method.
*
* @param p... | Get the entity linked to this transition. Therefor, <code>#getTransitionEntityId() </code> and the provided AuthorizationContext are be used to query the according data source. The internal call may also fail. In that case, 'null' might be returned by this method | getTransitionEntity | {
"repo_name": "kit-data-manager/base",
"path": "MetaDataManagement/MDM-BaseMetaData/src/main/java/edu/kit/dama/mdm/base/DigitalObjectTransition.java",
"license": "apache-2.0",
"size": 13937
} | [
"edu.kit.dama.authorization.entities.IAuthorizationContext",
"org.eclipse.persistence.sessions.Session"
] | import edu.kit.dama.authorization.entities.IAuthorizationContext; import org.eclipse.persistence.sessions.Session; | import edu.kit.dama.authorization.entities.*; import org.eclipse.persistence.sessions.*; | [
"edu.kit.dama",
"org.eclipse.persistence"
] | edu.kit.dama; org.eclipse.persistence; | 930,935 |
protected void moveLabelTo(mxCellState edgeState, double x, double y)
{
mxGraph graph = graphComponent.getGraph();
mxIGraphModel model = graph.getModel();
mxGeometry geometry = model.getGeometry(state.getCell());
if (geometry != null)
{
geometry = (mxGeometry) geometry.clone();
// Resets the relat... | void function(mxCellState edgeState, double x, double y) { mxGraph graph = graphComponent.getGraph(); mxIGraphModel model = graph.getModel(); mxGeometry geometry = model.getGeometry(state.getCell()); if (geometry != null) { geometry = (mxGeometry) geometry.clone(); mxPoint pt = graph.getView().getRelativePoint(edgeStat... | /**
* Moves the label to the given position.
*/ | Moves the label to the given position | moveLabelTo | {
"repo_name": "JanaWengenroth/GKA1",
"path": "libraries/jgraphx/src/com/mxgraph/swing/handler/mxEdgeHandler.java",
"license": "gpl-2.0",
"size": 19012
} | [
"com.mxgraph.util.mxPoint"
] | import com.mxgraph.util.mxPoint; | import com.mxgraph.util.*; | [
"com.mxgraph.util"
] | com.mxgraph.util; | 406,822 |
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Void> deleteSqlStoredProcedureAsync(
String resourceGroupName,
String accountName,
String databaseName,
String containerName,
String storedProcedureName) {
return beginDeleteSqlStoredProcedureAsync(
... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Void> function( String resourceGroupName, String accountName, String databaseName, String containerName, String storedProcedureName) { return beginDeleteSqlStoredProcedureAsync( resourceGroupName, accountName, databaseName, containerName, storedProcedureName) .last() .fl... | /**
* Deletes an existing Azure Cosmos DB SQL storedProcedure.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param accountName Cosmos DB database account name.
* @param databaseName Cosmos DB database name.
* @param containerName Cosmos DB co... | Deletes an existing Azure Cosmos DB SQL storedProcedure | deleteSqlStoredProcedureAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-cosmos/src/main/java/com/azure/resourcemanager/cosmos/implementation/SqlResourcesClientImpl.java",
"license": "mit",
"size": 547809
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; | import com.azure.core.annotation.*; | [
"com.azure.core"
] | com.azure.core; | 1,839,545 |
private void checkCheckClosingParens(final DetailAST ast) {
if (closingParens != ClosingParens.IGNORE) {
final DetailAST paren = ast.getLastChild();
final boolean parenExists = paren.getType() == TokenTypes.RPAREN;
if (closingParens == ClosingParens.ALWAYS
... | void function(final DetailAST ast) { if (closingParens != ClosingParens.IGNORE) { final DetailAST paren = ast.getLastChild(); final boolean parenExists = paren.getType() == TokenTypes.RPAREN; if (closingParens == ClosingParens.ALWAYS && !parenExists) { log(ast.getLineNo(), MSG_KEY_ANNOTATION_PARENS_MISSING); } else if ... | /**
* Checks to see if the closing parenthesis are present if required or
* prohibited.
*
* @param ast the annotation token
*/ | Checks to see if the closing parenthesis are present if required or prohibited | checkCheckClosingParens | {
"repo_name": "baratali/checkstyle",
"path": "src/main/java/com/puppycrawl/tools/checkstyle/checks/annotation/AnnotationUseStyleCheck.java",
"license": "lgpl-2.1",
"size": 16822
} | [
"com.puppycrawl.tools.checkstyle.api.DetailAST",
"com.puppycrawl.tools.checkstyle.api.TokenTypes"
] | import com.puppycrawl.tools.checkstyle.api.DetailAST; import com.puppycrawl.tools.checkstyle.api.TokenTypes; | import com.puppycrawl.tools.checkstyle.api.*; | [
"com.puppycrawl.tools"
] | com.puppycrawl.tools; | 1,085,556 |
public static void w(Throwable thr) {
if (BuildConfig.DEBUG)
android.util.Log.w(TAG, buildMessage(""), thr);
} | static void function(Throwable thr) { if (BuildConfig.DEBUG) android.util.Log.w(TAG, buildMessage(""), thr); } | /**
* Send an empty WARN log message and log the exception.
*
* @param thr An exception to log
*/ | Send an empty WARN log message and log the exception | w | {
"repo_name": "feicien/weiciyuan",
"path": "app/src/main/java/org/qii/weiciyuan/support/debug/AppLogger.java",
"license": "gpl-3.0",
"size": 3847
} | [
"org.qii.weiciyuan.BuildConfig"
] | import org.qii.weiciyuan.BuildConfig; | import org.qii.weiciyuan.*; | [
"org.qii.weiciyuan"
] | org.qii.weiciyuan; | 804,732 |
@Deprecated
public void setSliderFadeColor(@ColorInt int color) {
mSliderFadeColor = color;
} | void function(@ColorInt int color) { mSliderFadeColor = color; } | /**
* Set the color used to fade the sliding pane out when it is slid most of the way offscreen.
*
* @param color An ARGB-packed color value
* @deprecated SlidingPaneLayout no longer uses this field.
*/ | Set the color used to fade the sliding pane out when it is slid most of the way offscreen | setSliderFadeColor | {
"repo_name": "AndroidX/androidx",
"path": "slidingpanelayout/slidingpanelayout/src/main/java/androidx/slidingpanelayout/widget/SlidingPaneLayout.java",
"license": "apache-2.0",
"size": 70462
} | [
"androidx.annotation.ColorInt"
] | import androidx.annotation.ColorInt; | import androidx.annotation.*; | [
"androidx.annotation"
] | androidx.annotation; | 276,749 |
// see code attribution
private void getRoadAsync() {
roadList = null;
GeoPoint roadStartPoint = startPoint;
GeoPoint roadEndPoint = endPoint;
if (startPoint != null) {
roadStartPoint = startPoint;
}
if (endPoint != null) {
roadEndPoint = ... | void function() { roadList = null; GeoPoint roadStartPoint = startPoint; GeoPoint roadEndPoint = endPoint; if (startPoint != null) { roadStartPoint = startPoint; } if (endPoint != null) { roadEndPoint = endPoint; } ArrayList<GeoPoint> waypoints = new ArrayList<>(2); waypoints.add(roadStartPoint); waypoints.add(roadEndP... | /**
* Asynchronous task to get the route between the two points
*/ | Asynchronous task to get the route between the two points | getRoadAsync | {
"repo_name": "CMPUT301F16T01/Carrier",
"path": "app/src/main/java/comcmput301f16t01/github/carrier/Requests/RiderRequestActivity.java",
"license": "gpl-3.0",
"size": 18555
} | [
"android.os.AsyncTask",
"java.util.ArrayList",
"org.osmdroid.bonuspack.routing.Road",
"org.osmdroid.util.GeoPoint"
] | import android.os.AsyncTask; import java.util.ArrayList; import org.osmdroid.bonuspack.routing.Road; import org.osmdroid.util.GeoPoint; | import android.os.*; import java.util.*; import org.osmdroid.bonuspack.routing.*; import org.osmdroid.util.*; | [
"android.os",
"java.util",
"org.osmdroid.bonuspack",
"org.osmdroid.util"
] | android.os; java.util; org.osmdroid.bonuspack; org.osmdroid.util; | 1,220,828 |
@Override
Iterator<E> iterator(); | Iterator<E> iterator(); | /**
* Returns an iterator over the items in this accumulator in proper sequence.
* Also this methods advances head of this accumulator.
*
* @return an iterator over the items in this list accumulator in proper sequence.
*/ | Returns an iterator over the items in this accumulator in proper sequence. Also this methods advances head of this accumulator | iterator | {
"repo_name": "mdogan/hazelcast",
"path": "hazelcast/src/main/java/com/hazelcast/map/impl/querycache/accumulator/Accumulator.java",
"license": "apache-2.0",
"size": 3601
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 2,197,362 |
view.setOnLongClickListener(new View.OnLongClickListener() { | view.setOnLongClickListener(new View.OnLongClickListener() { | /**
* Sets up a cheat sheet (tooltip) for the given view by setting its {@link
* android.view.View.OnLongClickListener}. When the view is long-pressed, a {@link Toast} with
* the view's {@link android.view.View#getContentDescription() content description} will be
* shown either above (default) or be... | Sets up a cheat sheet (tooltip) for the given view by setting its <code>android.view.View.OnLongClickListener</code>. When the view is long-pressed, a <code>Toast</code> with the view's <code>android.view.View#getContentDescription() content description</code> will be shown either above (default) or below the view (if ... | setup | {
"repo_name": "veniosg/Dir",
"path": "app/src/main/java/com/veniosg/dir/android/ui/CheatSheet.java",
"license": "apache-2.0",
"size": 6086
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 678,624 |
private void checkReadCities(SparseArray<City> expectedCities){
ArrayList<City> allCitiesFromDatabase = cityDbHandler.getAllCities();
SparseArray<City> allCitiesFromDatabaseMap = CitiesListConverter.convertToSparseArray(allCitiesFromDatabase);
Assert.assertEquals(expectedCities.size(), allCi... | void function(SparseArray<City> expectedCities){ ArrayList<City> allCitiesFromDatabase = cityDbHandler.getAllCities(); SparseArray<City> allCitiesFromDatabaseMap = CitiesListConverter.convertToSparseArray(allCitiesFromDatabase); Assert.assertEquals(expectedCities.size(), allCitiesFromDatabase.size()); for(int i = 0; i ... | /**
* Checks if result from database is the same size as the local uniqueCities
*/ | Checks if result from database is the same size as the local uniqueCities | checkReadCities | {
"repo_name": "bartburg/backbaseweatherapp",
"path": "app/src/androidTest/java/bartburg/nl/backbaseweather/provision/local/CityDbHandlerTest.java",
"license": "gpl-3.0",
"size": 3828
} | [
"android.util.SparseArray",
"java.util.ArrayList",
"junit.framework.Assert"
] | import android.util.SparseArray; import java.util.ArrayList; import junit.framework.Assert; | import android.util.*; import java.util.*; import junit.framework.*; | [
"android.util",
"java.util",
"junit.framework"
] | android.util; java.util; junit.framework; | 2,694,631 |
private boolean updateProductInfo (int C_AcctSchema_ID, boolean standardCosting)
{
log.fine("M_MatchInv_ID=" + get_ID());
// update Product Costing Qty/Amt
// requires existence of currency conversion !!
StringBuffer sql = new StringBuffer (
"UPDATE M_Product_Costing pc "
+ "SET (CostStanda... | boolean function (int C_AcctSchema_ID, boolean standardCosting) { log.fine(STR + get_ID()); StringBuffer sql = new StringBuffer ( STR + STR + STR + STR + STR + STR + STR + STR + STR + STR + STR + STR + STR).append(get_ID()).append(")" + STR).append(C_AcctSchema_ID).append( STR + STR + STR).append(get_ID()).append(")");... | /**
* Update Product Info (old).
* - Costing (CostStandardCumQty, CostStandardCumAmt, CostAverageCumQty, CostAverageCumAmt)
* @param C_AcctSchema_ID accounting schema
* @param standardCosting true if std costing
* @return true if updated
* @deprecated old costing
*/ | Update Product Info (old). - Costing (CostStandardCumQty, CostStandardCumAmt, CostAverageCumQty, CostAverageCumAmt) | updateProductInfo | {
"repo_name": "geneos/adempiere",
"path": "base/src/org/compiere/acct/Doc_MatchInv.java",
"license": "gpl-2.0",
"size": 17393
} | [
"org.compiere.util.DB"
] | import org.compiere.util.DB; | import org.compiere.util.*; | [
"org.compiere.util"
] | org.compiere.util; | 2,654,692 |
public String deleteOrganization(String req){
try{
//preliminary checks on the request parameters
preliminaryChecks(req,Constants.DELETE_ORGANIZATION);
//check if there's another organization already saved with the same name
Gsc001OrganizationEntity organization = getOrganizationObjectById(Lo... | String function(String req){ try{ preliminaryChecks(req,Constants.DELETE_ORGANIZATION); Gsc001OrganizationEntity organization = getOrganizationObjectById(Long.parseLong(getFieldValueFromJsonText(req,Constants.ORG_ID_FIELD))); if(organization != null) { DeleteService deleteService = new DeleteService(); deleteService.de... | /**
* Delete existing organization
* @param req organization to delete on json form
* @return status on json form
*/ | Delete existing organization | deleteOrganization | {
"repo_name": "GeoSmartCity-CIP/gsc-datacatalogue",
"path": "server/src/main/java/it/sinergis/datacatalogue/services/OrganizationsService.java",
"license": "mit",
"size": 14822
} | [
"it.sinergis.datacatalogue.bean.jpa.Gsc001OrganizationEntity",
"it.sinergis.datacatalogue.common.Constants",
"it.sinergis.datacatalogue.exception.DCException"
] | import it.sinergis.datacatalogue.bean.jpa.Gsc001OrganizationEntity; import it.sinergis.datacatalogue.common.Constants; import it.sinergis.datacatalogue.exception.DCException; | import it.sinergis.datacatalogue.bean.jpa.*; import it.sinergis.datacatalogue.common.*; import it.sinergis.datacatalogue.exception.*; | [
"it.sinergis.datacatalogue"
] | it.sinergis.datacatalogue; | 1,875,626 |
private static final String getResourceSuffix(Locale locale)
{
String lang = locale.getLanguage();
String country = locale.getCountry();
String variant = locale.getVariant();
String suffix = "_" + locale.getLanguage();
if (lang.equals("zh"))
suffix += "_" + country;
if (country.equa... | static final String function(Locale locale) { String lang = locale.getLanguage(); String country = locale.getCountry(); String variant = locale.getVariant(); String suffix = "_" + locale.getLanguage(); if (lang.equals("zh")) suffix += "_" + country; if (country.equals("JP")) suffix += "_" + country + "_" + variant; ret... | /**
* Return the resource file suffic for the indicated locale
* For most locales, this will be based the language code. However
* for Chinese, we do distinguish between Taiwan and PRC
*
* @param locale the locale
* @return an String suffix which canbe appended to a resource name
*/ | Return the resource file suffic for the indicated locale For most locales, this will be based the language code. However for Chinese, we do distinguish between Taiwan and PRC | getResourceSuffix | {
"repo_name": "haikuowuya/android_system_code",
"path": "src/com/sun/org/apache/xml/internal/utils/res/XResourceBundle.java",
"license": "apache-2.0",
"size": 4810
} | [
"java.util.Locale"
] | import java.util.Locale; | import java.util.*; | [
"java.util"
] | java.util; | 2,722,885 |
protected MarkupContainer getEnclosureParent()
{
MarkupContainer parent = getParent();
while ((parent != null) && parent.isAuto())
{
parent = parent.getParent();
}
if (parent == null)
{
throw new WicketRuntimeException(
"Unable to find parent component which is not a transparent resolver");
... | MarkupContainer function() { MarkupContainer parent = getParent(); while ((parent != null) && parent.isAuto()) { parent = parent.getParent(); } if (parent == null) { throw new WicketRuntimeException( STR); } return parent; } /** * Resolves the child component which is the controller of this Enclosure * * @param markupS... | /**
* Get the real parent container
*
* @return enclosure's parent markup container
*/ | Get the real parent container | getEnclosureParent | {
"repo_name": "astrapi69/wicket",
"path": "wicket-core/src/main/java/org/apache/wicket/markup/html/internal/Enclosure.java",
"license": "apache-2.0",
"size": 7824
} | [
"org.apache.wicket.MarkupContainer",
"org.apache.wicket.WicketRuntimeException"
] | import org.apache.wicket.MarkupContainer; import org.apache.wicket.WicketRuntimeException; | import org.apache.wicket.*; | [
"org.apache.wicket"
] | org.apache.wicket; | 1,045,060 |
public ListContentKeysResponseInner withContentKeys(List<StreamingLocatorContentKey> contentKeys) {
this.contentKeys = contentKeys;
return this;
} | ListContentKeysResponseInner function(List<StreamingLocatorContentKey> contentKeys) { this.contentKeys = contentKeys; return this; } | /**
* Set contentKeys used by current Streaming Locator.
*
* @param contentKeys the contentKeys value to set
* @return the ListContentKeysResponseInner object itself.
*/ | Set contentKeys used by current Streaming Locator | withContentKeys | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/mediaservices/mgmt-v2018_03_30_preview/src/main/java/com/microsoft/azure/management/mediaservices/v2018_03_30_preview/implementation/ListContentKeysResponseInner.java",
"license": "mit",
"size": 1362
} | [
"com.microsoft.azure.management.mediaservices.v2018_03_30_preview.StreamingLocatorContentKey",
"java.util.List"
] | import com.microsoft.azure.management.mediaservices.v2018_03_30_preview.StreamingLocatorContentKey; import java.util.List; | import com.microsoft.azure.management.mediaservices.v2018_03_30_preview.*; import java.util.*; | [
"com.microsoft.azure",
"java.util"
] | com.microsoft.azure; java.util; | 2,625,983 |
public static java.util.Set extractDirectoryOfServiceSessionSlotSet(ims.domain.ILightweightDomainFactory domainFactory, ims.scheduling.vo.DirectoryOfServiceSessionSlotVoCollection voCollection)
{
return extractDirectoryOfServiceSessionSlotSet(domainFactory, voCollection, null, new HashMap());
}
| static java.util.Set function(ims.domain.ILightweightDomainFactory domainFactory, ims.scheduling.vo.DirectoryOfServiceSessionSlotVoCollection voCollection) { return extractDirectoryOfServiceSessionSlotSet(domainFactory, voCollection, null, new HashMap()); } | /**
* Create the ims.scheduling.domain.objects.DirectoryOfServiceSessionSlot set from the value object collection.
* @param domainFactory - used to create existing (persistent) domain objects.
* @param voCollection - the collection of value objects
*/ | Create the ims.scheduling.domain.objects.DirectoryOfServiceSessionSlot set from the value object collection | extractDirectoryOfServiceSessionSlotSet | {
"repo_name": "IMS-MAXIMS/openMAXIMS",
"path": "Source Library/openmaxims_workspace/ValueObjects/src/ims/scheduling/vo/domain/DirectoryOfServiceSessionSlotVoAssembler.java",
"license": "agpl-3.0",
"size": 20595
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 1,441,521 |
Principal getAuthenticatedPrincipalFrom(String ticketGrantingTicketId); | Principal getAuthenticatedPrincipalFrom(String ticketGrantingTicketId); | /**
* Retrieve a valid Principal object identified by the provided TGT SSO token.
*
* @param ticketGrantingTicketId an SSO token identifying the requested authenticated Principal
* @return valid Principal OR <b>NULL</b> if there is no valid SSO session present identified by the provided TGT id SSO t... | Retrieve a valid Principal object identified by the provided TGT SSO token | getAuthenticatedPrincipalFrom | {
"repo_name": "apereo/cas",
"path": "api/cas-server-core-api-ticket/src/main/java/org/apereo/cas/ticket/registry/TicketRegistrySupport.java",
"license": "apache-2.0",
"size": 3109
} | [
"org.apereo.cas.authentication.principal.Principal"
] | import org.apereo.cas.authentication.principal.Principal; | import org.apereo.cas.authentication.principal.*; | [
"org.apereo.cas"
] | org.apereo.cas; | 1,422,960 |
public void setElement(final DefaultVerticalExtent metadata) {
this.metadata = metadata;
} | void function(final DefaultVerticalExtent metadata) { this.metadata = metadata; } | /**
* Invoked by JAXB at unmarshalling time for storing the result temporarily.
*
* @param metadata The unmarshalled metadata.
*/ | Invoked by JAXB at unmarshalling time for storing the result temporarily | setElement | {
"repo_name": "desruisseaux/sis",
"path": "core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/metadata/EX_VerticalExtent.java",
"license": "apache-2.0",
"size": 3247
} | [
"org.apache.sis.metadata.iso.extent.DefaultVerticalExtent"
] | import org.apache.sis.metadata.iso.extent.DefaultVerticalExtent; | import org.apache.sis.metadata.iso.extent.*; | [
"org.apache.sis"
] | org.apache.sis; | 1,390,656 |
public WinstoneSession askClusterForSession(final String sessionId, final WebAppConfiguration webAppConfig); | WinstoneSession function(final String sessionId, final WebAppConfiguration webAppConfig); | /**
* Check if the other nodes in this cluster have a session for this
* sessionId.
*
* @param sessionId
* The id of the session to check for
* @param webAppConfig
* The web app that owns the session we want
* @return A valid session instance
*/ | Check if the other nodes in this cluster have a session for this sessionId | askClusterForSession | {
"repo_name": "geronimo-iia/winstone",
"path": "winstone/src/main/java/net/winstone/cluster/Cluster.java",
"license": "lgpl-2.1",
"size": 1892
} | [
"net.winstone.core.WebAppConfiguration",
"net.winstone.core.WinstoneSession"
] | import net.winstone.core.WebAppConfiguration; import net.winstone.core.WinstoneSession; | import net.winstone.core.*; | [
"net.winstone.core"
] | net.winstone.core; | 240,135 |
public Optional<Reader> getReaderIfFileExists(Path pathRelativeToProjectRoot) {
Path fileToRead = getPathForRelativePath(pathRelativeToProjectRoot);
if (Files.isRegularFile(fileToRead)) {
try {
return Optional.of(
(Reader) new BufferedReader(
new InputStreamReader(new... | Optional<Reader> function(Path pathRelativeToProjectRoot) { Path fileToRead = getPathForRelativePath(pathRelativeToProjectRoot); if (Files.isRegularFile(fileToRead)) { try { return Optional.of( (Reader) new BufferedReader( new InputStreamReader(newFileInputStream(pathRelativeToProjectRoot)))); } catch (Exception e) { t... | /**
* Attempts to open the file for future read access. Returns {@link Optional#absent()} if the file
* does not exist.
*/ | Attempts to open the file for future read access. Returns <code>Optional#absent()</code> if the file does not exist | getReaderIfFileExists | {
"repo_name": "mread/buck",
"path": "src/com/facebook/buck/util/ProjectFilesystem.java",
"license": "apache-2.0",
"size": 26938
} | [
"com.google.common.base.Optional",
"java.io.BufferedReader",
"java.io.InputStreamReader",
"java.io.Reader",
"java.nio.file.Files",
"java.nio.file.Path"
] | import com.google.common.base.Optional; import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.Reader; import java.nio.file.Files; import java.nio.file.Path; | import com.google.common.base.*; import java.io.*; import java.nio.file.*; | [
"com.google.common",
"java.io",
"java.nio"
] | com.google.common; java.io; java.nio; | 2,585,021 |
public String getMessage() {
return getMessage(Locale.US);
} | String function() { return getMessage(Locale.US); } | /**
* Gets the default message.
*
* @return the message.
*/ | Gets the default message | getMessage | {
"repo_name": "venkateshamurthy/java-quantiles",
"path": "src/main/java/org/apache/commons/math3/exception/util/ExceptionContext.java",
"license": "apache-2.0",
"size": 10569
} | [
"java.util.Locale"
] | import java.util.Locale; | import java.util.*; | [
"java.util"
] | java.util; | 621,163 |
public static Class<?> loadClass(String name, ClassLoader loader, boolean needToWarn) {
// must clean the name so its pure java name, eg removing \n or whatever people can do in the Spring XML
name = StringHelper.normalizeClassName(name);
if (org.apache.camel.util.ObjectHelper.isEmpty(name))... | static Class<?> function(String name, ClassLoader loader, boolean needToWarn) { name = StringHelper.normalizeClassName(name); if (org.apache.camel.util.ObjectHelper.isEmpty(name)) { return null; } boolean array = false; Class<?> clazz = loadSimpleType(name); if (clazz == null) { if (name.endsWith("[]")) { name = name.s... | /**
* Attempts to load the given class name using the thread context class loader or the given class loader
*
* @param name the name of the class to load
* @param loader the class loader to use after the thread context class loader
* @param needToWarn when <tt>true</tt> logs a warn... | Attempts to load the given class name using the thread context class loader or the given class loader | loadClass | {
"repo_name": "nikhilvibhav/camel",
"path": "core/camel-util/src/main/java/org/apache/camel/util/ObjectHelper.java",
"license": "apache-2.0",
"size": 42340
} | [
"java.lang.reflect.Array"
] | import java.lang.reflect.Array; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 312,176 |
void reconnect(Connection connection); | void reconnect(Connection connection); | /**
* Reconnect to the given JDBC connection.
*
* @param connection a JDBC connection
*
* @see #disconnect()
*/ | Reconnect to the given JDBC connection | reconnect | {
"repo_name": "kevin-chen-hw/LDAE",
"path": "com.huawei.soa.ldae/src/main/java/org/hibernate/Session.java",
"license": "lgpl-2.1",
"size": 41358
} | [
"java.sql.Connection"
] | import java.sql.Connection; | import java.sql.*; | [
"java.sql"
] | java.sql; | 390,660 |
private void writeRVVRecord(OplogFile olf, boolean writeGCRVV) throws IOException {
writeRVVRecord(olf, getParent().getAllDiskRegions(), writeGCRVV);
} | void function(OplogFile olf, boolean writeGCRVV) throws IOException { writeRVVRecord(olf, getParent().getAllDiskRegions(), writeGCRVV); } | /**
* Write an RVV record containing all of the live disk regions.
*/ | Write an RVV record containing all of the live disk regions | writeRVVRecord | {
"repo_name": "ysung-pivotal/incubator-geode",
"path": "gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/Oplog.java",
"license": "apache-2.0",
"size": 294090
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,049,564 |
public List<WaveSignal> getSignals()
{
List<WaveSignal> signals = new ArrayList<WaveSignal>();
for(JButton but : waveSignals.keySet())
{
WaveSignal ws = waveSignals.get(but);
signals.add(ws);
}
return signals;
}
public int getNumSignals() { return waveSignals.size(); } | List<WaveSignal> function() { List<WaveSignal> signals = new ArrayList<WaveSignal>(); for(JButton but : waveSignals.keySet()) { WaveSignal ws = waveSignals.get(but); signals.add(ws); } return signals; } public int getNumSignals() { return waveSignals.size(); } | /**
* Method to return a List of WaveSignals in this panel.
* @return a List of WaveSignals in this panel.
*/ | Method to return a List of WaveSignals in this panel | getSignals | {
"repo_name": "imr/Electric8",
"path": "com/sun/electric/tool/user/waveform/Panel.java",
"license": "gpl-3.0",
"size": 95388
} | [
"java.util.ArrayList",
"java.util.List",
"javax.swing.JButton"
] | import java.util.ArrayList; import java.util.List; import javax.swing.JButton; | import java.util.*; import javax.swing.*; | [
"java.util",
"javax.swing"
] | java.util; javax.swing; | 1,949,482 |
private PointF limitedSCenter(float sCenterX, float sCenterY, float scale, PointF sTarget) {
PointF vTranslate = vTranslateForSCenter(sCenterX, sCenterY, scale);
int vxCenter = getPaddingLeft() + (getWidth() - getPaddingRight() - getPaddingLeft()) / 2;
int vyCenter = getPaddingTop() + (getHe... | PointF function(float sCenterX, float sCenterY, float scale, PointF sTarget) { PointF vTranslate = vTranslateForSCenter(sCenterX, sCenterY, scale); int vxCenter = getPaddingLeft() + (getWidth() - getPaddingRight() - getPaddingLeft()) / 2; int vyCenter = getPaddingTop() + (getHeight() - getPaddingBottom() - getPaddingTo... | /**
* Given a requested source center and scale, calculate what the actual center will have to be to keep the image in
* pan limits, keeping the requested center as near to the middle of the screen as allowed.
*/ | Given a requested source center and scale, calculate what the actual center will have to be to keep the image in pan limits, keeping the requested center as near to the middle of the screen as allowed | limitedSCenter | {
"repo_name": "Deadleg/Slide",
"path": "app/src/main/java/me/ccrama/redditslide/Views/SubsamplingScaleImageView.java",
"license": "gpl-3.0",
"size": 122096
} | [
"android.graphics.PointF"
] | import android.graphics.PointF; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 163,649 |
void setTargetArrow(EdgeArrows value); | void setTargetArrow(EdgeArrows value); | /**
* Sets the value of the '
* {@link org.eclipse.sirius.diagram.description.style.EdgeStyleDescription#getTargetArrow
* <em>Target Arrow</em>}' attribute. <!-- begin-user-doc --> <!--
* end-user-doc -->
*
* @param value
* the new value of the '<em>Target Arrow</em>' attr... | Sets the value of the ' <code>org.eclipse.sirius.diagram.description.style.EdgeStyleDescription#getTargetArrow Target Arrow</code>' attribute. | setTargetArrow | {
"repo_name": "FTSRG/iq-sirius-integration",
"path": "host/org.eclipse.sirius.diagram/src-gen/org/eclipse/sirius/diagram/description/style/EdgeStyleDescription.java",
"license": "epl-1.0",
"size": 19255
} | [
"org.eclipse.sirius.diagram.EdgeArrows"
] | import org.eclipse.sirius.diagram.EdgeArrows; | import org.eclipse.sirius.diagram.*; | [
"org.eclipse.sirius"
] | org.eclipse.sirius; | 143,118 |
public void onEvent(LocalRegion owner, EntryEventImpl event, RegionEntry entry); | void function(LocalRegion owner, EntryEventImpl event, RegionEntry entry); | /**
* This method is invoked when an entry is added, updated or destroyed in a
* region for index maintenance. This method will do some pre-update
* operations for the index like constraint checks or any other logging that
* may be required, and any index updates if required.
*
* @param owner
* ... | This method is invoked when an entry is added, updated or destroyed in a region for index maintenance. This method will do some pre-update operations for the index like constraint checks or any other logging that may be required, and any index updates if required | onEvent | {
"repo_name": "robertgeiger/incubator-geode",
"path": "gemfire-core/src/main/java/com/gemstone/gemfire/cache/query/internal/IndexUpdater.java",
"license": "apache-2.0",
"size": 5043
} | [
"com.gemstone.gemfire.internal.cache.EntryEventImpl",
"com.gemstone.gemfire.internal.cache.LocalRegion",
"com.gemstone.gemfire.internal.cache.RegionEntry"
] | import com.gemstone.gemfire.internal.cache.EntryEventImpl; import com.gemstone.gemfire.internal.cache.LocalRegion; import com.gemstone.gemfire.internal.cache.RegionEntry; | import com.gemstone.gemfire.internal.cache.*; | [
"com.gemstone.gemfire"
] | com.gemstone.gemfire; | 2,416,288 |
Map<ItemStack, Float> getAllProducts();
| Map<ItemStack, Float> getAllProducts(); | /**
* Returns a list of all possible products and their estimated probabilities (0.0 to 1.0],
* to help mods that display recipes
**/ | Returns a list of all possible products and their estimated probabilities (0.0 to 1.0], to help mods that display recipes | getAllProducts | {
"repo_name": "Vexatos/ForestryAPI",
"path": "forestry/api/recipes/ICentrifugeRecipe.java",
"license": "mit",
"size": 976
} | [
"java.util.Map",
"net.minecraft.item.ItemStack"
] | import java.util.Map; import net.minecraft.item.ItemStack; | import java.util.*; import net.minecraft.item.*; | [
"java.util",
"net.minecraft.item"
] | java.util; net.minecraft.item; | 1,123,676 |
public static CreateSensorMessage createSensor(String port, Sensors sensorType, int networkPort){
CreateSensorMessage csm = new CreateSensorMessage();
csm.setPort(port);
csm.setSensorType(sensorType);
csm.setNetworkPort(networkPort);
return csm;
}
| static CreateSensorMessage function(String port, Sensors sensorType, int networkPort){ CreateSensorMessage csm = new CreateSensorMessage(); csm.setPort(port); csm.setSensorType(sensorType); csm.setNetworkPort(networkPort); return csm; } | /**
* Message send to brick to create a SensorEndpoint at the brick.
* @param port the ID of the port on the EV3 brick
* @param sensorType the type of sensor to assume at the given port
* @param networkPort the TCP port to use
* @return the prepared message
*/ | Message send to brick to create a SensorEndpoint at the brick | createSensor | {
"repo_name": "Echtzeitsysteme/mindroid",
"path": "impl/include/ev3Messages/src/main/java/org/mindroid/common/messages/brick/BrickMessagesFactory.java",
"license": "gpl-3.0",
"size": 1951
} | [
"org.mindroid.common.messages.hardware.Sensors"
] | import org.mindroid.common.messages.hardware.Sensors; | import org.mindroid.common.messages.hardware.*; | [
"org.mindroid.common"
] | org.mindroid.common; | 695,952 |
public com.squareup.okhttp.Call apisApiIdThumbnailGetAsync(String apiId, String accept, String ifNoneMatch, String ifModifiedSince, final ApiCallback<Void> callback) throws ApiException {
ProgressResponseBody.ProgressListener progressListener = null;
ProgressRequestBody.ProgressRequestListener prog... | com.squareup.okhttp.Call function(String apiId, String accept, String ifNoneMatch, String ifModifiedSince, final ApiCallback<Void> callback) throws ApiException { ProgressResponseBody.ProgressListener progressListener = null; ProgressRequestBody.ProgressRequestListener progressRequestListener = null; | /**
* Get thumbnail image (asynchronously)
* This operation can be used to download a thumbnail image of an API.
* @param apiId **API ID** consisting of the **UUID** of the API. Using the **UUID** in the API call is recommended. The combination of the provider of the API, name of the API and the version... | Get thumbnail image (asynchronously) This operation can be used to download a thumbnail image of an API | apisApiIdThumbnailGetAsync | {
"repo_name": "jaadds/product-apim",
"path": "sample-scenarios/clients/publisher/src/main/java/org/wso2/carbon/apimgt/samples/utils/publisher/rest/client/api/APIIndividualApi.java",
"license": "apache-2.0",
"size": 83610
} | [
"org.wso2.carbon.apimgt.samples.utils.publisher.rest.client.ApiCallback",
"org.wso2.carbon.apimgt.samples.utils.publisher.rest.client.ApiException",
"org.wso2.carbon.apimgt.samples.utils.publisher.rest.client.ProgressRequestBody",
"org.wso2.carbon.apimgt.samples.utils.publisher.rest.client.ProgressResponseBod... | import org.wso2.carbon.apimgt.samples.utils.publisher.rest.client.ApiCallback; import org.wso2.carbon.apimgt.samples.utils.publisher.rest.client.ApiException; import org.wso2.carbon.apimgt.samples.utils.publisher.rest.client.ProgressRequestBody; import org.wso2.carbon.apimgt.samples.utils.publisher.rest.client.Progress... | import org.wso2.carbon.apimgt.samples.utils.publisher.rest.client.*; | [
"org.wso2.carbon"
] | org.wso2.carbon; | 858,567 |
public boolean checkinWithNoIndex(Contentlet contentlet, Map<Relationship, List<Contentlet>> contentRelationships, User user,boolean respectFrontendRoles); | boolean function(Contentlet contentlet, Map<Relationship, List<Contentlet>> contentRelationships, User user,boolean respectFrontendRoles); | /**
* Will check in a new version of you contentlet without indexing The inode of your contentlet must be not set.
* @param contentlet - The inode of your contentlet must be not set.
* @param contentRelationships - throws IllegalArgumentException if null. Used to set relationships to new contentlet version
*... | Will check in a new version of you contentlet without indexing The inode of your contentlet must be not set | checkinWithNoIndex | {
"repo_name": "jtesser/core-2.x",
"path": "src/com/dotmarketing/portlets/contentlet/business/ContentletAPIPreHook.java",
"license": "gpl-3.0",
"size": 46259
} | [
"com.dotmarketing.portlets.contentlet.model.Contentlet",
"com.dotmarketing.portlets.structure.model.Relationship",
"com.liferay.portal.model.User",
"java.util.List",
"java.util.Map"
] | import com.dotmarketing.portlets.contentlet.model.Contentlet; import com.dotmarketing.portlets.structure.model.Relationship; import com.liferay.portal.model.User; import java.util.List; import java.util.Map; | import com.dotmarketing.portlets.contentlet.model.*; import com.dotmarketing.portlets.structure.model.*; import com.liferay.portal.model.*; import java.util.*; | [
"com.dotmarketing.portlets",
"com.liferay.portal",
"java.util"
] | com.dotmarketing.portlets; com.liferay.portal; java.util; | 2,427,094 |
@Test
public void shouldSolveProblem48() {
assertThat(sumPowers(10)).isEqualTo(405_071_317L);
assertThat(sumPowers(1000)).isEqualTo(9_110_846_700L);
} | void function() { assertThat(sumPowers(10)).isEqualTo(405_071_317L); assertThat(sumPowers(1000)).isEqualTo(9_110_846_700L); } | /**
* <strong>Problem 48: Self powers</strong>
* <p>
* The series, 1<sup>1</sup> + 2<sup>2</sup> + 3<sup>3</sup> + ... + 10<sup>10</sup> = 10405071317.
* <p>
* Find the last ten digits of the series, 1<sup>1</sup> + 2<sup>2</sup> + 3<sup>3</sup> + ... + 1000<sup>1000</sup>.
* <p>
* Se... | Problem 48: Self powers The series, 11 + 22 + 33 + ... + 1010 = 10405071317. Find the last ten digits of the series, 11 + 22 + 33 + ... + 10001000. See also projecteuler.net problem 48 | shouldSolveProblem48 | {
"repo_name": "ummels/vavr",
"path": "vavr/src/test/java/io/vavr/collection/euler/Euler48Test.java",
"license": "apache-2.0",
"size": 2552
} | [
"org.assertj.core.api.Assertions"
] | import org.assertj.core.api.Assertions; | import org.assertj.core.api.*; | [
"org.assertj.core"
] | org.assertj.core; | 1,099,543 |
@Override public void exitInnerCreator(@NotNull JavaParser.InnerCreatorContext ctx) { }
| @Override public void exitInnerCreator(@NotNull JavaParser.InnerCreatorContext ctx) { } | /**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/ | The default implementation does nothing | enterInnerCreator | {
"repo_name": "martinaguero/deep",
"path": "src/org/trimatek/deep/lexer/JavaBaseListener.java",
"license": "apache-2.0",
"size": 39286
} | [
"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; | 1,030,607 |
return getSelectionService(PlatformUI.getWorkbench()
.getActiveWorkbenchWindow());
} | return getSelectionService(PlatformUI.getWorkbench() .getActiveWorkbenchWindow()); } | /**
* Returns the {@link ISelectionService} of the active
* {@link IWorkbenchWindow}.
*
* @return
*/ | Returns the <code>ISelectionService</code> of the active <code>IWorkbenchWindow</code> | getSelectionService | {
"repo_name": "bkahlert/com.bkahlert.nebula",
"path": "src/com/bkahlert/nebula/utils/selection/SelectionUtils.java",
"license": "mit",
"size": 4916
} | [
"org.eclipse.ui.PlatformUI"
] | import org.eclipse.ui.PlatformUI; | import org.eclipse.ui.*; | [
"org.eclipse.ui"
] | org.eclipse.ui; | 2,275,144 |
TemplateHashModel wrapAsAPI(Object obj) throws TemplateModelException; | TemplateHashModel wrapAsAPI(Object obj) throws TemplateModelException; | /**
* Wraps an object to a {@link TemplateModel} that exposes the object's "native" (usually, Java) API.
*
* @param obj
* The object for which the API model has to be returned. Shouldn't be {@code null}.
*
* @return The {@link TemplateModel} through which the API of the object... | Wraps an object to a <code>TemplateModel</code> that exposes the object's "native" (usually, Java) API | wrapAsAPI | {
"repo_name": "awils18/incubator-freemarker",
"path": "src/main/java/freemarker/template/utility/ObjectWrapperWithAPISupport.java",
"license": "apache-2.0",
"size": 1959
} | [
"freemarker.template.TemplateHashModel",
"freemarker.template.TemplateModelException"
] | import freemarker.template.TemplateHashModel; import freemarker.template.TemplateModelException; | import freemarker.template.*; | [
"freemarker.template"
] | freemarker.template; | 2,495,401 |
public static Builder builder() {
return new Builder();
}
public static final class Builder {
private static final Set<String> BLACKLISTED_NAMESPACES = Collections.singleton(MessageProcessingHint.NAMESPACE);
private static final Set<QName> BLACKLISTED_QNAMES = Collections.unmodifiab... | static Builder function() { return new Builder(); } public static final class Builder { private static final Set<String> BLACKLISTED_NAMESPACES = Collections.singleton(MessageProcessingHint.NAMESPACE); private static final Set<QName> BLACKLISTED_QNAMES = Collections.unmodifiableSet(new HashSet<>(Arrays.asList( StanzaId... | /**
* Return a {@link Builder} that can be used to build the {@link ContentElement}.
* @return builder
*/ | Return a <code>Builder</code> that can be used to build the <code>ContentElement</code> | builder | {
"repo_name": "igniterealtime/Smack",
"path": "smack-experimental/src/main/java/org/jivesoftware/smackx/stanza_content_encryption/element/ContentElement.java",
"license": "apache-2.0",
"size": 10134
} | [
"java.util.ArrayList",
"java.util.Arrays",
"java.util.Collections",
"java.util.HashSet",
"java.util.List",
"java.util.Set",
"javax.xml.namespace.QName",
"org.jivesoftware.smack.packet.XmlElement",
"org.jivesoftware.smackx.address.packet.MultipleAddresses",
"org.jivesoftware.smackx.hints.element.Me... | import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; import javax.xml.namespace.QName; import org.jivesoftware.smack.packet.XmlElement; import org.jivesoftware.smackx.address.packet.MultipleAddresses; import org.jivesof... | import java.util.*; import javax.xml.namespace.*; import org.jivesoftware.smack.packet.*; import org.jivesoftware.smackx.address.packet.*; import org.jivesoftware.smackx.hints.element.*; import org.jivesoftware.smackx.sid.element.*; | [
"java.util",
"javax.xml",
"org.jivesoftware.smack",
"org.jivesoftware.smackx"
] | java.util; javax.xml; org.jivesoftware.smack; org.jivesoftware.smackx; | 1,423,997 |
private void displayHelp()
{ int index = 0;
StringBuilder help = new StringBuilder();
// Display usage message
help.append(I18N.get("ui.lsv.args.u"));
help.append("\n");
help.append(" ");
help.append(I18N.get("ui.lsv.args.f"));
help.append("\n");
... | void function() { int index = 0; StringBuilder help = new StringBuilder(); help.append(I18N.get(STR)); help.append("\n"); help.append(" "); help.append(I18N.get(STR)); help.append("\n"); for(String[] flag : cmdFlags) { for(index = 1; index < flag.length - 1; index++) { if(index == 1) help.append(" "); else help.append(... | /**
* When displaying help, display in a dialog window rather than dumping to
* a console as this class not only acts as a stand-alone application, but
* is also used by GEVA to display LSystems to the user as a child window
* to one of GEVA's windows
*/ | When displaying help, display in a dialog window rather than dumping to a console as this class not only acts as a stand-alone application, but is also used by GEVA to display LSystems to the user as a child window to one of GEVA's windows | displayHelp | {
"repo_name": "cdorrat/geva-clj",
"path": "geva-gui/src/main/java/geva/gui/UI/LSystemViewer.java",
"license": "gpl-3.0",
"size": 7304
} | [
"javax.swing.JOptionPane"
] | import javax.swing.JOptionPane; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 2,803,434 |
public List getDeclaredPrefixes()
{
return m_declaredPrefixes;
} | List function() { return m_declaredPrefixes; } | /**
* Return a table that contains all prefixes available
* within this element context.
*
* @return Vector containing the prefixes available within this
* element context
*/ | Return a table that contains all prefixes available within this element context | getDeclaredPrefixes | {
"repo_name": "mirego/j2objc",
"path": "xalan/third_party/android/platform/external/apache-xml/src/main/java/org/apache/xalan/templates/ElemTemplateElement.java",
"license": "apache-2.0",
"size": 44686
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,484,590 |
@Inject
@Optional
protected void openDialogForF8(@UIEventTopic(TestEditorUIEventConstants.EDIT_CONTEXTMENU_F8) String data) {
if (isThisPartOnTop() && !isFocusInSubComponent()) {
showActionGroupPopupDialog();
createActionArea();
}
} | void function(@UIEventTopic(TestEditorUIEventConstants.EDIT_CONTEXTMENU_F8) String data) { if (isThisPartOnTop() && !isFocusInSubComponent()) { showActionGroupPopupDialog(); createActionArea(); } } | /**
* open a new dialog (ActionPopupDialog) for the F8-Event.
*
* @param data
* optional data
*/ | open a new dialog (ActionPopupDialog) for the F8-Event | openDialogForF8 | {
"repo_name": "test-editor/test-editor",
"path": "ui/org.testeditor.ui/src/main/java/org/testeditor/ui/parts/editor/view/TestEditView.java",
"license": "epl-1.0",
"size": 38222
} | [
"org.eclipse.e4.ui.di.UIEventTopic",
"org.testeditor.ui.constants.TestEditorUIEventConstants"
] | import org.eclipse.e4.ui.di.UIEventTopic; import org.testeditor.ui.constants.TestEditorUIEventConstants; | import org.eclipse.e4.ui.di.*; import org.testeditor.ui.constants.*; | [
"org.eclipse.e4",
"org.testeditor.ui"
] | org.eclipse.e4; org.testeditor.ui; | 797,853 |
private void addPolyline(BoundingBox boundingBox, ProjectionTransform transform, Path path, PolylineOptions polyline) {
List<LatLng> points = polyline.getPoints();
if (points.size() >= 2) {
for (int i = 0; i < points.size(); i++) {
LatLng latLng = points.get(i);
... | void function(BoundingBox boundingBox, ProjectionTransform transform, Path path, PolylineOptions polyline) { List<LatLng> points = polyline.getPoints(); if (points.size() >= 2) { for (int i = 0; i < points.size(); i++) { LatLng latLng = points.get(i); Point point = getPoint(transform, latLng); float x = TileBoundingBox... | /**
* Add the polyline to the path
*
* @param boundingBox
* @param path
* @param polyline
*/ | Add the polyline to the path | addPolyline | {
"repo_name": "boundlessgeo/geopackage-android",
"path": "geopackage-sdk/src/main/java/mil/nga/geopackage/tiles/features/FeatureTiles.java",
"license": "mit",
"size": 24394
} | [
"android.graphics.Path",
"com.google.android.gms.maps.model.LatLng",
"com.google.android.gms.maps.model.PolylineOptions",
"java.util.List",
"mil.nga.geopackage.BoundingBox",
"mil.nga.geopackage.projection.ProjectionTransform",
"mil.nga.geopackage.tiles.TileBoundingBoxUtils",
"mil.nga.wkb.geom.Point"
] | import android.graphics.Path; import com.google.android.gms.maps.model.LatLng; import com.google.android.gms.maps.model.PolylineOptions; import java.util.List; import mil.nga.geopackage.BoundingBox; import mil.nga.geopackage.projection.ProjectionTransform; import mil.nga.geopackage.tiles.TileBoundingBoxUtils; import mi... | import android.graphics.*; import com.google.android.gms.maps.model.*; import java.util.*; import mil.nga.geopackage.*; import mil.nga.geopackage.projection.*; import mil.nga.geopackage.tiles.*; import mil.nga.wkb.geom.*; | [
"android.graphics",
"com.google.android",
"java.util",
"mil.nga.geopackage",
"mil.nga.wkb"
] | android.graphics; com.google.android; java.util; mil.nga.geopackage; mil.nga.wkb; | 2,207,215 |
private void renderEditingBody(GL2 gl, SandboxBody body) {
Dimension size = this.canvasSize;
// overlay everything but this shape
gl.glColor4f(0.0f, 0.0f, 0.0f, 0.5f);
gl.glPushMatrix();
gl.glLoadIdentity();
RenderUtilities.fillRectangleFromTopLeft(gl, -size.width * 0.5, size.height * 0.5, size.width, s... | void function(GL2 gl, SandboxBody body) { Dimension size = this.canvasSize; gl.glColor4f(0.0f, 0.0f, 0.0f, 0.5f); gl.glPushMatrix(); gl.glLoadIdentity(); RenderUtilities.fillRectangleFromTopLeft(gl, -size.width * 0.5, size.height * 0.5, size.width, size.height); gl.glPopMatrix(); if (Preferences.isBodyAABBEnabled()) { ... | /**
* Renders an editing body and related state.
* @param gl the OpenGL context
* @param body the body to render
*/ | Renders an editing body and related state | renderEditingBody | {
"repo_name": "dmitrykolesnikovich/dyn4j",
"path": "sandbox/src/org/dyn4j/sandbox/Sandbox.java",
"license": "bsd-3-clause",
"size": 101410
} | [
"java.awt.Dimension",
"org.dyn4j.dynamics.BodyFixture",
"org.dyn4j.geometry.Convex",
"org.dyn4j.sandbox.utilities.RenderUtilities"
] | import java.awt.Dimension; import org.dyn4j.dynamics.BodyFixture; import org.dyn4j.geometry.Convex; import org.dyn4j.sandbox.utilities.RenderUtilities; | import java.awt.*; import org.dyn4j.dynamics.*; import org.dyn4j.geometry.*; import org.dyn4j.sandbox.utilities.*; | [
"java.awt",
"org.dyn4j.dynamics",
"org.dyn4j.geometry",
"org.dyn4j.sandbox"
] | java.awt; org.dyn4j.dynamics; org.dyn4j.geometry; org.dyn4j.sandbox; | 2,444,646 |
public static void closefile() {
try {
myBufferWriter.flush();
myBufferWriter.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
| static void function() { try { myBufferWriter.flush(); myBufferWriter.close(); } catch (IOException e) { e.printStackTrace(); } } | /**
* Metodo di supporto per la chiusura di un file
*/ | Metodo di supporto per la chiusura di un file | closefile | {
"repo_name": "alotronto/nextFFM-No-GUI",
"path": "src/DataStructure/Utility.java",
"license": "apache-2.0",
"size": 31688
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,436,808 |
public boolean isSetShortname() {
return StringHelper.isNotEmpty(getShortname());
} | boolean function() { return StringHelper.isNotEmpty(getShortname()); } | /**
* Check if the short name is set
*
* @return <code>true</code>, if short name is set
*/ | Check if the short name is set | isSetShortname | {
"repo_name": "nuest/SOS",
"path": "hibernate/common/src/main/java/org/n52/sos/ds/hibernate/entities/i18n/HibernateI18NProcedureMetadata.java",
"license": "gpl-2.0",
"size": 2947
} | [
"org.n52.sos.util.StringHelper"
] | import org.n52.sos.util.StringHelper; | import org.n52.sos.util.*; | [
"org.n52.sos"
] | org.n52.sos; | 721,692 |
ArrayDuplicate arr1 = new ArrayDuplicate();
String[] arr = {"Java", "method", "OOP", "FOR", "WHILE", "DO", "ASSERT", "OOP", "Java", "ASSERT"};
String[] resultArray = arr1.remove(arr);
String[] expectArray = {"Java", "method", "OOP", "FOR", "WHILE", "DO", "ASSERT"};
assert... | ArrayDuplicate arr1 = new ArrayDuplicate(); String[] arr = {"Java", STR, "OOP", "FOR", "WHILE", "DO", STR, "OOP", "Java", STR}; String[] resultArray = arr1.remove(arr); String[] expectArray = {"Java", STR, "OOP", "FOR", "WHILE", "DO", STR}; assertThat(resultArray, is(expectArray)); } | /**
* Check method for array without duplicates.
*/ | Check method for array without duplicates | whenRemoveDuplicatesThenArrayWithoutDuplicate | {
"repo_name": "Roma-Rio/rgilyazev",
"path": "chapter_001/src/test/java/ru/job4j/array/ArrayDuplicateTest.java",
"license": "apache-2.0",
"size": 854
} | [
"org.hamcrest.core.Is",
"org.junit.Assert"
] | import org.hamcrest.core.Is; import org.junit.Assert; | import org.hamcrest.core.*; import org.junit.*; | [
"org.hamcrest.core",
"org.junit"
] | org.hamcrest.core; org.junit; | 2,357,387 |
public Object postUpdate(Item item, State state) {
if (eventPublisher != null && item != null) {
eventPublisher.post(ItemEventFactory.createStateEvent(item.getName(), state));
}
return null;
} | Object function(Item item, State state) { if (eventPublisher != null && item != null) { eventPublisher.post(ItemEventFactory.createStateEvent(item.getName(), state)); } return null; } | /**
* Posts a status update for a specified item to the event bus.
* t
*
* @param item the item to send the status update for
* @param state the new state of the item
*/ | Posts a status update for a specified item to the event bus. t | postUpdate | {
"repo_name": "marinmitev/smarthome",
"path": "bundles/automation/org.eclipse.smarthome.automation.module.script.defaultscope/src/main/java/org/eclipse/smarthome/automation/module/script/defaultscope/internal/ScriptBusEvent.java",
"license": "epl-1.0",
"size": 7830
} | [
"org.eclipse.smarthome.core.items.Item",
"org.eclipse.smarthome.core.items.events.ItemEventFactory",
"org.eclipse.smarthome.core.types.State"
] | import org.eclipse.smarthome.core.items.Item; import org.eclipse.smarthome.core.items.events.ItemEventFactory; import org.eclipse.smarthome.core.types.State; | import org.eclipse.smarthome.core.items.*; import org.eclipse.smarthome.core.items.events.*; import org.eclipse.smarthome.core.types.*; | [
"org.eclipse.smarthome"
] | org.eclipse.smarthome; | 1,322,081 |
public Descriptor find(String name) {
return types.get(name);
}
private final Map<String, Descriptor> types;
private TypeRegistry(Map<String, Descriptor> types) {
this.types = types;
}
public static class Builder {
private Builder() {} | Descriptor function(String name) { return types.get(name); } private final Map<String, Descriptor> types; private TypeRegistry(Map<String, Descriptor> types) { this.types = types; } public static class Builder { private Builder() {} | /**
* Find a type by its full name. Returns null if it cannot be found in
* this {@link TypeRegistry}.
*/ | Find a type by its full name. Returns null if it cannot be found in this <code>TypeRegistry</code> | find | {
"repo_name": "aehlig/bazel",
"path": "third_party/protobuf/3.6.1/java/util/src/main/java/com/google/protobuf/util/JsonFormat.java",
"license": "apache-2.0",
"size": 70706
} | [
"com.google.protobuf.Descriptors",
"java.util.Map"
] | import com.google.protobuf.Descriptors; import java.util.Map; | import com.google.protobuf.*; import java.util.*; | [
"com.google.protobuf",
"java.util"
] | com.google.protobuf; java.util; | 413,275 |
@SuppressWarnings("unchecked")
public final IModel<T> getModel()
{
return (IModel<T>)getDefaultModel();
} | @SuppressWarnings(STR) final IModel<T> function() { return (IModel<T>)getDefaultModel(); } | /**
* Gets model
*
* @return model
*/ | Gets model | getModel | {
"repo_name": "martin-g/wicket-osgi",
"path": "wicket-core/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java",
"license": "apache-2.0",
"size": 40127
} | [
"org.apache.wicket.model.IModel"
] | import org.apache.wicket.model.IModel; | import org.apache.wicket.model.*; | [
"org.apache.wicket"
] | org.apache.wicket; | 792,470 |
public void setFromMap(Object bean,
Map<String, Object> values); | void function(Object bean, Map<String, Object> values); | /**
* Sets the values of the bean from a map.
*
* @param bean the fact to set the values of the fields on
* @param values a map of field names and values to set
*/ | Sets the values of the bean from a map | setFromMap | {
"repo_name": "mswiderski/droolsjbpm-knowledge",
"path": "kie-api/src/main/java/org/kie/definition/type/FactType.java",
"license": "apache-2.0",
"size": 3617
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,367,959 |
@Override
public Optional<Type> coerceTypeBase(Type sourceType, String resultTypeBase)
{
String sourceTypeName = sourceType.getTypeSignature().getBase();
if (sourceTypeName.equals(resultTypeBase)) {
return Optional.of(sourceType);
}
switch (sourceTypeName) {
... | Optional<Type> function(Type sourceType, String resultTypeBase) { String sourceTypeName = sourceType.getTypeSignature().getBase(); if (sourceTypeName.equals(resultTypeBase)) { return Optional.of(sourceType); } switch (sourceTypeName) { case UnknownType.NAME: { switch (resultTypeBase) { case StandardTypes.BOOLEAN: case ... | /**
* coerceTypeBase and isCovariantParametrizedType defines all hand-coded rules for type coercion.
* Other methods should reference these two functions instead of hand-code new rules.
*/ | coerceTypeBase and isCovariantParametrizedType defines all hand-coded rules for type coercion. Other methods should reference these two functions instead of hand-code new rules | coerceTypeBase | {
"repo_name": "mandusm/presto",
"path": "presto-main/src/main/java/com/facebook/presto/type/TypeRegistry.java",
"license": "apache-2.0",
"size": 24577
} | [
"com.facebook.presto.spi.type.CharType",
"com.facebook.presto.spi.type.StandardTypes",
"com.facebook.presto.spi.type.Type",
"com.facebook.presto.spi.type.TypeSignature",
"java.util.Optional"
] | import com.facebook.presto.spi.type.CharType; import com.facebook.presto.spi.type.StandardTypes; import com.facebook.presto.spi.type.Type; import com.facebook.presto.spi.type.TypeSignature; import java.util.Optional; | import com.facebook.presto.spi.type.*; import java.util.*; | [
"com.facebook.presto",
"java.util"
] | com.facebook.presto; java.util; | 1,713,514 |
@Message(id = 33008, value = "Could not find the service name '%s' which is referenced in %s")
SwitchYardException couldNotFindServiceName(String qualifiedRefName, String to); | @Message(id = 33008, value = STR) SwitchYardException couldNotFindServiceName(String qualifiedRefName, String to); | /**
* couldNotFindServiceName method definition.
* @param qualifiedRefName qualified reference name
* @param to to
* @return SwitchYardException
*/ | couldNotFindServiceName method definition | couldNotFindServiceName | {
"repo_name": "igarashitm/switchyard",
"path": "components/camel/component/src/main/java/org/switchyard/component/camel/CamelComponentMessages.java",
"license": "apache-2.0",
"size": 4617
} | [
"org.jboss.logging.annotations.Message",
"org.switchyard.SwitchYardException"
] | import org.jboss.logging.annotations.Message; import org.switchyard.SwitchYardException; | import org.jboss.logging.annotations.*; import org.switchyard.*; | [
"org.jboss.logging",
"org.switchyard"
] | org.jboss.logging; org.switchyard; | 1,269,841 |
private void findDeclaredNames(NodeTraversal t, Node n) {
checkState(NodeUtil.createsScope(n) || n.isScript(), n);
for (Var v : t.getScope().getVarIterable()) {
renamerStack.peek().addDeclaredName(v.getName(), false);
}
}
interface Renamer { | void function(NodeTraversal t, Node n) { checkState(NodeUtil.createsScope(n) n.isScript(), n); for (Var v : t.getScope().getVarIterable()) { renamerStack.peek().addDeclaredName(v.getName(), false); } } interface Renamer { | /**
* Traverses the current scope and collects declared names by calling {@code addDeclaredName} on
* the {@code Renamer} that is at the top of the {@code renamerStack}.
*/ | Traverses the current scope and collects declared names by calling addDeclaredName on the Renamer that is at the top of the renamerStack | findDeclaredNames | {
"repo_name": "Yannic/closure-compiler",
"path": "src/com/google/javascript/jscomp/MakeDeclaredNamesUnique.java",
"license": "apache-2.0",
"size": 21095
} | [
"com.google.common.base.Preconditions",
"com.google.javascript.rhino.Node"
] | import com.google.common.base.Preconditions; import com.google.javascript.rhino.Node; | import com.google.common.base.*; import com.google.javascript.rhino.*; | [
"com.google.common",
"com.google.javascript"
] | com.google.common; com.google.javascript; | 204,868 |
public final void setSelectionMode(final int selectionMode) {
if (selectionMode == Universe3DController.SELECTION_TRIANGLE_MODE) {
this.toolbarView.getSelectionModeTrianglesButton()
.setEnabled(false);
this.toolbarView.getDistanceSlider().setEnabled(true);
... | final void function(final int selectionMode) { if (selectionMode == Universe3DController.SELECTION_TRIANGLE_MODE) { this.toolbarView.getSelectionModeTrianglesButton() .setEnabled(false); this.toolbarView.getDistanceSlider().setEnabled(true); if (this.selectionModeEnable[1]) { this.toolbarView.getSelectionModeMeshesButt... | /**
* Sets the selection mode.
* @param selectionMode
* the new selection mode to set :
* Universe3DController.SELECTION_TRIANGLE_MODE or
* Universe3DController.SELECTION_SURFACE_MODE
*/ | Sets the selection mode | setSelectionMode | {
"repo_name": "Nantes1900/Nantes-1900-PGROU-IHM",
"path": "src/fr/nantes1900/control/isletprocess/Functions3DToolbarController.java",
"license": "gpl-3.0",
"size": 14183
} | [
"fr.nantes1900.constants.TextsKeys",
"fr.nantes1900.control.display3d.Universe3DController",
"fr.nantes1900.utils.FileTools"
] | import fr.nantes1900.constants.TextsKeys; import fr.nantes1900.control.display3d.Universe3DController; import fr.nantes1900.utils.FileTools; | import fr.nantes1900.constants.*; import fr.nantes1900.control.display3d.*; import fr.nantes1900.utils.*; | [
"fr.nantes1900.constants",
"fr.nantes1900.control",
"fr.nantes1900.utils"
] | fr.nantes1900.constants; fr.nantes1900.control; fr.nantes1900.utils; | 1,186,827 |
public TabLayoutPanel getReviewValidateTabLayoutPanel() {
return reviewValidateTabLayoutPanel;
} | TabLayoutPanel function() { return reviewValidateTabLayoutPanel; } | /**
* To get Review Validate TabLayout Panel.
*
* @return TabLayoutPanel
*/ | To get Review Validate TabLayout Panel | getReviewValidateTabLayoutPanel | {
"repo_name": "kuzavas/ephesoft",
"path": "dcma-gwt/dcma-gwt-home/src/main/java/com/ephesoft/dcma/gwt/home/client/view/LandingView.java",
"license": "agpl-3.0",
"size": 10977
} | [
"com.google.gwt.user.client.ui.TabLayoutPanel"
] | import com.google.gwt.user.client.ui.TabLayoutPanel; | import com.google.gwt.user.client.ui.*; | [
"com.google.gwt"
] | com.google.gwt; | 827,074 |
public ProjectInnovationMilestone
saveProjectInnovationMilestone(ProjectInnovationMilestone projectInnovationMilestone); | ProjectInnovationMilestone function(ProjectInnovationMilestone projectInnovationMilestone); | /**
* This method saves the information of the given projectInnovationMilestone
*
* @param projectInnovationMilestone - is the projectInnovationMilestone object with the new information to be
* added/updated.
* @return a number greater than 0 representing the new ID assigned by the database, 0 if... | This method saves the information of the given projectInnovationMilestone | saveProjectInnovationMilestone | {
"repo_name": "CCAFS/MARLO",
"path": "marlo-data/src/main/java/org/cgiar/ccafs/marlo/data/manager/ProjectInnovationMilestoneManager.java",
"license": "gpl-3.0",
"size": 3817
} | [
"org.cgiar.ccafs.marlo.data.model.ProjectInnovationMilestone"
] | import org.cgiar.ccafs.marlo.data.model.ProjectInnovationMilestone; | import org.cgiar.ccafs.marlo.data.model.*; | [
"org.cgiar.ccafs"
] | org.cgiar.ccafs; | 2,610,036 |
public void addTargeter( final InstructionTargeter t ) {
if (targeters == null) {
targeters = new HashSet<>();
}
//if(!targeters.contains(t))
targeters.add(t);
} | void function( final InstructionTargeter t ) { if (targeters == null) { targeters = new HashSet<>(); } targeters.add(t); } | /**
* Denote this handle is being referenced by t.
*/ | Denote this handle is being referenced by t | addTargeter | {
"repo_name": "md-5/jdk10",
"path": "src/java.xml/share/classes/com/sun/org/apache/bcel/internal/generic/InstructionHandle.java",
"license": "gpl-2.0",
"size": 8870
} | [
"java.util.HashSet"
] | import java.util.HashSet; | import java.util.*; | [
"java.util"
] | java.util; | 466,620 |
public CallHandle loadChannelMetadataEnumerations(SecurityContext ctx,
AgentEventListener observer);
| CallHandle function(SecurityContext ctx, AgentEventListener observer); | /**
* Loads the enumerations used for the channel metadata.
*
* @param ctx The security context.
* @param observer Call-back handler.
* @return See above.
*/ | Loads the enumerations used for the channel metadata | loadChannelMetadataEnumerations | {
"repo_name": "joansmith/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/env/data/views/ImageDataView.java",
"license": "gpl-2.0",
"size": 16243
} | [
"org.openmicroscopy.shoola.env.event.AgentEventListener"
] | import org.openmicroscopy.shoola.env.event.AgentEventListener; | import org.openmicroscopy.shoola.env.event.*; | [
"org.openmicroscopy.shoola"
] | org.openmicroscopy.shoola; | 1,017,315 |
protected void sequence_ParameterizedTypeRefStructural_TStructMemberList_TypeArguments_TypeRefWithModifiers_TypeRefWithoutModifiers_TypeReference_VersionRequest(ISerializationContext context, VersionedParameterizedTypeRefStructural semanticObject) {
genericSequencer.createSequence(context, semanticObject);
}
| void function(ISerializationContext context, VersionedParameterizedTypeRefStructural semanticObject) { genericSequencer.createSequence(context, semanticObject); } | /**
* Contexts:
* TypeRef returns VersionedParameterizedTypeRefStructural
* TypeRef.UnionTypeExpression_1_0 returns VersionedParameterizedTypeRefStructural
* IntersectionTypeExpression returns VersionedParameterizedTypeRefStructural
* IntersectionTypeExpression.IntersectionTypeExpression_1_0 r... | Contexts: TypeRef returns VersionedParameterizedTypeRefStructural TypeRef.UnionTypeExpression_1_0 returns VersionedParameterizedTypeRefStructural IntersectionTypeExpression returns VersionedParameterizedTypeRefStructural IntersectionTypeExpression.IntersectionTypeExpression_1_0 returns VersionedParameterizedTypeRefStru... | sequence_ParameterizedTypeRefStructural_TStructMemberList_TypeArguments_TypeRefWithModifiers_TypeRefWithoutModifiers_TypeReference_VersionRequest | {
"repo_name": "lbeurerkellner/n4js",
"path": "plugins/org.eclipse.n4js.ts/src-gen/org/eclipse/n4js/ts/serializer/TypeExpressionsSemanticSequencer.java",
"license": "epl-1.0",
"size": 44382
} | [
"org.eclipse.n4js.ts.typeRefs.VersionedParameterizedTypeRefStructural",
"org.eclipse.xtext.serializer.ISerializationContext"
] | import org.eclipse.n4js.ts.typeRefs.VersionedParameterizedTypeRefStructural; import org.eclipse.xtext.serializer.ISerializationContext; | import org.eclipse.n4js.ts.*; import org.eclipse.xtext.serializer.*; | [
"org.eclipse.n4js",
"org.eclipse.xtext"
] | org.eclipse.n4js; org.eclipse.xtext; | 2,337,825 |
public static byte[] mergeBytes(byte[]... bytes) throws IOException {
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
for (byte[] bArray : bytes) {
outputStream.write(bArray);
}
return outputStream.toByteArray();
} | static byte[] function(byte[]... bytes) throws IOException { ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); for (byte[] bArray : bytes) { outputStream.write(bArray); } return outputStream.toByteArray(); } | /**
* Combines byte arrays.
*
* @param bytes
* @return combined array
* @throws IOException
*/ | Combines byte arrays | mergeBytes | {
"repo_name": "hmusavi/jpo-ode",
"path": "jpo-ode-common/src/main/java/us/dot/its/jpo/ode/util/CodecUtils.java",
"license": "apache-2.0",
"size": 7057
} | [
"java.io.ByteArrayOutputStream",
"java.io.IOException"
] | import java.io.ByteArrayOutputStream; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 94,932 |
public static Collection<InetSocketAddress> toSocketAddresses(ClusterNode node, int port) {
return toSocketAddresses(node.addresses(), node.hostNames(), port);
} | static Collection<InetSocketAddress> function(ClusterNode node, int port) { return toSocketAddresses(node.addresses(), node.hostNames(), port); } | /**
* Returns tha list of resolved socket addresses. First addresses are resolved by host names,
* if this attempt fails then the addresses are resolved by ip addresses.
*
* @param node Grid node.
* @param port Port.
* @return Socket addresses for given addresses and host names.
*/ | Returns tha list of resolved socket addresses. First addresses are resolved by host names, if this attempt fails then the addresses are resolved by ip addresses | toSocketAddresses | {
"repo_name": "kromulan/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java",
"license": "apache-2.0",
"size": 298812
} | [
"java.net.InetSocketAddress",
"java.util.Collection",
"org.apache.ignite.cluster.ClusterNode"
] | import java.net.InetSocketAddress; import java.util.Collection; import org.apache.ignite.cluster.ClusterNode; | import java.net.*; import java.util.*; import org.apache.ignite.cluster.*; | [
"java.net",
"java.util",
"org.apache.ignite"
] | java.net; java.util; org.apache.ignite; | 2,316,380 |
private static void createAndShowGUI(Message message) {
JFrame frame = new JFrame("MessageTree");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
MessageTreeViewMain newContentPane = new MessageTreeViewMain(message);
newContentPane.setOpaque(true);
fr... | static void function(Message message) { JFrame frame = new JFrame(STR); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); MessageTreeViewMain newContentPane = new MessageTreeViewMain(message); newContentPane.setOpaque(true); frame.setContentPane(newContentPane); frame.pack(); frame.setVisible(true); } | /**
* Creates and displays the gui.
*
* @param message the Message to display in the tree.
*/ | Creates and displays the gui | createAndShowGUI | {
"repo_name": "xuzhikethinker/t4f-data",
"path": "parser/mime4j/src/main/java/aos/mime4j/swing/MessageTreeViewMain.java",
"license": "apache-2.0",
"size": 13943
} | [
"javax.swing.JFrame",
"org.apache.james.mime4j.dom.Message"
] | import javax.swing.JFrame; import org.apache.james.mime4j.dom.Message; | import javax.swing.*; import org.apache.james.mime4j.dom.*; | [
"javax.swing",
"org.apache.james"
] | javax.swing; org.apache.james; | 1,047,812 |
@Transactional
public void update(ViewURLEntity entity) {
entityManagerProvider.get().merge(entity);
entityManagerProvider.get().flush();
} | void function(ViewURLEntity entity) { entityManagerProvider.get().merge(entity); entityManagerProvider.get().flush(); } | /**
* Update and merge a URL entity
* @param entity
*/ | Update and merge a URL entity | update | {
"repo_name": "arenadata/ambari",
"path": "ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ViewURLDAO.java",
"license": "apache-2.0",
"size": 3176
} | [
"org.apache.ambari.server.orm.entities.ViewURLEntity"
] | import org.apache.ambari.server.orm.entities.ViewURLEntity; | import org.apache.ambari.server.orm.entities.*; | [
"org.apache.ambari"
] | org.apache.ambari; | 1,104,173 |
private void updateSegmentHandles() {
ConnectorShape cs = getConnectorShape();
WayPoint[] waypoints = cs.getWayPoints();
//Destroy and recreate the handles if the number
//doesn't match the waypoints number
if(waypoints.length != segmentHandles.size())
{
// clear and create from scratch
createSegm... | void function() { ConnectorShape cs = getConnectorShape(); WayPoint[] waypoints = cs.getWayPoints(); if(waypoints.length != segmentHandles.size()) { createSegmentHandles(); } else { for(int i = 0; i < waypoints.length; i++) { Handle h = segmentHandles.get(i); h.setMLocation(waypoints[i].getX(), waypoints[i].getY()); } ... | /**
* Update the segment handles, if the ConnectorShape has changed so much that
* the number of segment handles doesn't match the number of segments anymore,
* number of segments, they will be destroyed and recreated.
*/ | Update the segment handles, if the ConnectorShape has changed so much that the number of segment handles doesn't match the number of segments anymore, number of segments, they will be destroyed and recreated | updateSegmentHandles | {
"repo_name": "PathVisio/pathvisio",
"path": "modules/org.pathvisio.core/src/org/pathvisio/core/view/Line.java",
"license": "apache-2.0",
"size": 18975
} | [
"org.pathvisio.core.model.ConnectorShape"
] | import org.pathvisio.core.model.ConnectorShape; | import org.pathvisio.core.model.*; | [
"org.pathvisio.core"
] | org.pathvisio.core; | 146,403 |
public void setHeaderSortStateViewProvider(SortStateViewProvider provider) {
sortableTableHeaderView.setSortStateViewProvider(provider);
}
| void function(SortStateViewProvider provider) { sortableTableHeaderView.setSortStateViewProvider(provider); } | /**
* Sets the given {@link SortStateViewProvider}.
*
* @param provider
* The {@link SortStateViewProvider} that shall be used to render the sort views in the header.
*/ | Sets the given <code>SortStateViewProvider</code> | setHeaderSortStateViewProvider | {
"repo_name": "kongx73/SortableTableView",
"path": "tableview/src/main/java/de/codecrafters/tableview/SortableTableView.java",
"license": "apache-2.0",
"size": 8336
} | [
"de.codecrafters.tableview.providers.SortStateViewProvider"
] | import de.codecrafters.tableview.providers.SortStateViewProvider; | import de.codecrafters.tableview.providers.*; | [
"de.codecrafters.tableview"
] | de.codecrafters.tableview; | 1,664,864 |
protected void addYearPropertyDescriptor(Object object) {
itemPropertyDescriptors
.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
getResourceLocator(), getString("_UI_Document_year_feature"),
getString("_UI_PropertyDescriptor_description", "_U... | void function(Object object) { itemPropertyDescriptors .add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString(STR), getString(STR, STR, STR), BibtexPackage.Literals.DOCUMENT__YEAR, false, false, false, ItemPropertyDescriptor.GENERIC_VALUE_... | /**
* This adds a property descriptor for the Year feature. <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated NOT
*/ | This adds a property descriptor for the Year feature. | addYearPropertyDescriptor | {
"repo_name": "sebastiangoetz/slr-toolkit",
"path": "plugins/de.tudresden.slr.model.bibtex.edit/src/de/tudresden/slr/model/bibtex/provider/DocumentItemProvider.java",
"license": "epl-1.0",
"size": 13957
} | [
"de.tudresden.slr.model.bibtex.BibtexPackage",
"org.eclipse.emf.edit.provider.ComposeableAdapterFactory",
"org.eclipse.emf.edit.provider.ItemPropertyDescriptor"
] | import de.tudresden.slr.model.bibtex.BibtexPackage; import org.eclipse.emf.edit.provider.ComposeableAdapterFactory; import org.eclipse.emf.edit.provider.ItemPropertyDescriptor; | import de.tudresden.slr.model.bibtex.*; import org.eclipse.emf.edit.provider.*; | [
"de.tudresden.slr",
"org.eclipse.emf"
] | de.tudresden.slr; org.eclipse.emf; | 1,776,097 |
public DataFlavor[] getTransferDataFlavors() {
return new DataFlavor[] { supported };
} | DataFlavor[] function() { return new DataFlavor[] { supported }; } | /**
*
* Returns the DataFlavors that are supported.
*
* @see java.awt.datatransfer.Transferable#getTransferDataFlavors()
*/ | Returns the DataFlavors that are supported | getTransferDataFlavors | {
"repo_name": "HerbertJordan/JimCat",
"path": "src/org/jimcat/gui/dndutil/ImageSetTransferable.java",
"license": "gpl-2.0",
"size": 2513
} | [
"java.awt.datatransfer.DataFlavor"
] | import java.awt.datatransfer.DataFlavor; | import java.awt.datatransfer.*; | [
"java.awt"
] | java.awt; | 89,754 |
@NonNull
Observable<U> getStream(); | Observable<U> getStream(); | /**
* Returns an Observable that emits all _future_ items that are put into the core. Unlike most
* store getStream equivalents, the StoreCore getStream does not attempt to insert the last
* cached value into the stream. This is simply a stream for all future data items.
*
* @return An Observab... | Returns an Observable that emits all _future_ items that are put into the core. Unlike most store getStream equivalents, the StoreCore getStream does not attempt to insert the last cached value into the stream. This is simply a stream for all future data items | getStream | {
"repo_name": "ulx/reark",
"path": "reark/src/main/java/io/reark/reark/data/stores/interfaces/StoreCoreInterface.java",
"license": "mit",
"size": 5432
} | [
"io.reactivex.Observable"
] | import io.reactivex.Observable; | import io.reactivex.*; | [
"io.reactivex"
] | io.reactivex; | 938,903 |
@SuppressWarnings("unused")
protected static void setQuestionMarkPattern(@NotNull final Pattern pattern)
{
immutableSetQuestionMarkPattern(pattern);
} | @SuppressWarnings(STR) static void function(@NotNull final Pattern pattern) { immutableSetQuestionMarkPattern(pattern); } | /**
* Specifies the question mark pattern.
* @param pattern the pattern.
*/ | Specifies the question mark pattern | setQuestionMarkPattern | {
"repo_name": "rydnr/java-commons",
"path": "src/main/java/org/acmsl/commons/utils/net/URLUtils.java",
"license": "gpl-2.0",
"size": 22921
} | [
"org.acmsl.commons.regexpplugin.Pattern",
"org.jetbrains.annotations.NotNull"
] | import org.acmsl.commons.regexpplugin.Pattern; import org.jetbrains.annotations.NotNull; | import org.acmsl.commons.regexpplugin.*; import org.jetbrains.annotations.*; | [
"org.acmsl.commons",
"org.jetbrains.annotations"
] | org.acmsl.commons; org.jetbrains.annotations; | 2,688,091 |
void initializeComponent(Application application);
}
public static Application app = null;
public static File tempDirectory;
public static final String LOG_TAG = "k9";
private static final String DATABASE_VERSION_CACHE = "database_version_cache";
private static final String ... | void initializeComponent(Application application); } public static Application app = null; public static File tempDirectory; public static final String LOG_TAG = "k9"; private static final String DATABASE_VERSION_CACHE = STR; private static final String KEY_LAST_ACCOUNT_DATABASE_VERSION = STR; private static final List... | /**
* Called when the Application instance is available and ready.
*
* @param application
* The application instance. Never <code>null</code>.
* @throws Exception
*/ | Called when the Application instance is available and ready | initializeComponent | {
"repo_name": "indus1/k-9",
"path": "k9mail/src/main/java/com/fsck/k9/K9.java",
"license": "apache-2.0",
"size": 54204
} | [
"android.app.Application",
"android.content.SharedPreferences",
"java.io.File",
"java.util.ArrayList",
"java.util.List"
] | import android.app.Application; import android.content.SharedPreferences; import java.io.File; import java.util.ArrayList; import java.util.List; | import android.app.*; import android.content.*; import java.io.*; import java.util.*; | [
"android.app",
"android.content",
"java.io",
"java.util"
] | android.app; android.content; java.io; java.util; | 2,355,832 |
public Editor edit(String key) throws IOException {
return edit(key, ANY_SEQUENCE_NUMBER);
} | Editor function(String key) throws IOException { return edit(key, ANY_SEQUENCE_NUMBER); } | /**
* Returns an editor for the entry named {@code key}, or null if another
* edit is in progress.
*/ | Returns an editor for the entry named key, or null if another edit is in progress | edit | {
"repo_name": "RyanTech/Forkids",
"path": "com.xlg.library/src/com/xlg/library/imageutility/DiskLruCache.java",
"license": "apache-2.0",
"size": 33908
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 516,898 |
public void setSelectedXIndex(Integer i)
{
if (this.selectedXIndex == i) {
return; // No change.
}
Integer oldIndex = this.selectedXIndex;
this.selectedXIndex = i;
this.repaint();
this.fireStateChangeEvent(oldIndex, ItemEvent.DESELECTED);
... | void function(Integer i) { if (this.selectedXIndex == i) { return; } Integer oldIndex = this.selectedXIndex; this.selectedXIndex = i; this.repaint(); this.fireStateChangeEvent(oldIndex, ItemEvent.DESELECTED); this.fireStateChangeEvent(this.selectedXIndex, ItemEvent.SELECTED); } | /** Change 'selectedXIndex' to 'i', then repaint and fire item
* selected events as necessary. */ | Change 'selectedXIndex' to 'i', then repaint and fire item | setSelectedXIndex | {
"repo_name": "smcpeak/earthshape",
"path": "src/earthshape/PlotPanel1D.java",
"license": "bsd-2-clause",
"size": 13120
} | [
"java.awt.event.ItemEvent"
] | import java.awt.event.ItemEvent; | import java.awt.event.*; | [
"java.awt"
] | java.awt; | 1,318,819 |
private void checkIdleSlot() {
// The timestamp in SlotAndTimestamp is relative
final long currentRelativeTimeMillis = clock.relativeTimeMillis();
final List<AllocatedSlot> expiredSlots = new ArrayList<>(availableSlots.size());
for (SlotAndTimestamp slotAndTimestamp : availableSlots.availableSlots.values(... | void function() { final long currentRelativeTimeMillis = clock.relativeTimeMillis(); final List<AllocatedSlot> expiredSlots = new ArrayList<>(availableSlots.size()); for (SlotAndTimestamp slotAndTimestamp : availableSlots.availableSlots.values()) { if (currentRelativeTimeMillis - slotAndTimestamp.timestamp > idleSlotTi... | /**
* Check the available slots, release the slot that is idle for a long time.
*/ | Check the available slots, release the slot that is idle for a long time | checkIdleSlot | {
"repo_name": "mylog00/flink",
"path": "flink-runtime/src/main/java/org/apache/flink/runtime/jobmaster/slotpool/SlotPool.java",
"license": "apache-2.0",
"size": 62423
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.concurrent.CompletableFuture",
"org.apache.flink.runtime.clusterframework.types.AllocationID",
"org.apache.flink.runtime.messages.Acknowledge",
"org.apache.flink.util.FlinkException"
] | import java.util.ArrayList; import java.util.List; import java.util.concurrent.CompletableFuture; import org.apache.flink.runtime.clusterframework.types.AllocationID; import org.apache.flink.runtime.messages.Acknowledge; import org.apache.flink.util.FlinkException; | import java.util.*; import java.util.concurrent.*; import org.apache.flink.runtime.clusterframework.types.*; import org.apache.flink.runtime.messages.*; import org.apache.flink.util.*; | [
"java.util",
"org.apache.flink"
] | java.util; org.apache.flink; | 2,154,688 |
public static boolean isStreamCachingEnabled(final Exchange exchange) {
Route route = exchange.getContext().getRoute(exchange.getFromRouteId());
if (route != null) {
return route.isStreamCaching();
} else {
return exchange.getContext().getStreamCachingStrategy().isEna... | static boolean function(final Exchange exchange) { Route route = exchange.getContext().getRoute(exchange.getFromRouteId()); if (route != null) { return route.isStreamCaching(); } else { return exchange.getContext().getStreamCachingStrategy().isEnabled(); } } | /**
* Check whether or not stream caching is enabled for the given route or globally.
*
* @param exchange the exchange
* @return <tt>true</tt> if enabled, <tt>false</tt> otherwise
*/ | Check whether or not stream caching is enabled for the given route or globally | isStreamCachingEnabled | {
"repo_name": "zregvart/camel",
"path": "core/camel-support/src/main/java/org/apache/camel/support/ExchangeHelper.java",
"license": "apache-2.0",
"size": 42299
} | [
"org.apache.camel.Exchange",
"org.apache.camel.Route"
] | import org.apache.camel.Exchange; import org.apache.camel.Route; | import org.apache.camel.*; | [
"org.apache.camel"
] | org.apache.camel; | 661,540 |
public void synchLocation(int x, int y) {
for (Representation rep : getPojo().getRepresentations()) {
rep.setOffset(x, y);
}
updateTopology();
} | void function(int x, int y) { for (Representation rep : getPojo().getRepresentations()) { rep.setOffset(x, y); } updateTopology(); } | /**
* Sets the object location without invoking an object change notification
* An user should never use this method. It's needed by the framework and
* reserver for it's exclusive use.
*/ | Sets the object location without invoking an object change notification An user should never use this method. It's needed by the framework and reserver for it's exclusive use | synchLocation | {
"repo_name": "abollaert/freedomotic",
"path": "framework/freedomotic-core/src/main/java/com/freedomotic/things/EnvObjectLogic.java",
"license": "gpl-2.0",
"size": 25356
} | [
"com.freedomotic.model.object.Representation"
] | import com.freedomotic.model.object.Representation; | import com.freedomotic.model.object.*; | [
"com.freedomotic.model"
] | com.freedomotic.model; | 2,275,377 |
Transition createTransition(String criteriaOutcome, TransitionableState targetState); | Transition createTransition(String criteriaOutcome, TransitionableState targetState); | /**
* Create transition transition.
*
* @param criteriaOutcome the criteria outcome
* @param targetState the target state
* @return the transition
*/ | Create transition transition | createTransition | {
"repo_name": "zawn/cas",
"path": "cas-server-core-webflow/src/main/java/org/apereo/cas/web/flow/CasWebflowConfigurer.java",
"license": "apache-2.0",
"size": 6314
} | [
"org.springframework.webflow.engine.Transition",
"org.springframework.webflow.engine.TransitionableState"
] | import org.springframework.webflow.engine.Transition; import org.springframework.webflow.engine.TransitionableState; | import org.springframework.webflow.engine.*; | [
"org.springframework.webflow"
] | org.springframework.webflow; | 1,562,239 |
public static IntValuedEnum<RTresult> rtBufferGetElementSize(RTbuffer buffer, Pointer<Long> size_of_element)
{
return FlagSet.fromValue(rtBufferGetElementSize(Pointer.getPeer(buffer), Pointer.getPeer(size_of_element)), RTresult.class);
} | static IntValuedEnum<RTresult> function(RTbuffer buffer, Pointer<Long> size_of_element) { return FlagSet.fromValue(rtBufferGetElementSize(Pointer.getPeer(buffer), Pointer.getPeer(size_of_element)), RTresult.class); } | /**
* Original signature : <code>RTresult rtBufferGetElementSize(RTbuffer, RTsize*)</code><br>
* <i>native declaration : include\optix_host.h:8031</i>
*/ | Original signature : <code>RTresult rtBufferGetElementSize(RTbuffer, RTsize*)</code> native declaration : include\optix_host.h:8031 | rtBufferGetElementSize | {
"repo_name": "fetox74/optix-wrapper",
"path": "src/main/java/com/fetoxdevelopments/optix/api/RT.java",
"license": "mit",
"size": 162970
} | [
"com.fetoxdevelopments.optix.api.enumeration.RTresult",
"com.fetoxdevelopments.optix.api.struct.RTbuffer",
"org.bridj.FlagSet",
"org.bridj.IntValuedEnum",
"org.bridj.Pointer"
] | import com.fetoxdevelopments.optix.api.enumeration.RTresult; import com.fetoxdevelopments.optix.api.struct.RTbuffer; import org.bridj.FlagSet; import org.bridj.IntValuedEnum; import org.bridj.Pointer; | import com.fetoxdevelopments.optix.api.enumeration.*; import com.fetoxdevelopments.optix.api.struct.*; import org.bridj.*; | [
"com.fetoxdevelopments.optix",
"org.bridj"
] | com.fetoxdevelopments.optix; org.bridj; | 861,284 |
TestSuite suite = new TestSuite(ServerActiveHtmlTest.class);
return suite;
} | TestSuite suite = new TestSuite(ServerActiveHtmlTest.class); return suite; } | /**
* A <code>TestSuite</code> is a <code>Composite</code> of Tests. It
* runs a collection of test cases.
*
* This constructor creates a suite with all the methods starting with
* "test" that take no arguments.
*/ | A <code>TestSuite</code> is a <code>Composite</code> of Tests. It runs a collection of test cases. This constructor creates a suite with all the methods starting with "test" that take no arguments | suite | {
"repo_name": "janekdb/ntropa",
"path": "presentation/wps/src/tests/org/ntropa/build/html/ServerActiveHtmlTest.java",
"license": "apache-2.0",
"size": 13381
} | [
"junit.framework.TestSuite"
] | import junit.framework.TestSuite; | import junit.framework.*; | [
"junit.framework"
] | junit.framework; | 360,170 |
public Collection<ZipStarNode> getChildren() {
return ZipStar.this.getChildren(this);
}
}
| Collection<ZipStarNode> function() { return ZipStar.this.getChildren(this); } } | /**
* A delegate to ZipStar <tt>getChildren()</tt>.
*
* @return current list of reachable nodes,
* already visited nodes excluded.
*/ | A delegate to ZipStar getChildren() | getChildren | {
"repo_name": "asmyczek/java-zipper",
"path": "examples/com/mu/zipper/examples/zipstar/ZipStar.java",
"license": "bsd-3-clause",
"size": 5686
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 547,931 |
NamedProperty<QName> getValue() {
if (isBooleanValue()) {
return NamedProperty(getQName(),getBooleanValue());
} else if (isDoubleValue()) {
return NamedProperty(getQName(),getDoubleValue());
} else if (isIntegerValue()) {
return NamedProperty(getQName(),getIntegerValue());
} else if (isStringValue()... | NamedProperty<QName> getValue() { if (isBooleanValue()) { return NamedProperty(getQName(),getBooleanValue()); } else if (isDoubleValue()) { return NamedProperty(getQName(),getDoubleValue()); } else if (isIntegerValue()) { return NamedProperty(getQName(),getIntegerValue()); } else if (isStringValue()) { return NamedProp... | /**
* Returns the value of this Annotation instance.
*
* @return the value of this Annotation instance.
*/ | Returns the value of this Annotation instance | getValue | {
"repo_name": "SynBioDex/libSBOLj",
"path": "core2/src/main/java/org/sbolstandard/core2/Annotation.java",
"license": "apache-2.0",
"size": 22361
} | [
"java.util.ArrayList",
"java.util.List",
"javax.xml.namespace.QName",
"org.sbolstandard.core.datatree.Datatree",
"org.sbolstandard.core.datatree.NamedProperty",
"org.sbolstandard.core.datatree.NestedDocument"
] | import java.util.ArrayList; import java.util.List; import javax.xml.namespace.QName; import org.sbolstandard.core.datatree.Datatree; import org.sbolstandard.core.datatree.NamedProperty; import org.sbolstandard.core.datatree.NestedDocument; | import java.util.*; import javax.xml.namespace.*; import org.sbolstandard.core.datatree.*; | [
"java.util",
"javax.xml",
"org.sbolstandard.core"
] | java.util; javax.xml; org.sbolstandard.core; | 2,101,702 |
public void setIncludeGroup(final List<String> includeGroups) {
m_includeGroups.clear();
for (final String includeGroup : includeGroups) {
m_includeGroups.add(includeGroup.intern());
}
} | void function(final List<String> includeGroups) { m_includeGroups.clear(); for (final String includeGroup : includeGroups) { m_includeGroups.add(includeGroup.intern()); } } | /**
* Sets the value of '_includeGroupList' by copying the given
* Vector. All elements will be checked for type safety.
*
* @param includeGroups the Vector to copy.
*/ | Sets the value of '_includeGroupList' by copying the given Vector. All elements will be checked for type safety | setIncludeGroup | {
"repo_name": "rfdrake/opennms",
"path": "opennms-config-model/src/main/java/org/opennms/netmgt/config/datacollection/Collect.java",
"license": "gpl-2.0",
"size": 11273
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,700,254 |
//-------------------------------------------------------------------------
public Clock getClock() {
return _timeSource;
} | Clock function() { return _timeSource; } | /**
* Gets the time-source that determines the current time.
*
* @return the time-source, not null
*/ | Gets the time-source that determines the current time | getClock | {
"repo_name": "McLeodMoores/starling",
"path": "projects/engine-db/src/main/java/com/opengamma/enginedb/stats/DbFunctionCostsMaster.java",
"license": "apache-2.0",
"size": 7441
} | [
"org.threeten.bp.Clock"
] | import org.threeten.bp.Clock; | import org.threeten.bp.*; | [
"org.threeten.bp"
] | org.threeten.bp; | 1,860,247 |
public Collection getAllQuotes() throws Exception {
if (Log.doActionTrace()) {
Log.trace("TradeAction:getAllQuotes");
}
Collection quotes;
quotes = trade.getAllQuotes();
return quotes;
}
| Collection function() throws Exception { if (Log.doActionTrace()) { Log.trace(STR); } Collection quotes; quotes = trade.getAllQuotes(); return quotes; } | /**
* Return a collection of {@link QuoteDataBean}describing all current
* quotes
*
* @return the collection of QuoteDataBean
*/ | Return a collection of <code>QuoteDataBean</code>describing all current quotes | getAllQuotes | {
"repo_name": "jmilliro/daytrader",
"path": "javaee6/modules/web/src/main/java/org/apache/geronimo/daytrader/javaee6/web/TradeAction.java",
"license": "apache-2.0",
"size": 25191
} | [
"java.util.Collection",
"org.apache.geronimo.daytrader.javaee6.utils.Log"
] | import java.util.Collection; import org.apache.geronimo.daytrader.javaee6.utils.Log; | import java.util.*; import org.apache.geronimo.daytrader.javaee6.utils.*; | [
"java.util",
"org.apache.geronimo"
] | java.util; org.apache.geronimo; | 194,087 |
public long getNextScheduledTime() {
Calendar calendar = Calendar.getInstance();
long now = calendar.getTimeInMillis();
if (scheduledTime != null) {
calendar.setTimeInMillis(scheduledTime);
}
// Set the time to our granularity
calendar.set(Calendar.MILLI... | long function() { Calendar calendar = Calendar.getInstance(); long now = calendar.getTimeInMillis(); if (scheduledTime != null) { calendar.setTimeInMillis(scheduledTime); } calendar.set(Calendar.MILLISECOND, 0); calendar.set(Calendar.SECOND, 0); calendar.set(Calendar.HOUR_OF_DAY, timeMin / 60); calendar.set(Calendar.MI... | /**
* Determine the next time this routine will run. This time is always in the future.
*
* @return timestamp of next run
*/ | Determine the next time this routine will run. This time is always in the future | getNextScheduledTime | {
"repo_name": "WalrusCow/routiner",
"path": "app/src/main/java/ca/wmcd/routiner/data/Routine.java",
"license": "mit",
"size": 4677
} | [
"java.util.Calendar"
] | import java.util.Calendar; | import java.util.*; | [
"java.util"
] | java.util; | 677,421 |
public void saveParam() throws Exception {
Enumeration<AbstractParamPanel> en = tablePanel.elements();
AbstractParamPanel panel = null;
while (en.hasMoreElements()) {
panel = en.nextElement();
panel.saveParam(paramObject);
}
} | void function() throws Exception { Enumeration<AbstractParamPanel> en = tablePanel.elements(); AbstractParamPanel panel = null; while (en.hasMoreElements()) { panel = en.nextElement(); panel.saveParam(paramObject); } } | /**
* Saves the data of all panels, throwing an exception if there's any error.
* <p>
* The message of the exception can be shown in GUI components (for example, an error dialogue) callers can expect an
* internationalised message.
*
* @throws Exception if there's any error while saving t... | Saves the data of all panels, throwing an exception if there's any error. The message of the exception can be shown in GUI components (for example, an error dialogue) callers can expect an internationalised message | saveParam | {
"repo_name": "GillesMoris/OSS",
"path": "src/org/parosproxy/paros/view/AbstractParamContainerPanel.java",
"license": "apache-2.0",
"size": 27680
} | [
"java.util.Enumeration"
] | import java.util.Enumeration; | import java.util.*; | [
"java.util"
] | java.util; | 1,664,107 |
public List<FrameworkMethod> getAnnotatedMethods() {
List<FrameworkMethod> methods = collectValues(methodsForAnnotations);
Collections.sort(methods, METHOD_COMPARATOR);
return methods;
} | List<FrameworkMethod> function() { List<FrameworkMethod> methods = collectValues(methodsForAnnotations); Collections.sort(methods, METHOD_COMPARATOR); return methods; } | /**
* Returns, efficiently, all the non-overridden methods in this class and
* its superclasses that are annotated}.
*
* @since 4.12
*/ | Returns, efficiently, all the non-overridden methods in this class and its superclasses that are annotated} | getAnnotatedMethods | {
"repo_name": "mekwin87/junit4",
"path": "src/main/java/org/junit/runners/model/TestClass.java",
"license": "epl-1.0",
"size": 11602
} | [
"java.util.Collections",
"java.util.List"
] | import java.util.Collections; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 818,640 |
@Override
public void socialConnections(TGSocialConnections socialData, TGRequestCallback<TGConnectionUsersList> output) {
mNetworkManager.performRequest(new TGRequest<>(socialData, TGRequestType.UPDATE, true, output));
} | void function(TGSocialConnections socialData, TGRequestCallback<TGConnectionUsersList> output) { mNetworkManager.performRequest(new TGRequest<>(socialData, TGRequestType.UPDATE, true, output)); } | /**
* Update social connections
*
* @param socialData social connections information
* @param output return callback
*/ | Update social connections | socialConnections | {
"repo_name": "AutomatedPlayground/android_sdk",
"path": "tapglue-android-sdk/src/main/java/com/tapglue/networking/TGRequestFactory.java",
"license": "apache-2.0",
"size": 22177
} | [
"com.tapglue.model.TGConnectionUsersList",
"com.tapglue.model.TGSocialConnections",
"com.tapglue.networking.requests.TGRequestCallback",
"com.tapglue.networking.requests.TGRequestType"
] | import com.tapglue.model.TGConnectionUsersList; import com.tapglue.model.TGSocialConnections; import com.tapglue.networking.requests.TGRequestCallback; import com.tapglue.networking.requests.TGRequestType; | import com.tapglue.model.*; import com.tapglue.networking.requests.*; | [
"com.tapglue.model",
"com.tapglue.networking"
] | com.tapglue.model; com.tapglue.networking; | 1,612,120 |
public void setApiDirectoryFactory(ApiDirectoryFactory apiDirectoryFactory) {
this.apiDirectoryFactory = apiDirectoryFactory;
} | void function(ApiDirectoryFactory apiDirectoryFactory) { this.apiDirectoryFactory = apiDirectoryFactory; } | /**
* Provides a general mechanism for setting the ApiDirectoryFactory.
*/ | Provides a general mechanism for setting the ApiDirectoryFactory | setApiDirectoryFactory | {
"repo_name": "google-code-export/google-plugin-for-eclipse",
"path": "plugins/com.google.gdt.eclipse.managedapis/src/com/google/gdt/eclipse/managedapis/impl/ManagedApiListingSourceFactory.java",
"license": "epl-1.0",
"size": 4949
} | [
"com.google.gdt.eclipse.managedapis.directory.ApiDirectoryFactory"
] | import com.google.gdt.eclipse.managedapis.directory.ApiDirectoryFactory; | import com.google.gdt.eclipse.managedapis.directory.*; | [
"com.google.gdt"
] | com.google.gdt; | 2,058,846 |
public void initializeFlags() {
flags = new ImageIcon[8];
flags[0] = new ImageIcon("germ/gui/windows/images/flags/english.jpg");
flags[1] = new ImageIcon("germ/gui/windows/images/flags/france.jpg");
flags[2] = new ImageIcon("germ/gui/windows/images/flags/german.jpg");
flags[3] = new ImageIcon("germ/gui/win... | void function() { flags = new ImageIcon[8]; flags[0] = new ImageIcon(STR); flags[1] = new ImageIcon(STR); flags[2] = new ImageIcon(STR); flags[3] = new ImageIcon(STR); flags[4] = new ImageIcon(STR); flags[5] = new ImageIcon(STR); flags[6] = new ImageIcon(STR); flags[7] = new ImageIcon(STR); } | /**
* Funkcija inicijalizuje niz ikonica koji popunjava adekvatnim slikama i
* odredjenim redosledom
*/ | Funkcija inicijalizuje niz ikonica koji popunjava adekvatnim slikama i odredjenim redosledom | initializeFlags | {
"repo_name": "delicb/Germ",
"path": "germ/gui/windows/SettingsWindow.java",
"license": "apache-2.0",
"size": 27417
} | [
"javax.swing.ImageIcon"
] | import javax.swing.ImageIcon; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 2,280,527 |
protected void writeSnapshotList(List<SnapshotId> snapshots) throws IOException {
final BytesReference bRef;
try(BytesStreamOutput bStream = new BytesStreamOutput()) {
try(StreamOutput stream = new OutputStreamStreamOutput(bStream)) {
XContentBuilder builder = XContentFac... | void function(List<SnapshotId> snapshots) throws IOException { final BytesReference bRef; try(BytesStreamOutput bStream = new BytesStreamOutput()) { try(StreamOutput stream = new OutputStreamStreamOutput(bStream)) { XContentBuilder builder = XContentFactory.contentBuilder(XContentType.JSON, stream); builder.startObject... | /**
* Writes snapshot index file
* <p/>
* This file can be used by read-only repositories that are unable to list files in the repository
*
* @param snapshots list of snapshot ids
* @throws IOException I/O errors
*/ | Writes snapshot index file This file can be used by read-only repositories that are unable to list files in the repository | writeSnapshotList | {
"repo_name": "vingupta3/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/repositories/blobstore/BlobStoreRepository.java",
"license": "apache-2.0",
"size": 28743
} | [
"java.io.IOException",
"java.io.OutputStream",
"java.util.List",
"org.elasticsearch.cluster.metadata.SnapshotId",
"org.elasticsearch.common.bytes.BytesReference",
"org.elasticsearch.common.io.stream.BytesStreamOutput",
"org.elasticsearch.common.io.stream.OutputStreamStreamOutput",
"org.elasticsearch.c... | import java.io.IOException; import java.io.OutputStream; import java.util.List; import org.elasticsearch.cluster.metadata.SnapshotId; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.io.stream.BytesStreamOutput; import org.elasticsearch.common.io.stream.OutputStreamStreamOutput; imp... | import java.io.*; import java.util.*; import org.elasticsearch.cluster.metadata.*; import org.elasticsearch.common.bytes.*; import org.elasticsearch.common.io.stream.*; import org.elasticsearch.common.xcontent.*; | [
"java.io",
"java.util",
"org.elasticsearch.cluster",
"org.elasticsearch.common"
] | java.io; java.util; org.elasticsearch.cluster; org.elasticsearch.common; | 425,345 |
public SortedSet<WServiceChain> getIncomingServiceChains()
{
if (!getNet().isWithIpLayer()) return new TreeSet<> ();
return n.getAssociatedRoutes(getNet().getIpLayer().get().getNe()).stream().
filter(d->{ WTYPE t = getNet().getWType(d).orElse(null); return t == null? false : t.isServiceChain(); }).
map(... | SortedSet<WServiceChain> function() { if (!getNet().isWithIpLayer()) return new TreeSet<> (); return n.getAssociatedRoutes(getNet().getIpLayer().get().getNe()).stream(). filter(d->{ WTYPE t = getNet().getWType(d).orElse(null); return t == null? false : t.isServiceChain(); }). map(ee -> new WServiceChain(ee)).filter(sc ... | /**
* Returns the set of incoming service chains to the node, including those ended in a VNF in the node
* @return see above
*/ | Returns the set of incoming service chains to the node, including those ended in a VNF in the node | getIncomingServiceChains | {
"repo_name": "girtel/Net2Plan",
"path": "Net2Plan-Core/src/main/java/com/net2plan/niw/WNode.java",
"license": "bsd-2-clause",
"size": 34848
} | [
"java.util.SortedSet",
"java.util.TreeSet",
"java.util.stream.Collectors"
] | import java.util.SortedSet; import java.util.TreeSet; import java.util.stream.Collectors; | import java.util.*; import java.util.stream.*; | [
"java.util"
] | java.util; | 692,458 |
public void updateData() {
dataCursor = messagesProviderHelper.outgoing();
dataCursor.moveToFirst();
currentData.clear();
String[] fields = new String[] {MessagesProviderHelper.KEY_MESSAGE_HASH, MessagesProviderHelper.KEY_TIME, MessagesProviderHelper.KEY_RECEIVED_TIME, MessagesProvi... | void function() { dataCursor = messagesProviderHelper.outgoing(); dataCursor.moveToFirst(); currentData.clear(); String[] fields = new String[] {MessagesProviderHelper.KEY_MESSAGE_HASH, MessagesProviderHelper.KEY_TIME, MessagesProviderHelper.KEY_RECEIVED_TIME, MessagesProviderHelper.KEY_TITLE, MessagesProviderHelper.KE... | /**
* Update the data based on items from the database
* TODO
* Probably shouldn't do this atomically like this...
*/ | Update the data based on items from the database TODO Probably shouldn't do this atomically like this.. | updateData | {
"repo_name": "zeitkunst/FluidNexusAndroid",
"path": "src/net/fluidnexus/FluidNexusAndroid/services/ProtocolThread.java",
"license": "gpl-3.0",
"size": 22635
} | [
"java.util.Vector",
"net.fluidnexus.FluidNexusAndroid"
] | import java.util.Vector; import net.fluidnexus.FluidNexusAndroid; | import java.util.*; import net.fluidnexus.*; | [
"java.util",
"net.fluidnexus"
] | java.util; net.fluidnexus; | 1,419,895 |
private void hierarchyChanged(HierarchyEvent event) {
if ((event.getChangeFlags() & HierarchyEvent.SHOWING_CHANGED) != 0 && editorComponent.isShowing()) {
popupWindow = createWindow((Window) editorComponent.getTopLevelAncestor());
showPopup();
}
} | void function(HierarchyEvent event) { if ((event.getChangeFlags() & HierarchyEvent.SHOWING_CHANGED) != 0 && editorComponent.isShowing()) { popupWindow = createWindow((Window) editorComponent.getTopLevelAncestor()); showPopup(); } } | /**
* Creates and displays the popup window when the {@code editorComponent} is added to the table.
*/ | Creates and displays the popup window when the editorComponent is added to the table | hierarchyChanged | {
"repo_name": "jonestimd/swing-extensions",
"path": "src/main/java/io/github/jonestimd/swing/table/PopupTableCellEditor.java",
"license": "mit",
"size": 5645
} | [
"java.awt.Window",
"java.awt.event.HierarchyEvent"
] | import java.awt.Window; import java.awt.event.HierarchyEvent; | import java.awt.*; import java.awt.event.*; | [
"java.awt"
] | java.awt; | 425,725 |
protected void startMagnetometer() {
if( magnetoSrv == null ) magnetoSrv = new Intent(awareContext, Magnetometer.class);
awareContext.startService(magnetoSrv);
} | void function() { if( magnetoSrv == null ) magnetoSrv = new Intent(awareContext, Magnetometer.class); awareContext.startService(magnetoSrv); } | /**
* Start Magnetometer module
*/ | Start Magnetometer module | startMagnetometer | {
"repo_name": "cluo29/com.aware.plugin.trying",
"path": "aware-core/src/main/java/com/aware/Aware.java",
"license": "apache-2.0",
"size": 76881
} | [
"android.content.Intent"
] | import android.content.Intent; | import android.content.*; | [
"android.content"
] | android.content; | 349,014 |
@Deprecated
String validatePreferredEmailChange(PerunSession sess, User user, String i, String m) throws PrivilegeException, UserNotExistsException, WrongAttributeAssignmentException, AttributeNotExistsException, WrongReferenceAttributeValueException, WrongAttributeValueException; | String validatePreferredEmailChange(PerunSession sess, User user, String i, String m) throws PrivilegeException, UserNotExistsException, WrongAttributeAssignmentException, AttributeNotExistsException, WrongReferenceAttributeValueException, WrongAttributeValueException; | /**
* Validate change of user's preferred email address.
* New email address is set as value of
* urn:perun:user:attribute-def:def:preferredMail attribute.
*
* @param sess PerunSession
* @param user User to validate email address for
* @param i decrypted parameter
* @param m encrypted parameter
*
* ... | Validate change of user's preferred email address. New email address is set as value of urn:perun:user:attribute-def:def:preferredMail attribute | validatePreferredEmailChange | {
"repo_name": "zoraseb/perun",
"path": "perun-core/src/main/java/cz/metacentrum/perun/core/api/UsersManager.java",
"license": "bsd-2-clause",
"size": 54525
} | [
"cz.metacentrum.perun.core.api.exceptions.AttributeNotExistsException",
"cz.metacentrum.perun.core.api.exceptions.PrivilegeException",
"cz.metacentrum.perun.core.api.exceptions.UserNotExistsException",
"cz.metacentrum.perun.core.api.exceptions.WrongAttributeAssignmentException",
"cz.metacentrum.perun.core.a... | import cz.metacentrum.perun.core.api.exceptions.AttributeNotExistsException; import cz.metacentrum.perun.core.api.exceptions.PrivilegeException; import cz.metacentrum.perun.core.api.exceptions.UserNotExistsException; import cz.metacentrum.perun.core.api.exceptions.WrongAttributeAssignmentException; import cz.metacentru... | import cz.metacentrum.perun.core.api.exceptions.*; | [
"cz.metacentrum.perun"
] | cz.metacentrum.perun; | 1,342,952 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.