method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public ServiceCall getDateTimeRfc1123ValidAsync(final ServiceCallback<Map<String, DateTimeRfc1123>> serviceCallback) throws IllegalArgumentException {
if (serviceCallback == null) {
throw new IllegalArgumentException("ServiceCallback is required for async calls.");
} | ServiceCall function(final ServiceCallback<Map<String, DateTimeRfc1123>> serviceCallback) throws IllegalArgumentException { if (serviceCallback == null) { throw new IllegalArgumentException(STR); } | /**
* Get date-time-rfc1123 dictionary value {"0": "Fri, 01 Dec 2000 00:00:01 GMT", "1": "Wed, 02 Jan 1980 00:11:35 GMT", "2": "Wed, 12 Oct 1492 10:15:01 GMT"}.
*
* @param serviceCallback the async ServiceCallback to handle successful and failed responses.
* @throws IllegalArgumentException thrown i... | Get date-time-rfc1123 dictionary value {"0": "Fri, 01 Dec 2000 00:00:01 GMT", "1": "Wed, 02 Jan 1980 00:11:35 GMT", "2": "Wed, 12 Oct 1492 10:15:01 GMT"} | getDateTimeRfc1123ValidAsync | {
"repo_name": "stankovski/AutoRest",
"path": "AutoRest/Generators/Java/Java.Tests/src/main/java/fixtures/bodydictionary/DictionaryOperationsImpl.java",
"license": "mit",
"size": 167988
} | [
"com.microsoft.rest.DateTimeRfc1123",
"com.microsoft.rest.ServiceCall",
"com.microsoft.rest.ServiceCallback",
"java.util.Map"
] | import com.microsoft.rest.DateTimeRfc1123; import com.microsoft.rest.ServiceCall; import com.microsoft.rest.ServiceCallback; import java.util.Map; | import com.microsoft.rest.*; import java.util.*; | [
"com.microsoft.rest",
"java.util"
] | com.microsoft.rest; java.util; | 2,032,363 |
void onSpyEvent( @Nonnull Object event ); | void onSpyEvent( @Nonnull Object event ); | /**
* Report an event in the Arez system.
*
* @param event the event that occurred.
*/ | Report an event in the Arez system | onSpyEvent | {
"repo_name": "realityforge/arez",
"path": "core/src/main/java/arez/spy/SpyEventHandler.java",
"license": "apache-2.0",
"size": 303
} | [
"javax.annotation.Nonnull"
] | import javax.annotation.Nonnull; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 953,900 |
private boolean findLayersVectDataSorces(MapContext mapContext,Map dataSourcesMap) throws ReadDriverException{
LayersIterator iter = new LayersIterator(mapContext.getLayers()){ | boolean function(MapContext mapContext,Map dataSourcesMap) throws ReadDriverException{ LayersIterator iter = new LayersIterator(mapContext.getLayers()){ | /**
* Find DataSorces of the layers in the mapContext and store them in dataSourcesMap
*
* @param mapContext
* @param dataSourcesMap
* @return false if find a no Available layer
* @throws ReadDriverException
*/ | Find DataSorces of the layers in the mapContext and store them in dataSourcesMap | findLayersVectDataSorces | {
"repo_name": "iCarto/siga",
"path": "appgvSIG/src/com/iver/cit/gvsig/project/Project.java",
"license": "gpl-3.0",
"size": 62151
} | [
"com.hardcode.gdbms.driver.exceptions.ReadDriverException",
"com.iver.cit.gvsig.fmap.MapContext",
"com.iver.cit.gvsig.fmap.layers.LayersIterator",
"java.util.Map"
] | import com.hardcode.gdbms.driver.exceptions.ReadDriverException; import com.iver.cit.gvsig.fmap.MapContext; import com.iver.cit.gvsig.fmap.layers.LayersIterator; import java.util.Map; | import com.hardcode.gdbms.driver.exceptions.*; import com.iver.cit.gvsig.fmap.*; import com.iver.cit.gvsig.fmap.layers.*; import java.util.*; | [
"com.hardcode.gdbms",
"com.iver.cit",
"java.util"
] | com.hardcode.gdbms; com.iver.cit; java.util; | 2,785,257 |
public void unbind() {
Container cnt = getParent();
remove();
if(cnt != null) {
cnt.remove();
}
} | void function() { Container cnt = getParent(); remove(); if(cnt != null) { cnt.remove(); } } | /**
* Removes the floating action button from its parent
*/ | Removes the floating action button from its parent | unbind | {
"repo_name": "codenameone/CodenameOne",
"path": "CodenameOne/src/com/codename1/components/FloatingActionButton.java",
"license": "gpl-2.0",
"size": 14917
} | [
"com.codename1.ui.Container"
] | import com.codename1.ui.Container; | import com.codename1.ui.*; | [
"com.codename1.ui"
] | com.codename1.ui; | 900,234 |
private Clipboard getClipboard() {
return clipboard;
} | Clipboard function() { return clipboard; } | /**
* Return the clipboard service
*/ | Return the clipboard service | getClipboard | {
"repo_name": "auroreallibe/Silverpeas-Core",
"path": "core-web/src/main/java/org/silverpeas/core/web/mvc/controller/MainSessionController.java",
"license": "agpl-3.0",
"size": 17796
} | [
"org.silverpeas.core.clipboard.service.Clipboard"
] | import org.silverpeas.core.clipboard.service.Clipboard; | import org.silverpeas.core.clipboard.service.*; | [
"org.silverpeas.core"
] | org.silverpeas.core; | 1,748,511 |
public static void loadProviders(Location location, String filename,
ProviderType providerType, Set<EncounterType> servicesProvided, long clinicianSeed,
boolean optional)
throws IOException {
if (optional && (filename == null || filename.length() == 0)) {
return;
}
String resource... | static void function(Location location, String filename, ProviderType providerType, Set<EncounterType> servicesProvided, long clinicianSeed, boolean optional) throws IOException { if (optional && (filename == null filename.length() == 0)) { return; } String resource = Utilities.readResource(filename); Iterator<? extend... | /**
* Read the providers from the given resource file, only importing the ones for the given state.
* THIS method is for loading providers and generating clinicians with specific specialties
*
* @param location the state being loaded
* @param filename Location of the file, relative to src/main/resources
... | Read the providers from the given resource file, only importing the ones for the given state. THIS method is for loading providers and generating clinicians with specific specialties | loadProviders | {
"repo_name": "synthetichealth/synthea",
"path": "src/main/java/org/mitre/synthea/world/agents/Provider.java",
"license": "apache-2.0",
"size": 25067
} | [
"java.io.IOException",
"java.util.Iterator",
"java.util.Map",
"java.util.Random",
"java.util.Set",
"org.mitre.synthea.helpers.SimpleCSV",
"org.mitre.synthea.helpers.Utilities",
"org.mitre.synthea.world.concepts.ClinicianSpecialty",
"org.mitre.synthea.world.concepts.HealthRecord",
"org.mitre.synthe... | import java.io.IOException; import java.util.Iterator; import java.util.Map; import java.util.Random; import java.util.Set; import org.mitre.synthea.helpers.SimpleCSV; import org.mitre.synthea.helpers.Utilities; import org.mitre.synthea.world.concepts.ClinicianSpecialty; import org.mitre.synthea.world.concepts.HealthRe... | import java.io.*; import java.util.*; import org.mitre.synthea.helpers.*; import org.mitre.synthea.world.concepts.*; import org.mitre.synthea.world.geography.*; import org.mitre.synthea.world.geography.quadtree.*; | [
"java.io",
"java.util",
"org.mitre.synthea"
] | java.io; java.util; org.mitre.synthea; | 1,358,692 |
public void clearRule(DiscoveryNode node) {
transport().transports.remove(node.getAddress());
} | void function(DiscoveryNode node) { transport().transports.remove(node.getAddress()); } | /**
* Clears the rule associated with the provided node.
*/ | Clears the rule associated with the provided node | clearRule | {
"repo_name": "sarwarbhuiyan/elasticsearch",
"path": "core/src/test/java/org/elasticsearch/test/transport/MockTransportService.java",
"license": "apache-2.0",
"size": 19615
} | [
"org.elasticsearch.cluster.node.DiscoveryNode"
] | import org.elasticsearch.cluster.node.DiscoveryNode; | import org.elasticsearch.cluster.node.*; | [
"org.elasticsearch.cluster"
] | org.elasticsearch.cluster; | 265,542 |
public byte[] loadReplace(InputStream in, final String originalName, final String replaceName); | byte[] function(InputStream in, final String originalName, final String replaceName); | /**
* Load special replacement and impersonate.
*
* @param in Input stream.
* @param originalName Original class name.
* @param replaceName Replacer class name.
* @return Result.
*/ | Load special replacement and impersonate | loadReplace | {
"repo_name": "ilantukh/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/hadoop/HadoopHelper.java",
"license": "apache-2.0",
"size": 1947
} | [
"java.io.InputStream"
] | import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,067,131 |
@SuppressWarnings("unchecked")
public void cancelDelegationToken(
Token<? extends AbstractDelegationTokenIdentifier> token)
throws InvalidToken, IOException {
dfs.cancelDelegationToken((Token<DelegationTokenIdentifier>) token);
} | @SuppressWarnings(STR) void function( Token<? extends AbstractDelegationTokenIdentifier> token) throws InvalidToken, IOException { dfs.cancelDelegationToken((Token<DelegationTokenIdentifier>) token); } | /**
* Cancel an existing delegation token.
*
* @param token delegation token
* @throws InvalidToken
* @throws IOException
* @deprecated Use Token.cancel instead.
*/ | Cancel an existing delegation token | cancelDelegationToken | {
"repo_name": "WIgor/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/fs/Hdfs.java",
"license": "apache-2.0",
"size": 17619
} | [
"java.io.IOException",
"org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenIdentifier",
"org.apache.hadoop.security.token.SecretManager",
"org.apache.hadoop.security.token.Token",
"org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifier"
] | import java.io.IOException; import org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenIdentifier; import org.apache.hadoop.security.token.SecretManager; import org.apache.hadoop.security.token.Token; import org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifier; | import java.io.*; import org.apache.hadoop.hdfs.security.token.delegation.*; import org.apache.hadoop.security.token.*; import org.apache.hadoop.security.token.delegation.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 2,841,774 |
public byte[] getData()
{
data = new byte[34];
// Paper size
IntegerHelper.getTwoBytes(paperSize, data, 0);
// Scale factor
IntegerHelper.getTwoBytes(scaleFactor, data, 2);
// Page start
IntegerHelper.getTwoBytes(pageStart, data, 4);
// Fit width
IntegerHelper.getTwoBytes(fitWidth, data, 6);
... | byte[] function() { data = new byte[34]; IntegerHelper.getTwoBytes(paperSize, data, 0); IntegerHelper.getTwoBytes(scaleFactor, data, 2); IntegerHelper.getTwoBytes(pageStart, data, 4); IntegerHelper.getTwoBytes(fitWidth, data, 6); IntegerHelper.getTwoBytes(fitHeight, data, 8); int options = 0; if (order == PageOrder.RIG... | /**
* Gets the binary data for output to file
*
* @return the binary data
*/ | Gets the binary data for output to file | getData | {
"repo_name": "stefandmn/AREasy",
"path": "src/java/org/areasy/common/parser/excel/write/biff/SetupRecord.java",
"license": "lgpl-3.0",
"size": 4971
} | [
"org.areasy.common.parser.excel.biff.DoubleHelper",
"org.areasy.common.parser.excel.biff.IntegerHelper",
"org.areasy.common.parser.excel.format.PageOrder",
"org.areasy.common.parser.excel.format.PageOrientation"
] | import org.areasy.common.parser.excel.biff.DoubleHelper; import org.areasy.common.parser.excel.biff.IntegerHelper; import org.areasy.common.parser.excel.format.PageOrder; import org.areasy.common.parser.excel.format.PageOrientation; | import org.areasy.common.parser.excel.biff.*; import org.areasy.common.parser.excel.format.*; | [
"org.areasy.common"
] | org.areasy.common; | 1,273,802 |
@AtMostOnce
public void modifyCacheDirective(CacheDirectiveInfo directive,
EnumSet<CacheFlag> flags) throws IOException; | void function(CacheDirectiveInfo directive, EnumSet<CacheFlag> flags) throws IOException; | /**
* Modify a CacheDirective in the CacheManager.
*
* @param flags {@link CacheFlag}s to use for this operation.
* @throws IOException if the directive could not be modified
*/ | Modify a CacheDirective in the CacheManager | modifyCacheDirective | {
"repo_name": "iostackproject/FairIO",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java",
"license": "apache-2.0",
"size": 54643
} | [
"java.io.IOException",
"java.util.EnumSet",
"org.apache.hadoop.fs.CacheFlag"
] | import java.io.IOException; import java.util.EnumSet; import org.apache.hadoop.fs.CacheFlag; | import java.io.*; import java.util.*; import org.apache.hadoop.fs.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 1,080,760 |
public NotificationProvider getNotificationProvider();
| NotificationProvider function(); | /**
* This allows you to find out how to contact this device.
*
* @return the provider of the notification functionality
*/ | This allows you to find out how to contact this device | getNotificationProvider | {
"repo_name": "davidrudder23/OpenNotification",
"path": "src/net/reliableresponse/notification/device/Device.java",
"license": "apache-2.0",
"size": 5770
} | [
"net.reliableresponse.notification.providers.NotificationProvider"
] | import net.reliableresponse.notification.providers.NotificationProvider; | import net.reliableresponse.notification.providers.*; | [
"net.reliableresponse.notification"
] | net.reliableresponse.notification; | 1,769,783 |
public static <E> void removeAll(List<E> list, List<? extends E> objects) {
for (E object : objects) {
remove(list, object);
}
}
| static <E> void function(List<E> list, List<? extends E> objects) { for (E object : objects) { remove(list, object); } } | /**
* Removes all <code>objects</code> from <code>list</code>.
*
* @param <E>
* the element type of the list
* @param list
* the list
* @param objects
* a list of objects to be removed from list
*/ | Removes all <code>objects</code> from <code>list</code> | removeAll | {
"repo_name": "dresden-ocl/dresdenocl",
"path": "plugins/org.dresdenocl.pivotmodel/src/org/dresdenocl/pivotmodel/util/ListUtil.java",
"license": "lgpl-3.0",
"size": 2068
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 743,657 |
synchronized RawSnapshotReader waitForLatestSnapshot() throws InterruptedException {
while (snapshots.isEmpty()) {
this.wait();
}
return Objects.requireNonNull(snapshots.lastEntry()).getValue();
} | synchronized RawSnapshotReader waitForLatestSnapshot() throws InterruptedException { while (snapshots.isEmpty()) { this.wait(); } return Objects.requireNonNull(snapshots.lastEntry()).getValue(); } | /**
* Returns the latest snapshot.
*
* If a snapshot doesn't exists, it waits until it does.
*/ | Returns the latest snapshot. If a snapshot doesn't exists, it waits until it does | waitForLatestSnapshot | {
"repo_name": "TiVo/kafka",
"path": "metadata/src/test/java/org/apache/kafka/metalog/LocalLogManager.java",
"license": "apache-2.0",
"size": 29530
} | [
"java.util.Objects",
"org.apache.kafka.snapshot.RawSnapshotReader"
] | import java.util.Objects; import org.apache.kafka.snapshot.RawSnapshotReader; | import java.util.*; import org.apache.kafka.snapshot.*; | [
"java.util",
"org.apache.kafka"
] | java.util; org.apache.kafka; | 151,330 |
private void checkAttributes(Iterable<ClusterNode> nodes) throws IgniteCheckedException {
ClusterNode locNode = getSpi().getLocalNode();
assert locNode != null;
// Fetch local node attributes once.
String locPreferIpV4 = locNode.attribute("java.net.preferIPv4Stack");
Objec... | void function(Iterable<ClusterNode> nodes) throws IgniteCheckedException { ClusterNode locNode = getSpi().getLocalNode(); assert locNode != null; String locPreferIpV4 = locNode.attribute(STR); Object locMode = locNode.attribute(ATTR_DEPLOYMENT_MODE); int locJvmMajVer = nodeJavaMajorVersion(locNode); boolean locP2pEnabl... | /**
* Checks whether attributes of the local node are consistent with remote nodes.
*
* @param nodes List of remote nodes to check attributes on.
* @throws IgniteCheckedException In case of error.
*/ | Checks whether attributes of the local node are consistent with remote nodes | checkAttributes | {
"repo_name": "leveyj/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/managers/discovery/GridDiscoveryManager.java",
"license": "apache-2.0",
"size": 112502
} | [
"org.apache.ignite.IgniteCheckedException",
"org.apache.ignite.cluster.ClusterNode",
"org.apache.ignite.internal.processors.cache.CacheAffinitySharedManager",
"org.apache.ignite.internal.processors.service.GridServiceProcessor",
"org.apache.ignite.internal.util.typedef.F",
"org.apache.ignite.internal.util... | import org.apache.ignite.IgniteCheckedException; import org.apache.ignite.cluster.ClusterNode; import org.apache.ignite.internal.processors.cache.CacheAffinitySharedManager; import org.apache.ignite.internal.processors.service.GridServiceProcessor; import org.apache.ignite.internal.util.typedef.F; import org.apache.ign... | import org.apache.ignite.*; import org.apache.ignite.cluster.*; import org.apache.ignite.internal.processors.cache.*; import org.apache.ignite.internal.processors.service.*; import org.apache.ignite.internal.util.typedef.*; import org.apache.ignite.internal.util.typedef.internal.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 1,850,129 |
@Test
public void testGrantRevokeSELECTonDb() throws Exception {
File dataFile = doSetupForGrantDbTests();
Connection connection = context.createConnection(ADMIN1);
Statement statement = context.createStatement(connection);
// Grant only SELECT on Database
statement.execute("GRANT SELECT ON DA... | void function() throws Exception { File dataFile = doSetupForGrantDbTests(); Connection connection = context.createConnection(ADMIN1); Statement statement = context.createStatement(connection); statement.execute(STR + DB1 + STR); statement.execute(STRGRANT ROLE user_role TO GROUP STRSELECT * FROM STR.t1STRSELECT * FROM... | /**
* Regression test for SENTRY-303 and SENTRY-543.
*/ | Regression test for SENTRY-303 and SENTRY-543 | testGrantRevokeSELECTonDb | {
"repo_name": "intel-hadoop/incubator-sentry",
"path": "sentry-tests/sentry-tests-hive-v2/src/test/java/org/apache/sentry/tests/e2e/dbprovider/TestDatabaseProvider.java",
"license": "apache-2.0",
"size": 90466
} | [
"java.io.File",
"java.sql.Connection",
"java.sql.Statement"
] | import java.io.File; import java.sql.Connection; import java.sql.Statement; | import java.io.*; import java.sql.*; | [
"java.io",
"java.sql"
] | java.io; java.sql; | 1,952,657 |
protected void dealFireDamage(int amount)
{
if (!this.isImmuneToFire)
{
this.attackEntityFrom(DamageSource.inFire, (float)amount);
}
} | void function(int amount) { if (!this.isImmuneToFire) { this.attackEntityFrom(DamageSource.inFire, (float)amount); } } | /**
* Will deal the specified amount of damage to the entity if the entity isn't immune to fire damage. Args:
* amountDamage
*/ | Will deal the specified amount of damage to the entity if the entity isn't immune to fire damage. Args: amountDamage | dealFireDamage | {
"repo_name": "kelthalorn/ConquestCraft",
"path": "build/tmp/recompSrc/net/minecraft/entity/Entity.java",
"license": "lgpl-2.1",
"size": 97307
} | [
"net.minecraft.util.DamageSource"
] | import net.minecraft.util.DamageSource; | import net.minecraft.util.*; | [
"net.minecraft.util"
] | net.minecraft.util; | 1,223,558 |
public static List<Date> getTriggerDates(VAlarm alarm, Component parent) {
ArrayList<Date> dates = new ArrayList<Date>();
Trigger trigger = alarm.getTrigger();
if(trigger==null) {
return dates;
}
Date initialTriggerDate = getTriggerDate(trigger, parent);
... | static List<Date> function(VAlarm alarm, Component parent) { ArrayList<Date> dates = new ArrayList<Date>(); Trigger trigger = alarm.getTrigger(); if(trigger==null) { return dates; } Date initialTriggerDate = getTriggerDate(trigger, parent); if(initialTriggerDate==null) { return dates; } dates.add(initialTriggerDate); D... | /**
* Return the list of dates that an alarm will trigger.
* @param alarm alarm component
* @param parent parent compoennt (VEvent,VToDo)
* @return dates that alarm is configured to trigger
*/ | Return the list of dates that an alarm will trigger | getTriggerDates | {
"repo_name": "1and1/cosmo",
"path": "cosmo-core/src/main/java/org/unitedinternet/cosmo/calendar/ICalendarUtils.java",
"license": "apache-2.0",
"size": 23897
} | [
"java.util.ArrayList",
"java.util.List",
"net.fortuna.ical4j.model.Component",
"net.fortuna.ical4j.model.Date",
"net.fortuna.ical4j.model.TemporalAmountAdapter",
"net.fortuna.ical4j.model.component.VAlarm",
"net.fortuna.ical4j.model.property.Duration",
"net.fortuna.ical4j.model.property.Repeat",
"ne... | import java.util.ArrayList; import java.util.List; import net.fortuna.ical4j.model.Component; import net.fortuna.ical4j.model.Date; import net.fortuna.ical4j.model.TemporalAmountAdapter; import net.fortuna.ical4j.model.component.VAlarm; import net.fortuna.ical4j.model.property.Duration; import net.fortuna.ical4j.model.... | import java.util.*; import net.fortuna.ical4j.model.*; import net.fortuna.ical4j.model.component.*; import net.fortuna.ical4j.model.property.*; import org.unitedinternet.cosmo.calendar.util.*; | [
"java.util",
"net.fortuna.ical4j",
"org.unitedinternet.cosmo"
] | java.util; net.fortuna.ical4j; org.unitedinternet.cosmo; | 1,586,417 |
@Auditable(parameters = {"workflowId"})
public List<WorkflowTimer> getTimers(String workflowId);
//
// Task Management
// | @Auditable(parameters = {STR}) List<WorkflowTimer> function(String workflowId); // | /**
* Gets all active timers for the specified workflow
*
* @return the list of active timers
*/ | Gets all active timers for the specified workflow | getTimers | {
"repo_name": "daniel-he/community-edition",
"path": "projects/repository/source/java/org/alfresco/service/cmr/workflow/WorkflowService.java",
"license": "lgpl-3.0",
"size": 25805
} | [
"java.util.List",
"org.alfresco.service.Auditable"
] | import java.util.List; import org.alfresco.service.Auditable; | import java.util.*; import org.alfresco.service.*; | [
"java.util",
"org.alfresco.service"
] | java.util; org.alfresco.service; | 942,627 |
private Node parseContextTypeExpression(JsDocToken token) {
if (token == JsDocToken.QMARK) {
return newNode(Token.QMARK);
} else {
return parseBasicTypeExpression(token);
}
} | Node function(JsDocToken token) { if (token == JsDocToken.QMARK) { return newNode(Token.QMARK); } else { return parseBasicTypeExpression(token); } } | /**
* ContextTypeExpression := BasicTypeExpression | '?'
* For expressions on the right hand side of a this: or new:
*/ | ContextTypeExpression := BasicTypeExpression | '?' For expressions on the right hand side of a this: or new: | parseContextTypeExpression | {
"repo_name": "Medium/closure-compiler",
"path": "src/com/google/javascript/jscomp/parsing/JsDocInfoParser.java",
"license": "apache-2.0",
"size": 85063
} | [
"com.google.javascript.rhino.Node",
"com.google.javascript.rhino.Token"
] | import com.google.javascript.rhino.Node; import com.google.javascript.rhino.Token; | import com.google.javascript.rhino.*; | [
"com.google.javascript"
] | com.google.javascript; | 2,253,438 |
public static void objectToXMLFile(String filePath, Object obj) {
try {
JAXBContext context = JAXBContext.newInstance(obj.getClass());
Marshaller m = context.createMarshaller();
// for pretty-print XML in JAXB
m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
// Write to System.out for... | static void function(String filePath, Object obj) { try { JAXBContext context = JAXBContext.newInstance(obj.getClass()); Marshaller m = context.createMarshaller(); m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); m.marshal(obj, new File(filePath)); } catch (JAXBException e) { e.printStackTrace(); } } | /**
* Object to xml file.
*
* @param filePath the file path
* @param obj the obj
*/ | Object to xml file | objectToXMLFile | {
"repo_name": "BeliliFahem/om2m-java-client-api",
"path": "src/main/java/fr/lissi/belilif/util/jaxb/JAXBMapper.java",
"license": "epl-1.0",
"size": 3177
} | [
"java.io.File",
"javax.xml.bind.JAXBContext",
"javax.xml.bind.JAXBException",
"javax.xml.bind.Marshaller"
] | import java.io.File; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; import javax.xml.bind.Marshaller; | import java.io.*; import javax.xml.bind.*; | [
"java.io",
"javax.xml"
] | java.io; javax.xml; | 2,429,723 |
public PrivateKey getPrivateKey(InputStream is, String password) throws EnigmaException {
PrivateKey key = null;
boolean isRSAKey = false;
boolean isEncryptedRSAKey = false;
try {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
// Fake code simulating ... | PrivateKey function(InputStream is, String password) throws EnigmaException { PrivateKey key = null; boolean isRSAKey = false; boolean isEncryptedRSAKey = false; try { ByteArrayOutputStream baos = new ByteArrayOutputStream(); byte[] buffer = new byte[1024]; int len; while ((len = is.read(buffer)) > -1) { baos.write(buf... | /**
* Get a Private Key for the file.
*
* @return Private key
* @throws IOException
*/ | Get a Private Key for the file | getPrivateKey | {
"repo_name": "megaman2/enigma",
"path": "src/main/java/org/caulfield/enigma/crypto/CryptoGenerator.java",
"license": "mit",
"size": 115035
} | [
"java.io.BufferedReader",
"java.io.ByteArrayInputStream",
"java.io.ByteArrayOutputStream",
"java.io.IOException",
"java.io.InputStream",
"java.io.InputStreamReader",
"java.security.KeyFactory",
"java.security.KeyPair",
"java.security.NoSuchAlgorithmException",
"java.security.NoSuchProviderExceptio... | import java.io.BufferedReader; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.security.KeyFactory; import java.security.KeyPair; import java.security.NoSuchAlgorithmException; import java.se... | import java.io.*; import java.security.*; import java.security.spec.*; import java.util.logging.*; import javax.xml.bind.*; import org.bouncycastle.asn1.pkcs.*; import org.bouncycastle.jce.provider.*; import org.bouncycastle.openssl.*; import org.bouncycastle.openssl.jcajce.*; import org.bouncycastle.operator.*; import... | [
"java.io",
"java.security",
"java.util",
"javax.xml",
"org.bouncycastle.asn1",
"org.bouncycastle.jce",
"org.bouncycastle.openssl",
"org.bouncycastle.operator",
"org.bouncycastle.pkcs",
"org.caulfield.enigma"
] | java.io; java.security; java.util; javax.xml; org.bouncycastle.asn1; org.bouncycastle.jce; org.bouncycastle.openssl; org.bouncycastle.operator; org.bouncycastle.pkcs; org.caulfield.enigma; | 2,443,316 |
@Override
protected Object parse(final Object value, String pattern) throws ParseException {
// Handle Date
if (value instanceof java.util.Date) {
return value;
}
// Handle Calendar
if (value instanceof java.util.Calendar) {
return ((java.util.Ca... | Object function(final Object value, String pattern) throws ParseException { if (value instanceof java.util.Date) { return value; } if (value instanceof java.util.Calendar) { return ((java.util.Calendar)value).getTime(); } if (locPattern) { pattern = convertLocalizedPattern(pattern, locale); } final DateFormat formatter... | /**
* Convert the specified locale-sensitive input object into an output object of the
* specified type.
*
* @param value The input object to be converted
* @param pattern The pattern is used for the conversion
* @return the converted Date value
*
* @throws org.apache.commons.bea... | Convert the specified locale-sensitive input object into an output object of the specified type | parse | {
"repo_name": "apache/commons-beanutils",
"path": "src/main/java/org/apache/commons/beanutils2/locale/converters/DateLocaleConverter.java",
"license": "apache-2.0",
"size": 13690
} | [
"java.text.DateFormat",
"java.text.ParseException",
"java.text.ParsePosition",
"java.text.SimpleDateFormat",
"org.apache.commons.beanutils2.ConversionException"
] | import java.text.DateFormat; import java.text.ParseException; import java.text.ParsePosition; import java.text.SimpleDateFormat; import org.apache.commons.beanutils2.ConversionException; | import java.text.*; import org.apache.commons.beanutils2.*; | [
"java.text",
"org.apache.commons"
] | java.text; org.apache.commons; | 1,466,651 |
@Test
public void testEvolveDuplicateException() {
// delete the version
jdbcTemplate.execute("DELETE FROM SYSTEM_CODES where KEY_='DB_VERSION'");
// add duplicate evolve version
testList.add(new TestEvolve(3));
try {
manager.evolve();
fail("No exception ... | void function() { jdbcTemplate.execute(STR); testList.add(new TestEvolve(3)); try { manager.evolve(); fail(STR); } catch (InvalidImplementationException e) { } } | /**
* Test method for {@link org.opentides.persistence.evolve.DBEvolveManager#evolve()}.
*/ | Test method for <code>org.opentides.persistence.evolve.DBEvolveManager#evolve()</code> | testEvolveDuplicateException | {
"repo_name": "Letractively/open-tides",
"path": "test/org/opentides/persistence/evolve/DBEvolveManagerTest.java",
"license": "apache-2.0",
"size": 2300
} | [
"org.opentides.InvalidImplementationException"
] | import org.opentides.InvalidImplementationException; | import org.opentides.*; | [
"org.opentides"
] | org.opentides; | 2,004,865 |
@Override
public boolean startMigration(MigrationRequest migrationRequest)
{
log_.debug("Starting the migration procedure");
if (!changeState(SystemState.RECONFIGURATION))
{
return false;
}
try
{
migrationPlanEnforcer_... | boolean function(MigrationRequest migrationRequest) { log_.debug(STR); if (!changeState(SystemState.RECONFIGURATION)) { return false; } try { migrationPlanEnforcer_.startManualMigration(migrationRequest); } catch (Exception exception) { setIdle(); log_.debug(String.format(STR, exception.getMessage())); return false; } ... | /**
* Starts the migration of the vm.
* @param migrationRequest migrationRequest
*
*
* @return true if everything ok, false otherwise
*/ | Starts the migration of the vm | startMigration | {
"repo_name": "snoozesoftware/snoozenode",
"path": "src/main/java/org/inria/myriads/snoozenode/groupmanager/statemachine/api/impl/GroupManagerStateMachine.java",
"license": "gpl-2.0",
"size": 22092
} | [
"org.inria.myriads.snoozecommon.communication.virtualcluster.migration.MigrationRequest",
"org.inria.myriads.snoozenode.groupmanager.statemachine.SystemState"
] | import org.inria.myriads.snoozecommon.communication.virtualcluster.migration.MigrationRequest; import org.inria.myriads.snoozenode.groupmanager.statemachine.SystemState; | import org.inria.myriads.snoozecommon.communication.virtualcluster.migration.*; import org.inria.myriads.snoozenode.groupmanager.statemachine.*; | [
"org.inria.myriads"
] | org.inria.myriads; | 2,710,130 |
@Nonnull
public Category feedCategoryToDomain(@Nonnull final FeedCategory feedCategory) {
final Set<UserFieldDescriptor> userFields = categoryProvider.getUserFields();
return feedCategoryToDomain(feedCategory, userFields);
} | Category function(@Nonnull final FeedCategory feedCategory) { final Set<UserFieldDescriptor> userFields = categoryProvider.getUserFields(); return feedCategoryToDomain(feedCategory, userFields); } | /**
* Transforms the specified Feed Manager category to a Metadata category.
*
* @param feedCategory the Feed Manager category
* @return the Metadata category
*/ | Transforms the specified Feed Manager category to a Metadata category | feedCategoryToDomain | {
"repo_name": "peter-gergely-horvath/kylo",
"path": "services/feed-manager-service/feed-manager-controller/src/main/java/com/thinkbiganalytics/feedmgr/service/category/CategoryModelTransform.java",
"license": "apache-2.0",
"size": 11192
} | [
"com.thinkbiganalytics.feedmgr.rest.model.FeedCategory",
"com.thinkbiganalytics.metadata.api.category.Category",
"com.thinkbiganalytics.metadata.api.extension.UserFieldDescriptor",
"java.util.Set",
"javax.annotation.Nonnull"
] | import com.thinkbiganalytics.feedmgr.rest.model.FeedCategory; import com.thinkbiganalytics.metadata.api.category.Category; import com.thinkbiganalytics.metadata.api.extension.UserFieldDescriptor; import java.util.Set; import javax.annotation.Nonnull; | import com.thinkbiganalytics.feedmgr.rest.model.*; import com.thinkbiganalytics.metadata.api.category.*; import com.thinkbiganalytics.metadata.api.extension.*; import java.util.*; import javax.annotation.*; | [
"com.thinkbiganalytics.feedmgr",
"com.thinkbiganalytics.metadata",
"java.util",
"javax.annotation"
] | com.thinkbiganalytics.feedmgr; com.thinkbiganalytics.metadata; java.util; javax.annotation; | 52,083 |
public void updateObject(String columnName, Object x) throws SQLException {
updateObject(findColumn(columnName), x);
} | void function(String columnName, Object x) throws SQLException { updateObject(findColumn(columnName), x); } | /**
* JDBC 2.0 Update a column with an Object value. The updateXXX() methods
* are used to update column values in the current row, or the insert row.
* The updateXXX() methods do not update the underlying database, instead
* the updateRow() or insertRow() methods are called to update the database.
... | JDBC 2.0 Update a column with an Object value. The updateXXX() methods are used to update column values in the current row, or the insert row. The updateXXX() methods do not update the underlying database, instead the updateRow() or insertRow() methods are called to update the database | updateObject | {
"repo_name": "mwaylabs/mysql-connector-j",
"path": "src/com/mysql/jdbc/ResultSetImpl.java",
"license": "gpl-2.0",
"size": 288724
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,180,268 |
private int nonConflictingCommonPrefixLength(List<String> classNames) {
int index = commonPrefixLength(classNames);
// Class is referring to itself
if (index == classNames.size()) return index;
// Try to find the least-qualified non-conflicting name
for (; index > 0; index--) {
if (!parent... | int function(List<String> classNames) { int index = commonPrefixLength(classNames); if (index == classNames.size()) return index; for (; index > 0; index--) { if (!parentTypeHasMemberType(classNames.get(index), index)) { return index; } } return 0; } | /**
* Returns the common prefix of {@code classNames} and the current nesting scope which doesn't
* conflict with a type name in the current scope (any member of a parent type, except for
* {@code classNames} itself).
*/ | Returns the common prefix of classNames and the current nesting scope which doesn't conflict with a type name in the current scope (any member of a parent type, except for classNames itself) | nonConflictingCommonPrefixLength | {
"repo_name": "mumer92/javapoet",
"path": "src/main/java/com/squareup/javapoet/CodeWriter.java",
"license": "apache-2.0",
"size": 15791
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 727,513 |
protected TupleWritable createTupleWritable() {
Writable[] vals = new Writable[kids.length];
for (int i = 0; i < vals.length; ++i) {
vals[i] = kids[i].createValue();
}
return new TupleWritable(vals);
} | TupleWritable function() { Writable[] vals = new Writable[kids.length]; for (int i = 0; i < vals.length; ++i) { vals[i] = kids[i].createValue(); } return new TupleWritable(vals); } | /**
* Create a value to be used internally for joins.
*/ | Create a value to be used internally for joins | createTupleWritable | {
"repo_name": "apache/hadoop-mapreduce",
"path": "src/java/org/apache/hadoop/mapreduce/lib/join/CompositeRecordReader.java",
"license": "apache-2.0",
"size": 13909
} | [
"org.apache.hadoop.io.Writable"
] | import org.apache.hadoop.io.Writable; | import org.apache.hadoop.io.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,470,925 |
@Nullable
public MessageHeaderInitializer getHeaderInitializer() {
return this.headerInitializer;
} | MessageHeaderInitializer function() { return this.headerInitializer; } | /**
* Return the configured header initializer.
* @since 4.1
*/ | Return the configured header initializer | getHeaderInitializer | {
"repo_name": "spring-projects/spring-framework",
"path": "spring-messaging/src/main/java/org/springframework/messaging/simp/broker/SimpleBrokerMessageHandler.java",
"license": "apache-2.0",
"size": 17807
} | [
"org.springframework.messaging.support.MessageHeaderInitializer"
] | import org.springframework.messaging.support.MessageHeaderInitializer; | import org.springframework.messaging.support.*; | [
"org.springframework.messaging"
] | org.springframework.messaging; | 2,823,034 |
private void checkSparse() {
DensityResult result = AutoColumnUtils.checkDensity(data);
double thresholdDensity = management == DataManagement.AUTO ? AutoColumnUtils.THRESHOLD_HIGH_SPARSITY_DENSITY
: AutoColumnUtils.THRESHOLD_INTEGER_MEDIUM_SPARSITY_DENSITY;
if (result.density < thresholdDensity) {
dou... | void function() { DensityResult result = AutoColumnUtils.checkDensity(data); double thresholdDensity = management == DataManagement.AUTO ? AutoColumnUtils.THRESHOLD_HIGH_SPARSITY_DENSITY : AutoColumnUtils.THRESHOLD_INTEGER_MEDIUM_SPARSITY_DENSITY; if (result.density < thresholdDensity) { double defaultValue = result.mo... | /**
* Finds the most frequent value in the values set until now. If this value if frequent enough,
* it changes to a sparse representation.
*/ | Finds the most frequent value in the values set until now. If this value if frequent enough, it changes to a sparse representation | checkSparse | {
"repo_name": "aborg0/rapidminer-studio",
"path": "src/main/java/com/rapidminer/example/table/internal/IntegerAutoDenseChunk.java",
"license": "agpl-3.0",
"size": 3641
} | [
"com.rapidminer.example.table.internal.AutoColumnUtils",
"com.rapidminer.example.table.internal.IntegerAutoColumn",
"com.rapidminer.example.utils.ExampleSetBuilder"
] | import com.rapidminer.example.table.internal.AutoColumnUtils; import com.rapidminer.example.table.internal.IntegerAutoColumn; import com.rapidminer.example.utils.ExampleSetBuilder; | import com.rapidminer.example.table.internal.*; import com.rapidminer.example.utils.*; | [
"com.rapidminer.example"
] | com.rapidminer.example; | 2,482,917 |
public void setModel(TableModel tableModel, IBaseLabelProvider labelProvider)
{
Validate.notNull(tableModel);
this.tableModel = tableModel;
createColumns(tableModel);
setTableLableProvider(labelProvider);
initTable(tableModel);
// Set the sorter for t... | void function(TableModel tableModel, IBaseLabelProvider labelProvider) { Validate.notNull(tableModel); this.tableModel = tableModel; createColumns(tableModel); setTableLableProvider(labelProvider); initTable(tableModel); tableSorter = new DefaultTableSorter(); this.setSorter(tableSorter); } | /**
* Sets the tableModel property
*
* @param tableModel the tableModel to set
* @param labelProvider Label provider to initialize each cell of table, e.g. color, font and image. <br>
* For default set {@link DefLabelProvider}, else create your own provider. Can be null. <br>
... | Sets the tableModel property | setModel | {
"repo_name": "prowim/prowim",
"path": "ebcot-rap-framework/src/org/prowim/rap/framework/components/table/DefTableViewer.java",
"license": "gpl-3.0",
"size": 9363
} | [
"org.apache.commons.lang.Validate",
"org.eclipse.jface.viewers.IBaseLabelProvider"
] | import org.apache.commons.lang.Validate; import org.eclipse.jface.viewers.IBaseLabelProvider; | import org.apache.commons.lang.*; import org.eclipse.jface.viewers.*; | [
"org.apache.commons",
"org.eclipse.jface"
] | org.apache.commons; org.eclipse.jface; | 2,001,033 |
@Test
public void testWithMetadata() {
JsonObject metadata = JsonUtils.parseJsonString("{'a': 1, 'b': 2, c: {'d': 4}}").getAsJsonObject();
Machine original = Machine.builder().id("i-1").machineState(MachineState.RUNNING).cloudProvider("AWS-EC2")
.region("us-east-1").machineSize("... | void function() { JsonObject metadata = JsonUtils.parseJsonString(STR).getAsJsonObject(); Machine original = Machine.builder().id("i-1").machineState(MachineState.RUNNING).cloudProvider(STR) .region(STR).machineSize(STR).membershipStatus(new MembershipStatus(true, false)) .requestTime(UtcTime.parse(STR)).launchTime(Utc... | /**
* Tests {@link Machine} copying through the
* {@link Machine#withMetadata(JsonObject)} method.
*/ | Tests <code>Machine</code> copying through the <code>Machine#withMetadata(JsonObject)</code> method | testWithMetadata | {
"repo_name": "elastisys/scale.cloudpool",
"path": "api/src/test/java/com/elastisys/scale/cloudpool/api/types/TestMachine.java",
"license": "apache-2.0",
"size": 15668
} | [
"com.elastisys.scale.commons.json.JsonUtils",
"com.elastisys.scale.commons.util.time.UtcTime",
"com.google.gson.JsonObject",
"org.hamcrest.CoreMatchers",
"org.junit.Assert"
] | import com.elastisys.scale.commons.json.JsonUtils; import com.elastisys.scale.commons.util.time.UtcTime; import com.google.gson.JsonObject; import org.hamcrest.CoreMatchers; import org.junit.Assert; | import com.elastisys.scale.commons.json.*; import com.elastisys.scale.commons.util.time.*; import com.google.gson.*; import org.hamcrest.*; import org.junit.*; | [
"com.elastisys.scale",
"com.google.gson",
"org.hamcrest",
"org.junit"
] | com.elastisys.scale; com.google.gson; org.hamcrest; org.junit; | 1,094,876 |
@Idempotent
public Token<DelegationTokenIdentifier> getDelegationToken(Text renewer)
throws IOException; | Token<DelegationTokenIdentifier> function(Text renewer) throws IOException; | /**
* Get a valid Delegation Token.
*
* @param renewer the designated renewer for the token
* @return Token<DelegationTokenIdentifier>
* @throws IOException
*/ | Get a valid Delegation Token | getDelegationToken | {
"repo_name": "bysslord/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java",
"license": "apache-2.0",
"size": 58964
} | [
"java.io.IOException",
"org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenIdentifier",
"org.apache.hadoop.io.Text",
"org.apache.hadoop.security.token.Token"
] | import java.io.IOException; import org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenIdentifier; import org.apache.hadoop.io.Text; import org.apache.hadoop.security.token.Token; | import java.io.*; import org.apache.hadoop.hdfs.security.token.delegation.*; import org.apache.hadoop.io.*; import org.apache.hadoop.security.token.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 2,063,239 |
public ResultSet getCarsWithParams(String make, String carType, String model){
if(make!=null)
make = make.toUpperCase();
if(carType!=null)
carType = carType.toUpperCase();
if(make!=null)
make = make.toUpperCase();
ResultSet rs;
String query = "SELECT * FROM cars WHERE ";
if(make != null){
... | ResultSet function(String make, String carType, String model){ if(make!=null) make = make.toUpperCase(); if(carType!=null) carType = carType.toUpperCase(); if(make!=null) make = make.toUpperCase(); ResultSet rs; String query = STR; if(make != null){ query += STR + make + STR; if(carType!=null){ query += STR +carType+"\... | /**
* Finds cars with specified attributes
* @param make a type of car manufacturer.
* @param carType the type of the car.
* @param model a type of car model.
*
* @return ResultSet containing the cars with the filter(s) applied.
*/ | Finds cars with specified attributes | getCarsWithParams | {
"repo_name": "connorbkirk/ryde",
"path": "Ryde/src/persistlayer/CarPersistImpl.java",
"license": "mit",
"size": 8737
} | [
"java.sql.ResultSet"
] | import java.sql.ResultSet; | import java.sql.*; | [
"java.sql"
] | java.sql; | 478,010 |
public final ThreadMetadata threadMetadata() {
return threadMetadata;
} | final ThreadMetadata function() { return threadMetadata; } | /**
* Return information about the current {@link StreamThread}.
*
* @return {@link ThreadMetadata}.
*/ | Return information about the current <code>StreamThread</code> | threadMetadata | {
"repo_name": "sslavic/kafka",
"path": "streams/src/main/java/org/apache/kafka/streams/processor/internals/StreamThread.java",
"license": "apache-2.0",
"size": 45698
} | [
"org.apache.kafka.streams.processor.ThreadMetadata"
] | import org.apache.kafka.streams.processor.ThreadMetadata; | import org.apache.kafka.streams.processor.*; | [
"org.apache.kafka"
] | org.apache.kafka; | 636,246 |
public static Object getRequiredSessionAttribute(HttpServletRequest request, String name)
throws IllegalStateException {
Object attr = getSessionAttribute(request, name);
if (attr == null) {
throw new IllegalStateException("No session attribute '" + name + "' found");
}
return attr;
} | static Object function(HttpServletRequest request, String name) throws IllegalStateException { Object attr = getSessionAttribute(request, name); if (attr == null) { throw new IllegalStateException(STR + name + STR); } return attr; } | /**
* Check the given request for a session attribute of the given name.
* Throws an exception if there is no session or if the session has no such
* attribute. Does not create a new session if none has existed before!
* @param request current HTTP request
* @param name the name of the session attribute
* @... | Check the given request for a session attribute of the given name. Throws an exception if there is no session or if the session has no such attribute. Does not create a new session if none has existed before | getRequiredSessionAttribute | {
"repo_name": "jhstatewide/jruby-rack",
"path": "src/spec/java/org/jruby/rack/mock/WebUtils.java",
"license": "mit",
"size": 30744
} | [
"javax.servlet.http.HttpServletRequest"
] | import javax.servlet.http.HttpServletRequest; | import javax.servlet.http.*; | [
"javax.servlet"
] | javax.servlet; | 2,317,089 |
LabelEntity getLabel(String labelId); | LabelEntity getLabel(String labelId); | /**
* Gets the specified label.
*
* @param labelId The label id
* @return The label transfer object
*/ | Gets the specified label | getLabel | {
"repo_name": "WilliamNouet/nifi",
"path": "nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/main/java/org/apache/nifi/web/NiFiServiceFacade.java",
"license": "apache-2.0",
"size": 53848
} | [
"org.apache.nifi.web.api.entity.LabelEntity"
] | import org.apache.nifi.web.api.entity.LabelEntity; | import org.apache.nifi.web.api.entity.*; | [
"org.apache.nifi"
] | org.apache.nifi; | 125,595 |
public static IndexReader subReader(int doc, IndexReader reader) {
List<IndexReader> subReadersList = new ArrayList<IndexReader>();
ReaderUtil.gatherSubReaders(subReadersList, reader);
IndexReader[] subReaders = subReadersList
.toArray(new IndexReader[subReadersList.size()]);
int[] docStarts =... | static IndexReader function(int doc, IndexReader reader) { List<IndexReader> subReadersList = new ArrayList<IndexReader>(); ReaderUtil.gatherSubReaders(subReadersList, reader); IndexReader[] subReaders = subReadersList .toArray(new IndexReader[subReadersList.size()]); int[] docStarts = new int[subReaders.length]; int m... | /**
* Returns sub IndexReader that contains the given document id.
*
* @param doc id of document
* @param reader parent reader
* @return sub reader of parent which contains the specified doc id
*/ | Returns sub IndexReader that contains the given document id | subReader | {
"repo_name": "sluk3r/lucene-3.0.2-src-study",
"path": "src/java/org/apache/lucene/util/ReaderUtil.java",
"license": "apache-2.0",
"size": 3643
} | [
"java.util.ArrayList",
"java.util.List",
"org.apache.lucene.index.IndexReader"
] | import java.util.ArrayList; import java.util.List; import org.apache.lucene.index.IndexReader; | import java.util.*; import org.apache.lucene.index.*; | [
"java.util",
"org.apache.lucene"
] | java.util; org.apache.lucene; | 1,847,888 |
public synchronized Any create_any()
{
checkShutdownState();
return new AnyImpl(this);
}
// TypeCodeFactory interface methods.
// Keeping track of type codes by repository id.
// Keeping a cache of TypeCodes associated with the class
// they got created from in Util.writeAn... | synchronized Any function() { checkShutdownState(); return new AnyImpl(this); } | /**
* Create a new Any
*
* @return the new Any created.
*/ | Create a new Any | create_any | {
"repo_name": "karianna/jdk8_tl",
"path": "corba/src/share/classes/com/sun/corba/se/impl/orb/ORBImpl.java",
"license": "gpl-2.0",
"size": 70534
} | [
"com.sun.corba.se.impl.corba.AnyImpl",
"org.omg.CORBA"
] | import com.sun.corba.se.impl.corba.AnyImpl; import org.omg.CORBA; | import com.sun.corba.se.impl.corba.*; import org.omg.*; | [
"com.sun.corba",
"org.omg"
] | com.sun.corba; org.omg; | 2,265,773 |
public ISingleItemSubscriberStream newSingleItemSubscriberStream(int streamId) {
// TODO implement it
return null;
}
| ISingleItemSubscriberStream function(int streamId) { return null; } | /**
* {@inheritDoc} To be implemented.
*/ | To be implemented | newSingleItemSubscriberStream | {
"repo_name": "OpenCorrelate/red5load",
"path": "red5/src/main/java/org/red5/server/net/rtmp/RTMPConnection.java",
"license": "lgpl-3.0",
"size": 29674
} | [
"org.red5.server.api.stream.ISingleItemSubscriberStream"
] | import org.red5.server.api.stream.ISingleItemSubscriberStream; | import org.red5.server.api.stream.*; | [
"org.red5.server"
] | org.red5.server; | 2,772,453 |
public static boolean exportFeedbackAsTxtAndJson(File dir, List<Feedback> feedbackList) {
// Should strip out any weird stuff from derived list types/concurrency issues.
ArrayList<Feedback> tempList = new ArrayList<>();
tempList.addAll(feedbackList);
File file = showDirectoryChooser(dir);
if (fil... | static boolean function(File dir, List<Feedback> feedbackList) { ArrayList<Feedback> tempList = new ArrayList<>(); tempList.addAll(feedbackList); File file = showDirectoryChooser(dir); if (file == null) return false; String json = gson.toJson(tempList); try { File jsonFile; jsonFile = new File(new URI(file.toURI().toSt... | /**
* Export a List of feedback as individual .txt files, and as a single .json for later import.
*
* @param dir Initial directory.
* @param feedbackList A list of Feedback to export as individual .txt and a single .json
* @return {@code true} if export was successful, {@code false} otherwise.
*/ | Export a List of feedback as individual .txt files, and as a single .json for later import | exportFeedbackAsTxtAndJson | {
"repo_name": "whisp91/CopyPasta",
"path": "src/main/resources/examples/import_me/group4/model/IO.java",
"license": "mit",
"size": 19172
} | [
"java.io.File",
"java.util.ArrayList",
"java.util.List"
] | import java.io.File; import java.util.ArrayList; import java.util.List; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 554,975 |
@SuppressWarnings("unchecked")
public static <E> Comparator<E> chainedComparator(final Collection<Comparator<E>> comparators) {
return chainedComparator(
comparators.toArray(EMPTY_COMPARATOR_ARRAY)
);
} | @SuppressWarnings(STR) static <E> Comparator<E> function(final Collection<Comparator<E>> comparators) { return chainedComparator( comparators.toArray(EMPTY_COMPARATOR_ARRAY) ); } | /**
* Gets a comparator that compares using a collection of {@link Comparator}s,
* applied in (default iterator) sequence until one returns not equal or the
* collection is exhausted.
*
* @param <E> the object type to compare
* @param comparators the comparators to use, not null or empty... | Gets a comparator that compares using a collection of <code>Comparator</code>s, applied in (default iterator) sequence until one returns not equal or the collection is exhausted | chainedComparator | {
"repo_name": "apache/commons-collections",
"path": "src/main/java/org/apache/commons/collections4/ComparatorUtils.java",
"license": "apache-2.0",
"size": 9423
} | [
"java.util.Collection",
"java.util.Comparator"
] | import java.util.Collection; import java.util.Comparator; | import java.util.*; | [
"java.util"
] | java.util; | 2,819,222 |
public final Property<ComputationTargetResolver> targetResolver() {
return metaBean().targetResolver().createProperty(this);
} | final Property<ComputationTargetResolver> function() { return metaBean().targetResolver().createProperty(this); } | /**
* Gets the the {@code targetResolver} property.
* @return the property, not null
*/ | Gets the the targetResolver property | targetResolver | {
"repo_name": "McLeodMoores/starling",
"path": "projects/component/src/main/java/com/opengamma/component/factory/engine/MinimalEngineContextsComponentFactory.java",
"license": "apache-2.0",
"size": 53677
} | [
"com.opengamma.engine.ComputationTargetResolver",
"org.joda.beans.Property"
] | import com.opengamma.engine.ComputationTargetResolver; import org.joda.beans.Property; | import com.opengamma.engine.*; import org.joda.beans.*; | [
"com.opengamma.engine",
"org.joda.beans"
] | com.opengamma.engine; org.joda.beans; | 1,820,481 |
@Override
public Map getValuesMap() {
Map valuesMap = super.getValuesMap();
// remove document number
valuesMap.remove(KFSPropertyConstants.DOCUMENT_NUMBER);
return valuesMap;
} | Map function() { Map valuesMap = super.getValuesMap(); valuesMap.remove(KFSPropertyConstants.DOCUMENT_NUMBER); return valuesMap; } | /**
* Overridden to use purap doc identifier, rather than document number
* @see org.kuali.kfs.sys.businessobject.AccountingLineBase#getValuesMap()
*/ | Overridden to use purap doc identifier, rather than document number | getValuesMap | {
"repo_name": "bhutchinson/kfs",
"path": "kfs-purap/src/main/java/org/kuali/kfs/module/purap/businessobject/PurApAccountingLineBase.java",
"license": "agpl-3.0",
"size": 10922
} | [
"java.util.Map",
"org.kuali.kfs.sys.KFSPropertyConstants"
] | import java.util.Map; import org.kuali.kfs.sys.KFSPropertyConstants; | import java.util.*; import org.kuali.kfs.sys.*; | [
"java.util",
"org.kuali.kfs"
] | java.util; org.kuali.kfs; | 392,713 |
public static Certificate[] verifySignature(InputStream signature, InputStream
signatureBlock) throws IOException, GeneralSecurityException {
BerInputStream bis = new BerInputStream(signatureBlock);
ContentInfo info = (ContentInfo)ContentInfo.ASN1.decode(bis);
SignedData signedD... | static Certificate[] function(InputStream signature, InputStream signatureBlock) throws IOException, GeneralSecurityException { BerInputStream bis = new BerInputStream(signatureBlock); ContentInfo info = (ContentInfo)ContentInfo.ASN1.decode(bis); SignedData signedData = info.getSignedData(); if (signedData == null) { t... | /**
* This method handle all the work with PKCS7, ASN1 encoding, signature verifying,
* and certification path building.
* See also PKCS #7: Cryptographic Message Syntax Standard:
* http://www.ietf.org/rfc/rfc2315.txt
* @param signature - the input stream of signature file to be verified
... | This method handle all the work with PKCS7, ASN1 encoding, signature verifying, and certification path building. See also PKCS #7: Cryptographic Message Syntax Standard: HREF | verifySignature | {
"repo_name": "openweave/openweave-core",
"path": "third_party/android/platform-libcore/android-platform-libcore/luni/src/main/java/org/apache/harmony/security/utils/JarUtils.java",
"license": "apache-2.0",
"size": 8635
} | [
"java.io.IOException",
"java.io.InputStream",
"java.math.BigInteger",
"java.security.GeneralSecurityException",
"java.security.MessageDigest",
"java.security.NoSuchAlgorithmException",
"java.security.Signature",
"java.security.cert.Certificate",
"java.security.cert.X509Certificate",
"java.util.Arr... | import java.io.IOException; import java.io.InputStream; import java.math.BigInteger; import java.security.GeneralSecurityException; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; import java.security.Signature; import java.security.cert.Certificate; import java.security.cert.X509Cert... | import java.io.*; import java.math.*; import java.security.*; import java.security.cert.*; import java.util.*; import javax.security.auth.x500.*; import org.apache.harmony.security.asn1.*; import org.apache.harmony.security.pkcs7.*; import org.apache.harmony.security.provider.cert.*; import org.apache.harmony.security.... | [
"java.io",
"java.math",
"java.security",
"java.util",
"javax.security",
"org.apache.harmony"
] | java.io; java.math; java.security; java.util; javax.security; org.apache.harmony; | 2,051,837 |
protected static void createFile(IgfsSecondaryFileSystem igfs, IgfsPath file, boolean overwrite, @Nullable byte[]... chunks)
throws IOException {
OutputStream os = null;
try {
os = igfs.create(file, overwrite);
writeFileChunks(os, chunks);
}
finally ... | static void function(IgfsSecondaryFileSystem igfs, IgfsPath file, boolean overwrite, @Nullable byte[]... chunks) throws IOException { OutputStream os = null; try { os = igfs.create(file, overwrite); writeFileChunks(os, chunks); } finally { U.closeQuiet(os); awaitFileClose(igfs, file); } } | /**
* Create the file in the given IGFS and write provided data chunks to it.
*
* @param igfs IGFS.
* @param file File.
* @param overwrite Overwrite flag.
* @param chunks Data chunks.
* @throws IOException In case of IO exception.
*/ | Create the file in the given IGFS and write provided data chunks to it | createFile | {
"repo_name": "agura/incubator-ignite",
"path": "modules/core/src/test/java/org/apache/ignite/internal/processors/igfs/IgfsAbstractSelfTest.java",
"license": "apache-2.0",
"size": 103094
} | [
"java.io.IOException",
"java.io.OutputStream",
"org.apache.ignite.igfs.IgfsPath",
"org.apache.ignite.igfs.secondary.IgfsSecondaryFileSystem",
"org.apache.ignite.internal.util.typedef.internal.U",
"org.jetbrains.annotations.Nullable"
] | import java.io.IOException; import java.io.OutputStream; import org.apache.ignite.igfs.IgfsPath; import org.apache.ignite.igfs.secondary.IgfsSecondaryFileSystem; import org.apache.ignite.internal.util.typedef.internal.U; import org.jetbrains.annotations.Nullable; | import java.io.*; import org.apache.ignite.igfs.*; import org.apache.ignite.igfs.secondary.*; import org.apache.ignite.internal.util.typedef.internal.*; import org.jetbrains.annotations.*; | [
"java.io",
"org.apache.ignite",
"org.jetbrains.annotations"
] | java.io; org.apache.ignite; org.jetbrains.annotations; | 1,594,135 |
T message;
while (true){
try {
message = receiveChannel.receive();
for (Iterator<SendChannel<T>> sendChannelIterator = sendChannels.iterator(); sendChannelIterator.hasNext();){
try {
sendChannelIterator.next().send(message);... | T message; while (true){ try { message = receiveChannel.receive(); for (Iterator<SendChannel<T>> sendChannelIterator = sendChannels.iterator(); sendChannelIterator.hasNext();){ try { sendChannelIterator.next().send(message); } catch (ChannelClosedException channelClosedException){ sendChannelIterator.remove(); } } } ca... | /**
* executes a loop which is constantly trying to receive on the {@link ReceiveChannel}
* and send it to the {@link SendChannel}s. It only sends on those channels which are
* open.
*/ | executes a loop which is constantly trying to receive on the <code>ReceiveChannel</code> and send it to the <code>SendChannel</code>s. It only sends on those channels which are open | run | {
"repo_name": "mrphoebs/Lois",
"path": "src/main/java/com/flipkart/lois/relay/MulticastRelay.java",
"license": "apache-2.0",
"size": 2780
} | [
"com.flipkart.lois.channel.api.SendChannel",
"com.flipkart.lois.channel.exceptions.ChannelClosedException",
"java.util.Iterator"
] | import com.flipkart.lois.channel.api.SendChannel; import com.flipkart.lois.channel.exceptions.ChannelClosedException; import java.util.Iterator; | import com.flipkart.lois.channel.api.*; import com.flipkart.lois.channel.exceptions.*; import java.util.*; | [
"com.flipkart.lois",
"java.util"
] | com.flipkart.lois; java.util; | 620,625 |
protected void drawHorizontalItem(Graphics2D g2,
CategoryItemRendererState state,
Rectangle2D dataArea,
CategoryPlot plot,
CategoryAxis domainAxis,
... | void function(Graphics2D g2, CategoryItemRendererState state, Rectangle2D dataArea, CategoryPlot plot, CategoryAxis domainAxis, ValueAxis rangeAxis, StatisticalCategoryDataset dataset, int row, int column) { RectangleEdge xAxisLocation = plot.getDomainAxisEdge(); double rectY = domainAxis.getCategoryStart( column, getC... | /**
* Draws an item for a plot with a horizontal orientation.
*
* @param g2 the graphics device.
* @param state the renderer state.
* @param dataArea the data area.
* @param plot the plot.
* @param domainAxis the domain axis.
* @param rangeAxis the range axis.
* @para... | Draws an item for a plot with a horizontal orientation | drawHorizontalItem | {
"repo_name": "raedle/univis",
"path": "lib/jfreechart-1.0.1/src/org/jfree/chart/renderer/category/StatisticalBarRenderer.java",
"license": "lgpl-2.1",
"size": 16890
} | [
"java.awt.Graphics2D",
"java.awt.Paint",
"java.awt.geom.Line2D",
"java.awt.geom.Rectangle2D",
"org.jfree.chart.axis.CategoryAxis",
"org.jfree.chart.axis.ValueAxis",
"org.jfree.chart.plot.CategoryPlot",
"org.jfree.data.statistics.StatisticalCategoryDataset",
"org.jfree.ui.RectangleEdge"
] | import java.awt.Graphics2D; import java.awt.Paint; import java.awt.geom.Line2D; import java.awt.geom.Rectangle2D; import org.jfree.chart.axis.CategoryAxis; import org.jfree.chart.axis.ValueAxis; import org.jfree.chart.plot.CategoryPlot; import org.jfree.data.statistics.StatisticalCategoryDataset; import org.jfree.ui.Re... | import java.awt.*; import java.awt.geom.*; import org.jfree.chart.axis.*; import org.jfree.chart.plot.*; import org.jfree.data.statistics.*; import org.jfree.ui.*; | [
"java.awt",
"org.jfree.chart",
"org.jfree.data",
"org.jfree.ui"
] | java.awt; org.jfree.chart; org.jfree.data; org.jfree.ui; | 1,479,413 |
try {
if (args.length != 5) {
System.err.println("Usage: java FindSTS lpc_min lpc_range "
+ "lpcFile waveFile stsFile");
} else {
float lpc_min = Float.parseFloat(args[0]);
float lpc_range = Float.parseFloat(args[1]);
... | try { if (args.length != 5) { System.err.println(STR + STR); } else { float lpc_min = Float.parseFloat(args[0]); float lpc_range = Float.parseFloat(args[1]); FileInputStream lpcFile = new FileInputStream(args[2]); FileInputStream waveFile = new FileInputStream(args[3]); FileOutputStream stsFile = new FileOutputStream(a... | /**
* Generate an sts file
*
* <p>
* <b>Usage</b>
* </p>
* <p>
* <code> java FindSTS lpc_min lpc_range lpcFile waveFile stsFile
* </code>
* </p>
* <p>
* <code> stsFile </code> the output file.
* </p>
*/ | Generate an sts file Usage <code> java FindSTS lpc_min lpc_range lpcFile waveFile stsFile </code> <code> stsFile </code> the output file. | main | {
"repo_name": "edwardtoday/PolyU_MScST",
"path": "COMP5517/JavaSpeech/freetts-1.2.2-src/freetts-1.2.2/tools/FestVoxToFreeTTS/FindSTS.java",
"license": "mit",
"size": 30039
} | [
"java.io.DataInputStream",
"java.io.FileInputStream",
"java.io.FileNotFoundException",
"java.io.FileOutputStream",
"java.io.IOException",
"java.io.OutputStreamWriter"
] | import java.io.DataInputStream; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStreamWriter; | import java.io.*; | [
"java.io"
] | java.io; | 534,515 |
@NonNull
static Map<Class<?>, EventHandlersCacheItem> scanForEventHandlers(@NonNull final Class<?> subscriberClass) {
//NOTE this Map is created once and never modified afterwards. It will be read in many threads later, no synchronisation.
//I think it is safe to use the HashMap, the ConcurrentH... | static Map<Class<?>, EventHandlersCacheItem> scanForEventHandlers(@NonNull final Class<?> subscriberClass) { Map<Class<?>, EventHandlersCacheItem> eventHandlers = new HashMap<>(); for (Method method : subscriberClass.getDeclaredMethods()) { if (method.isBridge()) { continue; } Subscribe annotation = method.getAnnotatio... | /**
* Scans single level of the subscriber class, finds any method annotated with the @Subscribe annotation,
* builds a Map for cache.
*/ | Scans single level of the subscriber class, finds any method annotated with the @Subscribe annotation, builds a Map for cache | scanForEventHandlers | {
"repo_name": "PGSSoft/gimBUS",
"path": "eventbus/src/main/java/com/pgssoft/gimbus/Cache.java",
"license": "mit",
"size": 9364
} | [
"android.support.annotation.NonNull",
"java.lang.reflect.Method",
"java.util.HashMap",
"java.util.Map"
] | import android.support.annotation.NonNull; import java.lang.reflect.Method; import java.util.HashMap; import java.util.Map; | import android.support.annotation.*; import java.lang.reflect.*; import java.util.*; | [
"android.support",
"java.lang",
"java.util"
] | android.support; java.lang; java.util; | 1,999,931 |
@Override
protected final void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
processRequest(request, response);
}
| final void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); } | /**
* Delegate GET requests to processRequest/doService.
* <p>Will also be invoked by HttpServlet's default implementation of {@code doHead},
* with a {@code NoBodyResponse} that just captures the content length.
* @see #doService
* @see #doHead
*/ | Delegate GET requests to processRequest/doService. Will also be invoked by HttpServlet's default implementation of doHead, with a NoBodyResponse that just captures the content length | doGet | {
"repo_name": "bbossgroups/bbossgroups-3.5",
"path": "bboss-mvc/src/org/frameworkset/web/servlet/BaseServlet.java",
"license": "apache-2.0",
"size": 15276
} | [
"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; | 2,365,259 |
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedIterable<ConnectedClusterInner> list() {
return new PagedIterable<>(listAsync());
} | @ServiceMethod(returns = ReturnType.COLLECTION) PagedIterable<ConnectedClusterInner> function() { return new PagedIterable<>(listAsync()); } | /**
* API to enumerate registered connected K8s clusters under a Subscription.
*
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked exceptions if the request fails to be sent.
* @return the paginated list of connected ... | API to enumerate registered connected K8s clusters under a Subscription | list | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/hybridkubernetes/azure-resourcemanager-hybridkubernetes/src/main/java/com/azure/resourcemanager/hybridkubernetes/implementation/ConnectedClustersClientImpl.java",
"license": "mit",
"size": 82942
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedIterable",
"com.azure.resourcemanager.hybridkubernetes.fluent.models.ConnectedClusterInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedIterable; import com.azure.resourcemanager.hybridkubernetes.fluent.models.ConnectedClusterInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.hybridkubernetes.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 402,725 |
@Override
public void addHostedLocators(InternalDistributedMember member, Collection<String> locators,
boolean isSharedConfigurationEnabled) {
synchronized (membersLock) {
if (locators == null || locators.isEmpty()) {
throw new IllegalArgumentException("Cannot use empty collection of locator... | void function(InternalDistributedMember member, Collection<String> locators, boolean isSharedConfigurationEnabled) { synchronized (membersLock) { if (locators == null locators.isEmpty()) { throw new IllegalArgumentException(STR); } if (hostedLocatorsAll.isEmpty()) { hostedLocatorsAll = new HashMap<>(); } Map<InternalDi... | /**
* Adds the entry in {@link #hostedLocatorsAll} for a member with one or more hosted locators. The
* value is a collection of host[port] strings. If a bind-address was used for a locator then the
* form is bind-addr[port].
*
* @since GemFire 6.6.3
*/ | Adds the entry in <code>#hostedLocatorsAll</code> for a member with one or more hosted locators. The value is a collection of host[port] strings. If a bind-address was used for a locator then the form is bind-addr[port] | addHostedLocators | {
"repo_name": "jdeppe-pivotal/geode",
"path": "geode-core/src/main/java/org/apache/geode/distributed/internal/ClusterDistributionManager.java",
"license": "apache-2.0",
"size": 94410
} | [
"java.util.Collection",
"java.util.Collections",
"java.util.HashMap",
"java.util.Map",
"org.apache.geode.distributed.internal.membership.InternalDistributedMember"
] | import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.Map; import org.apache.geode.distributed.internal.membership.InternalDistributedMember; | import java.util.*; import org.apache.geode.distributed.internal.membership.*; | [
"java.util",
"org.apache.geode"
] | java.util; org.apache.geode; | 1,728,142 |
Properties getProperties(); | Properties getProperties(); | /**
* The properties of the module
*
* @return an non null Properties object
*/ | The properties of the module | getProperties | {
"repo_name": "republique-et-canton-de-geneve/chvote-1-0",
"path": "commons-base/commons-properties/src/main/java/ch/ge/ve/commons/properties/PropertyConfigurationProvider.java",
"license": "agpl-3.0",
"size": 1283
} | [
"java.util.Properties"
] | import java.util.Properties; | import java.util.*; | [
"java.util"
] | java.util; | 264,162 |
@Override
public int[] predict(INDArray input) {
INDArray output = output(input);
int[] ret = new int[input.rows()];
for (int i = 0; i < ret.length; i++)
ret[i] = Nd4j.getBlasWrapper().iamax(output.getRow(i));
return ret;
} | int[] function(INDArray input) { INDArray output = output(input); int[] ret = new int[input.rows()]; for (int i = 0; i < ret.length; i++) ret[i] = Nd4j.getBlasWrapper().iamax(output.getRow(i)); return ret; } | /**
* Returns the predictions for each example in the dataset
* @param input the matrix to predict
* @return the prediction for the dataset
*/ | Returns the predictions for each example in the dataset | predict | {
"repo_name": "shuodata/deeplearning4j",
"path": "deeplearning4j-nn/src/main/java/org/deeplearning4j/nn/layers/LossLayer.java",
"license": "apache-2.0",
"size": 13174
} | [
"org.nd4j.linalg.api.ndarray.INDArray",
"org.nd4j.linalg.factory.Nd4j"
] | import org.nd4j.linalg.api.ndarray.INDArray; import org.nd4j.linalg.factory.Nd4j; | import org.nd4j.linalg.api.ndarray.*; import org.nd4j.linalg.factory.*; | [
"org.nd4j.linalg"
] | org.nd4j.linalg; | 2,010,280 |
void setSubstitutableNodeType(QName value); | void setSubstitutableNodeType(QName value); | /**
* Sets the value of the '{@link tosca.TServiceTemplate#getSubstitutableNodeType <em>Substitutable Node Type</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Substitutable Node Type</em>' attribute.
* @see #getSubstitutableNodeType()
* @generate... | Sets the value of the '<code>tosca.TServiceTemplate#getSubstitutableNodeType Substitutable Node Type</code>' attribute. | setSubstitutableNodeType | {
"repo_name": "patrickneubauer/XMLIntellEdit",
"path": "use-cases/TOSCA/eu.artist.tosca/src/tosca/TServiceTemplate.java",
"license": "mit",
"size": 8200
} | [
"javax.xml.namespace.QName"
] | import javax.xml.namespace.QName; | import javax.xml.namespace.*; | [
"javax.xml"
] | javax.xml; | 2,324,933 |
void saveLastStoreAlias(String cmd, Map<String, String> metaData) {
if (cmd.toUpperCase().startsWith("STORE")) {
Pattern outputFile = Pattern.compile("STORE +([^']+) INTO.*", Pattern.CASE_INSENSITIVE);
Matcher matcher = outputFile.matcher(cmd);
if (matcher.matches()) {
metaData.put("LAST... | void saveLastStoreAlias(String cmd, Map<String, String> metaData) { if (cmd.toUpperCase().startsWith("STORE")) { Pattern outputFile = Pattern.compile(STR, Pattern.CASE_INSENSITIVE); Matcher matcher = outputFile.matcher(cmd); if (matcher.matches()) { metaData.put(STR, matcher.group(1)); } } } | /**
* Saves the name of the alias of the last store.
*
* <p>Maybe better to replace it by PigServer.getPigContext().getLastAlias().
*/ | Saves the name of the alias of the last store. Maybe better to replace it by PigServer.getPigContext().getLastAlias() | saveLastStoreAlias | {
"repo_name": "kaituo/sedge",
"path": "trunk/test/org/apache/pig/pigunit/pig/GruntParser.java",
"license": "mit",
"size": 3596
} | [
"java.util.Map",
"java.util.regex.Matcher",
"java.util.regex.Pattern"
] | import java.util.Map; import java.util.regex.Matcher; import java.util.regex.Pattern; | import java.util.*; import java.util.regex.*; | [
"java.util"
] | java.util; | 672,654 |
public MultiCurrencyAmount forecastValue(ResolvedSwap swap, RatesProvider provider) {
return swapValue(provider, swap, legPricer::forecastValueInternal);
} | MultiCurrencyAmount function(ResolvedSwap swap, RatesProvider provider) { return swapValue(provider, swap, legPricer::forecastValueInternal); } | /**
* Calculates the forecast value of the swap product.
* <p>
* The forecast value of the product is the value on the valuation date without present value discounting.
* The result is expressed using the payment currency of each leg.
*
* @param swap the product
* @param provider the rates provi... | Calculates the forecast value of the swap product. The forecast value of the product is the value on the valuation date without present value discounting. The result is expressed using the payment currency of each leg | forecastValue | {
"repo_name": "ChinaQuants/Strata",
"path": "modules/pricer/src/main/java/com/opengamma/strata/pricer/swap/DiscountingSwapProductPricer.java",
"license": "apache-2.0",
"size": 24609
} | [
"com.opengamma.strata.basics.currency.MultiCurrencyAmount",
"com.opengamma.strata.pricer.rate.RatesProvider",
"com.opengamma.strata.product.swap.ResolvedSwap"
] | import com.opengamma.strata.basics.currency.MultiCurrencyAmount; import com.opengamma.strata.pricer.rate.RatesProvider; import com.opengamma.strata.product.swap.ResolvedSwap; | import com.opengamma.strata.basics.currency.*; import com.opengamma.strata.pricer.rate.*; import com.opengamma.strata.product.swap.*; | [
"com.opengamma.strata"
] | com.opengamma.strata; | 2,748,806 |
public void testCase01_connectApi() throws NoSuchFieldException, IllegalArgumentException,
IllegalAccessException, RemoteException, InterruptedException {
Logger.d(TAG, "testCase01_connectApi()");
assertNotNull(mFlightModeApi);
IFlightMode flightMode = null;
mFlightModeAp... | void function() throws NoSuchFieldException, IllegalArgumentException, IllegalAccessException, RemoteException, InterruptedException { Logger.d(TAG, STR); assertNotNull(mFlightModeApi); IFlightMode flightMode = null; mFlightModeApi.doRegister(0); assertNull(flightMode); waitForFlightModeApiConnected(); mFlightModeApi.c... | /**
* Test connectApi()
* @throws NoSuchFieldException
* @throws IllegalArgumentException
* @throws IllegalAccessException
* @throws RemoteException
* @throws InterruptedException
*/ | Test connectApi() | testCase01_connectApi | {
"repo_name": "rex-xxx/mt6572_x201",
"path": "mediatek/packages/apps/RCSe/core/tests/src/com/mediatek/rcse/test/api/FlightModeApiTest.java",
"license": "gpl-2.0",
"size": 6381
} | [
"android.os.RemoteException",
"com.mediatek.rcse.api.Logger",
"com.mediatek.rcse.service.IFlightMode"
] | import android.os.RemoteException; import com.mediatek.rcse.api.Logger; import com.mediatek.rcse.service.IFlightMode; | import android.os.*; import com.mediatek.rcse.api.*; import com.mediatek.rcse.service.*; | [
"android.os",
"com.mediatek.rcse"
] | android.os; com.mediatek.rcse; | 2,612,323 |
static List<Tag> toTags(Attributes attributes) {
List<Tag> results = new ArrayList<>();
attributes.forEach((key, value) -> results.add(toTag(key, value)));
return results;
} | static List<Tag> toTags(Attributes attributes) { List<Tag> results = new ArrayList<>(); attributes.forEach((key, value) -> results.add(toTag(key, value))); return results; } | /**
* Converts a map of attributes into a collection of Jaeger's {@link Tag}.
*
* @param attributes the span attributes
* @return a collection of Jaeger key values
* @see #toTag
*/ | Converts a map of attributes into a collection of Jaeger's <code>Tag</code> | toTags | {
"repo_name": "open-telemetry/opentelemetry-java",
"path": "exporters/jaeger-thrift/src/main/java/io/opentelemetry/exporter/jaeger/thrift/Adapter.java",
"license": "apache-2.0",
"size": 9563
} | [
"io.jaegertracing.thriftjava.Tag",
"io.opentelemetry.api.common.Attributes",
"java.util.ArrayList",
"java.util.List"
] | import io.jaegertracing.thriftjava.Tag; import io.opentelemetry.api.common.Attributes; import java.util.ArrayList; import java.util.List; | import io.jaegertracing.thriftjava.*; import io.opentelemetry.api.common.*; import java.util.*; | [
"io.jaegertracing.thriftjava",
"io.opentelemetry.api",
"java.util"
] | io.jaegertracing.thriftjava; io.opentelemetry.api; java.util; | 1,434,701 |
private void readObject(ObjectInputStream s)
throws IOException, ClassNotFoundException
{
s.defaultReadObject();
if (minStart > maxStart || maxStart > minStop || minStop > maxStop ||
minStop < 0)
{
throw new InvalidObjectException("invalid durations");
}
} | void function(ObjectInputStream s) throws IOException, ClassNotFoundException { s.defaultReadObject(); if (minStart > maxStart maxStart > minStop minStop > maxStop minStop < 0) { throw new InvalidObjectException(STR); } } | /**
* Verifies that <code>minStart</code> is less than or equal to
* <code>maxStart</code>, <code>maxStart</code> is less than or equal to
* <code>minStop</code>, <code>minStop</code> is less than or equal to
* <code>maxStop</code>, and <code>minStop</code> is greater than or equal
* to zero.
... | Verifies that <code>minStart</code> is less than or equal to <code>maxStart</code>, <code>maxStart</code> is less than or equal to <code>minStop</code>, <code>minStop</code> is less than or equal to <code>maxStop</code>, and <code>minStop</code> is greater than or equal to zero | readObject | {
"repo_name": "pfirmstone/JGDMS",
"path": "JGDMS/jgdms-platform/src/main/java/net/jini/core/constraint/DelegationRelativeTime.java",
"license": "apache-2.0",
"size": 10246
} | [
"java.io.IOException",
"java.io.InvalidObjectException",
"java.io.ObjectInputStream"
] | import java.io.IOException; import java.io.InvalidObjectException; import java.io.ObjectInputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,493,952 |
Item.ToolMaterial getToolMaterial(); | Item.ToolMaterial getToolMaterial(); | /**
* Gets the material. Returns null if the material does not exist.
*/ | Gets the material. Returns null if the material does not exist | getToolMaterial | {
"repo_name": "cubex2/customstuff4",
"path": "src/main/java/cubex2/cs4/api/WrappedToolMaterial.java",
"license": "gpl-3.0",
"size": 481
} | [
"net.minecraft.item.Item"
] | import net.minecraft.item.Item; | import net.minecraft.item.*; | [
"net.minecraft.item"
] | net.minecraft.item; | 1,715,166 |
public static HttpTransport newTransport(String proxyUrl, String portStr) throws NumberFormatException, GeneralSecurityException, IOException {
if (!StringUtils.isEmpty(proxyUrl) && !StringUtils.isEmpty(portStr)) {
return new NetHttpTransport.Builder()
.trustCertificates(Goo... | static HttpTransport function(String proxyUrl, String portStr) throws NumberFormatException, GeneralSecurityException, IOException { if (!StringUtils.isEmpty(proxyUrl) && !StringUtils.isEmpty(portStr)) { return new NetHttpTransport.Builder() .trustCertificates(GoogleUtils.getCertificateTrustStore()) .setProxy(new Proxy... | /**
* Provides HttpTransport. If both proxyUrl and postStr is defined, it provides transport with Proxy.
* @param proxyUrl Optional.
* @param portStr Optional. String type for port so that user can easily pass null. (e.g: state.getProp(key))
* @return
* @throws NumberFormatException
* @throws GeneralS... | Provides HttpTransport. If both proxyUrl and postStr is defined, it provides transport with Proxy | newTransport | {
"repo_name": "yukuai518/gobblin",
"path": "gobblin-core/src/main/java/gobblin/source/extractor/extract/google/GoogleCommon.java",
"license": "apache-2.0",
"size": 9922
} | [
"com.google.api.client.googleapis.GoogleUtils",
"com.google.api.client.googleapis.javanet.GoogleNetHttpTransport",
"com.google.api.client.http.HttpTransport",
"com.google.api.client.http.javanet.NetHttpTransport",
"java.io.IOException",
"java.net.InetSocketAddress",
"java.net.Proxy",
"java.security.Ge... | import com.google.api.client.googleapis.GoogleUtils; import com.google.api.client.googleapis.javanet.GoogleNetHttpTransport; import com.google.api.client.http.HttpTransport; import com.google.api.client.http.javanet.NetHttpTransport; import java.io.IOException; import java.net.InetSocketAddress; import java.net.Proxy; ... | import com.google.api.client.googleapis.*; import com.google.api.client.googleapis.javanet.*; import com.google.api.client.http.*; import com.google.api.client.http.javanet.*; import java.io.*; import java.net.*; import java.security.*; import org.apache.commons.lang3.*; | [
"com.google.api",
"java.io",
"java.net",
"java.security",
"org.apache.commons"
] | com.google.api; java.io; java.net; java.security; org.apache.commons; | 920,274 |
final long startTime = System.currentTimeMillis();
final Load load = new DefaultLoad(20, 10, 1);
final JsonNode node = new LoadCodec()
.encode(load, new MockCodecContext());
assertThat(node.get("valid").asBoolean(), is(true));
assertThat(node.get("latest").asLong(), is(20... | final long startTime = System.currentTimeMillis(); final Load load = new DefaultLoad(20, 10, 1); final JsonNode node = new LoadCodec() .encode(load, new MockCodecContext()); assertThat(node.get("valid").asBoolean(), is(true)); assertThat(node.get(STR).asLong(), is(20L)); assertThat(node.get("rate").asLong(), is(10L)); ... | /**
* Tests encoding of a Load object.
*/ | Tests encoding of a Load object | testLoadEncode | {
"repo_name": "gkatsikas/onos",
"path": "core/common/src/test/java/org/onosproject/codec/impl/LoadCodecTest.java",
"license": "apache-2.0",
"size": 1619
} | [
"com.fasterxml.jackson.databind.JsonNode",
"org.hamcrest.MatcherAssert",
"org.hamcrest.Matchers",
"org.onosproject.net.statistic.DefaultLoad",
"org.onosproject.net.statistic.Load"
] | import com.fasterxml.jackson.databind.JsonNode; import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; import org.onosproject.net.statistic.DefaultLoad; import org.onosproject.net.statistic.Load; | import com.fasterxml.jackson.databind.*; import org.hamcrest.*; import org.onosproject.net.statistic.*; | [
"com.fasterxml.jackson",
"org.hamcrest",
"org.onosproject.net"
] | com.fasterxml.jackson; org.hamcrest; org.onosproject.net; | 2,739,604 |
protected int setUpVerticalSpacing(RelativeLayout layoutGame, int numberOfCards, int divider) {
return min(Card.width / 2, (layoutGame.getHeight() - numberOfCards * Card.height) / (divider));
} | int function(RelativeLayout layoutGame, int numberOfCards, int divider) { return min(Card.width / 2, (layoutGame.getHeight() - numberOfCards * Card.height) / (divider)); } | /**
* Returns the calculated vertical spacing for the layout. It takes the layout width minus the card widths,
* then divides the remaining space with the divider. So the game can know how big the spaces are
* between the card stacks for a good layout.
*
* @param layoutGame The layout where ... | Returns the calculated vertical spacing for the layout. It takes the layout width minus the card widths, then divides the remaining space with the divider. So the game can know how big the spaces are between the card stacks for a good layout | setUpVerticalSpacing | {
"repo_name": "NicolasNolmans/Simple-Solitaire-master",
"path": "app/src/main/java/be/kuleuven/drsolitaire/games/Game.java",
"license": "gpl-3.0",
"size": 34064
} | [
"android.widget.RelativeLayout",
"be.kuleuven.drsolitaire.SharedData",
"be.kuleuven.drsolitaire.classes.Card"
] | import android.widget.RelativeLayout; import be.kuleuven.drsolitaire.SharedData; import be.kuleuven.drsolitaire.classes.Card; | import android.widget.*; import be.kuleuven.drsolitaire.*; import be.kuleuven.drsolitaire.classes.*; | [
"android.widget",
"be.kuleuven.drsolitaire"
] | android.widget; be.kuleuven.drsolitaire; | 861,791 |
public void setConnectTimeout(final int timeout)
{
final LDAPConnectionOptions options = conn.getConnectionOptions();
if (timeout > 0)
{
options.setConnectTimeoutMillis(1000 * timeout);
}
else
{
options.setConnectTimeoutMillis(0);
}
conn.setConnectionOptions(options);
... | void function(final int timeout) { final LDAPConnectionOptions options = conn.getConnectionOptions(); if (timeout > 0) { options.setConnectTimeoutMillis(1000 * timeout); } else { options.setConnectTimeoutMillis(0); } conn.setConnectionOptions(options); } | /**
* Specifies the maximum length of time to wait for the connection to be
* established, in seconds.
*
* @param timeout The maximum length of time to wait for the connection to
* be established.
*/ | Specifies the maximum length of time to wait for the connection to be established, in seconds | setConnectTimeout | {
"repo_name": "UnboundID/ldapsdk",
"path": "src/com/unboundid/ldap/sdk/migrate/ldapjdk/LDAPConnection.java",
"license": "gpl-2.0",
"size": 46875
} | [
"com.unboundid.ldap.sdk.LDAPConnectionOptions"
] | import com.unboundid.ldap.sdk.LDAPConnectionOptions; | import com.unboundid.ldap.sdk.*; | [
"com.unboundid.ldap"
] | com.unboundid.ldap; | 1,592,528 |
public SecurityRoleType<T> removeAllDescription()
{
childNode.removeChildren("description");
return this;
}
// --------------------------------------------------------------------------------------------------------||
// ClassName: SecurityRoleType ElementName: xsd:token ElementType : role... | SecurityRoleType<T> function() { childNode.removeChildren(STR); return this; } | /**
* Removes the <code>description</code> element
* @return the current instance of <code>SecurityRoleType<T></code>
*/ | Removes the <code>description</code> element | removeAllDescription | {
"repo_name": "forge/javaee-descriptors",
"path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/j2ee14/SecurityRoleTypeImpl.java",
"license": "epl-1.0",
"size": 5339
} | [
"org.jboss.shrinkwrap.descriptor.api.j2ee14.SecurityRoleType"
] | import org.jboss.shrinkwrap.descriptor.api.j2ee14.SecurityRoleType; | import org.jboss.shrinkwrap.descriptor.api.j2ee14.*; | [
"org.jboss.shrinkwrap"
] | org.jboss.shrinkwrap; | 2,177,754 |
public static Triple mapSubject(final Triple t, final String resourceUri, final Node destinationNode) {
final Node subject;
if (t.getSubject().getURI().equals(resourceUri)) {
subject = destinationNode;
} else {
subject = t.getSubject();
}
return new Tr... | static Triple function(final Triple t, final String resourceUri, final Node destinationNode) { final Node subject; if (t.getSubject().getURI().equals(resourceUri)) { subject = destinationNode; } else { subject = t.getSubject(); } return new Triple(subject, t.getPredicate(), t.getObject()); } | /**
* Maps the subject of t from resourceUri to destinationNode to produce a new Triple.
* If the triple does not have the subject resourceUri, then the triple is unchanged.
*
* @param t triple to be remapped.
* @param resourceUri resource subject uri to be remapped.
* @param destinationNo... | Maps the subject of t from resourceUri to destinationNode to produce a new Triple. If the triple does not have the subject resourceUri, then the triple is unchanged | mapSubject | {
"repo_name": "yinlinchen/fcrepo4",
"path": "fcrepo-kernel-api/src/main/java/org/fcrepo/kernel/api/utils/SubjectMappingUtil.java",
"license": "apache-2.0",
"size": 2698
} | [
"org.apache.jena.graph.Node",
"org.apache.jena.graph.Triple"
] | import org.apache.jena.graph.Node; import org.apache.jena.graph.Triple; | import org.apache.jena.graph.*; | [
"org.apache.jena"
] | org.apache.jena; | 538,331 |
@Override
public FieldSchema clone() throws CloneNotSupportedException {
// Strings are immutable, so we don't need to copy alias. Schemas
// are mutable so we need to make a copy.
try {
FieldSchema fs = new FieldSchema(alias,
(sch... | FieldSchema function() throws CloneNotSupportedException { try { FieldSchema fs = new FieldSchema(alias, (schema == null ? null : schema.clone()), type); fs.canonicalName = CanonicalNamer.getNewName(); return fs; } catch (FrontendException fe) { throw new RuntimeException( STR, fe); } } | /**
* Make a deep copy of this FieldSchema and return it.
* @return clone of the this FieldSchema.
* @throws CloneNotSupportedException
*/ | Make a deep copy of this FieldSchema and return it | clone | {
"repo_name": "dmeister/pig-cll-gz",
"path": "src/org/apache/pig/impl/logicalLayer/schema/Schema.java",
"license": "apache-2.0",
"size": 72915
} | [
"org.apache.pig.impl.logicalLayer.CanonicalNamer",
"org.apache.pig.impl.logicalLayer.FrontendException"
] | import org.apache.pig.impl.logicalLayer.CanonicalNamer; import org.apache.pig.impl.logicalLayer.FrontendException; | import org.apache.pig.impl.*; | [
"org.apache.pig"
] | org.apache.pig; | 993,040 |
Collection<Route> getRoutesForNextHop(IpAddress nextHop); | Collection<Route> getRoutesForNextHop(IpAddress nextHop); | /**
* Returns all routes that have the given next hop.
*
* @param nextHop next hop IP address
* @return collection of routes
*/ | Returns all routes that have the given next hop | getRoutesForNextHop | {
"repo_name": "osinstom/onos",
"path": "apps/route-service/app/src/main/java/org/onosproject/routeservice/store/RouteTable.java",
"license": "apache-2.0",
"size": 2127
} | [
"java.util.Collection",
"org.onlab.packet.IpAddress",
"org.onosproject.routeservice.Route"
] | import java.util.Collection; import org.onlab.packet.IpAddress; import org.onosproject.routeservice.Route; | import java.util.*; import org.onlab.packet.*; import org.onosproject.routeservice.*; | [
"java.util",
"org.onlab.packet",
"org.onosproject.routeservice"
] | java.util; org.onlab.packet; org.onosproject.routeservice; | 659,621 |
@DoesServiceRequest
public void uploadMetadata() throws StorageException {
this.uploadMetadata(null , null , null );
} | void function() throws StorageException { this.uploadMetadata(null , null , null ); } | /**
* Uploads the share's metadata.
*
* @throws StorageException
* If a storage service error occurred.
*/ | Uploads the share's metadata | uploadMetadata | {
"repo_name": "horizon-institute/runspotrun-android-client",
"path": "src/com/microsoft/azure/storage/file/CloudFileShare.java",
"license": "agpl-3.0",
"size": 35587
} | [
"com.microsoft.azure.storage.StorageException"
] | import com.microsoft.azure.storage.StorageException; | import com.microsoft.azure.storage.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 229,342 |
public synchronized void applyTo(List target) throws PatchFailedException
{
ListIterator i = deltas_.listIterator(deltas_.size());
while (i.hasPrevious())
{
Delta delta = (Delta) i.previous();
delta.patch(target);
}
} | synchronized void function(List target) throws PatchFailedException { ListIterator i = deltas_.listIterator(deltas_.size()); while (i.hasPrevious()) { Delta delta = (Delta) i.previous(); delta.patch(target); } } | /**
* Applies the series of deltas in this revision as patches to
* the given text.
* @param target the text to patch.
* @throws PatchFailedException if any of the patches cannot be applied.
*/ | Applies the series of deltas in this revision as patches to the given text | applyTo | {
"repo_name": "ouit0408/sakai",
"path": "rwiki/rwiki-util/jrcs/src/completejava/org/apache/commons/jrcs/diff/Revision.java",
"license": "apache-2.0",
"size": 7653
} | [
"java.util.List",
"java.util.ListIterator"
] | import java.util.List; import java.util.ListIterator; | import java.util.*; | [
"java.util"
] | java.util; | 797,582 |
public static Attribute createSerialNumber(String value) {
Attribute attribute = createAttribute(ATTRIBUTE_SERIAL_NUMBER_NAME,
ATTRIBUTE_SERIAL_NUMBER_FRIENDLY_NAME,
URI_ATTRIBUTE_NAME_FORMAT);
if (value != null) {
attribute.getAttributeValues().add(create... | static Attribute function(String value) { Attribute attribute = createAttribute(ATTRIBUTE_SERIAL_NUMBER_NAME, ATTRIBUTE_SERIAL_NUMBER_FRIENDLY_NAME, URI_ATTRIBUTE_NAME_FORMAT); if (value != null) { attribute.getAttributeValues().add(createAttributeValue(value)); } return attribute; } | /**
* Create a SAML20 attribute containing one attribute value with a given
* serialNumber
*
* @param value The serialNumber of the certificate
* @return The attribute
*/ | Create a SAML20 attribute containing one attribute value with a given serialNumber | createSerialNumber | {
"repo_name": "Safewhere/kombit-service-java",
"path": "OIOSaml/src/dk/itst/oiosaml/sp/util/AttributeUtil.java",
"license": "mit",
"size": 12505
} | [
"org.opensaml.saml2.core.Attribute"
] | import org.opensaml.saml2.core.Attribute; | import org.opensaml.saml2.core.*; | [
"org.opensaml.saml2"
] | org.opensaml.saml2; | 513,698 |
private void loginButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_loginButtonActionPerformed
this.loginButton.setEnabled(false);
String usernameGiven = usernameInput.getText();
String passwordGiven = passwordInput.getText();
System.out.println(usernameGiven)... | void function(java.awt.event.ActionEvent evt) { this.loginButton.setEnabled(false); String usernameGiven = usernameInput.getText(); String passwordGiven = passwordInput.getText(); System.out.println(usernameGiven); System.out.println(passwordGiven); User user = handler.login(usernameGiven, passwordGiven); System.out.pr... | /**
* This method executes the actions necessary to log the user
* into the system, when the login button is pressed.
*
* @param evt - event.
*/ | This method executes the actions necessary to log the user into the system, when the login button is pressed | loginButtonActionPerformed | {
"repo_name": "spapadop/LetsTalkClient",
"path": "src/se/bth/swatkats/letstalk/gui/Login.java",
"license": "gpl-3.0",
"size": 13961
} | [
"javax.swing.JOptionPane",
"se.bth.swatkats.letstalk.user.User"
] | import javax.swing.JOptionPane; import se.bth.swatkats.letstalk.user.User; | import javax.swing.*; import se.bth.swatkats.letstalk.user.*; | [
"javax.swing",
"se.bth.swatkats"
] | javax.swing; se.bth.swatkats; | 2,218,714 |
void deregisterAllListeners(@Nonnull String serviceName, @Nonnull String topic); | void deregisterAllListeners(@Nonnull String serviceName, @Nonnull String topic); | /**
* Deregisters all listeners belonging to the given service and topic.
*
* @param serviceName service name
* @param topic topic name
*/ | Deregisters all listeners belonging to the given service and topic | deregisterAllListeners | {
"repo_name": "emre-aydin/hazelcast",
"path": "hazelcast/src/main/java/com/hazelcast/spi/impl/eventservice/EventService.java",
"license": "apache-2.0",
"size": 11793
} | [
"javax.annotation.Nonnull"
] | import javax.annotation.Nonnull; | import javax.annotation.*; | [
"javax.annotation"
] | javax.annotation; | 922,996 |
ExecutableTrigger<W> subTrigger(int subtriggerIndex); | ExecutableTrigger<W> subTrigger(int subtriggerIndex); | /**
* Access the executable version of the specified sub-trigger.
*/ | Access the executable version of the specified sub-trigger | subTrigger | {
"repo_name": "springml/DataflowJavaSDK",
"path": "sdk/src/main/java/com/google/cloud/dataflow/sdk/transforms/windowing/Trigger.java",
"license": "apache-2.0",
"size": 23673
} | [
"com.google.cloud.dataflow.sdk.util.ExecutableTrigger"
] | import com.google.cloud.dataflow.sdk.util.ExecutableTrigger; | import com.google.cloud.dataflow.sdk.util.*; | [
"com.google.cloud"
] | com.google.cloud; | 2,623,718 |
public UUID subjectIdPerCall(@Nullable UUID subjId, @Nullable CacheOperationContext opCtx) {
if (opCtx != null)
subjId = opCtx.subjectId();
if (subjId == null)
subjId = ctx.localNodeId();
return subjId;
} | UUID function(@Nullable UUID subjId, @Nullable CacheOperationContext opCtx) { if (opCtx != null) subjId = opCtx.subjectId(); if (subjId == null) subjId = ctx.localNodeId(); return subjId; } | /**
* Gets subject ID per call.
*
* @param subjId Optional already existing subject ID.
* @param opCtx Optional thread local operation context.
* @return Subject ID per call.
*/ | Gets subject ID per call | subjectIdPerCall | {
"repo_name": "apacheignite/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheContext.java",
"license": "apache-2.0",
"size": 56955
} | [
"org.jetbrains.annotations.Nullable"
] | import org.jetbrains.annotations.Nullable; | import org.jetbrains.annotations.*; | [
"org.jetbrains.annotations"
] | org.jetbrains.annotations; | 102,885 |
public void write(int b) throws IOException {
oneBuf[0] = (byte) b;
write(oneBuf, 0, 1);
}
| void function(int b) throws IOException { oneBuf[0] = (byte) b; write(oneBuf, 0, 1); } | /**
* Writes a byte to the current tar archive entry.
*
* This method simply calls read( byte[], int, int ).
*
* @param b The byte written.
* @throws IOException on error
*/ | Writes a byte to the current tar archive entry. This method simply calls read( byte[], int, int ) | write | {
"repo_name": "Mark-Booth/daq-eclipse",
"path": "uk.ac.diamond.org.apache.activemq/org/apache/activemq/console/command/store/tar/TarOutputStream.java",
"license": "epl-1.0",
"size": 12260
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,244,975 |
public Date getErydat() {
return erydat;
} | Date function() { return erydat; } | /**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column ACTBLH.ERYDAT
*
* @return the value of ACTBLH.ERYDAT
*
* @mbggenerated Mon Dec 06 14:59:42 CST 2010
*/ | This method was generated by MyBatis Generator. This method returns the value of the database column ACTBLH.ERYDAT | getErydat | {
"repo_name": "rongshang/fbi-cbs2",
"path": "common/main/java/cbs/repository/account/maininfo/model/Actblh.java",
"license": "unlicense",
"size": 13191
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 2,754,807 |
public boolean isThereNoDataToSubmit(CustomerCreditMemoDocument customerCreditMemoDocument); | boolean function(CustomerCreditMemoDocument customerCreditMemoDocument); | /**
* This method checks if there is no data to submit
* @return
*/ | This method checks if there is no data to submit | isThereNoDataToSubmit | {
"repo_name": "kuali/kfs",
"path": "kfs-ar/src/main/java/org/kuali/kfs/module/ar/document/service/CustomerCreditMemoDocumentService.java",
"license": "agpl-3.0",
"size": 2110
} | [
"org.kuali.kfs.module.ar.document.CustomerCreditMemoDocument"
] | import org.kuali.kfs.module.ar.document.CustomerCreditMemoDocument; | import org.kuali.kfs.module.ar.document.*; | [
"org.kuali.kfs"
] | org.kuali.kfs; | 2,209,433 |
private void cleanup() {
File folder = new File(testSaveLocation);
if (folder.exists()) {
for (String file : folder.list()) {
(new File(folder.getPath(), file)).delete();
}
folder.delete();
}
} | void function() { File folder = new File(testSaveLocation); if (folder.exists()) { for (String file : folder.list()) { (new File(folder.getPath(), file)).delete(); } folder.delete(); } } | /**
* cleans up the mess made by the tests
*/ | cleans up the mess made by the tests | cleanup | {
"repo_name": "UQdeco2800/coaster",
"path": "coaster/src/test/java/uq/deco2800/coaster/game/preservation/PreservationTest.java",
"license": "mit",
"size": 8391
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 600,798 |
private void notModification(String name, String patternToAdd, Variable variable) {
if (currentOp.equals("ivmlDef")) {
currentCompound = name;
constraint += "dList, " + "\"" + name; // + "\"";
// currentOp = "";
} else {
pattern.add(patternToAdd);
// ... | void function(String name, String patternToAdd, Variable variable) { if (currentOp.equals(STR)) { currentCompound = name; constraint += STR + "\"STRPSTR." + name; } } | /**
* Private method for variables participating in evaluation constraints.
* @param name name of the variable.
* @param patternToAdd Pattern to add.
* @param variable Variable.
*/ | Private method for variables participating in evaluation constraints | notModification | {
"repo_name": "SSEHUB/EASyProducer",
"path": "Plugins/Reasoner/Drools/de.uni_hildesheim.sse.reasoning.drools/src/net/ssehub/easy/reasoning/drools/DroolsEqualityEvaluator.java",
"license": "apache-2.0",
"size": 48545
} | [
"net.ssehub.easy.varModel.cst.Variable"
] | import net.ssehub.easy.varModel.cst.Variable; | import net.ssehub.easy.*; | [
"net.ssehub.easy"
] | net.ssehub.easy; | 1,021,117 |
public void engineDeleteEntry(
String alias)
throws KeyStoreException
{
Key k = (Key)keys.remove(alias);
Certificate c = (Certificate)certs.remove(alias);
if (c != null)
{
chainCerts.remove(new CertId(c.getPublicKey()));
}
if (k != n... | void function( String alias) throws KeyStoreException { Key k = (Key)keys.remove(alias); Certificate c = (Certificate)certs.remove(alias); if (c != null) { chainCerts.remove(new CertId(c.getPublicKey())); } if (k != null) { String id = (String)localIds.remove(alias); if (id != null) { c = (Certificate)keyCerts.remove(i... | /**
* this is not quite complete - we should follow up on the chain, a bit
* tricky if a certificate appears in more than one chain... the store method
* now prunes out unused certificates from the chain map if they are present.
*/ | this is not quite complete - we should follow up on the chain, a bit tricky if a certificate appears in more than one chain... the store method now prunes out unused certificates from the chain map if they are present | engineDeleteEntry | {
"repo_name": "Skywalker-11/spongycastle",
"path": "prov/src/main/java/org/spongycastle/jcajce/provider/keystore/pkcs12/PKCS12KeyStoreSpi.java",
"license": "mit",
"size": 63379
} | [
"java.security.Key",
"java.security.KeyStoreException",
"java.security.cert.Certificate"
] | import java.security.Key; import java.security.KeyStoreException; import java.security.cert.Certificate; | import java.security.*; import java.security.cert.*; | [
"java.security"
] | java.security; | 1,541,358 |
protected void setUrlRequester(final UrlRequester urlRequester) {
this.urlRequester = urlRequester;
} | void function(final UrlRequester urlRequester) { this.urlRequester = urlRequester; } | /**
* Set the Url Requester.
* @param urlRequester UrlRequester
*/ | Set the Url Requester | setUrlRequester | {
"repo_name": "MobileAppTracking/sdk-release",
"path": "sdk-android/TuneMarketingConsoleSDK/src/main/java/com/tune/TuneInternal.java",
"license": "gpl-3.0",
"size": 38933
} | [
"com.tune.http.UrlRequester"
] | import com.tune.http.UrlRequester; | import com.tune.http.*; | [
"com.tune.http"
] | com.tune.http; | 2,329,833 |
@PUT
@Override
public Response put(Model model)
{
if (getWebTarget() == null) throw new NotFoundException("Resource URI not supplied"); // cannot throw Exception in constructor: https://github.com/eclipse-ee4j/jersey/issues/4436
if (log.isDebugEnabled()) log.debug("PUTting Datas... | Response function(Model model) { if (getWebTarget() == null) throw new NotFoundException(STR); if (log.isDebugEnabled()) log.debug(STR, getWebTarget().getUri()); return getWebTarget().request(). accept(getMediaTypes().getReadable(Model.class).toArray(new javax.ws.rs.core.MediaType[0])). put(Entity.entity(model, com.ato... | /**
* Forwards PUT request with RDF dataset body and returns response from remote resource.
*
* @param model RDF payload
* @return response
*/ | Forwards PUT request with RDF dataset body and returns response from remote resource | put | {
"repo_name": "AtomGraph/Web-Client",
"path": "src/main/java/com/atomgraph/client/model/impl/ProxyResourceBase.java",
"license": "apache-2.0",
"size": 12551
} | [
"javax.ws.rs.NotFoundException",
"javax.ws.rs.client.Entity",
"javax.ws.rs.core.MediaType",
"javax.ws.rs.core.Response",
"org.apache.jena.rdf.model.Model"
] | import javax.ws.rs.NotFoundException; import javax.ws.rs.client.Entity; import javax.ws.rs.core.MediaType; import javax.ws.rs.core.Response; import org.apache.jena.rdf.model.Model; | import javax.ws.rs.*; import javax.ws.rs.client.*; import javax.ws.rs.core.*; import org.apache.jena.rdf.model.*; | [
"javax.ws",
"org.apache.jena"
] | javax.ws; org.apache.jena; | 2,257,071 |
public List<SubResource> loadBalancingRules() {
return this.loadBalancingRules;
} | List<SubResource> function() { return this.loadBalancingRules; } | /**
* Get the load balancer rules that use this probe.
*
* @return the loadBalancingRules value
*/ | Get the load balancer rules that use this probe | loadBalancingRules | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_07_01/src/main/java/com/microsoft/azure/management/network/v2019_07_01/implementation/ProbeInner.java",
"license": "mit",
"size": 9819
} | [
"com.microsoft.azure.SubResource",
"java.util.List"
] | import com.microsoft.azure.SubResource; import java.util.List; | import com.microsoft.azure.*; import java.util.*; | [
"com.microsoft.azure",
"java.util"
] | com.microsoft.azure; java.util; | 2,872,857 |
public void handleKeygen(URI uri, HTTPRequest httpr, ToadletContext tc) throws Exception{
try {
String insertUri;
String requestUri;
Map<String,String> params = getKeygenParamsFromUri(uri);
String keytype = params.get("keytype");
Strin... | void function(URI uri, HTTPRequest httpr, ToadletContext tc) throws Exception{ try { String insertUri; String requestUri; Map<String,String> params = getKeygenParamsFromUri(uri); String keytype = params.get(STR); String filename = httpr.getParam(STR); if (filename.isEmpty()){ filename = STRversionSTRSSKSTRUSKSTRSSK","U... | /**
* handleKeygen method gets the relevant parameters,
* calls the method that does the key generation
* and sends the reply for requests to generate a key pair.
*
* @param uri URI : The URI of the request
* @param httpr HTTPRequest : The request object
* @param tc ToadletConte... | handleKeygen method gets the relevant parameters, calls the method that does the key generation and sends the reply for requests to generate a key pair | handleKeygen | {
"repo_name": "ktogias/restFreenet",
"path": "src/plugins/RestFreenet/RestToadlet.java",
"license": "gpl-2.0",
"size": 30714
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 506,662 |
protected ConstraintValidationResult validateRange(DictionaryValidationResult result, Date value,
RangeConstraint constraint, AttributeValueReader attributeValueReader) throws IllegalArgumentException {
Date date = value != null ? ValidationUtils.getDate(value, dateTimeService) : null;
... | ConstraintValidationResult function(DictionaryValidationResult result, Date value, RangeConstraint constraint, AttributeValueReader attributeValueReader) throws IllegalArgumentException { Date date = value != null ? ValidationUtils.getDate(value, dateTimeService) : null; String inclusiveMaxText = constraint.getInclusiv... | /**
* validates the date value using the range constraint provided
*
* @param result - a holder for any already run validation results
* @param value - the value to validate
* @param constraint - the range constraint to use
* @param attributeValueReader - provides access to the attribute b... | validates the date value using the range constraint provided | validateRange | {
"repo_name": "ua-eas/ksd-kc5.2.1-rice2.3.6-ua",
"path": "rice-framework/krad-web-framework/src/main/java/org/kuali/rice/krad/datadictionary/validation/processor/RangeConstraintProcessor.java",
"license": "apache-2.0",
"size": 11770
} | [
"java.util.Date",
"org.kuali.rice.krad.datadictionary.validation.AttributeValueReader",
"org.kuali.rice.krad.datadictionary.validation.ValidationUtils",
"org.kuali.rice.krad.datadictionary.validation.constraint.RangeConstraint",
"org.kuali.rice.krad.datadictionary.validation.result.ConstraintValidationResul... | import java.util.Date; import org.kuali.rice.krad.datadictionary.validation.AttributeValueReader; import org.kuali.rice.krad.datadictionary.validation.ValidationUtils; import org.kuali.rice.krad.datadictionary.validation.constraint.RangeConstraint; import org.kuali.rice.krad.datadictionary.validation.result.ConstraintV... | import java.util.*; import org.kuali.rice.krad.datadictionary.validation.*; import org.kuali.rice.krad.datadictionary.validation.constraint.*; import org.kuali.rice.krad.datadictionary.validation.result.*; | [
"java.util",
"org.kuali.rice"
] | java.util; org.kuali.rice; | 188,874 |
// methods =================================================================
public void initBeforeSearch() throws IOException {
HttpServletResponse response = this.getServletResponse();
HttpServletRequest request = this.getServletRequest();
this.setServletRequest(request);
this.setServletResponse(response);
... | void function() throws IOException { HttpServletResponse response = this.getServletResponse(); HttpServletRequest request = this.getServletRequest(); this.setServletRequest(request); this.setServletResponse(response); if (LOG.isLoggable(Level.FINER)) { LOG.finer(STR); } this._stopFurtherResponseWrites = false; response... | /**
* Instantiates a new search page distributed adp.
*
*
*/ | Instantiates a new search page distributed adp | initBeforeSearch | {
"repo_name": "treejames/GeoprocessingAppstore",
"path": "src/com/esri/gpt/control/rest/search/DistributedAdpSearchPageWriter.java",
"license": "apache-2.0",
"size": 8334
} | [
"java.io.IOException",
"java.util.logging.Level",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse"
] | import java.io.IOException; import java.util.logging.Level; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; | import java.io.*; import java.util.logging.*; import javax.servlet.http.*; | [
"java.io",
"java.util",
"javax.servlet"
] | java.io; java.util; javax.servlet; | 1,846,041 |
public String getHost()
{
try {
URL url = new URL(this._getURI());
return url.getHost();
} catch (MalformedURLException mue) {
return null;
}
} | String function() { try { URL url = new URL(this._getURI()); return url.getHost(); } catch (MalformedURLException mue) { return null; } } | /**
*** Gets the 'host' specification in the URI
*** @return The 'host' specification in the URL, or null if unable to determine host
**/ | Gets the 'host' specification in the URI @return The 'host' specification in the URL, or null if unable to determine host | getHost | {
"repo_name": "Kiosani/OpenGTS",
"path": "src/org/opengts/util/URIArg.java",
"license": "apache-2.0",
"size": 49991
} | [
"java.net.MalformedURLException"
] | import java.net.MalformedURLException; | import java.net.*; | [
"java.net"
] | java.net; | 2,528,040 |
public static String applyXSLT( Source xml, String xsltFilename, Map params ) {
try {
String fullPath = xsltFilename;
File xslt = new File( fullPath );
TransformerFactory f = TransformerFactory.newInstance();
StreamSource xsltSrc = new StreamSource( xslt );
... | static String function( Source xml, String xsltFilename, Map params ) { try { String fullPath = xsltFilename; File xslt = new File( fullPath ); TransformerFactory f = TransformerFactory.newInstance(); StreamSource xsltSrc = new StreamSource( xslt ); StringWriter out = new StringWriter(); StreamResult res = new StreamRe... | /**
* Applies an XSLT.
*
* @param xml The soucrce to translate.
* @param xsltFilename The filename of the xsl file to use.
* @param params A map of parameters to pass to the transformation. if null
* is passed none are used.
*
* @return The stri... | Applies an XSLT | applyXSLT | {
"repo_name": "BlakeDickie/silvideo",
"path": "silvideo-web/src/main/java/net/landora/silvideo/util/XMLUtilities.java",
"license": "gpl-3.0",
"size": 15802
} | [
"java.io.File",
"java.io.StringWriter",
"java.util.Iterator",
"java.util.Map",
"javax.xml.transform.Source",
"javax.xml.transform.Transformer",
"javax.xml.transform.TransformerFactory",
"javax.xml.transform.stream.StreamResult",
"javax.xml.transform.stream.StreamSource"
] | import java.io.File; import java.io.StringWriter; import java.util.Iterator; import java.util.Map; import javax.xml.transform.Source; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerFactory; import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamSource; | import java.io.*; import java.util.*; import javax.xml.transform.*; import javax.xml.transform.stream.*; | [
"java.io",
"java.util",
"javax.xml"
] | java.io; java.util; javax.xml; | 395,852 |
public static boolean contains(boolean[] self, Object value) {
for (boolean next : self) {
if (DefaultTypeTransformation.compareEqual(value, next)) return true;
}
return false;
} | static boolean function(boolean[] self, Object value) { for (boolean next : self) { if (DefaultTypeTransformation.compareEqual(value, next)) return true; } return false; } | /**
* Checks whether the array contains the given value.
*
* @param self the array within which we count the number of occurrences
* @param value the value being searched for
* @return the number of occurrences
* @since 1.8.6
*/ | Checks whether the array contains the given value | contains | {
"repo_name": "mv2a/yajsw",
"path": "src/groovy-patch/src/main/java/org/codehaus/groovy/runtime/DefaultGroovyMethods.java",
"license": "apache-2.0",
"size": 704164
} | [
"org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation"
] | import org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation; | import org.codehaus.groovy.runtime.typehandling.*; | [
"org.codehaus.groovy"
] | org.codehaus.groovy; | 1,565,684 |
public static boolean pdf_continue_text(@NotNull PDF pdf,
String text)
{
if (pdf == null)
return false;
return pdf.continue_text(text);
} | static boolean function(@NotNull PDF pdf, String text) { if (pdf == null) return false; return pdf.continue_text(text); } | /**
* Continues text at the next line.
*/ | Continues text at the next line | pdf_continue_text | {
"repo_name": "headius/quercus",
"path": "src/main/java/com/caucho/quercus/lib/pdf/PDFModule.java",
"license": "gpl-2.0",
"size": 48781
} | [
"com.caucho.quercus.annotation.NotNull"
] | import com.caucho.quercus.annotation.NotNull; | import com.caucho.quercus.annotation.*; | [
"com.caucho.quercus"
] | com.caucho.quercus; | 1,396,735 |
private void writeScaledTemporal(GregorianCalendar cal,
int subSecondNanos,
int scale,
SSType ssType) throws SQLServerException {
assert con.isKatmaiOrLater();
assert SSType.DATE == ssType || SSType.TIME == ssType || SSType.DATETIME2 == ssType || SSType.DATETIME... | void function(GregorianCalendar cal, int subSecondNanos, int scale, SSType ssType) throws SQLServerException { assert con.isKatmaiOrLater(); assert SSType.DATE == ssType SSType.TIME == ssType SSType.DATETIME2 == ssType SSType.DATETIMEOFFSET == ssType : STR + ssType; if (SSType.TIME == ssType SSType.DATETIME2 == ssType ... | /**
* Writes to the TDS channel a temporal value as an instance instance of one of the scaled temporal SQL types: DATE, TIME, DATETIME2, or
* DATETIMEOFFSET.
*
* @param cal
* Calendar representing the value to write, except for any sub-second nanoseconds
* @param subSecondNanos
... | Writes to the TDS channel a temporal value as an instance instance of one of the scaled temporal SQL types: DATE, TIME, DATETIME2, or DATETIMEOFFSET | writeScaledTemporal | {
"repo_name": "pierresouchay/mssql-jdbc",
"path": "src/main/java/com/microsoft/sqlserver/jdbc/IOBuffer.java",
"license": "mit",
"size": 322046
} | [
"java.text.MessageFormat",
"java.util.Calendar",
"java.util.GregorianCalendar"
] | import java.text.MessageFormat; import java.util.Calendar; import java.util.GregorianCalendar; | import java.text.*; import java.util.*; | [
"java.text",
"java.util"
] | java.text; java.util; | 2,023,308 |
public static <T> EventListenerSupport<T> create(final Class<T> listenerInterface) {
return new EventListenerSupport<>(listenerInterface);
}
public EventListenerSupport(final Class<L> listenerInterface) {
this(listenerInterface, Thread.currentThread().getContextClassLoader());
}
... | static <T> EventListenerSupport<T> function(final Class<T> listenerInterface) { return new EventListenerSupport<>(listenerInterface); } public EventListenerSupport(final Class<L> listenerInterface) { this(listenerInterface, Thread.currentThread().getContextClassLoader()); } public EventListenerSupport(final Class<L> li... | /**
* Creates an EventListenerSupport object which supports the specified
* listener type.
*
* @param <T> the type of the listener interface
* @param listenerInterface the type of listener interface that will receive
* events posted using this class.
*
* @return an EventLi... | Creates an EventListenerSupport object which supports the specified listener type | create | {
"repo_name": "ManfredTremmel/gwt-commons-lang3",
"path": "src/main/java/org/apache/commons/lang3/event/EventListenerSupport.java",
"license": "apache-2.0",
"size": 12825
} | [
"org.apache.commons.lang3.Validate"
] | import org.apache.commons.lang3.Validate; | import org.apache.commons.lang3.*; | [
"org.apache.commons"
] | org.apache.commons; | 72,899 |
@Override
protected boolean operateOnPartitionedRegion(ClusterDistributionManager dm, PartitionedRegion r,
long startTime) {
if (logger.isTraceEnabled(LogMarker.DM_VERBOSE)) {
logger.trace(LogMarker.DM_VERBOSE,
"PartitionedRegionFunctionResultStreamerMessage operateOnRegion: {}", r.getFull... | boolean function(ClusterDistributionManager dm, PartitionedRegion r, long startTime) { if (logger.isTraceEnabled(LogMarker.DM_VERBOSE)) { logger.trace(LogMarker.DM_VERBOSE, STR, r.getFullPath()); } if (this.context.getFunction() == null) { sendReply(getSender(), getProcessorId(), dm, new ReplyException(new FunctionExce... | /**
* An operation upon the messages partitioned region. Here we have to execute the function and
* send the result one by one.
*/ | An operation upon the messages partitioned region. Here we have to execute the function and send the result one by one | operateOnPartitionedRegion | {
"repo_name": "davebarnes97/geode",
"path": "geode-core/src/main/java/org/apache/geode/internal/cache/partitioned/PartitionedRegionFunctionStreamingMessage.java",
"license": "apache-2.0",
"size": 7473
} | [
"org.apache.geode.cache.execute.FunctionException",
"org.apache.geode.distributed.internal.ClusterDistributionManager",
"org.apache.geode.distributed.internal.ReplyException",
"org.apache.geode.internal.cache.PartitionedRegion",
"org.apache.geode.internal.cache.PartitionedRegionDataStore",
"org.apache.geo... | import org.apache.geode.cache.execute.FunctionException; import org.apache.geode.distributed.internal.ClusterDistributionManager; import org.apache.geode.distributed.internal.ReplyException; import org.apache.geode.internal.cache.PartitionedRegion; import org.apache.geode.internal.cache.PartitionedRegionDataStore; impo... | import org.apache.geode.cache.execute.*; import org.apache.geode.distributed.internal.*; import org.apache.geode.internal.cache.*; import org.apache.geode.internal.logging.log4j.*; | [
"org.apache.geode"
] | org.apache.geode; | 2,913,154 |
public BlockType getBlockType() {
return getExtent().getBlockType(getBlockPosition());
} | BlockType function() { return getExtent().getBlockType(getBlockPosition()); } | /**
* Get the base type of block.
*
* <p>The type does not include block data such as the contents of
* inventories.</p>
*
* @return The type of block
*/ | Get the base type of block. The type does not include block data such as the contents of inventories | getBlockType | {
"repo_name": "modwizcode/SpongeAPI",
"path": "src/main/java/org/spongepowered/api/world/Location.java",
"license": "mit",
"size": 24514
} | [
"org.spongepowered.api.block.BlockType"
] | import org.spongepowered.api.block.BlockType; | import org.spongepowered.api.block.*; | [
"org.spongepowered.api"
] | org.spongepowered.api; | 676,520 |
private List<SqlRow> getStatistics(int lastNDays, boolean slidingWindow)
{
if (lastNDays < 0)
lastNDays = 0;
if (slidingWindow)
lastNDays++;
// new line
String newLine = "\n";
Transaction transaction = Ebean.beginTransaction();
// set s... | List<SqlRow> function(int lastNDays, boolean slidingWindow) { if (lastNDays < 0) lastNDays = 0; if (slidingWindow) lastNDays++; String newLine = "\n"; Transaction transaction = Ebean.beginTransaction(); Ebean.createSqlUpdate(STR).execute(); StringBuilder sb = new StringBuilder(5000); sb.append(STR); sb.append(STR); sb.... | /**
* Function to retrieve email statistics data for the given last n days. In case sliding window is true, then the
* result will be day overlapping based on the current quarter hour of the day
*
* @param lastNDays
* @param slidingWindow
* boolean value inidicating whether a s... | Function to retrieve email statistics data for the given last n days. In case sliding window is true, then the result will be day overlapping based on the current quarter hour of the day | getStatistics | {
"repo_name": "Xceptance/XCMailr",
"path": "xcmailr-webapp/src/main/java/controllers/AdminHandler.java",
"license": "apache-2.0",
"size": 23975
} | [
"com.avaje.ebean.Ebean",
"com.avaje.ebean.SqlRow",
"com.avaje.ebean.Transaction",
"java.util.List"
] | import com.avaje.ebean.Ebean; import com.avaje.ebean.SqlRow; import com.avaje.ebean.Transaction; import java.util.List; | import com.avaje.ebean.*; import java.util.*; | [
"com.avaje.ebean",
"java.util"
] | com.avaje.ebean; java.util; | 516,854 |
@Override
public void propertyChange(PropertyChangeEvent evt) {
this.fireDisplayNameChange(null, getDisplayName());
this.fireIconChange();
//if ("Position".equals(evt.getPropertyName()) || "Rotation".equals(evt.getPropertyName())) {
setSheet(getSheet());
//}
} | void function(PropertyChangeEvent evt) { this.fireDisplayNameChange(null, getDisplayName()); this.fireIconChange(); setSheet(getSheet()); } | /**
* This listerner is called on property changes. It updates the Property
* Sheet to display adjusted values.
*
* @param evt
*/ | This listerner is called on property changes. It updates the Property Sheet to display adjusted values | propertyChange | {
"repo_name": "iti-luebeck/MARS",
"path": "MARS_NB/MARS/AUVTree/src/mars/auvtree/nodes/ParamNode.java",
"license": "bsd-3-clause",
"size": 9573
} | [
"java.beans.PropertyChangeEvent"
] | import java.beans.PropertyChangeEvent; | import java.beans.*; | [
"java.beans"
] | java.beans; | 464,563 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.