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
@Override public AbstractTripleStore getContainer() { return (AbstractTripleStore) super.getContainer(); }
AbstractTripleStore function() { return (AbstractTripleStore) super.getContainer(); }
/** * Strengthens the return type. */
Strengthens the return type
getContainer
{ "repo_name": "wikimedia/wikidata-query-blazegraph", "path": "bigdata-core/bigdata-rdf/src/java/com/bigdata/rdf/lexicon/LexiconRelation.java", "license": "gpl-2.0", "size": 129126 }
[ "com.bigdata.rdf.store.AbstractTripleStore" ]
import com.bigdata.rdf.store.AbstractTripleStore;
import com.bigdata.rdf.store.*;
[ "com.bigdata.rdf" ]
com.bigdata.rdf;
152,450
@Test public void testHasNameOrId() { Key key; // Complete with name, no ancestor key = makeKey("bird", "finch").build(); assertTrue(isValidKey(key)); // Complete with id, no ancestor key = makeKey("bird", 123).build(); assertTrue(isValidKey(key)); // Incomplete, no ancestor ke...
void function() { Key key; key = makeKey("bird", "finch").build(); assertTrue(isValidKey(key)); key = makeKey("bird", 123).build(); assertTrue(isValidKey(key)); key = makeKey("bird").build(); assertFalse(isValidKey(key)); key = makeKey("bird", "owl").build(); key = makeKey(key, "bird", STR).build(); assertTrue(isValidK...
/** * Test the detection of complete and incomplete keys. */
Test the detection of complete and incomplete keys
testHasNameOrId
{ "repo_name": "amitsela/incubator-beam", "path": "sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/datastore/DatastoreV1Test.java", "license": "apache-2.0", "size": 40238 }
[ "com.google.datastore.v1.Key", "com.google.datastore.v1.client.DatastoreHelper", "org.junit.Assert" ]
import com.google.datastore.v1.Key; import com.google.datastore.v1.client.DatastoreHelper; import org.junit.Assert;
import com.google.datastore.v1.*; import com.google.datastore.v1.client.*; import org.junit.*;
[ "com.google.datastore", "org.junit" ]
com.google.datastore; org.junit;
634,628
public void generateSpawnPoints(Generator generator, World world, int spawnCount, int regionDiameter, int minimalDistanceBetweenTwoPoints, double xCenter, double zCenter) throws CannotGenerateSpawnPointsException { generateSpawnPoints(generator.getInstance(), world, spawnCount, regionDiameter, minimalDi...
void function(Generator generator, World world, int spawnCount, int regionDiameter, int minimalDistanceBetweenTwoPoints, double xCenter, double zCenter) throws CannotGenerateSpawnPointsException { generateSpawnPoints(generator.getInstance(), world, spawnCount, regionDiameter, minimalDistanceBetweenTwoPoints, xCenter, z...
/** * Generates spawn points with the given generator. * * @param generator The generator to use. * @param world The world where the spawn points will be generated. * @param spawnCount The number of spawn points to generate. ...
Generates spawn points with the given generator
generateSpawnPoints
{ "repo_name": "AmauryCarrade/UHPlugin", "path": "src/main/java/eu/carrade/amaury/UHCReloaded/spawns/SpawnsManager.java", "license": "gpl-3.0", "size": 12421 }
[ "eu.carrade.amaury.UHCReloaded", "org.bukkit.World" ]
import eu.carrade.amaury.UHCReloaded; import org.bukkit.World;
import eu.carrade.amaury.*; import org.bukkit.*;
[ "eu.carrade.amaury", "org.bukkit" ]
eu.carrade.amaury; org.bukkit;
297,245
public Publishable get(final String key) { // TODO: Should the get and set of info of places have the complexity // of the agents? No. The agents info fields can be printed in the // CVS, hence the need for locking. This isn't so for places. if (!info.containsKey(key)) { throw new InfoUndefinedException(k...
Publishable function(final String key) { if (!info.containsKey(key)) { throw new InfoUndefinedException(key); } return info.get(key); }
/** * Get a value from the place info field, identified by key. * * @param key * the key to retrieve * @return the Publishable value associated to that key */
Get a value from the place info field, identified by key
get
{ "repo_name": "bhenne/MoSP-Siafu", "path": "Siafu/src/de/uni_hannover/dcsec/siafu/model/Place.java", "license": "gpl-2.0", "size": 15690 }
[ "de.nec.nle.siafu.exceptions.InfoUndefinedException", "de.nec.nle.siafu.types.Publishable" ]
import de.nec.nle.siafu.exceptions.InfoUndefinedException; import de.nec.nle.siafu.types.Publishable;
import de.nec.nle.siafu.exceptions.*; import de.nec.nle.siafu.types.*;
[ "de.nec.nle" ]
de.nec.nle;
831,075
@Override public File getReportOutputDirectory() { return reportOutputDirectory; }
File function() { return reportOutputDirectory; }
/** * Returns the report output directory. * * @return the report output directory */
Returns the report output directory
getReportOutputDirectory
{ "repo_name": "jeremylong/DependencyCheck", "path": "maven/src/main/java/org/owasp/dependencycheck/maven/BaseDependencyCheckMojo.java", "license": "apache-2.0", "size": 109532 }
[ "java.io.File" ]
import java.io.File;
import java.io.*;
[ "java.io" ]
java.io;
1,677,990
@Deprecated protected void validateSecurity(PathInfo pathInfo, HttpServletRequest request, HttpServletResponse response) throws HttpErrorException { }
void function(PathInfo pathInfo, HttpServletRequest request, HttpServletResponse response) throws HttpErrorException { }
/** * Validates access to REST Web functionality for the given {@code pathInfo}. * @param pathInfo path for which to check security * @param request HTTP Servlet request, additional security information can be added to request attributes * @param response HTTP Servlet response * @throws HttpErr...
Validates access to REST Web functionality for the given pathInfo
validateSecurity
{ "repo_name": "Devexperts/QD", "path": "dxfeed-webservice-impl/src/main/java/com/dxfeed/webservice/rest/EventsServlet.java", "license": "mpl-2.0", "size": 4721 }
[ "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.*;
[ "javax.servlet" ]
javax.servlet;
2,019,431
@Nullable public net.minecraft.pathfinding.PathNodeType getAiPathNodeType(IBlockState state, IBlockAccess world, BlockPos pos) { return isBurning(world, pos) ? net.minecraft.pathfinding.PathNodeType.DAMAGE_FIRE : null; }
net.minecraft.pathfinding.PathNodeType function(IBlockState state, IBlockAccess world, BlockPos pos) { return isBurning(world, pos) ? net.minecraft.pathfinding.PathNodeType.DAMAGE_FIRE : null; }
/** * Get the {@code PathNodeType} for this block. Return {@code null} for vanilla behavior. * * @return the PathNodeType */
Get the PathNodeType for this block. Return null for vanilla behavior
getAiPathNodeType
{ "repo_name": "TheGreatAndPowerfulWeegee/wipunknown", "path": "build/tmp/recompileMc/sources/net/minecraft/block/Block.java", "license": "gpl-3.0", "size": 129758 }
[ "net.minecraft.block.state.IBlockState", "net.minecraft.util.math.BlockPos", "net.minecraft.world.IBlockAccess" ]
import net.minecraft.block.state.IBlockState; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockAccess;
import net.minecraft.block.state.*; import net.minecraft.util.math.*; import net.minecraft.world.*;
[ "net.minecraft.block", "net.minecraft.util", "net.minecraft.world" ]
net.minecraft.block; net.minecraft.util; net.minecraft.world;
1,160,060
final void writeTo(OutputStream out, int sourceOffset, int numberToWrite) throws IOException { checkRange(sourceOffset, sourceOffset + numberToWrite, size()); if (numberToWrite > 0) { writeToInternal(out, sourceOffset, numberToWrite); } }
final void writeTo(OutputStream out, int sourceOffset, int numberToWrite) throws IOException { checkRange(sourceOffset, sourceOffset + numberToWrite, size()); if (numberToWrite > 0) { writeToInternal(out, sourceOffset, numberToWrite); } }
/** * Writes a specified part of this byte string to an output stream. * * @param out the output stream to which to write the data. * @param sourceOffset offset within these bytes * @param numberToWrite number of bytes to write * @throws IOException if an I/O error occurs. * @throws IndexOutOfBound...
Writes a specified part of this byte string to an output stream
writeTo
{ "repo_name": "endlessm/chromium-browser", "path": "third_party/protobuf/java/core/src/main/java/com/google/protobuf/ByteString.java", "license": "bsd-3-clause", "size": 58186 }
[ "java.io.IOException", "java.io.OutputStream" ]
import java.io.IOException; import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
1,782,163
@org.junit.Test public void testOldTimestamp() throws Exception { Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG); WSSecHeader secHeader = new WSSecHeader(); secHeader.insertSecurityHeader(doc); WSSecTimestamp timestamp = new WSSecTimestamp(); ...
@org.junit.Test void function() throws Exception { Document doc = SOAPUtil.toSOAPPart(SOAPUtil.SAMPLE_SOAP_MSG); WSSecHeader secHeader = new WSSecHeader(); secHeader.insertSecurityHeader(doc); WSSecTimestamp timestamp = new WSSecTimestamp(); Document createdDoc = timestamp.build(doc, secHeader); if (LOG.isDebugEnabled(...
/** * This is a test for processing an "old" Timestamp, i.e. one with a "Created" element that is * out of date */
This is a test for processing an "old" Timestamp, i.e. one with a "Created" element that is out of date
testOldTimestamp
{ "repo_name": "fatfredyy/wss4j-ecc", "path": "src/test/java/org/apache/ws/security/message/TimestampTest.java", "license": "apache-2.0", "size": 27486 }
[ "org.apache.ws.security.WSSecurityException", "org.apache.ws.security.common.SOAPUtil", "org.w3c.dom.Document" ]
import org.apache.ws.security.WSSecurityException; import org.apache.ws.security.common.SOAPUtil; import org.w3c.dom.Document;
import org.apache.ws.security.*; import org.apache.ws.security.common.*; import org.w3c.dom.*;
[ "org.apache.ws", "org.w3c.dom" ]
org.apache.ws; org.w3c.dom;
2,727,425
public void send(SlingHttpServletResponse response) throws IOException { PrintWriter writer = response.getWriter(); if (serviceDocumentation == null) { writer .append("<p>Sorry, no service documentation has been provided by the developer.</p>"); } else { writer.append("<h3>Descripti...
void function(SlingHttpServletResponse response) throws IOException { PrintWriter writer = response.getWriter(); if (serviceDocumentation == null) { writer .append(STR); } else { writer.append(STR); sendDoc(writer, serviceDocumentation.description()); if (serviceDocumentation.description().length == 0) { sendDoc(writer...
/** * Documentation of the service. * * * @param response * the current response. * @throws IOException * of there were issues writing to the response. */
Documentation of the service
send
{ "repo_name": "dylanswartz/nakamura", "path": "bundles/doc/src/main/java/org/sakaiproject/nakamura/doc/servlet/ServletDocumentation.java", "license": "apache-2.0", "size": 12941 }
[ "java.io.IOException", "java.io.PrintWriter", "org.apache.sling.api.SlingHttpServletResponse", "org.sakaiproject.nakamura.api.doc.ServiceBinding", "org.sakaiproject.nakamura.api.doc.ServiceDocumentation", "org.sakaiproject.nakamura.api.doc.ServiceExtension", "org.sakaiproject.nakamura.api.doc.ServiceMet...
import java.io.IOException; import java.io.PrintWriter; import org.apache.sling.api.SlingHttpServletResponse; import org.sakaiproject.nakamura.api.doc.ServiceBinding; import org.sakaiproject.nakamura.api.doc.ServiceDocumentation; import org.sakaiproject.nakamura.api.doc.ServiceExtension; import org.sakaiproject.nakamur...
import java.io.*; import org.apache.sling.api.*; import org.sakaiproject.nakamura.api.doc.*;
[ "java.io", "org.apache.sling", "org.sakaiproject.nakamura" ]
java.io; org.apache.sling; org.sakaiproject.nakamura;
499,402
public static Method getMethodFromPropertyName(Class<?> clazz, String methodName) { Method method; GetMethodFromPropertyName action = GetMethodFromPropertyName.action( clazz, methodName ); if ( System.getSecurityManager() != null ) { method = AccessController.doPrivileged( action ); } else { method =...
static Method function(Class<?> clazz, String methodName) { Method method; GetMethodFromPropertyName action = GetMethodFromPropertyName.action( clazz, methodName ); if ( System.getSecurityManager() != null ) { method = AccessController.doPrivileged( action ); } else { method = action.run(); } return method; }
/** * Returns the method with the specified property name or {@code null} if it does not exist. This method will * prepend 'is' and 'get' to the property name and capitalize the first letter. * * @param clazz The class to check. * @param methodName The property name. * * @return Returns the method with t...
Returns the method with the specified property name or null if it does not exist. This method will prepend 'is' and 'get' to the property name and capitalize the first letter
getMethodFromPropertyName
{ "repo_name": "porcelli-forks/dashbuilder", "path": "dashbuilder-shared/dashbuilder-hibernate-validator/src/main/java/org/hibernate/validator/util/ReflectionHelper.java", "license": "apache-2.0", "size": 22299 }
[ "java.lang.reflect.Method", "java.security.AccessController", "org.hibernate.validator.util.privilegedactions.GetMethodFromPropertyName" ]
import java.lang.reflect.Method; import java.security.AccessController; import org.hibernate.validator.util.privilegedactions.GetMethodFromPropertyName;
import java.lang.reflect.*; import java.security.*; import org.hibernate.validator.util.privilegedactions.*;
[ "java.lang", "java.security", "org.hibernate.validator" ]
java.lang; java.security; org.hibernate.validator;
902,111
public static <T> void invokeAll(List<Callable<T>> callables, long timeout, TimeUnit unit) throws TimeoutException, Exception { ExecutorService service = Executors.newCachedThreadPool(); try { List<Future<T>> results = service.invokeAll(callables, timeout, unit); service.shutdownNow(); ...
static <T> void function(List<Callable<T>> callables, long timeout, TimeUnit unit) throws TimeoutException, Exception { ExecutorService service = Executors.newCachedThreadPool(); try { List<Future<T>> results = service.invokeAll(callables, timeout, unit); service.shutdownNow(); propagateExceptions(results); for (Future...
/** * Executes the given callables, waiting for them to complete (or time out). If a callable throws * an exception, that exception will be re-thrown from this method. * * @param callables the callables to execute * @param timeout the maximum time to wait * @param unit the time unit of the timeout arg...
Executes the given callables, waiting for them to complete (or time out). If a callable throws an exception, that exception will be re-thrown from this method
invokeAll
{ "repo_name": "maboelhassan/alluxio", "path": "core/common/src/main/java/alluxio/util/CommonUtils.java", "license": "apache-2.0", "size": 21994 }
[ "java.util.List", "java.util.concurrent.Callable", "java.util.concurrent.ExecutorService", "java.util.concurrent.Executors", "java.util.concurrent.Future", "java.util.concurrent.TimeUnit", "java.util.concurrent.TimeoutException" ]
import java.util.List; import java.util.concurrent.Callable; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException;
import java.util.*; import java.util.concurrent.*;
[ "java.util" ]
java.util;
2,338,878
//TODO why is this allowed? @Test public void testBuilderRAMissing() { final FXForwardTrade.Builder builder = FXForwardTrade.builder(); builder.tradeDate(NOW); builder.payCurrency(Currency.AUD); builder.forwardDate(FORWARD); builder.correlationId(ExternalId.of("A", "B")); builder.counterpa...
void function() { final FXForwardTrade.Builder builder = FXForwardTrade.builder(); builder.tradeDate(NOW); builder.payCurrency(Currency.AUD); builder.forwardDate(FORWARD); builder.correlationId(ExternalId.of("A", "B")); builder.counterparty(STR); builder.payAmount(1100000d); builder.receiveCurrency(Currency.NZD); build...
/** * Tests that the receive amount can be null. */
Tests that the receive amount can be null
testBuilderRAMissing
{ "repo_name": "McLeodMoores/starling", "path": "projects/starling-client/src/test/java/com/mcleodmoores/starling/client/portfolio/FXForwardTradeTest.java", "license": "apache-2.0", "size": 17069 }
[ "com.opengamma.id.ExternalId", "com.opengamma.util.money.Currency" ]
import com.opengamma.id.ExternalId; import com.opengamma.util.money.Currency;
import com.opengamma.id.*; import com.opengamma.util.money.*;
[ "com.opengamma.id", "com.opengamma.util" ]
com.opengamma.id; com.opengamma.util;
2,134,261
try { controller.abort(); } catch (NoActionException ex) { JAlgoGUIConnector.getInstance().showErrorMessage(ex.getMessage()); } gui.algorithmAborted(); }
try { controller.abort(); } catch (NoActionException ex) { JAlgoGUIConnector.getInstance().showErrorMessage(ex.getMessage()); } gui.algorithmAborted(); }
/** * Performs the action. */
Performs the action
actionPerformed
{ "repo_name": "jurkov/j-algo-mod", "path": "src/org/jalgo/module/avl/gui/event/AbortAction.java", "license": "gpl-2.0", "size": 2749 }
[ "org.jalgo.main.gui.JAlgoGUIConnector", "org.jalgo.module.avl.NoActionException" ]
import org.jalgo.main.gui.JAlgoGUIConnector; import org.jalgo.module.avl.NoActionException;
import org.jalgo.main.gui.*; import org.jalgo.module.avl.*;
[ "org.jalgo.main", "org.jalgo.module" ]
org.jalgo.main; org.jalgo.module;
1,424,929
static void setIsArchived(Partition partition, boolean state, int level) { Map<String, String> params = partition.getParameters(); if (state) { params.put(hive_metastoreConstants.IS_ARCHIVED, "true"); params.put(ArchiveUtils.ARCHIVING_LEVEL, Integer.toString(level)); } else { params.remo...
static void setIsArchived(Partition partition, boolean state, int level) { Map<String, String> params = partition.getParameters(); if (state) { params.put(hive_metastoreConstants.IS_ARCHIVED, "true"); params.put(ArchiveUtils.ARCHIVING_LEVEL, Integer.toString(level)); } else { params.remove(hive_metastoreConstants.IS_AR...
/** * Sets archiving flag locally; it has to be pushed into metastore. * @param partition partition to set flag * @param state desired state of IS_ARCHIVED flag * @param level desired level for state == true, anything for false */
Sets archiving flag locally; it has to be pushed into metastore
setIsArchived
{ "repo_name": "vineetgarg02/hive", "path": "ql/src/java/org/apache/hadoop/hive/ql/ddl/table/storage/archive/AlterTableArchiveUtils.java", "license": "apache-2.0", "size": 4555 }
[ "java.util.Map", "org.apache.hadoop.hive.ql.exec.ArchiveUtils", "org.apache.hadoop.hive.ql.metadata.Partition" ]
import java.util.Map; import org.apache.hadoop.hive.ql.exec.ArchiveUtils; import org.apache.hadoop.hive.ql.metadata.Partition;
import java.util.*; import org.apache.hadoop.hive.ql.exec.*; import org.apache.hadoop.hive.ql.metadata.*;
[ "java.util", "org.apache.hadoop" ]
java.util; org.apache.hadoop;
1,747,904
protected RegionFactory<?, ?> configureRegion(RegionFactory<?, ?> regionFactory) { return regionFactory; }
RegionFactory<?, ?> function(RegionFactory<?, ?> regionFactory) { return regionFactory; }
/** * Override as needed to add to the configuration, such as regionFactory.setOffHeap(boolean). */
Override as needed to add to the configuration, such as regionFactory.setOffHeap(boolean)
configureRegion
{ "repo_name": "smgoller/geode", "path": "geode-core/src/distributedTest/java/org/apache/geode/internal/cache/wan/asyncqueue/SerialEventListenerDistributedTest.java", "license": "apache-2.0", "size": 14347 }
[ "org.apache.geode.cache.RegionFactory" ]
import org.apache.geode.cache.RegionFactory;
import org.apache.geode.cache.*;
[ "org.apache.geode" ]
org.apache.geode;
690,737
public static MavenPlugin registerPlugin(MavenProject pom, String groupId, String artifactId, String version, boolean overrideVersion) { MavenPlugin plugin = getPlugin(pom, groupId, artifactId); if (plugin == null) { plugin = new MavenPlugin(groupId, artifactId, version); } else if (overrideVersion...
static MavenPlugin function(MavenProject pom, String groupId, String artifactId, String version, boolean overrideVersion) { MavenPlugin plugin = getPlugin(pom, groupId, artifactId); if (plugin == null) { plugin = new MavenPlugin(groupId, artifactId, version); } else if (overrideVersion) { plugin.setVersion(version); } ...
/** * Registers a plugin in a project pom * <p/> * <p>Adds the plugin if it does not exist or amend its version if it does exist and specified</p> * * @param pom the project pom * @param groupId the plugin group id * @param artifactId the plugin artifact id * @param version the plugin version ...
Registers a plugin in a project pom Adds the plugin if it does not exist or amend its version if it does exist and specified
registerPlugin
{ "repo_name": "teryk/sonarqube", "path": "sonar-plugin-api/src/main/java/org/sonar/api/batch/maven/MavenPlugin.java", "license": "lgpl-3.0", "size": 13400 }
[ "org.apache.maven.project.MavenProject" ]
import org.apache.maven.project.MavenProject;
import org.apache.maven.project.*;
[ "org.apache.maven" ]
org.apache.maven;
486,153
public static Generator<Vector4I> create32() { return new Vector4IGenerator(PrimitiveGenerators.integers( -2147483648, -2147483647 )); }
static Generator<Vector4I> function() { return new Vector4IGenerator(PrimitiveGenerators.integers( -2147483648, -2147483647 )); }
/** * Create a generator initialized with a default component generator that * produces values in the range {@code [-2147483648, 2147483647]}. * * @return A generator */
Create a generator initialized with a default component generator that produces values in the range [-2147483648, 2147483647]
create32
{ "repo_name": "io7m/jtensors", "path": "com.io7m.jtensors.generators/src/main/java/com/io7m/jtensors/generators/Vector4IGenerator.java", "license": "isc", "size": 3188 }
[ "com.io7m.jtensors.core.unparameterized.vectors.Vector4I", "net.java.quickcheck.Generator", "net.java.quickcheck.generator.PrimitiveGenerators" ]
import com.io7m.jtensors.core.unparameterized.vectors.Vector4I; import net.java.quickcheck.Generator; import net.java.quickcheck.generator.PrimitiveGenerators;
import com.io7m.jtensors.core.unparameterized.vectors.*; import net.java.quickcheck.*; import net.java.quickcheck.generator.*;
[ "com.io7m.jtensors", "net.java.quickcheck" ]
com.io7m.jtensors; net.java.quickcheck;
96,444
@GET @Path("/topology/{id}/profiling/start/{host-port}/{timeout}") @AuthNimbusOp(value = "setWorkerProfiler", needsTopoId = true) @Produces("application/json") public Response getTopologyProfilingStart(@PathParam("id") String id, @PathParam("host-port") ...
@Path(STR) @AuthNimbusOp(value = STR, needsTopoId = true) @Produces(STR) Response function(@PathParam("id") String id, @PathParam(STR) String hostPort, @PathParam(STR) String timeout, @QueryParam(callbackParameterName) String callback) throws TException { try (NimbusClient nimbusClient = NimbusClient.getConfiguredClien...
/** * /api/v1/topology/:id/profiling/start/:host-port/:timeout -> profiling start. */
api/v1/topology/:id/profiling/start/:host-port/:timeout -> profiling start
getTopologyProfilingStart
{ "repo_name": "kishorvpatil/incubator-storm", "path": "storm-webapp/src/main/java/org/apache/storm/daemon/ui/resources/StormApiResource.java", "license": "apache-2.0", "size": 30891 }
[ "javax.ws.rs.Path", "javax.ws.rs.PathParam", "javax.ws.rs.Produces", "javax.ws.rs.QueryParam", "javax.ws.rs.core.Response", "org.apache.storm.daemon.ui.UIHelpers", "org.apache.storm.thrift.TException", "org.apache.storm.utils.NimbusClient" ]
import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.QueryParam; import javax.ws.rs.core.Response; import org.apache.storm.daemon.ui.UIHelpers; import org.apache.storm.thrift.TException; import org.apache.storm.utils.NimbusClient;
import javax.ws.rs.*; import javax.ws.rs.core.*; import org.apache.storm.daemon.ui.*; import org.apache.storm.thrift.*; import org.apache.storm.utils.*;
[ "javax.ws", "org.apache.storm" ]
javax.ws; org.apache.storm;
2,365,194
private void writeConnectionFactory(Definition def, Writer out, int indent) throws IOException { writeWithIndent(out, indent, "\n"); writeWithIndent(out, indent, "public Object createConnectionFactory(ConnectionManager cxManager) throws ResourceException"); writeLeftCurlyBracket(out...
void function(Definition def, Writer out, int indent) throws IOException { writeWithIndent(out, indent, "\n"); writeWithIndent(out, indent, STR); writeLeftCurlyBracket(out, indent); writeLogging(def, out, indent + 1, "trace", STR, STR); writeIndent(out, indent + 1); if (def.getMcfDefs().get(getNumOfMcf()).isUseCciConne...
/** * Output ConnectionFactory method * * @param def definition * @param out Writer * @param indent space number * @throws IOException ioException */
Output ConnectionFactory method
writeConnectionFactory
{ "repo_name": "jandsu/ironjacamar", "path": "codegenerator/src/main/java/org/ironjacamar/codegenerator/code/McfCodeGen.java", "license": "epl-1.0", "size": 14039 }
[ "java.io.IOException", "java.io.Writer", "org.ironjacamar.codegenerator.Definition" ]
import java.io.IOException; import java.io.Writer; import org.ironjacamar.codegenerator.Definition;
import java.io.*; import org.ironjacamar.codegenerator.*;
[ "java.io", "org.ironjacamar.codegenerator" ]
java.io; org.ironjacamar.codegenerator;
730,259
private void copyFromRfs(String folder) throws CmsException { // get the corresponding folder in the FS File[] res; File fsFile = getFileInRfs(folder); // first of all, test if this folder existis in the VFS. If not, create it try { m_cms.readFolder(translate(fol...
void function(String folder) throws CmsException { File[] res; File fsFile = getFileInRfs(folder); try { m_cms.readFolder(translate(folder), CmsResourceFilter.IGNORE_EXPIRATION); } catch (CmsException e) { String foldername = translate(folder); m_report.print(org.opencms.report.Messages.get().container( org.opencms.rep...
/** * Copys all resources from the FS which are not existing in the VFS yet. <p> * * @param folder the folder in the VFS to be synchronized with the FS * @throws CmsException if something goes wrong */
Copys all resources from the FS which are not existing in the VFS yet.
copyFromRfs
{ "repo_name": "ggiudetti/opencms-core", "path": "src/org/opencms/synchronize/CmsSynchronize.java", "license": "lgpl-2.1", "size": 45432 }
[ "java.io.File", "java.util.Iterator", "org.opencms.file.CmsResource", "org.opencms.file.CmsResourceFilter", "org.opencms.file.types.CmsResourceTypeFolder", "org.opencms.main.CmsException" ]
import java.io.File; import java.util.Iterator; import org.opencms.file.CmsResource; import org.opencms.file.CmsResourceFilter; import org.opencms.file.types.CmsResourceTypeFolder; import org.opencms.main.CmsException;
import java.io.*; import java.util.*; import org.opencms.file.*; import org.opencms.file.types.*; import org.opencms.main.*;
[ "java.io", "java.util", "org.opencms.file", "org.opencms.main" ]
java.io; java.util; org.opencms.file; org.opencms.main;
1,589,378
return new StringSettingDefinition().setGroup(BASE_GROUP).setOrder(SettingDefinitionProvider.ORDER_1) .setKey(USERNAME_KEY).setTitle(USERNAME_TITLE); } // // protected StringSettingDefinition createUsernameDefinition() { // return new // StringSettingDefinition().setGroup(BASE_GROU...
return new StringSettingDefinition().setGroup(BASE_GROUP).setOrder(SettingDefinitionProvider.ORDER_1) .setKey(USERNAME_KEY).setTitle(USERNAME_TITLE); }
/** * Create settings definition for username * * @return Username settings definition */
Create settings definition for username
createUsernameDefinition
{ "repo_name": "nuest/SOS", "path": "hibernate/datasource/common/src/main/java/org/n52/sos/ds/datasource/AbstractHibernateDatasource.java", "license": "gpl-2.0", "size": 37956 }
[ "org.n52.sos.config.SettingDefinitionProvider", "org.n52.sos.config.settings.StringSettingDefinition" ]
import org.n52.sos.config.SettingDefinitionProvider; import org.n52.sos.config.settings.StringSettingDefinition;
import org.n52.sos.config.*; import org.n52.sos.config.settings.*;
[ "org.n52.sos" ]
org.n52.sos;
982,422
public void renameImports(Map<String, String> nameMapping) throws VilException { Set<JavaImport> imports = this.imports(); for (Map.Entry<String, String> entry : nameMapping.entrySet()) { for (JavaImport javaImport : imports) { if (javaImport.getName().contains(entry.getK...
void function(Map<String, String> nameMapping) throws VilException { Set<JavaImport> imports = this.imports(); for (Map.Entry<String, String> entry : nameMapping.entrySet()) { for (JavaImport javaImport : imports) { if (javaImport.getName().contains(entry.getKey())) { javaImport.rename(javaImport.getName().replace(entr...
/** * Renames all imports in this Java artifact as stated by * <code>nameMapping</code>. Nothing happens, if package names cannot be * found. However, the caller is responsible for potential name clashes due * to the execution of this operation. * * @param nameMapping * pa...
Renames all imports in this Java artifact as stated by <code>nameMapping</code>. Nothing happens, if package names cannot be found. However, the caller is responsible for potential name clashes due to the execution of this operation
renameImports
{ "repo_name": "SSEHUB/EASyProducer", "path": "Plugins/Instantiation/Instantiator.Java/src/net/ssehub/easy/instantiation/java/artifacts/JavaFileArtifact.java", "license": "apache-2.0", "size": 27862 }
[ "java.util.Map", "net.ssehub.easy.instantiation.core.model.common.VilException", "net.ssehub.easy.instantiation.core.model.vilTypes.Set" ]
import java.util.Map; import net.ssehub.easy.instantiation.core.model.common.VilException; import net.ssehub.easy.instantiation.core.model.vilTypes.Set;
import java.util.*; import net.ssehub.easy.instantiation.core.model.*; import net.ssehub.easy.instantiation.core.model.common.*;
[ "java.util", "net.ssehub.easy" ]
java.util; net.ssehub.easy;
2,072,263
@Nullable public WorkbookFunctionResult post() throws ClientException { return send(HttpMethod.POST, body); }
WorkbookFunctionResult function() throws ClientException { return send(HttpMethod.POST, body); }
/** * Invokes the method and returns the result * @return result of the method invocation * @throws ClientException an exception occurs if there was an error while the request was sent */
Invokes the method and returns the result
post
{ "repo_name": "microsoftgraph/msgraph-sdk-java", "path": "src/main/java/com/microsoft/graph/requests/WorkbookFunctionsGammaLn_PreciseRequest.java", "license": "mit", "size": 3056 }
[ "com.microsoft.graph.core.ClientException", "com.microsoft.graph.http.HttpMethod", "com.microsoft.graph.models.WorkbookFunctionResult" ]
import com.microsoft.graph.core.ClientException; import com.microsoft.graph.http.HttpMethod; import com.microsoft.graph.models.WorkbookFunctionResult;
import com.microsoft.graph.core.*; import com.microsoft.graph.http.*; import com.microsoft.graph.models.*;
[ "com.microsoft.graph" ]
com.microsoft.graph;
1,127,894
private int getVPTotalValue (MoveContext context) { return this.getVPTotalValue(this.getAllCards()); }
int function (MoveContext context) { return this.getVPTotalValue(this.getAllCards()); }
/** * Function calculates the total amount of VPs for all the cards in the deck. * * @param context context * @return amount of VPs in the deck */
Function calculates the total amount of VPs for all the cards in the deck
getVPTotalValue
{ "repo_name": "rykerwilliams/androminion", "path": "vdom/src/com/vdom/players/VDomPlayerPatrick.java", "license": "lgpl-3.0", "size": 78090 }
[ "com.vdom.core.MoveContext" ]
import com.vdom.core.MoveContext;
import com.vdom.core.*;
[ "com.vdom.core" ]
com.vdom.core;
1,146,082
private InternalRequest createRequest( AbstractBceRequest bceRequest, HttpMethodName httpMethod, String... pathVariables) { List<String> path = new ArrayList<String>(); if (pathVariables != null) { for (String pathVariable : pathVariables) { path.add(pathVari...
InternalRequest function( AbstractBceRequest bceRequest, HttpMethodName httpMethod, String... pathVariables) { List<String> path = new ArrayList<String>(); if (pathVariables != null) { for (String pathVariable : pathVariables) { path.add(pathVariable); } } URI uri = HttpUtils.appendUri(this.getEndpoint(), path.toArray(...
/** * Creates and initializes a new request object for the specified resource. * * @param bceRequest The original BCE request created by the user. * @param httpMethod The HTTP method to use when sending the request. * @param pathVariables The optional variables used in the URI path. ...
Creates and initializes a new request object for the specified resource
createRequest
{ "repo_name": "baidubce/bce-sdk-java", "path": "src/main/java/com/baidubce/services/bes/BesClient.java", "license": "apache-2.0", "size": 26806 }
[ "com.baidubce.auth.SignOptions", "com.baidubce.http.HttpMethodName", "com.baidubce.internal.InternalRequest", "com.baidubce.model.AbstractBceRequest", "com.baidubce.util.HttpUtils", "java.util.ArrayList", "java.util.Arrays", "java.util.HashSet", "java.util.List" ]
import com.baidubce.auth.SignOptions; import com.baidubce.http.HttpMethodName; import com.baidubce.internal.InternalRequest; import com.baidubce.model.AbstractBceRequest; import com.baidubce.util.HttpUtils; import java.util.ArrayList; import java.util.Arrays; import java.util.HashSet; import java.util.List;
import com.baidubce.auth.*; import com.baidubce.http.*; import com.baidubce.internal.*; import com.baidubce.model.*; import com.baidubce.util.*; import java.util.*;
[ "com.baidubce.auth", "com.baidubce.http", "com.baidubce.internal", "com.baidubce.model", "com.baidubce.util", "java.util" ]
com.baidubce.auth; com.baidubce.http; com.baidubce.internal; com.baidubce.model; com.baidubce.util; java.util;
2,651,498
public List distinct( String key , DBObject query, ReadPreference readPrefs ){ DBObject c = BasicDBObjectBuilder.start() .add( "distinct" , getName() ) .add( "key" , key ) .add( "query" , query ) .get(); CommandResult res = _db.command( c, getOptions(...
List function( String key , DBObject query, ReadPreference readPrefs ){ DBObject c = BasicDBObjectBuilder.start() .add( STR , getName() ) .add( "key" , key ) .add( "query" , query ) .get(); CommandResult res = _db.command( c, getOptions(), readPrefs ); res.throwOnError(); return (List)(res.get( STR )); }
/** * Find the distinct values for a specified field across a collection and returns the results in an array. * * @param key Specifies the field for which to return the distinct values * @param query specifies the selection query to determine the subset of documents from which to retrieve ...
Find the distinct values for a specified field across a collection and returns the results in an array
distinct
{ "repo_name": "antonnik/code-classifier", "path": "naive_bayes/resources/java/DBCollection.java", "license": "apache-2.0", "size": 88389 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
291,208
EClass getEnergyPriceCurve();
EClass getEnergyPriceCurve();
/** * Returns the meta object for class '{@link CIM.IEC61970.Informative.MarketOperations.EnergyPriceCurve <em>Energy Price Curve</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Energy Price Curve</em>'. * @see CIM.IEC61970.Informative.MarketOperations.Energy...
Returns the meta object for class '<code>CIM.IEC61970.Informative.MarketOperations.EnergyPriceCurve Energy Price Curve</code>'.
getEnergyPriceCurve
{ "repo_name": "georghinkel/ttc2017smartGrids", "path": "solutions/ModelJoin/src/main/java/CIM/IEC61970/Informative/MarketOperations/MarketOperationsPackage.java", "license": "mit", "size": 688294 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,431,663
private boolean setSicProps( InstrOfferingConfig config, SchedulingSubpart subpart, SimpleItypeConfig sic ) { int mnlpc = subpart.getMinClassLimit(); int mxlpc = subpart.getMaxClassLimit(); int mpw = subpart.getMinutesPerWk().intValue(); i...
boolean function( InstrOfferingConfig config, SchedulingSubpart subpart, SimpleItypeConfig sic ) { int mnlpc = subpart.getMinClassLimit(); int mxlpc = subpart.getMaxClassLimit(); int mpw = subpart.getMinutesPerWk().intValue(); int numClasses = subpart.getNumClasses(); int numRooms = subpart.getMaxRooms(); float rc = su...
/** * Sets the class limit, min per wk and num classes properties * @param config InstrOfferingConfig object * @param subpart Scheduling subpart * @return SimpleItypeConfig object representing the subpart */
Sets the class limit, min per wk and num classes properties
setSicProps
{ "repo_name": "rafati/unitime", "path": "JavaSource/org/unitime/timetable/action/InstructionalOfferingConfigEditAction.java", "license": "apache-2.0", "size": 86679 }
[ "org.unitime.timetable.model.InstrOfferingConfig", "org.unitime.timetable.model.SchedulingSubpart", "org.unitime.timetable.model.SimpleItypeConfig", "org.unitime.timetable.security.rights.Right", "org.unitime.timetable.util.Constants" ]
import org.unitime.timetable.model.InstrOfferingConfig; import org.unitime.timetable.model.SchedulingSubpart; import org.unitime.timetable.model.SimpleItypeConfig; import org.unitime.timetable.security.rights.Right; import org.unitime.timetable.util.Constants;
import org.unitime.timetable.model.*; import org.unitime.timetable.security.rights.*; import org.unitime.timetable.util.*;
[ "org.unitime.timetable" ]
org.unitime.timetable;
945,251
public static Pair<Descriptor,String> fromFilename(File directory, String name) { // tokenize the filename StringTokenizer st = new StringTokenizer(name, String.valueOf(separator)); String nexttok; // all filenames must start with keyspace and column family String ksname...
static Pair<Descriptor,String> function(File directory, String name) { StringTokenizer st = new StringTokenizer(name, String.valueOf(separator)); String nexttok; String ksname = st.nextToken(); String cfname = st.nextToken(); nexttok = st.nextToken(); boolean temporary = false; if (nexttok.equals(SSTable.TEMPFILE_MARKE...
/** * Filename of the form "<ksname>-<cfname>-[tmp-][<version>-]<gen>-<component>" * * @param directory The directory of the SSTable files * @param name The name of the SSTable file * * @return A Descriptor for the SSTable, and the Component remainder. */
Filename of the form "--[tmp-][-]-"
fromFilename
{ "repo_name": "placrosse/ACaZoo", "path": "src/java/org/apache/cassandra/io/sstable/Descriptor.java", "license": "apache-2.0", "size": 10587 }
[ "java.io.File", "java.util.StringTokenizer", "org.apache.cassandra.utils.Pair" ]
import java.io.File; import java.util.StringTokenizer; import org.apache.cassandra.utils.Pair;
import java.io.*; import java.util.*; import org.apache.cassandra.utils.*;
[ "java.io", "java.util", "org.apache.cassandra" ]
java.io; java.util; org.apache.cassandra;
945,980
private VerificationResult verifySignature(AuthSuccess authResp, DiscoveryInformation discovered, VerificationResult result) throws AssociationException, MessageException, DiscoveryException { if (disco...
VerificationResult function(AuthSuccess authResp, DiscoveryInformation discovered, VerificationResult result) throws AssociationException, MessageException, DiscoveryException { if (discovered == null authResp == null) { _log.error(STR + STR); result.setStatusMsg(STR + STR); return result; } Identifier claimedId = disc...
/** * Verifies the signature in a authentication response message. * * @param authResp Authentication response to be verified. * @param discovered The discovery information obtained earlier during * the discovery stage. * @return True if the verifi...
Verifies the signature in a authentication response message
verifySignature
{ "repo_name": "WdWeaver/openid4java-gae-hacks", "path": "src/org/openid4java/consumer/ConsumerManager.java", "license": "apache-2.0", "size": 70433 }
[ "org.openid4java.association.Association", "org.openid4java.association.AssociationException", "org.openid4java.discovery.DiscoveryException", "org.openid4java.discovery.DiscoveryInformation", "org.openid4java.discovery.Identifier", "org.openid4java.httpclient.HttpStatus", "org.openid4java.message.AuthS...
import org.openid4java.association.Association; import org.openid4java.association.AssociationException; import org.openid4java.discovery.DiscoveryException; import org.openid4java.discovery.DiscoveryInformation; import org.openid4java.discovery.Identifier; import org.openid4java.httpclient.HttpStatus; import org.openi...
import org.openid4java.association.*; import org.openid4java.discovery.*; import org.openid4java.httpclient.*; import org.openid4java.message.*;
[ "org.openid4java.association", "org.openid4java.discovery", "org.openid4java.httpclient", "org.openid4java.message" ]
org.openid4java.association; org.openid4java.discovery; org.openid4java.httpclient; org.openid4java.message;
798,627
public List<org.openforis.collect.persistence.jooq.tables.pojos.OfcDataCleansingStep> fetchByType(String... values) { return fetch(OfcDataCleansingStep.OFC_DATA_CLEANSING_STEP.TYPE, values); }
List<org.openforis.collect.persistence.jooq.tables.pojos.OfcDataCleansingStep> function(String... values) { return fetch(OfcDataCleansingStep.OFC_DATA_CLEANSING_STEP.TYPE, values); }
/** * Fetch records that have <code>type IN (values)</code> */
Fetch records that have <code>type IN (values)</code>
fetchByType
{ "repo_name": "openforis/collect", "path": "collect-core/src/generated/java/org/openforis/collect/persistence/jooq/tables/daos/OfcDataCleansingStepDao.java", "license": "mit", "size": 3852 }
[ "java.util.List", "org.openforis.collect.persistence.jooq.tables.OfcDataCleansingStep" ]
import java.util.List; import org.openforis.collect.persistence.jooq.tables.OfcDataCleansingStep;
import java.util.*; import org.openforis.collect.persistence.jooq.tables.*;
[ "java.util", "org.openforis.collect" ]
java.util; org.openforis.collect;
921,196
private void checkNullRule(AccountRule rule) { if (rule == null) { throw new IllegalArgumentException("The account's rule is null"); } }
void function(AccountRule rule) { if (rule == null) { throw new IllegalArgumentException(STR); } }
/** * An account's rule to be null throws an exception. * @param rule : the account's rule to be checked. */
An account's rule to be null throws an exception
checkNullRule
{ "repo_name": "telecomparistech/TDD", "path": "src/main/java/com/priceminister/account/implementation/CustomerAccount.java", "license": "gpl-2.0", "size": 3828 }
[ "com.priceminister.account.AccountRule" ]
import com.priceminister.account.AccountRule;
import com.priceminister.account.*;
[ "com.priceminister.account" ]
com.priceminister.account;
2,622,430
@Override public void trmv(char order, char Uplo, char TransA, char Diag, INDArray A, INDArray X) { if (Nd4j.getExecutioner().getProfilingMode() == OpExecutioner.ProfilingMode.ALL) OpProfiler.getInstance().processBlasCall(false, A, X); if (A.data().dataType() == DataBuffer.Type.DOUB...
void function(char order, char Uplo, char TransA, char Diag, INDArray A, INDArray X) { if (Nd4j.getExecutioner().getProfilingMode() == OpExecutioner.ProfilingMode.ALL) OpProfiler.getInstance().processBlasCall(false, A, X); if (A.data().dataType() == DataBuffer.Type.DOUBLE) { DefaultOpExecutioner.validateDataType(DataBu...
/** * trmv computes a matrix-vector product using a triangular matrix. * * @param order * @param Uplo * @param TransA * @param Diag * @param A * @param X */
trmv computes a matrix-vector product using a triangular matrix
trmv
{ "repo_name": "smarthi/nd4j", "path": "nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/api/blas/impl/BaseLevel2.java", "license": "apache-2.0", "size": 38335 }
[ "org.nd4j.linalg.api.buffer.DataBuffer", "org.nd4j.linalg.api.ndarray.INDArray", "org.nd4j.linalg.api.ops.executioner.DefaultOpExecutioner", "org.nd4j.linalg.api.ops.executioner.OpExecutioner", "org.nd4j.linalg.api.ops.executioner.OpExecutionerUtil", "org.nd4j.linalg.factory.Nd4j", "org.nd4j.linalg.prof...
import org.nd4j.linalg.api.buffer.DataBuffer; import org.nd4j.linalg.api.ndarray.INDArray; import org.nd4j.linalg.api.ops.executioner.DefaultOpExecutioner; import org.nd4j.linalg.api.ops.executioner.OpExecutioner; import org.nd4j.linalg.api.ops.executioner.OpExecutionerUtil; import org.nd4j.linalg.factory.Nd4j; import ...
import org.nd4j.linalg.api.buffer.*; import org.nd4j.linalg.api.ndarray.*; import org.nd4j.linalg.api.ops.executioner.*; import org.nd4j.linalg.factory.*; import org.nd4j.linalg.profiler.*;
[ "org.nd4j.linalg" ]
org.nd4j.linalg;
2,141,322
default CompletableFuture<Void> updateBanner(byte[] banner) { return createUpdater().setBanner(banner).update(); }
default CompletableFuture<Void> updateBanner(byte[] banner) { return createUpdater().setBanner(banner).update(); }
/** * Updates the banner of the server. Requires {@link ServerFeature#BANNER}. * This method assumes the file type is "png"! * * <p>If you want to update several settings at once, it's recommended to use the * {@link ServerUpdater} from {@link #createUpdater()} which provides a better performan...
Updates the banner of the server. Requires <code>ServerFeature#BANNER</code>. This method assumes the file type is "png"! If you want to update several settings at once, it's recommended to use the <code>ServerUpdater</code> from <code>#createUpdater()</code> which provides a better performance
updateBanner
{ "repo_name": "BtoBastian/Javacord", "path": "javacord-api/src/main/java/org/javacord/api/entity/server/Server.java", "license": "lgpl-3.0", "size": 103692 }
[ "java.util.concurrent.CompletableFuture" ]
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,044,656
public void reloadAllocsIfNecessary(TaskTrackerManager taskTrackerManager) { long time = System.currentTimeMillis(); if (time > lastReloadAttempt + ALLOC_RELOAD_INTERVAL) { lastReloadAttempt = time; try { File file = new File(allocFile); long lastModified = file.lastModified(); ...
void function(TaskTrackerManager taskTrackerManager) { long time = System.currentTimeMillis(); if (time > lastReloadAttempt + ALLOC_RELOAD_INTERVAL) { lastReloadAttempt = time; try { File file = new File(allocFile); long lastModified = file.lastModified(); if (lastModified > lastSuccessfulReload && time > lastModified ...
/** * Reload allocations file if it hasn't been loaded in a while */
Reload allocations file if it hasn't been loaded in a while
reloadAllocsIfNecessary
{ "repo_name": "yuanke/hadoop-hbase", "path": "src/contrib/fairscheduler/src/java/org/apache/hadoop/mapred/PoolManager.java", "license": "apache-2.0", "size": 14030 }
[ "java.io.File", "org.apache.hadoop.conf.Configuration" ]
import java.io.File; import org.apache.hadoop.conf.Configuration;
import java.io.*; import org.apache.hadoop.conf.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
2,776,368
AbstractFactory factory = null; try { Object obj = factoryClass.newInstance(); if (obj != null && obj instanceof AbstractFactory) { factory = (AbstractFactory) obj; } } catch (IllegalAccessException e) { Logger logger = Logger.getLogger("fa...
AbstractFactory factory = null; try { Object obj = factoryClass.newInstance(); if (obj != null && obj instanceof AbstractFactory) { factory = (AbstractFactory) obj; } } catch (IllegalAccessException e) { Logger logger = Logger.getLogger(STR); logger.log(Level.WARNING, STR, e); throw new FactoryCreationException(e); } c...
/** * Instantiates an object factory using the specified class. * * @param factoryClass * - a class that extends fabric.registry.impl.AbstractFactory * @return an instance of the object factory or null if the specified class does not extend * fabric.registry.impl.Abstra...
Instantiates an object factory using the specified class
createFactory
{ "repo_name": "acshea/edgware", "path": "fabric.lib/src/fabric/registry/impl/FactoryBuilder.java", "license": "epl-1.0", "size": 1797 }
[ "java.util.logging.Level", "java.util.logging.Logger" ]
import java.util.logging.Level; import java.util.logging.Logger;
import java.util.logging.*;
[ "java.util" ]
java.util;
2,109,128
protected Object[] readOneRow() throws KettleException { ArrayList<String> outputRow = new ArrayList<String>(); if (((CiviInputData) civiData).jsonBuffer.size() == 0) { // Si no hay limites en el tamaño del resultado y se llego al final // entonces retornar null ...
Object[] function() throws KettleException { ArrayList<String> outputRow = new ArrayList<String>(); if (((CiviInputData) civiData).jsonBuffer.size() == 0) { if (!first && isEnd) { return null; } String options = STRSTR&STRSTR=STR=STR[STRlikeSTRUTF-8STR]=STRlikeSTRUTF-8STRSTRSTRSTR,STRSTR&return=STRgetcountSTRgetsingleS...
/** * Leemos solo una fila de la lista y la devolvemos para que sea enviada hacia * el paso siguiente Deberiamos hacer las conversiones de tipo aqui, pero debo * analizar esta parte, de momento son tratados como String */
Leemos solo una fila de la lista y la devolvemos para que sea enviada hacia el paso siguiente Deberiamos hacer las conversiones de tipo aqui, pero debo analizar esta parte, de momento son tratados como String
readOneRow
{ "repo_name": "amnesty/civicrm-data-integration", "path": "src/main/CiviCRMInput/src/es/stratebi/civi/input/CiviInputStep.java", "license": "gpl-3.0", "size": 24721 }
[ "java.util.ArrayList", "org.pentaho.di.core.exception.KettleException" ]
import java.util.ArrayList; import org.pentaho.di.core.exception.KettleException;
import java.util.*; import org.pentaho.di.core.exception.*;
[ "java.util", "org.pentaho.di" ]
java.util; org.pentaho.di;
1,521,496
public KualiDecimal getPercentChange() { percentChange = null; BudgetConstructionCalculatedSalaryFoundationTracker csfTracker = this.getEffectiveCSFTracker(); if (csfTracker != null) { KualiInteger baseAmount = csfTracker.getCsfAmount(); KualiInteger requestedAmount ...
KualiDecimal function() { percentChange = null; BudgetConstructionCalculatedSalaryFoundationTracker csfTracker = this.getEffectiveCSFTracker(); if (csfTracker != null) { KualiInteger baseAmount = csfTracker.getCsfAmount(); KualiInteger requestedAmount = this.getAppointmentRequestedAmount(); percentChange = SalarySettin...
/** * Gets(sets) the percentChange based on the current values of csf and request amounts Checks to see if a CSF object exists * * @return Returns percentChange */
Gets(sets) the percentChange based on the current values of csf and request amounts Checks to see if a CSF object exists
getPercentChange
{ "repo_name": "quikkian-ua-devops/kfs", "path": "kfs-bc/src/main/java/org/kuali/kfs/module/bc/businessobject/PendingBudgetConstructionAppointmentFunding.java", "license": "agpl-3.0", "size": 35064 }
[ "org.kuali.kfs.module.bc.util.SalarySettingCalculator", "org.kuali.rice.core.api.util.type.KualiDecimal", "org.kuali.rice.core.api.util.type.KualiInteger" ]
import org.kuali.kfs.module.bc.util.SalarySettingCalculator; import org.kuali.rice.core.api.util.type.KualiDecimal; import org.kuali.rice.core.api.util.type.KualiInteger;
import org.kuali.kfs.module.bc.util.*; import org.kuali.rice.core.api.util.type.*;
[ "org.kuali.kfs", "org.kuali.rice" ]
org.kuali.kfs; org.kuali.rice;
2,823,798
// read parameters from configuration file this.config = new XMLConfiguration(); config.setListDelimiter(','); URL fileurl = ResourceLocator.getURL(configFile, defaultConfigFile, this.getClass()); logicalSources = new ArrayList<String>(); try { config.load(fileurl); String serviceEnpoint = con...
this.config = new XMLConfiguration(); config.setListDelimiter(','); URL fileurl = ResourceLocator.getURL(configFile, defaultConfigFile, this.getClass()); logicalSources = new ArrayList<String>(); try { config.load(fileurl); String serviceEnpoint = config.getString(STR); epcTransponderModelsConfig = config.getString(STR...
/** * Initialize a reader. * * @throws HardwareException */
Initialize a reader
initialize
{ "repo_name": "davfigue/hal-impl-caen", "path": "src/main/java/org/fosstrak/hal/impl/caen/CaenTCPController.java", "license": "lgpl-2.1", "size": 17609 }
[ "com.asisoft.caen.host.service.CaenRFIDProxyClient", "java.net.MalformedURLException", "java.util.ArrayList", "org.apache.commons.configuration.ConfigurationException", "org.apache.commons.configuration.XMLConfiguration", "org.fosstrak.hal.HardwareException", "org.fosstrak.hal.util.ResourceLocator" ]
import com.asisoft.caen.host.service.CaenRFIDProxyClient; import java.net.MalformedURLException; import java.util.ArrayList; import org.apache.commons.configuration.ConfigurationException; import org.apache.commons.configuration.XMLConfiguration; import org.fosstrak.hal.HardwareException; import org.fosstrak.hal.util.R...
import com.asisoft.caen.host.service.*; import java.net.*; import java.util.*; import org.apache.commons.configuration.*; import org.fosstrak.hal.*; import org.fosstrak.hal.util.*;
[ "com.asisoft.caen", "java.net", "java.util", "org.apache.commons", "org.fosstrak.hal" ]
com.asisoft.caen; java.net; java.util; org.apache.commons; org.fosstrak.hal;
1,254,938
public synchronized void dispose() { if (!isDisposed) { isDisposed = true; if (mhfTracker != null) { mhfTracker.close(); mhfTracker = null; } for (Iterator<RuntimeRule> it = rules.values().iterator(); it.hasNext();) { ...
synchronized void function() { if (!isDisposed) { isDisposed = true; if (mhfTracker != null) { mhfTracker.close(); mhfTracker = null; } for (Iterator<RuntimeRule> it = rules.values().iterator(); it.hasNext();) { RuntimeRule r = it.next(); removeRuleEntry(r); it.remove(); } if (compositeFactory != null) { compositeFacto...
/** * The method clean used resource by rule engine when it is stopped. */
The method clean used resource by rule engine when it is stopped
dispose
{ "repo_name": "markusmazurczak/smarthome", "path": "bundles/automation/org.eclipse.smarthome.automation.core/src/main/java/org/eclipse/smarthome/automation/core/internal/RuleEngine.java", "license": "epl-1.0", "size": 51399 }
[ "java.util.Iterator", "java.util.concurrent.Future" ]
import java.util.Iterator; import java.util.concurrent.Future;
import java.util.*; import java.util.concurrent.*;
[ "java.util" ]
java.util;
2,265,716
public void writeOutput(Writer writer) throws IOException { XMLOutputter xmlOutput = new XMLOutputter(); xmlOutput.setFormat(Format.getPrettyFormat()); xmlOutput.output(this.document, writer); }
void function(Writer writer) throws IOException { XMLOutputter xmlOutput = new XMLOutputter(); xmlOutput.setFormat(Format.getPrettyFormat()); xmlOutput.output(this.document, writer); }
/*************************************************************************** * Interface Methods ************************************************** **************************************************************************/
Interface Methods
writeOutput
{ "repo_name": "asascience-open/ncSOS", "path": "src/main/java/com/asascience/ncsos/outputformatter/CachedFileFormatter.java", "license": "mit", "size": 3192 }
[ "java.io.IOException", "java.io.Writer", "org.jdom.output.Format", "org.jdom.output.XMLOutputter" ]
import java.io.IOException; import java.io.Writer; import org.jdom.output.Format; import org.jdom.output.XMLOutputter;
import java.io.*; import org.jdom.output.*;
[ "java.io", "org.jdom.output" ]
java.io; org.jdom.output;
637,516
@Test public void testTestBrowserCallback() { prepareLooper(); Method[] methods = TestBrowserCallback.class.getMethods(); assertNotNull(methods); for (int i = 0; i < methods.length; i++) { // For any methods in the controller callback, TestControllerCallback should ha...
void function() { prepareLooper(); Method[] methods = TestBrowserCallback.class.getMethods(); assertNotNull(methods); for (int i = 0; i < methods.length; i++) { assertNotEquals(STR + methods[i] + STR, BrowserCallback.class, methods[i].getDeclaringClass()); } }
/** * Test if the {@link TestBrowserCallback} wraps the callback proxy without missing any method. */
Test if the <code>TestBrowserCallback</code> wraps the callback proxy without missing any method
testTestBrowserCallback
{ "repo_name": "aosp-mirror/platform_frameworks_support", "path": "media/src/androidTest/java/androidx/media/MediaBrowser2Test.java", "license": "apache-2.0", "size": 30489 }
[ "androidx.media.MediaBrowser2", "java.lang.reflect.Method", "junit.framework.Assert", "org.junit.Assert" ]
import androidx.media.MediaBrowser2; import java.lang.reflect.Method; import junit.framework.Assert; import org.junit.Assert;
import androidx.media.*; import java.lang.reflect.*; import junit.framework.*; import org.junit.*;
[ "androidx.media", "java.lang", "junit.framework", "org.junit" ]
androidx.media; java.lang; junit.framework; org.junit;
2,666,568
public static ByteBuf wrappedBuffer(ByteBuffer buffer) { if (!buffer.hasRemaining()) { return EMPTY_BUFFER; } if (buffer.hasArray()) { return wrappedBuffer( buffer.array(), buffer.arrayOffset() + buffer.position(), ...
static ByteBuf function(ByteBuffer buffer) { if (!buffer.hasRemaining()) { return EMPTY_BUFFER; } if (buffer.hasArray()) { return wrappedBuffer( buffer.array(), buffer.arrayOffset() + buffer.position(), buffer.remaining()).order(buffer.order()); } else if (PlatformDependent.hasUnsafe()) { if (buffer.isReadOnly()) { if ...
/** * Creates a new buffer which wraps the specified NIO buffer's current * slice. A modification on the specified buffer's content will be * visible to the returned buffer. */
Creates a new buffer which wraps the specified NIO buffer's current slice. A modification on the specified buffer's content will be visible to the returned buffer
wrappedBuffer
{ "repo_name": "jongyeol/netty", "path": "buffer/src/main/java/io/netty/buffer/Unpooled.java", "license": "apache-2.0", "size": 30606 }
[ "io.netty.util.internal.PlatformDependent", "java.nio.ByteBuffer" ]
import io.netty.util.internal.PlatformDependent; import java.nio.ByteBuffer;
import io.netty.util.internal.*; import java.nio.*;
[ "io.netty.util", "java.nio" ]
io.netty.util; java.nio;
1,098,993
protected void addRequiredPath(OperationRequestAddress requiredPath) { checkNotNullParam("requiredPath", requiredPath); // there perhaps could be more but for now only one is allowed if (requiredAddress != null) { throw new IllegalStateException("Only one required address is allo...
void function(OperationRequestAddress requiredPath) { checkNotNullParam(STR, requiredPath); if (requiredAddress != null) { throw new IllegalStateException(STR); } requiredAddress = requiredPath; final Iterator<OperationRequestAddress.Node> iterator = requiredAddress.iterator(); if (iterator.hasNext()) { final String fi...
/** * Adds a node path which is required to exist before the command can be * used. * * @param requiredPath node path which is required to exist before the * command can be used. */
Adds a node path which is required to exist before the command can be used
addRequiredPath
{ "repo_name": "jamezp/wildfly-core", "path": "cli/src/main/java/org/jboss/as/cli/impl/aesh/cmd/security/AbstractControlledCommand.java", "license": "lgpl-2.1", "size": 4128 }
[ "java.util.Iterator", "org.jboss.as.cli.Util", "org.jboss.as.cli.operation.OperationRequestAddress", "org.wildfly.common.Assert" ]
import java.util.Iterator; import org.jboss.as.cli.Util; import org.jboss.as.cli.operation.OperationRequestAddress; import org.wildfly.common.Assert;
import java.util.*; import org.jboss.as.cli.*; import org.jboss.as.cli.operation.*; import org.wildfly.common.*;
[ "java.util", "org.jboss.as", "org.wildfly.common" ]
java.util; org.jboss.as; org.wildfly.common;
2,915,816
@Nonnull public static <T extends Cancellable> Consumer<T> uncancel() { return (Consumer<T>) UNSET_CANCELLED; } private EventHandlers() { throw new UnsupportedOperationException("This class cannot be instantiated"); }
static <T extends Cancellable> Consumer<T> function() { return (Consumer<T>) UNSET_CANCELLED; } private EventHandlers() { throw new UnsupportedOperationException(STR); }
/** * Returns a consumer which un-cancels the event * * @param <T> the event type * @return a consumer which un-cancels the event */
Returns a consumer which un-cancels the event
uncancel
{ "repo_name": "lucko/helper", "path": "helper/src/main/java/me/lucko/helper/event/filter/EventHandlers.java", "license": "mit", "size": 2450 }
[ "java.util.function.Consumer", "org.bukkit.event.Cancellable" ]
import java.util.function.Consumer; import org.bukkit.event.Cancellable;
import java.util.function.*; import org.bukkit.event.*;
[ "java.util", "org.bukkit.event" ]
java.util; org.bukkit.event;
306,156
Elements getElementUtils();
Elements getElementUtils();
/** * Returns an implementation of some utility methods for * operating on elements * * @return element utilities */
Returns an implementation of some utility methods for operating on elements
getElementUtils
{ "repo_name": "rokn/Count_Words_2015", "path": "testing/openjdk2/langtools/src/share/classes/javax/annotation/processing/ProcessingEnvironment.java", "license": "mit", "size": 5156 }
[ "javax.lang.model.util.Elements" ]
import javax.lang.model.util.Elements;
import javax.lang.model.util.*;
[ "javax.lang" ]
javax.lang;
793,404
protected void decreaseMatchingWeighted(Node node1, Double value1, Node node2, Double value2) { double matchingG = this.matching.get(node1, node2) - Math.min(value1, value2); if (matchingG < 0.0 && Math.abs(matchingG) <= 1.0E-4 || matchingG > 0.0 && matchingG < 1.0E-6) { matchingG = 0.0; } this...
void function(Node node1, Double value1, Node node2, Double value2) { double matchingG = this.matching.get(node1, node2) - Math.min(value1, value2); if (matchingG < 0.0 && Math.abs(matchingG) <= 1.0E-4 matchingG > 0.0 && matchingG < 1.0E-6) { matchingG = 0.0; } this.matching.put(node1, node2, matchingG); }
/** * Decreases the matching between the given nodes by the min value. */
Decreases the matching between the given nodes by the min value
decreaseMatchingWeighted
{ "repo_name": "Rwilmes/DNA", "path": "src/dna/metrics/similarityMeasures/Measures.java", "license": "gpl-3.0", "size": 25485 }
[ "dna.graph.nodes.Node" ]
import dna.graph.nodes.Node;
import dna.graph.nodes.*;
[ "dna.graph.nodes" ]
dna.graph.nodes;
794,690
void setRaw(int index, byte[] value) { ColumnSchema column = schema.getColumnByIndex(index); Type type = column.getType(); switch (type) { case BOOL: case INT8: case INT16: case INT32: case INT64: case UNIXTIME_MICROS: case FLOAT: case DOUBLE: case DEC...
void setRaw(int index, byte[] value) { ColumnSchema column = schema.getColumnByIndex(index); Type type = column.getType(); switch (type) { case BOOL: case INT8: case INT16: case INT32: case INT64: case UNIXTIME_MICROS: case FLOAT: case DOUBLE: case DECIMAL: { Preconditions.checkArgument(value.length == column.getTypeSi...
/** * Sets the column to the provided raw value. * @param index the index of the column to set * @param value the raw value */
Sets the column to the provided raw value
setRaw
{ "repo_name": "EvilMcJerkface/kudu", "path": "java/kudu-client/src/main/java/org/apache/kudu/client/PartialRow.java", "license": "apache-2.0", "size": 55411 }
[ "com.google.common.base.Preconditions", "org.apache.kudu.ColumnSchema", "org.apache.kudu.Type" ]
import com.google.common.base.Preconditions; import org.apache.kudu.ColumnSchema; import org.apache.kudu.Type;
import com.google.common.base.*; import org.apache.kudu.*;
[ "com.google.common", "org.apache.kudu" ]
com.google.common; org.apache.kudu;
799,543
public ContentHandler getContentHandler () { return contentHandler; }
ContentHandler function () { return contentHandler; }
/** * Return the current content handler. * * @return The current content handler, or null if none was supplied. * @see org.xml.sax.XMLReader#getEntityResolver */
Return the current content handler
getContentHandler
{ "repo_name": "openjdk-mirror/jdk7u-jaxp", "path": "src/org/xml/sax/helpers/ParserAdapter.java", "license": "gpl-2.0", "size": 33066 }
[ "org.xml.sax.ContentHandler" ]
import org.xml.sax.ContentHandler;
import org.xml.sax.*;
[ "org.xml.sax" ]
org.xml.sax;
2,725,794
public long startRecovery(IndexShard indexShard, DiscoveryNode sourceNode, PeerRecoveryTargetService.RecoveryListener listener, TimeValue activityTimeout) { RecoveryTarget recoveryTarget = new RecoveryTarget(indexShard, sourceNode, listener, ensureClusterStateVersionCallback); ...
long function(IndexShard indexShard, DiscoveryNode sourceNode, PeerRecoveryTargetService.RecoveryListener listener, TimeValue activityTimeout) { RecoveryTarget recoveryTarget = new RecoveryTarget(indexShard, sourceNode, listener, ensureClusterStateVersionCallback); startRecoveryInternal(recoveryTarget, activityTimeout)...
/** * Starts are new recovery for the given shard, source node and state * * @return the id of the new recovery. */
Starts are new recovery for the given shard, source node and state
startRecovery
{ "repo_name": "fernandozhu/elasticsearch", "path": "core/src/main/java/org/elasticsearch/indices/recovery/RecoveriesCollection.java", "license": "apache-2.0", "size": 13247 }
[ "org.elasticsearch.cluster.node.DiscoveryNode", "org.elasticsearch.common.unit.TimeValue", "org.elasticsearch.index.shard.IndexShard" ]
import org.elasticsearch.cluster.node.DiscoveryNode; import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.index.shard.IndexShard;
import org.elasticsearch.cluster.node.*; import org.elasticsearch.common.unit.*; import org.elasticsearch.index.shard.*;
[ "org.elasticsearch.cluster", "org.elasticsearch.common", "org.elasticsearch.index" ]
org.elasticsearch.cluster; org.elasticsearch.common; org.elasticsearch.index;
1,674,451
String method = "listExistingNodeTypes"; try { URI uri = buildUri(NODE_TYPES_BASE_URL); ListResultModel<NodeTypeModel> result = execute(new HttpGet(uri), getNodeTypeModelTypeRef()); log(method, result); return result; } catch (Throwable e) { throw handleException(e); } }
String method = STR; try { URI uri = buildUri(NODE_TYPES_BASE_URL); ListResultModel<NodeTypeModel> result = execute(new HttpGet(uri), getNodeTypeModelTypeRef()); log(method, result); return result; } catch (Throwable e) { throw handleException(e); } }
/** * Sends GET request to obtain parameters of all available node types * * @return list of {@link NodeTypeModel} containing type parameters * * @throws AcnClientException if request failed */
Sends GET request to obtain parameters of all available node types
listExistingNodeTypes
{ "repo_name": "arrow-acs/acn-sdk-java", "path": "acn-client/src/main/java/com/arrow/acn/client/api/NodeTypeApi.java", "license": "apache-2.0", "size": 3785 }
[ "com.arrow.acn.client.model.NodeTypeModel", "com.arrow.acs.client.model.ListResultModel", "org.apache.http.client.methods.HttpGet" ]
import com.arrow.acn.client.model.NodeTypeModel; import com.arrow.acs.client.model.ListResultModel; import org.apache.http.client.methods.HttpGet;
import com.arrow.acn.client.model.*; import com.arrow.acs.client.model.*; import org.apache.http.client.methods.*;
[ "com.arrow.acn", "com.arrow.acs", "org.apache.http" ]
com.arrow.acn; com.arrow.acs; org.apache.http;
2,717,811
private int initStepTransactionTimeout() { logger.entering(sourceClass, "initStepTransactionTimeout"); Properties p = stepContext.getProperties(); int timeout = DEFAULT_TRAN_TIMEOUT_SECONDS; // default as per spec. if (p != null && !p.isEmpty()) { String propertyTi...
int function() { logger.entering(sourceClass, STR); Properties p = stepContext.getProperties(); int timeout = DEFAULT_TRAN_TIMEOUT_SECONDS; if (p != null && !p.isEmpty()) { String propertyTimeOut = p.getProperty(STR); if (logger.isLoggable(Level.FINE)) { logger.log(Level.FINE, STR, propertyTimeOut==null ? STR : propert...
/** * Note we can rely on the StepContext properties already having been set at this point. * * @return global transaction timeout defined in step properties. default */
Note we can rely on the StepContext properties already having been set at this point
initStepTransactionTimeout
{ "repo_name": "sidgoyal/standards.jsr352.jbatch", "path": "com.ibm.jbatch.container/src/main/java/com/ibm/jbatch/container/impl/ChunkStepControllerImpl.java", "license": "apache-2.0", "size": 41464 }
[ "java.util.Properties", "java.util.logging.Level" ]
import java.util.Properties; import java.util.logging.Level;
import java.util.*; import java.util.logging.*;
[ "java.util" ]
java.util;
2,155,470
public void setGenerationStampV1Limit(long stamp) { Preconditions.checkState(generationStampV1Limit == HdfsConstants .GRANDFATHER_GENERATION_STAMP); generationStampV1Limit = stamp; }
void function(long stamp) { Preconditions.checkState(generationStampV1Limit == HdfsConstants .GRANDFATHER_GENERATION_STAMP); generationStampV1Limit = stamp; }
/** * Sets the generation stamp that delineates random and sequentially * allocated block IDs. * * @param stamp set generation stamp limit to this value */
Sets the generation stamp that delineates random and sequentially allocated block IDs
setGenerationStampV1Limit
{ "repo_name": "cnfire/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/blockmanagement/BlockIdManager.java", "license": "apache-2.0", "size": 6902 }
[ "com.google.common.base.Preconditions", "org.apache.hadoop.hdfs.protocol.HdfsConstants" ]
import com.google.common.base.Preconditions; import org.apache.hadoop.hdfs.protocol.HdfsConstants;
import com.google.common.base.*; import org.apache.hadoop.hdfs.protocol.*;
[ "com.google.common", "org.apache.hadoop" ]
com.google.common; org.apache.hadoop;
511,169
void put504(Boolean booleanValue) throws ServiceException;
void put504(Boolean booleanValue) throws ServiceException;
/** * Return 504 status code, then 200 after retry * * @param booleanValue Simple boolean value true * @throws ServiceException the exception wrapped in ServiceException if failed. */
Return 504 status code, then 200 after retry
put504
{ "repo_name": "BretJohnson/autorest", "path": "AutoRest/Generators/Java/Java.Tests/src/main/java/fixtures/http/HttpRetry.java", "license": "mit", "size": 6657 }
[ "com.microsoft.rest.ServiceException" ]
import com.microsoft.rest.ServiceException;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
1,186,300
BuildRetention buildRetention = new BuildRetention(discardOldArtifacts); LogRotator rotator = build.getProject().getLogRotator(); if (rotator == null) { return buildRetention; } if (rotator.getNumToKeep() > -1) { buildRetention.setCount(rotator.getNumToKeep()); ...
BuildRetention buildRetention = new BuildRetention(discardOldArtifacts); LogRotator rotator = build.getProject().getLogRotator(); if (rotator == null) { return buildRetention; } if (rotator.getNumToKeep() > -1) { buildRetention.setCount(rotator.getNumToKeep()); } if (rotator.getDaysToKeep() > -1) { Calendar calendar = ...
/** * Create a Build retention object out of the build * * @param build The build to create the build retention out of * @param discardOldArtifacts Flag whether to discard artifacts of those builds that are to be discarded. * @return a new Build retention */
Create a Build retention object out of the build
createBuildRetention
{ "repo_name": "hudson2-plugins/artifactory-plugin", "path": "src/main/java/org/jfrog/hudson/util/BuildRetentionFactory.java", "license": "apache-2.0", "size": 1509 }
[ "hudson.tasks.LogRotator", "java.util.Calendar", "java.util.Date", "java.util.List", "org.jfrog.build.api.BuildRetention" ]
import hudson.tasks.LogRotator; import java.util.Calendar; import java.util.Date; import java.util.List; import org.jfrog.build.api.BuildRetention;
import hudson.tasks.*; import java.util.*; import org.jfrog.build.api.*;
[ "hudson.tasks", "java.util", "org.jfrog.build" ]
hudson.tasks; java.util; org.jfrog.build;
1,591,530
List<DiskImage> getImagesWithNoDisk(Guid vmId);
List<DiskImage> getImagesWithNoDisk(Guid vmId);
/** * Return all images that don't have a Disk entity in the DB and are part of a snapshot of the given VM ID. * * @param vmId * The VM to look up snapshots for. * @return List of images (empty if none found). */
Return all images that don't have a Disk entity in the DB and are part of a snapshot of the given VM ID
getImagesWithNoDisk
{ "repo_name": "jbeecham/ovirt-engine", "path": "backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/DiskImageDAO.java", "license": "apache-2.0", "size": 2320 }
[ "java.util.List", "org.ovirt.engine.core.common.businessentities.DiskImage", "org.ovirt.engine.core.compat.Guid" ]
import java.util.List; import org.ovirt.engine.core.common.businessentities.DiskImage; import org.ovirt.engine.core.compat.Guid;
import java.util.*; import org.ovirt.engine.core.common.businessentities.*; import org.ovirt.engine.core.compat.*;
[ "java.util", "org.ovirt.engine" ]
java.util; org.ovirt.engine;
2,848,239
public void removeAttribute(@NotNull final String attribute) { if (!isProjectStyle()) { throw new UnsupportedOperationException("Non project styles can not be modified"); } Collection<PsiFile> toBeEdited = new HashSet<PsiFile>(); final Collection<XmlTag> toBeRemoved = new HashSet<XmlTag>(); ...
void function(@NotNull final String attribute) { if (!isProjectStyle()) { throw new UnsupportedOperationException(STR); } Collection<PsiFile> toBeEdited = new HashSet<PsiFile>(); final Collection<XmlTag> toBeRemoved = new HashSet<XmlTag>(); for (ResourceItem resourceItem : getResources()) { final XmlTag sourceXml = Loc...
/** * Deletes an attribute of that particular style from all the relevant xml files */
Deletes an attribute of that particular style from all the relevant xml files
removeAttribute
{ "repo_name": "consulo/consulo-android", "path": "android/android/src/com/android/tools/idea/editors/theme/datamodels/ThemeEditorStyle.java", "license": "apache-2.0", "size": 17147 }
[ "com.android.ide.common.res2.ResourceItem", "com.android.tools.idea.rendering.LocalResourceRepository", "com.intellij.psi.PsiFile", "com.intellij.psi.xml.XmlTag", "com.intellij.util.containers.HashSet", "java.util.Collection", "org.jetbrains.annotations.NotNull" ]
import com.android.ide.common.res2.ResourceItem; import com.android.tools.idea.rendering.LocalResourceRepository; import com.intellij.psi.PsiFile; import com.intellij.psi.xml.XmlTag; import com.intellij.util.containers.HashSet; import java.util.Collection; import org.jetbrains.annotations.NotNull;
import com.android.ide.common.res2.*; import com.android.tools.idea.rendering.*; import com.intellij.psi.*; import com.intellij.psi.xml.*; import com.intellij.util.containers.*; import java.util.*; import org.jetbrains.annotations.*;
[ "com.android.ide", "com.android.tools", "com.intellij.psi", "com.intellij.util", "java.util", "org.jetbrains.annotations" ]
com.android.ide; com.android.tools; com.intellij.psi; com.intellij.util; java.util; org.jetbrains.annotations;
977,040
public Set<AudioFormat> getSupportedFormats();
Set<AudioFormat> function();
/** * Obtain the audio formats supported by this KSService * * @return The audio formats supported by this service */
Obtain the audio formats supported by this KSService
getSupportedFormats
{ "repo_name": "Snickermicker/smarthome", "path": "bundles/core/org.eclipse.smarthome.core.voice/src/main/java/org/eclipse/smarthome/core/voice/KSService.java", "license": "epl-1.0", "size": 3223 }
[ "java.util.Set", "org.eclipse.smarthome.core.audio.AudioFormat" ]
import java.util.Set; import org.eclipse.smarthome.core.audio.AudioFormat;
import java.util.*; import org.eclipse.smarthome.core.audio.*;
[ "java.util", "org.eclipse.smarthome" ]
java.util; org.eclipse.smarthome;
1,836,115
@Source("com/google/appinventor/images/phonebar.png") ImageResource phonebar();
@Source(STR) ImageResource phonebar();
/** * Phone status bar shown above the form in the visual designer */
Phone status bar shown above the form in the visual designer
phonebar
{ "repo_name": "kidebit/AudioBlurp", "path": "appinventor/appengine/src/com/google/appinventor/client/Images.java", "license": "apache-2.0", "size": 12205 }
[ "com.google.gwt.resources.client.ImageResource" ]
import com.google.gwt.resources.client.ImageResource;
import com.google.gwt.resources.client.*;
[ "com.google.gwt" ]
com.google.gwt;
745,742
void delete503(Boolean booleanValue) throws ServiceException;
void delete503(Boolean booleanValue) throws ServiceException;
/** * Return 503 status code, then 200 after retry * * @param booleanValue Simple boolean value true * @throws ServiceException the exception wrapped in ServiceException if failed. */
Return 503 status code, then 200 after retry
delete503
{ "repo_name": "BretJohnson/autorest", "path": "AutoRest/Generators/Java/Java.Tests/src/main/java/fixtures/http/HttpRetry.java", "license": "mit", "size": 6657 }
[ "com.microsoft.rest.ServiceException" ]
import com.microsoft.rest.ServiceException;
import com.microsoft.rest.*;
[ "com.microsoft.rest" ]
com.microsoft.rest;
1,186,298
RotateArray rotatearray = new RotateArray(); int[][] array = new int[][] {{1, 2}, {3, 4}}; int[][] rArray = new int[][] {{3, 1}, {4, 2}}; int[][] result = rotatearray.rotate(array); int[][] expected = rArray; assertThat(result, is(expected)); }
RotateArray rotatearray = new RotateArray(); int[][] array = new int[][] {{1, 2}, {3, 4}}; int[][] rArray = new int[][] {{3, 1}, {4, 2}}; int[][] result = rotatearray.rotate(array); int[][] expected = rArray; assertThat(result, is(expected)); }
/** * Test rotate array 2x2. */
Test rotate array 2x2
whenRotateTwoRowTwoColArrayThenRotatedArray
{ "repo_name": "maximignashov/mignashov", "path": "chapter_001/src/test/java/ru/job4j/array/RotateArrayTest.java", "license": "apache-2.0", "size": 1131 }
[ "org.hamcrest.core.Is", "org.junit.Assert" ]
import org.hamcrest.core.Is; import org.junit.Assert;
import org.hamcrest.core.*; import org.junit.*;
[ "org.hamcrest.core", "org.junit" ]
org.hamcrest.core; org.junit;
2,555,453
protected boolean supports(URL url, boolean info) { if (!"file".equals(url.getProtocol())) { return false; } boolean infoPresent = false; File file; try { file = new File(url.toURI()); file = assureNoTxt(file); file = new File(file.getPath() + ".info"); } catch (URISyntaxException e) { In...
boolean function(URL url, boolean info) { if (!"file".equals(url.getProtocol())) { return false; } boolean infoPresent = false; File file; try { file = new File(url.toURI()); file = assureNoTxt(file); file = new File(file.getPath() + ".info"); } catch (URISyntaxException e) { Instance.getInstance().getTraceHandler().er...
/** * Check if we supports this {@link URL}, that is, if the info file can be * found OR not found. * <p> * It must also be a file, not another kind of URL. * * @param url * the {@link URL} to check * @param info * TRUE to require the info file, FALSE to forbid the info file *...
Check if we supports this <code>URL</code>, that is, if the info file can be found OR not found. It must also be a file, not another kind of URL
supports
{ "repo_name": "nikiroo/fanfix", "path": "src/be/nikiroo/fanfix/supported/Text.java", "license": "gpl-3.0", "size": 10197 }
[ "be.nikiroo.fanfix.Instance", "java.io.File", "java.net.URISyntaxException" ]
import be.nikiroo.fanfix.Instance; import java.io.File; import java.net.URISyntaxException;
import be.nikiroo.fanfix.*; import java.io.*; import java.net.*;
[ "be.nikiroo.fanfix", "java.io", "java.net" ]
be.nikiroo.fanfix; java.io; java.net;
223,116
QueryResultMapper<T> forColumnMapping(Map<String, String> columnMapping); // process instance related public static final String COLUMN_PROCESSINSTANCEID = "PROCESSINSTANCEID"; public static final String COLUMN_PROCESSID = "PROCESSID"; public static final String COLUMN_START = "START_DATE"; ...
QueryResultMapper<T> forColumnMapping(Map<String, String> columnMapping); public static final String COLUMN_PROCESSINSTANCEID = STR; public static final String COLUMN_PROCESSID = STR; public static final String COLUMN_START = STR; public static final String COLUMN_END = STR; public static final String COLUMN_STATUS = S...
/** * Returns new instance of the mapper for given column mapping * @param columnMapping provides column mapping (name to type) that can be * shipped to mapper for improved transformation - can be null (accepted types: string, long, integer, date, double) * @return new instance of the mapper config...
Returns new instance of the mapper for given column mapping
forColumnMapping
{ "repo_name": "droolsjbpm/jbpm", "path": "jbpm-services/jbpm-services-api/src/main/java/org/jbpm/services/api/query/QueryResultMapper.java", "license": "apache-2.0", "size": 7067 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,326,700
@Override boolean sameAuthorityCodes(final AuthorityFactory factory) { if (!isCodeMethodOverriden()) { if (sameAuthorityCodes(crsFactory, factory) && sameAuthorityCodes(csFactory, factory) && sameAuthorityCodes(datumFactory, factory) ...
boolean sameAuthorityCodes(final AuthorityFactory factory) { if (!isCodeMethodOverriden()) { if (sameAuthorityCodes(crsFactory, factory) && sameAuthorityCodes(csFactory, factory) && sameAuthorityCodes(datumFactory, factory) && sameAuthorityCodes(operationFactory, factory)) { return true; } } return super.sameAuthorityC...
/** * If this factory is a wrapper for the specified factory that do not add any additional * {@linkplain #getAuthorityCodes authority codes}, returns {@code true}. This method is for * {@link FallbackAuthorityFactory} internal use only and should not be public. We expect only a * simple check, so w...
If this factory is a wrapper for the specified factory that do not add any additional #getAuthorityCodes authority codes, returns true. This method is for <code>FallbackAuthorityFactory</code> internal use only and should not be public. We expect only a simple check, so we don't invoke the getFooAuthorityFactory(...) m...
sameAuthorityCodes
{ "repo_name": "geotools/geotools", "path": "modules/library/referencing/src/main/java/org/geotools/referencing/factory/AuthorityFactoryAdapter.java", "license": "lgpl-2.1", "size": 54063 }
[ "org.opengis.referencing.AuthorityFactory" ]
import org.opengis.referencing.AuthorityFactory;
import org.opengis.referencing.*;
[ "org.opengis.referencing" ]
org.opengis.referencing;
698,233
public void testEnoughCopiesFoundForAllocationWithDifferentVersion() { MetaData metaData = MetaData.builder() .put(IndexMetaData.builder(shardId.getIndex()).settings(settings(Version.CURRENT)).numberOfShards(1).numberOfReplicas(2)) .build(); RoutingTable routingTable ...
void function() { MetaData metaData = MetaData.builder() .put(IndexMetaData.builder(shardId.getIndex()).settings(settings(Version.CURRENT)).numberOfShards(1).numberOfReplicas(2)) .build(); RoutingTable routingTable = RoutingTable.builder() .addAsRecovery(metaData.index(shardId.getIndex())) .build(); ClusterState state ...
/** * Tests that only when enough copies of the shard exists we are going to allocate it. This test * verifies that even with different version, we treat different versions as a copy, and count them. */
Tests that only when enough copies of the shard exists we are going to allocate it. This test verifies that even with different version, we treat different versions as a copy, and count them
testEnoughCopiesFoundForAllocationWithDifferentVersion
{ "repo_name": "socialrank/elasticsearch", "path": "core/src/test/java/org/elasticsearch/gateway/PrimaryShardAllocatorTests.java", "license": "apache-2.0", "size": 20899 }
[ "org.elasticsearch.Version", "org.elasticsearch.cluster.ClusterState", "org.elasticsearch.cluster.metadata.IndexMetaData", "org.elasticsearch.cluster.metadata.MetaData", "org.elasticsearch.cluster.node.DiscoveryNodes", "org.elasticsearch.cluster.routing.RoutingNodes", "org.elasticsearch.cluster.routing....
import org.elasticsearch.Version; import org.elasticsearch.cluster.ClusterState; import org.elasticsearch.cluster.metadata.IndexMetaData; import org.elasticsearch.cluster.metadata.MetaData; import org.elasticsearch.cluster.node.DiscoveryNodes; import org.elasticsearch.cluster.routing.RoutingNodes; import org.elasticsea...
import org.elasticsearch.*; import org.elasticsearch.cluster.*; import org.elasticsearch.cluster.metadata.*; import org.elasticsearch.cluster.node.*; import org.elasticsearch.cluster.routing.*; import org.elasticsearch.cluster.routing.allocation.*; import org.hamcrest.*;
[ "org.elasticsearch", "org.elasticsearch.cluster", "org.hamcrest" ]
org.elasticsearch; org.elasticsearch.cluster; org.hamcrest;
1,364,606
@Override public Adapter createSubstitutableIntRangeAdapter() { if (substitutableIntRangeItemProvider == null) { substitutableIntRangeItemProvider = new SubstitutableIntRangeItemProvider(this); } return substitutableIntRangeItemProvider; } protected LongDataValueItemProvider longDataValueItemProvider...
Adapter function() { if (substitutableIntRangeItemProvider == null) { substitutableIntRangeItemProvider = new SubstitutableIntRangeItemProvider(this); } return substitutableIntRangeItemProvider; } protected LongDataValueItemProvider longDataValueItemProvider;
/** * This creates an adapter for a {@link org.tud.inf.st.mbt.data.SubstitutableIntRange}. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This creates an adapter for a <code>org.tud.inf.st.mbt.data.SubstitutableIntRange</code>.
createSubstitutableIntRangeAdapter
{ "repo_name": "paetti1988/qmate", "path": "MATE/org.tud.inf.st.mbt.emf.edit/src-gen/org/tud/inf/st/mbt/data/provider/DataItemProviderAdapterFactory.java", "license": "apache-2.0", "size": 15559 }
[ "org.eclipse.emf.common.notify.Adapter" ]
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
389,162
public BufferedImage buildBufferedImage(Dimension size){ return new BufferedImage(size.width, size.height, getBufferedImageType()); }
BufferedImage function(Dimension size){ return new BufferedImage(size.width, size.height, getBufferedImageType()); }
/** * This method creates a BufferedImage of the right size and type * for the derived class. */
This method creates a BufferedImage of the right size and type for the derived class
buildBufferedImage
{ "repo_name": "sflyphotobooks/crp-batik", "path": "sources/org/apache/batik/svggen/DefaultCachedImageHandler.java", "license": "apache-2.0", "size": 16528 }
[ "java.awt.Dimension", "java.awt.image.BufferedImage" ]
import java.awt.Dimension; import java.awt.image.BufferedImage;
import java.awt.*; import java.awt.image.*;
[ "java.awt" ]
java.awt;
1,639,502
protected List<TransactionPointer> getConsumerIds( UUID queueId, UUID consumerId, SearchParam params, UUID startTimeUUID ) { SliceQuery<ByteBuffer, UUID, UUID> q = createSliceQuery( ko, be, ue, ue ); q.setColumnFamily( CONSUMER_QUEUE_TIMEOU...
List<TransactionPointer> function( UUID queueId, UUID consumerId, SearchParam params, UUID startTimeUUID ) { SliceQuery<ByteBuffer, UUID, UUID> q = createSliceQuery( ko, be, ue, ue ); q.setColumnFamily( CONSUMER_QUEUE_TIMEOUTS.getColumnFamily() ); q.setKey( getQueueClientTransactionKey( queueId, consumerId ) ); q.setRa...
/** * Get all pending transactions that have timed out * * @param queueId The queue id * @param consumerId The consumer id * @param params The server params * @param startTimeUUID The start time */
Get all pending transactions that have timed out
getConsumerIds
{ "repo_name": "mesosphere/usergrid", "path": "stack/core/src/main/java/org/apache/usergrid/mq/cassandra/io/ConsumerTransaction.java", "license": "apache-2.0", "size": 16553 }
[ "java.nio.ByteBuffer", "java.util.ArrayList", "java.util.List", "me.prettyprint.hector.api.beans.HColumn", "me.prettyprint.hector.api.factory.HFactory", "me.prettyprint.hector.api.query.SliceQuery", "org.apache.usergrid.mq.cassandra.CassandraMQUtils", "org.apache.usergrid.utils.UUIDUtils" ]
import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.List; import me.prettyprint.hector.api.beans.HColumn; import me.prettyprint.hector.api.factory.HFactory; import me.prettyprint.hector.api.query.SliceQuery; import org.apache.usergrid.mq.cassandra.CassandraMQUtils; import org.apache.usergrid.utils....
import java.nio.*; import java.util.*; import me.prettyprint.hector.api.beans.*; import me.prettyprint.hector.api.factory.*; import me.prettyprint.hector.api.query.*; import org.apache.usergrid.mq.cassandra.*; import org.apache.usergrid.utils.*;
[ "java.nio", "java.util", "me.prettyprint.hector", "org.apache.usergrid" ]
java.nio; java.util; me.prettyprint.hector; org.apache.usergrid;
444,415
public static String gensalt(int log_rounds, SecureRandom random) { StringBuffer rs = new StringBuffer(); byte rnd[] = new byte[BCRYPT_SALT_LEN]; random.nextBytes(rnd); rs.append("$2a$"); if(log_rounds < 10) rs.append("0"); rs.append(Integer.toString(log_rounds)); rs.append...
static String function(int log_rounds, SecureRandom random) { StringBuffer rs = new StringBuffer(); byte rnd[] = new byte[BCRYPT_SALT_LEN]; random.nextBytes(rnd); rs.append("$2a$"); if(log_rounds < 10) rs.append("0"); rs.append(Integer.toString(log_rounds)); rs.append("$"); rs.append(encode_base64(rnd, rnd.length)); re...
/** * Generate a salt for use with the BCrypt.hashpw() method * * @param log_rounds * the log2 of the number of rounds of hashing to apply - the work * factor therefore increases as 2**log_rounds. * @param random * an instance of SecureRandom to use * @return an encod...
Generate a salt for use with the BCrypt.hashpw() method
gensalt
{ "repo_name": "LordMonoxide/malachite-rts", "path": "client/client/src/jbcrypt/BCrypt.java", "license": "gpl-3.0", "size": 28889 }
[ "java.security.SecureRandom" ]
import java.security.SecureRandom;
import java.security.*;
[ "java.security" ]
java.security;
1,411,921
public static byte[] intToBytes(int i) { ByteBuffer byteBuffer = ByteBuffer.allocate(NUM_BYTES_IN_INT); byteBuffer.putInt(i); return byteBuffer.array(); }
static byte[] function(int i) { ByteBuffer byteBuffer = ByteBuffer.allocate(NUM_BYTES_IN_INT); byteBuffer.putInt(i); return byteBuffer.array(); }
/** * Convert a Java int to a 4-byte array. * * @param i * A Java int value. * @return A 4-byte array representing the int value. */
Convert a Java int to a 4-byte array
intToBytes
{ "repo_name": "thejoelpatrol/RTTApp", "path": "app/src/main/java/gov/nist/util/ByteUtil.java", "license": "gpl-3.0", "size": 7512 }
[ "java.nio.ByteBuffer" ]
import java.nio.ByteBuffer;
import java.nio.*;
[ "java.nio" ]
java.nio;
2,610,105
@Override public int hashCode() { return Objects.hash(name, value); }
int function() { return Objects.hash(name, value); }
/** * Returns the HashCode. */
Returns the HashCode
hashCode
{ "repo_name": "docusign/docusign-java-client", "path": "src/main/java/com/docusign/esign/model/BulkRecipientTabLabel.java", "license": "mit", "size": 2628 }
[ "java.util.Objects" ]
import java.util.Objects;
import java.util.*;
[ "java.util" ]
java.util;
1,392,301
public CatalogColumnStatistics copy() { Map<String, CatalogColumnStatisticsDataBase> copy = new HashMap<>(columnStatisticsData.size()); for (Map.Entry<String, CatalogColumnStatisticsDataBase> entry : columnStatisticsData.entrySet()) { copy.put(entry.getKey...
CatalogColumnStatistics function() { Map<String, CatalogColumnStatisticsDataBase> copy = new HashMap<>(columnStatisticsData.size()); for (Map.Entry<String, CatalogColumnStatisticsDataBase> entry : columnStatisticsData.entrySet()) { copy.put(entry.getKey(), entry.getValue().copy()); } return new CatalogColumnStatistics(...
/** * Create a deep copy of "this" instance. * * @return a deep copy */
Create a deep copy of "this" instance
copy
{ "repo_name": "lincoln-lil/flink", "path": "flink-table/flink-table-common/src/main/java/org/apache/flink/table/catalog/stats/CatalogColumnStatistics.java", "license": "apache-2.0", "size": 2720 }
[ "java.util.HashMap", "java.util.Map" ]
import java.util.HashMap; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
1,556,088
EDataType getFreqBiasFactor();
EDataType getFreqBiasFactor();
/** * Returns the meta object for data type '{@link java.lang.Object <em>Freq Bias Factor</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for data type '<em>Freq Bias Factor</em>'. * @see java.lang.Object * @model instanceClass="java.lang.Object" * extendedMetaDa...
Returns the meta object for data type '<code>java.lang.Object Freq Bias Factor</code>'.
getFreqBiasFactor
{ "repo_name": "georghinkel/ttc2017smartGrids", "path": "solutions/ModelJoin/src/main/java/CIM/CIMPackage.java", "license": "mit", "size": 20633 }
[ "org.eclipse.emf.ecore.EDataType" ]
import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
849,316
void error(Message msg, Throwable t);
void error(Message msg, Throwable t);
/** * Logs a message with the specific Marker at the {@link Level#ERROR ERROR} level. * * @param msg the message string to be logged * @param t A Throwable or null. */
Logs a message with the specific Marker at the <code>Level#ERROR ERROR</code> level
error
{ "repo_name": "lburgazzoli/apache-logging-log4j2", "path": "log4j-api/src/main/java/org/apache/logging/log4j/Logger.java", "license": "apache-2.0", "size": 84950 }
[ "org.apache.logging.log4j.message.Message" ]
import org.apache.logging.log4j.message.Message;
import org.apache.logging.log4j.message.*;
[ "org.apache.logging" ]
org.apache.logging;
692,774
@SuppressLint({"AddJavascriptInterface", "SetJavaScriptEnabled"}) private void init() { WebView webView = new WebView(this); WebSettings settings = webView.getSettings(); intent = this.getIntent(); webView.setVerticalScrollBarEnabled(false); webView.setHorizontalScrollB...
@SuppressLint({STR, STR}) void function() { WebView webView = new WebView(this); WebSettings settings = webView.getSettings(); intent = this.getIntent(); webView.setVerticalScrollBarEnabled(false); webView.setHorizontalScrollBarEnabled(false); webView.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY); webView.setSc...
/** * Initializes the activity. * Creates the web view and its client + JS interface. */
Initializes the activity. Creates the web view and its client + JS interface
init
{ "repo_name": "sarahgoldman/cordova-print-pdf-plugin", "path": "src/android/CloudPrintDialog.java", "license": "mit", "size": 5273 }
[ "android.annotation.SuppressLint", "android.view.ViewGroup", "android.webkit.WebSettings", "android.webkit.WebView" ]
import android.annotation.SuppressLint; import android.view.ViewGroup; import android.webkit.WebSettings; import android.webkit.WebView;
import android.annotation.*; import android.view.*; import android.webkit.*;
[ "android.annotation", "android.view", "android.webkit" ]
android.annotation; android.view; android.webkit;
455,980
public void setTopBarVisibility(boolean isVisible) { if (isVisible){ mTopBar.setVisibility(View.VISIBLE); } else { mTopBar.setVisibility(View.GONE); } }
void function(boolean isVisible) { if (isVisible){ mTopBar.setVisibility(View.VISIBLE); } else { mTopBar.setVisibility(View.GONE); } }
/** * Sets the visibility of top bar of the player controller * @param isVisible true=visible & false=gone */
Sets the visibility of top bar of the player controller
setTopBarVisibility
{ "repo_name": "miptliot/edx-app-android", "path": "VideoLocker/src/main/java/org/edx/mobile/player/PlayerController.java", "license": "apache-2.0", "size": 32489 }
[ "android.view.View" ]
import android.view.View;
import android.view.*;
[ "android.view" ]
android.view;
1,828,496
@Deprecated public static List<TableResult> paserTable(Document table) { Elements trElements = table.getElementsByTag("tr"); Element trElement = null; List<TableResult> result = new ArrayList<>(); TableResult tableResult = null; for (int i = 0; i < trElements.size(); i++) { trElement = trElement...
static List<TableResult> function(Document table) { Elements trElements = table.getElementsByTag("tr"); Element trElement = null; List<TableResult> result = new ArrayList<>(); TableResult tableResult = null; for (int i = 0; i < trElements.size(); i++) { trElement = trElements.get(i); Elements tdElements = trElement.get...
/** * <table> * <tr> * <td>key</td> * <td>value</td> * <td>key</td> * <td>value</td> * </tr> * <tr> * <td>key</td> * <td>value</td> * <td>key</td> * <td>value</td> * </tr> * </table> * * @param table * @return */
key value key value key value key value
paserTable
{ "repo_name": "lvjk/excrawler", "path": "src/main/java/six/com/crawler/utils/JsoupUtils.java", "license": "apache-2.0", "size": 12917 }
[ "java.util.ArrayList", "java.util.List", "org.apache.commons.lang3.StringUtils", "org.jsoup.nodes.Document", "org.jsoup.nodes.Element", "org.jsoup.select.Elements" ]
import java.util.ArrayList; import java.util.List; import org.apache.commons.lang3.StringUtils; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.select.Elements;
import java.util.*; import org.apache.commons.lang3.*; import org.jsoup.nodes.*; import org.jsoup.select.*;
[ "java.util", "org.apache.commons", "org.jsoup.nodes", "org.jsoup.select" ]
java.util; org.apache.commons; org.jsoup.nodes; org.jsoup.select;
2,405,197
default <T extends ProjectFacet> Set<T> filter(Class<T> type, Iterable<T> facets) { Set<Class<? extends ProjectFacet>> excludedFacets = getExcludedFacets(); Set<Class<? extends ProjectFacet>> sameTypeFacets = getIncludedFacets().stream() .filter((f) -> type.isAssignableFrom(f) && !exclu...
default <T extends ProjectFacet> Set<T> filter(Class<T> type, Iterable<T> facets) { Set<Class<? extends ProjectFacet>> excludedFacets = getExcludedFacets(); Set<Class<? extends ProjectFacet>> sameTypeFacets = getIncludedFacets().stream() .filter((f) -> type.isAssignableFrom(f) && !excludedFacets.contains(f)) .collect(C...
/** * Example: * <p/> * <code>filter(JPAFacet.class, ...) == JPAFacet2_0 instance</code> if this Stack is the JavaEE 6 stack */
Example: <code>filter(JPAFacet.class, ...) == JPAFacet2_0 instance</code> if this Stack is the JavaEE 6 stack
filter
{ "repo_name": "jerr/jbossforge-core", "path": "projects/api/src/main/java/org/jboss/forge/addon/projects/stacks/Stack.java", "license": "epl-1.0", "size": 3159 }
[ "java.util.LinkedHashSet", "java.util.Set", "java.util.stream.Collectors", "org.jboss.forge.addon.projects.ProjectFacet" ]
import java.util.LinkedHashSet; import java.util.Set; import java.util.stream.Collectors; import org.jboss.forge.addon.projects.ProjectFacet;
import java.util.*; import java.util.stream.*; import org.jboss.forge.addon.projects.*;
[ "java.util", "org.jboss.forge" ]
java.util; org.jboss.forge;
931,602
CommandLineSection getResidual() { // Potential further split: how the residual, if any is accepted, gets interpreted depends on // the command. For example, for build commands, we might want to consider separating out // project files, as in runtime.commands.ProjectFileSupport. To properly report...
CommandLineSection getResidual() { return CommandLineSection.newBuilder() .setSectionLabel(STR) .setChunkList(ChunkList.newBuilder().addAllChunk(commandOptions.getResidue())) .build(); } } public static class OriginalCommandLineEvent extends BazelCommandLineEvent { public static final String LABEL = STR; private final ...
/** * Returns the final part of the command line, containing whatever was left after obtaining the * command and its options. */
Returns the final part of the command line, containing whatever was left after obtaining the command and its options
getResidual
{ "repo_name": "dropbox/bazel", "path": "src/main/java/com/google/devtools/build/lib/runtime/CommandLineEvent.java", "license": "apache-2.0", "size": 19213 }
[ "com.google.devtools.build.lib.runtime.proto.CommandLineOuterClass", "com.google.devtools.build.lib.util.Pair", "com.google.devtools.common.options.OptionsProvider", "java.util.List", "java.util.Optional" ]
import com.google.devtools.build.lib.runtime.proto.CommandLineOuterClass; import com.google.devtools.build.lib.util.Pair; import com.google.devtools.common.options.OptionsProvider; import java.util.List; import java.util.Optional;
import com.google.devtools.build.lib.runtime.proto.*; import com.google.devtools.build.lib.util.*; import com.google.devtools.common.options.*; import java.util.*;
[ "com.google.devtools", "java.util" ]
com.google.devtools; java.util;
1,233,500
private Calendar getCalendarForLocale(Calendar oldCalendar, Locale locale) { if (oldCalendar == null) { return Calendar.getInstance(locale); } else { final long currentTimeMillis = oldCalendar.getTimeInMillis(); Calendar newCalendar = Calendar.getInstance(locale);...
Calendar function(Calendar oldCalendar, Locale locale) { if (oldCalendar == null) { return Calendar.getInstance(locale); } else { final long currentTimeMillis = oldCalendar.getTimeInMillis(); Calendar newCalendar = Calendar.getInstance(locale); newCalendar.setTimeInMillis(currentTimeMillis); return newCalendar; } }
/** * Gets a calendar for locale bootstrapped with the value of a given calendar. * * @param oldCalendar The old calendar. * @param locale The locale. */
Gets a calendar for locale bootstrapped with the value of a given calendar
getCalendarForLocale
{ "repo_name": "s20121035/rk3288_android5.1_repo", "path": "frameworks/base/core/java/android/widget/DatePickerCalendarDelegate.java", "license": "gpl-3.0", "size": 28492 }
[ "java.util.Calendar", "java.util.Locale" ]
import java.util.Calendar; import java.util.Locale;
import java.util.*;
[ "java.util" ]
java.util;
44,267
public void init(DataSourceProvider dsp, Integer numThreads) throws DataSourceException { try { dataSource = dsp.getDataSource(); } catch (SQLException e) { throw new DataSourceException("Failed to access data source", e); } //TODO: should a watchdog th...
void function(DataSourceProvider dsp, Integer numThreads) throws DataSourceException { try { dataSource = dsp.getDataSource(); } catch (SQLException e) { throw new DataSourceException(STR, e); } if (numThreads == null) this.executor = Executors.newCachedThreadPool(); else if (numThreads.intValue() <= 1) this.executor =...
/** * Initialize this executor with a custom number of threads for SQL task execution. * * @param numThreads If 1, 0, or negative, will be single-threaded; if {@code null}, will be unbounded, * otherwise will use no more concurrent threads than the count provided (i.e. fixed pool) * @since 1....
Initialize this executor with a custom number of threads for SQL task execution
init
{ "repo_name": "tcat-tamu/db", "path": "bundles/edu.tamu.tcat.db.postgresql.exec/src/edu/tamu/tcat/db/postgresql/exec/PostgreSqlExecutor.java", "license": "apache-2.0", "size": 5157 }
[ "edu.tamu.tcat.db.core.DataSourceException", "edu.tamu.tcat.db.provider.DataSourceProvider", "java.sql.SQLException", "java.util.concurrent.Executors" ]
import edu.tamu.tcat.db.core.DataSourceException; import edu.tamu.tcat.db.provider.DataSourceProvider; import java.sql.SQLException; import java.util.concurrent.Executors;
import edu.tamu.tcat.db.core.*; import edu.tamu.tcat.db.provider.*; import java.sql.*; import java.util.concurrent.*;
[ "edu.tamu.tcat", "java.sql", "java.util" ]
edu.tamu.tcat; java.sql; java.util;
1,633,891
public XYSeriesLabelGenerator getLegendItemToolTipGenerator() { return this.legendItemToolTipGenerator; }
XYSeriesLabelGenerator function() { return this.legendItemToolTipGenerator; }
/** * Returns the legend item tool tip generator. * * @return The tool tip generator (possibly <code>null</code>). * * @see #setLegendItemToolTipGenerator(XYSeriesLabelGenerator) * @since 1.0.14 */
Returns the legend item tool tip generator
getLegendItemToolTipGenerator
{ "repo_name": "hongliangpan/manydesigns.cn", "path": "trunk/portofino-chart/jfreechat.src/org/jfree/chart/renderer/DefaultPolarItemRenderer.java", "license": "lgpl-3.0", "size": 33244 }
[ "org.jfree.chart.labels.XYSeriesLabelGenerator" ]
import org.jfree.chart.labels.XYSeriesLabelGenerator;
import org.jfree.chart.labels.*;
[ "org.jfree.chart" ]
org.jfree.chart;
1,850,476
public Object save(Menu model);
Object function(Menu model);
/** * save model to database * * @param model * @return */
save model to database
save
{ "repo_name": "JpressProjects/jpress", "path": "jpress-service-api/src/main/java/io/jpress/service/MenuService.java", "license": "lgpl-3.0", "size": 1964 }
[ "io.jpress.model.Menu" ]
import io.jpress.model.Menu;
import io.jpress.model.*;
[ "io.jpress.model" ]
io.jpress.model;
2,212,424
public List<String> getAvailableParameters() { final List<String> available = new ArrayList<String>(); available.addAll(propagator.getNewtonianAttractionForceModel().getParametersNames()); for (final ForceModel model : propagator.getForceModels()) { available.addAll(model.getPara...
List<String> function() { final List<String> available = new ArrayList<String>(); available.addAll(propagator.getNewtonianAttractionForceModel().getParametersNames()); for (final ForceModel model : propagator.getForceModels()) { available.addAll(model.getParametersNames()); } return available; } /** Select the paramete...
/** Get the names of the available parameters in the propagator. * <p> * The names returned depend on the force models set up in the propagator, * including the Newtonian attraction from the central body. * </p> * @return available parameters */
Get the names of the available parameters in the propagator. The names returned depend on the force models set up in the propagator, including the Newtonian attraction from the central body.
getAvailableParameters
{ "repo_name": "treeform/orekit", "path": "src/main/java/org/orekit/propagation/numerical/PartialDerivativesEquations.java", "license": "apache-2.0", "size": 26160 }
[ "java.util.ArrayList", "java.util.List", "org.orekit.forces.ForceModel", "org.orekit.propagation.SpacecraftState" ]
import java.util.ArrayList; import java.util.List; import org.orekit.forces.ForceModel; import org.orekit.propagation.SpacecraftState;
import java.util.*; import org.orekit.forces.*; import org.orekit.propagation.*;
[ "java.util", "org.orekit.forces", "org.orekit.propagation" ]
java.util; org.orekit.forces; org.orekit.propagation;
808,171
public boolean writeList(List al) throws IOException { if (al == null) { out.writeBoolean(EMPTY_OBJECT); return false; } else { out.writeBoolean(ACTIVE_OBJECT); Iterator it = al.iterator(); while (it.hasNext()) { O...
boolean function(List al) throws IOException { if (al == null) { out.writeBoolean(EMPTY_OBJECT); return false; } else { out.writeBoolean(ACTIVE_OBJECT); Iterator it = al.iterator(); while (it.hasNext()) { Object value = it.next(); writeItem(value, false); } out.writeBoolean(EMPTY_OBJECT); } return true; }
/** * Write a list. * * FORMAT for null list * EMPTY_OBJECT * * FORMAT for non-empty list * ACTIVE_OBJECT * for each contained object * ACTOVE_OBJECT * writeObject * EMPTY_OBJECT (indicates end of the list * ...
Write a list. FORMAT for null list EMPTY_OBJECT FORMAT for non-empty list ACTIVE_OBJECT for each contained object ACTOVE_OBJECT writeObject EMPTY_OBJECT (indicates end of the list
writeList
{ "repo_name": "arunasujith/wso2-axis2", "path": "modules/kernel/src/org/apache/axis2/context/externalize/SafeObjectOutputStream.java", "license": "apache-2.0", "size": 24402 }
[ "java.io.IOException", "java.util.Iterator", "java.util.List" ]
import java.io.IOException; import java.util.Iterator; import java.util.List;
import java.io.*; import java.util.*;
[ "java.io", "java.util" ]
java.io; java.util;
1,166,937
@Override protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); newChildDescriptors.add (createChildParameter (SexecPackage.Literals.HISTORY_ENTRY__INITIAL_STEP, SexecFactory.eINSTANCE.create...
void function(Collection<Object> newChildDescriptors, Object object) { super.collectNewChildDescriptors(newChildDescriptors, object); newChildDescriptors.add (createChildParameter (SexecPackage.Literals.HISTORY_ENTRY__INITIAL_STEP, SexecFactory.eINSTANCE.createSequence())); newChildDescriptors.add (createChildParameter...
/** * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children * that can be created under this object. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */
This adds <code>org.eclipse.emf.edit.command.CommandParameter</code>s describing the children that can be created under this object.
collectNewChildDescriptors
{ "repo_name": "Yakindu/statecharts", "path": "plugins/org.yakindu.sct.model.sexec.edit/src/org/yakindu/sct/model/sexec/provider/HistoryEntryItemProvider.java", "license": "epl-1.0", "size": 14388 }
[ "java.util.Collection", "org.yakindu.sct.model.sexec.SexecFactory", "org.yakindu.sct.model.sexec.SexecPackage" ]
import java.util.Collection; import org.yakindu.sct.model.sexec.SexecFactory; import org.yakindu.sct.model.sexec.SexecPackage;
import java.util.*; import org.yakindu.sct.model.sexec.*;
[ "java.util", "org.yakindu.sct" ]
java.util; org.yakindu.sct;
1,492,467
protected void realClose(boolean calledExplicitly, boolean closeOpenResults) throws SQLException { MySQLConnection locallyScopedConn; try { locallyScopedConn = checkClosed(); } catch (SQLException sqlEx) { return; // already closed } sync...
void function(boolean calledExplicitly, boolean closeOpenResults) throws SQLException { MySQLConnection locallyScopedConn; try { locallyScopedConn = checkClosed(); } catch (SQLException sqlEx) { return; } synchronized (locallyScopedConn) { if (this.useUsageAdvisor) { if (!calledExplicitly) { String message = Messages.g...
/** * Closes this statement, and frees resources. * * @param calledExplicitly was this called from close()? * * @throws SQLException if an error occurs */
Closes this statement, and frees resources
realClose
{ "repo_name": "devoof/jPrinterAdmin", "path": "mysql-connector-java-5.1.23/src/com/mysql/jdbc/StatementImpl.java", "license": "gpl-2.0", "size": 109612 }
[ "com.mysql.jdbc.profiler.ProfilerEvent", "java.sql.SQLException" ]
import com.mysql.jdbc.profiler.ProfilerEvent; import java.sql.SQLException;
import com.mysql.jdbc.profiler.*; import java.sql.*;
[ "com.mysql.jdbc", "java.sql" ]
com.mysql.jdbc; java.sql;
952,236
public FSDataOutputStream create(Path f, short replication) throws IOException { return create(f, true, getConf().getInt("io.file.buffer.size", 4096), replication, getDefaultBlockSize(f)); }
FSDataOutputStream function(Path f, short replication) throws IOException { return create(f, true, getConf().getInt(STR, 4096), replication, getDefaultBlockSize(f)); }
/** * Create an FSDataOutputStream at the indicated Path. * Files are overwritten by default. * @param f the file to create * @param replication the replication factor */
Create an FSDataOutputStream at the indicated Path. Files are overwritten by default
create
{ "repo_name": "wankunde/cloudera_hadoop", "path": "hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java", "license": "apache-2.0", "size": 111812 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
900,801
public void setPersistentItems(boolean persist) { writeBoolean(ConfigureNodeFields.persist_items.getFieldName(), persist); }
void function(boolean persist) { writeBoolean(ConfigureNodeFields.persist_items.getFieldName(), persist); }
/** * Sets whether items should be persisted in the node. * * @param persist true if items should be persisted, false otherwise */
Sets whether items should be persisted in the node
setPersistentItems
{ "repo_name": "igniterealtime/Smack", "path": "smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/form/FillableConfigureForm.java", "license": "apache-2.0", "size": 10923 }
[ "org.jivesoftware.smackx.pubsub.ConfigureNodeFields" ]
import org.jivesoftware.smackx.pubsub.ConfigureNodeFields;
import org.jivesoftware.smackx.pubsub.*;
[ "org.jivesoftware.smackx" ]
org.jivesoftware.smackx;
842,156
public static void writeKey(String keyStorePath, KeyID keyid, Key key, Certificate[] certs) throws KeyStoreUtilsException { KeyStoreID ksID = keyid.getKeyStoreID(); KeyStore keyStore = null; try { keyStore = getKeyStore(keyStorePath, ksID); } catch (Exception ...
static void function(String keyStorePath, KeyID keyid, Key key, Certificate[] certs) throws KeyStoreUtilsException { KeyStoreID ksID = keyid.getKeyStoreID(); KeyStore keyStore = null; try { keyStore = getKeyStore(keyStorePath, ksID); } catch (Exception exc) { keyStore = null; } try { if (keyStore == null) { keyStore = ...
/** * Insert the key in a initialized keystore, or create a new keystore. * * @param keyid * the key identification data * @param key * the key to insert * @param certs * the key certificate chain * @throws KeyStoreUtilsException * if errors...
Insert the key in a initialized keystore, or create a new keystore
writeKey
{ "repo_name": "green-vulcano/gv-engine", "path": "gvengine/gvbase/src/main/java/it/greenvulcano/util/crypto/KeyStoreUtils.java", "license": "lgpl-3.0", "size": 7578 }
[ "java.io.OutputStream", "java.nio.file.Files", "java.nio.file.Path", "java.nio.file.Paths", "java.nio.file.StandardOpenOption", "java.security.Key", "java.security.KeyStore", "java.security.cert.Certificate" ]
import java.io.OutputStream; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.nio.file.StandardOpenOption; import java.security.Key; import java.security.KeyStore; import java.security.cert.Certificate;
import java.io.*; import java.nio.file.*; import java.security.*; import java.security.cert.*;
[ "java.io", "java.nio", "java.security" ]
java.io; java.nio; java.security;
1,971,129
public void tailStream() throws IOException { XContent xContent = XContentFactory.xContent(XContentType.JSON); BytesReference bytesRef = null; try { byte[] readBuf = new byte[readBufSize]; for (int bytesRead = inputStream.read(readBuf); bytesRead != -1; bytesRead = in...
void function() throws IOException { XContent xContent = XContentFactory.xContent(XContentType.JSON); BytesReference bytesRef = null; try { byte[] readBuf = new byte[readBufSize]; for (int bytesRead = inputStream.read(readBuf); bytesRead != -1; bytesRead = inputStream.read(readBuf)) { if (bytesRef == null) { bytesRef =...
/** * Tail the InputStream provided to the constructor, handling each complete log document as it arrives. * This method will not return until either end-of-file is detected on the InputStream or the * InputStream throws an exception. */
Tail the InputStream provided to the constructor, handling each complete log document as it arrives. This method will not return until either end-of-file is detected on the InputStream or the InputStream throws an exception
tailStream
{ "repo_name": "gingerwizard/elasticsearch", "path": "x-pack/plugin/ml/src/main/java/org/elasticsearch/xpack/ml/process/logging/CppLogMessageHandler.java", "license": "apache-2.0", "size": 17076 }
[ "java.io.IOException", "org.elasticsearch.common.bytes.BytesArray", "org.elasticsearch.common.bytes.BytesReference", "org.elasticsearch.common.bytes.CompositeBytesReference", "org.elasticsearch.common.xcontent.XContent", "org.elasticsearch.common.xcontent.XContentFactory", "org.elasticsearch.common.xcon...
import java.io.IOException; import org.elasticsearch.common.bytes.BytesArray; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.bytes.CompositeBytesReference; import org.elasticsearch.common.xcontent.XContent; import org.elasticsearch.common.xcontent.XContentFactory; import org.elast...
import java.io.*; import org.elasticsearch.common.bytes.*; import org.elasticsearch.common.xcontent.*;
[ "java.io", "org.elasticsearch.common" ]
java.io; org.elasticsearch.common;
180,757
public void setValidFrom (Timestamp ValidFrom) { set_Value (COLUMNNAME_ValidFrom, ValidFrom); }
void function (Timestamp ValidFrom) { set_Value (COLUMNNAME_ValidFrom, ValidFrom); }
/** Set Valid from. @param ValidFrom Valid from including this date (first day) */
Set Valid from
setValidFrom
{ "repo_name": "neuroidss/adempiere", "path": "base/src/org/compiere/model/X_I_PriceList.java", "license": "gpl-2.0", "size": 15815 }
[ "java.sql.Timestamp" ]
import java.sql.Timestamp;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,232,621
public Param value(List<String> values) { StringBuilder valuesSb = new StringBuilder(); for(int i=0; i< values.size(); i++){ valuesSb.append(values.get(i)); if(i != (values.size() -1)){ valuesSb.append("%7C"); // it represents a pipelin...
Param function(List<String> values) { StringBuilder valuesSb = new StringBuilder(); for(int i=0; i< values.size(); i++){ valuesSb.append(values.get(i)); if(i != (values.size() -1)){ valuesSb.append("%7C"); } } this.value = valuesSb.toString(); return this; } }
/** * Sets the values of the Param. * * @param values of params * @return this params */
Sets the values of the Param
value
{ "repo_name": "skd1993/google-places-api-java", "path": "src/main/java/se/walkercrou/places/GooglePlaces.java", "license": "mit", "size": 46097 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
1,190,892
public GagingStation findStation (long stationId) { for (Iterator iter = gagingStationIterator (); iter.hasNext ();) { GagingStation station = (GagingStation) iter.next (); if (station.getUniqueId () == stationId) { return station; } } return null; }
GagingStation function (long stationId) { for (Iterator iter = gagingStationIterator (); iter.hasNext ();) { GagingStation station = (GagingStation) iter.next (); if (station.getUniqueId () == stationId) { return station; } } return null; }
/** * Find a station with a specific id. * * @param stationId The id of the station to retrieve. * @return The station or null if the station wasn't found. */
Find a station with a specific id
findStation
{ "repo_name": "grappendorf/openmetix", "path": "plugin/metix-app/src/java/de/iritgo/openmetix/app/gagingstation/GagingStationRegistry.java", "license": "gpl-2.0", "size": 5309 }
[ "java.util.Iterator" ]
import java.util.Iterator;
import java.util.*;
[ "java.util" ]
java.util;
1,857,545
public final void fatal(Component reporter, String message) { add(new FeedbackMessage(reporter, message, FeedbackMessage.FATAL)); }
final void function(Component reporter, String message) { add(new FeedbackMessage(reporter, message, FeedbackMessage.FATAL)); }
/** * Adds a new ui message with level FATAL to the current messages. * * @param reporter * the reporting component * @param message * the actual message */
Adds a new ui message with level FATAL to the current messages
fatal
{ "repo_name": "astubbs/wicket.get-portals2", "path": "wicket/src/main/java/org/apache/wicket/feedback/FeedbackMessages.java", "license": "apache-2.0", "size": 8973 }
[ "org.apache.wicket.Component" ]
import org.apache.wicket.Component;
import org.apache.wicket.*;
[ "org.apache.wicket" ]
org.apache.wicket;
353,635
// <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code."> @Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); ...
void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
/** * Handles the HTTP * <code>GET</code> method. * * @param request servlet request * @param response servlet response * @throws ServletException if a servlet-specific error occurs * @throws IOException if an I/O error occurs */
Handles the HTTP <code>GET</code> method
doGet
{ "repo_name": "phantomjinx/modeshape", "path": "web/modeshape-web-explorer/src/main/java/org/modeshape/web/BinaryContentServlet.java", "license": "apache-2.0", "size": 4411 }
[ "java.io.IOException", "javax.servlet.ServletException", "javax.servlet.http.HttpServletRequest", "javax.servlet.http.HttpServletResponse" ]
import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse;
import java.io.*; import javax.servlet.*; import javax.servlet.http.*;
[ "java.io", "javax.servlet" ]
java.io; javax.servlet;
1,789,194
void onLongPress(MotionEvent e);
void onLongPress(MotionEvent e);
/** * Notified when a long press occurs with the initial on down * {@link MotionEvent} that triggered it. * * @param e The initial on down motion event that started the longpress. */
Notified when a long press occurs with the initial on down <code>MotionEvent</code> that triggered it
onLongPress
{ "repo_name": "nathan-almeida/GearVRf", "path": "GVRf/Sample/gvrf_immersivepedia/src/org/gearvrf/immersivepedia/util/VRTouchPadGestureDetector.java", "license": "apache-2.0", "size": 8923 }
[ "android.view.MotionEvent" ]
import android.view.MotionEvent;
import android.view.*;
[ "android.view" ]
android.view;
1,296,287
public static List<Map<String, AliasMetadata>> resolveAliases(final Metadata metadata, final String templateName) { final ComposableIndexTemplate template = metadata.templatesV2().get(templateName); assert template != null : "attempted to resolve aliases for a template [" + templateName ...
static List<Map<String, AliasMetadata>> function(final Metadata metadata, final String templateName) { final ComposableIndexTemplate template = metadata.templatesV2().get(templateName); assert template != null : STR + templateName + STR; return resolveAliases(metadata, template); }
/** * Resolve the given v2 template name into an ordered list of aliases */
Resolve the given v2 template name into an ordered list of aliases
resolveAliases
{ "repo_name": "GlenRSmith/elasticsearch", "path": "server/src/main/java/org/elasticsearch/cluster/metadata/MetadataIndexTemplateService.java", "license": "apache-2.0", "size": 77079 }
[ "java.util.List", "java.util.Map" ]
import java.util.List; import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
797,060
private AuthzGroupService authzGroupService; private FormattedText formattedText; protected void initState(SessionState state, VelocityPortlet portlet, JetspeedRunData rundata) { // TODO: we might want to keep this from running for each request - but by letting it we get fresh info each time... -ggolden super...
AuthzGroupService authzGroupService; private FormattedText formattedText; protected void function(SessionState state, VelocityPortlet portlet, JetspeedRunData rundata) { super.initState(state, portlet, rundata); Placement placement = ToolManager.getCurrentPlacement(); Properties config = placement.getConfig(); boolean ...
/** * Populate the state with configuration settings */
Populate the state with configuration settings
initState
{ "repo_name": "OpenCollabZA/sakai", "path": "web/web-tool/tool/src/java/org/sakaiproject/web/tool/IFrameAction.java", "license": "apache-2.0", "size": 37347 }
[ "java.util.Properties", "org.apache.commons.lang3.StringUtils", "org.sakaiproject.authz.api.AuthzGroupService", "org.sakaiproject.cheftool.JetspeedRunData", "org.sakaiproject.cheftool.VelocityPortlet", "org.sakaiproject.component.cover.ComponentManager", "org.sakaiproject.event.api.EventTrackingService"...
import java.util.Properties; import org.apache.commons.lang3.StringUtils; import org.sakaiproject.authz.api.AuthzGroupService; import org.sakaiproject.cheftool.JetspeedRunData; import org.sakaiproject.cheftool.VelocityPortlet; import org.sakaiproject.component.cover.ComponentManager; import org.sakaiproject.event.api.E...
import java.util.*; import org.apache.commons.lang3.*; import org.sakaiproject.authz.api.*; import org.sakaiproject.cheftool.*; import org.sakaiproject.component.cover.*; import org.sakaiproject.event.api.*; import org.sakaiproject.tool.api.*; import org.sakaiproject.tool.cover.*; import org.sakaiproject.util.api.*;
[ "java.util", "org.apache.commons", "org.sakaiproject.authz", "org.sakaiproject.cheftool", "org.sakaiproject.component", "org.sakaiproject.event", "org.sakaiproject.tool", "org.sakaiproject.util" ]
java.util; org.apache.commons; org.sakaiproject.authz; org.sakaiproject.cheftool; org.sakaiproject.component; org.sakaiproject.event; org.sakaiproject.tool; org.sakaiproject.util;
2,232,285