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 ArrayList<Estudiante> darEstudiantes( ) throws DatosException
{
try
{
//
// Crea el statement y el miniSQL de la operación
IStatement statement = crearStatement( );
String operacion = "SELECT *";
//
// Realiz... | ArrayList<Estudiante> function( ) throws DatosException { try { IStatement statement = crearStatement( ); String operacion = STR; IResultado resultado = statement.ejecutarConsulta( operacion ); statement.cerrar( ); return cargarEstudiantes( resultado ); } catch( MiniDBCException e ) { throw new DatosException( STR + e.... | /**
* Devuelve todos los estudiantes de la base de datos
* @return Todos los estudiantes de la base de datos
* @throws DatosException Excepción al cargar los estudiantes
*/ | Devuelve todos los estudiantes de la base de datos | darEstudiantes | {
"repo_name": "vargax/ejemplos",
"path": "java/apo/n16_colegioWeb/source/uniandes/cupi2/colegioweb/mundo/EstudianteDAO.java",
"license": "gpl-2.0",
"size": 11595
} | [
"java.util.ArrayList"
] | import java.util.ArrayList; | import java.util.*; | [
"java.util"
] | java.util; | 1,968,191 |
private boolean isGainBias(final double[] maxRad, final double[] minRad, List nominalRadVals) {
double[] nominalGain = getNomGains(nominalRadVals, bandsPresent);
double[] nominalLmin = getNomLmin(nominalRadVals, bandsPresent);
if (getDistance(nominalGain, maxRad) < 0.5) {
if (g... | boolean function(final double[] maxRad, final double[] minRad, List nominalRadVals) { double[] nominalGain = getNomGains(nominalRadVals, bandsPresent); double[] nominalLmin = getNomLmin(nominalRadVals, bandsPresent); if (getDistance(nominalGain, maxRad) < 0.5) { if (getDistance(nominalLmin, minRad) < 0.5) { return true... | /**
* checks if the found data are with a big likelihood GAIN BIAS data
* note! Lmin = BIAS
*
* @param maxRad the found value at the maxRad field
* @param minRad the found value at the minRad fiedl
* @param nominalRadVals
*
* @return <code>true</code> if the found... | checks if the found data are with a big likelihood GAIN BIAS data note! Lmin = BIAS | isGainBias | {
"repo_name": "seadas/beam",
"path": "beam-landsat-reader/src/main/java/org/esa/beam/dataio/landsat/RadiometricData.java",
"license": "gpl-3.0",
"size": 14872
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,505,868 |
public static Color getRepresentingColor(int id, int value){
if (colorlist[id][value] == null){ //if not in list, add it to the list
colorlist[id][value] = new Color();
int colorInt;
if (Block.getInstance(id,value, new Coordinate(0,0,0,false)).hasSides){
... | static Color function(int id, int value){ if (colorlist[id][value] == null){ colorlist[id][value] = new Color(); int colorInt; if (Block.getInstance(id,value, new Coordinate(0,0,0,false)).hasSides){ AtlasRegion texture = getBlockSprite(id, value, 1); if (texture == null) return new Color(); colorInt = getPixmap().getPi... | /**
* Returns a color representing the block. Picks from the sprite sprite.
* @param id id of the Block
* @param value the value of the block.
* @return a color representing the block
*/ | Returns a color representing the block. Picks from the sprite sprite | getRepresentingColor | {
"repo_name": "odaymichael/Wurfel-Engine",
"path": "com/BombingGames/EngineCore/Gameobjects/Block.java",
"license": "bsd-3-clause",
"size": 19560
} | [
"com.badlogic.gdx.graphics.Color",
"com.badlogic.gdx.graphics.g2d.TextureAtlas"
] | import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.graphics.g2d.TextureAtlas; | import com.badlogic.gdx.graphics.*; import com.badlogic.gdx.graphics.g2d.*; | [
"com.badlogic.gdx"
] | com.badlogic.gdx; | 718,735 |
private void storeDefaultContext(PrintWriter writer, int indent,
DefaultContext dcontext)
throws Exception {
// Store the beginning of this element
for (int i = 0; i < indent; i++) {
writer.print(' ');
}
writer.print("<Default... | void function(PrintWriter writer, int indent, DefaultContext dcontext) throws Exception { for (int i = 0; i < indent; i++) { writer.print(' '); } writer.print(STR); storeAttributes(writer, dcontext); writer.println(">"); String iListeners[] = dcontext.findInstanceListeners(); for (int i = 0; i < iListeners.length; i++)... | /**
* Store the specified DefaultContext properties.
*
* @param writer PrintWriter to which we are storing
* @param indent Number of spaces to indent this element
* @param dcontext Object whose properties are being stored
*
* @exception Exception if an exception occurs while storing
... | Store the specified DefaultContext properties | storeDefaultContext | {
"repo_name": "eclipsky/HowTomcatWorks",
"path": "src/org/apache/catalina/core/StandardServer.java",
"license": "apache-2.0",
"size": 71859
} | [
"java.io.PrintWriter",
"javax.naming.directory.DirContext",
"org.apache.catalina.DefaultContext",
"org.apache.catalina.Lifecycle",
"org.apache.catalina.LifecycleListener",
"org.apache.catalina.Loader",
"org.apache.catalina.Manager",
"org.apache.catalina.Pipeline",
"org.apache.catalina.Valve",
"org... | import java.io.PrintWriter; import javax.naming.directory.DirContext; import org.apache.catalina.DefaultContext; import org.apache.catalina.Lifecycle; import org.apache.catalina.LifecycleListener; import org.apache.catalina.Loader; import org.apache.catalina.Manager; import org.apache.catalina.Pipeline; import org.apac... | import java.io.*; import javax.naming.directory.*; import org.apache.catalina.*; import org.apache.catalina.deploy.*; | [
"java.io",
"javax.naming",
"org.apache.catalina"
] | java.io; javax.naming; org.apache.catalina; | 560,892 |
Observable<Page<Product>> getMultiplePagesFailureUriNextAsync(final String nextPageLink); | Observable<Page<Product>> getMultiplePagesFailureUriNextAsync(final String nextPageLink); | /**
* A paging operation that receives an invalid nextLink.
*
* @param nextPageLink The NextLink from the previous successful call to List operation.
* @return the observable to the PagedList<Product> object
*/ | A paging operation that receives an invalid nextLink | getMultiplePagesFailureUriNextAsync | {
"repo_name": "anudeepsharma/autorest",
"path": "src/generator/AutoRest.Java.Azure.Tests/src/main/java/fixtures/paging/Pagings.java",
"license": "mit",
"size": 49384
} | [
"com.microsoft.azure.Page"
] | import com.microsoft.azure.Page; | import com.microsoft.azure.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 1,846,390 |
public Application getApplication(){
return application;
}
| Application function(){ return application; } | /**
* Get the {@link Application} to which this app state is attached.
* @return the {@link Application} to which this app state is attached.
* @see #getStateManager()
*/ | Get the <code>Application</code> to which this app state is attached | getApplication | {
"repo_name": "atomixnmc/jmonkeyengine",
"path": "jme3-vr/src/main/java/com/jme3/app/VRAppState.java",
"license": "bsd-3-clause",
"size": 24029
} | [
"com.jme3.app.Application"
] | import com.jme3.app.Application; | import com.jme3.app.*; | [
"com.jme3.app"
] | com.jme3.app; | 2,426,418 |
MaterialRegistry<?> getMaterialRegistry(); | MaterialRegistry<?> getMaterialRegistry(); | /**
* Gets the material registry for this world.
*
* @return The material registry
*/ | Gets the material registry for this world | getMaterialRegistry | {
"repo_name": "Featherblade/VoxelGunsmith",
"path": "src/main/java/com/voxelplugineering/voxelsniper/world/World.java",
"license": "mit",
"size": 4448
} | [
"com.voxelplugineering.voxelsniper.service.registry.MaterialRegistry"
] | import com.voxelplugineering.voxelsniper.service.registry.MaterialRegistry; | import com.voxelplugineering.voxelsniper.service.registry.*; | [
"com.voxelplugineering.voxelsniper"
] | com.voxelplugineering.voxelsniper; | 1,277,367 |
public void setSelectorDrawable(int res) {
mViewAbove.setSelectorBitmap(BitmapFactory.decodeResource(getResources(), res));
} | void function(int res) { mViewAbove.setSelectorBitmap(BitmapFactory.decodeResource(getResources(), res)); } | /**
* Sets the selector drawable.
*
* @param res a resource ID for the selector drawable
*/ | Sets the selector drawable | setSelectorDrawable | {
"repo_name": "eduardoweiland/doode-android",
"path": "libs/SlidingMenu/src/com/slidingmenu/lib/SlidingMenu.java",
"license": "gpl-3.0",
"size": 25339
} | [
"android.graphics.BitmapFactory"
] | import android.graphics.BitmapFactory; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 1,859,279 |
public void setComparator(int column, Comparator<?> comparator) {
checkColumn(column);
if (comparators == null) {
comparators = new Comparator[getModelWrapper().getColumnCount()];
}
comparators[column] = comparator;
} | void function(int column, Comparator<?> comparator) { checkColumn(column); if (comparators == null) { comparators = new Comparator[getModelWrapper().getColumnCount()]; } comparators[column] = comparator; } | /**
* Sets the <code>Comparator</code> to use when sorting the specified
* column. This does not trigger a sort. If you want to sort after
* setting the comparator you need to explicitly invoke <code>sort</code>.
*
* @param column the index of the column the <code>Comparator</code> is
* ... | Sets the <code>Comparator</code> to use when sorting the specified column. This does not trigger a sort. If you want to sort after setting the comparator you need to explicitly invoke <code>sort</code> | setComparator | {
"repo_name": "rokn/Count_Words_2015",
"path": "testing/openjdk/jdk/src/share/classes/javax/swing/DefaultRowSorter.java",
"license": "mit",
"size": 47549
} | [
"java.util.Comparator"
] | import java.util.Comparator; | import java.util.*; | [
"java.util"
] | java.util; | 955,430 |
Field getField(); | Field getField(); | /**
* Returns the bean field where the annotation was found.
*
* @return the {@link Field}.
*
* @throws ClassCastException
* if the bean member is not a field.
*/ | Returns the bean field where the annotation was found | getField | {
"repo_name": "devent/globalpom-utils",
"path": "globalpomutils-reflection/src/main/java/com/anrisoftware/globalpom/reflection/annotations/AnnotationBean.java",
"license": "apache-2.0",
"size": 2530
} | [
"java.lang.reflect.Field"
] | import java.lang.reflect.Field; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 2,502,249 |
public ServiceCallConfigurationDefinition serviceChooser(ServiceChooser serviceChooser) {
setServiceChooser(serviceChooser);
return this;
} | ServiceCallConfigurationDefinition function(ServiceChooser serviceChooser) { setServiceChooser(serviceChooser); return this; } | /**
* Sets a custom {@link ServiceChooser} to use.
*/ | Sets a custom <code>ServiceChooser</code> to use | serviceChooser | {
"repo_name": "lburgazzoli/apache-camel",
"path": "camel-core/src/main/java/org/apache/camel/model/cloud/ServiceCallConfigurationDefinition.java",
"license": "apache-2.0",
"size": 21269
} | [
"org.apache.camel.cloud.ServiceChooser"
] | import org.apache.camel.cloud.ServiceChooser; | import org.apache.camel.cloud.*; | [
"org.apache.camel"
] | org.apache.camel; | 497,278 |
public boolean commit() {
if (os != null) {
unlock();
throw new IllegalStateException(MessageFormat.format(JGitText.get().lockOnNotClosed, ref));
}
saveStatInformation();
if (lck.renameTo(ref))
return true;
if (!ref.exists() || deleteRef())
if (renameLock())
return true;
unlock();
retu... | boolean function() { if (os != null) { unlock(); throw new IllegalStateException(MessageFormat.format(JGitText.get().lockOnNotClosed, ref)); } saveStatInformation(); if (lck.renameTo(ref)) return true; if (!ref.exists() deleteRef()) if (renameLock()) return true; unlock(); return false; } | /**
* Commit this change and release the lock.
* <p>
* If this method fails (returns false) the lock is still released.
*
* @return true if the commit was successful and the file contains the new
* data; false if the commit failed and the file remains with the
* old data.
* @throws Illeg... | Commit this change and release the lock. If this method fails (returns false) the lock is still released | commit | {
"repo_name": "forge/plugin-undo",
"path": "src/main/jgit/org/jboss/forge/jgit/storage/file/LockFile.java",
"license": "epl-1.0",
"size": 15406
} | [
"java.text.MessageFormat",
"org.jboss.forge.jgit.internal.JGitText"
] | import java.text.MessageFormat; import org.jboss.forge.jgit.internal.JGitText; | import java.text.*; import org.jboss.forge.jgit.internal.*; | [
"java.text",
"org.jboss.forge"
] | java.text; org.jboss.forge; | 357,488 |
public BigDecimal getOvertimeAmt ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_OvertimeAmt);
if (bd == null)
return Env.ZERO;
return bd;
} | BigDecimal function () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_OvertimeAmt); if (bd == null) return Env.ZERO; return bd; } | /** Get Overtime Amount.
@return Hourly Overtime Rate
*/ | Get Overtime Amount | getOvertimeAmt | {
"repo_name": "adempiere/adempiere",
"path": "base/src/org/compiere/model/X_C_UserRemuneration.java",
"license": "gpl-2.0",
"size": 8136
} | [
"java.math.BigDecimal",
"org.compiere.util.Env"
] | import java.math.BigDecimal; import org.compiere.util.Env; | import java.math.*; import org.compiere.util.*; | [
"java.math",
"org.compiere.util"
] | java.math; org.compiere.util; | 2,260,809 |
public RefCounted<SolrIndexSearcher> getRegisteredSearcher() {
synchronized (searcherLock) {
if (_searcher != null) {
_searcher.incref();
}
return _searcher;
}
} | RefCounted<SolrIndexSearcher> function() { synchronized (searcherLock) { if (_searcher != null) { _searcher.incref(); } return _searcher; } } | /**
* Returns the current registered searcher with its reference count incremented, or null if none are registered.
*/ | Returns the current registered searcher with its reference count incremented, or null if none are registered | getRegisteredSearcher | {
"repo_name": "kankedong/solr_reading",
"path": "solr/core/src/java/org/apache/solr/core/SolrCore.java",
"license": "apache-2.0",
"size": 92758
} | [
"org.apache.solr.search.SolrIndexSearcher",
"org.apache.solr.util.RefCounted"
] | import org.apache.solr.search.SolrIndexSearcher; import org.apache.solr.util.RefCounted; | import org.apache.solr.search.*; import org.apache.solr.util.*; | [
"org.apache.solr"
] | org.apache.solr; | 2,442,320 |
protected void setFooterEnabled(boolean enabled) {
if (enabled) {
if (mGridView.getFooterViewCount() == 0) {
if (mGridFooterView.getParent() != null ) {
((ViewGroup) mGridFooterView.getParent()).removeView(mGridFooterView);
}
mG... | void function(boolean enabled) { if (enabled) { if (mGridView.getFooterViewCount() == 0) { if (mGridFooterView.getParent() != null ) { ((ViewGroup) mGridFooterView.getParent()).removeView(mGridFooterView); } mGridView.addFooterView(mGridFooterView, null, false); } mGridFooterView.invalidate(); if (mListView.getFooterVi... | /**
* TODO doc
* To be called before setAdapter, or GridViewWithHeaderAndFooter will throw an exception
*
* @param enabled
*/ | TODO doc To be called before setAdapter, or GridViewWithHeaderAndFooter will throw an exception | setFooterEnabled | {
"repo_name": "Godine/android",
"path": "src/com/owncloud/android/ui/fragment/ExtendedListFragment.java",
"license": "gpl-2.0",
"size": 14791
} | [
"android.view.ViewGroup"
] | import android.view.ViewGroup; | import android.view.*; | [
"android.view"
] | android.view; | 785,244 |
public final static int getVersionCode() {
try {
PackageInfo pinfo = sApplication.getPackageManager().getPackageInfo(PACKAGE_NAME, 0);
return pinfo.versionCode;
} catch (android.content.pm.PackageManager.NameNotFoundException e) {
Logger.logApplicationException(e,... | final static int function() { try { PackageInfo pinfo = sApplication.getPackageManager().getPackageInfo(PACKAGE_NAME, 0); return pinfo.versionCode; } catch (android.content.pm.PackageManager.NameNotFoundException e) { Logger.logApplicationException(e, OfficeApplication.class.getSimpleName() + STR); } return 0; } | /**
* Retrieves application version code from manifest file.
*
* @return Application version code defined in manifest file, otherwise returns <code>0<code>.
*/ | Retrieves application version code from manifest file | getVersionCode | {
"repo_name": "sujianping/Office-365-SDK-for-Android",
"path": "samples/mail-calendar-contacts-app/demo-app/src/main/java/com/example/office/OfficeApplication.java",
"license": "apache-2.0",
"size": 5911
} | [
"android.content.pm.PackageInfo",
"com.example.office.logger.Logger"
] | import android.content.pm.PackageInfo; import com.example.office.logger.Logger; | import android.content.pm.*; import com.example.office.logger.*; | [
"android.content",
"com.example.office"
] | android.content; com.example.office; | 1,435,345 |
public ApplicationGatewayUrlPathMap withDefaultBackendHttpSettings(SubResource defaultBackendHttpSettings) {
this.defaultBackendHttpSettings = defaultBackendHttpSettings;
return this;
} | ApplicationGatewayUrlPathMap function(SubResource defaultBackendHttpSettings) { this.defaultBackendHttpSettings = defaultBackendHttpSettings; return this; } | /**
* Set default backend http settings resource of URL path map.
*
* @param defaultBackendHttpSettings the defaultBackendHttpSettings value to set
* @return the ApplicationGatewayUrlPathMap object itself.
*/ | Set default backend http settings resource of URL path map | withDefaultBackendHttpSettings | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2020_03_01/src/main/java/com/microsoft/azure/management/network/v2020_03_01/ApplicationGatewayUrlPathMap.java",
"license": "mit",
"size": 6856
} | [
"com.microsoft.azure.SubResource"
] | import com.microsoft.azure.SubResource; | import com.microsoft.azure.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 2,251,704 |
//-----------------------------------------------------------------------
public MetaProperty<Long> first() {
return first;
} | MetaProperty<Long> function() { return first; } | /**
* The meta-property for the {@code first} property.
* @return the meta-property, not null
*/ | The meta-property for the first property | first | {
"repo_name": "OpenGamma/Strata",
"path": "modules/collect/src/main/java/com/opengamma/strata/collect/tuple/LongDoublePair.java",
"license": "apache-2.0",
"size": 11868
} | [
"org.joda.beans.MetaProperty"
] | import org.joda.beans.MetaProperty; | import org.joda.beans.*; | [
"org.joda.beans"
] | org.joda.beans; | 827,566 |
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
HttpSession session = req.getSession();
synchronized (session) {
try {
CopyOnWriteArrayList<User> users = USER_DAO.getAll();
session... | void function(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { HttpSession session = req.getSession(); synchronized (session) { try { CopyOnWriteArrayList<User> users = USER_DAO.getAll(); session.setAttribute("users", users); } catch (DaoException daoExp) { LOG.error(STR, daoExp)... | /**
* doGet method.
* @param req request.
* @param resp response.
* @throws ServletException servlet exception.
* @throws IOException input output exception.
*/ | doGet method | doGet | {
"repo_name": "VardanMatevosyan/Vardan-Git-Repository",
"path": "Servlet_JSP/musicPlatform/src/main/java/ru/matevosyan/controller/servlet/crud/DeleteServlet.java",
"license": "apache-2.0",
"size": 4960
} | [
"java.io.IOException",
"java.util.concurrent.CopyOnWriteArrayList",
"javax.servlet.ServletException",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"javax.servlet.http.HttpSession",
"ru.matevosyan.dao.DaoException",
"ru.matevosyan.entity.User"
] | import java.io.IOException; import java.util.concurrent.CopyOnWriteArrayList; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import ru.matevosyan.dao.DaoException; import ru.matevosyan.entity.User... | import java.io.*; import java.util.concurrent.*; import javax.servlet.*; import javax.servlet.http.*; import ru.matevosyan.dao.*; import ru.matevosyan.entity.*; | [
"java.io",
"java.util",
"javax.servlet",
"ru.matevosyan.dao",
"ru.matevosyan.entity"
] | java.io; java.util; javax.servlet; ru.matevosyan.dao; ru.matevosyan.entity; | 2,297,404 |
public static Echantillon beanToPojo(EchantillonBean bean) throws Exception {
Echantillon pojo = new Echantillon();
Map<FormatDefinition, String> map = bean.getMapValues();
try {
for (FormatDefinition key : map.keySet()) {
String value = map.get(key);
if (!value.isEmpty()) {
pojo.setValue(key.t... | static Echantillon function(EchantillonBean bean) throws Exception { Echantillon pojo = new Echantillon(); Map<FormatDefinition, String> map = bean.getMapValues(); try { for (FormatDefinition key : map.keySet()) { String value = map.get(key); if (!value.isEmpty()) { pojo.setValue(key.toString(), value); } } pojo.setNot... | /**
* pour chaque valeur du bean, mapping avec un attribut existant
*
* @param bean
* @return
*/ | pour chaque valeur du bean, mapping avec un attribut existant | beanToPojo | {
"repo_name": "Biobanques/ebiobanques-dataloader",
"path": "src/main/java/fr/inserm/server/manager/EchantillonManager.java",
"license": "lgpl-3.0",
"size": 4260
} | [
"fr.inserm.bean.v2.EchantillonBean",
"fr.inserm.bean.v2.FormatDefinition",
"fr.inserm.server.model.Echantillon",
"java.util.Map"
] | import fr.inserm.bean.v2.EchantillonBean; import fr.inserm.bean.v2.FormatDefinition; import fr.inserm.server.model.Echantillon; import java.util.Map; | import fr.inserm.bean.v2.*; import fr.inserm.server.model.*; import java.util.*; | [
"fr.inserm.bean",
"fr.inserm.server",
"java.util"
] | fr.inserm.bean; fr.inserm.server; java.util; | 1,493,157 |
private StateModelDefinition getIncompleteStateModelDef(String modelName, String initialState,
LinkedHashMap<String, Integer> states) {
StateModelDefinition.Builder builder =
new StateModelDefinition.Builder(StateModelDefId.from(modelName));
builder.initialState(State.from(initialState));
in... | StateModelDefinition function(String modelName, String initialState, LinkedHashMap<String, Integer> states) { StateModelDefinition.Builder builder = new StateModelDefinition.Builder(StateModelDefId.from(modelName)); builder.initialState(State.from(initialState)); int i = 0; for (String state : states.keySet()) { builde... | /**
* Get a StateModelDefinition without transitions. The auto rebalancer doesn't take transitions
* into account when computing mappings, so this is acceptable.
* @param modelName name to give the model
* @param initialState initial state for all nodes
* @param states ordered map of state to count
* ... | Get a StateModelDefinition without transitions. The auto rebalancer doesn't take transitions into account when computing mappings, so this is acceptable | getIncompleteStateModelDef | {
"repo_name": "Teino1978-Corp/Teino1978-Corp-helix",
"path": "helix-core/src/test/java/org/apache/helix/controller/strategy/TestAutoRebalanceStrategy.java",
"license": "apache-2.0",
"size": 37719
} | [
"java.util.LinkedHashMap",
"java.util.List",
"java.util.Map",
"java.util.Random",
"java.util.Set",
"java.util.TreeSet",
"org.apache.helix.api.State",
"org.apache.helix.api.id.StateModelDefId",
"org.apache.helix.controller.strategy.AutoRebalanceStrategy",
"org.apache.helix.model.StateModelDefinitio... | import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import java.util.Random; import java.util.Set; import java.util.TreeSet; import org.apache.helix.api.State; import org.apache.helix.api.id.StateModelDefId; import org.apache.helix.controller.strategy.AutoRebalanceStrategy; import org.apache.he... | import java.util.*; import org.apache.helix.api.*; import org.apache.helix.api.id.*; import org.apache.helix.controller.strategy.*; import org.apache.helix.model.*; | [
"java.util",
"org.apache.helix"
] | java.util; org.apache.helix; | 2,817,250 |
private void isConnectionManaged(JSONArray args, CallbackContext callbackCtx)
{
callbackCtx.sendPluginResult(new PluginResult(PluginResult.Status.OK, _bluetooth.isConnectionManaged()));
} | void function(JSONArray args, CallbackContext callbackCtx) { callbackCtx.sendPluginResult(new PluginResult(PluginResult.Status.OK, _bluetooth.isConnectionManaged())); } | /**
* See if we have a managed connection active (allows read/write).
*
* @param args Arguments given.
* @param callbackCtx Where to send results.
*/ | See if we have a managed connection active (allows read/write) | isConnectionManaged | {
"repo_name": "nadavelyashiv/metal-finder-new",
"path": "platforms/android/src/org/apache/cordova/bluetooth/BluetoothPlugin.java",
"license": "mit",
"size": 26410
} | [
"org.apache.cordova.CallbackContext",
"org.apache.cordova.PluginResult",
"org.json.JSONArray"
] | import org.apache.cordova.CallbackContext; import org.apache.cordova.PluginResult; import org.json.JSONArray; | import org.apache.cordova.*; import org.json.*; | [
"org.apache.cordova",
"org.json"
] | org.apache.cordova; org.json; | 2,851,513 |
public static RefreshRequest refreshRequest(String... indices) {
return new RefreshRequest(indices);
} | static RefreshRequest function(String... indices) { return new RefreshRequest(indices); } | /**
* Creates a refresh indices request.
*
* @param indices The indices to refresh. Use <tt>null</tt> or <tt>_all</tt> to execute against all indices
* @return The refresh request
* @see org.elasticsearch.client.IndicesAdminClient#refresh(org.elasticsearch.action.admin.indices.refresh.RefreshRe... | Creates a refresh indices request | refreshRequest | {
"repo_name": "wayeast/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/client/Requests.java",
"license": "apache-2.0",
"size": 20980
} | [
"org.elasticsearch.action.admin.indices.refresh.RefreshRequest"
] | import org.elasticsearch.action.admin.indices.refresh.RefreshRequest; | import org.elasticsearch.action.admin.indices.refresh.*; | [
"org.elasticsearch.action"
] | org.elasticsearch.action; | 2,456,968 |
public static RelDataType deriveUncollectRowType(RelNode rel) {
RelDataType inputType = rel.getRowType();
assert inputType.isStruct() : inputType + " is not a struct";
final List<RelDataTypeField> fields = inputType.getFieldList();
assert 1 == fields.size() : "expected 1 field";
RelDataType ret = ... | static RelDataType function(RelNode rel) { RelDataType inputType = rel.getRowType(); assert inputType.isStruct() : inputType + STR; final List<RelDataTypeField> fields = inputType.getFieldList(); assert 1 == fields.size() : STR; RelDataType ret = fields.get(0).getType().getComponentType(); assert null != ret; if (!ret.... | /**
* Returns the row type returned by applying the 'UNNEST' operation to a
* relational expression. The relational expression must have precisely one
* column, whose type must be a multiset of structs. The return type is the
* type of that column.
*/ | Returns the row type returned by applying the 'UNNEST' operation to a relational expression. The relational expression must have precisely one column, whose type must be a multiset of structs. The return type is the type of that column | deriveUncollectRowType | {
"repo_name": "YrAuYong/incubator-calcite",
"path": "core/src/main/java/org/apache/calcite/rel/core/Uncollect.java",
"license": "apache-2.0",
"size": 3842
} | [
"java.util.List",
"org.apache.calcite.rel.RelNode",
"org.apache.calcite.rel.type.RelDataType",
"org.apache.calcite.rel.type.RelDataTypeField",
"org.apache.calcite.sql.SqlUtil"
] | import java.util.List; import org.apache.calcite.rel.RelNode; import org.apache.calcite.rel.type.RelDataType; import org.apache.calcite.rel.type.RelDataTypeField; import org.apache.calcite.sql.SqlUtil; | import java.util.*; import org.apache.calcite.rel.*; import org.apache.calcite.rel.type.*; import org.apache.calcite.sql.*; | [
"java.util",
"org.apache.calcite"
] | java.util; org.apache.calcite; | 1,737,850 |
public static void encodeFileToFile(String infile, String outfile) {
String encoded = encodeFromFile(infile);
OutputStream out = null;
try {
out = new BufferedOutputStream(new FileOutputStream(outfile));
out.write(encoded.getBytes("US-ASCII")); // Strict, 7-bit output.
} catch (IOExceptio... | static void function(String infile, String outfile) { String encoded = encodeFromFile(infile); OutputStream out = null; try { out = new BufferedOutputStream(new FileOutputStream(outfile)); out.write(encoded.getBytes(STR)); } catch (IOException e) { LOG.error(STR + infile + STR + outfile, e); } finally { if (out != null... | /**
* Reads <tt>infile</tt> and encodes it to <tt>outfile</tt>.
*
* @param infile Input file
* @param outfile Output file
* @since 2.2
*/ | Reads infile and encodes it to outfile | encodeFileToFile | {
"repo_name": "amyvmiwei/hbase",
"path": "hbase-common/src/main/java/org/apache/hadoop/hbase/util/Base64.java",
"license": "apache-2.0",
"size": 58936
} | [
"java.io.BufferedOutputStream",
"java.io.FileOutputStream",
"java.io.IOException",
"java.io.OutputStream"
] | import java.io.BufferedOutputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,900,772 |
public static int indexOfClasspathEntryContainer(
IClasspathEntry[] classpathEntries, String containerId) {
for (int i = 0; i < classpathEntries.length; ++i) {
IClasspathEntry classpathEntry = classpathEntries[i];
if (classpathEntry.getEntryKind() != IClasspathEntry.CPE_CONTAINER) {
// S... | static int function( IClasspathEntry[] classpathEntries, String containerId) { for (int i = 0; i < classpathEntries.length; ++i) { IClasspathEntry classpathEntry = classpathEntries[i]; if (classpathEntry.getEntryKind() != IClasspathEntry.CPE_CONTAINER) { continue; } IPath containerPath = classpathEntry.getPath(); if (c... | /**
* Returns the first index of the specified
* {@link IClasspathEntry#CPE_CONTAINER} entry with the specified container ID
* or -1 if one could not be found.
*
* @param classpathEntries array of classpath entries
* @param containerId container ID
* @return index of the specified {@link IClasspath... | Returns the first index of the specified <code>IClasspathEntry#CPE_CONTAINER</code> entry with the specified container ID or -1 if one could not be found | indexOfClasspathEntryContainer | {
"repo_name": "gwt-plugins/gwt-eclipse-plugin",
"path": "plugins/com.gwtplugins.gdt.eclipse.core/src/com/google/gdt/eclipse/core/ClasspathUtilities.java",
"license": "epl-1.0",
"size": 18567
} | [
"org.eclipse.core.runtime.IPath",
"org.eclipse.jdt.core.IClasspathEntry"
] | import org.eclipse.core.runtime.IPath; import org.eclipse.jdt.core.IClasspathEntry; | import org.eclipse.core.runtime.*; import org.eclipse.jdt.core.*; | [
"org.eclipse.core",
"org.eclipse.jdt"
] | org.eclipse.core; org.eclipse.jdt; | 1,190,915 |
public static Filter getFilter(Configuration conf) {
return FilterCompat.get(getFilterPredicate(conf), getUnboundRecordFilterInstance(conf));
}
private LruCache<FileStatusWrapper, FootersCacheValue> footersCache;
private final Class<? extends ReadSupport<T>> readSupportClass;
public ParquetInputForm... | static Filter function(Configuration conf) { return FilterCompat.get(getFilterPredicate(conf), getUnboundRecordFilterInstance(conf)); } private LruCache<FileStatusWrapper, FootersCacheValue> footersCache; private final Class<? extends ReadSupport<T>> readSupportClass; public ParquetInputFormat() { this.readSupportClass... | /**
* Returns a non-null Filter, which is a wrapper around either a
* FilterPredicate, an UnboundRecordFilter, or a no-op filter.
*/ | Returns a non-null Filter, which is a wrapper around either a FilterPredicate, an UnboundRecordFilter, or a no-op filter | getFilter | {
"repo_name": "davidgin/parquet-mr",
"path": "parquet-hadoop/src/main/java/parquet/hadoop/ParquetInputFormat.java",
"license": "apache-2.0",
"size": 29883
} | [
"org.apache.hadoop.conf.Configuration"
] | import org.apache.hadoop.conf.Configuration; | import org.apache.hadoop.conf.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 662,797 |
private static String extractUUIDFromScspResponse(ScspResponse response) {
String uuid = null;
try {
uuid = response.getResponseHeaders()
.getHeaderValues("Content-UUID").get(0);
} catch (Exception e) {
logger .error("Could not extract the UUID from t... | static String function(ScspResponse response) { String uuid = null; try { uuid = response.getResponseHeaders() .getHeaderValues(STR).get(0); } catch (Exception e) { logger .error(STR, e); logger.error(response.toString()); } return uuid; } | /**
* Extract the object UUID from an SCSP response (e.g. an SCSP READ
* response).
*
* @param response
* The SCSP response which is expected to contain a UUID.
* @return The extracted UUID, or <code>null</code> if extraction fails.
*/ | Extract the object UUID from an SCSP response (e.g. an SCSP READ response) | extractUUIDFromScspResponse | {
"repo_name": "medicayun/medicayundicom",
"path": "dcm4jboss-all/trunk/dcm4jboss-sar/src/java/org/dcm4chex/archive/hsm/module/castor/CAStorHSMModule.java",
"license": "apache-2.0",
"size": 26596
} | [
"com.caringo.client.ScspResponse"
] | import com.caringo.client.ScspResponse; | import com.caringo.client.*; | [
"com.caringo.client"
] | com.caringo.client; | 1,623,951 |
public static double pointToLineDistance(LatLong L1, LatLong L2, LatLong P) {
double A = P.getLatitude() - L1.getLatitude();
double B = P.getLongitude() - L1.getLongitude();
double C = L2.getLatitude() - L1.getLatitude();
double D = L2.getLongitude() - L1.getLongitude();
dou... | static double function(LatLong L1, LatLong L2, LatLong P) { double A = P.getLatitude() - L1.getLatitude(); double B = P.getLongitude() - L1.getLongitude(); double C = L2.getLatitude() - L1.getLatitude(); double D = L2.getLongitude() - L1.getLongitude(); double dot = A * C + B * D; double len_sq = C * C + D * D; double ... | /**
* Provides the distance from a point P to the line segment that passes
* through A-B. If the point is not on the side of the line, returns the
* distance to the closest point
*
* @param L1 First point of the line
* @param L2 Second point of the line
* @param P Point to m... | Provides the distance from a point P to the line segment that passes through A-B. If the point is not on the side of the line, returns the distance to the closest point | pointToLineDistance | {
"repo_name": "offbye/Tower",
"path": "Android/src/com/o3dr/services/android/lib/util/MathUtils.java",
"license": "gpl-3.0",
"size": 15008
} | [
"com.o3dr.services.android.lib.coordinate.LatLong"
] | import com.o3dr.services.android.lib.coordinate.LatLong; | import com.o3dr.services.android.lib.coordinate.*; | [
"com.o3dr.services"
] | com.o3dr.services; | 1,785,217 |
protected K standardCeilingKey(K key) {
return keyOrNull(ceilingEntry(key));
} | K function(K key) { return keyOrNull(ceilingEntry(key)); } | /**
* A sensible definition of {@link #ceilingKey} in terms of {@code ceilingEntry}. If you override
* {@code ceilingEntry}, you may wish to override {@code ceilingKey} to forward to this
* implementation.
*/ | A sensible definition of <code>#ceilingKey</code> in terms of ceilingEntry. If you override ceilingEntry, you may wish to override ceilingKey to forward to this implementation | standardCeilingKey | {
"repo_name": "trivium-io/trivium-core",
"path": "src/io/trivium/dep/com/google/common/collect/ForwardingNavigableMap.java",
"license": "apache-2.0",
"size": 13266
} | [
"io.trivium.dep.com.google.common.collect.Maps"
] | import io.trivium.dep.com.google.common.collect.Maps; | import io.trivium.dep.com.google.common.collect.*; | [
"io.trivium.dep"
] | io.trivium.dep; | 2,467,194 |
public JRHyperlink getItemHyperlink(); | JRHyperlink function(); | /**
* Returns the hyperlink specification for chart items.
* <p>
* The hyperlink will be evaluated for every chart item and an image map will be created for the chart.
* </p>
*
* @return hyperlink specification for chart items
*/ | Returns the hyperlink specification for chart items. The hyperlink will be evaluated for every chart item and an image map will be created for the chart. | getItemHyperlink | {
"repo_name": "MHTaleb/Encologim",
"path": "lib/JasperReport/src/net/sf/jasperreports/charts/JRCategorySeries.java",
"license": "gpl-3.0",
"size": 2981
} | [
"net.sf.jasperreports.engine.JRHyperlink"
] | import net.sf.jasperreports.engine.JRHyperlink; | import net.sf.jasperreports.engine.*; | [
"net.sf.jasperreports"
] | net.sf.jasperreports; | 1,882,889 |
List<Resource<?>> listResources(); | List<Resource<?>> listResources(); | /**
* Return a list of child resources of the current resource. (Never null.)
*/ | Return a list of child resources of the current resource. (Never null.) | listResources | {
"repo_name": "jerr/jbossforge-core",
"path": "resources/api/src/main/java/org/jboss/forge/addon/resource/Resource.java",
"license": "epl-1.0",
"size": 5616
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 787,667 |
public static boolean createAccount(Context context, OUser user) {
AccountManager accountManager = AccountManager.get(context);
Account account = new Account(user.getAndroidName(), KEY_ACCOUNT_TYPE);
if (accountManager.addAccountExplicitly(account, String.valueOf(user.getPassword()),
... | static boolean function(Context context, OUser user) { AccountManager accountManager = AccountManager.get(context); Account account = new Account(user.getAndroidName(), KEY_ACCOUNT_TYPE); if (accountManager.addAccountExplicitly(account, String.valueOf(user.getPassword()), user.getAsBundle())) { OPreferenceManager pref ... | /**
* Creates Odoo account for app
*
* @param context
* @param user user instance (OUser)
* @return true, if account created successfully
*/ | Creates Odoo account for app | createAccount | {
"repo_name": "js-superion/framework-master",
"path": "app/src/main/java/com/odoo/core/auth/OdooAccountManager.java",
"license": "agpl-3.0",
"size": 8310
} | [
"android.accounts.Account",
"android.accounts.AccountManager",
"android.content.Context",
"com.odoo.core.support.OUser",
"com.odoo.core.utils.OPreferenceManager"
] | import android.accounts.Account; import android.accounts.AccountManager; import android.content.Context; import com.odoo.core.support.OUser; import com.odoo.core.utils.OPreferenceManager; | import android.accounts.*; import android.content.*; import com.odoo.core.support.*; import com.odoo.core.utils.*; | [
"android.accounts",
"android.content",
"com.odoo.core"
] | android.accounts; android.content; com.odoo.core; | 2,005,929 |
@SuppressWarnings("unchecked")
default Multimap<String, AttributeModifier> getItemAttributeModifiers(EntityEquipmentSlot equipmentSlot) {
Multimap<String, AttributeModifier> multimap = __superGetItemAttributeModifiers(equipmentSlot);
if (equipmentSlot == EntityEquipmentSlot.MAINHAND) {
multimap.put(S... | @SuppressWarnings(STR) default Multimap<String, AttributeModifier> getItemAttributeModifiers(EntityEquipmentSlot equipmentSlot) { Multimap<String, AttributeModifier> multimap = __superGetItemAttributeModifiers(equipmentSlot); if (equipmentSlot == EntityEquipmentSlot.MAINHAND) { multimap.put(SharedMonsterAttributes.ATTA... | /**
* Gets a map of item attribute modifiers, used by ItemSword to increase hit damage.
*/ | Gets a map of item attribute modifiers, used by ItemSword to increase hit damage | getItemAttributeModifiers | {
"repo_name": "Skelril/Skree",
"path": "src/main/java/com/skelril/nitro/registry/item/ICustomTool.java",
"license": "mpl-2.0",
"size": 5827
} | [
"com.google.common.collect.Multimap",
"net.minecraft.entity.SharedMonsterAttributes",
"net.minecraft.entity.ai.attributes.AttributeModifier",
"net.minecraft.inventory.EntityEquipmentSlot"
] | import com.google.common.collect.Multimap; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.ai.attributes.AttributeModifier; import net.minecraft.inventory.EntityEquipmentSlot; | import com.google.common.collect.*; import net.minecraft.entity.*; import net.minecraft.entity.ai.attributes.*; import net.minecraft.inventory.*; | [
"com.google.common",
"net.minecraft.entity",
"net.minecraft.inventory"
] | com.google.common; net.minecraft.entity; net.minecraft.inventory; | 2,138,815 |
public void stop() {
if (state == State.RECORDING) {
aRecorder.stop();
try {
fWriter.seek(4); // Write filesize to header
fWriter.writeInt(Integer.reverseBytes(36 + payloadSize));
fWriter.seek(40); // Write payload size to hea... | void function() { if (state == State.RECORDING) { aRecorder.stop(); try { fWriter.seek(4); fWriter.writeInt(Integer.reverseBytes(36 + payloadSize)); fWriter.seek(40); fWriter.writeInt(Integer.reverseBytes(payloadSize)); Log.d(TAG, STR + payloadSize + STR + mIsInserting); if (mIsInserting) { File secondPart = new File(D... | /**
* Stops the recording, and sets the state to STOPPED. In case of further usage, a reset is
* needed. Also finalizes the wave file in case of uncompressed recording.
*/ | Stops the recording, and sets the state to STOPPED. In case of further usage, a reset is needed. Also finalizes the wave file in case of uncompressed recording | stop | {
"repo_name": "mobilesec/auth-client-demo-module-voice",
"path": "src/at/fhooe/mcm/smc/wav/WaveRecorder.java",
"license": "lgpl-3.0",
"size": 21835
} | [
"android.util.Log",
"java.io.File",
"java.io.IOException"
] | import android.util.Log; import java.io.File; import java.io.IOException; | import android.util.*; import java.io.*; | [
"android.util",
"java.io"
] | android.util; java.io; | 2,210,220 |
List<String> getLibraryCandidates(String aLibraryName, Long aMajorVersion)
{
final List<String> retval = new LinkedList<String>();
// Note: when done each of these variables must be set to a non-null, non
// empty string array
final String[] prefixes;
final String[] suffixes;
final String[] ... | List<String> getLibraryCandidates(String aLibraryName, Long aMajorVersion) { final List<String> retval = new LinkedList<String>(); final String[] prefixes; final String[] suffixes; final String[] preSuffixVersions; final String[] postSuffixVersions; switch (getOS()) { case Unknown: case Linux: prefixes = new String[] {... | /**
* For a given library, and the OS we're running on, this method generates a
* list of potential absolute file paths that
* {@link #loadCandidateLibrary(String, Long, String[])} should attempt (in
* order) to load. This method will not check for existence and readability of
* the file we're attempting... | For a given library, and the OS we're running on, this method generates a list of potential absolute file paths that <code>#loadCandidateLibrary(String, Long, String[])</code> should attempt (in order) to load. This method will not check for existence and readability of the file we're attempting to load | getLibraryCandidates | {
"repo_name": "10045125/xuggle-xuggler",
"path": "src/com/xuggle/ferry/JNILibraryLoader.java",
"license": "gpl-3.0",
"size": 22164
} | [
"java.util.LinkedList",
"java.util.List"
] | import java.util.LinkedList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,211,480 |
public static <T> Iterator<T> toIterator(Collection<T> col) {
if (col == null)
return null;
else
return col.iterator();
} | static <T> Iterator<T> function(Collection<T> col) { if (col == null) return null; else return col.iterator(); } | /**
* Get an iterator from a collection, returning null if collection is null
* @param col The collection to be turned in to an iterator
* @return The resulting Iterator
*/ | Get an iterator from a collection, returning null if collection is null | toIterator | {
"repo_name": "yuri0x7c1/ofbiz-explorer",
"path": "src/test/resources/apache-ofbiz-16.11.03/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilMisc.java",
"license": "apache-2.0",
"size": 26421
} | [
"java.util.Collection",
"java.util.Iterator"
] | import java.util.Collection; import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 714,621 |
public java.util.List<fr.lip6.move.pnml.hlpn.strings.hlapi.HLPNStringHLAPI> getInput_strings_HLPNStringHLAPI(){
java.util.List<fr.lip6.move.pnml.hlpn.strings.hlapi.HLPNStringHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.strings.hlapi.HLPNStringHLAPI>();
for (Sort elemnt : getInput()) {
if(elemnt.g... | java.util.List<fr.lip6.move.pnml.hlpn.strings.hlapi.HLPNStringHLAPI> function(){ java.util.List<fr.lip6.move.pnml.hlpn.strings.hlapi.HLPNStringHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.strings.hlapi.HLPNStringHLAPI>(); for (Sort elemnt : getInput()) { if(elemnt.getClass().equals(fr.lip6.move.pnml.hlpn.string... | /**
* This accessor return a list of encapsulated subelement, only of HLPNStringHLAPI kind.
* WARNING : this method can creates a lot of new object in memory.
*/ | This accessor return a list of encapsulated subelement, only of HLPNStringHLAPI kind. WARNING : this method can creates a lot of new object in memory | getInput_strings_HLPNStringHLAPI | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-HLPN/src/fr/lip6/move/pnml/hlpn/finiteIntRanges/hlapi/LessThanOrEqualHLAPI.java",
"license": "epl-1.0",
"size": 108879
} | [
"fr.lip6.move.pnml.hlpn.terms.Sort",
"java.util.ArrayList",
"java.util.List"
] | import fr.lip6.move.pnml.hlpn.terms.Sort; import java.util.ArrayList; import java.util.List; | import fr.lip6.move.pnml.hlpn.terms.*; import java.util.*; | [
"fr.lip6.move",
"java.util"
] | fr.lip6.move; java.util; | 914,936 |
@Property(order = 13, styleable = false)
Point2D getLocation(); | @Property(order = 13, styleable = false) Point2D getLocation(); | /**
* Gets the location of this plot in its parent plot. The origin of a plot is the bottom-left
* corner of the content box (the intersect point of left axis and bottom axis).
* For root plot, the returned value is always (0,0)
*
* @return an instance of <code>Point</code> representing the bas... | Gets the location of this plot in its parent plot. The origin of a plot is the bottom-left corner of the content box (the intersect point of left axis and bottom axis). For root plot, the returned value is always (0,0) | getLocation | {
"repo_name": "jplot2d/jplot2d",
"path": "jplot2d-core/src/main/java/org/jplot2d/element/Plot.java",
"license": "lgpl-3.0",
"size": 13155
} | [
"java.awt.geom.Point2D",
"org.jplot2d.annotation.Property"
] | import java.awt.geom.Point2D; import org.jplot2d.annotation.Property; | import java.awt.geom.*; import org.jplot2d.annotation.*; | [
"java.awt",
"org.jplot2d.annotation"
] | java.awt; org.jplot2d.annotation; | 1,837,158 |
public static List<URI> findResourcesBySuffix(String resourceLocation, String fileNameSuffix)
throws IOException, URISyntaxException {
return findResources(resourceLocation, path -> path.toString().endsWith(fileNameSuffix));
} | static List<URI> function(String resourceLocation, String fileNameSuffix) throws IOException, URISyntaxException { return findResources(resourceLocation, path -> path.toString().endsWith(fileNameSuffix)); } | /**
* Search the specified location in classpath, and returns the resources with the specified suffix.
*/ | Search the specified location in classpath, and returns the resources with the specified suffix | findResourcesBySuffix | {
"repo_name": "ServiceComb/java-chassis",
"path": "foundations/foundation-common/src/main/java/org/apache/servicecomb/foundation/common/utils/ResourceUtil.java",
"license": "apache-2.0",
"size": 3488
} | [
"java.io.IOException",
"java.net.URISyntaxException",
"java.util.List"
] | import java.io.IOException; import java.net.URISyntaxException; import java.util.List; | import java.io.*; import java.net.*; import java.util.*; | [
"java.io",
"java.net",
"java.util"
] | java.io; java.net; java.util; | 1,097,058 |
public boolean satisfies(ExistentialQuantification f) {
for (Constant a : this.domain) {
Formula<RelationalAtom> fg = this.gop.groundFormula(f.getFormula(), a);
if (this.satisfies(fg))
return true;
}
return false;
} | boolean function(ExistentialQuantification f) { for (Constant a : this.domain) { Formula<RelationalAtom> fg = this.gop.groundFormula(f.getFormula(), a); if (this.satisfies(fg)) return true; } return false; } | /**
* Checks whether an existentially quantified formula is satisfied.
* @param f
* Formula
* @return true, if satisfied, false otherwise
*/ | Checks whether an existentially quantified formula is satisfied | satisfies | {
"repo_name": "tbsflk/RelationalSystemZ",
"path": "src/semantics/worlds/RelationalPossibleWorld.java",
"license": "gpl-3.0",
"size": 5106
} | [
"edu.cs.ai.log4KR.logical.syntax.Formula",
"edu.cs.ai.log4KR.relational.classicalLogic.syntax.RelationalAtom",
"edu.cs.ai.log4KR.relational.classicalLogic.syntax.signature.Constant"
] | import edu.cs.ai.log4KR.logical.syntax.Formula; import edu.cs.ai.log4KR.relational.classicalLogic.syntax.RelationalAtom; import edu.cs.ai.log4KR.relational.classicalLogic.syntax.signature.Constant; | import edu.cs.ai.*; | [
"edu.cs.ai"
] | edu.cs.ai; | 2,397,642 |
@Test(enabled = false)
public final void testLast() throws TTXPathException {
final String query = "//b[last()]";
final String result = "<b xmlns:p=\"ns\" p:x=\"y\"><c/>bar</b>";
XPathStringChecker.testIAxisConventions(holder.getNRtx(), new XPathAxis(holder.getNRtx(), query),
... | @Test(enabled = false) final void function() throws TTXPathException { final String query = STR<b xmlns:p=\"ns\" p:x=\"y\"><c/>bar</b>"; XPathStringChecker.testIAxisConventions(holder.getNRtx(), new XPathAxis(holder.getNRtx(), query), new String[] { result }); } | /**
* Test function last().
*
* @throws TTXPathException
*/ | Test function last() | testLast | {
"repo_name": "sebastiangraf/treetank",
"path": "interfacemodules/xml/src/test/java/org/treetank/service/xml/xpath/FunctionsTest.java",
"license": "bsd-3-clause",
"size": 17598
} | [
"org.testng.annotations.Test",
"org.treetank.exception.TTXPathException"
] | import org.testng.annotations.Test; import org.treetank.exception.TTXPathException; | import org.testng.annotations.*; import org.treetank.exception.*; | [
"org.testng.annotations",
"org.treetank.exception"
] | org.testng.annotations; org.treetank.exception; | 447,175 |
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout);
mViewPager = (ViewPager) findViewById(R.id.pager);
mViewPager.setAdapter(mSectionsP... | void function(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); mDrawerLayout = (DrawerLayout) findViewById(R.id.drawer_layout); mViewPager = (ViewPager) findViewById(R.id.pager); mViewPager.setAdapter(mSectionsPagerAdapter); TabLayout tabLayout = (TabLayout) findV... | /**
* Initializes tab navigation.
*/ | Initializes tab navigation | onCreate | {
"repo_name": "wweich/syncthing-android",
"path": "src/main/java/com/nutomic/syncthingandroid/activities/MainActivity.java",
"license": "mpl-2.0",
"size": 16063
} | [
"android.os.Bundle",
"android.support.design.widget.TabLayout",
"android.support.v4.app.FragmentManager",
"android.support.v4.view.ViewPager",
"android.support.v4.widget.DrawerLayout",
"com.nutomic.syncthingandroid.fragments.DeviceListFragment",
"com.nutomic.syncthingandroid.fragments.DrawerFragment",
... | import android.os.Bundle; import android.support.design.widget.TabLayout; import android.support.v4.app.FragmentManager; import android.support.v4.view.ViewPager; import android.support.v4.widget.DrawerLayout; import com.nutomic.syncthingandroid.fragments.DeviceListFragment; import com.nutomic.syncthingandroid.fragment... | import android.os.*; import android.support.design.widget.*; import android.support.v4.app.*; import android.support.v4.view.*; import android.support.v4.widget.*; import com.nutomic.syncthingandroid.fragments.*; | [
"android.os",
"android.support",
"com.nutomic.syncthingandroid"
] | android.os; android.support; com.nutomic.syncthingandroid; | 2,598,466 |
Optional<ResolvedIndex> resolveIndex(Session session, TableHandle tableHandle, Set<ColumnHandle> indexableColumns, Set<ColumnHandle> outputColumns, TupleDomain<ColumnHandle> tupleDomain); | Optional<ResolvedIndex> resolveIndex(Session session, TableHandle tableHandle, Set<ColumnHandle> indexableColumns, Set<ColumnHandle> outputColumns, TupleDomain<ColumnHandle> tupleDomain); | /**
* Try to locate a table index that can lookup results by indexableColumns and provide the requested outputColumns.
*/ | Try to locate a table index that can lookup results by indexableColumns and provide the requested outputColumns | resolveIndex | {
"repo_name": "stewartpark/presto",
"path": "presto-main/src/main/java/com/facebook/presto/metadata/Metadata.java",
"license": "apache-2.0",
"size": 14812
} | [
"com.facebook.presto.Session",
"com.facebook.presto.spi.ColumnHandle",
"com.facebook.presto.spi.predicate.TupleDomain",
"java.util.Optional",
"java.util.Set"
] | import com.facebook.presto.Session; import com.facebook.presto.spi.ColumnHandle; import com.facebook.presto.spi.predicate.TupleDomain; import java.util.Optional; import java.util.Set; | import com.facebook.presto.*; import com.facebook.presto.spi.*; import com.facebook.presto.spi.predicate.*; import java.util.*; | [
"com.facebook.presto",
"java.util"
] | com.facebook.presto; java.util; | 38,118 |
protected void checkRange(int offset, int numberOfRows) {
Preconditions.checkState(offset >= 0, MSG_OFFSET_MUST_BE_POSITIVE_INT);
Preconditions.checkState(numberOfRows >= 0 && numberOfRows <= MAX_LIMIT, MSG_LIMIT_RANGE);
} | void function(int offset, int numberOfRows) { Preconditions.checkState(offset >= 0, MSG_OFFSET_MUST_BE_POSITIVE_INT); Preconditions.checkState(numberOfRows >= 0 && numberOfRows <= MAX_LIMIT, MSG_LIMIT_RANGE); } | /**
* Checks range of the limit when constructing. Throws IllegalStateException when range is invalid.
*/ | Checks range of the limit when constructing. Throws IllegalStateException when range is invalid | checkRange | {
"repo_name": "chillenious/commons",
"path": "jooq/src/main/java/com/chillenious/common/db/jooq/svc/Limit.java",
"license": "mit",
"size": 4546
} | [
"com.google.common.base.Preconditions"
] | import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 2,277,815 |
public void setTravelDocumentService(final TravelDocumentService travelDocumentService) {
this.travelDocumentService = travelDocumentService;
} | void function(final TravelDocumentService travelDocumentService) { this.travelDocumentService = travelDocumentService; } | /**
* Sets the travelDocumentService attribute.
*
* @return Returns the travelDocumentService.
*/ | Sets the travelDocumentService attribute | setTravelDocumentService | {
"repo_name": "bhutchinson/kfs",
"path": "kfs-tem/src/main/java/org/kuali/kfs/module/tem/document/web/struts/ReturnToFiscalOfficerQuestionHandler.java",
"license": "agpl-3.0",
"size": 7144
} | [
"org.kuali.kfs.module.tem.document.service.TravelDocumentService"
] | import org.kuali.kfs.module.tem.document.service.TravelDocumentService; | import org.kuali.kfs.module.tem.document.service.*; | [
"org.kuali.kfs"
] | org.kuali.kfs; | 2,170,879 |
@SuppressWarnings({ "unchecked", "rawtypes" })
private AvroRecordBuilderFactory<E> buildAvroRecordBuilderFactory(
Schema schema) {
if (specific) {
Class<E> specificClass;
String className = schema.getFullName();
try {
specificClass = (Class<E>) Class.forName(className);
} c... | @SuppressWarnings({ STR, STR }) AvroRecordBuilderFactory<E> function( Schema schema) { if (specific) { Class<E> specificClass; String className = schema.getFullName(); try { specificClass = (Class<E>) Class.forName(className); } catch (ClassNotFoundException e) { throw new DatasetException(STR + className); } return ne... | /**
* Build the appropriate AvroRecordBuilderFactory for this instance. Avro has
* many different record types, of which we support two: Specific and Generic.
*
* @param schema
* The Avro schema needed to construct the AvroRecordBuilderFactory.
* @return The constructed AvroRecordBuilderFact... | Build the appropriate AvroRecordBuilderFactory for this instance. Avro has many different record types, of which we support two: Specific and Generic | buildAvroRecordBuilderFactory | {
"repo_name": "cloudera/cdk",
"path": "cdk-data/cdk-data-hbase/src/main/java/com/cloudera/cdk/data/hbase/avro/AvroEntityComposer.java",
"license": "apache-2.0",
"size": 10470
} | [
"com.cloudera.cdk.data.DatasetException",
"org.apache.avro.Schema"
] | import com.cloudera.cdk.data.DatasetException; import org.apache.avro.Schema; | import com.cloudera.cdk.data.*; import org.apache.avro.*; | [
"com.cloudera.cdk",
"org.apache.avro"
] | com.cloudera.cdk; org.apache.avro; | 2,387,390 |
private View getView(int resource, ViewGroup parent) {
switch (resource) {
case NO_RESOURCE:
return null;
case TEXT_VIEW_ITEM_RESOURCE:
return new TextView(context);
default:
return inflater.inflate(resource, parent, false);
}
} | View function(int resource, ViewGroup parent) { switch (resource) { case NO_RESOURCE: return null; case TEXT_VIEW_ITEM_RESOURCE: return new TextView(context); default: return inflater.inflate(resource, parent, false); } } | /**
* Loads view from resources
* @param resource the resource Id
* @return the loaded view or null if resource is not set
*/ | Loads view from resources | getView | {
"repo_name": "CiLiNet-Android/AndroidProject-CndSteel_External",
"path": "CndSteel_External/src/com/cndsteel/framework/views/dialogs/wheelpicker/adapters/AbstractWheelTextAdapter.java",
"license": "apache-2.0",
"size": 8141
} | [
"android.view.View",
"android.view.ViewGroup",
"android.widget.TextView"
] | import android.view.View; import android.view.ViewGroup; import android.widget.TextView; | import android.view.*; import android.widget.*; | [
"android.view",
"android.widget"
] | android.view; android.widget; | 1,779,233 |
public BufferedReader openBufferedStream() throws IOException {
Reader reader = openStream();
return (reader instanceof BufferedReader)
? (BufferedReader) reader
: new BufferedReader(reader);
}
/**
* Appends the contents of this source to the given {@link Appendable} (such as a {@link ... | BufferedReader function() throws IOException { Reader reader = openStream(); return (reader instanceof BufferedReader) ? (BufferedReader) reader : new BufferedReader(reader); } /** * Appends the contents of this source to the given {@link Appendable} (such as a {@link Writer}). * Does not close {@code appendable} if it... | /**
* Opens a new {@link BufferedReader} for reading from this source. This method should return a
* new, independent reader each time it is called.
*
* <p>The caller is responsible for ensuring that the returned reader is closed.
*
* @throws IOException if an I/O error occurs in the process of openin... | Opens a new <code>BufferedReader</code> for reading from this source. This method should return a new, independent reader each time it is called. The caller is responsible for ensuring that the returned reader is closed | openBufferedStream | {
"repo_name": "baratali/guava",
"path": "guava/src/com/google/common/io/CharSource.java",
"license": "apache-2.0",
"size": 15119
} | [
"java.io.BufferedReader",
"java.io.IOException",
"java.io.Reader",
"java.io.Writer"
] | import java.io.BufferedReader; import java.io.IOException; import java.io.Reader; import java.io.Writer; | import java.io.*; | [
"java.io"
] | java.io; | 2,840,018 |
private void waitChangePoolMasterHost(Host master, Connection conn, String hostUuid) throws BadServerResponse, XenAPIException, XmlRpcException {
int count = 0;
while (hostUuid.equals(master.getUuid(conn))) {
threadUtils.sleepThread(3);
count++;
if (count > 9... | void function(Host master, Connection conn, String hostUuid) throws BadServerResponse, XenAPIException, XmlRpcException { int count = 0; while (hostUuid.equals(master.getUuid(conn))) { threadUtils.sleepThread(3); count++; if (count > 90) { throw new CloudRuntimeException(String.format(STR, hostUuid)); } } } | /**
* Waits until the master of the pool changes, given a total of 90 tries,
* each taking 3 seconds of wait.
*/ | Waits until the master of the pool changes, given a total of 90 tries, each taking 3 seconds of wait | waitChangePoolMasterHost | {
"repo_name": "rafaelweingartner/autonomiccs-platform",
"path": "autonomic-administration-plugin/src/main/java/br/com/autonomiccs/autonomic/administration/plugin/hypervisors/xenserver/XenHypervisor.java",
"license": "apache-2.0",
"size": 8725
} | [
"com.cloud.utils.exception.CloudRuntimeException",
"com.xensource.xenapi.Connection",
"com.xensource.xenapi.Host",
"com.xensource.xenapi.Types",
"org.apache.xmlrpc.XmlRpcException"
] | import com.cloud.utils.exception.CloudRuntimeException; import com.xensource.xenapi.Connection; import com.xensource.xenapi.Host; import com.xensource.xenapi.Types; import org.apache.xmlrpc.XmlRpcException; | import com.cloud.utils.exception.*; import com.xensource.xenapi.*; import org.apache.xmlrpc.*; | [
"com.cloud.utils",
"com.xensource.xenapi",
"org.apache.xmlrpc"
] | com.cloud.utils; com.xensource.xenapi; org.apache.xmlrpc; | 1,193,860 |
@GuardedBy("lock")
private boolean startPendingStreams() {
boolean hasStreamStarted = false;
while (!pendingStreams.isEmpty() && streams.size() < maxConcurrentStreams) {
OkHttpClientStream stream = pendingStreams.poll();
startStream(stream);
hasStreamStarted = true;
}
return hasStr... | @GuardedBy("lock") boolean function() { boolean hasStreamStarted = false; while (!pendingStreams.isEmpty() && streams.size() < maxConcurrentStreams) { OkHttpClientStream stream = pendingStreams.poll(); startStream(stream); hasStreamStarted = true; } return hasStreamStarted; } | /**
* Starts pending streams, returns true if at least one pending stream is started.
*/ | Starts pending streams, returns true if at least one pending stream is started | startPendingStreams | {
"repo_name": "louiscryan/grpc-java",
"path": "okhttp/src/main/java/io/grpc/okhttp/OkHttpClientTransport.java",
"license": "bsd-3-clause",
"size": 33535
} | [
"javax.annotation.concurrent.GuardedBy"
] | import javax.annotation.concurrent.GuardedBy; | import javax.annotation.concurrent.*; | [
"javax.annotation"
] | javax.annotation; | 2,486,041 |
public List<LoanRescheduleRequestData> readLoanRescheduleRequests(Long loanId, Integer statusEnum); | List<LoanRescheduleRequestData> function(Long loanId, Integer statusEnum); | /**
* get all loan reschedule requests filter by loan ID and status enum
*
* @param loanId
* the loan identifier
* @return list of LoanRescheduleRequestData objects
**/ | get all loan reschedule requests filter by loan ID and status enum | readLoanRescheduleRequests | {
"repo_name": "RanjithKumar5550/RanMifos",
"path": "fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/rescheduleloan/service/LoanRescheduleRequestReadPlatformService.java",
"license": "apache-2.0",
"size": 2257
} | [
"java.util.List",
"org.apache.fineract.portfolio.loanaccount.rescheduleloan.data.LoanRescheduleRequestData"
] | import java.util.List; import org.apache.fineract.portfolio.loanaccount.rescheduleloan.data.LoanRescheduleRequestData; | import java.util.*; import org.apache.fineract.portfolio.loanaccount.rescheduleloan.data.*; | [
"java.util",
"org.apache.fineract"
] | java.util; org.apache.fineract; | 1,751,118 |
public void setActualEndTime(Date actualEndTime) {
this.actualEndTime = actualEndTime;
} | void function(Date actualEndTime) { this.actualEndTime = actualEndTime; } | /**
* Set actual end time for message
*
* @param actualEndTime
*/ | Set actual end time for message | setActualEndTime | {
"repo_name": "terrancesnyder/oozie-hadoop2",
"path": "client/src/main/java/org/apache/oozie/client/event/message/SLAMessage.java",
"license": "apache-2.0",
"size": 9345
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 807,794 |
public void surfaceDestroyed(SurfaceHolder holder) {
// Surface will be destroyed when we return
mGLThread.surfaceDestroyed();
}
| void function(SurfaceHolder holder) { mGLThread.surfaceDestroyed(); } | /**
* This method is part of the SurfaceHolder.Callback interface, and is
* not normally called or subclassed by clients of GLSurfaceView.
*/ | This method is part of the SurfaceHolder.Callback interface, and is not normally called or subclassed by clients of GLSurfaceView | surfaceDestroyed | {
"repo_name": "simonkinghk/Nobuhaka",
"path": "src/com/stickycoding/rokon/GLSurfaceView.java",
"license": "bsd-3-clause",
"size": 56589
} | [
"android.view.SurfaceHolder"
] | import android.view.SurfaceHolder; | import android.view.*; | [
"android.view"
] | android.view; | 18,183 |
public PartitionResponse send(DistributedMember recipient, PartitionedRegion r)
throws ForceReattemptException
{
//Assert.assertTrue(recipient != null, "PutAllPRMessage NULL recipient"); recipient can be null for event notifications
Set recipients = Collections.singleton(recipient);
PutAllRespons... | PartitionResponse function(DistributedMember recipient, PartitionedRegion r) throws ForceReattemptException { Set recipients = Collections.singleton(recipient); PutAllResponse p = new PutAllResponse(r.getSystem(), recipients); initMessage(r, recipients, false, p); setTransactionDistributed(r.getCache().getTxManager().i... | /**
* Sends a PartitionedRegion PutAllPRMessage to the recipient
* @param recipient the member to which the put message is sent
* @param r the PartitionedRegion for which the put was performed
* @return the processor used to await acknowledgement that the update was
* sent, or null to indicate t... | Sends a PartitionedRegion PutAllPRMessage to the recipient | send | {
"repo_name": "nchandrappa/incubator-geode",
"path": "gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/partitioned/PutAllPRMessage.java",
"license": "apache-2.0",
"size": 33360
} | [
"com.gemstone.gemfire.distributed.DistributedMember",
"com.gemstone.gemfire.internal.cache.ForceReattemptException",
"com.gemstone.gemfire.internal.cache.PartitionedRegion",
"java.util.Collections",
"java.util.Set"
] | import com.gemstone.gemfire.distributed.DistributedMember; import com.gemstone.gemfire.internal.cache.ForceReattemptException; import com.gemstone.gemfire.internal.cache.PartitionedRegion; import java.util.Collections; import java.util.Set; | import com.gemstone.gemfire.distributed.*; import com.gemstone.gemfire.internal.cache.*; import java.util.*; | [
"com.gemstone.gemfire",
"java.util"
] | com.gemstone.gemfire; java.util; | 1,833,928 |
String getCommentsResourcePath(final Resource resource); | String getCommentsResourcePath(final Resource resource); | /**
* Return the path to the comments resource for a resource.
* @param resource The content resource, this is usually an entry.
* @return The path to the comments resource or {@code null} if
* the passed in content resource is not part of
* Slingshot.
*/ | Return the path to the comments resource for a resource | getCommentsResourcePath | {
"repo_name": "cleliameneghin/sling",
"path": "samples/slingshot/src/main/java/org/apache/sling/sample/slingshot/comments/CommentsService.java",
"license": "apache-2.0",
"size": 1693
} | [
"org.apache.sling.api.resource.Resource"
] | import org.apache.sling.api.resource.Resource; | import org.apache.sling.api.resource.*; | [
"org.apache.sling"
] | org.apache.sling; | 1,107,254 |
@Override
public void onBlockPlacedBy(World world, int i, int j, int k, EntityLivingBase player, ItemStack is)
{
super.onBlockPlacedBy(world, i, j, k, player, is);
TEBarrel teb = null;
TileEntity te = world.getTileEntity(i, j, k);
if (te != null && is.hasTagCompound() && te instanceof TEBarrel)
{
... | void function(World world, int i, int j, int k, EntityLivingBase player, ItemStack is) { super.onBlockPlacedBy(world, i, j, k, player, is); TEBarrel teb = null; TileEntity te = world.getTileEntity(i, j, k); if (te != null && is.hasTagCompound() && te instanceof TEBarrel) { teb = (TEBarrel) te; teb.readFromItemNBT(is.ge... | /**
* Called when the block is placed in the world.
*/ | Called when the block is placed in the world | onBlockPlacedBy | {
"repo_name": "VegasGoat/TFCraft",
"path": "src/Common/com/bioxx/tfc/Blocks/Devices/BlockBarrel.java",
"license": "gpl-3.0",
"size": 16796
} | [
"com.bioxx.tfc.TileEntities",
"net.minecraft.entity.EntityLivingBase",
"net.minecraft.item.ItemStack",
"net.minecraft.tileentity.TileEntity",
"net.minecraft.world.World"
] | import com.bioxx.tfc.TileEntities; import net.minecraft.entity.EntityLivingBase; import net.minecraft.item.ItemStack; import net.minecraft.tileentity.TileEntity; import net.minecraft.world.World; | import com.bioxx.tfc.*; import net.minecraft.entity.*; import net.minecraft.item.*; import net.minecraft.tileentity.*; import net.minecraft.world.*; | [
"com.bioxx.tfc",
"net.minecraft.entity",
"net.minecraft.item",
"net.minecraft.tileentity",
"net.minecraft.world"
] | com.bioxx.tfc; net.minecraft.entity; net.minecraft.item; net.minecraft.tileentity; net.minecraft.world; | 667,397 |
@SuppressWarnings("unchecked")
public static HashMap<String, BigDecimal> sortByValue(HashMap<String, BigDecimal> map, final int order) {
List list = new LinkedList(map.entrySet());
Collections.sort(list, new Comparator() { | @SuppressWarnings(STR) static HashMap<String, BigDecimal> function(HashMap<String, BigDecimal> map, final int order) { List list = new LinkedList(map.entrySet()); Collections.sort(list, new Comparator() { | /**
* Sort HashMap into increasing (order=1) or decreasing (order=0) order
* @param map
* @param order
* @return HashMap<String, BigDecimal>
*/ | Sort HashMap into increasing (order=1) or decreasing (order=0) order | sortByValue | {
"repo_name": "devgeekco/wow",
"path": "src/devgeek/expense/algo/GroupDistAlgo.java",
"license": "mit",
"size": 6862
} | [
"java.math.BigDecimal",
"java.util.Collections",
"java.util.Comparator",
"java.util.HashMap",
"java.util.LinkedList",
"java.util.List"
] | import java.math.BigDecimal; import java.util.Collections; import java.util.Comparator; import java.util.HashMap; import java.util.LinkedList; import java.util.List; | import java.math.*; import java.util.*; | [
"java.math",
"java.util"
] | java.math; java.util; | 25,578 |
JarFile createBootProxyJar() throws IOException {
File dataFile = bundleContext.getDataFile("boot-proxy.jar");
// Create the file if it doesn't already exist
if (!dataFile.exists()) {
dataFile.createNewFile();
}
// Generate a manifest
Manifest manifest =... | JarFile createBootProxyJar() throws IOException { File dataFile = bundleContext.getDataFile(STR); if (!dataFile.exists()) { dataFile.createNewFile(); } Manifest manifest = createBootJarManifest(); FileOutputStream fileOutputStream = new FileOutputStream(dataFile, false); JarOutputStream jarOutputStream = new JarOutputS... | /**
* Create a jar file that contains the proxy code that will live in the
* boot delegation package.
*
* @return the jar file containing the proxy code to append to the boot
* class path
*
* @throws IOException if a file I/O error occurs
*/ | Create a jar file that contains the proxy code that will live in the boot delegation package | createBootProxyJar | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.monitor/src/com/ibm/ws/monitor/internal/MonitoringProxyActivator.java",
"license": "epl-1.0",
"size": 17648
} | [
"java.io.File",
"java.io.FileOutputStream",
"java.io.IOException",
"java.util.Enumeration",
"java.util.jar.JarFile",
"java.util.jar.JarOutputStream",
"java.util.jar.Manifest",
"org.osgi.framework.Bundle"
] | import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.util.Enumeration; import java.util.jar.JarFile; import java.util.jar.JarOutputStream; import java.util.jar.Manifest; import org.osgi.framework.Bundle; | import java.io.*; import java.util.*; import java.util.jar.*; import org.osgi.framework.*; | [
"java.io",
"java.util",
"org.osgi.framework"
] | java.io; java.util; org.osgi.framework; | 2,674,997 |
public void addExtension(MessageSetMessageExtension ext) {
String control = PropertyLoader.loadProperty(ext.getControl());
if (!super.childrenMap.containsKey(control)) {
ControlNode cNode = new ControlNode(control);
super.childrenMap.put(control, cNode);
}
C... | void function(MessageSetMessageExtension ext) { String control = PropertyLoader.loadProperty(ext.getControl()); if (!super.childrenMap.containsKey(control)) { ControlNode cNode = new ControlNode(control); super.childrenMap.put(control, cNode); } ControlNode controlNode = (ControlNode) super.childrenMap.get(control); co... | /**
* Adds a Work Item extesnsion to the tree
*
* @param ext
* extension to be added
*/ | Adds a Work Item extesnsion to the tree | addExtension | {
"repo_name": "NABUCCO/org.nabucco.framework.base",
"path": "org.nabucco.framework.base.ui.web/src/main/man/org/nabucco/framework/base/ui/web/component/messageset/ControlTypeNode.java",
"license": "epl-1.0",
"size": 2181
} | [
"org.nabucco.framework.base.facade.datatype.extension.property.PropertyLoader",
"org.nabucco.framework.base.facade.datatype.extension.schema.ui.messageset.MessageSetMessageExtension"
] | import org.nabucco.framework.base.facade.datatype.extension.property.PropertyLoader; import org.nabucco.framework.base.facade.datatype.extension.schema.ui.messageset.MessageSetMessageExtension; | import org.nabucco.framework.base.facade.datatype.extension.property.*; import org.nabucco.framework.base.facade.datatype.extension.schema.ui.messageset.*; | [
"org.nabucco.framework"
] | org.nabucco.framework; | 1,571,164 |
void resetVersion(boolean renewCheckpointTime) throws IOException {
this.layoutVersion = FSConstants.LAYOUT_VERSION;
if(renewCheckpointTime)
this.checkpointTime = FSNamesystem.now();
ArrayList<StorageDirectory> al = null;
for (Iterator<StorageDirectory> it =
dirI... | void resetVersion(boolean renewCheckpointTime) throws IOException { this.layoutVersion = FSConstants.LAYOUT_VERSION; if(renewCheckpointTime) this.checkpointTime = FSNamesystem.now(); ArrayList<StorageDirectory> al = null; for (Iterator<StorageDirectory> it = dirIterator(); it.hasNext();) { StorageDirectory sd = it.next... | /**
* Updates version and fstime files in all directories (fsimage and edits).
*/ | Updates version and fstime files in all directories (fsimage and edits) | resetVersion | {
"repo_name": "toddlipcon/hadoop",
"path": "src/hdfs/org/apache/hadoop/hdfs/server/namenode/FSImage.java",
"license": "apache-2.0",
"size": 67265
} | [
"java.io.File",
"java.io.IOException",
"java.util.ArrayList",
"java.util.Iterator",
"org.apache.hadoop.hdfs.protocol.FSConstants"
] | import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.Iterator; import org.apache.hadoop.hdfs.protocol.FSConstants; | import java.io.*; import java.util.*; import org.apache.hadoop.hdfs.protocol.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 852,843 |
public JsonObject createProblem(String code, String name) throws ClientException, ConnectionException
{
return createProblem(code, name, "", "binary", false, 1001);
}
| JsonObject function(String code, String name) throws ClientException, ConnectionException { return createProblem(code, name, STRbinary", false, 1001); } | /**
* Create a new not interactive binary empty problem for masterjudge = 1001
*
* @param {string} code - Problem code
* @param {string} name - Problem name
* @throws NotAuthorizedException for invalid access token
* @throws BadRequestException for empty problem code
* @throws BadRequestException f... | Create a new not interactive binary empty problem for masterjudge = 1001 | createProblem | {
"repo_name": "sphere-engine/java-client",
"path": "src/com/SphereEngine/Api/ProblemsClientV3.java",
"license": "apache-2.0",
"size": 46337
} | [
"com.google.gson.JsonObject"
] | import com.google.gson.JsonObject; | import com.google.gson.*; | [
"com.google.gson"
] | com.google.gson; | 2,243,625 |
public GridCacheMvccCandidate addNearLocal(GridCacheEntryEx parent,
UUID nodeId,
@Nullable UUID otherNodeId,
long threadId,
GridCacheVersion ver,
boolean tx,
boolean implicitSingle,
boolean read) {
GridCacheMvccCandidate cand = new GridCacheMvccCandida... | GridCacheMvccCandidate function(GridCacheEntryEx parent, UUID nodeId, @Nullable UUID otherNodeId, long threadId, GridCacheVersion ver, boolean tx, boolean implicitSingle, boolean read) { GridCacheMvccCandidate cand = new GridCacheMvccCandidate(parent, nodeId, otherNodeId, null, threadId, ver, true, false, tx, implicitS... | /**
* Adds new near local lock candidate.
*
* @param parent Parent entry.
* @param nodeId Node ID.
* @param otherNodeId Other node ID.
* @param threadId Thread ID.
* @param ver Lock version.
* @param tx Transaction flag.
* @param implicitSingle Implicit flag.
* @param r... | Adds new near local lock candidate | addNearLocal | {
"repo_name": "irudyak/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheMvcc.java",
"license": "apache-2.0",
"size": 47067
} | [
"org.apache.ignite.internal.processors.cache.version.GridCacheVersion",
"org.jetbrains.annotations.Nullable"
] | import org.apache.ignite.internal.processors.cache.version.GridCacheVersion; import org.jetbrains.annotations.Nullable; | import org.apache.ignite.internal.processors.cache.version.*; import org.jetbrains.annotations.*; | [
"org.apache.ignite",
"org.jetbrains.annotations"
] | org.apache.ignite; org.jetbrains.annotations; | 2,391,962 |
public DatagramChannel getChannel() {
return null;
}
static DatagramSocketImplFactory factory; | DatagramChannel function() { return null; } static DatagramSocketImplFactory factory; | /**
* Returns the unique {@link java.nio.channels.DatagramChannel} object
* associated with this datagram socket, if any.
*
* <p> A datagram socket will have a channel if, and only if, the channel
* itself was created via the {@link java.nio.channels.DatagramChannel#open
* DatagramChannel.... | Returns the unique <code>java.nio.channels.DatagramChannel</code> object associated with this datagram socket, if any. A datagram socket will have a channel if, and only if, the channel itself was created via the <code>java.nio.channels.DatagramChannel#open DatagramChannel.open</code> method | getChannel | {
"repo_name": "jgaltidor/VarJ",
"path": "analyzed_libs/jdk1.6.0_06_src/java/net/DatagramSocket.java",
"license": "mit",
"size": 42137
} | [
"java.nio.channels.DatagramChannel"
] | import java.nio.channels.DatagramChannel; | import java.nio.channels.*; | [
"java.nio"
] | java.nio; | 580,339 |
private int onStartEscapeSequence(String sql, StringBuffer sb,
int i) throws SQLException {
sb.setCharAt(i++, ' ');
i = StringUtil.skipSpaces(sql, i);
if (sql.regionMatches(true, i, "fn ", 0, 3)
|| sql.regionMatches(true, i, "oj ", 0, ... | int function(String sql, StringBuffer sb, int i) throws SQLException { sb.setCharAt(i++, ' '); i = StringUtil.skipSpaces(sql, i); if (sql.regionMatches(true, i, STR, 0, 3) sql.regionMatches(true, i, STR, 0, 3) sql.regionMatches(true, i, STR, 0, 3)) { sb.setCharAt(i++, ' '); sb.setCharAt(i++, ' '); } else if (sql.region... | /**
* is called from within nativeSQL when the start of an JDBC escape sequence is encountered
*/ | is called from within nativeSQL when the start of an JDBC escape sequence is encountered | onStartEscapeSequence | {
"repo_name": "ifcharming/original2.0",
"path": "src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCConnection.java",
"license": "gpl-3.0",
"size": 139611
} | [
"java.sql.SQLException",
"org.hsqldb_voltpatches.Error",
"org.hsqldb_voltpatches.ErrorCode",
"org.hsqldb_voltpatches.lib.StringUtil"
] | import java.sql.SQLException; import org.hsqldb_voltpatches.Error; import org.hsqldb_voltpatches.ErrorCode; import org.hsqldb_voltpatches.lib.StringUtil; | import java.sql.*; import org.hsqldb_voltpatches.*; import org.hsqldb_voltpatches.lib.*; | [
"java.sql",
"org.hsqldb_voltpatches",
"org.hsqldb_voltpatches.lib"
] | java.sql; org.hsqldb_voltpatches; org.hsqldb_voltpatches.lib; | 1,182,892 |
@Test
public void testT1RV6D5_T1LV6D1() {
test_id = getTestId("T1RV6D5", "T1LV6D1", "232");
String src = selectTRVD("T1RV6D5");
String dest = selectTLVD("T1LV6D1");
String result = ".";
try {
result = TRVD_TLVD_Action(src, dest);
} catch (RecognitionException e) {
e.printStackTrace()... | void function() { test_id = getTestId(STR, STR, "232"); String src = selectTRVD(STR); String dest = selectTLVD(STR); String result = "."; try { result = TRVD_TLVD_Action(src, dest); } catch (RecognitionException e) { e.printStackTrace(); } catch (TokenStreamException e) { e.printStackTrace(); } assertTrue(ParamFailure2... | /**
* Perform the test for the given matrix column (T1RV6D5) and row (T1LV6D1).
*
*/ | Perform the test for the given matrix column (T1RV6D5) and row (T1LV6D1) | testT1RV6D5_T1LV6D1 | {
"repo_name": "jason-rhodes/bridgepoint",
"path": "src/org.xtuml.bp.als.oal.test/src/org/xtuml/bp/als/oal/test/SingleDimensionFixedArrayAssigmentTest_12_Generics.java",
"license": "apache-2.0",
"size": 155634
} | [
"org.xtuml.bp.ui.graphics.editor.GraphicalEditor"
] | import org.xtuml.bp.ui.graphics.editor.GraphicalEditor; | import org.xtuml.bp.ui.graphics.editor.*; | [
"org.xtuml.bp"
] | org.xtuml.bp; | 1,489,509 |
@Test
public void testBasicDrillOperation6( ) throws Exception
{
ICubeQueryDefinition cqd = new CubeQueryDefinition( cubeName );
IEdgeDefinition rowEdge = cqd.createEdge( ICubeQueryDefinition.ROW_EDGE );
IDimensionDefinition dim1 = rowEdge.createDimension( "dimension1" );
IHierarchyDefinition hier1 = di... | void function( ) throws Exception { ICubeQueryDefinition cqd = new CubeQueryDefinition( cubeName ); IEdgeDefinition rowEdge = cqd.createEdge( ICubeQueryDefinition.ROW_EDGE ); IDimensionDefinition dim1 = rowEdge.createDimension( STR ); IHierarchyDefinition hier1 = dim1.createHierarchy( STR ); hier1.createLevel( STR ); h... | /**
* Drill on the first, second and the sub total.
* @throws Exception
*/ | Drill on the first, second and the sub total | testBasicDrillOperation6 | {
"repo_name": "rrimmana/birt-1",
"path": "data/org.eclipse.birt.data.tests/test/org/eclipse/birt/data/engine/olap/api/CubeDrillFeatureTest.java",
"license": "epl-1.0",
"size": 47379
} | [
"java.util.ArrayList",
"java.util.List",
"javax.olap.cursor.CubeCursor",
"org.eclipse.birt.data.aggregation.api.IBuildInAggregation",
"org.eclipse.birt.data.engine.api.DataEngine",
"org.eclipse.birt.data.engine.api.IBinding",
"org.eclipse.birt.data.engine.api.querydefn.Binding",
"org.eclipse.birt.data... | import java.util.ArrayList; import java.util.List; import javax.olap.cursor.CubeCursor; import org.eclipse.birt.data.aggregation.api.IBuildInAggregation; import org.eclipse.birt.data.engine.api.DataEngine; import org.eclipse.birt.data.engine.api.IBinding; import org.eclipse.birt.data.engine.api.querydefn.Binding; impor... | import java.util.*; import javax.olap.cursor.*; import org.eclipse.birt.data.aggregation.api.*; import org.eclipse.birt.data.engine.api.*; import org.eclipse.birt.data.engine.api.querydefn.*; import org.eclipse.birt.data.engine.impl.*; import org.eclipse.birt.data.engine.olap.api.query.*; import org.eclipse.birt.data.e... | [
"java.util",
"javax.olap",
"org.eclipse.birt"
] | java.util; javax.olap; org.eclipse.birt; | 712,059 |
public Rectangle2D getVisualBounds() {
return getVisualBounds(0f, 0f);
} | Rectangle2D function() { return getVisualBounds(0f, 0f); } | /**
* A convenience method that returns the visual bounds when rendered at 0, 0.
*/ | A convenience method that returns the visual bounds when rendered at 0, 0 | getVisualBounds | {
"repo_name": "TheTypoMaster/Scaper",
"path": "openjdk/jdk/src/share/classes/sun/font/TextLabel.java",
"license": "gpl-2.0",
"size": 4010
} | [
"java.awt.geom.Rectangle2D"
] | import java.awt.geom.Rectangle2D; | import java.awt.geom.*; | [
"java.awt"
] | java.awt; | 2,661,849 |
private static void extractGeneratedClasses(Path classJar, Manifest manifest, Path tempDir)
throws IOException {
ImmutableSet<String> generatedFilePrefixes =
getPrefixes(manifest, unit -> unit.getGeneratedByAnnotationProcessor());
ImmutableSet<String> userWrittenFilePrefixes =
getPrefixe... | static void function(Path classJar, Manifest manifest, Path tempDir) throws IOException { ImmutableSet<String> generatedFilePrefixes = getPrefixes(manifest, unit -> unit.getGeneratedByAnnotationProcessor()); ImmutableSet<String> userWrittenFilePrefixes = getPrefixes(manifest, unit -> !unit.getGeneratedByAnnotationProce... | /**
* Unzip all the class files that correspond to annotation processor- generated sources into the
* temporary directory.
*/ | Unzip all the class files that correspond to annotation processor- generated sources into the temporary directory | extractGeneratedClasses | {
"repo_name": "twitter-forks/bazel",
"path": "src/java_tools/buildjar/java/com/google/devtools/build/buildjar/genclass/GenClass.java",
"license": "apache-2.0",
"size": 6683
} | [
"com.google.common.collect.ImmutableSet",
"com.google.devtools.build.buildjar.proto.JavaCompilation",
"java.io.IOException",
"java.nio.file.Files",
"java.nio.file.Path",
"java.util.Enumeration",
"java.util.jar.JarEntry",
"java.util.jar.JarFile"
] | import com.google.common.collect.ImmutableSet; import com.google.devtools.build.buildjar.proto.JavaCompilation; import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.util.Enumeration; import java.util.jar.JarEntry; import java.util.jar.JarFile; | import com.google.common.collect.*; import com.google.devtools.build.buildjar.proto.*; import java.io.*; import java.nio.file.*; import java.util.*; import java.util.jar.*; | [
"com.google.common",
"com.google.devtools",
"java.io",
"java.nio",
"java.util"
] | com.google.common; com.google.devtools; java.io; java.nio; java.util; | 2,089,746 |
public void writeMessage(Message message) throws IOException; | void function(Message message) throws IOException; | /**
* Writes the given message out over the network using the protocol tag. For a Transaction
* this should be "tx" for example. It's safe to call this from multiple threads simultaneously,
* the actual writing will be serialized.
*
* @throws IOException
*/ | Writes the given message out over the network using the protocol tag. For a Transaction this should be "tx" for example. It's safe to call this from multiple threads simultaneously, the actual writing will be serialized | writeMessage | {
"repo_name": "hank/litecoinj-new",
"path": "core/src/main/java/com/google/litecoin/core/NetworkConnection.java",
"license": "apache-2.0",
"size": 2706
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,332,520 |
public void parse(InputStream is, DefaultHandler dh, String systemId) throws SAXException, IOException
{
XMLReader reader = getXMLReader();
InputSource source = new InputSource(is);
source.setSystemId(systemId);
reader.setContentHandler(dh);
reader.parse(source);
... | void function(InputStream is, DefaultHandler dh, String systemId) throws SAXException, IOException { XMLReader reader = getXMLReader(); InputSource source = new InputSource(is); source.setSystemId(systemId); reader.setContentHandler(dh); reader.parse(source); } | /**
* parses and validates the given InputSream using the given DefaultHandler and systemId
*/ | parses and validates the given InputSream using the given DefaultHandler and systemId | parse | {
"repo_name": "league/rngzip",
"path": "libs/iso-relax/org/iso_relax/jaxp/ValidatingSAXParser.java",
"license": "gpl-2.0",
"size": 5011
} | [
"java.io.IOException",
"java.io.InputStream",
"org.xml.sax.InputSource",
"org.xml.sax.SAXException",
"org.xml.sax.XMLReader",
"org.xml.sax.helpers.DefaultHandler"
] | import java.io.IOException; import java.io.InputStream; import org.xml.sax.InputSource; import org.xml.sax.SAXException; import org.xml.sax.XMLReader; import org.xml.sax.helpers.DefaultHandler; | import java.io.*; import org.xml.sax.*; import org.xml.sax.helpers.*; | [
"java.io",
"org.xml.sax"
] | java.io; org.xml.sax; | 581,666 |
Number getShutdownValue(Pin pin); | Number getShutdownValue(Pin pin); | /**
* Get the shutdown/terminate value that the DAC should apply to the given GPIO pin
* when the class is destroyed/terminated.
*
* @param pin analog output pin
* @return return the shutdown value if one has been defined, else NULL.
*/ | Get the shutdown/terminate value that the DAC should apply to the given GPIO pin when the class is destroyed/terminated | getShutdownValue | {
"repo_name": "ARIG-Robotique/robots",
"path": "robot-system-lib-parent/robot-system-lib-raspi/src/main/java/com/pi4j/gpio/extension/base/DacGpioProvider.java",
"license": "gpl-3.0",
"size": 4481
} | [
"com.pi4j.io.gpio.Pin"
] | import com.pi4j.io.gpio.Pin; | import com.pi4j.io.gpio.*; | [
"com.pi4j.io"
] | com.pi4j.io; | 601,198 |
public interface EntryProvider
{
public Iterator getIterator();
| interface EntryProvider { public Iterator function(); | /**
* Gets an iterator for the channels, calendars, etc.
*/ | Gets an iterator for the channels, calendars, etc | getIterator | {
"repo_name": "OpenCollabZA/sakai",
"path": "site/mergedlist-util/util/src/java/org/sakaiproject/util/MergedList.java",
"license": "apache-2.0",
"size": 16947
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 2,459,317 |
private synchronized static void getDatabaseCredentials() {
try {
// Setup the input stream.
InputStream dbSetup = LineSideModule.class.getResourceAsStream("dbAccess.txt");
BufferedReader reader = new BufferedReader (new InputStreamReader(dbSetup));
... | synchronized static void function() { try { InputStream dbSetup = LineSideModule.class.getResourceAsStream(STR); BufferedReader reader = new BufferedReader (new InputStreamReader(dbSetup)); String line; int linesRead = 0; while ((line = reader.readLine())!= null) { if (linesRead >= 5) { break; } else { DB_CONNECTION_CR... | /**
* This Method reads the DataBase connection details and credentials from dbAccess.txt
*/ | This Method reads the DataBase connection details and credentials from dbAccess.txt | getDatabaseCredentials | {
"repo_name": "JonathanMoss/LinesideModule",
"path": "src/com/jgm/lineside/database/MySqlConnect.java",
"license": "gpl-3.0",
"size": 4963
} | [
"com.jgm.lineside.LineSideModule",
"java.io.BufferedReader",
"java.io.IOException",
"java.io.InputStream",
"java.io.InputStreamReader"
] | import com.jgm.lineside.LineSideModule; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; | import com.jgm.lineside.*; import java.io.*; | [
"com.jgm.lineside",
"java.io"
] | com.jgm.lineside; java.io; | 2,595,978 |
public static final ExtendedPlayerP get(EntityPlayer player)
{
return (ExtendedPlayerP)player.getExtendedProperties(EXT_PROP_NAME);
}
| static final ExtendedPlayerP function(EntityPlayer player) { return (ExtendedPlayerP)player.getExtendedProperties(EXT_PROP_NAME); } | /**
* Get the extended properties for the player.
* @param player
* @return
*/ | Get the extended properties for the player | get | {
"repo_name": "mrubinsk/RoadieMod",
"path": "java/com/theupstairsroom/roadiemod/ExtendedPlayerP.java",
"license": "gpl-3.0",
"size": 3691
} | [
"net.minecraft.entity.player.EntityPlayer"
] | import net.minecraft.entity.player.EntityPlayer; | import net.minecraft.entity.player.*; | [
"net.minecraft.entity"
] | net.minecraft.entity; | 2,345,043 |
public synchronized void signOn() {
// ^^^^^^^^^^^^ Added synchronized to be symmetric with sign off and to
// fix a possible dead-lock see also OLAT-3390
log.debug("signOn() START");
if (isAuthenticated())
throw new AssertException("sign on: already signed on!");
... | synchronized void function() { log.debug(STR); if (isAuthenticated()) throw new AssertException(STR); Identity identity = identityEnvironment.getIdentity(); if (identity == null) throw new AssertException(STR); if (sessionInfo == null) throw new AssertException(STR + identity); authenticated = true; if (sessionInfo.isW... | /**
* prior to calling this method, all instance vars must be set.
*/ | prior to calling this method, all instance vars must be set | signOn | {
"repo_name": "huihoo/olat",
"path": "olat7.8/src/main/java/org/olat/presentation/commons/session/UserSession.java",
"license": "apache-2.0",
"size": 30163
} | [
"org.olat.data.basesecurity.Identity",
"org.olat.lms.preferences.PreferencesService",
"org.olat.system.coordinate.CoordinatorManager",
"org.olat.system.event.SignOnOffEvent",
"org.olat.system.event.SignOnOffEventResourceable",
"org.olat.system.exception.AssertException",
"org.olat.system.spring.CoreSpri... | import org.olat.data.basesecurity.Identity; import org.olat.lms.preferences.PreferencesService; import org.olat.system.coordinate.CoordinatorManager; import org.olat.system.event.SignOnOffEvent; import org.olat.system.event.SignOnOffEventResourceable; import org.olat.system.exception.AssertException; import org.olat.sy... | import org.olat.data.basesecurity.*; import org.olat.lms.preferences.*; import org.olat.system.coordinate.*; import org.olat.system.event.*; import org.olat.system.exception.*; import org.olat.system.spring.*; | [
"org.olat.data",
"org.olat.lms",
"org.olat.system"
] | org.olat.data; org.olat.lms; org.olat.system; | 1,912,737 |
public final <U2> Tuple9<T1, U2, T3, T4, T5, T6, T7, T8, T9> map2(Function<? super T2, ? extends U2> function) {
return Tuple.tuple(v1, function.apply(v2), v3, v4, v5, v6, v7, v8, v9);
} | final <U2> Tuple9<T1, U2, T3, T4, T5, T6, T7, T8, T9> function(Function<? super T2, ? extends U2> function) { return Tuple.tuple(v1, function.apply(v2), v3, v4, v5, v6, v7, v8, v9); } | /**
* Apply attribute 2 as argument to a function and return a new tuple with the substituted argument.
*/ | Apply attribute 2 as argument to a function and return a new tuple with the substituted argument | map2 | {
"repo_name": "jOOQ/jOOL",
"path": "jOOL/src/main/java/org/jooq/lambda/tuple/Tuple9.java",
"license": "apache-2.0",
"size": 19161
} | [
"java.util.function.Function"
] | import java.util.function.Function; | import java.util.function.*; | [
"java.util"
] | java.util; | 799,251 |
protected static Object convertTo(Schema toSchema, Schema fromSchema, Object value) throws DataException {
if (value == null) {
if (toSchema.isOptional()) {
return null;
}
throw new DataException("Unable to convert a null value to a schema that requires a ... | static Object function(Schema toSchema, Schema fromSchema, Object value) throws DataException { if (value == null) { if (toSchema.isOptional()) { return null; } throw new DataException(STR); } switch (toSchema.type()) { case BYTES: if (Decimal.LOGICAL_NAME.equals(toSchema.name())) { if (value instanceof ByteBuffer) { v... | /**
* Convert the value to the desired type.
*
* @param toSchema the schema for the desired type; may not be null
* @param fromSchema the schema for the supplied value; may be null if not known
* @return the converted value; never null
* @throws DataException if the value could not be co... | Convert the value to the desired type | convertTo | {
"repo_name": "richhaase/kafka",
"path": "connect/api/src/main/java/org/apache/kafka/connect/data/Values.java",
"license": "apache-2.0",
"size": 50599
} | [
"java.math.BigDecimal",
"java.nio.ByteBuffer",
"java.util.Calendar",
"java.util.List",
"java.util.Map",
"org.apache.kafka.common.utils.Utils",
"org.apache.kafka.connect.errors.DataException"
] | import java.math.BigDecimal; import java.nio.ByteBuffer; import java.util.Calendar; import java.util.List; import java.util.Map; import org.apache.kafka.common.utils.Utils; import org.apache.kafka.connect.errors.DataException; | import java.math.*; import java.nio.*; import java.util.*; import org.apache.kafka.common.utils.*; import org.apache.kafka.connect.errors.*; | [
"java.math",
"java.nio",
"java.util",
"org.apache.kafka"
] | java.math; java.nio; java.util; org.apache.kafka; | 176,794 |
EAttribute getExtendedQueryExpressionBody_OptimizeRecordsNumber(); | EAttribute getExtendedQueryExpressionBody_OptimizeRecordsNumber(); | /**
* Returns the meta object for the attribute '{@link org.asup.db.syntax.dml.QExtendedQueryExpressionBody#getOptimizeRecordsNumber <em>Optimize Records Number</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Optimize Records Number</em>'.
* @see org.... | Returns the meta object for the attribute '<code>org.asup.db.syntax.dml.QExtendedQueryExpressionBody#getOptimizeRecordsNumber Optimize Records Number</code>'. | getExtendedQueryExpressionBody_OptimizeRecordsNumber | {
"repo_name": "asupdev/asup",
"path": "org.asup.db.syntax/src/org/asup/db/syntax/dml/QDatabaseDMLPackage.java",
"license": "epl-1.0",
"size": 23501
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,039,287 |
public static CouponIborSpreadDefinition from(final CouponIborDefinition couponIbor, final double spread) {
Validate.notNull(couponIbor, "Ibor coupon");
return new CouponIborSpreadDefinition(couponIbor.getCurrency(), couponIbor.getPaymentDate(), couponIbor.getAccrualStartDate(), couponIbor.getAccrualEndDate()... | static CouponIborSpreadDefinition function(final CouponIborDefinition couponIbor, final double spread) { Validate.notNull(couponIbor, STR); return new CouponIborSpreadDefinition(couponIbor.getCurrency(), couponIbor.getPaymentDate(), couponIbor.getAccrualStartDate(), couponIbor.getAccrualEndDate(), couponIbor.getPayment... | /**
* Builder from an Ibor coupon and the spread.
* @param couponIbor An Ibor coupon.
* @param spread The spread.
* @return The Ibor coupon with spread.
*/ | Builder from an Ibor coupon and the spread | from | {
"repo_name": "charles-cooper/idylfin",
"path": "src/com/opengamma/analytics/financial/instrument/payment/CouponIborSpreadDefinition.java",
"license": "apache-2.0",
"size": 12817
} | [
"org.apache.commons.lang.Validate"
] | import org.apache.commons.lang.Validate; | import org.apache.commons.lang.*; | [
"org.apache.commons"
] | org.apache.commons; | 2,798,531 |
public void status(final StatusType status, final MAP map, final ArjunaContext arjunaContext) ; | void function(final StatusType status, final MAP map, final ArjunaContext arjunaContext) ; | /**
* Handle the status event.
* @param status The status type.
* @param map The addressing context.
* @param arjunaContext The arjuna context.
*/ | Handle the status event | status | {
"repo_name": "nmcl/scratch",
"path": "graalvm/transactions/fork/narayana/XTS/WS-T/dev/src/com/arjuna/webservices11/wsba/CoordinatorCompletionParticipantInboundEvents.java",
"license": "apache-2.0",
"size": 4351
} | [
"com.arjuna.webservices11.wsarj.ArjunaContext",
"org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType"
] | import com.arjuna.webservices11.wsarj.ArjunaContext; import org.oasis_open.docs.ws_tx.wsba._2006._06.StatusType; | import com.arjuna.webservices11.wsarj.*; import org.oasis_open.docs.ws_tx.wsba.*; | [
"com.arjuna.webservices11",
"org.oasis_open.docs"
] | com.arjuna.webservices11; org.oasis_open.docs; | 1,480,878 |
public static void handleBadRequest(String msg, Log log) throws BadRequestException {
BadRequestException badRequestException = buildBadRequestException(msg);
log.error(msg);
throw badRequestException;
} | static void function(String msg, Log log) throws BadRequestException { BadRequestException badRequestException = buildBadRequestException(msg); log.error(msg); throw badRequestException; } | /**
* Logs the error, builds a BadRequestException with specified details and throws it
*
* @param msg error message
* @param log Log instance
* @throws BadRequestException
*/ | Logs the error, builds a BadRequestException with specified details and throws it | handleBadRequest | {
"repo_name": "pradeepmurugesan/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.rest.api.util/src/main/java/org/wso2/carbon/apimgt/rest/api/util/utils/RestApiUtil.java",
"license": "apache-2.0",
"size": 49979
} | [
"org.apache.commons.logging.Log",
"org.wso2.carbon.apimgt.rest.api.util.exception.BadRequestException"
] | import org.apache.commons.logging.Log; import org.wso2.carbon.apimgt.rest.api.util.exception.BadRequestException; | import org.apache.commons.logging.*; import org.wso2.carbon.apimgt.rest.api.util.exception.*; | [
"org.apache.commons",
"org.wso2.carbon"
] | org.apache.commons; org.wso2.carbon; | 2,830,527 |
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
switch (notification.getFeatureID(TimeClockPropertyType.class)) {
case GmlPackage.TIME_CLOCK_PROPERTY_TYPE__ACTUATE:
case GmlPackage.TIME_CLOCK_PROPERTY_TYPE__ARCROLE:
case GmlPackage.TIME_CLOCK_PROPERTY_TYP... | void function(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(TimeClockPropertyType.class)) { case GmlPackage.TIME_CLOCK_PROPERTY_TYPE__ACTUATE: case GmlPackage.TIME_CLOCK_PROPERTY_TYPE__ARCROLE: case GmlPackage.TIME_CLOCK_PROPERTY_TYPE__HREF: case GmlPackage.TIME_CLOCK_PROP... | /**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This handles model notifications by calling <code>#updateChildren</code> to update any cached children and by creating a viewer notification, which it passes to <code>#fireNotifyChanged</code>. | notifyChanged | {
"repo_name": "markus1978/citygml4emf",
"path": "de.hub.citygml.emf.ecore.edit/src/net/opengis/gml/provider/TimeClockPropertyTypeItemProvider.java",
"license": "apache-2.0",
"size": 12126
} | [
"net.opengis.gml.GmlPackage",
"net.opengis.gml.TimeClockPropertyType",
"org.eclipse.emf.common.notify.Notification",
"org.eclipse.emf.edit.provider.ViewerNotification"
] | import net.opengis.gml.GmlPackage; import net.opengis.gml.TimeClockPropertyType; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.edit.provider.ViewerNotification; | import net.opengis.gml.*; import org.eclipse.emf.common.notify.*; import org.eclipse.emf.edit.provider.*; | [
"net.opengis.gml",
"org.eclipse.emf"
] | net.opengis.gml; org.eclipse.emf; | 419,663 |
public static final class Solenoids {
public static Solenoid doubleSolenoid(int extendChannel, int retractChannel, Solenoid.Direction initialDirection) {
DoubleSolenoid solenoid = new DoubleSolenoid(extendChannel, retractChannel);
return new HardwareDoubleSolenoid(solenoid, ... | static final class Solenoids { public static Solenoid function(int extendChannel, int retractChannel, Solenoid.Direction initialDirection) { DoubleSolenoid solenoid = new DoubleSolenoid(extendChannel, retractChannel); return new HardwareDoubleSolenoid(solenoid, initialDirection); } | /**
* Create a double-acting solenoid that uses the specified channels on the default module.
*
* @param extendChannel the channel that extends the solenoid
* @param retractChannel the channel that retracts the solenoid
* @param initialDirection the initial direction for the... | Create a double-acting solenoid that uses the specified channels on the default module | doubleSolenoid | {
"repo_name": "WawerOS/strongback-java",
"path": "strongback/src/org/strongback/hardware/Hardware.java",
"license": "mit",
"size": 49556
} | [
"edu.wpi.first.wpilibj.DoubleSolenoid",
"org.strongback.components.Solenoid"
] | import edu.wpi.first.wpilibj.DoubleSolenoid; import org.strongback.components.Solenoid; | import edu.wpi.first.wpilibj.*; import org.strongback.components.*; | [
"edu.wpi.first",
"org.strongback.components"
] | edu.wpi.first; org.strongback.components; | 1,537,574 |
public Value []getGlobalList()
{
return _globalValues;
} | public Value []getGlobalList() { return _globalValues; } | /**
* Returns the global values
*/ | Returns the global values | getGlobalList | {
"repo_name": "christianchristensen/resin",
"path": "modules/quercus/src/com/caucho/quercus/env/SaveState.java",
"license": "gpl-2.0",
"size": 5283
} | [
"com.caucho.quercus.env.Value"
] | import com.caucho.quercus.env.Value; | import com.caucho.quercus.env.*; | [
"com.caucho.quercus"
] | com.caucho.quercus; | 675,412 |
private File getSampleProjectCodenameOneSettingsFile(SamplesContext context) {
return new File(getBuildProjectDir(context), "codenameone_settings.properties");
} | File function(SamplesContext context) { return new File(getBuildProjectDir(context), STR); } | /**
* Gets the codenameone_settings.properties file from the sample project.
* @param context
* @return
*/ | Gets the codenameone_settings.properties file from the sample project | getSampleProjectCodenameOneSettingsFile | {
"repo_name": "saeder/CodenameOne",
"path": "Samples/src/com/codename1/samples/Sample.java",
"license": "gpl-2.0",
"size": 26694
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,508,995 |
private void insertGeneratedDeclarationCodeToGlobalScope(
Node enclosingNode, Node declarationCode) {
switch (enclosingNode.getToken()) {
case MODULE_BODY:
{
Node insertionPoint = getNodeForInsertion(enclosingNode.getParent());
insertionPoint.addChildToFront(declarationCode... | void function( Node enclosingNode, Node declarationCode) { switch (enclosingNode.getToken()) { case MODULE_BODY: { Node insertionPoint = getNodeForInsertion(enclosingNode.getParent()); insertionPoint.addChildToFront(declarationCode); compiler.reportChangeToChangeScope(NodeUtil.getEnclosingScript(insertionPoint)); } bre... | /**
* This function accepts declaration code generated for a nonGlobal Polymer call and inserts that
* into the AST depending on the enclosing scope of the Polymer call.
*
* @param enclosingNode The enclosing scope of the Polymer call decided by the rewritePolymerCall
* @param declarationCode declaration... | This function accepts declaration code generated for a nonGlobal Polymer call and inserts that into the AST depending on the enclosing scope of the Polymer call | insertGeneratedDeclarationCodeToGlobalScope | {
"repo_name": "vobruba-martin/closure-compiler",
"path": "src/com/google/javascript/jscomp/PolymerClassRewriter.java",
"license": "apache-2.0",
"size": 63474
} | [
"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; | 384,204 |
public long orElseThrow() {
if (!isPresent) {
throw new NoSuchElementException("No value present");
}
return value;
} | long function() { if (!isPresent) { throw new NoSuchElementException(STR); } return value; } | /**
* Returns inner value if present, otherwise throws {@code NoSuchElementException}.
*
* @return inner value if present
* @throws NoSuchElementException if inner value is not present
* @since 1.2.0
*/ | Returns inner value if present, otherwise throws NoSuchElementException | orElseThrow | {
"repo_name": "aNNiMON/Lightweight-Stream-API",
"path": "stream/src/main/java/com/annimon/stream/OptionalLong.java",
"license": "apache-2.0",
"size": 11637
} | [
"java.util.NoSuchElementException"
] | import java.util.NoSuchElementException; | import java.util.*; | [
"java.util"
] | java.util; | 2,072,226 |
public void setType(TypeVariable type) {
this.type = type;
} | void function(TypeVariable type) { this.type = type; } | /**
* Sets the TypeVariable this TypeParameter evaluates to
* @param type the TypeVariable this TypeParameter evaluates to
*/ | Sets the TypeVariable this TypeParameter evaluates to | setType | {
"repo_name": "mhems/jhelp",
"path": "src/com/binghamton/jhelp/ast/TypeParameter.java",
"license": "bsd-3-clause",
"size": 4676
} | [
"com.binghamton.jhelp.types.TypeVariable"
] | import com.binghamton.jhelp.types.TypeVariable; | import com.binghamton.jhelp.types.*; | [
"com.binghamton.jhelp"
] | com.binghamton.jhelp; | 1,085,390 |
public YieldAndDiscountCurve getCurve(final Currency ccy) {
return getMulticurveProvider().getCurve(ccy);
} | YieldAndDiscountCurve function(final Currency ccy) { return getMulticurveProvider().getCurve(ccy); } | /**
* Gets the discounting curve associated in a given currency in the market.
* @param ccy The currency.
* @return The curve.
*/ | Gets the discounting curve associated in a given currency in the market | getCurve | {
"repo_name": "jeorme/OG-Platform",
"path": "projects/OG-Analytics/src/main/java/com/opengamma/analytics/financial/provider/description/interestrate/BlackSwaptionFlatProviderDiscount.java",
"license": "apache-2.0",
"size": 6302
} | [
"com.opengamma.analytics.financial.model.interestrate.curve.YieldAndDiscountCurve",
"com.opengamma.util.money.Currency"
] | import com.opengamma.analytics.financial.model.interestrate.curve.YieldAndDiscountCurve; import com.opengamma.util.money.Currency; | import com.opengamma.analytics.financial.model.interestrate.curve.*; import com.opengamma.util.money.*; | [
"com.opengamma.analytics",
"com.opengamma.util"
] | com.opengamma.analytics; com.opengamma.util; | 2,322,378 |
protected Ignite startGrid(String igniteInstanceName, String springCfgPath) throws Exception {
return startGrid(igniteInstanceName, loadConfiguration(springCfgPath));
} | Ignite function(String igniteInstanceName, String springCfgPath) throws Exception { return startGrid(igniteInstanceName, loadConfiguration(springCfgPath)); } | /**
* Starts grid using provided Ignite instance name and spring config location.
* <p>
* Note that grids started this way should be stopped with {@code G.stop(..)} methods.
*
* @param igniteInstanceName Ignite instance name.
* @param springCfgPath Path to config file.
* @return Grid ... | Starts grid using provided Ignite instance name and spring config location. Note that grids started this way should be stopped with G.stop(..) methods | startGrid | {
"repo_name": "WilliamDo/ignite",
"path": "modules/core/src/test/java/org/apache/ignite/testframework/junits/GridAbstractTest.java",
"license": "apache-2.0",
"size": 76816
} | [
"org.apache.ignite.Ignite"
] | import org.apache.ignite.Ignite; | import org.apache.ignite.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 632,536 |
SqlNodeList expandStar(
SqlNodeList selectList,
SqlSelect query,
boolean includeSystemVars); | SqlNodeList expandStar( SqlNodeList selectList, SqlSelect query, boolean includeSystemVars); | /**
* Returns a list of expressions, with every occurrence of "*" or
* "TABLE.*" expanded.
*
* @param selectList Select clause to be expanded
* @param query Query
* @param includeSystemVars Whether to include system variables
* @return expanded select clause
*/ | Returns a list of expressions, with every occurrence of "*" or "TABLE.*" expanded | expandStar | {
"repo_name": "glimpseio/incubator-calcite",
"path": "core/src/main/java/org/apache/calcite/sql/validate/SqlValidator.java",
"license": "apache-2.0",
"size": 24006
} | [
"org.apache.calcite.sql.SqlNodeList",
"org.apache.calcite.sql.SqlSelect"
] | import org.apache.calcite.sql.SqlNodeList; import org.apache.calcite.sql.SqlSelect; | import org.apache.calcite.sql.*; | [
"org.apache.calcite"
] | org.apache.calcite; | 237,926 |
public List<BigInteger> calculate(List<BigInteger> list, int begin, int length) {
List<BigInteger> result = new ArrayList<BigInteger>();
for(int i = begin; i < begin + length; i++) {
result.add(list.get(i).add(BigInteger.ONE));
}
return result;
... | List<BigInteger> function(List<BigInteger> list, int begin, int length) { List<BigInteger> result = new ArrayList<BigInteger>(); for(int i = begin; i < begin + length; i++) { result.add(list.get(i).add(BigInteger.ONE)); } return result; } | /**
* Increments the values in the list between the indices.
* @param List<BigInteger> the list
* @return the result
*/ | Increments the values in the list between the indices | calculate | {
"repo_name": "jessemull/MicroFlex",
"path": "src/main/java/com/github/jessemull/microflex/bigintegerflex/math/IncrementBigInteger.java",
"license": "apache-2.0",
"size": 2487
} | [
"java.math.BigInteger",
"java.util.ArrayList",
"java.util.List"
] | import java.math.BigInteger; import java.util.ArrayList; import java.util.List; | import java.math.*; import java.util.*; | [
"java.math",
"java.util"
] | java.math; java.util; | 2,778,893 |
URL base;
try {
try {
base = new URL(refer);
} catch (MalformedURLException e) {
// the base is unsuitable, but the attribute may be abs on its own, so try that
URL abs = new URL(refer);
return abs.toExternalForm();
... | URL base; try { try { base = new URL(refer); } catch (MalformedURLException e) { URL abs = new URL(refer); return abs.toExternalForm(); } if (url.startsWith("?")) url = base.getPath() + url; URL abs = new URL(base, url); return encodeIllegalCharacterInUrl(abs.toExternalForm()); } catch (MalformedURLException e) { retur... | /**
* canonicalizeUrl
* <br>
* Borrowed from Jsoup.
*
* @param url url
* @param refer refer
* @return canonicalizeUrl
*/ | canonicalizeUrl Borrowed from Jsoup | canonicalizeUrl | {
"repo_name": "zhuyuesut/webmagic",
"path": "webmagic-core/src/main/java/us/codecraft/webmagic/utils/UrlUtils.java",
"license": "apache-2.0",
"size": 3611
} | [
"java.net.MalformedURLException"
] | import java.net.MalformedURLException; | import java.net.*; | [
"java.net"
] | java.net; | 325,294 |
public List<DiscoveryNode> filteredNodes() {
return nodesService.filteredNodes();
} | List<DiscoveryNode> function() { return nodesService.filteredNodes(); } | /**
* The list of filtered nodes that were not connected to, for example, due to
* mismatch in cluster name.
*/ | The list of filtered nodes that were not connected to, for example, due to mismatch in cluster name | filteredNodes | {
"repo_name": "nezirus/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/client/transport/TransportClient.java",
"license": "apache-2.0",
"size": 18756
} | [
"java.util.List",
"org.elasticsearch.cluster.node.DiscoveryNode"
] | import java.util.List; import org.elasticsearch.cluster.node.DiscoveryNode; | import java.util.*; import org.elasticsearch.cluster.node.*; | [
"java.util",
"org.elasticsearch.cluster"
] | java.util; org.elasticsearch.cluster; | 798,660 |
private Attribute[] getOnDemandQueryOutputAttributes(OnDemandQuery onDemandQuery, String onDemandQueryString) {
try {
OnDemandQueryRuntime onDemandQueryRuntime = onDemandQueryRuntimeMap.get(onDemandQuery);
if (onDemandQueryRuntime == null) {
onDemandQueryRuntime = OnD... | Attribute[] function(OnDemandQuery onDemandQuery, String onDemandQueryString) { try { OnDemandQueryRuntime onDemandQueryRuntime = onDemandQueryRuntimeMap.get(onDemandQuery); if (onDemandQueryRuntime == null) { onDemandQueryRuntime = OnDemandQueryParser.parse(onDemandQuery, onDemandQueryString, siddhiAppContext, tableMa... | /**
* This method get the onDemandQuery and return the corresponding output and its types.
*
* @param onDemandQuery this onDemandQuery is processed and get the output attributes.
* @param onDemandQueryString this passed to report errors with context if there are any.
* @return List of out... | This method get the onDemandQuery and return the corresponding output and its types | getOnDemandQueryOutputAttributes | {
"repo_name": "suhothayan/siddhi",
"path": "modules/siddhi-core/src/main/java/io/siddhi/core/SiddhiAppRuntimeImpl.java",
"license": "apache-2.0",
"size": 41827
} | [
"io.siddhi.core.exception.OnDemandQueryCreationException",
"io.siddhi.core.query.OnDemandQueryRuntime",
"io.siddhi.core.util.parser.OnDemandQueryParser",
"io.siddhi.query.api.definition.Attribute",
"io.siddhi.query.api.exception.SiddhiAppContextException",
"io.siddhi.query.api.execution.query.OnDemandQuer... | import io.siddhi.core.exception.OnDemandQueryCreationException; import io.siddhi.core.query.OnDemandQueryRuntime; import io.siddhi.core.util.parser.OnDemandQueryParser; import io.siddhi.query.api.definition.Attribute; import io.siddhi.query.api.exception.SiddhiAppContextException; import io.siddhi.query.api.execution.q... | import io.siddhi.core.exception.*; import io.siddhi.core.query.*; import io.siddhi.core.util.parser.*; import io.siddhi.query.api.definition.*; import io.siddhi.query.api.exception.*; import io.siddhi.query.api.execution.query.*; | [
"io.siddhi.core",
"io.siddhi.query"
] | io.siddhi.core; io.siddhi.query; | 2,424,088 |
@GetMapping(value = "/getMemStats")
@ResponseBody
public Map<String, Object> getMemoryStats(final HttpServletRequest request,
final HttpServletResponse response) {
ensureEndpointAccessIsAuthorized(request, response);
final Map<String, Object> mo... | @GetMapping(value = STR) Map<String, Object> function(final HttpServletRequest request, final HttpServletResponse response) { ensureEndpointAccessIsAuthorized(request, response); final Map<String, Object> model = new HashMap<>(); model.put(STR, convertToMegaBytes(Runtime.getRuntime().totalMemory())); model.put(STR, con... | /**
* Gets memory stats.
*
* @param request the http servlet request
* @param response the http servlet response
* @return the memory stats
*/ | Gets memory stats | getMemoryStats | {
"repo_name": "doodelicious/cas",
"path": "support/cas-server-support-reports/src/main/java/org/apereo/cas/web/report/StatisticsController.java",
"license": "apache-2.0",
"size": 14152
} | [
"java.util.HashMap",
"java.util.Map",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"org.springframework.web.bind.annotation.GetMapping"
] | import java.util.HashMap; import java.util.Map; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.web.bind.annotation.GetMapping; | import java.util.*; import javax.servlet.http.*; import org.springframework.web.bind.annotation.*; | [
"java.util",
"javax.servlet",
"org.springframework.web"
] | java.util; javax.servlet; org.springframework.web; | 2,350,261 |
protected void populateManager(IContributionManager manager, Collection<? extends IAction> actions, String contributionID) {
if (actions != null) {
for (IAction action : actions) {
if (contributionID != null) {
manager.insertBefore(contributionID, action);
}
else {
manager.add(action);
... | void function(IContributionManager manager, Collection<? extends IAction> actions, String contributionID) { if (actions != null) { for (IAction action : actions) { if (contributionID != null) { manager.insertBefore(contributionID, action); } else { manager.add(action); } } } } | /**
* This populates the specified <code>manager</code> with {@link org.eclipse.jface.action.ActionContributionItem}s
* based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection,
* by inserting them before the specified contribution item <code>contributionID</code>.
... | This populates the specified <code>manager</code> with <code>org.eclipse.jface.action.ActionContributionItem</code>s based on the <code>org.eclipse.jface.action.IAction</code>s contained in the <code>actions</code> collection, by inserting them before the specified contribution item <code>contributionID</code>. If <cod... | populateManager | {
"repo_name": "lfmendivelso10/AppModernization",
"path": "source/i2/VisualizacionMetricas3.editor/src/visualizacionMetricas3/visualizacion/presentation/VisualizacionActionBarContributor.java",
"license": "mit",
"size": 14235
} | [
"java.util.Collection",
"org.eclipse.jface.action.IAction",
"org.eclipse.jface.action.IContributionManager"
] | import java.util.Collection; import org.eclipse.jface.action.IAction; import org.eclipse.jface.action.IContributionManager; | import java.util.*; import org.eclipse.jface.action.*; | [
"java.util",
"org.eclipse.jface"
] | java.util; org.eclipse.jface; | 2,035,979 |
public static java.util.List extractSafeEnvironmentComponentList(ims.domain.ILightweightDomainFactory domainFactory, ims.spinalinjuries.vo.NurAssessmentSafeEnvironmentVoCollection voCollection)
{
return extractSafeEnvironmentComponentList(domainFactory, voCollection, null, new HashMap());
}
| static java.util.List function(ims.domain.ILightweightDomainFactory domainFactory, ims.spinalinjuries.vo.NurAssessmentSafeEnvironmentVoCollection voCollection) { return extractSafeEnvironmentComponentList(domainFactory, voCollection, null, new HashMap()); } | /**
* Create the ims.nursing.assessment.domain.objects.SafeEnvironmentComponent list from the value object collection.
* @param domainFactory - used to create existing (persistent) domain objects.
* @param voCollection - the collection of value objects
*/ | Create the ims.nursing.assessment.domain.objects.SafeEnvironmentComponent list from the value object collection | extractSafeEnvironmentComponentList | {
"repo_name": "FreudianNM/openMAXIMS",
"path": "Source Library/openmaxims_workspace/ValueObjects/src/ims/spinalinjuries/vo/domain/NurAssessmentSafeEnvironmentVoAssembler.java",
"license": "agpl-3.0",
"size": 27720
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 1,270,265 |
private Controller getController() throws JspException {
if (controllerType == null) {
return null;
}
try {
return ComponentDefinition.createController(
controllerName,
controllerType);
} catch (InstantiationException ex) {
... | Controller function() throws JspException { if (controllerType == null) { return null; } try { return ComponentDefinition.createController( controllerName, controllerType); } catch (InstantiationException ex) { throw new JspException(ex); } } | /**
* Get instantiated Controller.
* Return controller denoted by controllerType, or <code>null</code> if controllerType
* is null.
* @throws JspException If controller can't be created.
*/ | Get instantiated Controller. Return controller denoted by controllerType, or <code>null</code> if controllerType is null | getController | {
"repo_name": "shuliangtao/struts-1.3.10",
"path": "src/tiles/src/main/java/org/apache/struts/tiles/taglib/InsertTag.java",
"license": "apache-2.0",
"size": 32416
} | [
"javax.servlet.jsp.JspException",
"org.apache.struts.tiles.ComponentDefinition",
"org.apache.struts.tiles.Controller"
] | import javax.servlet.jsp.JspException; import org.apache.struts.tiles.ComponentDefinition; import org.apache.struts.tiles.Controller; | import javax.servlet.jsp.*; import org.apache.struts.tiles.*; | [
"javax.servlet",
"org.apache.struts"
] | javax.servlet; org.apache.struts; | 1,720,414 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.