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 static ConfigTO loadConfigTO(File localDir) throws ConfigException {
File appDir = new File(localDir, Config.DIR_APPLICATION);
File configFile = new File(appDir, Config.FILE_CONFIG);
if (!configFile.exists()) {
throw new ConfigException("Cannot find config file at "+configFile+". Try connectin... | static ConfigTO function(File localDir) throws ConfigException { File appDir = new File(localDir, Config.DIR_APPLICATION); File configFile = new File(appDir, Config.FILE_CONFIG); if (!configFile.exists()) { throw new ConfigException(STR+configFile+STR); } return ConfigTO.load(configFile); } | /**
* Loads the config transfer object from the local directory
* or throws an exception if the file does not exist.
*/ | Loads the config transfer object from the local directory or throws an exception if the file does not exist | loadConfigTO | {
"repo_name": "syncany/syncany-plugin-gui",
"path": "core/syncany-lib/src/main/java/org/syncany/config/ConfigHelper.java",
"license": "gpl-3.0",
"size": 7533
} | [
"java.io.File",
"org.syncany.config.to.ConfigTO"
] | import java.io.File; import org.syncany.config.to.ConfigTO; | import java.io.*; import org.syncany.config.to.*; | [
"java.io",
"org.syncany.config"
] | java.io; org.syncany.config; | 1,567,002 |
@Override
public synchronized CompoundCRS createCompoundCRS(final String code) throws FactoryException {
final CompoundCRS crs;
final String key = trimAuthority(code);
final Object cached = get(key);
if (cached instanceof CompoundCRS) {
crs = (CompoundCRS) cached;
... | synchronized CompoundCRS function(final String code) throws FactoryException { final CompoundCRS crs; final String key = trimAuthority(code); final Object cached = get(key); if (cached instanceof CompoundCRS) { crs = (CompoundCRS) cached; } else { crs = getBackingStore().createCompoundCRS(code); } put(key, crs); return... | /**
* Returns a 3D coordinate reference system from a code.
*
* @throws FactoryException if the object creation failed.
*/ | Returns a 3D coordinate reference system from a code | createCompoundCRS | {
"repo_name": "geotools/geotools",
"path": "modules/library/referencing/src/main/java/org/geotools/referencing/factory/BufferedAuthorityFactory.java",
"license": "lgpl-2.1",
"size": 44519
} | [
"org.opengis.referencing.FactoryException",
"org.opengis.referencing.crs.CompoundCRS"
] | import org.opengis.referencing.FactoryException; import org.opengis.referencing.crs.CompoundCRS; | import org.opengis.referencing.*; import org.opengis.referencing.crs.*; | [
"org.opengis.referencing"
] | org.opengis.referencing; | 2,407,018 |
public ForgeWorld getWorld(World world) {
checkNotNull(world);
return new ForgeWorld(world);
} | ForgeWorld function(World world) { checkNotNull(world); return new ForgeWorld(world); } | /**
* Get the WorldEdit proxy for the given world.
*
* @param world the world
* @return the WorldEdit world
*/ | Get the WorldEdit proxy for the given world | getWorld | {
"repo_name": "Charlweed/WorldEdit-Archive",
"path": "worldedit-forge/src/main/java/com/sk89q/worldedit/forge/ForgeWorldEdit.java",
"license": "gpl-3.0",
"size": 8522
} | [
"com.google.common.base.Preconditions",
"net.minecraft.world.World"
] | import com.google.common.base.Preconditions; import net.minecraft.world.World; | import com.google.common.base.*; import net.minecraft.world.*; | [
"com.google.common",
"net.minecraft.world"
] | com.google.common; net.minecraft.world; | 118,744 |
protected JCCatch catchClause() {
int pos = S.pos();
accept(CATCH);
accept(LPAREN);
JCModifiers mods = optFinal(Flags.PARAMETER);
List<JCExpression> catchTypes = catchTypes();
JCExpression paramType = catchTypes.size() > 1 ?
toP(F.at(catchTypes.head.ge... | JCCatch function() { int pos = S.pos(); accept(CATCH); accept(LPAREN); JCModifiers mods = optFinal(Flags.PARAMETER); List<JCExpression> catchTypes = catchTypes(); JCExpression paramType = catchTypes.size() > 1 ? toP(F.at(catchTypes.head.getStartPosition()).TypeUnion(catchTypes)) : catchTypes.head; JCVariableDecl formal... | /** CatchClause = CATCH "(" FormalParameter ")" Block
*/ | CatchClause = CATCH "(" FormalParameter ")" Block | catchClause | {
"repo_name": "sebastianoe/s4j",
"path": "src/share/classes/com/sun/tools/javac/parser/JavacParser.java",
"license": "gpl-2.0",
"size": 116611
} | [
"com.sun.tools.javac.code.Flags",
"com.sun.tools.javac.tree.JCTree",
"com.sun.tools.javac.util.List"
] | import com.sun.tools.javac.code.Flags; import com.sun.tools.javac.tree.JCTree; import com.sun.tools.javac.util.List; | import com.sun.tools.javac.code.*; import com.sun.tools.javac.tree.*; import com.sun.tools.javac.util.*; | [
"com.sun.tools"
] | com.sun.tools; | 1,892,000 |
public HeaderList headers(); | HeaderList function(); | /**
* Returns a {@link HeaderList} containing the {@link Header}s to send with the request. Requests that don't need to send any headers should return
* {@link EmptyHeaderList#INSTANCE}.
*
* @return A {@link HeaderList}, never <code>null</code>.
*/ | Returns a <code>HeaderList</code> containing the <code>Header</code>s to send with the request. Requests that don't need to send any headers should return <code>EmptyHeaderList#INSTANCE</code> | headers | {
"repo_name": "dmfs/http-client-interfaces",
"path": "src/org/dmfs/httpclientinterfaces/HttpRequest.java",
"license": "apache-2.0",
"size": 2799
} | [
"org.dmfs.httpclientinterfaces.headers.HeaderList"
] | import org.dmfs.httpclientinterfaces.headers.HeaderList; | import org.dmfs.httpclientinterfaces.headers.*; | [
"org.dmfs.httpclientinterfaces"
] | org.dmfs.httpclientinterfaces; | 530,743 |
private void cleanup(int imageType, Uri oldImage, Uri newImage, Bitmap bitmap) {
if (bitmap != null) {
bitmap.recycle();
}
// Clean up initial camera-written image file.
(new File(FileHelper.stripFileProtocol(oldImage.toString()))).delete();
checkForDuplicateIma... | void function(int imageType, Uri oldImage, Uri newImage, Bitmap bitmap) { if (bitmap != null) { bitmap.recycle(); } (new File(FileHelper.stripFileProtocol(oldImage.toString()))).delete(); checkForDuplicateImage(imageType); if (this.saveToPhotoAlbum && newImage != null) { this.scanForGallery(newImage); } System.gc(); } | /**
* Cleans up after picture taking. Checking for duplicates and that kind of stuff.
* @param newImage
*/ | Cleans up after picture taking. Checking for duplicates and that kind of stuff | cleanup | {
"repo_name": "Mobishift/cordova-plugin-camera",
"path": "src/android/CameraLauncher.java",
"license": "apache-2.0",
"size": 43948
} | [
"android.graphics.Bitmap",
"android.net.Uri",
"java.io.File"
] | import android.graphics.Bitmap; import android.net.Uri; import java.io.File; | import android.graphics.*; import android.net.*; import java.io.*; | [
"android.graphics",
"android.net",
"java.io"
] | android.graphics; android.net; java.io; | 1,704,596 |
public List<Page1EO> getPages1ByAttrA( Page1EO page1EO, Component component )
{
List<Page1EO> pages = null;
SqlSession sqlSession = ConnectionFactory.getSqlSessionFactory().openSession();
try
{
if(SecUtils.checkAccess( component, accessMgr, GlobalIds.PAGE1_OBJNA... | List<Page1EO> function( Page1EO page1EO, Component component ) { List<Page1EO> pages = null; SqlSession sqlSession = ConnectionFactory.getSqlSessionFactory().openSession(); try { if(SecUtils.checkAccess( component, accessMgr, GlobalIds.PAGE1_OBJNAME, GlobalIds.SEARCH_A, page1EO.getCustomer() )) { Page1Dao page1DaoMappe... | /**
* Return all Page1 entities that match attr A parameter.
*
* @param component contains reference to calling wicket component.
* @param page1EO contains reference to page entity.
* @return List of type Page1 entity.
*/ | Return all Page1 entities that match attr A parameter | getPages1ByAttrA | {
"repo_name": "johnpfield/apache-fortress-demo",
"path": "src/main/java/com/mycompany/dao/Page1DaoMgr.java",
"license": "unlicense",
"size": 8615
} | [
"com.mycompany.GlobalIds",
"java.util.List",
"org.apache.directory.fortress.web.control.SecUtils",
"org.apache.ibatis.session.SqlSession",
"org.apache.wicket.Component"
] | import com.mycompany.GlobalIds; import java.util.List; import org.apache.directory.fortress.web.control.SecUtils; import org.apache.ibatis.session.SqlSession; import org.apache.wicket.Component; | import com.mycompany.*; import java.util.*; import org.apache.directory.fortress.web.control.*; import org.apache.ibatis.session.*; import org.apache.wicket.*; | [
"com.mycompany",
"java.util",
"org.apache.directory",
"org.apache.ibatis",
"org.apache.wicket"
] | com.mycompany; java.util; org.apache.directory; org.apache.ibatis; org.apache.wicket; | 1,165,289 |
@Nullable
BuildConfiguration createConfigurations(
ConfigurationFactory configurationFactory,
Cache<String, BuildConfiguration> cache,
PackageProviderForConfigurations loadedPackageProvider,
BuildOptions buildOptions,
EventHandler errorEventListener)
throws InvalidConfigurationEx... | BuildConfiguration createConfigurations( ConfigurationFactory configurationFactory, Cache<String, BuildConfiguration> cache, PackageProviderForConfigurations loadedPackageProvider, BuildOptions buildOptions, EventHandler errorEventListener) throws InvalidConfigurationException, InterruptedException; /** * Returns the m... | /**
* Creates the top-level configuration for a build.
*
* <p>Also it may create a set of BuildConfigurations and define a transition table over them. All
* configurations during a build should be accessible from this top-level configuration via
* configuration transitions.
*
* @param configuration... | Creates the top-level configuration for a build. Also it may create a set of BuildConfigurations and define a transition table over them. All configurations during a build should be accessible from this top-level configuration via configuration transitions | createConfigurations | {
"repo_name": "mikelikespie/bazel",
"path": "src/main/java/com/google/devtools/build/lib/analysis/ConfigurationCollectionFactory.java",
"license": "apache-2.0",
"size": 3049
} | [
"com.google.common.cache.Cache",
"com.google.devtools.build.lib.analysis.config.BuildConfiguration",
"com.google.devtools.build.lib.analysis.config.BuildConfigurationCollection",
"com.google.devtools.build.lib.analysis.config.BuildOptions",
"com.google.devtools.build.lib.analysis.config.ConfigurationFactory... | import com.google.common.cache.Cache; import com.google.devtools.build.lib.analysis.config.BuildConfiguration; import com.google.devtools.build.lib.analysis.config.BuildConfigurationCollection; import com.google.devtools.build.lib.analysis.config.BuildOptions; import com.google.devtools.build.lib.analysis.config.Config... | import com.google.common.cache.*; import com.google.devtools.build.lib.analysis.config.*; import com.google.devtools.build.lib.events.*; | [
"com.google.common",
"com.google.devtools"
] | com.google.common; com.google.devtools; | 705,707 |
public com.iucn.whp.dbservice.model.iucn_region updateiucn_region(
com.iucn.whp.dbservice.model.iucn_region iucn_region, boolean merge)
throws com.liferay.portal.kernel.exception.SystemException; | com.iucn.whp.dbservice.model.iucn_region function( com.iucn.whp.dbservice.model.iucn_region iucn_region, boolean merge) throws com.liferay.portal.kernel.exception.SystemException; | /**
* Updates the iucn_region in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.
*
* @param iucn_region the iucn_region
* @param merge whether to merge the iucn_region with the current session. See {@link com.liferay.portal.service.persistence.BatchSession#update(com... | Updates the iucn_region in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners | updateiucn_region | {
"repo_name": "iucn-whp/world-heritage-outlook",
"path": "portlets/iucn-dbservice-portlet/docroot/WEB-INF/service/com/iucn/whp/dbservice/service/iucn_regionLocalService.java",
"license": "gpl-2.0",
"size": 11169
} | [
"com.liferay.portal.kernel.exception.SystemException"
] | import com.liferay.portal.kernel.exception.SystemException; | import com.liferay.portal.kernel.exception.*; | [
"com.liferay.portal"
] | com.liferay.portal; | 933,321 |
public void remove(SchemaObject obj) {
String objName = obj.getName();
HashMap<String, SchemaObject> map = getMap(obj.getType());
if (SysProperties.CHECK && !map.containsKey(objName)) {
DbException.throwInternalError("not found: " + objName);
}
map.remove(objName)... | void function(SchemaObject obj) { String objName = obj.getName(); HashMap<String, SchemaObject> map = getMap(obj.getType()); if (SysProperties.CHECK && !map.containsKey(objName)) { DbException.throwInternalError(STR + objName); } map.remove(objName); freeUniqueName(objName); } | /**
* Remove an object from this schema.
*
* @param obj the object to remove
*/ | Remove an object from this schema | remove | {
"repo_name": "vdr007/ThriftyPaxos",
"path": "src/applications/h2/src/main/org/h2/schema/Schema.java",
"license": "apache-2.0",
"size": 19877
} | [
"java.util.HashMap",
"org.h2.engine.SysProperties",
"org.h2.message.DbException"
] | import java.util.HashMap; import org.h2.engine.SysProperties; import org.h2.message.DbException; | import java.util.*; import org.h2.engine.*; import org.h2.message.*; | [
"java.util",
"org.h2.engine",
"org.h2.message"
] | java.util; org.h2.engine; org.h2.message; | 529,370 |
@Override
public void setMinimumFractionDigits(int newValue) {
super.setMinimumFractionDigits(Math.min(newValue, DOUBLE_FRACTION_DIGITS));
}
/**
* Sets whether {@link #parse(String, ParsePosition)} returns BigDecimal. The
* default value is false.
*
* @param value true if {@... | void function(int newValue) { super.setMinimumFractionDigits(Math.min(newValue, DOUBLE_FRACTION_DIGITS)); } /** * Sets whether {@link #parse(String, ParsePosition)} returns BigDecimal. The * default value is false. * * @param value true if {@link #parse(String, ParsePosition)} | /**
* Sets the minimum number of digits allowed in the fraction portion of a number. This
* override limits the fraction digit count to 340.
*
* @see NumberFormat#setMinimumFractionDigits
*/ | Sets the minimum number of digits allowed in the fraction portion of a number. This override limits the fraction digit count to 340 | setMinimumFractionDigits | {
"repo_name": "google/j2objc",
"path": "jre_emul/android/platform/external/icu/android_icu4j/src/main/java/android/icu/text/DecimalFormat.java",
"license": "apache-2.0",
"size": 264947
} | [
"android.icu.math.BigDecimal",
"java.text.ParsePosition"
] | import android.icu.math.BigDecimal; import java.text.ParsePosition; | import android.icu.math.*; import java.text.*; | [
"android.icu",
"java.text"
] | android.icu; java.text; | 977,930 |
public static <T> ProxyAndInfo<T> createProxyWithLossyRetryHandler(
Configuration config, URI nameNodeUri, Class<T> xface,
int numResponseToDrop, AtomicBoolean fallbackToSimpleAuth)
throws IOException {
Preconditions.checkArgument(numResponseToDrop > 0);
AbstractNNFailoverProxyProvider<T> fa... | static <T> ProxyAndInfo<T> function( Configuration config, URI nameNodeUri, Class<T> xface, int numResponseToDrop, AtomicBoolean fallbackToSimpleAuth) throws IOException { Preconditions.checkArgument(numResponseToDrop > 0); AbstractNNFailoverProxyProvider<T> failoverProxyProvider = createFailoverProxyProvider(config, n... | /**
* Generate a dummy namenode proxy instance that utilizes our hacked
* {@link LossyRetryInvocationHandler}. Proxy instance generated using this
* method will proactively drop RPC responses. Currently this method only
* support HA setup. null will be returned if the given configuration is not
* for HA.... | Generate a dummy namenode proxy instance that utilizes our hacked <code>LossyRetryInvocationHandler</code>. Proxy instance generated using this method will proactively drop RPC responses. Currently this method only support HA setup. null will be returned if the given configuration is not for HA | createProxyWithLossyRetryHandler | {
"repo_name": "steveloughran/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/NameNodeProxiesClient.java",
"license": "apache-2.0",
"size": 16818
} | [
"com.google.common.base.Preconditions",
"java.io.IOException",
"java.lang.reflect.InvocationHandler",
"java.lang.reflect.Proxy",
"java.util.concurrent.atomic.AtomicBoolean",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.hdfs.client.HdfsClientConfigKeys",
"org.apache.hadoop.hdfs.protocol.H... | import com.google.common.base.Preconditions; import java.io.IOException; import java.lang.reflect.InvocationHandler; import java.lang.reflect.Proxy; import java.util.concurrent.atomic.AtomicBoolean; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hdfs.client.HdfsClientConfigKeys; import org.apache... | import com.google.common.base.*; import java.io.*; import java.lang.reflect.*; import java.util.concurrent.atomic.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.hdfs.client.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.server.namenode.ha.*; import org.apache.hadoop.io.*; impor... | [
"com.google.common",
"java.io",
"java.lang",
"java.util",
"org.apache.hadoop"
] | com.google.common; java.io; java.lang; java.util; org.apache.hadoop; | 2,679,880 |
private static Bitmap createBitmap(
Bitmap source, int x, int y, int width, int height, Matrix m) {
// Re-implement Bitmap createBitmap() to always return a mutable bitmap.
Canvas canvas = new Canvas();
Bitmap bitmap;
Paint paint;
if ((m == null) || m.isIdentity(... | static Bitmap function( Bitmap source, int x, int y, int width, int height, Matrix m) { Canvas canvas = new Canvas(); Bitmap bitmap; Paint paint; if ((m == null) m.isIdentity()) { bitmap = Bitmap.createBitmap(width, height, source.getConfig()); paint = null; } else { RectF rect = new RectF(0, 0, width, height); m.mapRe... | /**
* Creates a mutable bitmap from subset of source bitmap, transformed by the optional matrix.
*/ | Creates a mutable bitmap from subset of source bitmap, transformed by the optional matrix | createBitmap | {
"repo_name": "zoozooll/MyExercise",
"path": "photoeditor/BitmapUtils.java",
"license": "apache-2.0",
"size": 8620
} | [
"android.graphics.Bitmap",
"android.graphics.Canvas",
"android.graphics.Matrix",
"android.graphics.Paint",
"android.graphics.Rect",
"android.graphics.RectF"
] | import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Matrix; import android.graphics.Paint; import android.graphics.Rect; import android.graphics.RectF; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 2,521,998 |
private void tryToDisplayImages() {
// If this is last image handled, display images via
// DisplayImagesActivity.
if (allDownloadsComplete()) {
// Dismiss the progress bar.
mView.get().dismissProgressBar();
// Initialize state for the next run.
... | void function() { if (allDownloadsComplete()) { mView.get().dismissProgressBar(); resetFields(); File file = new File(mDirectoryPathname.toString()); if (file.isDirectory() && file.listFiles() != null && file.listFiles().length > 0) { mView.get().displayResults(mDirectoryPathname); } } } | /**
* Launch an Activity to display all the images that were received
* successfully if all downloads are complete.
*/ | Launch an Activity to display all the images that were received successfully if all downloads are complete | tryToDisplayImages | {
"repo_name": "TingxinLi/Android-Concurrency",
"path": "assignment3/app/src/main/java/vandy/mooc/presenter/ImagePresenter.java",
"license": "apache-2.0",
"size": 11765
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,043,788 |
public void startServer(Properties configProps) throws IOException {
ConfigurationParser confParser = new ConfigurationParser(configProps);
m_properties = confParser.getProperties();
final String handlerProp = System.getProperty("intercept.handler");
if (handlerProp != null) {
... | void function(Properties configProps) throws IOException { ConfigurationParser confParser = new ConfigurationParser(configProps); m_properties = confParser.getProperties(); final String handlerProp = System.getProperty(STR); if (handlerProp != null) { m_properties.setProperty(STR, handlerProp); } LOG.info(STR + m_prope... | /**
* Starts the server with the given properties.
*
* Its suggested to at least have the following properties:
* <ul>
* <li>port</li>
* <li>password_file</li>
* </ul>
*/ | Starts the server with the given properties. Its suggested to at least have the following properties: port password_file | startServer | {
"repo_name": "taojiaenx/moquette",
"path": "broker/src/main/java/org/eclipse/moquette/server/Server.java",
"license": "apache-2.0",
"size": 3849
} | [
"java.io.IOException",
"java.util.Properties",
"org.eclipse.moquette.server.netty.NettyAcceptor",
"org.eclipse.moquette.spi.impl.SimpleMessaging"
] | import java.io.IOException; import java.util.Properties; import org.eclipse.moquette.server.netty.NettyAcceptor; import org.eclipse.moquette.spi.impl.SimpleMessaging; | import java.io.*; import java.util.*; import org.eclipse.moquette.server.netty.*; import org.eclipse.moquette.spi.impl.*; | [
"java.io",
"java.util",
"org.eclipse.moquette"
] | java.io; java.util; org.eclipse.moquette; | 2,534,687 |
protected final void writeFileInfo(FixedFileTrailer trailer, DataOutputStream out)
throws IOException {
trailer.setFileInfoOffset(outputStream.getPos());
finishFileInfo();
fileInfo.write(out);
} | final void function(FixedFileTrailer trailer, DataOutputStream out) throws IOException { trailer.setFileInfoOffset(outputStream.getPos()); finishFileInfo(); fileInfo.write(out); } | /**
* Sets the file info offset in the trailer, finishes up populating fields in
* the file info, and writes the file info into the given data output. The
* reason the data output is not always {@link #outputStream} is that we store
* file info as a block in version 2.
*
* @param trailer fixed file tr... | Sets the file info offset in the trailer, finishes up populating fields in the file info, and writes the file info into the given data output. The reason the data output is not always <code>#outputStream</code> is that we store file info as a block in version 2 | writeFileInfo | {
"repo_name": "justintung/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/AbstractHFileWriter.java",
"license": "apache-2.0",
"size": 9214
} | [
"java.io.DataOutputStream",
"java.io.IOException"
] | import java.io.DataOutputStream; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 180,749 |
val currentAcct = getCandidateAccountFrom(requestContext);
val accountName = requestContext.getRequestParameters().getRequired(REQUEST_PARAMETER_ACCOUNT_NAME);
return OneTimeTokenAccount.builder()
.username(currentAcct.getUsername())
.secretKey(currentAcct.getSecretKey())
... | val currentAcct = getCandidateAccountFrom(requestContext); val accountName = requestContext.getRequestParameters().getRequired(REQUEST_PARAMETER_ACCOUNT_NAME); return OneTimeTokenAccount.builder() .username(currentAcct.getUsername()) .secretKey(currentAcct.getSecretKey()) .validationCode(currentAcct.getValidationCode()... | /**
* Build one time token account.
*
* @param requestContext the request context
* @return the one time token account
*/ | Build one time token account | buildOneTimeTokenAccount | {
"repo_name": "fogbeam/cas_mirror",
"path": "support/cas-server-support-otp-mfa-core/src/main/java/org/apereo/cas/otp/web/flow/OneTimeTokenAccountSaveRegistrationAction.java",
"license": "apache-2.0",
"size": 4238
} | [
"org.apereo.cas.authentication.OneTimeTokenAccount"
] | import org.apereo.cas.authentication.OneTimeTokenAccount; | import org.apereo.cas.authentication.*; | [
"org.apereo.cas"
] | org.apereo.cas; | 2,408,109 |
void populateContext(OutboundRequestHandle handle,
Collection context); | void populateContext(OutboundRequestHandle handle, Collection context); | /**
* Populates the supplied collection with context information
* representing a request with the specified handle. This method
* is used to implement {@link OutboundRequest#populateContext
* OutboundRequest.populateContext} for such requests; the context
* may also be populated by the connec... | Populates the supplied collection with context information representing a request with the specified handle. This method is used to implement <code>OutboundRequest#populateContext OutboundRequest.populateContext</code> for such requests; the context may also be populated by the connection manager | populateContext | {
"repo_name": "cdegroot/river",
"path": "src/net/jini/jeri/connection/Connection.java",
"license": "apache-2.0",
"size": 8541
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 2,537,176 |
public static <T> FutureTask<T> runOnUiThread(FutureTask<T> task) {
if (runningOnUiThread()) {
task.run();
} else {
postOnUiThread(task);
}
return task;
} | static <T> FutureTask<T> function(FutureTask<T> task) { if (runningOnUiThread()) { task.run(); } else { postOnUiThread(task); } return task; } | /**
* Run the supplied FutureTask on the main thread. The method will block
* only if the current thread is the main thread.
*
* @param task The FutureTask to run
* @return The queried task (to aid inline construction)
*/ | Run the supplied FutureTask on the main thread. The method will block only if the current thread is the main thread | runOnUiThread | {
"repo_name": "paul99/clank",
"path": "content/android/java/org/chromium/content/browser/ThreadUtils.java",
"license": "bsd-3-clause",
"size": 4190
} | [
"java.util.concurrent.FutureTask"
] | import java.util.concurrent.FutureTask; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 952,018 |
public static String getFeatureKeyPrefix(Class<? extends AbstractFeature> feature_class, ProcParameter catalog_param) {
return (String.format(FeatureUtil.PREFIX_FORMAT, FeatureUtil.getFeatureKeyPrefix(feature_class), catalog_param.getIndex()));
} | static String function(Class<? extends AbstractFeature> feature_class, ProcParameter catalog_param) { return (String.format(FeatureUtil.PREFIX_FORMAT, FeatureUtil.getFeatureKeyPrefix(feature_class), catalog_param.getIndex())); } | /**
* Return the feature key that includes the given ProcParameter index number
* @param catalog_param
* @return
*/ | Return the feature key that includes the given ProcParameter index number | getFeatureKeyPrefix | {
"repo_name": "malin1993ml/h-store",
"path": "src/frontend/edu/brown/markov/features/FeatureUtil.java",
"license": "gpl-3.0",
"size": 3765
} | [
"org.voltdb.catalog.ProcParameter"
] | import org.voltdb.catalog.ProcParameter; | import org.voltdb.catalog.*; | [
"org.voltdb.catalog"
] | org.voltdb.catalog; | 679,370 |
public boolean check() {
Set<Table> withoutDomain = new TreeSet<Table>();
for (Table table: dataModel.getTables()) {
Set<Domain> domainsOfTable = new TreeSet<Domain>();
for (Domain domain: domains.values()) {
if (domain.tables.contains(table)) {
... | boolean function() { Set<Table> withoutDomain = new TreeSet<Table>(); for (Table table: dataModel.getTables()) { Set<Domain> domainsOfTable = new TreeSet<Domain>(); for (Domain domain: domains.values()) { if (domain.tables.contains(table)) { domainsOfTable.add(domain); } } if (domainsOfTable.size() == 0) { withoutDomai... | /**
* Checks model invariants:
* <ul>
* <li>two different domains are disjoint.
* <li>the union of all domains is the set of all tables.
* </ul>
*
* @return <code>true</code> if no errors are found
*/ | Checks model invariants: two different domains are disjoint. the union of all domains is the set of all tables. | check | {
"repo_name": "pellcorp/jailer",
"path": "src/main/net/sf/jailer/domainmodel/DomainModel.java",
"license": "apache-2.0",
"size": 12774
} | [
"java.util.Set",
"java.util.TreeSet",
"net.sf.jailer.datamodel.Association",
"net.sf.jailer.datamodel.Table",
"net.sf.jailer.util.PrintUtil"
] | import java.util.Set; import java.util.TreeSet; import net.sf.jailer.datamodel.Association; import net.sf.jailer.datamodel.Table; import net.sf.jailer.util.PrintUtil; | import java.util.*; import net.sf.jailer.datamodel.*; import net.sf.jailer.util.*; | [
"java.util",
"net.sf.jailer"
] | java.util; net.sf.jailer; | 1,521,171 |
public ServiceFuture<List<UsageInner>> listUsagesAsync(String resourceGroupName, String accountName, String databaseRid, String filter, final ServiceCallback<List<UsageInner>> serviceCallback) {
return ServiceFuture.fromResponse(listUsagesWithServiceResponseAsync(resourceGroupName, accountName, databaseRid,... | ServiceFuture<List<UsageInner>> function(String resourceGroupName, String accountName, String databaseRid, String filter, final ServiceCallback<List<UsageInner>> serviceCallback) { return ServiceFuture.fromResponse(listUsagesWithServiceResponseAsync(resourceGroupName, accountName, databaseRid, filter), serviceCallback)... | /**
* Retrieves the usages (most recent data) for the given database.
*
* @param resourceGroupName Name of an Azure resource group.
* @param accountName Cosmos DB database account name.
* @param databaseRid Cosmos DB database rid.
* @param filter An OData filter expression that describes a... | Retrieves the usages (most recent data) for the given database | listUsagesAsync | {
"repo_name": "navalev/azure-sdk-for-java",
"path": "sdk/cosmosdb/mgmt-v2019_08_01_preview/src/main/java/com/microsoft/azure/management/cosmosdb/v2019_08_01_preview/implementation/DatabasesInner.java",
"license": "mit",
"size": 27831
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture",
"java.util.List"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; import java.util.List; | import com.microsoft.rest.*; import java.util.*; | [
"com.microsoft.rest",
"java.util"
] | com.microsoft.rest; java.util; | 1,146,730 |
public void setIcon(Icon icon) {
_icon = (icon == null) ? UIConstants.UNKNOWN_ICON : icon;
}
private static class TemplateIcon extends DecoratedIcon {
public TemplateIcon(Icon icon) {
super(icon, Resources.getIcon("template_co.png"), DecoratedIcon.Location.UPPER_RIGHT);
... | void function(Icon icon) { _icon = (icon == null) ? UIConstants.UNKNOWN_ICON : icon; } private static class TemplateIcon extends DecoratedIcon { public TemplateIcon(Icon icon) { super(icon, Resources.getIcon(STR), DecoratedIcon.Location.UPPER_RIGHT); } } private static class ConflictIcon extends DoubleIcon { ConflictIc... | /**
* Set the icon to use for the tree node
*/ | Set the icon to use for the tree node | setIcon | {
"repo_name": "spakzad/ocs",
"path": "bundle/jsky.app.ot/src/main/java/jsky/app/ot/viewer/NodeData.java",
"license": "bsd-3-clause",
"size": 9425
} | [
"edu.gemini.shared.gui.DecoratedIcon",
"edu.gemini.shared.gui.DoubleIcon",
"javax.swing.Icon"
] | import edu.gemini.shared.gui.DecoratedIcon; import edu.gemini.shared.gui.DoubleIcon; import javax.swing.Icon; | import edu.gemini.shared.gui.*; import javax.swing.*; | [
"edu.gemini.shared",
"javax.swing"
] | edu.gemini.shared; javax.swing; | 1,690,711 |
public void upsert(@NonNull final T task) {
if (task.getId() == null) {
TaskLogger.getLogger().e("Task passed to upsert without an ID.");
return;
} | void function(@NonNull final T task) { if (task.getId() == null) { TaskLogger.getLogger().e(STR); return; } | /**
* Update or insert the task into the database
* and into the cache (if it doesn't already exist).
* This method asynchronously communicates with
* the database so it can be called without blocking
* the calling thread.
*
* @param task the task to update or insert into
* ... | Update or insert the task into the database and into the cache (if it doesn't already exist). This method asynchronously communicates with the database so it can be called without blocking the calling thread | upsert | {
"repo_name": "vimeo/turnstile-android",
"path": "turnstile/src/main/java/com/vimeo/turnstile/database/TaskCache.java",
"license": "mit",
"size": 13038
} | [
"androidx.annotation.NonNull",
"com.vimeo.turnstile.utils.TaskLogger"
] | import androidx.annotation.NonNull; import com.vimeo.turnstile.utils.TaskLogger; | import androidx.annotation.*; import com.vimeo.turnstile.utils.*; | [
"androidx.annotation",
"com.vimeo.turnstile"
] | androidx.annotation; com.vimeo.turnstile; | 1,483,175 |
private void setPeriodDimensionWithoutOptions()
{
removeDimension( PERIOD_DIM_ID );
setDimensionOptions( PERIOD_DIM_ID, DimensionType.PERIOD, PERIOD_DIM_ID, Lists.newArrayList() );
} | void function() { removeDimension( PERIOD_DIM_ID ); setDimensionOptions( PERIOD_DIM_ID, DimensionType.PERIOD, PERIOD_DIM_ID, Lists.newArrayList() ); } | /**
* Adds a period dimension or updates an existing one with no period items.
* Removes period filter if present.
*/ | Adds a period dimension or updates an existing one with no period items. Removes period filter if present | setPeriodDimensionWithoutOptions | {
"repo_name": "hispindia/dhis2-Core",
"path": "dhis-2/dhis-services/dhis-service-analytics/src/main/java/org/hisp/dhis/analytics/DataQueryParams.java",
"license": "bsd-3-clause",
"size": 105104
} | [
"com.google.common.collect.Lists",
"org.hisp.dhis.common.DimensionType"
] | import com.google.common.collect.Lists; import org.hisp.dhis.common.DimensionType; | import com.google.common.collect.*; import org.hisp.dhis.common.*; | [
"com.google.common",
"org.hisp.dhis"
] | com.google.common; org.hisp.dhis; | 775,157 |
private void readObject(ObjectInputStream s) throws InvalidObjectException {
throw new InvalidObjectException("Deserialization via serialization delegate");
} | void function(ObjectInputStream s) throws InvalidObjectException { throw new InvalidObjectException(STR); } | /**
* Defend against malicious streams.
*
* @param s the stream to read
* @throws InvalidObjectException always
*/ | Defend against malicious streams | readObject | {
"repo_name": "flyzsd/java-code-snippets",
"path": "ibm.jdk8/src/java/time/YearMonth.java",
"license": "mit",
"size": 53207
} | [
"java.io.InvalidObjectException",
"java.io.ObjectInputStream"
] | import java.io.InvalidObjectException; import java.io.ObjectInputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,268,841 |
private void simpleExtract(Locale locale) {
for (int i = 0; i < mEnglish.size(); i++){
String key = ((String) mEnglish.get(i));
Object[] arguments = getPresentObject(i, null);
String s = cr.getString(key, arguments, locale);
printTestResults(s);
... | void function(Locale locale) { for (int i = 0; i < mEnglish.size(); i++){ String key = ((String) mEnglish.get(i)); Object[] arguments = getPresentObject(i, null); String s = cr.getString(key, arguments, locale); printTestResults(s); } } | /**
* Runs the test for text with or without Locale
*
* @param locale
*/ | Runs the test for text with or without Locale | simpleExtract | {
"repo_name": "davidlad123/spine",
"path": "spine/build/spine-0.9-src/test/com/zphinx/spine/unittests/ConfigResourcesTest.java",
"license": "gpl-3.0",
"size": 6254
} | [
"java.util.Locale"
] | import java.util.Locale; | import java.util.*; | [
"java.util"
] | java.util; | 1,001,039 |
public void testOidStrToInts() throws Exception {
// Regression for HARMONY-727
Object[][] positives = {
{ "1.2", new int[] { 1, 2 } },
{ "1.2.3.4.5", new int[] { 1, 2, 3, 4, 5 } },
{ "123.456.7890.1234567890",
new int[] { 123, ... | void function() throws Exception { Object[][] positives = { { "1.2", new int[] { 1, 2 } }, { STR, new int[] { 1, 2, 3, 4, 5 } }, { STR, new int[] { 123, 456, 7890, 1234567890 } }, }; String[] negatives = { ".1.2", "1.2.", STR, STR }; for (int i = 0; i < positives.length; i++) { int[] res = GeneralName.oidStrToInts((Str... | /**
* oidStrToInts method testing
*/ | oidStrToInts method testing | testOidStrToInts | {
"repo_name": "freeVM/freeVM",
"path": "enhanced/archive/classlib/java6/modules/security/src/test/impl/java/org/apache/harmony/security/tests/x509/GeneralNameTest.java",
"license": "apache-2.0",
"size": 9199
} | [
"java.io.IOException",
"org.apache.harmony.security.x509.GeneralName"
] | import java.io.IOException; import org.apache.harmony.security.x509.GeneralName; | import java.io.*; import org.apache.harmony.security.x509.*; | [
"java.io",
"org.apache.harmony"
] | java.io; org.apache.harmony; | 8,306 |
public void setScrubberColor(@NonNull ColorStateList colorStateList) {
mScrubber.setColorStateList(colorStateList);
} | void function(@NonNull ColorStateList colorStateList) { mScrubber.setColorStateList(colorStateList); } | /**
* Sets the color of the seekbar scrubber
*
* @param colorStateList The ColorStateList the track scrubber will be changed to
*/ | Sets the color of the seekbar scrubber | setScrubberColor | {
"repo_name": "d8ahazard/discreteSeekBar",
"path": "library/src/main/java/org/adw/library/widgets/discreteseekbar/DiscreteSeekBar.java",
"license": "apache-2.0",
"size": 39331
} | [
"android.content.res.ColorStateList",
"android.support.annotation.NonNull"
] | import android.content.res.ColorStateList; import android.support.annotation.NonNull; | import android.content.res.*; import android.support.annotation.*; | [
"android.content",
"android.support"
] | android.content; android.support; | 1,091,619 |
@Override
public void visit(EventDispatcherNode n) {
if (Options.get().isDOMEnabled()) {
DOMEvents.emit(n, c);
}
if (Options.get().isAsyncEventsEnabled()) {
AsyncEvents.emit(n, c);
}
} | void function(EventDispatcherNode n) { if (Options.get().isDOMEnabled()) { DOMEvents.emit(n, c); } if (Options.get().isAsyncEventsEnabled()) { AsyncEvents.emit(n, c); } } | /**
* Event dispatch.
*/ | Event dispatch | visit | {
"repo_name": "cs-au-dk/TAJS",
"path": "src/dk/brics/tajs/analysis/js/NodeTransfer.java",
"license": "apache-2.0",
"size": 57579
} | [
"dk.brics.tajs.analysis.AsyncEvents",
"dk.brics.tajs.analysis.dom.DOMEvents",
"dk.brics.tajs.flowgraph.jsnodes.EventDispatcherNode",
"dk.brics.tajs.options.Options"
] | import dk.brics.tajs.analysis.AsyncEvents; import dk.brics.tajs.analysis.dom.DOMEvents; import dk.brics.tajs.flowgraph.jsnodes.EventDispatcherNode; import dk.brics.tajs.options.Options; | import dk.brics.tajs.analysis.*; import dk.brics.tajs.analysis.dom.*; import dk.brics.tajs.flowgraph.jsnodes.*; import dk.brics.tajs.options.*; | [
"dk.brics.tajs"
] | dk.brics.tajs; | 636,504 |
public Emoticon getEmoticon(String packName, String key) {
final Collection<Emoticon> emoticons = emoticonMap.get(packName);
if (emoticons == null) {
return null;
}
for (Emoticon emoticon : emoticons) {
for (String string : emoticon.getEquivalants()) {
if (key.equals(string)) {
return emoti... | Emoticon function(String packName, String key) { final Collection<Emoticon> emoticons = emoticonMap.get(packName); if (emoticons == null) { return null; } for (Emoticon emoticon : emoticons) { for (String string : emoticon.getEquivalants()) { if (key.equals(string)) { return emoticon; } } } return null; } | /**
* Retrieves the associated key emoticon.
*
* @param packName
* the name of the Archive Pack File.
* @param key
* the key.
* @return the emoticon.
*/ | Retrieves the associated key emoticon | getEmoticon | {
"repo_name": "joshuairl/toothchat-client",
"path": "src/java/org/jivesoftware/sparkimpl/plugin/emoticons/EmoticonManager.java",
"license": "apache-2.0",
"size": 14750
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 624,460 |
public static void exit() {
if (!exiting) {
exiting = true;
//stop program
System.out.println("waiting for shutdown...");
stop();
try {
GpioFactory.getInstance().shutdown();
} catch (UnsupportedOperationException | Null... | static void function() { if (!exiting) { exiting = true; System.out.println(STR); stop(); try { GpioFactory.getInstance().shutdown(); } catch (UnsupportedOperationException NullPointerException e) { } for (int i = 1; i < 20; i++) { System.out.print("."); if (i % 10 == 0) System.out.println(); try { Thread.sleep(100); }... | /**
* Exits the program.
*/ | Exits the program | exit | {
"repo_name": "PSemFlugSim/server",
"path": "src/de/gymolching/fsb/Launcher.java",
"license": "bsd-2-clause",
"size": 4393
} | [
"com.pi4j.io.gpio.GpioFactory"
] | import com.pi4j.io.gpio.GpioFactory; | import com.pi4j.io.gpio.*; | [
"com.pi4j.io"
] | com.pi4j.io; | 1,482,401 |
public Pair<InflationProviderDiscount, CurveBuildingBlockBundle> makeCurvesFromDerivatives(
final MultiCurveBundle<GeneratorCurve>[] curveBundles,
final InflationProviderDiscount knownData,
final LinkedHashMap<String, Currency> discountingMap, final LinkedHashMap<String, IndexON[]> forwardONMap,
... | Pair<InflationProviderDiscount, CurveBuildingBlockBundle> function( final MultiCurveBundle<GeneratorCurve>[] curveBundles, final InflationProviderDiscount knownData, final LinkedHashMap<String, Currency> discountingMap, final LinkedHashMap<String, IndexON[]> forwardONMap, final LinkedHashMap<String, IborIndex[]> forwar... | /**
* Build a block of curves. No CurveBuildingBlockBundle is provided and the sensitivity to the curves in the knownData
* will not be available.
* @param curveBundles The curve bundles, not null
* @param knownData The known data (fx rates, other curves, model parameters, ...)
* @param discountingMap Th... | Build a block of curves. No CurveBuildingBlockBundle is provided and the sensitivity to the curves in the knownData will not be available | makeCurvesFromDerivatives | {
"repo_name": "nssales/OG-Platform",
"path": "projects/OG-Analytics/src/main/java/com/opengamma/analytics/financial/provider/curve/inflation/InflationDiscountBuildingRepository.java",
"license": "apache-2.0",
"size": 22281
} | [
"com.opengamma.analytics.financial.curve.interestrate.generator.GeneratorCurve",
"com.opengamma.analytics.financial.instrument.index.IborIndex",
"com.opengamma.analytics.financial.instrument.index.IndexON",
"com.opengamma.analytics.financial.instrument.index.IndexPrice",
"com.opengamma.analytics.financial.i... | import com.opengamma.analytics.financial.curve.interestrate.generator.GeneratorCurve; import com.opengamma.analytics.financial.instrument.index.IborIndex; import com.opengamma.analytics.financial.instrument.index.IndexON; import com.opengamma.analytics.financial.instrument.index.IndexPrice; import com.opengamma.analyti... | import com.opengamma.analytics.financial.curve.interestrate.generator.*; import com.opengamma.analytics.financial.instrument.index.*; import com.opengamma.analytics.financial.interestrate.*; import com.opengamma.analytics.financial.provider.curve.*; import com.opengamma.analytics.financial.provider.description.inflatio... | [
"com.opengamma.analytics",
"com.opengamma.util",
"java.util"
] | com.opengamma.analytics; com.opengamma.util; java.util; | 2,648,901 |
public void setHomeAsUpIndicator(int resId) {
Drawable indicator = null;
if (resId != 0) {
indicator = mDrawerLayout.getResources().getDrawable(resId);
}
setHomeAsUpIndicator(indicator);
} | void function(int resId) { Drawable indicator = null; if (resId != 0) { indicator = mDrawerLayout.getResources().getDrawable(resId); } setHomeAsUpIndicator(indicator); } | /**
* Set the up indicator to display when the drawer indicator is not
* enabled.
* <p>
* If you pass 0 to this method, the default drawable from the theme will
* be used.
*
* @param resId Resource ID of a drawable to use for the up indicator, or 0
* to use the theme... | Set the up indicator to display when the drawer indicator is not enabled. If you pass 0 to this method, the default drawable from the theme will be used | setHomeAsUpIndicator | {
"repo_name": "s20121035/rk3288_android5.1_repo",
"path": "frameworks/support/v7/appcompat/src/android/support/v7/app/ActionBarDrawerToggle.java",
"license": "gpl-3.0",
"size": 26628
} | [
"android.graphics.drawable.Drawable"
] | import android.graphics.drawable.Drawable; | import android.graphics.drawable.*; | [
"android.graphics"
] | android.graphics; | 1,939,662 |
private void finishAddImageProcess(List<String> errorMessages, List<Content> newDataSources) {
synchronized (tskAddImageProcessLock) {
Image newImage = imageDetails.image;
String verificationError = newImage.verifyImageSize();
if (!verificationError.isEmpty()) {
... | void function(List<String> errorMessages, List<Content> newDataSources) { synchronized (tskAddImageProcessLock) { Image newImage = imageDetails.image; String verificationError = newImage.verifyImageSize(); if (!verificationError.isEmpty()) { errorMessages.add(verificationError); } if (imageDetails.imageWriterSettings !... | /**
* Handle the results of the TSK add image process.
* The image will be in the database even if a critical error occurred or
* the user canceled.
*
* @param errorMessages Error messages, if any, are added to this list for
* eventual return via the callback.
... | Handle the results of the TSK add image process. The image will be in the database even if a critical error occurred or the user canceled | finishAddImageProcess | {
"repo_name": "sleuthkit/autopsy",
"path": "Core/src/org/sleuthkit/autopsy/casemodule/AddImageTask.java",
"license": "apache-2.0",
"size": 15096
} | [
"java.util.List",
"java.util.logging.Level",
"org.apache.commons.lang3.StringUtils",
"org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorProgressMonitor",
"org.sleuthkit.autopsy.imagewriter.ImageWriterService",
"org.sleuthkit.datamodel.Content",
"org.sleuthkit.datamodel.Image",
"org.sleu... | import java.util.List; import java.util.logging.Level; import org.apache.commons.lang3.StringUtils; import org.sleuthkit.autopsy.corecomponentinterfaces.DataSourceProcessorProgressMonitor; import org.sleuthkit.autopsy.imagewriter.ImageWriterService; import org.sleuthkit.datamodel.Content; import org.sleuthkit.datamodel... | import java.util.*; import java.util.logging.*; import org.apache.commons.lang3.*; import org.sleuthkit.autopsy.corecomponentinterfaces.*; import org.sleuthkit.autopsy.imagewriter.*; import org.sleuthkit.datamodel.*; | [
"java.util",
"org.apache.commons",
"org.sleuthkit.autopsy",
"org.sleuthkit.datamodel"
] | java.util; org.apache.commons; org.sleuthkit.autopsy; org.sleuthkit.datamodel; | 1,468,985 |
public String constructSiteTableJSON(JSONArray ja){
String tmp=ja.toString();
return tmp;
}
| String function(JSONArray ja){ String tmp=ja.toString(); return tmp; } | /**
* If we have a JSONArray this function is a wrapper to retrieve JSONArray.tostring().
* @param ja
* @param version
* @return
* @author gtricomi
*/ | If we have a JSONArray this function is a wrapper to retrieve JSONArray.tostring() | constructSiteTableJSON | {
"repo_name": "Beacon-Unime/OSFFM",
"path": "src/java/API/SOUTHBR/FA_client4Sites.java",
"license": "apache-2.0",
"size": 5690
} | [
"org.json.JSONArray"
] | import org.json.JSONArray; | import org.json.*; | [
"org.json"
] | org.json; | 77,816 |
public void setUseSystemTime(boolean useSystemTime)
{
this.useSystemTime = useSystemTime;
recomputeNumBuckets();
}
private static final transient Logger logger = LoggerFactory.getLogger(AbstractTimeBasedBucketManager.class); | void function(boolean useSystemTime) { this.useSystemTime = useSystemTime; recomputeNumBuckets(); } private static final transient Logger logger = LoggerFactory.getLogger(AbstractTimeBasedBucketManager.class); | /**
* Sets whether to use System time to advance expiry point. If set to false, Tuple time will be used to advance the
* expiry point, else System time will be used.
*
* @param useSystemTime
*/ | Sets whether to use System time to advance expiry point. If set to false, Tuple time will be used to advance the expiry point, else System time will be used | setUseSystemTime | {
"repo_name": "DataTorrent/Megh",
"path": "library/src/main/java/com/datatorrent/lib/bucket/AbstractTimeBasedBucketManager.java",
"license": "apache-2.0",
"size": 4524
} | [
"org.slf4j.Logger",
"org.slf4j.LoggerFactory"
] | import org.slf4j.Logger; import org.slf4j.LoggerFactory; | import org.slf4j.*; | [
"org.slf4j"
] | org.slf4j; | 401,575 |
public final void ensureBufferContains(int n) throws EOFException, IOException {
assert n >= 0 && n <= buffer.capacity() : n;
n -= buffer.remaining();
if (n > 0) {
bufferOffset += buffer.position();
buffer.compact();
do {
final int c = chan... | final void function(int n) throws EOFException, IOException { assert n >= 0 && n <= buffer.capacity() : n; n -= buffer.remaining(); if (n > 0) { bufferOffset += buffer.position(); buffer.compact(); do { final int c = channel.read(buffer); if (c <= 0) { if (c != 0) { throw new EOFException(eof()); } onEmptyTransfer(); }... | /**
* Makes sure that the buffer contains at least <var>n</var> remaining bytes.
* It is caller's responsibility to ensure that the given number of bytes is
* not greater than the {@linkplain ByteBuffer#capacity() buffer capacity}.
*
* @param n the minimal number of bytes needed in the {@link... | Makes sure that the buffer contains at least n remaining bytes. It is caller's responsibility to ensure that the given number of bytes is not greater than the ByteBuffer#capacity() buffer capacity | ensureBufferContains | {
"repo_name": "Geomatys/sis",
"path": "storage/sis-storage/src/main/java/org/apache/sis/internal/storage/io/ChannelDataInput.java",
"license": "apache-2.0",
"size": 40666
} | [
"java.io.EOFException",
"java.io.IOException"
] | import java.io.EOFException; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 787,251 |
@Override
public VRegistration rename(Name name) {
return new VRegistration(name, null);
} | VRegistration function(Name name) { return new VRegistration(name, null); } | /**
* Rename this table
*/ | Rename this table | rename | {
"repo_name": "jottyfan/CampOrganizer",
"path": "src/main/jooq/de/jottyfan/camporganizer/db/jooq/tables/VRegistration.java",
"license": "unlicense",
"size": 5150
} | [
"org.jooq.Name"
] | import org.jooq.Name; | import org.jooq.*; | [
"org.jooq"
] | org.jooq; | 1,985,465 |
private Map<SortedSet<ValidationResult>, Set<User>> getMessageMap( SortedSet<ValidationResult> results )
{
Map<User, SortedSet<ValidationResult>> userResults = getUserResults( results );
Map<SortedSet<ValidationResult>, Set<User>> messageMap = new HashMap<>();
for ( Map.Entry<Use... | Map<SortedSet<ValidationResult>, Set<User>> function( SortedSet<ValidationResult> results ) { Map<User, SortedSet<ValidationResult>> userResults = getUserResults( results ); Map<SortedSet<ValidationResult>, Set<User>> messageMap = new HashMap<>(); for ( Map.Entry<User, SortedSet<ValidationResult>> userResultEntry : use... | /**
* Returns a map where the key is a sorted list of validation results
* to assemble into a message, and the value is the set of users who
* should receive this message.
*
* @param results all the validation run results, in a sorted set
* @return map of result sets to users
... | Returns a map where the key is a sorted list of validation results to assemble into a message, and the value is the set of users who should receive this message | getMessageMap | {
"repo_name": "kakada/dhis2",
"path": "dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/validation/DefaultValidationRuleService.java",
"license": "bsd-3-clause",
"size": 31144
} | [
"java.util.HashMap",
"java.util.HashSet",
"java.util.Map",
"java.util.Set",
"java.util.SortedSet",
"org.hisp.dhis.user.User"
] | import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; import java.util.SortedSet; import org.hisp.dhis.user.User; | import java.util.*; import org.hisp.dhis.user.*; | [
"java.util",
"org.hisp.dhis"
] | java.util; org.hisp.dhis; | 60,798 |
class LinkAction extends TagAction
{
public void start(HTML.Tag t, MutableAttributeSet a)
throws NotImplementedException
{
// FIXME: Implement.
print ("LinkAction.start not implemented");
} | class LinkAction extends TagAction { void function(HTML.Tag t, MutableAttributeSet a) throws NotImplementedException { print (STR); } | /**
* This method is called when a start tag is seen for one of the types
* of tags associated with this Action.
*/ | This method is called when a start tag is seen for one of the types of tags associated with this Action | start | {
"repo_name": "shaotuanchen/sunflower_exp",
"path": "tools/source/gcc-4.2.4/libjava/classpath/javax/swing/text/html/HTMLDocument.java",
"license": "bsd-3-clause",
"size": 53973
} | [
"gnu.classpath.NotImplementedException",
"javax.swing.text.MutableAttributeSet",
"javax.swing.text.html.HTML"
] | import gnu.classpath.NotImplementedException; import javax.swing.text.MutableAttributeSet; import javax.swing.text.html.HTML; | import gnu.classpath.*; import javax.swing.text.*; import javax.swing.text.html.*; | [
"gnu.classpath",
"javax.swing"
] | gnu.classpath; javax.swing; | 2,322,466 |
@SuppressLint("NewApi")
public static void setBackground(View view, Drawable background) {
if (android.os.Build.VERSION.SDK_INT >= 16) {
view.setBackground(background);
} else {
view.setBackgroundDrawable(background);
}
} | @SuppressLint(STR) static void function(View view, Drawable background) { if (android.os.Build.VERSION.SDK_INT >= 16) { view.setBackground(background); } else { view.setBackgroundDrawable(background); } } | /**
* Compatibility method
*
* @param view
* the view to set the background on
* @param background
* the background
*/ | Compatibility method | setBackground | {
"repo_name": "monossido/CoopTDMAltavia",
"path": "src/com/lorenzobraghetto/cooptdmaltavia/Utils.java",
"license": "gpl-3.0",
"size": 5173
} | [
"android.annotation.SuppressLint",
"android.graphics.drawable.Drawable",
"android.os.Build",
"android.view.View"
] | import android.annotation.SuppressLint; import android.graphics.drawable.Drawable; import android.os.Build; import android.view.View; | import android.annotation.*; import android.graphics.drawable.*; import android.os.*; import android.view.*; | [
"android.annotation",
"android.graphics",
"android.os",
"android.view"
] | android.annotation; android.graphics; android.os; android.view; | 2,531,755 |
public Tuple next(Tuple tuple) throws IOException
{
functionTree.attachTuple(tuple);
for (int i = 0; i < outputTuple.size(); i++)
outputTuple.set(i, functionTree.evalTree(i));
return outputTuple;
} | Tuple function(Tuple tuple) throws IOException { functionTree.attachTuple(tuple); for (int i = 0; i < outputTuple.size(); i++) outputTuple.set(i, functionTree.evalTree(i)); return outputTuple; } | /**
* This method is used by the TEE operator. The code is copied (from the next()
* method) so that we don't make an extra function call from the next() method.
*
* @param tuple
* @return
* @throws IOException
*/ | This method is used by the TEE operator. The code is copied (from the next() method) so that we don't make an extra function call from the next() method | next | {
"repo_name": "linkedin/Cubert",
"path": "src/main/java/com/linkedin/cubert/operator/GenerateOperator.java",
"license": "apache-2.0",
"size": 6597
} | [
"java.io.IOException",
"org.apache.pig.data.Tuple"
] | import java.io.IOException; import org.apache.pig.data.Tuple; | import java.io.*; import org.apache.pig.data.*; | [
"java.io",
"org.apache.pig"
] | java.io; org.apache.pig; | 2,237,225 |
public FacesConfigComponentExtensionType<T> removeId()
{
childNode.removeAttribute("id");
return this;
} | FacesConfigComponentExtensionType<T> function() { childNode.removeAttribute("id"); return this; } | /**
* Removes the <code>id</code> attribute
* @return the current instance of <code>FacesConfigComponentExtensionType<T></code>
*/ | Removes the <code>id</code> attribute | removeId | {
"repo_name": "forge/javaee-descriptors",
"path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/facesconfig20/FacesConfigComponentExtensionTypeImpl.java",
"license": "epl-1.0",
"size": 2662
} | [
"org.jboss.shrinkwrap.descriptor.api.facesconfig20.FacesConfigComponentExtensionType"
] | import org.jboss.shrinkwrap.descriptor.api.facesconfig20.FacesConfigComponentExtensionType; | import org.jboss.shrinkwrap.descriptor.api.facesconfig20.*; | [
"org.jboss.shrinkwrap"
] | org.jboss.shrinkwrap; | 2,162,554 |
private ES2Person person(ILCDContact iContact) {
ES2Person ePerson = new ES2Person();
ILCDContactDescription iDescription = iContact.description;
if (iDescription != null) {
// check if the
boolean isOrganisation = false;
for (ILCDClassification classification : iDescription
.getClassifications... | ES2Person function(ILCDContact iContact) { ES2Person ePerson = new ES2Person(); ILCDContactDescription iDescription = iContact.description; if (iDescription != null) { boolean isOrganisation = false; for (ILCDClassification classification : iDescription .getClassifications()) { for (ILCDClass clazz : classification.get... | /**
* Makes an EcoSpold 02 person from the given ILCD contact data set.
*/ | Makes an EcoSpold 02 person from the given ILCD contact data set | person | {
"repo_name": "GreenDelta/olca-converter",
"path": "src/main/java/org/openlca/olcatdb/conversion/ILCDToES2Conversion.java",
"license": "mpl-2.0",
"size": 38857
} | [
"org.openlca.olcatdb.ecospold2.masterdata.ES2Person",
"org.openlca.olcatdb.ilcd.ILCDClass",
"org.openlca.olcatdb.ilcd.ILCDClassification",
"org.openlca.olcatdb.ilcd.ILCDContact",
"org.openlca.olcatdb.ilcd.ILCDContactDescription"
] | import org.openlca.olcatdb.ecospold2.masterdata.ES2Person; import org.openlca.olcatdb.ilcd.ILCDClass; import org.openlca.olcatdb.ilcd.ILCDClassification; import org.openlca.olcatdb.ilcd.ILCDContact; import org.openlca.olcatdb.ilcd.ILCDContactDescription; | import org.openlca.olcatdb.ecospold2.masterdata.*; import org.openlca.olcatdb.ilcd.*; | [
"org.openlca.olcatdb"
] | org.openlca.olcatdb; | 1,504,952 |
@Override
public InputStream getErrorStream() {
try {
getResponse();
} catch (IOException e) {
return null;
}
if (mResponseInfo.getHttpStatusCode() >= HTTP_BAD_REQUEST) {
return mInputStream;
}
return null;
} | InputStream function() { try { getResponse(); } catch (IOException e) { return null; } if (mResponseInfo.getHttpStatusCode() >= HTTP_BAD_REQUEST) { return mInputStream; } return null; } | /**
* Returns an input stream from the server in the case of an error such as
* the requested file has not been found on the remote server.
*/ | Returns an input stream from the server in the case of an error such as the requested file has not been found on the remote server | getErrorStream | {
"repo_name": "endlessm/chromium-browser",
"path": "components/cronet/android/java/src/org/chromium/net/urlconnection/CronetHttpURLConnection.java",
"license": "bsd-3-clause",
"size": 25364
} | [
"java.io.IOException",
"java.io.InputStream"
] | import java.io.IOException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 394,448 |
@Override
public String modelDescription( Locale locale )
{
ResourceBundle rb = getResourceBundle( locale );
return rb.getString( "MODEL_DESCRIPTION_EXTENDED" );
} | String function( Locale locale ) { ResourceBundle rb = getResourceBundle( locale ); return rb.getString( STR ); } | /**
* Returns a Description of the AlarmModel.
* This normally returns a full Description of the AlarmModel in the
* Locale. If Locale is <code><b>null</b></code>, then the
* default Locale is used.
*
* @param locale The locale that should be used for the descriptio... | Returns a Description of the AlarmModel. This normally returns a full Description of the AlarmModel in the Locale. If Locale is <code>null</code>, then the default Locale is used | modelDescription | {
"repo_name": "ramtej/Qi4j.Repo.4.Sync",
"path": "libraries/alarm/src/main/java/org/qi4j/library/alarm/ExtendedAlarmModelService.java",
"license": "apache-2.0",
"size": 17687
} | [
"java.util.Locale",
"java.util.ResourceBundle"
] | import java.util.Locale; import java.util.ResourceBundle; | import java.util.*; | [
"java.util"
] | java.util; | 2,658,898 |
// ---------------------------------------------------------------
// Init Methods
// ---------------------------------------------------------------
protected boolean init(LDACmdOption option) {
if (option == null)
return false;
modelName = option.modelName;
... | boolean function(LDACmdOption option) { if (option == null) return false; modelName = option.modelName; K = option.K; alpha = option.alpha; if (alpha < 0.0) alpha = 50.0 / K; if (option.beta >= 0) beta = option.beta; niters = option.niters; dir = option.dir; if (dir.endsWith(File.separator)) dir = dir.substring(0, dir.... | /**
* initialize the model
*/ | initialize the model | init | {
"repo_name": "thuvh/jgibblda",
"path": "src/jgibblda/Model.java",
"license": "gpl-3.0",
"size": 23266
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 578,454 |
public static Node invokeFunction1(Resource function, RDFNode argument, Dataset dataset) {
ExprList args = new ExprList();
args.add(argument != null ? NodeValue.makeNode(argument.asNode()) : new ExprVar("arg1"));
return invokeFunction(function, args, dataset);
} | static Node function(Resource function, RDFNode argument, Dataset dataset) { ExprList args = new ExprList(); args.add(argument != null ? NodeValue.makeNode(argument.asNode()) : new ExprVar("arg1")); return invokeFunction(function, args, dataset); } | /**
* Calls a given SPARQL function with one argument.
*
* @param function the URI resource of the function to call
* @param argument the first argument
* @param dataset the Dataset to operate on or null for default
* @return the result of the function call
*/ | Calls a given SPARQL function with one argument | invokeFunction1 | {
"repo_name": "TopQuadrant/shacl",
"path": "src/main/java/org/topbraid/jenax/util/JenaUtil.java",
"license": "apache-2.0",
"size": 38680
} | [
"org.apache.jena.graph.Node",
"org.apache.jena.query.Dataset",
"org.apache.jena.rdf.model.RDFNode",
"org.apache.jena.rdf.model.Resource",
"org.apache.jena.sparql.expr.ExprList",
"org.apache.jena.sparql.expr.ExprVar",
"org.apache.jena.sparql.expr.NodeValue"
] | import org.apache.jena.graph.Node; import org.apache.jena.query.Dataset; import org.apache.jena.rdf.model.RDFNode; import org.apache.jena.rdf.model.Resource; import org.apache.jena.sparql.expr.ExprList; import org.apache.jena.sparql.expr.ExprVar; import org.apache.jena.sparql.expr.NodeValue; | import org.apache.jena.graph.*; import org.apache.jena.query.*; import org.apache.jena.rdf.model.*; import org.apache.jena.sparql.expr.*; | [
"org.apache.jena"
] | org.apache.jena; | 2,494,875 |
private long getLastTimestamp(TcaCollectionResource resource) throws Exception {
File file = null;
long timestamp = 0;
try {
file = resource.getResourceDir(m_rrdRepository);
String ts = ResourceTypeUtils.getStringProperty(resource.getResourceDir(m_rrdRepository), LAST_TIMESTAMP);
if (ts != null)
... | long function(TcaCollectionResource resource) throws Exception { File file = null; long timestamp = 0; try { file = resource.getResourceDir(m_rrdRepository); String ts = ResourceTypeUtils.getStringProperty(resource.getResourceDir(m_rrdRepository), LAST_TIMESTAMP); if (ts != null) timestamp = Long.parseLong(ts); } catch... | /**
* Gets the last timestamp.
*
* @param resource the TCA resource
* @return the last timestamp
* @throws Exception the exception
*/ | Gets the last timestamp | getLastTimestamp | {
"repo_name": "vishwaAbhinav/OpenNMS",
"path": "features/juniper-tca-collector/src/main/java/org/opennms/netmgt/collectd/tca/TcaCollectionSet.java",
"license": "gpl-2.0",
"size": 10675
} | [
"java.io.File",
"org.opennms.netmgt.dao.support.ResourceTypeUtils"
] | import java.io.File; import org.opennms.netmgt.dao.support.ResourceTypeUtils; | import java.io.*; import org.opennms.netmgt.dao.support.*; | [
"java.io",
"org.opennms.netmgt"
] | java.io; org.opennms.netmgt; | 509,007 |
public Enumeration getAttributes() {
return attributeSetters.keys();
} | Enumeration function() { return attributeSetters.keys(); } | /**
* Returns an enumeration of the names of the attributes supported by the introspected class.
*
* @return an enumeration of the names of the attributes supported by the introspected class.
* @see #getAttributeMap
*/ | Returns an enumeration of the names of the attributes supported by the introspected class | getAttributes | {
"repo_name": "BIORIMP/biorimp",
"path": "BIO-RIMP/test_data/code/antapache/src/main/org/apache/tools/ant/IntrospectionHelper.java",
"license": "gpl-2.0",
"size": 72602
} | [
"java.util.Enumeration"
] | import java.util.Enumeration; | import java.util.*; | [
"java.util"
] | java.util; | 1,905,878 |
public void setVmInstanceValue(String vmInstanceValue) throws JNCException {
setVmInstanceValue(new YangString(vmInstanceValue));
} | void function(String vmInstanceValue) throws JNCException { setVmInstanceValue(new YangString(vmInstanceValue)); } | /**
* Sets the value for child leaf "vm-instance",
* using a String value.
* @param vmInstanceValue used during instantiation.
*/ | Sets the value for child leaf "vm-instance", using a String value | setVmInstanceValue | {
"repo_name": "jnpr-shinma/yangfile",
"path": "hitel/src/hctaEpc/mmeSgsn/system/callp/Unit.java",
"license": "apache-2.0",
"size": 7190
} | [
"com.tailf.jnc.YangString"
] | import com.tailf.jnc.YangString; | import com.tailf.jnc.*; | [
"com.tailf.jnc"
] | com.tailf.jnc; | 1,627,641 |
public Criteria gte(Object o) {
this.criteriaType = RelationalOperator.GTE;
this.right = ValueNode.toValueNode(o);
return this;
} | Criteria function(Object o) { this.criteriaType = RelationalOperator.GTE; this.right = ValueNode.toValueNode(o); return this; } | /**
* Creates a criterion using the <b>>=</b> operator
*
* @param o
* @return the criteria
*/ | Creates a criterion using the >= operator | gte | {
"repo_name": "lafaspot/JsonPath",
"path": "json-path/src/main/java/com/jayway/jsonpath/Criteria.java",
"license": "apache-2.0",
"size": 13517
} | [
"com.jayway.jsonpath.internal.filter.RelationalOperator",
"com.jayway.jsonpath.internal.filter.ValueNode"
] | import com.jayway.jsonpath.internal.filter.RelationalOperator; import com.jayway.jsonpath.internal.filter.ValueNode; | import com.jayway.jsonpath.internal.filter.*; | [
"com.jayway.jsonpath"
] | com.jayway.jsonpath; | 1,855,752 |
void onTracksSelected(Renderer[] renderers, TrackGroupArray trackGroups,
TrackSelectionArray trackSelections); | void onTracksSelected(Renderer[] renderers, TrackGroupArray trackGroups, TrackSelectionArray trackSelections); | /**
* Called by the player when a track selection occurs.
*
* @param renderers The renderers.
* @param trackGroups The {@link TrackGroup}s from which the selection was made.
* @param trackSelections The track selections that were made.
*/ | Called by the player when a track selection occurs | onTracksSelected | {
"repo_name": "Blaez/ZiosGram",
"path": "TMessagesProj/src/main/java/org/telegram/messenger/exoplayer2/LoadControl.java",
"license": "gpl-2.0",
"size": 2655
} | [
"org.blaez.ziosgram.exoplayer2.source.TrackGroupArray",
"org.blaez.ziosgram.exoplayer2.trackselection.TrackSelectionArray"
] | import org.blaez.ziosgram.exoplayer2.source.TrackGroupArray; import org.blaez.ziosgram.exoplayer2.trackselection.TrackSelectionArray; | import org.blaez.ziosgram.exoplayer2.source.*; import org.blaez.ziosgram.exoplayer2.trackselection.*; | [
"org.blaez.ziosgram"
] | org.blaez.ziosgram; | 2,527,336 |
public void addMessage(JMQMessage message){
this.messages.add(message);
fireTableDataChanged();
} | void function(JMQMessage message){ this.messages.add(message); fireTableDataChanged(); } | /**
* Adds the message.
*
* @param message the message
*/ | Adds the message | addMessage | {
"repo_name": "dubasdey/MQQueueMonitor",
"path": "src/main/java/org/erc/qmm/explorer/MessageDataModel.java",
"license": "gpl-2.0",
"size": 3505
} | [
"org.erc.qmm.mq.JMQMessage"
] | import org.erc.qmm.mq.JMQMessage; | import org.erc.qmm.mq.*; | [
"org.erc.qmm"
] | org.erc.qmm; | 2,356,389 |
public static Path sortListing(FileSystem fs, Configuration conf, Path sourceListing)
throws IOException {
SequenceFile.Sorter sorter = new SequenceFile.Sorter(fs, Text.class,
CopyListingFileStatus.class, conf);
Path output = new Path(sourceListing.toString() + "_sorted");
if (fs.exists(outp... | static Path function(FileSystem fs, Configuration conf, Path sourceListing) throws IOException { SequenceFile.Sorter sorter = new SequenceFile.Sorter(fs, Text.class, CopyListingFileStatus.class, conf); Path output = new Path(sourceListing.toString() + STR); if (fs.exists(output)) { fs.delete(output, false); } sorter.so... | /**
* Sort sequence file containing FileStatus and Text as key and value respecitvely
*
* @param fs - File System
* @param conf - Configuration
* @param sourceListing - Source listing file
* @return Path of the sorted file. Is source file with _sorted appended to the name
* @throws IOException - An... | Sort sequence file containing FileStatus and Text as key and value respecitvely | sortListing | {
"repo_name": "Bizyroth/hadoop",
"path": "hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/util/DistCpUtils.java",
"license": "apache-2.0",
"size": 18891
} | [
"java.io.IOException",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.io.SequenceFile",
"org.apache.hadoop.io.Text",
"org.apache.hadoop.tools.CopyListingFileStatus"
] | import java.io.IOException; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.SequenceFile; import org.apache.hadoop.io.Text; import org.apache.hadoop.tools.CopyListingFileStatus; | import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.io.*; import org.apache.hadoop.tools.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 686,723 |
void removeLayoutFromRole(Layout layout, Role role) throws DotDataException, DotStateException;
| void removeLayoutFromRole(Layout layout, Role role) throws DotDataException, DotStateException; | /**
* Remove a layout from a role
* @throws DotDataException
* @throws DotStateException
*/ | Remove a layout from a role | removeLayoutFromRole | {
"repo_name": "dotCMS/core",
"path": "dotCMS/src/main/java/com/dotmarketing/business/RoleAPI.java",
"license": "gpl-3.0",
"size": 11338
} | [
"com.dotmarketing.exception.DotDataException"
] | import com.dotmarketing.exception.DotDataException; | import com.dotmarketing.exception.*; | [
"com.dotmarketing.exception"
] | com.dotmarketing.exception; | 2,487,429 |
public T executeQuery(Query q);
| T function(Query q); | /**
* Execute a query and return the first result.
* @param q the query to be executed
* @return the first result
*/ | Execute a query and return the first result | executeQuery | {
"repo_name": "NetzwerkWohnen/NWW",
"path": "src/main/java/org/nww/core/data/PersistentObjectRepository.java",
"license": "mit",
"size": 2386
} | [
"org.springframework.data.mongodb.core.query.Query"
] | import org.springframework.data.mongodb.core.query.Query; | import org.springframework.data.mongodb.core.query.*; | [
"org.springframework.data"
] | org.springframework.data; | 1,150,110 |
private void parseFileMappings(ParseState parser, int maxID)
throws SourceMapParseException, JSONException {
// ['d.js', 3, 78, 'foo']
// Intern the strings to save memory.
Interner<String> interner = Interners.newStrongInterner();
ImmutableList.Builder<SourceFile> mappingsBuilder = ImmutableLis... | void function(ParseState parser, int maxID) throws SourceMapParseException, JSONException { Interner<String> interner = Interners.newStrongInterner(); ImmutableList.Builder<SourceFile> mappingsBuilder = ImmutableList.builder(); ArrayList<Byte> lineOffsets = Lists.newArrayList(); ArrayList<Short> columns = Lists.newArra... | /**
* Parse the file mappings section of the source map file. This maps the
* ids to the filename, line number and colunm number in the original
* files.
* @param parser The parser to get the data from.
* @param maxID The maximum id found in the character mapping section.
*/ | Parse the file mappings section of the source map file. This maps the ids to the filename, line number and colunm number in the original files | parseFileMappings | {
"repo_name": "JonathanWalsh/Granule-Closure-Compiler",
"path": "src/com/google/debugging/sourcemap/SourceMapConsumerV1.java",
"license": "apache-2.0",
"size": 18903
} | [
"com.google.common.collect.ImmutableList",
"com.google.common.collect.Interner",
"com.google.common.collect.Interners",
"com.google.common.collect.Lists",
"java.util.ArrayList",
"org.json.JSONArray",
"org.json.JSONException"
] | import com.google.common.collect.ImmutableList; import com.google.common.collect.Interner; import com.google.common.collect.Interners; import com.google.common.collect.Lists; import java.util.ArrayList; import org.json.JSONArray; import org.json.JSONException; | import com.google.common.collect.*; import java.util.*; import org.json.*; | [
"com.google.common",
"java.util",
"org.json"
] | com.google.common; java.util; org.json; | 654,773 |
public void translate(int dx, int dy) {
rect.translate(dx, dy);
}
/**
* translates the location
*
* @param dis
* the {@link Distance}
| void function(int dx, int dy) { rect.translate(dx, dy); } /** * translates the location * * @param dis * the {@link Distance} | /**
* translates the location
*
* @param dx
* @param dy
*/ | translates the location | translate | {
"repo_name": "YouMe2/GameEngine",
"path": "GameEngine/src/de/uni_kiel/progOOproject17/view/abs/SimpleViewable.java",
"license": "gpl-3.0",
"size": 5726
} | [
"de.uni_kiel.progOOproject17.model.abs.Distance"
] | import de.uni_kiel.progOOproject17.model.abs.Distance; | import de.uni_kiel.*; | [
"de.uni_kiel"
] | de.uni_kiel; | 128,643 |
private static <A> List<Tag<A>> determineUsedTags(Collection<Tag<A>> allTags, Collection<String> messages) {
return allTags.stream()
.filter(tag -> messages.stream().anyMatch(msg -> msg.contains(tag.getName())))
.collect(Collectors.toList());
}
private static final clas... | static <A> List<Tag<A>> function(Collection<Tag<A>> allTags, Collection<String> messages) { return allTags.stream() .filter(tag -> messages.stream().anyMatch(msg -> msg.contains(tag.getName()))) .collect(Collectors.toList()); } private static final class TagValue { private final String tag; private final String value; ... | /**
* Determines which tags are used somewhere in the given list of messages.
*
* @param allTags all available tags
* @param messages the messages
* @param <A> argument type
* @return tags used at least once
*/ | Determines which tags are used somewhere in the given list of messages | determineUsedTags | {
"repo_name": "Maxetto/AuthMeReloaded",
"path": "src/main/java/fr/xephi/authme/util/lazytags/TagReplacer.java",
"license": "gpl-3.0",
"size": 3339
} | [
"java.util.Collection",
"java.util.List",
"java.util.stream.Collectors"
] | import java.util.Collection; import java.util.List; import java.util.stream.Collectors; | import java.util.*; import java.util.stream.*; | [
"java.util"
] | java.util; | 244,875 |
public static ChangeDataHolderEvent.ValueChange createChangeDataHolderEventValueChange(Game game, DataTransactionResult endResult, DataTransactionResult originalChanges, DataHolder targetHolder) {
Map<String, Object> values = Maps.newHashMap();
values.put("game", game);
values.put("endResult... | static ChangeDataHolderEvent.ValueChange function(Game game, DataTransactionResult endResult, DataTransactionResult originalChanges, DataHolder targetHolder) { Map<String, Object> values = Maps.newHashMap(); values.put("game", game); values.put(STR, endResult); values.put(STR, originalChanges); values.put(STR, targetHo... | /**
* AUTOMATICALLY GENERATED, DO NOT EDIT.
* Creates a new instance of
* {@link org.spongepowered.api.event.data.ChangeDataHolderEvent.ValueChange}.
*
* @param game The game
* @param endResult The end result
* @param originalChanges The original changes
* @param targetHolder Th... | AUTOMATICALLY GENERATED, DO NOT EDIT. Creates a new instance of <code>org.spongepowered.api.event.data.ChangeDataHolderEvent.ValueChange</code> | createChangeDataHolderEventValueChange | {
"repo_name": "jamierocks/SpongeAPI",
"path": "src/main/java/org/spongepowered/api/event/SpongeEventFactory.java",
"license": "mit",
"size": 196993
} | [
"com.google.common.collect.Maps",
"java.util.Map",
"org.spongepowered.api.Game",
"org.spongepowered.api.data.DataHolder",
"org.spongepowered.api.data.DataTransactionResult",
"org.spongepowered.api.event.data.ChangeDataHolderEvent"
] | import com.google.common.collect.Maps; import java.util.Map; import org.spongepowered.api.Game; import org.spongepowered.api.data.DataHolder; import org.spongepowered.api.data.DataTransactionResult; import org.spongepowered.api.event.data.ChangeDataHolderEvent; | import com.google.common.collect.*; import java.util.*; import org.spongepowered.api.*; import org.spongepowered.api.data.*; import org.spongepowered.api.event.data.*; | [
"com.google.common",
"java.util",
"org.spongepowered.api"
] | com.google.common; java.util; org.spongepowered.api; | 2,173,186 |
public IntegerAssert assertSize() {
return (IntegerAssert) org.assertj.core.api.Assertions.assertThat(get().size()).as("size");
} | IntegerAssert function() { return (IntegerAssert) org.assertj.core.api.Assertions.assertThat(get().size()).as("size"); } | /**
* Returns an assertion on the size of the list
*/ | Returns an assertion on the size of the list | assertSize | {
"repo_name": "hekonsek/fabric8",
"path": "components/kubernetes-assertions/src/main/java/io/fabric8/kubernetes/assertions/PodsAssert.java",
"license": "apache-2.0",
"size": 3024
} | [
"org.assertj.core.api.IntegerAssert"
] | import org.assertj.core.api.IntegerAssert; | import org.assertj.core.api.*; | [
"org.assertj.core"
] | org.assertj.core; | 1,260,978 |
private static boolean checkInternetConnection() {
return WedrApplication.isConnectionAvailable();
} | static boolean function() { return WedrApplication.isConnectionAvailable(); } | /**
* Check network availability to prevent network requests while offline
*
* @return true if connection is available
*/ | Check network availability to prevent network requests while offline | checkInternetConnection | {
"repo_name": "doodeec/wedr",
"path": "mobile/src/main/java/com/doodeec/weather/android/client/APIService.java",
"license": "mit",
"size": 5065
} | [
"com.doodeec.weather.android.WedrApplication"
] | import com.doodeec.weather.android.WedrApplication; | import com.doodeec.weather.android.*; | [
"com.doodeec.weather"
] | com.doodeec.weather; | 635,440 |
public static SoySyntaxException associateNode(SoySyntaxException sse, SoyNode node) {
TemplateNode template = node.getNearestAncestor(TemplateNode.class);
String templateName = (template != null) ? template.getTemplateNameForUserMsgs() : null;
return sse.associateMetaInfo(node.getSourceLocation(), null... | static SoySyntaxException function(SoySyntaxException sse, SoyNode node) { TemplateNode template = node.getNearestAncestor(TemplateNode.class); String templateName = (template != null) ? template.getTemplateNameForUserMsgs() : null; return sse.associateMetaInfo(node.getSourceLocation(), null, templateName); } | /**
* Adds meta info to an existing SoySyntaxException. The meta info is derived from a Soy node.
*
* <p> Important: Do not use outside of Soy code (treat as superpackage-private).
*
* @param sse The SoySyntaxException to add meta info to.
* @param node The node from which to derive the exception meta... | Adds meta info to an existing SoySyntaxException. The meta info is derived from a Soy node. Important: Do not use outside of Soy code (treat as superpackage-private) | associateNode | {
"repo_name": "core9/closure-templates",
"path": "src/impl/java/com/google/template/soy/soytree/SoySyntaxExceptionUtils.java",
"license": "apache-2.0",
"size": 2938
} | [
"com.google.template.soy.base.SoySyntaxException"
] | import com.google.template.soy.base.SoySyntaxException; | import com.google.template.soy.base.*; | [
"com.google.template"
] | com.google.template; | 551,151 |
public void write() throws IOException {
int numOfPads = 4 - ((m_numGlyphs + 2) % 4);
if (numOfPads == 4) {
numOfPads = 0;
}
int size = m_numGlyphs + 2 + numOfPads; // 2 comes from the ppem and max
// format version number
writeInt16(0);
// numbe... | void function() throws IOException { int numOfPads = 4 - ((m_numGlyphs + 2) % 4); if (numOfPads == 4) { numOfPads = 0; } int size = m_numGlyphs + 2 + numOfPads; writeInt16(0); writeInt16(getNumOfPixelSizes()); writeInt32(size); for (TTPixelSize pixelSize : getPixelSizes()) { writeUInt8(pixelSize.getPixel()); writeUInt8... | /**
* writes htmx record.
* The size of a device record is calculated to align it to 32bit boundary.
*/ | writes htmx record. The size of a device record is calculated to align it to 32bit boundary | write | {
"repo_name": "jindrapetrik/jpexs-decompiler",
"path": "libsrc/ttf/src/org/doubletype/ossa/truetype/HdmxWriter.java",
"license": "gpl-3.0",
"size": 3959
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,125,518 |
@Message(id = 265, value = "Could not load EJB class %s")
DeploymentUnitProcessingException failToLoadEjbClass(String ejbClassName, @Cause Throwable e); | @Message(id = 265, value = STR) DeploymentUnitProcessingException failToLoadEjbClass(String ejbClassName, @Cause Throwable e); | /**
* Creates an exception indicating it could not load EJB class
*
* @return a {@link DeploymentUnitProcessingException} for the error.
*/ | Creates an exception indicating it could not load EJB class | failToLoadEjbClass | {
"repo_name": "golovnin/wildfly",
"path": "ejb3/src/main/java/org/jboss/as/ejb3/logging/EjbLogger.java",
"license": "lgpl-2.1",
"size": 147179
} | [
"org.jboss.as.server.deployment.DeploymentUnitProcessingException",
"org.jboss.logging.annotations.Cause",
"org.jboss.logging.annotations.Message"
] | import org.jboss.as.server.deployment.DeploymentUnitProcessingException; import org.jboss.logging.annotations.Cause; import org.jboss.logging.annotations.Message; | import org.jboss.as.server.deployment.*; import org.jboss.logging.annotations.*; | [
"org.jboss.as",
"org.jboss.logging"
] | org.jboss.as; org.jboss.logging; | 1,150,636 |
public Collection<String> getAllowedTasks() throws Exception {
final String rawAllowedTasks = DomainServerImpl.getServerInstance()
.getConfigAttr(getUser(), ALLOWED_TASKS_CONFIG_ATTR, getConnectionContext());
final Collection<String> allowedTasks = new ArrayList<String>();
... | Collection<String> function() throws Exception { final String rawAllowedTasks = DomainServerImpl.getServerInstance() .getConfigAttr(getUser(), ALLOWED_TASKS_CONFIG_ATTR, getConnectionContext()); final Collection<String> allowedTasks = new ArrayList<String>(); if (rawAllowedTasks != null) { for (final String allowedTask... | /**
* DOCUMENT ME!
*
* @return DOCUMENT ME!
*
* @throws Exception DOCUMENT ME!
*/ | DOCUMENT ME | getAllowedTasks | {
"repo_name": "cismet/cids-custom-wuppertal-server",
"path": "src/main/java/de/cismet/cids/custom/utils/vermessungsunterlagen/VermessungsunterlagenHelper.java",
"license": "lgpl-3.0",
"size": 50741
} | [
"java.util.ArrayList",
"java.util.Arrays",
"java.util.Collection"
] | import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 1,585,657 |
private static synchronized void rebuildModel() {
Document doc = DocumentFactory.getInstance().createDocument();
generatedModel = coreModel.createCopy();
doc.add(generatedModel);
// Add in all overrides.
for (Element element : overrideModels.values()) {
// See if... | static synchronized void function() { Document doc = DocumentFactory.getInstance().createDocument(); generatedModel = coreModel.createCopy(); doc.add(generatedModel); for (Element element : overrideModels.values()) { Element appName = (Element)element.selectSingleNode(STR existingAppName.setText(appName.getText()); if ... | /**
* Rebuilds the generated model.
*/ | Rebuilds the generated model | rebuildModel | {
"repo_name": "coodeer/g3server",
"path": "src/java/org/jivesoftware/admin/AdminConsole.java",
"license": "apache-2.0",
"size": 21207
} | [
"org.dom4j.Document",
"org.dom4j.DocumentFactory",
"org.dom4j.Element"
] | import org.dom4j.Document; import org.dom4j.DocumentFactory; import org.dom4j.Element; | import org.dom4j.*; | [
"org.dom4j"
] | org.dom4j; | 363,724 |
protected void initPipe() {
try {
Object aPipe = ((XMultiServiceFactory)tParam.getMSF()).createInstance
("com.sun.star.io.Pipe");
Object istream = ((XMultiServiceFactory)tParam.getMSF()).createInstance
("com.sun.star.io.ObjectInputStream");
... | void function() { try { Object aPipe = ((XMultiServiceFactory)tParam.getMSF()).createInstance (STR); Object istream = ((XMultiServiceFactory)tParam.getMSF()).createInstance (STR); Object ostream = ((XMultiServiceFactory)tParam.getMSF()).createInstance (STR); Object mistream = ((XMultiServiceFactory)tParam.getMSF()).cre... | /**
* Creates the following stream scheme <code>
* ObjectOutputStream -> Pipe -> ObjectInputStream </code> for writing/reading
* object.
*/ | Creates the following stream scheme <code> ObjectOutputStream -> Pipe -> ObjectInputStream </code> for writing/reading object | initPipe | {
"repo_name": "qt-haiku/LibreOffice",
"path": "qadevOOo/tests/java/ifc/io/_XPersistObject.java",
"license": "gpl-3.0",
"size": 9668
} | [
"com.sun.star.io.XActiveDataSink",
"com.sun.star.io.XActiveDataSource",
"com.sun.star.io.XInputStream",
"com.sun.star.io.XObjectInputStream",
"com.sun.star.io.XObjectOutputStream",
"com.sun.star.io.XOutputStream",
"com.sun.star.lang.XMultiServiceFactory",
"com.sun.star.uno.UnoRuntime"
] | import com.sun.star.io.XActiveDataSink; import com.sun.star.io.XActiveDataSource; import com.sun.star.io.XInputStream; import com.sun.star.io.XObjectInputStream; import com.sun.star.io.XObjectOutputStream; import com.sun.star.io.XOutputStream; import com.sun.star.lang.XMultiServiceFactory; import com.sun.star.uno.UnoRu... | import com.sun.star.io.*; import com.sun.star.lang.*; import com.sun.star.uno.*; | [
"com.sun.star"
] | com.sun.star; | 1,443,028 |
List<ExpansionDoor> get_doors(); | List<ExpansionDoor> get_doors(); | /**
* Returns the list of doors of this room to neighbour expansion rooms
*/ | Returns the list of doors of this room to neighbour expansion rooms | get_doors | {
"repo_name": "andrasfuchs/BioBalanceDetector",
"path": "Tools/KiCad_FreeRouting/FreeRouting-miho-master/freerouting-master/src/main/java/eu/mihosoft/freerouting/autoroute/ExpansionRoom.java",
"license": "gpl-3.0",
"size": 1927
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 919,505 |
// NOTE, using 'TodayReservationList' class here, since it has
// all needed data, but
AllReservationListWithCustomer allReservationList = new AllReservationListWithCustomer();
ReservationDAO reservationDAO = new ReservationDAO();
// retrieving reservations from the DB
... | AllReservationListWithCustomer allReservationList = new AllReservationListWithCustomer(); ReservationDAO reservationDAO = new ReservationDAO(); allReservationList.setAllReservationList(reservationDAO.getAllReservationsWithCustomerData()); return allReservationList; } | /**
* Retrieves ALL reservations from the DB. Future enhancement - add limits
* by DateOfEntry - start / end date.
*
* @return an instance of java.lang.String
* @throws java.sql.SQLException
*/ | Retrieves ALL reservations from the DB. Future enhancement - add limits by DateOfEntry - start / end date | getAllReservations | {
"repo_name": "nikprix/hotel-backend",
"path": "src/main/java/com/mykolabs/hotel/resource/ReservationsResource.java",
"license": "gpl-3.0",
"size": 9391
} | [
"com.mykolabs.hotel.beansLists.AllReservationListWithCustomer",
"com.mykolabs.hotel.persistence.ReservationDAO"
] | import com.mykolabs.hotel.beansLists.AllReservationListWithCustomer; import com.mykolabs.hotel.persistence.ReservationDAO; | import com.mykolabs.hotel.*; import com.mykolabs.hotel.persistence.*; | [
"com.mykolabs.hotel"
] | com.mykolabs.hotel; | 1,050,913 |
@NotNull @Override public Future<?> submit(@NotNull Runnable task) {
throw new UnsupportedOperationException();
} | @NotNull @Override Future<?> function(@NotNull Runnable task) { throw new UnsupportedOperationException(); } | /**
* Operation not supported.
*/ | Operation not supported | submit | {
"repo_name": "vldpyatkov/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/util/StripedExecutor.java",
"license": "apache-2.0",
"size": 16919
} | [
"java.util.concurrent.Future",
"org.jetbrains.annotations.NotNull"
] | import java.util.concurrent.Future; import org.jetbrains.annotations.NotNull; | import java.util.concurrent.*; import org.jetbrains.annotations.*; | [
"java.util",
"org.jetbrains.annotations"
] | java.util; org.jetbrains.annotations; | 829,826 |
public ZActionResult tagMessage(String ids, String tagId, boolean tag) throws ServiceException {
return doAction(messageAction(tag ? "tag" : "!tag", ids).addAttribute(MailConstants.A_TAG, tagId));
} | ZActionResult function(String ids, String tagId, boolean tag) throws ServiceException { return doAction(messageAction(tag ? "tag" : "!tag", ids).addAttribute(MailConstants.A_TAG, tagId)); } | /** tag/untag message(s)
* @param ids ids of messages to tag
* @param tagId tag id to tag with
* @param tag tag/untag
* @return action result
* @throws ServiceException on error
*/ | tag/untag message(s) | tagMessage | {
"repo_name": "nico01f/z-pec",
"path": "ZimbraClient/src/java/com/zimbra/client/ZMailbox.java",
"license": "mit",
"size": 216305
} | [
"com.zimbra.common.service.ServiceException",
"com.zimbra.common.soap.MailConstants"
] | import com.zimbra.common.service.ServiceException; import com.zimbra.common.soap.MailConstants; | import com.zimbra.common.service.*; import com.zimbra.common.soap.*; | [
"com.zimbra.common"
] | com.zimbra.common; | 1,225,230 |
public PolicySetDefinitionsInner policySetDefinitions() {
return this.policySetDefinitions;
}
public PolicyClientImpl(ServiceClientCredentials credentials) {
this("https://management.azure.com", credentials);
}
public PolicyClientImpl(String baseUrl, ServiceClientCredenti... | PolicySetDefinitionsInner function() { return this.policySetDefinitions; } public PolicyClientImpl(ServiceClientCredentials credentials) { this("https: } public PolicyClientImpl(String baseUrl, ServiceClientCredentials credentials) { super(baseUrl, credentials); initialize(); } public PolicyClientImpl(RestClient restCl... | /**
* Gets the PolicySetDefinitionsInner object to access its operations.
* @return the PolicySetDefinitionsInner object.
*/ | Gets the PolicySetDefinitionsInner object to access its operations | policySetDefinitions | {
"repo_name": "navalev/azure-sdk-for-java",
"path": "sdk/policy/mgmt-v2018_03_01/src/main/java/com/microsoft/azure/management/policy/v2018_03_01/implementation/PolicyClientImpl.java",
"license": "mit",
"size": 7104
} | [
"com.microsoft.rest.RestClient",
"com.microsoft.rest.credentials.ServiceClientCredentials"
] | import com.microsoft.rest.RestClient; import com.microsoft.rest.credentials.ServiceClientCredentials; | import com.microsoft.rest.*; import com.microsoft.rest.credentials.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 748,156 |
EReference getUiMobileNavigationButton_TargetPageAlias(); | EReference getUiMobileNavigationButton_TargetPageAlias(); | /**
* Returns the meta object for the reference '{@link org.lunifera.ecview.semantic.uimodel.UiMobileNavigationButton#getTargetPageAlias <em>Target Page Alias</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Target Page Alias</em>'.
* @see org.lunifera... | Returns the meta object for the reference '<code>org.lunifera.ecview.semantic.uimodel.UiMobileNavigationButton#getTargetPageAlias Target Page Alias</code>'. | getUiMobileNavigationButton_TargetPageAlias | {
"repo_name": "lunifera/lunifera-ecview-addons",
"path": "org.lunifera.ecview.semantic.uimodel/src/org/lunifera/ecview/semantic/uimodel/UiModelPackage.java",
"license": "epl-1.0",
"size": 498897
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,419,594 |
public static void MarkFeedAsRead(final Context context,
final long feedId) {
ContentValues values = new ContentValues();
values.put(FeedItemSQL.COL_UNREAD, 0);
context.getContentResolver().update(FeedItemSQL.URI_FEED_ITEMS, values,
FeedItemSQL.COL_FEED + " IS ?",... | static void function(final Context context, final long feedId) { ContentValues values = new ContentValues(); values.put(FeedItemSQL.COL_UNREAD, 0); context.getContentResolver().update(FeedItemSQL.URI_FEED_ITEMS, values, FeedItemSQL.COL_FEED + STR, Util.LongsToStringArray(feedId)); } | /**
* Mark all items in a feed as read in the database.
*
* @param context
* @param feedId
*/ | Mark all items in a feed as read in the database | MarkFeedAsRead | {
"repo_name": "taimur97/Feeder",
"path": "app/src/main/java/com/nononsenseapps/feeder/db/RssContentProvider.java",
"license": "gpl-2.0",
"size": 19375
} | [
"android.content.ContentValues",
"android.content.Context"
] | import android.content.ContentValues; import android.content.Context; | import android.content.*; | [
"android.content"
] | android.content; | 663,434 |
public void removePackage(ActivationKey key, PackageName packageName,
PackageArch packageArch) {
key.removePackage(packageName, packageArch);
} | void function(ActivationKey key, PackageName packageName, PackageArch packageArch) { key.removePackage(packageName, packageArch); } | /**
* Removes all packages from the activation key that match the PackageName
* and PackageArch given.
* @param key Activation key to be acted upon
* @param packageName PackageName to remove
* @param packageArch PackageArch to remove
*/ | Removes all packages from the activation key that match the PackageName and PackageArch given | removePackage | {
"repo_name": "xkollar/spacewalk",
"path": "java/code/src/com/redhat/rhn/manager/token/ActivationKeyManager.java",
"license": "gpl-2.0",
"size": 23519
} | [
"com.redhat.rhn.domain.rhnpackage.PackageArch",
"com.redhat.rhn.domain.rhnpackage.PackageName",
"com.redhat.rhn.domain.token.ActivationKey"
] | import com.redhat.rhn.domain.rhnpackage.PackageArch; import com.redhat.rhn.domain.rhnpackage.PackageName; import com.redhat.rhn.domain.token.ActivationKey; | import com.redhat.rhn.domain.rhnpackage.*; import com.redhat.rhn.domain.token.*; | [
"com.redhat.rhn"
] | com.redhat.rhn; | 878,419 |
public Vector up(int i) {
return ((Vertex)(next.elementAt(i%next.size()))).point;
}
| Vector function(int i) { return ((Vertex)(next.elementAt(i%next.size()))).point; } | /**
* Returns the point on top of the point number i (from the next section).
* The next section has the same number of points or only one point.
* @param i
* @return point on top of the point number i
*/ | Returns the point on top of the point number i (from the next section). The next section has the same number of points or only one point | up | {
"repo_name": "wdiestel/arbaro",
"path": "src/net/sourceforge/arbaro/mesh/MeshSection.java",
"license": "gpl-2.0",
"size": 9364
} | [
"net.sourceforge.arbaro.transformation.Vector"
] | import net.sourceforge.arbaro.transformation.Vector; | import net.sourceforge.arbaro.transformation.*; | [
"net.sourceforge.arbaro"
] | net.sourceforge.arbaro; | 2,424,291 |
public FontRenderer getFontRenderer()
{
return this.fontRenderer;
} | FontRenderer function() { return this.fontRenderer; } | /**
* Returns the font renderer
*/ | Returns the font renderer | getFontRenderer | {
"repo_name": "HATB0T/RuneCraftery",
"path": "forge/mcp/src/minecraft/net/minecraft/client/renderer/entity/RenderManager.java",
"license": "lgpl-3.0",
"size": 20104
} | [
"net.minecraft.client.gui.FontRenderer"
] | import net.minecraft.client.gui.FontRenderer; | import net.minecraft.client.gui.*; | [
"net.minecraft.client"
] | net.minecraft.client; | 2,106,912 |
@Test
public void testOldAbstractIDDeserialization() throws Exception {
final long lowerPart = 42L;
final long upperPart = 1337L;
final AbstractID expectedAbstractId = new AbstractID(lowerPart, upperPart);
final String resourceName1 = "abstractID-with-toString-field";
try (final InputStream resourceAsStr... | void function() throws Exception { final long lowerPart = 42L; final long upperPart = 1337L; final AbstractID expectedAbstractId = new AbstractID(lowerPart, upperPart); final String resourceName1 = STR; try (final InputStream resourceAsStream = getClass().getClassLoader().getResourceAsStream(resourceName1)) { final Abs... | /**
* FLINK-10412 marks the {@link AbstractID#toString} field as transient. This tests ensures
* that {@link AbstractID} which have been serialized with the toString field can still
* be deserialized. For that purpose the files abstractID-with-toString-field and
* abstractID-with-toString-field-set have been cr... | FLINK-10412 marks the <code>AbstractID#toString</code> field as transient. This tests ensures that <code>AbstractID</code> which have been serialized with the toString field can still be deserialized. For that purpose the files abstractID-with-toString-field and abstractID-with-toString-field-set have been created with... | testOldAbstractIDDeserialization | {
"repo_name": "jinglining/flink",
"path": "flink-core/src/test/java/org/apache/flink/util/AbstractIDTest.java",
"license": "apache-2.0",
"size": 5625
} | [
"java.io.InputStream",
"org.hamcrest.Matchers",
"org.junit.Assert"
] | import java.io.InputStream; import org.hamcrest.Matchers; import org.junit.Assert; | import java.io.*; import org.hamcrest.*; import org.junit.*; | [
"java.io",
"org.hamcrest",
"org.junit"
] | java.io; org.hamcrest; org.junit; | 783,517 |
public int getBlockSize() {
return this.binaryBlockSize;
}
/**
* Creates or reinitializes a {@link BinaryEncoder} with the OutputStream
* provided as the destination for written data. If <i>reuse</i> is provided,
* an attempt will be made to reconfigure <i>reuse</i> rather than construct a
* ne... | int function() { return this.binaryBlockSize; } /** * Creates or reinitializes a {@link BinaryEncoder} with the OutputStream * provided as the destination for written data. If <i>reuse</i> is provided, * an attempt will be made to reconfigure <i>reuse</i> rather than construct a * new instance, but this is not guarante... | /**
* Returns this factory's configured default block buffer size.
* {@link BinaryEncoder} instances created with
* #blockingBinaryEncoder(OutputStream, BinaryEncoder)
* will have block buffers of this size.
* <p/>
* @see #configureBlockSize(int)
* @see #blockingBinaryEncoder(OutputStream, Binary... | Returns this factory's configured default block buffer size. <code>BinaryEncoder</code> instances created with #blockingBinaryEncoder(OutputStream, BinaryEncoder) will have block buffers of this size. | getBlockSize | {
"repo_name": "Asana/mypipe",
"path": "avro/lang/java/avro/src/main/java/org/apache/avro/io/EncoderFactory.java",
"license": "apache-2.0",
"size": 14099
} | [
"java.io.OutputStream"
] | import java.io.OutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 2,132,255 |
public void setProgramPulseDuration(int timeFactor) throws OneWireIOException, OneWireException {
throw new OneWireException("Program pulse delivery not supported by this adapter type");
}
/**
* Sets the 1-Wire Network voltage to eprom programming level. This method
* takes a time parame... | void function(int timeFactor) throws OneWireIOException, OneWireException { throw new OneWireException(STR); } /** * Sets the 1-Wire Network voltage to eprom programming level. This method * takes a time parameter that indicates whether the power delivery should * be done immediately, or after certain conditions have b... | /**
* Sets the duration for providing a program pulse on the 1-Wire Network.
* This method takes a time parameter that indicates the program pulse
* length when the method startProgramPulse().
* <p>
* Note: to avoid getting an exception, use the canDeliverPower() method to
* check it's ava... | Sets the duration for providing a program pulse on the 1-Wire Network. This method takes a time parameter that indicates the program pulse length when the method startProgramPulse(). Note: to avoid getting an exception, use the canDeliverPower() method to check it's availability. | setProgramPulseDuration | {
"repo_name": "marcass/dz-1",
"path": "dz3-owapi/src/main/java/com/dalsemi/onewire/adapter/DSPortAdapter.java",
"license": "gpl-3.0",
"size": 68982
} | [
"com.dalsemi.onewire.OneWireException"
] | import com.dalsemi.onewire.OneWireException; | import com.dalsemi.onewire.*; | [
"com.dalsemi.onewire"
] | com.dalsemi.onewire; | 819,704 |
public static FlumeNode getInstance() {
if (instance == null) {
instance = new FlumeNode(FlumeConfiguration.get());
}
return instance;
} | static FlumeNode function() { if (instance == null) { instance = new FlumeNode(FlumeConfiguration.get()); } return instance; } | /**
* This hook makes it easy for web apps and jsps to get the current FlumeNode
* instance. This is used to test the FlumeNode related jsps.
*/ | This hook makes it easy for web apps and jsps to get the current FlumeNode instance. This is used to test the FlumeNode related jsps | getInstance | {
"repo_name": "yongkun/flume-0.9.3-cdh3u0-rakuten",
"path": "src/java/com/cloudera/flume/agent/FlumeNode.java",
"license": "apache-2.0",
"size": 28670
} | [
"com.cloudera.flume.conf.FlumeConfiguration"
] | import com.cloudera.flume.conf.FlumeConfiguration; | import com.cloudera.flume.conf.*; | [
"com.cloudera.flume"
] | com.cloudera.flume; | 2,407,575 |
private int getFacetCount(UIData data, String name) {
int n = 0;
Iterator kids = getColumns(data);
while (kids.hasNext()) {
UIComponent kid = (UIComponent) kids.next();
if (kid.getFacet(name) != null) {
n++;
}
}
return (n);
}
| int function(UIData data, String name) { int n = 0; Iterator kids = getColumns(data); while (kids.hasNext()) { UIComponent kid = (UIComponent) kids.next(); if (kid.getFacet(name) != null) { n++; } } return (n); } | /**
* <p>Return the number of child <code>UIColumn</code> components
* nested in the specified <code>UIData</code> that have a facet with
* the specified name.</p>
*
* @param data <code>UIData</code> component being analyzed
* @param name Name of the facet being analyzed
*/ | Return the number of child <code>UIColumn</code> components nested in the specified <code>UIData</code> that have a facet with the specified name | getFacetCount | {
"repo_name": "willkara/sakai",
"path": "gradebook/app/ui/src/java/org/sakaiproject/tool/gradebook/jsf/spreadsheetUI/SpreadsheetUIRenderer.java",
"license": "apache-2.0",
"size": 12410
} | [
"java.util.Iterator",
"javax.faces.component.UIComponent",
"javax.faces.component.UIData"
] | import java.util.Iterator; import javax.faces.component.UIComponent; import javax.faces.component.UIData; | import java.util.*; import javax.faces.component.*; | [
"java.util",
"javax.faces"
] | java.util; javax.faces; | 1,385,457 |
private void finish(boolean finishTask) {
if (mParent == null) {
int resultCode;
Intent resultData;
synchronized (this) {
resultCode = mResultCode;
resultData = mResultData;
}
if (false) Log.v(TAG, "Finishing self: t... | void function(boolean finishTask) { if (mParent == null) { int resultCode; Intent resultData; synchronized (this) { resultCode = mResultCode; resultData = mResultData; } if (false) Log.v(TAG, STR + mToken); try { if (resultData != null) { resultData.prepareToLeaveProcess(); } if (ActivityManagerNative.getDefault() .fin... | /**
* Finishes the current activity and specifies whether to remove the task associated with this
* activity.
*/ | Finishes the current activity and specifies whether to remove the task associated with this activity | finish | {
"repo_name": "miswenwen/My_bird_work",
"path": "Bird_work/我的项目/AccessControl/源码Activity中要修改的.java",
"license": "apache-2.0",
"size": 282692
} | [
"android.content.Intent",
"android.os.RemoteException",
"android.util.Log"
] | import android.content.Intent; import android.os.RemoteException; import android.util.Log; | import android.content.*; import android.os.*; import android.util.*; | [
"android.content",
"android.os",
"android.util"
] | android.content; android.os; android.util; | 1,689,689 |
public int av_write_trailer(Pointer<AVFormatContext > s) {
return av_write_trailer(Pointer.getPeer(s));
} | int function(Pointer<AVFormatContext > s) { return av_write_trailer(Pointer.getPeer(s)); } | /**
* Write the stream trailer to an output media file and free the<br>
* file private data.<br>
* May only be called after a successful call to avformat_write_header.<br>
* @param s media file handle<br>
* @return 0 if OK, AVERROR_xxx on error<br>
* Original signature : <code>int av_write... | Write the stream trailer to an output media file and free the file private data. May only be called after a successful call to avformat_write_header | av_write_trailer | {
"repo_name": "mutars/java_libav",
"path": "wrapper/src/main/java/com/mutar/libav/bridge/avformat/AvformatLibrary.java",
"license": "gpl-2.0",
"size": 136321
} | [
"org.bridj.Pointer"
] | import org.bridj.Pointer; | import org.bridj.*; | [
"org.bridj"
] | org.bridj; | 1,917,333 |
@Test
public void testConvertToAnswers() {
for (final File file : files) {
final Answers answers = service.convertDocumentToAnswer(file).execute();
assertNotNull(answers);
assertNotNull(answers.getAnswerUnits());
assertTrue(!answers.getAnswerUnits().isEmpty());
}
} | void function() { for (final File file : files) { final Answers answers = service.convertDocumentToAnswer(file).execute(); assertNotNull(answers); assertNotNull(answers.getAnswerUnits()); assertTrue(!answers.getAnswerUnits().isEmpty()); } } | /**
* Test Convert to answers unit.
*/ | Test Convert to answers unit | testConvertToAnswers | {
"repo_name": "supunucsc/java-sdk",
"path": "document-conversion/src/test/java/com/ibm/watson/developer_cloud/document_conversion/v1/DocumentConversionIT.java",
"license": "apache-2.0",
"size": 7456
} | [
"com.ibm.watson.developer_cloud.document_conversion.v1.model.Answers",
"java.io.File",
"org.junit.Assert"
] | import com.ibm.watson.developer_cloud.document_conversion.v1.model.Answers; import java.io.File; import org.junit.Assert; | import com.ibm.watson.developer_cloud.document_conversion.v1.model.*; import java.io.*; import org.junit.*; | [
"com.ibm.watson",
"java.io",
"org.junit"
] | com.ibm.watson; java.io; org.junit; | 1,283,772 |
EClass getCarRentalAgency(); | EClass getCarRentalAgency(); | /**
* Returns the meta object for class '{@link com.opcoach.training.carrental.CarRentalAgency <em>Car Rental Agency</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Car Rental Agency</em>'.
* @see com.opcoach.training.carrental.CarRentalAgency
* @generated
... | Returns the meta object for class '<code>com.opcoach.training.carrental.CarRentalAgency Car Rental Agency</code>'. | getCarRentalAgency | {
"repo_name": "opcoach/training",
"path": "EMF/com.opcoach.training.carrental/src/com/opcoach/training/carrental/CarrentalPackage.java",
"license": "epl-1.0",
"size": 23780
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,764,360 |
@Override
public void executeCqs(String regionName) throws CqException {
try {
getCqService().executeAllRegionCqs(regionName);
} catch (CqException cqe) {
if (logger.isDebugEnabled()) {
logger.debug("Unable to execute cqs on the specified region. Error :{}", cqe.getMessage(),
... | void function(String regionName) throws CqException { try { getCqService().executeAllRegionCqs(regionName); } catch (CqException cqe) { if (logger.isDebugEnabled()) { logger.debug(STR, cqe.getMessage(), cqe); } } } | /**
* Starts execution of all the continuous queries registered on the specified region for this
* client. This is complementary method to stopCQs().
*
* @see QueryService#stopCqs()
*
* @throws CqException if failure to stop CQs.
*/ | Starts execution of all the continuous queries registered on the specified region for this client. This is complementary method to stopCQs() | executeCqs | {
"repo_name": "smgoller/geode",
"path": "geode-core/src/main/java/org/apache/geode/cache/query/internal/DefaultQueryService.java",
"license": "apache-2.0",
"size": 39448
} | [
"org.apache.geode.cache.query.CqException"
] | import org.apache.geode.cache.query.CqException; | import org.apache.geode.cache.query.*; | [
"org.apache.geode"
] | org.apache.geode; | 1,536,924 |
public int findRowIndex(Element elem) {
Element r = findRow(elem);
return r != null ? r.getPropertyInt("rowIndex") : -1;
}
| int function(Element elem) { Element r = findRow(elem); return r != null ? r.getPropertyInt(STR) : -1; } | /**
* Returns the row index.
*
* @param elem
* the row or child of the row element
* @return the index
*/ | Returns the row index | findRowIndex | {
"repo_name": "ezoengine/GKEngine",
"path": "main/gxt/src/com/extjs/gxt/ui/client/widget/grid/GridView.java",
"license": "gpl-3.0",
"size": 62850
} | [
"com.google.gwt.dom.client.Element"
] | import com.google.gwt.dom.client.Element; | import com.google.gwt.dom.client.*; | [
"com.google.gwt"
] | com.google.gwt; | 2,138,686 |
protected void refreshCollator() {
if (!Locale.getDefault().equals(currentLocale)) {
currentLocale = Locale.getDefault();
collator = Collator.getInstance();
}
} | void function() { if (!Locale.getDefault().equals(currentLocale)) { currentLocale = Locale.getDefault(); collator = Collator.getInstance(); } } | /**
* Subclasses must call this before filtering to guarantee the
* correct collator!
*/ | Subclasses must call this before filtering to guarantee the correct collator | refreshCollator | {
"repo_name": "charlycoste/TreeD",
"path": "src/org/jdesktop/swingx/decorator/Sorter.java",
"license": "gpl-2.0",
"size": 6291
} | [
"java.text.Collator",
"java.util.Locale"
] | import java.text.Collator; import java.util.Locale; | import java.text.*; import java.util.*; | [
"java.text",
"java.util"
] | java.text; java.util; | 2,811,796 |
protected void emit_RaiseStatement___LeftParenthesisKeyword_2_0_RightParenthesisKeyword_2_2__q(EObject semanticObject, ISynNavigable transition, List<INode> nodes) {
acceptNodes(transition, nodes);
}
| void function(EObject semanticObject, ISynNavigable transition, List<INode> nodes) { acceptNodes(transition, nodes); } | /**
* Ambiguous syntax:
* ('(' ')')?
*
* This ambiguous syntax occurs at:
* exception=[ExceptionDeclaration|ScopedName] (ambiguity) ';' (rule end)
* exception=[ExceptionDeclaration|ScopedName] (ambiguity) ';' pragmas+=Pragma
* exception=[ExceptionDeclaration|ScopedName] (ambiguity) (rule e... | Ambiguous syntax: ('(' ')')? This ambiguous syntax occurs at: exception=[ExceptionDeclaration|ScopedName] (ambiguity) ';' (rule end) exception=[ExceptionDeclaration|ScopedName] (ambiguity) ';' pragmas+=Pragma exception=[ExceptionDeclaration|ScopedName] (ambiguity) (rule end) | emit_RaiseStatement___LeftParenthesisKeyword_2_0_RightParenthesisKeyword_2_2__q | {
"repo_name": "TypeFox/bridgepoint",
"path": "src/org.xtuml.bp.xtext.masl.parent/org.xtuml.bp.xtext.masl/src-gen/org/xtuml/bp/xtext/masl/serializer/MASLSyntacticSequencer.java",
"license": "apache-2.0",
"size": 52664
} | [
"java.util.List",
"org.eclipse.emf.ecore.EObject",
"org.eclipse.xtext.nodemodel.INode",
"org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider"
] | import java.util.List; import org.eclipse.emf.ecore.EObject; import org.eclipse.xtext.nodemodel.INode; import org.eclipse.xtext.serializer.analysis.ISyntacticSequencerPDAProvider; | import java.util.*; import org.eclipse.emf.ecore.*; import org.eclipse.xtext.nodemodel.*; import org.eclipse.xtext.serializer.analysis.*; | [
"java.util",
"org.eclipse.emf",
"org.eclipse.xtext"
] | java.util; org.eclipse.emf; org.eclipse.xtext; | 2,302,858 |
public void draw(Graphics2D g)
{
g.drawImage(mask, (int) getX(), (int) getY(), (int) getWidth(),
(int) getHeight(), null);
} | void function(Graphics2D g) { g.drawImage(mask, (int) getX(), (int) getY(), (int) getWidth(), (int) getHeight(), null); } | /**
* Draws the image.
* @see #draw(Graphics2D)
*/ | Draws the image | draw | {
"repo_name": "simleo/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/util/roi/figures/MeasureMaskFigure.java",
"license": "gpl-2.0",
"size": 7742
} | [
"java.awt.Graphics2D"
] | import java.awt.Graphics2D; | import java.awt.*; | [
"java.awt"
] | java.awt; | 610,210 |
public void startActivity(com.mateuszkoslacz.moviper.presentersdispatcher.ActivityStarter activityStarter) {
int viewId = new Random().nextInt();
activityStarter.getIntent().putExtra(EXTRA_VIEW_ID, viewId);
mPresenters.put(viewId, activityStarter.getPresenter());
activityStarter.getC... | void function(com.mateuszkoslacz.moviper.presentersdispatcher.ActivityStarter activityStarter) { int viewId = new Random().nextInt(); activityStarter.getIntent().putExtra(EXTRA_VIEW_ID, viewId); mPresenters.put(viewId, activityStarter.getPresenter()); activityStarter.getContext().startActivity(activityStarter.getIntent... | /**
* It starts an {@link Activity} with selected presenter configured in a way provided in the
* given {@link com.mateuszkoslacz.moviper.presentersdispatcher.ActivityStarter}.<p>
*
* Given {@link Activity} has to be passive (from package {@link com.mateuszkoslacz.moviper.base.view.activity.autoinje... | It starts an <code>Activity</code> with selected presenter configured in a way provided in the given <code>com.mateuszkoslacz.moviper.presentersdispatcher.ActivityStarter</code>. Given <code>Activity</code> has to be passive (from package <code>com.mateuszkoslacz.moviper.base.view.activity.autoinject.passive</code>), a... | startActivity | {
"repo_name": "mkoslacz/Moviper",
"path": "moviper-presentersdispatcher/src/main/java/com/mateuszkoslacz/moviper/presentersdispatcher/MoviperPresentersDispatcher.java",
"license": "apache-2.0",
"size": 3660
} | [
"android.app.Fragment",
"com.hannesdorfmann.mosby.mvp.MvpFragment",
"com.mateuszkoslacz.moviper.iface.view.ViperView",
"java.util.Random"
] | import android.app.Fragment; import com.hannesdorfmann.mosby.mvp.MvpFragment; import com.mateuszkoslacz.moviper.iface.view.ViperView; import java.util.Random; | import android.app.*; import com.hannesdorfmann.mosby.mvp.*; import com.mateuszkoslacz.moviper.iface.view.*; import java.util.*; | [
"android.app",
"com.hannesdorfmann.mosby",
"com.mateuszkoslacz.moviper",
"java.util"
] | android.app; com.hannesdorfmann.mosby; com.mateuszkoslacz.moviper; java.util; | 561,881 |
public void buildIndex() throws XPathExpressionException {
Element element = getDocumentElement();
CustomFunctions.setHashcodeMap(indexHashcodes(element));
Map<String, Map<String, List<Node>>> map = new HashMap<String, Map<String, List<Node>>>();
indexElement(element, map);
k... | void function() throws XPathExpressionException { Element element = getDocumentElement(); CustomFunctions.setHashcodeMap(indexHashcodes(element)); Map<String, Map<String, List<Node>>> map = new HashMap<String, Map<String, List<Node>>>(); indexElement(element, map); keyMap = map; } | /**
* Build the index for key lookups.
*
* @throws javax.xml.xpath.XPathExpressionException
* For errors.
*/ | Build the index for key lookups | buildIndex | {
"repo_name": "pfstrack/eldamo",
"path": "src/main/java/xdb/dom/impl/DocumentImpl.java",
"license": "mit",
"size": 17726
} | [
"java.util.HashMap",
"java.util.List",
"java.util.Map",
"javax.xml.xpath.XPathExpressionException",
"org.w3c.dom.Element",
"org.w3c.dom.Node"
] | import java.util.HashMap; import java.util.List; import java.util.Map; import javax.xml.xpath.XPathExpressionException; import org.w3c.dom.Element; import org.w3c.dom.Node; | import java.util.*; import javax.xml.xpath.*; import org.w3c.dom.*; | [
"java.util",
"javax.xml",
"org.w3c.dom"
] | java.util; javax.xml; org.w3c.dom; | 791,181 |
public void registerPlugin(final EncogPluginBase plugin) {
// is it not a general plugin?
if (plugin.getPluginServiceType()
!= EncogPluginBase.TYPE_SERVICE) {
if (plugin.getPluginServiceType()
== EncogPluginBase.TYPE_LOGGING) {
// remove the old logging plugin
if (this.loggingPlugin != null... | void function(final EncogPluginBase plugin) { if (plugin.getPluginServiceType() != EncogPluginBase.TYPE_SERVICE) { if (plugin.getPluginServiceType() == EncogPluginBase.TYPE_LOGGING) { if (this.loggingPlugin != null) { this.plugins.remove(this.loggingPlugin); } this.loggingPlugin = (EncogPluginLogging1) plugin; } } this... | /**
* Register a plugin. If this plugin provides a core service, such as
* calculation or logging, this will remove the old plugin.
*
* @param plugin
* The plugin to register.
*/ | Register a plugin. If this plugin provides a core service, such as calculation or logging, this will remove the old plugin | registerPlugin | {
"repo_name": "rudolfbono/NAIM",
"path": "src/main/java/org/encog/Encog.java",
"license": "gpl-3.0",
"size": 7184
} | [
"org.encog.plugin.EncogPluginBase",
"org.encog.plugin.EncogPluginLogging1"
] | import org.encog.plugin.EncogPluginBase; import org.encog.plugin.EncogPluginLogging1; | import org.encog.plugin.*; | [
"org.encog.plugin"
] | org.encog.plugin; | 853,411 |
T createShard(ShardRouting shardRouting, RecoveryState recoveryState, PeerRecoveryTargetService recoveryTargetService,
PeerRecoveryTargetService.RecoveryListener recoveryListener, RepositoriesService repositoriesService,
Consumer<IndexShard.ShardFailure> onShardFailur... | T createShard(ShardRouting shardRouting, RecoveryState recoveryState, PeerRecoveryTargetService recoveryTargetService, PeerRecoveryTargetService.RecoveryListener recoveryListener, RepositoriesService repositoriesService, Consumer<IndexShard.ShardFailure> onShardFailure, Consumer<ShardId> globalCheckpointSyncer) throws ... | /**
* Creates shard for the specified shard routing and starts recovery,
*/ | Creates shard for the specified shard routing and starts recovery | createShard | {
"repo_name": "kalimatas/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/indices/cluster/IndicesClusterStateService.java",
"license": "apache-2.0",
"size": 46028
} | [
"java.io.IOException",
"java.util.function.Consumer",
"org.elasticsearch.cluster.routing.ShardRouting",
"org.elasticsearch.index.shard.IndexShard",
"org.elasticsearch.index.shard.ShardId",
"org.elasticsearch.indices.recovery.PeerRecoveryTargetService",
"org.elasticsearch.indices.recovery.RecoveryState",... | import java.io.IOException; import java.util.function.Consumer; import org.elasticsearch.cluster.routing.ShardRouting; import org.elasticsearch.index.shard.IndexShard; import org.elasticsearch.index.shard.ShardId; import org.elasticsearch.indices.recovery.PeerRecoveryTargetService; import org.elasticsearch.indices.reco... | import java.io.*; import java.util.function.*; import org.elasticsearch.cluster.routing.*; import org.elasticsearch.index.shard.*; import org.elasticsearch.indices.recovery.*; import org.elasticsearch.repositories.*; | [
"java.io",
"java.util",
"org.elasticsearch.cluster",
"org.elasticsearch.index",
"org.elasticsearch.indices",
"org.elasticsearch.repositories"
] | java.io; java.util; org.elasticsearch.cluster; org.elasticsearch.index; org.elasticsearch.indices; org.elasticsearch.repositories; | 1,843,585 |
void enterAnnotationTypeElementRest(@NotNull JavaParser.AnnotationTypeElementRestContext ctx);
void exitAnnotationTypeElementRest(@NotNull JavaParser.AnnotationTypeElementRestContext ctx); | void enterAnnotationTypeElementRest(@NotNull JavaParser.AnnotationTypeElementRestContext ctx); void exitAnnotationTypeElementRest(@NotNull JavaParser.AnnotationTypeElementRestContext ctx); | /**
* Exit a parse tree produced by {@link JavaParser#annotationTypeElementRest}.
* @param ctx the parse tree
*/ | Exit a parse tree produced by <code>JavaParser#annotationTypeElementRest</code> | exitAnnotationTypeElementRest | {
"repo_name": "hgkmail/HelloJava",
"path": "src/cn/hgk/hellojava/JavaListener.java",
"license": "gpl-2.0",
"size": 38976
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 1,615,811 |
@NotNull
public Builder withText(@NotNull String text) {
PARAM.text = text;
return this;
} | Builder function(@NotNull String text) { PARAM.text = text; return this; } | /**
* Set the {@link #text} value.
* @param text The text to be used to query elements.
* @return {@link Builder} instance.
*/ | Set the <code>#text</code> value | withText | {
"repo_name": "protoman92/XTestKit",
"path": "src/main/java/org/swiften/xtestkit/base/element/locator/TextParam.java",
"license": "apache-2.0",
"size": 4308
} | [
"org.jetbrains.annotations.NotNull"
] | import org.jetbrains.annotations.NotNull; | import org.jetbrains.annotations.*; | [
"org.jetbrains.annotations"
] | org.jetbrains.annotations; | 2,654,256 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.