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 BigDecimal getCostStandardCumAmt ()
{
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_CostStandardCumAmt);
if (bd == null)
return Env.ZERO;
return bd;
} | BigDecimal function () { BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_CostStandardCumAmt); if (bd == null) return Env.ZERO; return bd; } | /** Get Std Cost Amount Sum.
@return Standard Cost Invoice Amount Sum (internal)
*/ | Get Std Cost Amount Sum | getCostStandardCumAmt | {
"repo_name": "pplatek/adempiere",
"path": "base/src/org/compiere/model/X_M_Product_Costing.java",
"license": "gpl-2.0",
"size": 11513
} | [
"java.math.BigDecimal",
"org.compiere.util.Env"
] | import java.math.BigDecimal; import org.compiere.util.Env; | import java.math.*; import org.compiere.util.*; | [
"java.math",
"org.compiere.util"
] | java.math; org.compiere.util; | 1,405,816 |
protected void merge(File mergedFile) throws IOException {
mergedFile.getParentFile().mkdirs();
try (InputStream sequence = new SequenceInputStream(new SourceFilesEnumeration(log, files, verbose, charset));
OutputStream out = new FileOutputStream(mergedFile);
In... | void function(File mergedFile) throws IOException { mergedFile.getParentFile().mkdirs(); try (InputStream sequence = new SequenceInputStream(new SourceFilesEnumeration(log, files, verbose, charset)); OutputStream out = new FileOutputStream(mergedFile); InputStreamReader sequenceReader = new InputStreamReader(sequence, ... | /**
* Merges a list of source files. Create missing parent directories if
* needed.
*
* @param mergedFile output file resulting from the merged step
* @throws IOException when the merge step fails
*/ | Merges a list of source files. Create missing parent directories if needed | merge | {
"repo_name": "a1martin/minifier-maven-plugin",
"path": "src/main/java/com/mg/maven/minifier/plugin/ProcessFilesTask.java",
"license": "apache-2.0",
"size": 19914
} | [
"com.mg.maven.minifier.common.SourceFilesEnumeration",
"java.io.File",
"java.io.FileOutputStream",
"java.io.IOException",
"java.io.InputStream",
"java.io.InputStreamReader",
"java.io.OutputStream",
"java.io.OutputStreamWriter",
"java.io.SequenceInputStream",
"org.codehaus.plexus.util.IOUtil"
] | import com.mg.maven.minifier.common.SourceFilesEnumeration; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.OutputStream; import java.io.OutputStreamWriter; import java.io.SequenceInputStream; import org.codeh... | import com.mg.maven.minifier.common.*; import java.io.*; import org.codehaus.plexus.util.*; | [
"com.mg.maven",
"java.io",
"org.codehaus.plexus"
] | com.mg.maven; java.io; org.codehaus.plexus; | 1,922,371 |
@GET
@Path("/{id}")
public LessonDTO findById(@PathParam("id") long id, @QueryParam("graphName") String graphName)
throws DAOException {
if (graphName != null && !graphName.isEmpty()) {
Lesson lesson = lessonDAO.loadById(graphName, id);
return lessonDtoMapper.toLessonDTOWithCollections(lesso... | @Path("/{id}") LessonDTO function(@PathParam("id") long id, @QueryParam(STR) String graphName) throws DAOException { if (graphName != null && !graphName.isEmpty()) { Lesson lesson = lessonDAO.loadById(graphName, id); return lessonDtoMapper.toLessonDTOWithCollections(lesson); } else { Lesson lesson = lessonDAO.findById(... | /**
* Find by id.
*
* @param id the id
* @param graphName the graph name
* @return the lesson dto
* @throws DAOException the DAO exception
*/ | Find by id | findById | {
"repo_name": "yntelectual/nlighten",
"path": "nlighten-backend/src/main/java/me/nlighten/backend/rest/endpoints/LessonEndpoint.java",
"license": "apache-2.0",
"size": 3103
} | [
"javax.ws.rs.Path",
"javax.ws.rs.PathParam",
"javax.ws.rs.QueryParam",
"me.nlighten.backend.db.dao.exception.DAOException",
"me.nlighten.backend.db.model.Lesson",
"me.nlighten.backend.rest.model.LessonDTO"
] | import javax.ws.rs.Path; import javax.ws.rs.PathParam; import javax.ws.rs.QueryParam; import me.nlighten.backend.db.dao.exception.DAOException; import me.nlighten.backend.db.model.Lesson; import me.nlighten.backend.rest.model.LessonDTO; | import javax.ws.rs.*; import me.nlighten.backend.db.dao.exception.*; import me.nlighten.backend.db.model.*; import me.nlighten.backend.rest.model.*; | [
"javax.ws",
"me.nlighten.backend"
] | javax.ws; me.nlighten.backend; | 141,502 |
public boolean isOnlyShowInFullList() {
return m_onlyShowInFullList;
}
}
public static final String KEY_LAST_USED_GALLERY_ADEVIEW = "__adeView";
private static final Log LOG = CmsLog.getLog(CmsGalleryService.class);
private static final long serialVersionU... | boolean function() { return m_onlyShowInFullList; } } public static final String KEY_LAST_USED_GALLERY_ADEVIEW = STR; private static final Log LOG = CmsLog.getLog(CmsGalleryService.class); private static final long serialVersionUID = 1673026761080584889L; CmsResourceManager m_resourceManager; private CmsWorkplaceSettin... | /**
* Returns the onlyShowInFullList.<p>
*
* @return the onlyShowInFullList
*/ | Returns the onlyShowInFullList | isOnlyShowInFullList | {
"repo_name": "sbonoc/opencms-core",
"path": "src/org/opencms/ade/galleries/CmsGalleryService.java",
"license": "lgpl-2.1",
"size": 100077
} | [
"java.util.Locale",
"org.apache.commons.logging.Log",
"org.opencms.loader.CmsResourceManager",
"org.opencms.main.CmsLog",
"org.opencms.workplace.CmsWorkplaceSettings"
] | import java.util.Locale; import org.apache.commons.logging.Log; import org.opencms.loader.CmsResourceManager; import org.opencms.main.CmsLog; import org.opencms.workplace.CmsWorkplaceSettings; | import java.util.*; import org.apache.commons.logging.*; import org.opencms.loader.*; import org.opencms.main.*; import org.opencms.workplace.*; | [
"java.util",
"org.apache.commons",
"org.opencms.loader",
"org.opencms.main",
"org.opencms.workplace"
] | java.util; org.apache.commons; org.opencms.loader; org.opencms.main; org.opencms.workplace; | 819,835 |
public void execWithDatabaseDriver(DatabaseServerConfig databaseServerConfig,
Consumer<DriverWithConnectivity> consumer) {
execWithDatabaseDriver(databaseServerConfig.getDatabaseVendor(), consumer);
} | void function(DatabaseServerConfig databaseServerConfig, Consumer<DriverWithConnectivity> consumer) { execWithDatabaseDriver(databaseServerConfig.getDatabaseVendor(), consumer); } | /**
* Executes the given function with the associated driver.
*
* @param databaseServerConfig the database server config used to get the driver
* @param consumer the function to execute
*/ | Executes the given function with the associated driver | execWithDatabaseDriver | {
"repo_name": "hortonworks/cloudbreak",
"path": "redbeams/src/main/java/com/sequenceiq/redbeams/service/drivers/DriverFunctions.java",
"license": "apache-2.0",
"size": 2367
} | [
"com.sequenceiq.redbeams.domain.DatabaseServerConfig",
"java.util.function.Consumer"
] | import com.sequenceiq.redbeams.domain.DatabaseServerConfig; import java.util.function.Consumer; | import com.sequenceiq.redbeams.domain.*; import java.util.function.*; | [
"com.sequenceiq.redbeams",
"java.util"
] | com.sequenceiq.redbeams; java.util; | 2,688,840 |
public Iterator<EmailParameterType> getEmailParameterTypes();
| Iterator<EmailParameterType> function(); | /**
* <p>Returns an iterator of all parameter types.</p>
*
* @return {@link Iterator}<EmailParameterType>
*/ | Returns an iterator of all parameter types | getEmailParameterTypes | {
"repo_name": "skoulouzis/lobcder",
"path": "milton/milton-caldav/src/main/java/info/ineighborhood/cardme/vcard/features/EmailFeature.java",
"license": "apache-2.0",
"size": 6000
} | [
"info.ineighborhood.cardme.vcard.types.parameters.EmailParameterType",
"java.util.Iterator"
] | import info.ineighborhood.cardme.vcard.types.parameters.EmailParameterType; import java.util.Iterator; | import info.ineighborhood.cardme.vcard.types.parameters.*; import java.util.*; | [
"info.ineighborhood.cardme",
"java.util"
] | info.ineighborhood.cardme; java.util; | 828,145 |
if (!isEquivalentStyle(styleName)) {
if (currentStyle != null && currentStyle.trim().length() != 0) {
for (Element e : elements) {
e.removeClassName(currentStyle);
}
}
if (styleName != null) {
for (Element e : elements) {
e.addClassName(styleN... | if (!isEquivalentStyle(styleName)) { if (currentStyle != null && currentStyle.trim().length() != 0) { for (Element e : elements) { e.removeClassName(currentStyle); } } if (styleName != null) { for (Element e : elements) { e.addClassName(styleName); } } currentStyle = styleName; } } | /**
* Replaces any current style that may be applied with the given style.
*
* @param styleName The CSS style to change to, or {@code null} to change to
* no style.
*/ | Replaces any current style that may be applied with the given style | setStyle | {
"repo_name": "vega113/incubator-wave",
"path": "wave/src/main/java/org/waveprotocol/wave/client/widget/button/StyleAxis.java",
"license": "apache-2.0",
"size": 3630
} | [
"com.google.gwt.dom.client.Element"
] | import com.google.gwt.dom.client.Element; | import com.google.gwt.dom.client.*; | [
"com.google.gwt"
] | com.google.gwt; | 1,415,981 |
@FIXVersion(introduced = "4.0", retired = "4.3")
@TagNumRef(tagNum = TagNum.Symbol, required=true)
public void setSymbol(String symbol) {
getSafeInstrument().setSymbol(symbol);
} | @FIXVersion(introduced = "4.0", retired = "4.3") @TagNumRef(tagNum = TagNum.Symbol, required=true) void function(String symbol) { getSafeInstrument().setSymbol(symbol); } | /**
* Message field setter.
* @param symbol field value
*/ | Message field setter | setSymbol | {
"repo_name": "marvisan/HadesFIX",
"path": "Model/src/main/java/net/hades/fix/message/AllocationInstructionMsg.java",
"license": "gpl-3.0",
"size": 122626
} | [
"net.hades.fix.message.anno.FIXVersion",
"net.hades.fix.message.anno.TagNumRef",
"net.hades.fix.message.type.TagNum"
] | import net.hades.fix.message.anno.FIXVersion; import net.hades.fix.message.anno.TagNumRef; import net.hades.fix.message.type.TagNum; | import net.hades.fix.message.anno.*; import net.hades.fix.message.type.*; | [
"net.hades.fix"
] | net.hades.fix; | 1,939,798 |
public static void WriteFile(String id, String contents)
{
try {
Files.write(Paths.get(id.toString()+"-results.txt"), contents.getBytes());
} catch(IOException ex) {
Logger.getLogger(FileIO.class.getName()).log(Level.SEVERE, null, ex);
}
} | static void function(String id, String contents) { try { Files.write(Paths.get(id.toString()+STR), contents.getBytes()); } catch(IOException ex) { Logger.getLogger(FileIO.class.getName()).log(Level.SEVERE, null, ex); } } | /**
* Writes a file from the contents.
* @param filename to be written to.
* @param contents of file to be written.
*/ | Writes a file from the contents | WriteFile | {
"repo_name": "egeis/CSC-582-3-W15-GOSSIP",
"path": "src/main/java/com/distributed/io/FileIO.java",
"license": "mit",
"size": 2448
} | [
"java.io.IOException",
"java.nio.file.Files",
"java.nio.file.Paths",
"java.util.logging.Level",
"java.util.logging.Logger"
] | import java.io.IOException; import java.nio.file.Files; import java.nio.file.Paths; import java.util.logging.Level; import java.util.logging.Logger; | import java.io.*; import java.nio.file.*; import java.util.logging.*; | [
"java.io",
"java.nio",
"java.util"
] | java.io; java.nio; java.util; | 1,863,956 |
public RegistrationHandle put(String pluginName, String exportName, Provider<T> item) { | RegistrationHandle function(String pluginName, String exportName, Provider<T> item) { | /**
* Store one new element into the map.
*
* @param pluginName unique name of the plugin providing the export.
* @param exportName name the plugin has exported the item as.
* @param item the item to add to the collection. Must not be null.
* @return handle to remove the item at a later point in time.... | Store one new element into the map | put | {
"repo_name": "WANdisco/gerrit",
"path": "java/com/google/gerrit/extensions/registration/PrivateInternals_DynamicMapImpl.java",
"license": "apache-2.0",
"size": 3278
} | [
"com.google.inject.Provider"
] | import com.google.inject.Provider; | import com.google.inject.*; | [
"com.google.inject"
] | com.google.inject; | 1,853,957 |
private void createDescriptions() {
m_descriptions = Maps.newHashMap();
for (Object object : m_objects) {
addDescription(object);
}
} | void function() { m_descriptions = Maps.newHashMap(); for (Object object : m_objects) { addDescription(object); } } | /**
* Create the ParameterDescriptions for all the \@Parameter found.
*/ | Create the ParameterDescriptions for all the \@Parameter found | createDescriptions | {
"repo_name": "Corporatique-dev/Corporatique",
"path": "src/com/beust/jcommander/JCommander.java",
"license": "apache-2.0",
"size": 58462
} | [
"com.beust.jcommander.internal.Maps"
] | import com.beust.jcommander.internal.Maps; | import com.beust.jcommander.internal.*; | [
"com.beust.jcommander"
] | com.beust.jcommander; | 722,672 |
public static PublicKey getPublic(InputStream input) throws IOException, InvalidKeyException {
ByteArrayOutputStream output = new ByteArrayOutputStream();
byte[] buffer = new byte[4096];
int len = 0;
while (-1 != (len = input.read(buffer))) {
output.write(buffer, 0, len);
}
byte[] keyByt... | static PublicKey function(InputStream input) throws IOException, InvalidKeyException { ByteArrayOutputStream output = new ByteArrayOutputStream(); byte[] buffer = new byte[4096]; int len = 0; while (-1 != (len = input.read(buffer))) { output.write(buffer, 0, len); } byte[] keyBytes = output.toByteArray(); return getPub... | /**
* Gets the public key from input stream.
*
* @param input the input stream
* @return the public
* @throws IOException the i/o exception
* @throws InvalidKeyException invalid key exception
*/ | Gets the public key from input stream | getPublic | {
"repo_name": "sashadidukh/kaa",
"path": "common/endpoint-shared/src/main/java/org/kaaproject/kaa/common/endpoint/security/KeyUtil.java",
"license": "apache-2.0",
"size": 10319
} | [
"java.io.ByteArrayOutputStream",
"java.io.IOException",
"java.io.InputStream",
"java.security.InvalidKeyException",
"java.security.PublicKey"
] | import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.security.InvalidKeyException; import java.security.PublicKey; | import java.io.*; import java.security.*; | [
"java.io",
"java.security"
] | java.io; java.security; | 674,567 |
default Optional<Range<Long>> getInputPowerRange(PortNumber port, T component) {
return Optional.empty();
} | default Optional<Range<Long>> getInputPowerRange(PortNumber port, T component) { return Optional.empty(); } | /**
* Get the expected input power range for the component,
* as optical components have different working input power ranges.
*
* @param port the port
* @param component the port component
* @return the expected input power range, null if the component does not have
* a specified inp... | Get the expected input power range for the component, as optical components have different working input power ranges | getInputPowerRange | {
"repo_name": "kuujo/onos",
"path": "core/api/src/main/java/org/onosproject/net/behaviour/PowerConfig.java",
"license": "apache-2.0",
"size": 3472
} | [
"com.google.common.collect.Range",
"java.util.Optional",
"org.onosproject.net.PortNumber"
] | import com.google.common.collect.Range; import java.util.Optional; import org.onosproject.net.PortNumber; | import com.google.common.collect.*; import java.util.*; import org.onosproject.net.*; | [
"com.google.common",
"java.util",
"org.onosproject.net"
] | com.google.common; java.util; org.onosproject.net; | 989,406 |
public Iterable<String> getStubList(){
return Collections.unmodifiableList(stubList);
}
| Iterable<String> function(){ return Collections.unmodifiableList(stubList); } | /**
* Returns a list of the stub kinds (or stub genus names) of this; if this genus does not have any stubs,
* returns an empty list
* @return a list of the stub kinds (or stub genus names) of this; if this genus does not have any stubs,
* returns an empty list
*/ | Returns a list of the stub kinds (or stub genus names) of this; if this genus does not have any stubs, returns an empty list | getStubList | {
"repo_name": "ajhalbleib/aicg",
"path": "appinventor/blockslib/src/openblocks/codeblocks/BlockGenus.java",
"license": "mit",
"size": 52591
} | [
"java.util.Collections"
] | import java.util.Collections; | import java.util.*; | [
"java.util"
] | java.util; | 1,807,889 |
public static NoteTimeGroup getTimeGroupForTimestamp(long timestamp) {
Date today = new Date();
Date then = new Date(timestamp * 1000);
if (then.compareTo(DateUtils.addMonths(today, -1)) < 0) {
return NoteTimeGroup.GROUP_OLDER_MONTH;
} else if (then.compareTo(DateUtils.a... | static NoteTimeGroup function(long timestamp) { Date today = new Date(); Date then = new Date(timestamp * 1000); if (then.compareTo(DateUtils.addMonths(today, -1)) < 0) { return NoteTimeGroup.GROUP_OLDER_MONTH; } else if (then.compareTo(DateUtils.addWeeks(today, -1)) < 0) { return NoteTimeGroup.GROUP_OLDER_WEEK; } else... | /**
* Compare note timestamp to now and return a time grouping
*/ | Compare note timestamp to now and return a time grouping | getTimeGroupForTimestamp | {
"repo_name": "JudeRosario/WordPress-Android",
"path": "WordPress/src/main/java/org/wordpress/android/models/Note.java",
"license": "gpl-2.0",
"size": 16192
} | [
"java.util.Date",
"org.apache.commons.lang.time.DateUtils"
] | import java.util.Date; import org.apache.commons.lang.time.DateUtils; | import java.util.*; import org.apache.commons.lang.time.*; | [
"java.util",
"org.apache.commons"
] | java.util; org.apache.commons; | 525,159 |
public void removeAllNeighbours() {
Iterator<Node> neighItr = neigh.iterator();
while (neighItr.hasNext()) {
neighItr.next().setParent(null);
}
this.neigh.clear();
}
| void function() { Iterator<Node> neighItr = neigh.iterator(); while (neighItr.hasNext()) { neighItr.next().setParent(null); } this.neigh.clear(); } | /**
* Removes the all neighbors.
*/ | Removes the all neighbors | removeAllNeighbours | {
"repo_name": "nipunbalan/algorithmsimulation",
"path": "ElectionAlgorithm/src/com/technipun/ds/Node.java",
"license": "apache-2.0",
"size": 2899
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 1,210,100 |
public String toString()
{
return Arrays.toString(Arrays.copyOf(scores, currentSize));
} | String function() { return Arrays.toString(Arrays.copyOf(scores, currentSize)); } | /**
* Builds an easy-to-read description of the scores in the object.
* @return A description of the scores.
*/ | Builds an easy-to-read description of the scores in the object | toString | {
"repo_name": "lipghee/UDACITY-CS046",
"path": "L072-Arrays/13-addUpArrayValues.java",
"license": "mit",
"size": 1663
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 1,723,913 |
static JobKey jobKey(IJobKey jobKey) {
return JobKey.jobKey(JobKeys.canonicalString(jobKey));
} | static JobKey jobKey(IJobKey jobKey) { return JobKey.jobKey(JobKeys.canonicalString(jobKey)); } | /**
* Convert an Aurora IJobKey to a Quartz JobKey.
*/ | Convert an Aurora IJobKey to a Quartz JobKey | jobKey | {
"repo_name": "rosmo/aurora",
"path": "src/main/java/org/apache/aurora/scheduler/cron/quartz/Quartz.java",
"license": "apache-2.0",
"size": 3859
} | [
"org.apache.aurora.scheduler.base.JobKeys",
"org.apache.aurora.scheduler.storage.entities.IJobKey",
"org.quartz.JobKey"
] | import org.apache.aurora.scheduler.base.JobKeys; import org.apache.aurora.scheduler.storage.entities.IJobKey; import org.quartz.JobKey; | import org.apache.aurora.scheduler.base.*; import org.apache.aurora.scheduler.storage.entities.*; import org.quartz.*; | [
"org.apache.aurora",
"org.quartz"
] | org.apache.aurora; org.quartz; | 2,562,994 |
private void showApiError()
{
Toast.makeText(_context, R.string.api_error, Toast.LENGTH_LONG)
.show();
} | void function() { Toast.makeText(_context, R.string.api_error, Toast.LENGTH_LONG) .show(); } | /**
* Show an API error toast.
*/ | Show an API error toast | showApiError | {
"repo_name": "nicjansma/tisktasks",
"path": "src/com/nicjansma/tisktasks/activities/PopupDialogBase.java",
"license": "mit",
"size": 9812
} | [
"android.widget.Toast"
] | import android.widget.Toast; | import android.widget.*; | [
"android.widget"
] | android.widget; | 2,344,591 |
private BiConsumer<SubscribeOptions<?>, Exception> errorHandler = DefaltErrorHandler;
public SubscribeOptions<T> build() {
checkState(!isNullOrEmpty(queue), "Queue name was not specfied");
checkState(concurrentThreadsLimit > 0,
String.format("Invalid conc... | BiConsumer<SubscribeOptions<?>, Exception> errorHandler = DefaltErrorHandler; public SubscribeOptions<T> function() { checkState(!isNullOrEmpty(queue), STR); checkState(concurrentThreadsLimit > 0, String.format(STR, concurrentThreadsLimit)); return new SubscribeOptions<>(messageType, queue, autoAckEnabled, noLocal, exc... | /**
* Builds SubscribeOptions.
*
* @return SubscribeOptions
*/ | Builds SubscribeOptions | build | {
"repo_name": "FinderSystems/Elmer",
"path": "elmer/src/main/java/pl/finder/elmer/subscription/SubscribeOptions.java",
"license": "mit",
"size": 4059
} | [
"com.google.common.base.Preconditions",
"java.util.function.BiConsumer"
] | import com.google.common.base.Preconditions; import java.util.function.BiConsumer; | import com.google.common.base.*; import java.util.function.*; | [
"com.google.common",
"java.util"
] | com.google.common; java.util; | 1,277,358 |
public Map<String, Node> getTweakReplacements() {
return getReplacementsHelper(tweakReplacements);
} | Map<String, Node> function() { return getReplacementsHelper(tweakReplacements); } | /**
* Returns the map of tweak replacements.
*/ | Returns the map of tweak replacements | getTweakReplacements | {
"repo_name": "jhiswin/idiil-closure-compiler",
"path": "src/com/google/javascript/jscomp/CompilerOptions.java",
"license": "apache-2.0",
"size": 69415
} | [
"com.google.javascript.rhino.Node",
"java.util.Map"
] | import com.google.javascript.rhino.Node; import java.util.Map; | import com.google.javascript.rhino.*; import java.util.*; | [
"com.google.javascript",
"java.util"
] | com.google.javascript; java.util; | 1,609,460 |
@Nullable public ServerConnectionEventHandler onNewConnection(SocketAddress clientAddress);
} | @Nullable ServerConnectionEventHandler function(SocketAddress clientAddress); } | /**
* Called when a new connection completes version handshake to get a new connection-specific listener.
* If null is returned, the connection is immediately closed.
*/ | Called when a new connection completes version handshake to get a new connection-specific listener. If null is returned, the connection is immediately closed | onNewConnection | {
"repo_name": "leafcoin/leafcoinj-alice",
"path": "core/src/main/java/com/google/leafcoin/protocols/channels/PaymentChannelServerListener.java",
"license": "apache-2.0",
"size": 8615
} | [
"java.net.SocketAddress",
"javax.annotation.Nullable"
] | import java.net.SocketAddress; import javax.annotation.Nullable; | import java.net.*; import javax.annotation.*; | [
"java.net",
"javax.annotation"
] | java.net; javax.annotation; | 2,473,400 |
@SuppressWarnings("unchecked")
@Test
public void testParameterReuse() {
PersistenceManager pm = TestTools.openPM();
pm.currentTransaction().begin();
//implicit + explicit
Query q;
Collection<TestClass> c;
int i12 = 12;
q = pm.newQuery(TestClass.class, "_int <= intParam || _int >= intParam PARAM... | @SuppressWarnings(STR) void function() { PersistenceManager pm = TestTools.openPM(); pm.currentTransaction().begin(); Query q; Collection<TestClass> c; int i12 = 12; q = pm.newQuery(TestClass.class, STR); c = (Collection<TestClass>)q.execute(i12); assertEquals(5, c.size()); q = pm.newQuery(TestClass.class, STR); c = (C... | /**
* This test for reuse of parameters.
*/ | This test for reuse of parameters | testParameterReuse | {
"repo_name": "tzaeschke/zoodb",
"path": "tst/org/zoodb/test/jdo/Test_174_QueryVariables.java",
"license": "gpl-3.0",
"size": 21644
} | [
"java.util.Collection",
"javax.jdo.PersistenceManager",
"javax.jdo.Query",
"org.junit.Assert",
"org.zoodb.test.testutil.TestTools"
] | import java.util.Collection; import javax.jdo.PersistenceManager; import javax.jdo.Query; import org.junit.Assert; import org.zoodb.test.testutil.TestTools; | import java.util.*; import javax.jdo.*; import org.junit.*; import org.zoodb.test.testutil.*; | [
"java.util",
"javax.jdo",
"org.junit",
"org.zoodb.test"
] | java.util; javax.jdo; org.junit; org.zoodb.test; | 2,584,384 |
@Deprecated
public HttpMessage getLoginRequestMessage() throws HttpMalformedHeaderException, DatabaseException,
URIException, NullPointerException {
HttpMessage requestMessage = null;
if (this.loginSiteNode != null)
requestMessage = this.loginSiteNode.getHistoryReference().getHttpMessage();
else... | HttpMessage function() throws HttpMalformedHeaderException, DatabaseException, URIException, NullPointerException { HttpMessage requestMessage = null; if (this.loginSiteNode != null) requestMessage = this.loginSiteNode.getHistoryReference().getHttpMessage(); else { String method = (loginRequestBody != null) ? HttpReque... | /**
* Gets the login request message.
*
* Method added for use with the 'mock' up {@link org.zaproxy.zap.extension.auth.ExtensionAuth}. Should be eliminated
* after ZAP 2.3 is released.
*
*/ | Gets the login request message. Method added for use with the 'mock' up <code>org.zaproxy.zap.extension.auth.ExtensionAuth</code>. Should be eliminated after ZAP 2.3 is released | getLoginRequestMessage | {
"repo_name": "efdutra/zaproxy",
"path": "src/org/zaproxy/zap/authentication/FormBasedAuthenticationMethodType.java",
"license": "apache-2.0",
"size": 37300
} | [
"org.apache.commons.httpclient.URIException",
"org.parosproxy.paros.db.DatabaseException",
"org.parosproxy.paros.network.HttpHeader",
"org.parosproxy.paros.network.HttpMalformedHeaderException",
"org.parosproxy.paros.network.HttpMessage",
"org.parosproxy.paros.network.HttpRequestHeader"
] | import org.apache.commons.httpclient.URIException; import org.parosproxy.paros.db.DatabaseException; import org.parosproxy.paros.network.HttpHeader; import org.parosproxy.paros.network.HttpMalformedHeaderException; import org.parosproxy.paros.network.HttpMessage; import org.parosproxy.paros.network.HttpRequestHeader; | import org.apache.commons.httpclient.*; import org.parosproxy.paros.db.*; import org.parosproxy.paros.network.*; | [
"org.apache.commons",
"org.parosproxy.paros"
] | org.apache.commons; org.parosproxy.paros; | 1,539,388 |
private void exportKeysAndSignOut() {
View dialogLayout = getLayoutInflater().inflate(R.layout.dialog_export_e2e_keys, null);
AlertDialog.Builder dialog = new AlertDialog.Builder(this);
dialog.setTitle(R.string.encryption_export_room_keys);
dialog.setView(dialogLayout); | void function() { View dialogLayout = getLayoutInflater().inflate(R.layout.dialog_export_e2e_keys, null); AlertDialog.Builder dialog = new AlertDialog.Builder(this); dialog.setTitle(R.string.encryption_export_room_keys); dialog.setView(dialogLayout); | /**
* Manage the e2e keys export.
*/ | Manage the e2e keys export | exportKeysAndSignOut | {
"repo_name": "noepitome/neon-android",
"path": "neon/src/main/java/im/neon/activity/VectorHomeActivity.java",
"license": "apache-2.0",
"size": 59887
} | [
"android.app.AlertDialog",
"android.view.View"
] | import android.app.AlertDialog; import android.view.View; | import android.app.*; import android.view.*; | [
"android.app",
"android.view"
] | android.app; android.view; | 829,321 |
void doCheckpoint() throws IOException {
BackupImage bnImage = getFSImage();
NNStorage bnStorage = bnImage.getStorage();
long startTime = now();
bnImage.freezeNamespaceAtNextRoll();
NamenodeCommand cmd =
getRemoteNamenodeProxy().startCheckpoint(backupNode.getRegistration());
Check... | void doCheckpoint() throws IOException { BackupImage bnImage = getFSImage(); NNStorage bnStorage = bnImage.getStorage(); long startTime = now(); bnImage.freezeNamespaceAtNextRoll(); NamenodeCommand cmd = getRemoteNamenodeProxy().startCheckpoint(backupNode.getRegistration()); CheckpointCommand cpCmd = null; switch(cmd.g... | /**
* Create a new checkpoint
*/ | Create a new checkpoint | doCheckpoint | {
"repo_name": "jsrudani/HadoopHDFSProject",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/Checkpointer.java",
"license": "apache-2.0",
"size": 10733
} | [
"java.io.File",
"java.io.IOException",
"org.apache.hadoop.hdfs.server.common.HdfsServerConstants",
"org.apache.hadoop.hdfs.server.protocol.CheckpointCommand",
"org.apache.hadoop.hdfs.server.protocol.NamenodeCommand",
"org.apache.hadoop.hdfs.server.protocol.NamenodeProtocol",
"org.apache.hadoop.hdfs.serv... | import java.io.File; import java.io.IOException; import org.apache.hadoop.hdfs.server.common.HdfsServerConstants; import org.apache.hadoop.hdfs.server.protocol.CheckpointCommand; import org.apache.hadoop.hdfs.server.protocol.NamenodeCommand; import org.apache.hadoop.hdfs.server.protocol.NamenodeProtocol; import org.apa... | import java.io.*; import org.apache.hadoop.hdfs.server.common.*; import org.apache.hadoop.hdfs.server.protocol.*; import org.apache.hadoop.io.*; import org.apache.hadoop.util.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 1,830,964 |
GitLabApiClient newClient = new GitLabApiClient(
"http://gitlab.example.org",
"0123456789abcdef",
"http://proxy",
1234);
assertThat(newClient.getHost(), is("http://gitlab.example.org"));
assertThat(newClient.getPrivateToken(), is("01234567... | GitLabApiClient newClient = new GitLabApiClient( STR0123456789abcdefSTRhttp: 1234); assertThat(newClient.getHost(), is(STR0123456789abcdefSTRhttp: assertThat(newClient.getProxyPort(), is(1234)); } | /**
* Tests creating a new instance with a proxy.
*/ | Tests creating a new instance with a proxy | createInstanceWithProxy | {
"repo_name": "enil/gitlab-api-plugin",
"path": "gitlab-api-client/src/test/java/com/sonymobile/gitlab/api/ClientInstantiationTest.java",
"license": "mit",
"size": 4683
} | [
"org.hamcrest.CoreMatchers",
"org.junit.Assert"
] | import org.hamcrest.CoreMatchers; import org.junit.Assert; | import org.hamcrest.*; import org.junit.*; | [
"org.hamcrest",
"org.junit"
] | org.hamcrest; org.junit; | 2,187,187 |
public DocumentMetadata getMetadata() throws AnalysisException {
doWork(Step.AFFILIATION_PARSING);
return metadata;
} | DocumentMetadata function() throws AnalysisException { doWork(Step.AFFILIATION_PARSING); return metadata; } | /**
* Extracts the metadata.
*
* @return the metadata
* @throws AnalysisException AnalysisException
*/ | Extracts the metadata | getMetadata | {
"repo_name": "CeON/CERMINE",
"path": "cermine-impl/src/main/java/pl/edu/icm/cermine/InternalContentExtractor.java",
"license": "agpl-3.0",
"size": 14210
} | [
"pl.edu.icm.cermine.ExtractionUtils",
"pl.edu.icm.cermine.exception.AnalysisException",
"pl.edu.icm.cermine.metadata.model.DocumentMetadata"
] | import pl.edu.icm.cermine.ExtractionUtils; import pl.edu.icm.cermine.exception.AnalysisException; import pl.edu.icm.cermine.metadata.model.DocumentMetadata; | import pl.edu.icm.cermine.*; import pl.edu.icm.cermine.exception.*; import pl.edu.icm.cermine.metadata.model.*; | [
"pl.edu.icm"
] | pl.edu.icm; | 1,890,044 |
public void setStoragePolicy(Path path, String policyName) {
FSUtils.setStoragePolicy(this.fs, path, policyName);
} | void function(Path path, String policyName) { FSUtils.setStoragePolicy(this.fs, path, policyName); } | /**
* Set the source path (directory/file) to the specified storage policy.
* @param path The source path (directory/file).
* @param policyName The name of the storage policy: 'HOT', 'COLD', etc.
* See see hadoop 2.6+ org.apache.hadoop.hdfs.protocol.HdfsConstants for possible list e.g
* 'COLD', 'WARM', '... | Set the source path (directory/file) to the specified storage policy | setStoragePolicy | {
"repo_name": "Eshcar/hbase",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/fs/HFileSystem.java",
"license": "apache-2.0",
"size": 18872
} | [
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.hbase.util.FSUtils"
] | import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.util.FSUtils; | import org.apache.hadoop.fs.*; import org.apache.hadoop.hbase.util.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,439,965 |
@Override
public List<YangLeaf> getListOfLeaf() {
return listOfLeaf;
} | List<YangLeaf> function() { return listOfLeaf; } | /**
* Returns the list of leaves.
*
* @return the list of leaves
*/ | Returns the list of leaves | getListOfLeaf | {
"repo_name": "maheshraju-Huawei/actn",
"path": "utils/yangutils/datamodel/src/main/java/org/onosproject/yangutils/datamodel/YangCase.java",
"license": "apache-2.0",
"size": 9595
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 734,997 |
@ServiceMethod(returns = ReturnType.SINGLE)
public Mono<Void> deleteAsync(String roleInstanceName, String resourceGroupName, String cloudServiceName) {
return beginDeleteAsync(roleInstanceName, resourceGroupName, cloudServiceName)
.last()
.flatMap(this.client::getLroFinalResultOr... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<Void> function(String roleInstanceName, String resourceGroupName, String cloudServiceName) { return beginDeleteAsync(roleInstanceName, resourceGroupName, cloudServiceName) .last() .flatMap(this.client::getLroFinalResultOrError); } | /**
* Deletes a role instance from a cloud service.
*
* @param roleInstanceName Name of the role instance.
* @param resourceGroupName The resourceGroupName parameter.
* @param cloudServiceName The cloudServiceName parameter.
* @throws IllegalArgumentException thrown if parameters fail the ... | Deletes a role instance from a cloud service | deleteAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/implementation/CloudServiceRoleInstancesClientImpl.java",
"license": "mit",
"size": 109969
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; | import com.azure.core.annotation.*; | [
"com.azure.core"
] | com.azure.core; | 430,104 |
public void onActivityResult(int requestCode, int responseCode,
Intent intent) {
debugLog("onActivityResult: req="
+ (requestCode == RC_RESOLVE ? "RC_RESOLVE" : String
.valueOf(requestCode)) + ", resp="
+ GameHelperUtils.activityResponseCod... | void function(int requestCode, int responseCode, Intent intent) { debugLog(STR + (requestCode == RC_RESOLVE ? STR : String .valueOf(requestCode)) + STR + GameHelperUtils.activityResponseCodeToString(responseCode)); if (requestCode != RC_RESOLVE) { debugLog(STR); return; } mExpectingResolution = false; if (!mConnecting)... | /**
* Handle activity result. Call this method from your Activity's
* onActivityResult callback. If the activity result pertains to the sign-in
* process, processes it appropriately.
*/ | Handle activity result. Call this method from your Activity's onActivityResult callback. If the activity result pertains to the sign-in process, processes it appropriately | onActivityResult | {
"repo_name": "zhuqianqian/ColorTile",
"path": "proj.android/src/com/z299studio/colortile/GameHelper.java",
"license": "gpl-3.0",
"size": 39973
} | [
"android.app.Activity",
"android.content.Intent",
"com.google.android.gms.games.GamesActivityResultCodes"
] | import android.app.Activity; import android.content.Intent; import com.google.android.gms.games.GamesActivityResultCodes; | import android.app.*; import android.content.*; import com.google.android.gms.games.*; | [
"android.app",
"android.content",
"com.google.android"
] | android.app; android.content; com.google.android; | 454,186 |
@Type(type = "com.servinglynk.hmis.warehouse.enums.EntryRHYIncarceratedParentStatusEnumType")
@Basic( optional = true )
@Column (name="incarcerated_parent_status")
public EntryRHYIncarceratedParentStatusEnum getIncarceratedParentStatus() {
return incarceratedParentStatus;
} | @Type(type = STR) @Basic( optional = true ) @Column (name=STR) EntryRHYIncarceratedParentStatusEnum function() { return incarceratedParentStatus; } | /**
* Return the value associated with the column: incarceratedParentStatus.
* @return A Integer object (this.incarceratedParentStatus)
*/ | Return the value associated with the column: incarceratedParentStatus | getIncarceratedParentStatus | {
"repo_name": "servinglynk/servinglynk-hmis",
"path": "hmis-model-v2016/src/main/java/com/servinglynk/hmis/warehouse/model/v2016/Entryrhy.java",
"license": "mpl-2.0",
"size": 59514
} | [
"com.servinglynk.hmis.warehouse.enums.EntryRHYIncarceratedParentStatusEnum",
"javax.persistence.Basic",
"javax.persistence.Column",
"org.hibernate.annotations.Type"
] | import com.servinglynk.hmis.warehouse.enums.EntryRHYIncarceratedParentStatusEnum; import javax.persistence.Basic; import javax.persistence.Column; import org.hibernate.annotations.Type; | import com.servinglynk.hmis.warehouse.enums.*; import javax.persistence.*; import org.hibernate.annotations.*; | [
"com.servinglynk.hmis",
"javax.persistence",
"org.hibernate.annotations"
] | com.servinglynk.hmis; javax.persistence; org.hibernate.annotations; | 1,871,398 |
@Override
public boolean ucSave(final String inName, final String inFirstName,
final String inStreet, final String inZIP, final String inCity,
final String inTel, final String inFax, final String inMail,
final String inSex, final String inLanguage,
final String[] ... | boolean function(final String inName, final String inFirstName, final String inStreet, final String inZIP, final String inCity, final String inTel, final String inFax, final String inMail, final String inSex, final String inLanguage, final String[] inRoles, final Long inActorID) throws BOMChangeValueException { try { f... | /** Save the data of an edited entry.
*
* @param inName java.lang.String
* @param inFirstName java.lang.String
* @param inStreet java.lang.String
* @param inZIP java.lang.String
* @param inCity java.lang.String
* @param inTel java.lang.String
* @param inFax java.lang.String
... | Save the data of an edited entry | ucSave | {
"repo_name": "aktion-hip/vif",
"path": "org.hip.vif.core/src/org/hip/vif/core/bom/impl/MemberImpl.java",
"license": "gpl-2.0",
"size": 35361
} | [
"java.sql.Timestamp",
"org.hip.vif.core.bom.BOMHelper",
"org.hip.vif.core.bom.LinkMemberRoleHome",
"org.hip.vif.core.bom.MemberHistory",
"org.hip.vif.core.bom.MemberHistoryHome",
"org.hip.vif.core.bom.MemberHome",
"org.hip.vif.core.exc.BOMChangeValueException",
"org.hip.vif.core.util.RolesCheck"
] | import java.sql.Timestamp; import org.hip.vif.core.bom.BOMHelper; import org.hip.vif.core.bom.LinkMemberRoleHome; import org.hip.vif.core.bom.MemberHistory; import org.hip.vif.core.bom.MemberHistoryHome; import org.hip.vif.core.bom.MemberHome; import org.hip.vif.core.exc.BOMChangeValueException; import org.hip.vif.core... | import java.sql.*; import org.hip.vif.core.bom.*; import org.hip.vif.core.exc.*; import org.hip.vif.core.util.*; | [
"java.sql",
"org.hip.vif"
] | java.sql; org.hip.vif; | 2,353,881 |
public void setContainerHLAnnotationHLAPI(
HLAnnotationHLAPI elem){
if(elem!=null)
item.setContainerHLAnnotation((HLAnnotation)elem.getContainedItem());
}
| void function( HLAnnotationHLAPI elem){ if(elem!=null) item.setContainerHLAnnotation((HLAnnotation)elem.getContainedItem()); } | /**
* set ContainerHLAnnotation
*/ | set ContainerHLAnnotation | setContainerHLAnnotationHLAPI | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-HLPN/src/fr/lip6/move/pnml/hlpn/lists/hlapi/SublistHLAPI.java",
"license": "epl-1.0",
"size": 111755
} | [
"fr.lip6.move.pnml.hlpn.hlcorestructure.HLAnnotation",
"fr.lip6.move.pnml.hlpn.hlcorestructure.hlapi.HLAnnotationHLAPI"
] | import fr.lip6.move.pnml.hlpn.hlcorestructure.HLAnnotation; import fr.lip6.move.pnml.hlpn.hlcorestructure.hlapi.HLAnnotationHLAPI; | import fr.lip6.move.pnml.hlpn.hlcorestructure.*; import fr.lip6.move.pnml.hlpn.hlcorestructure.hlapi.*; | [
"fr.lip6.move"
] | fr.lip6.move; | 283,845 |
@Override
public void undo(UndoableTestEvent event) {
html.setHTML(event.getOldHistory());
value.setHTML(event.getOldValue());
} | void function(UndoableTestEvent event) { html.setHTML(event.getOldHistory()); value.setHTML(event.getOldValue()); } | /**
* undo the event in case of a conflict by resetting the display to the values valid before the event has been applied
*
* @param event
*/ | undo the event in case of a conflict by resetting the display to the values valid before the event has been applied | undo | {
"repo_name": "incidincer/twice",
"path": "ServerPushStandalone/src/main/java/ch/unifr/pai/twice/comm/serverPush/standalone/client/ServerPushStandalone.java",
"license": "apache-2.0",
"size": 8609
} | [
"ch.unifr.pai.twice.widgets.client.events.UndoableTestEvent"
] | import ch.unifr.pai.twice.widgets.client.events.UndoableTestEvent; | import ch.unifr.pai.twice.widgets.client.events.*; | [
"ch.unifr.pai"
] | ch.unifr.pai; | 2,309,759 |
private void calculateColor(int coord) {
coord = coord - mBarPointerHaloRadius;
if (coord < 0) {
coord = 0;
} else if (coord > mBarLength) {
coord = mBarLength;
}
mColor = Color.HSVToColor(
Math.round(mPosToOpacFactor * coord),
mHSVC... | void function(int coord) { coord = coord - mBarPointerHaloRadius; if (coord < 0) { coord = 0; } else if (coord > mBarLength) { coord = mBarLength; } mColor = Color.HSVToColor( Math.round(mPosToOpacFactor * coord), mHSVColor); if (Color.alpha(mColor) > 250) { mColor = Color.HSVToColor(mHSVColor); } else if (Color.alpha(... | /**
* Calculate the color selected by the pointer on the bar.
*
* @param coord
* Coordinate of the pointer.
*/ | Calculate the color selected by the pointer on the bar | calculateColor | {
"repo_name": "petalyaa/Launchpet2",
"path": "src/com/larswerkman/holocolorpicker/OpacityBar.java",
"license": "gpl-2.0",
"size": 14863
} | [
"android.graphics.Color"
] | import android.graphics.Color; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 1,622,785 |
public static Builder dataReadError() {
return dataReadError(null);
}
/**
* Wraps the passed exception inside a data read error.
* <p>The cause message will be used unless {@link Builder#message(String, Object...)} is called.
* <p>If the wrapped exception is, or wraps, a user exception it will be re... | static Builder function() { return dataReadError(null); } /** * Wraps the passed exception inside a data read error. * <p>The cause message will be used unless {@link Builder#message(String, Object...)} is called. * <p>If the wrapped exception is, or wraps, a user exception it will be returned by {@link Builder#build(L... | /**
* Creates a new user exception builder.
*
* @see org.apache.drill.exec.proto.UserBitShared.DrillPBError.ErrorType#DATA_READ
* @return user exception builder
*/ | Creates a new user exception builder | dataReadError | {
"repo_name": "superbstreak/drill",
"path": "common/src/main/java/org/apache/drill/common/exceptions/UserException.java",
"license": "apache-2.0",
"size": 29694
} | [
"org.slf4j.Logger"
] | import org.slf4j.Logger; | import org.slf4j.*; | [
"org.slf4j"
] | org.slf4j; | 2,855,316 |
public CookieConfigType<T> maxAge(Integer maxAge)
{
childNode.getOrCreate("max-age").text(maxAge);
return this;
} | CookieConfigType<T> function(Integer maxAge) { childNode.getOrCreate(STR).text(maxAge); return this; } | /**
* Sets the <code>max-age</code> element
* @param maxAge the value for the element <code>max-age</code>
* @return the current instance of <code>CookieConfigType<T></code>
*/ | Sets the <code>max-age</code> element | maxAge | {
"repo_name": "forge/javaee-descriptors",
"path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/webcommon31/CookieConfigTypeImpl.java",
"license": "epl-1.0",
"size": 11267
} | [
"org.jboss.shrinkwrap.descriptor.api.webcommon31.CookieConfigType"
] | import org.jboss.shrinkwrap.descriptor.api.webcommon31.CookieConfigType; | import org.jboss.shrinkwrap.descriptor.api.webcommon31.*; | [
"org.jboss.shrinkwrap"
] | org.jboss.shrinkwrap; | 449,026 |
public StatementSpecRaw getStatementSpecRaw()
{
return statementSpecRaw;
}
| StatementSpecRaw function() { return statementSpecRaw; } | /**
* Returns the uncompiled statement spec.
* @return statement spec uncompiled
*/ | Returns the uncompiled statement spec | getStatementSpecRaw | {
"repo_name": "intelie/esper",
"path": "esper/src/main/java/com/espertech/esper/epl/expression/ExprSubselectNode.java",
"license": "gpl-2.0",
"size": 9879
} | [
"com.espertech.esper.epl.spec.StatementSpecRaw"
] | import com.espertech.esper.epl.spec.StatementSpecRaw; | import com.espertech.esper.epl.spec.*; | [
"com.espertech.esper"
] | com.espertech.esper; | 755,317 |
@Override
public void startDocument() throws SAXException {
super.startDocument();
startPrefixMapping("rdf", RDF);
startPrefixMapping("xmp", XMP);
startElement(RDF, "RDF", "rdf:RDF", EMPTY_ATTRIBUTES);
} | void function() throws SAXException { super.startDocument(); startPrefixMapping("rdf", RDF); startPrefixMapping("xmp", XMP); startElement(RDF, "RDF", STR, EMPTY_ATTRIBUTES); } | /**
* Starts an XMP document by setting up the namespace mappings and
* writing out the following header:
* <pre>
* <rdf:RDF>
* </pre>
*/ | Starts an XMP document by setting up the namespace mappings and writing out the following header: <code> <rdf:RDF> </code> | startDocument | {
"repo_name": "zamattiac/tika",
"path": "tika-core/src/main/java/org/apache/tika/sax/XMPContentHandler.java",
"license": "apache-2.0",
"size": 5246
} | [
"org.xml.sax.SAXException"
] | import org.xml.sax.SAXException; | import org.xml.sax.*; | [
"org.xml.sax"
] | org.xml.sax; | 508,397 |
public static void setVar(Configuration conf, ConfVars var, String val) {
assert var.defaultVal.getClass() == String.class;
conf.set(var.varname, val);
} | static void function(Configuration conf, ConfVars var, String val) { assert var.defaultVal.getClass() == String.class; conf.set(var.varname, val); } | /**
* Set the variable as a string
* @param conf configuration file to set it in
* @param var variable to set
* @param val value to set it to
*/ | Set the variable as a string | setVar | {
"repo_name": "b-slim/hive",
"path": "standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java",
"license": "apache-2.0",
"size": 121969
} | [
"org.apache.hadoop.conf.Configuration"
] | import org.apache.hadoop.conf.Configuration; | import org.apache.hadoop.conf.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,010,248 |
@FFDCIgnore(IllegalArgumentException.class)
private String evaluateGroupMemberOfAttribute(boolean immediateOnly) {
String groupMemberOfAttribute = this.idStoreDefinition.groupMemberOfAttribute();
try {
return elHelper.processString("groupMemberOfAttribute", groupMemberOfAttribute, im... | @FFDCIgnore(IllegalArgumentException.class) String function(boolean immediateOnly) { String groupMemberOfAttribute = this.idStoreDefinition.groupMemberOfAttribute(); try { return elHelper.processString(STR, groupMemberOfAttribute, immediateOnly); } catch (IllegalArgumentException e) { if (immediateOnly && elHelper.isDe... | /**
* Evaluate and return the groupMemberOfAttribute.
*
* @param immediateOnly If true, only return a non-null value if the setting is either an
* immediate EL expression or not set by an EL expression. If false, return the
* value regardless of where it is evaluated.
... | Evaluate and return the groupMemberOfAttribute | evaluateGroupMemberOfAttribute | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.security.javaeesec/src/com/ibm/ws/security/javaeesec/identitystore/LdapIdentityStoreDefinitionWrapper.java",
"license": "epl-1.0",
"size": 44802
} | [
"com.ibm.websphere.ras.Tr",
"com.ibm.websphere.ras.TraceComponent",
"com.ibm.ws.ffdc.annotation.FFDCIgnore"
] | import com.ibm.websphere.ras.Tr; import com.ibm.websphere.ras.TraceComponent; import com.ibm.ws.ffdc.annotation.FFDCIgnore; | import com.ibm.websphere.ras.*; import com.ibm.ws.ffdc.annotation.*; | [
"com.ibm.websphere",
"com.ibm.ws"
] | com.ibm.websphere; com.ibm.ws; | 302,755 |
public static void setConfiguredCommand(String command) {
command = command.trim();
String defaultCommand = TerminalHelper.getDefaultCommand();
if (command.isEmpty() || command.equals(defaultCommand)) {
// It's the default, so we don't have to save anything.
NbPrefer... | static void function(String command) { command = command.trim(); String defaultCommand = TerminalHelper.getDefaultCommand(); if (command.isEmpty() command.equals(defaultCommand)) { NbPreferences.forModule(TerminalHelper.class).remove(STR); } else { NbPreferences.forModule(TerminalHelper.class).put(STR, command); } } | /**
* Set the command that should be used to open a terminal window.
*
* @param command "Open a terminal window" command
*/ | Set the command that should be used to open a terminal window | setConfiguredCommand | {
"repo_name": "itavero/terminal-from-here",
"path": "src/nl/arnom/netbeans/terminal/TerminalHelper.java",
"license": "mit",
"size": 5508
} | [
"org.openide.util.NbPreferences"
] | import org.openide.util.NbPreferences; | import org.openide.util.*; | [
"org.openide.util"
] | org.openide.util; | 1,982,864 |
@Test
public void testFindWithEmptyStatus() {
JpaJobSpecs.getFindPredicate(
this.root,
this.cb,
ID,
JOB_NAME,
USER_NAME,
Sets.newHashSet(),
TAGS,
CLUSTER_NAME,
CLUSTER,
COMMAND_NAME,
... | void function() { JpaJobSpecs.getFindPredicate( this.root, this.cb, ID, JOB_NAME, USER_NAME, Sets.newHashSet(), TAGS, CLUSTER_NAME, CLUSTER, COMMAND_NAME, COMMAND, MIN_STARTED, MAX_STARTED, MIN_FINISHED, MAX_FINISHED ); Mockito.verify(this.cb, Mockito.times(1)).equal(this.root.get(JobEntity_.id), ID); Mockito.verify(th... | /**
* Test the find specification.
*/ | Test the find specification | testFindWithEmptyStatus | {
"repo_name": "irontable/genie",
"path": "genie-core/src/test/java/com/netflix/genie/core/jpa/specifications/JpaJobSpecsUnitTests.java",
"license": "apache-2.0",
"size": 42094
} | [
"com.google.common.collect.Sets",
"com.netflix.genie.common.dto.JobStatus",
"com.netflix.genie.core.jpa.entities.JobEntity",
"org.mockito.Mockito"
] | import com.google.common.collect.Sets; import com.netflix.genie.common.dto.JobStatus; import com.netflix.genie.core.jpa.entities.JobEntity; import org.mockito.Mockito; | import com.google.common.collect.*; import com.netflix.genie.common.dto.*; import com.netflix.genie.core.jpa.entities.*; import org.mockito.*; | [
"com.google.common",
"com.netflix.genie",
"org.mockito"
] | com.google.common; com.netflix.genie; org.mockito; | 2,359,736 |
public Color getBottomColor () {
return bottomColor;
}
| Color function () { return bottomColor; } | /**
* Get the colour at the bottom of the graident
*
* @return The colour at the bottom of the gradient
*/ | Get the colour at the bottom of the graident | getBottomColor | {
"repo_name": "dbank-so/fadableUnicodeFont",
"path": "src/org/newdawn/slick/font/effects/GradientEffect.java",
"license": "bsd-3-clause",
"size": 5594
} | [
"java.awt.Color"
] | import java.awt.Color; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,275,278 |
public Vector3f centerPointForNormal(Vector3f normal) {
if (normal.x == 1 && normal.y == 0 && normal.z == 0) {
return new Vector3f(max.x, getCenter().y, getCenter().z);
}
if (normal.x == -1 && normal.y == 0 && normal.z == 0) {
return new Vector3f(min.x, getCenter().y,... | Vector3f function(Vector3f normal) { if (normal.x == 1 && normal.y == 0 && normal.z == 0) { return new Vector3f(max.x, getCenter().y, getCenter().z); } if (normal.x == -1 && normal.y == 0 && normal.z == 0) { return new Vector3f(min.x, getCenter().y, getCenter().z); } if (normal.x == 0 && normal.y == 0 && normal.z == 1)... | /**
* Returns the center point of one of the six planes for the given normal.
*
* @param normal The normal
* @return The center point
*/ | Returns the center point of one of the six planes for the given normal | centerPointForNormal | {
"repo_name": "sceptross/Terasology",
"path": "engine/src/main/java/org/terasology/math/AABB.java",
"license": "apache-2.0",
"size": 13381
} | [
"org.terasology.math.geom.Vector3f"
] | import org.terasology.math.geom.Vector3f; | import org.terasology.math.geom.*; | [
"org.terasology.math"
] | org.terasology.math; | 1,494,057 |
public static Expr rewrite(AnalyticExpr analyticExpr) {
Function fn = analyticExpr.getFnCall().getFn();
if (AnalyticExpr.isPercentRankFn(fn)) {
return createPercentRank(analyticExpr);
} else if (AnalyticExpr.isCumeDistFn(fn)) {
return createCumeDist(analyticExpr);
} else if (AnalyticExpr.i... | static Expr function(AnalyticExpr analyticExpr) { Function fn = analyticExpr.getFnCall().getFn(); if (AnalyticExpr.isPercentRankFn(fn)) { return createPercentRank(analyticExpr); } else if (AnalyticExpr.isCumeDistFn(fn)) { return createCumeDist(analyticExpr); } else if (AnalyticExpr.isNtileFn(fn)) { return createNtile(a... | /**
* Rewrite the following analytic functions:
* percent_rank(), cume_dist() and ntile()
*
* Returns a new Expr if the analytic expr is rewritten, returns null if it's not one
* that we want to rewrite.
*/ | Rewrite the following analytic functions: percent_rank(), cume_dist() and ntile() Returns a new Expr if the analytic expr is rewritten, returns null if it's not one that we want to rewrite | rewrite | {
"repo_name": "kapilrastogi/Impala",
"path": "fe/src/main/java/com/cloudera/impala/analysis/AnalyticExpr.java",
"license": "apache-2.0",
"size": 31615
} | [
"com.cloudera.impala.catalog.Function"
] | import com.cloudera.impala.catalog.Function; | import com.cloudera.impala.catalog.*; | [
"com.cloudera.impala"
] | com.cloudera.impala; | 2,157,734 |
public static CstType intern(Class clazz) {
return intern(Type.intern(clazz));
}
public CstType(Type type) {
if (type == null) {
throw new NullPointerException("type == null");
}
if (type == type.KNOWN_NULL) {
throw new UnsupportedOperationExcep... | static CstType function(Class clazz) { return intern(Type.intern(clazz)); } public CstType(Type type) { if (type == null) { throw new NullPointerException(STR); } if (type == type.KNOWN_NULL) { throw new UnsupportedOperationException( STR); } this.type = type; this.descriptor = null; } | /**
* Returns an interned instance of this class for the given
* {@code Class} instance.
*
* @param clazz {@code non-null;} the underlying {@code Class} object
* @return {@code non-null;} an appropriately-constructed instance
*/ | Returns an interned instance of this class for the given Class instance | intern | {
"repo_name": "isee15/DexHunter",
"path": "dalvik/dexgen/src/com/android/dexgen/rop/cst/CstType.java",
"license": "apache-2.0",
"size": 7950
} | [
"com.android.dexgen.rop.type.Type"
] | import com.android.dexgen.rop.type.Type; | import com.android.dexgen.rop.type.*; | [
"com.android.dexgen"
] | com.android.dexgen; | 2,023,275 |
@Test(dataProvider="validValues",
expectedExceptions = { LDAPException.class })
public void testMatchesSubstring(String valueStr, BigInteger bigInt)
throws Exception
{
IntegerMatchingRule mr = IntegerMatchingRule.getInstance();
mr.matchesSubstring(new ASN1OctetString(valueStr),
... | @Test(dataProvider=STR, expectedExceptions = { LDAPException.class }) void function(String valueStr, BigInteger bigInt) throws Exception { IntegerMatchingRule mr = IntegerMatchingRule.getInstance(); mr.matchesSubstring(new ASN1OctetString(valueStr), new ASN1OctetString(valueStr), null, null); } | /**
* Tests the {@code matchesSubstring} method to ensure that it throws an
* exception.
*
* @param valueStr The string representation of the value.
* @param bigInt The parsed value.
*
* @throws Exception If an unexpected problem occurs.
*/ | Tests the matchesSubstring method to ensure that it throws an exception | testMatchesSubstring | {
"repo_name": "UnboundID/ldapsdk",
"path": "tests/unit/src/com/unboundid/ldap/matchingrules/IntegerMatchingRuleTestCase.java",
"license": "gpl-2.0",
"size": 13801
} | [
"com.unboundid.asn1.ASN1OctetString",
"com.unboundid.ldap.sdk.LDAPException",
"java.math.BigInteger",
"org.testng.annotations.Test"
] | import com.unboundid.asn1.ASN1OctetString; import com.unboundid.ldap.sdk.LDAPException; import java.math.BigInteger; import org.testng.annotations.Test; | import com.unboundid.asn1.*; import com.unboundid.ldap.sdk.*; import java.math.*; import org.testng.annotations.*; | [
"com.unboundid.asn1",
"com.unboundid.ldap",
"java.math",
"org.testng.annotations"
] | com.unboundid.asn1; com.unboundid.ldap; java.math; org.testng.annotations; | 684,707 |
public X509CRL generateX509CRL(
PrivateKey key,
String provider)
throws NoSuchProviderException, SecurityException, SignatureException, InvalidKeyException
{
return generateX509CRL(key, provider, null);
} | X509CRL function( PrivateKey key, String provider) throws NoSuchProviderException, SecurityException, SignatureException, InvalidKeyException { return generateX509CRL(key, provider, null); } | /**
* generate an X509 certificate, based on the current issuer and subject
* using the passed in provider for the signing.
* @deprecated use generate()
*/ | generate an X509 certificate, based on the current issuer and subject using the passed in provider for the signing | generateX509CRL | {
"repo_name": "onessimofalconi/bc-java",
"path": "prov/src/main/jdk1.3/org/bouncycastle/x509/X509V2CRLGenerator.java",
"license": "mit",
"size": 13013
} | [
"java.security.InvalidKeyException",
"java.security.NoSuchProviderException",
"java.security.PrivateKey",
"java.security.SignatureException"
] | import java.security.InvalidKeyException; import java.security.NoSuchProviderException; import java.security.PrivateKey; import java.security.SignatureException; | import java.security.*; | [
"java.security"
] | java.security; | 2,599,989 |
public HadoopJarStepConfig newEnableDebuggingStep() {
return newScriptRunnerStep("s3://" + bucket + "/libs/state-pusher/0.1/fetch");
} | HadoopJarStepConfig function() { return newScriptRunnerStep("s3: } | /**
* When ran as the first step in your job flow, enables the Hadoop debugging
* UI in the AWS Management Console.
*
* @return HadoopJarStepConfig that can be passed to your job flow.
*/ | When ran as the first step in your job flow, enables the Hadoop debugging UI in the AWS Management Console | newEnableDebuggingStep | {
"repo_name": "aws/aws-sdk-java",
"path": "aws-java-sdk-emr/src/main/java/com/amazonaws/services/elasticmapreduce/util/StepFactory.java",
"license": "apache-2.0",
"size": 10846
} | [
"com.amazonaws.services.elasticmapreduce.model.HadoopJarStepConfig"
] | import com.amazonaws.services.elasticmapreduce.model.HadoopJarStepConfig; | import com.amazonaws.services.elasticmapreduce.model.*; | [
"com.amazonaws.services"
] | com.amazonaws.services; | 1,231,645 |
public Map<String, ColumnMeta> getPrimaryKeyMap() {
Map<String, ColumnMeta> pk = new HashMap<>();
allIndexes.forEach((key, index) -> {
if (index.getIndextype().value() == IndexType.PRIMARY.value()) {
for (ColumnMeta col : index.getValues()) {
pk.put(co... | Map<String, ColumnMeta> function() { Map<String, ColumnMeta> pk = new HashMap<>(); allIndexes.forEach((key, index) -> { if (index.getIndextype().value() == IndexType.PRIMARY.value()) { for (ColumnMeta col : index.getValues()) { pk.put(col.getColumnName(), col); } } }); if (pk.size() < 1) { throw new NotSupportYetExcept... | /**
* Gets primary key map.
*
* @return the primary key map
*/ | Gets primary key map | getPrimaryKeyMap | {
"repo_name": "seata/seata",
"path": "rm-datasource/src/main/java/io/seata/rm/datasource/sql/struct/TableMeta.java",
"license": "apache-2.0",
"size": 5720
} | [
"io.seata.common.exception.NotSupportYetException",
"java.util.HashMap",
"java.util.Map"
] | import io.seata.common.exception.NotSupportYetException; import java.util.HashMap; import java.util.Map; | import io.seata.common.exception.*; import java.util.*; | [
"io.seata.common",
"java.util"
] | io.seata.common; java.util; | 1,214,683 |
public static String getParameterType(String operatorKey, String parameterName) {
Operator operator = null;
int index = operatorKey.indexOf(".");
// remove operator group if existent
if (index != -1) {
operatorKey = operatorKey.substring(index + 1);
}
try {
OperatorDescription description = Operato... | static String function(String operatorKey, String parameterName) { Operator operator = null; int index = operatorKey.indexOf("."); if (index != -1) { operatorKey = operatorKey.substring(index + 1); } try { OperatorDescription description = OperatorService.getOperatorDescription(operatorKey); if (description == null) { ... | /**
* Gets the {@link ParameterType} of the given operator key and parameter name as an i18n
* string. This is used if no type is specified in the documentation xml.
*
* @param operatorKey
* The key of the operator
* @param parameterName
* The name of the parameter
* @return An i18... | Gets the <code>ParameterType</code> of the given operator key and parameter name as an i18n string. This is used if no type is specified in the documentation xml | getParameterType | {
"repo_name": "transwarpio/rapidminer",
"path": "rapidMiner/rapidminer-studio-core/src/main/java/com/rapidminer/gui/OperatorDocToHtmlConverter.java",
"license": "gpl-3.0",
"size": 27560
} | [
"com.rapidminer.operator.Operator",
"com.rapidminer.operator.OperatorDescription",
"com.rapidminer.tools.LogService",
"com.rapidminer.tools.OperatorService",
"java.util.logging.Level"
] | import com.rapidminer.operator.Operator; import com.rapidminer.operator.OperatorDescription; import com.rapidminer.tools.LogService; import com.rapidminer.tools.OperatorService; import java.util.logging.Level; | import com.rapidminer.operator.*; import com.rapidminer.tools.*; import java.util.logging.*; | [
"com.rapidminer.operator",
"com.rapidminer.tools",
"java.util"
] | com.rapidminer.operator; com.rapidminer.tools; java.util; | 1,223,342 |
@SuppressWarnings("unchecked")
public synchronized <T extends IDbgEngineResponse> T sendRequest(IDbgClientRequest<T> request) {
if (!isConnected) {
return null;
}
try {
request.setID(debugRequestId++);
EngineSyncResponse<T> syncResponse = new EngineSyn... | @SuppressWarnings(STR) synchronized <T extends IDbgEngineResponse> T function(IDbgClientRequest<T> request) { if (!isConnected) { return null; } try { request.setID(debugRequestId++); EngineSyncResponse<T> syncResponse = new EngineSyncResponse<T>(); engineSyncResponses.put(request.getID(), (EngineSyncResponse<IDbgEngin... | /**
* Sends given client request to Zend debugger engine.
*
* @param request
* @return Zend debugger engine response
*/ | Sends given client request to Zend debugger engine | sendRequest | {
"repo_name": "gazarenkov/che-sketch",
"path": "plugins/plugin-zend-debugger/che-plugin-zend-debugger-server/src/main/java/org/eclipse/che/plugin/zdb/server/connection/ZendDbgConnection.java",
"license": "epl-1.0",
"size": 14117
} | [
"org.eclipse.che.plugin.zdb.server.ZendDebugger",
"org.eclipse.che.plugin.zdb.server.connection.ZendDbgClientMessages",
"org.eclipse.che.plugin.zdb.server.connection.ZendDbgEngineMessages",
"org.eclipse.che.plugin.zdb.server.exceptions.ZendDbgTimeoutException"
] | import org.eclipse.che.plugin.zdb.server.ZendDebugger; import org.eclipse.che.plugin.zdb.server.connection.ZendDbgClientMessages; import org.eclipse.che.plugin.zdb.server.connection.ZendDbgEngineMessages; import org.eclipse.che.plugin.zdb.server.exceptions.ZendDbgTimeoutException; | import org.eclipse.che.plugin.zdb.server.*; import org.eclipse.che.plugin.zdb.server.connection.*; import org.eclipse.che.plugin.zdb.server.exceptions.*; | [
"org.eclipse.che"
] | org.eclipse.che; | 1,413,688 |
@ServiceMethod(returns = ReturnType.SINGLE)
void delete(String resourceGroupName, String expressRouteGatewayName, String connectionName, Context context); | @ServiceMethod(returns = ReturnType.SINGLE) void delete(String resourceGroupName, String expressRouteGatewayName, String connectionName, Context context); | /**
* Deletes a connection to a ExpressRoute circuit.
*
* @param resourceGroupName The name of the resource group.
* @param expressRouteGatewayName The name of the ExpressRoute gateway.
* @param connectionName The name of the connection subresource.
* @param context The context to associat... | Deletes a connection to a ExpressRoute circuit | delete | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/fluent/ExpressRouteConnectionsClient.java",
"license": "mit",
"size": 20556
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.util.Context"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.util.Context; | import com.azure.core.annotation.*; import com.azure.core.util.*; | [
"com.azure.core"
] | com.azure.core; | 1,571,033 |
public Authorization getSourceAuthorization() {
return this.srcAuth;
} | Authorization function() { return this.srcAuth; } | /**
* Returns authorization type for
* the source side for the url copy.
* If no authorization type is set, the default
* authorization will be performed for a given protocol.
*
* @return source authorization type
*/ | Returns authorization type for the source side for the url copy. If no authorization type is set, the default authorization will be performed for a given protocol | getSourceAuthorization | {
"repo_name": "jglobus/JGlobus",
"path": "io/src/main/java/org/globus/io/urlcopy/UrlCopy.java",
"license": "apache-2.0",
"size": 27698
} | [
"org.globus.gsi.gssapi.auth.Authorization"
] | import org.globus.gsi.gssapi.auth.Authorization; | import org.globus.gsi.gssapi.auth.*; | [
"org.globus.gsi"
] | org.globus.gsi; | 325,884 |
private void drawLeftPart(final Point buttonSize) {
this.gc.setForeground(this.unselectedBackgroundColor);
this.gc.setBackground(this.unselectedBackgroundColor);
if (this.round) {
this.gc.fillRoundRectangle(2, 2, buttonSize.x, buttonSize.y, 5, 5);
} else {
this.gc.fillRectangle(2, 2, buttonSize.x, butt... | void function(final Point buttonSize) { this.gc.setForeground(this.unselectedBackgroundColor); this.gc.setBackground(this.unselectedBackgroundColor); if (this.round) { this.gc.fillRoundRectangle(2, 2, buttonSize.x, buttonSize.y, 5, 5); } else { this.gc.fillRectangle(2, 2, buttonSize.x, buttonSize.y); } this.gc.setForeg... | /**
* Draw the left part of the button
*
* @param buttonSize
* size of the button
*/ | Draw the left part of the button | drawLeftPart | {
"repo_name": "gama-platform/gama.cloud",
"path": "ummisco.gama.ui.shared_web/src/ummisco/gama/ui/controls/SwitchButton.java",
"license": "agpl-3.0",
"size": 21740
} | [
"org.eclipse.swt.graphics.Point"
] | import org.eclipse.swt.graphics.Point; | import org.eclipse.swt.graphics.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 2,764,790 |
public boolean incrementUsageWithQuotaLimit(TenantCapacity tenantCapacity) {
String sql =
"UPDATE tenant_capacity SET `usage` = `usage` + 1, gmt_modified = ? WHERE tenant_id = ? AND `usage` < "
+ "quota AND quota != 0";
try {
return jdbcTemplate.up... | boolean function(TenantCapacity tenantCapacity) { String sql = STR + STR; try { return jdbcTemplate.update(sql, tenantCapacity.getGmtModified(), tenantCapacity.getTenant()) == 1; } catch (CannotGetJdbcConnectionException e) { FATAL_LOG.error(STR, e); throw e; } } | /**
* Increment UsageWithQuotaLimit.
*
* @param tenantCapacity tenantCapacity object instance.
* @return operate result.
*/ | Increment UsageWithQuotaLimit | incrementUsageWithQuotaLimit | {
"repo_name": "alibaba/nacos",
"path": "config/src/main/java/com/alibaba/nacos/config/server/service/capacity/TenantCapacityPersistService.java",
"license": "apache-2.0",
"size": 12053
} | [
"com.alibaba.nacos.config.server.model.capacity.TenantCapacity",
"org.springframework.jdbc.CannotGetJdbcConnectionException"
] | import com.alibaba.nacos.config.server.model.capacity.TenantCapacity; import org.springframework.jdbc.CannotGetJdbcConnectionException; | import com.alibaba.nacos.config.server.model.capacity.*; import org.springframework.jdbc.*; | [
"com.alibaba.nacos",
"org.springframework.jdbc"
] | com.alibaba.nacos; org.springframework.jdbc; | 2,057,482 |
protected Component newSelectedHeader(final String componentId)
{
return new Label(componentId, new ResourceModel("palette.selected", "Selected"));
} | Component function(final String componentId) { return new Label(componentId, new ResourceModel(STR, STR)); } | /**
* factory method for the selected items header
*
* @param componentId
* component id of the returned header component
*
* @return header component
*/ | factory method for the selected items header | newSelectedHeader | {
"repo_name": "dashorst/wicket",
"path": "wicket-extensions/src/main/java/org/apache/wicket/extensions/markup/html/form/palette/Palette.java",
"license": "apache-2.0",
"size": 18676
} | [
"org.apache.wicket.Component",
"org.apache.wicket.markup.html.basic.Label",
"org.apache.wicket.model.ResourceModel"
] | import org.apache.wicket.Component; import org.apache.wicket.markup.html.basic.Label; import org.apache.wicket.model.ResourceModel; | import org.apache.wicket.*; import org.apache.wicket.markup.html.basic.*; import org.apache.wicket.model.*; | [
"org.apache.wicket"
] | org.apache.wicket; | 1,238,594 |
protected Collection<CcrDocument> getEntities(int start, int max) {
EntityManager em = PersistenceService.getInstance().getEntityManager();
return em.createNamedQuery("CcrDocument.findByHealthRecordId")
.setParameter("healthRecordId" , this.healthRecordId)
.setFirstRe... | Collection<CcrDocument> function(int start, int max) { EntityManager em = PersistenceService.getInstance().getEntityManager(); return em.createNamedQuery(STR) .setParameter(STR , this.healthRecordId) .setFirstResult(start) .setMaxResults(max) .getResultList(); } | /**
* Returns all the entities associated with this resource.
*
* @return a collection of CcrDocument instances
*/ | Returns all the entities associated with this resource | getEntities | {
"repo_name": "OSEHRA/HealtheMe",
"path": "src/main/java/com/krminc/phr/api/service/clinical/CcrDocumentsResource.java",
"license": "apache-2.0",
"size": 3511
} | [
"com.krminc.phr.dao.PersistenceService",
"com.krminc.phr.domain.clinical.CcrDocument",
"java.util.Collection",
"javax.persistence.EntityManager"
] | import com.krminc.phr.dao.PersistenceService; import com.krminc.phr.domain.clinical.CcrDocument; import java.util.Collection; import javax.persistence.EntityManager; | import com.krminc.phr.dao.*; import com.krminc.phr.domain.clinical.*; import java.util.*; import javax.persistence.*; | [
"com.krminc.phr",
"java.util",
"javax.persistence"
] | com.krminc.phr; java.util; javax.persistence; | 898,938 |
public NextHopResultInner withNextHopType(NextHopType nextHopType) {
this.nextHopType = nextHopType;
return this;
} | NextHopResultInner function(NextHopType nextHopType) { this.nextHopType = nextHopType; return this; } | /**
* Set the nextHopType value.
*
* @param nextHopType the nextHopType value to set
* @return the NextHopResultInner object itself.
*/ | Set the nextHopType value | withNextHopType | {
"repo_name": "jianghaolu/azure-sdk-for-java",
"path": "azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/implementation/NextHopResultInner.java",
"license": "mit",
"size": 2693
} | [
"com.microsoft.azure.management.network.NextHopType"
] | import com.microsoft.azure.management.network.NextHopType; | import com.microsoft.azure.management.network.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 1,854,781 |
private synchronized List<LocatedBlock> getFinalizedBlockRange(
long offset, long length) throws IOException {
assert (locatedBlocks != null) : "locatedBlocks is null";
List<LocatedBlock> blockRange = new ArrayList<LocatedBlock>();
// search cached blocks first
int blockIdx = locatedBlocks.findB... | synchronized List<LocatedBlock> function( long offset, long length) throws IOException { assert (locatedBlocks != null) : STR; List<LocatedBlock> blockRange = new ArrayList<LocatedBlock>(); int blockIdx = locatedBlocks.findBlock(offset); if (blockIdx < 0) { blockIdx = LocatedBlocks.getInsertIndex(blockIdx); } long rema... | /**
* Get blocks in the specified range.
* Includes only the complete blocks.
* Fetch them from the namenode if not cached.
*/ | Get blocks in the specified range. Includes only the complete blocks. Fetch them from the namenode if not cached | getFinalizedBlockRange | {
"repo_name": "yelshater/hadoop-2.3.0",
"path": "hadoop-hdfs-2.3.0-cdh5.1.0/src/main/java/org/apache/hadoop/hdfs/DFSInputStream.java",
"license": "apache-2.0",
"size": 62394
} | [
"java.io.IOException",
"java.util.ArrayList",
"java.util.List",
"org.apache.hadoop.hdfs.protocol.LocatedBlock",
"org.apache.hadoop.hdfs.protocol.LocatedBlocks"
] | import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.apache.hadoop.hdfs.protocol.LocatedBlock; import org.apache.hadoop.hdfs.protocol.LocatedBlocks; | import java.io.*; import java.util.*; import org.apache.hadoop.hdfs.protocol.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 264,632 |
@Test
public void testInsertOverwriteForMmTable() throws Exception {
FileSystem fs = FileSystem.get(hiveConf);
FileStatus[] status;
// 1. Insert two rows to an MM table
runStatementOnDriver("insert into " + TableExtended.MMTBL + "(a,b) values(1,2)");
runStatementOnDriver("insert into " + TableE... | void function() throws Exception { FileSystem fs = FileSystem.get(hiveConf); FileStatus[] status; runStatementOnDriver(STR + TableExtended.MMTBL + STR); runStatementOnDriver(STR + TableExtended.MMTBL + STR); status = fs.listStatus(new Path(TEST_WAREHOUSE_DIR + "/" + (TableExtended.MMTBL).toString().toLowerCase()), File... | /**
* Test a scenario, on a micro-managed table, where an IOW comes in
* after a MAJOR compaction, and then a MINOR compaction is initiated.
*
* @throws Exception
*/ | Test a scenario, on a micro-managed table, where an IOW comes in after a MAJOR compaction, and then a MINOR compaction is initiated | testInsertOverwriteForMmTable | {
"repo_name": "alanfgates/hive",
"path": "ql/src/test/org/apache/hadoop/hive/ql/TestTxnCommandsForMmTable.java",
"license": "apache-2.0",
"size": 29907
} | [
"java.util.List",
"org.apache.hadoop.fs.FileStatus",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.hive.common.FileUtils",
"org.junit.Assert"
] | import java.util.List; import org.apache.hadoop.fs.FileStatus; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hive.common.FileUtils; import org.junit.Assert; | import java.util.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hive.common.*; import org.junit.*; | [
"java.util",
"org.apache.hadoop",
"org.junit"
] | java.util; org.apache.hadoop; org.junit; | 694,124 |
@ServiceMethod(returns = ReturnType.COLLECTION)
public PagedFlux<FirewallPolicyInner> listAsync() {
return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listAllNextSinglePageAsync(nextLink));
} | @ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux<FirewallPolicyInner> function() { return new PagedFlux<>(() -> listSinglePageAsync(), nextLink -> listAllNextSinglePageAsync(nextLink)); } | /**
* Gets all the Firewall Policies in 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 all the Firewall Policies in a subscription.
*/ | Gets all the Firewall Policies in a subscription | listAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-network/src/main/java/com/azure/resourcemanager/network/implementation/FirewallPoliciesClientImpl.java",
"license": "mit",
"size": 59146
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedFlux",
"com.azure.resourcemanager.network.fluent.models.FirewallPolicyInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedFlux; import com.azure.resourcemanager.network.fluent.models.FirewallPolicyInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.network.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 135,139 |
void deleteStoredObjects(Container container, List<StoredObject> storedObject, StopRequester stopRequester, SwiftCallback callback); | void deleteStoredObjects(Container container, List<StoredObject> storedObject, StopRequester stopRequester, SwiftCallback callback); | /**
* deletes a single stored object.
* @param container the container holding the object.
* @param storedObject the object.
* @param stopRequester to stop the task
* @param callback the callback to call.
*/ | deletes a single stored object | deleteStoredObjects | {
"repo_name": "webs86/swift-explorer",
"path": "src/main/java/org/swiftexplorer/swift/operations/SwiftOperations.java",
"license": "apache-2.0",
"size": 15340
} | [
"java.util.List",
"org.javaswift.joss.model.Container",
"org.javaswift.joss.model.StoredObject"
] | import java.util.List; import org.javaswift.joss.model.Container; import org.javaswift.joss.model.StoredObject; | import java.util.*; import org.javaswift.joss.model.*; | [
"java.util",
"org.javaswift.joss"
] | java.util; org.javaswift.joss; | 1,087,921 |
T visitAssignment(@NotNull MuteParser.AssignmentContext ctx);
| T visitAssignment(@NotNull MuteParser.AssignmentContext ctx); | /**
* Visit a parse tree produced by {@link MuteParser#assignment}.
* @param ctx the parse tree
* @return the visitor result
*/ | Visit a parse tree produced by <code>MuteParser#assignment</code> | visitAssignment | {
"repo_name": "renaudbedard/MuteGrammar",
"path": "src/com/xxiivv/mute/MuteVisitor.java",
"license": "mit",
"size": 4969
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 2,670,394 |
public java.util.List<br.gov.camara.edemocracia.portlets.wikilegis.model.Estrutura> findByG_P(
long groupId, long paiEstruturaId)
throws com.liferay.portal.kernel.exception.SystemException; | java.util.List<br.gov.camara.edemocracia.portlets.wikilegis.model.Estrutura> function( long groupId, long paiEstruturaId) throws com.liferay.portal.kernel.exception.SystemException; | /**
* Returns all the estruturas where groupId = ? and paiEstruturaId = ?.
*
* @param groupId the group ID
* @param paiEstruturaId the pai estrutura ID
* @return the matching estruturas
* @throws SystemException if a system exception occurred
*/ | Returns all the estruturas where groupId = ? and paiEstruturaId = ? | findByG_P | {
"repo_name": "camaradosdeputadosoficial/edemocracia",
"path": "cd-wikilegis-portlet/src/main/java/br/gov/camara/edemocracia/portlets/wikilegis/service/persistence/EstruturaPersistence.java",
"license": "lgpl-2.1",
"size": 15371
} | [
"br.gov.camara.edemocracia.portlets.wikilegis.model.Estrutura"
] | import br.gov.camara.edemocracia.portlets.wikilegis.model.Estrutura; | import br.gov.camara.edemocracia.portlets.wikilegis.model.*; | [
"br.gov.camara"
] | br.gov.camara; | 1,874,160 |
boolean requestInvokeGL(View containerView, boolean waitForCompletion); | boolean requestInvokeGL(View containerView, boolean waitForCompletion); | /**
* Requests a callback on the native DrawGL method (see getAwDrawGLFunction).
*
* |containerView| must be hardware accelerated. If |waitForCompletion| is true, this method
* will not return until functor has returned.
*/ | Requests a callback on the native DrawGL method (see getAwDrawGLFunction). |containerView| must be hardware accelerated. If |waitForCompletion| is true, this method will not return until functor has returned | requestInvokeGL | {
"repo_name": "chromium/chromium",
"path": "android_webview/java/src/org/chromium/android_webview/AwContents.java",
"license": "bsd-3-clause",
"size": 185442
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 1,647,005 |
public String getContent(String url, String expectedContentType, List<NameValuePair> params, int expectedStatusCode) throws IOException {
return getContent(url, expectedContentType, params, expectedStatusCode, HTTP_METHOD_GET);
} | String function(String url, String expectedContentType, List<NameValuePair> params, int expectedStatusCode) throws IOException { return getContent(url, expectedContentType, params, expectedStatusCode, HTTP_METHOD_GET); } | /** retrieve the contents of given URL and assert its content type (default to HTTP GET method)
* @param expectedContentType use CONTENT_TYPE_DONTCARE if must not be checked
* @throws IOException
* @throws HttpException */ | retrieve the contents of given URL and assert its content type (default to HTTP GET method) | getContent | {
"repo_name": "roele/sling",
"path": "bundles/commons/testing/src/main/java/org/apache/sling/commons/testing/integration/HttpTestBase.java",
"license": "apache-2.0",
"size": 24829
} | [
"java.io.IOException",
"java.util.List",
"org.apache.commons.httpclient.NameValuePair"
] | import java.io.IOException; import java.util.List; import org.apache.commons.httpclient.NameValuePair; | import java.io.*; import java.util.*; import org.apache.commons.httpclient.*; | [
"java.io",
"java.util",
"org.apache.commons"
] | java.io; java.util; org.apache.commons; | 522,363 |
private void removeOldValues() throws CmsException {
Locale locale = getLocale();
I_CmsXmlContentValue value = m_document.getValue(N_DETAIL_PAGE, locale);
do {
value = m_document.getValue(N_DETAIL_PAGE, locale);
if (value != null) {
m_document.removeV... | void function() throws CmsException { Locale locale = getLocale(); I_CmsXmlContentValue value = m_document.getValue(N_DETAIL_PAGE, locale); do { value = m_document.getValue(N_DETAIL_PAGE, locale); if (value != null) { m_document.removeValue(value.getPath(), locale, 0); } } while (value != null); } | /**
* Removes the old detail page information from the XML content.<p>
*
* @throws CmsException if something goes wrong
*/ | Removes the old detail page information from the XML content | removeOldValues | {
"repo_name": "mediaworx/opencms-core",
"path": "src/org/opencms/ade/detailpage/CmsDetailPageConfigurationWriter.java",
"license": "lgpl-2.1",
"size": 6627
} | [
"java.util.Locale",
"org.opencms.main.CmsException"
] | import java.util.Locale; import org.opencms.main.CmsException; | import java.util.*; import org.opencms.main.*; | [
"java.util",
"org.opencms.main"
] | java.util; org.opencms.main; | 58,838 |
private static synchronized void initLogger() {
if (logger == null) {
logger = Logger.getLogger(SASL_LOGGER_NAME);
}
}
private static final String SASL_LOGGER_NAME = "javax.security.sasl";
protected static Logger logger; // set in initLogger(); lazily loads logger | static synchronized void function() { if (logger == null) { logger = Logger.getLogger(SASL_LOGGER_NAME); } } private static final String SASL_LOGGER_NAME = STR; protected static Logger logger; | /**
* Sets logger field.
*/ | Sets logger field | initLogger | {
"repo_name": "lostdj/Jaklin-OpenJDK-JDK",
"path": "src/java.security.sasl/share/classes/com/sun/security/sasl/CramMD5Base.java",
"license": "gpl-2.0",
"size": 7000
} | [
"java.util.logging.Logger"
] | import java.util.logging.Logger; | import java.util.logging.*; | [
"java.util"
] | java.util; | 2,893,219 |
public java.util.List<fr.lip6.move.pnml.hlpn.integers.hlapi.HLIntegerHLAPI> getInput_integers_HLIntegerHLAPI(){
java.util.List<fr.lip6.move.pnml.hlpn.integers.hlapi.HLIntegerHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.integers.hlapi.HLIntegerHLAPI>();
for (Sort elemnt : getInput()) {
if(elemnt.g... | java.util.List<fr.lip6.move.pnml.hlpn.integers.hlapi.HLIntegerHLAPI> function(){ java.util.List<fr.lip6.move.pnml.hlpn.integers.hlapi.HLIntegerHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.integers.hlapi.HLIntegerHLAPI>(); for (Sort elemnt : getInput()) { if(elemnt.getClass().equals(fr.lip6.move.pnml.hlpn.intege... | /**
* This accessor return a list of encapsulated subelement, only of HLIntegerHLAPI kind.
* WARNING : this method can creates a lot of new object in memory.
*/ | This accessor return a list of encapsulated subelement, only of HLIntegerHLAPI kind. WARNING : this method can creates a lot of new object in memory | getInput_integers_HLIntegerHLAPI | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-HLPN/src/fr/lip6/move/pnml/hlpn/strings/hlapi/LessThanHLAPI.java",
"license": "epl-1.0",
"size": 108437
} | [
"fr.lip6.move.pnml.hlpn.terms.Sort",
"java.util.ArrayList",
"java.util.List"
] | import fr.lip6.move.pnml.hlpn.terms.Sort; import java.util.ArrayList; import java.util.List; | import fr.lip6.move.pnml.hlpn.terms.*; import java.util.*; | [
"fr.lip6.move",
"java.util"
] | fr.lip6.move; java.util; | 288,026 |
public static Properties fileToProperties(String fileName) throws IOException, ConfigurationException {
return fileToProperties(fileName, new Configuration());
} | static Properties function(String fileName) throws IOException, ConfigurationException { return fileToProperties(fileName, new Configuration()); } | /**
* Load the properties from the specified file into a {@link Properties} object.
*
* @param fileName the name of the file to load properties from
* @return a new {@link Properties} instance
*/ | Load the properties from the specified file into a <code>Properties</code> object | fileToProperties | {
"repo_name": "zliu41/gobblin",
"path": "gobblin-utility/src/main/java/gobblin/util/JobConfigurationUtils.java",
"license": "apache-2.0",
"size": 4591
} | [
"java.io.IOException",
"java.util.Properties",
"org.apache.commons.configuration.ConfigurationException",
"org.apache.hadoop.conf.Configuration"
] | import java.io.IOException; import java.util.Properties; import org.apache.commons.configuration.ConfigurationException; import org.apache.hadoop.conf.Configuration; | import java.io.*; import java.util.*; import org.apache.commons.configuration.*; import org.apache.hadoop.conf.*; | [
"java.io",
"java.util",
"org.apache.commons",
"org.apache.hadoop"
] | java.io; java.util; org.apache.commons; org.apache.hadoop; | 1,291,923 |
@Test
public void testSynchAllOnSelectionChangeAfterSetMonthView() {
JXDatePicker picker = new JXDatePicker();
picker.setMonthView(new JXMonthView());
Date date = XTestUtils.getStartOfToday(5);
picker.getMonthView().setSelectionInterval(date, date);
assertSynchAll(picker,... | void function() { JXDatePicker picker = new JXDatePicker(); picker.setMonthView(new JXMonthView()); Date date = XTestUtils.getStartOfToday(5); picker.getMonthView().setSelectionInterval(date, date); assertSynchAll(picker, date); } | /**
* Issue #559-swingX: date must be synched in all parts.
* here: set selection must work after changing the monthView.
*
* Note: this started to fail during listener cleanup.
*/ | here: set selection must work after changing the monthView. Note: this started to fail during listener cleanup | testSynchAllOnSelectionChangeAfterSetMonthView | {
"repo_name": "trejkaz/swingx",
"path": "swingx-core/src/test/java/org/jdesktop/swingx/JXDatePickerTest.java",
"license": "lgpl-2.1",
"size": 77220
} | [
"java.util.Date",
"org.jdesktop.swingx.test.XTestUtils"
] | import java.util.Date; import org.jdesktop.swingx.test.XTestUtils; | import java.util.*; import org.jdesktop.swingx.test.*; | [
"java.util",
"org.jdesktop.swingx"
] | java.util; org.jdesktop.swingx; | 1,210,753 |
public ServiceFuture<Void> deleteAsync(String resourceGroupName, String namespaceName, String eventHubName, final ServiceCallback<Void> serviceCallback) {
return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName), serviceCallback);
} | ServiceFuture<Void> function(String resourceGroupName, String namespaceName, String eventHubName, final ServiceCallback<Void> serviceCallback) { return ServiceFuture.fromResponse(deleteWithServiceResponseAsync(resourceGroupName, namespaceName, eventHubName), serviceCallback); } | /**
* Deletes an Event Hub from the specified Namespace and resource group.
*
* @param resourceGroupName Name of the resource group within the azure subscription.
* @param namespaceName The Namespace name
* @param eventHubName The Event Hub name
* @param serviceCallback the async ServiceCa... | Deletes an Event Hub from the specified Namespace and resource group | deleteAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/eventhubs/mgmt-v2017_04_01/src/main/java/com/microsoft/azure/management/eventhubs/v2017_04_01/implementation/EventHubsInner.java",
"license": "mit",
"size": 95104
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 1,767,955 |
File file = new File(getAbsoluteDirectoryPath());
// LogUtils.LOGD(TAG, "Checking directory: " + file.getPath());
// LogUtils.LOGD(TAG, "Exists: " + file.exists());
return file.exists();
} | File file = new File(getAbsoluteDirectoryPath()); return file.exists(); } | /**
* Check whether the directory on which to load the file exists
* @return Whether the directory exists
*/ | Check whether the directory on which to load the file exists | downloadDirectoryExists | {
"repo_name": "jtdor/Kore",
"path": "app/src/main/java/org/xbmc/kore/utils/FileDownloadHelper.java",
"license": "apache-2.0",
"size": 16135
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 46,794 |
private void deleteTrustedCertificate() {
// Which entries have been selected?
int[] selectedRows = trustedCertsTable.getSelectedRows();
if (selectedRows.length == 0) // no trusted cert entry selected
return;
// Ask user to confirm the deletion
if (showConfirmDialog(
null,
"Are you sure you wan... | void function() { int[] selectedRows = trustedCertsTable.getSelectedRows(); if (selectedRows.length == 0) return; if (showConfirmDialog( null, STR, ALERT_TITLE, YES_NO_OPTION) != YES_OPTION) return; String exMessage = null; for (int i = selectedRows.length - 1; i >= 0; i--) { String alias = (String) trustedCertsTable.g... | /**
* Lets a user delete the selected trusted certificate entries from the
* Truststore.
*/ | Lets a user delete the selected trusted certificate entries from the Truststore | deleteTrustedCertificate | {
"repo_name": "ThilinaManamgoda/incubator-taverna-workbench",
"path": "taverna-credential-manager-ui/src/main/java/org/apache/taverna/workbench/ui/credentialmanager/CredentialManagerUI.java",
"license": "apache-2.0",
"size": 53224
} | [
"javax.swing.JOptionPane",
"org.apache.taverna.security.credentialmanager.CMException"
] | import javax.swing.JOptionPane; import org.apache.taverna.security.credentialmanager.CMException; | import javax.swing.*; import org.apache.taverna.security.credentialmanager.*; | [
"javax.swing",
"org.apache.taverna"
] | javax.swing; org.apache.taverna; | 1,801,310 |
public static int convert2Int( byte[] hex ) {
// Code from Ajp11, from Apache's JServ
// assert b.length==4
// assert valid data
int len;
if(hex.length < 4 ) return 0;
if( DEC[hex[0]]<0 )
throw MESSAGES.badHexDigit();
len = DEC[hex[0]];
le... | static int function( byte[] hex ) { int len; if(hex.length < 4 ) return 0; if( DEC[hex[0]]<0 ) throw MESSAGES.badHexDigit(); len = DEC[hex[0]]; len = len << 4; if( DEC[hex[1]]<0 ) throw MESSAGES.badHexDigit(); len += DEC[hex[1]]; len = len << 4; if( DEC[hex[2]]<0 ) throw MESSAGES.badHexDigit(); len += DEC[hex[2]]; len ... | /**
* Convert 4 hex digits to an int, and return the number of converted
* bytes.
*
* @param hex Byte array containing exactly four hexadecimal digits
*
* @exception IllegalArgumentException if an invalid hexadecimal digit
* is included
*/ | Convert 4 hex digits to an int, and return the number of converted bytes | convert2Int | {
"repo_name": "johnaoahra80/JBOSSWEB_7_5_0_FINAL",
"path": "src/main/java/org/apache/catalina/util/HexUtils.java",
"license": "apache-2.0",
"size": 5822
} | [
"org.jboss.web.CatalinaMessages"
] | import org.jboss.web.CatalinaMessages; | import org.jboss.web.*; | [
"org.jboss.web"
] | org.jboss.web; | 1,376,039 |
protected org.apache.wicket.protocol.http.IRequestLogger getRequestLogger()
{
if (application instanceof WebApplication)
{
return ((WebApplication)application).getRequestLogger();
}
return null;
} | org.apache.wicket.protocol.http.IRequestLogger function() { if (application instanceof WebApplication) { return ((WebApplication)application).getRequestLogger(); } return null; } | /**
* Gets the request logger for this application.
*
* @return The request logger or null if no request is active, or if this is not a web
* application
*/ | Gets the request logger for this application | getRequestLogger | {
"repo_name": "astubbs/wicket.get-portals2",
"path": "wicket-jmx/src/main/java/org/apache/wicket/jmx/RequestLogger.java",
"license": "apache-2.0",
"size": 3575
} | [
"org.apache.wicket.protocol.http.WebApplication"
] | import org.apache.wicket.protocol.http.WebApplication; | import org.apache.wicket.protocol.http.*; | [
"org.apache.wicket"
] | org.apache.wicket; | 2,607,810 |
public void setBusinessObjectService(BusinessObjectService businessObjectService) {
this.businessObjectService = businessObjectService;
} | void function(BusinessObjectService businessObjectService) { this.businessObjectService = businessObjectService; } | /**
* Sets the businessObjectService attribute value.
*
* @param businessObjectService The businessObjectService to set.
*/ | Sets the businessObjectService attribute value | setBusinessObjectService | {
"repo_name": "Ariah-Group/Finance",
"path": "af_webapp/src/main/java/org/kuali/kfs/module/purap/service/impl/PdpExtractServiceImpl.java",
"license": "apache-2.0",
"size": 53829
} | [
"org.kuali.rice.krad.service.BusinessObjectService"
] | import org.kuali.rice.krad.service.BusinessObjectService; | import org.kuali.rice.krad.service.*; | [
"org.kuali.rice"
] | org.kuali.rice; | 500,853 |
public VpnSiteInner withBgpProperties(BgpSettings bgpProperties) {
this.bgpProperties = bgpProperties;
return this;
} | VpnSiteInner function(BgpSettings bgpProperties) { this.bgpProperties = bgpProperties; return this; } | /**
* Set the set of bgp properties.
*
* @param bgpProperties the bgpProperties value to set
* @return the VpnSiteInner object itself.
*/ | Set the set of bgp properties | withBgpProperties | {
"repo_name": "navalev/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2019_06_01/src/main/java/com/microsoft/azure/management/network/v2019_06_01/implementation/VpnSiteInner.java",
"license": "mit",
"size": 8006
} | [
"com.microsoft.azure.management.network.v2019_06_01.BgpSettings"
] | import com.microsoft.azure.management.network.v2019_06_01.BgpSettings; | import com.microsoft.azure.management.network.v2019_06_01.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 2,239,333 |
public List<String> getSectionNamesForCourse(String courseId) throws EntityDoesNotExistException {
assert courseId != null;
return coursesLogic.getSectionsNameForCourse(courseId);
} | List<String> function(String courseId) throws EntityDoesNotExistException { assert courseId != null; return coursesLogic.getSectionsNameForCourse(courseId); } | /**
* Returns a list of section names for the course with ID courseId.
*
* <p>Preconditions: <br>
* * All parameters are non-null.
*
* @see CoursesLogic#getSectionsNameForCourse(String)
*/ | Returns a list of section names for the course with ID courseId. Preconditions: All parameters are non-null | getSectionNamesForCourse | {
"repo_name": "TEAMMATES/teammates",
"path": "src/main/java/teammates/logic/api/Logic.java",
"license": "gpl-2.0",
"size": 53736
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,144,025 |
public void createReport(String name)
{
Browser browser = model.getBrowser();
List<ImageNode> nodes = browser.getVisibleImageNodes();
if (nodes == null || nodes.size() == 0) {
UserNotifier un = DataBrowserAgent.getRegistry().getUserNotifier();
un.notifyInfo("Create Report", "No images displayed");
re... | void function(String name) { Browser browser = model.getBrowser(); List<ImageNode> nodes = browser.getVisibleImageNodes(); if (nodes == null nodes.size() == 0) { UserNotifier un = DataBrowserAgent.getRegistry().getUserNotifier(); un.notifyInfo(STR, STR); return; } List<Class> types = new ArrayList<Class>(); model.fireR... | /**
* Implemented as specified by the {@link DataBrowser} interface.
* @see DataBrowser#createReport(String)
*/ | Implemented as specified by the <code>DataBrowser</code> interface | createReport | {
"repo_name": "stelfrich/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/dataBrowser/view/DataBrowserComponent.java",
"license": "gpl-2.0",
"size": 57454
} | [
"java.util.ArrayList",
"java.util.List",
"org.openmicroscopy.shoola.agents.dataBrowser.DataBrowserAgent",
"org.openmicroscopy.shoola.agents.dataBrowser.browser.Browser",
"org.openmicroscopy.shoola.agents.dataBrowser.browser.ImageNode",
"org.openmicroscopy.shoola.env.ui.UserNotifier"
] | import java.util.ArrayList; import java.util.List; import org.openmicroscopy.shoola.agents.dataBrowser.DataBrowserAgent; import org.openmicroscopy.shoola.agents.dataBrowser.browser.Browser; import org.openmicroscopy.shoola.agents.dataBrowser.browser.ImageNode; import org.openmicroscopy.shoola.env.ui.UserNotifier; | import java.util.*; import org.openmicroscopy.shoola.agents.*; import org.openmicroscopy.shoola.env.ui.*; | [
"java.util",
"org.openmicroscopy.shoola"
] | java.util; org.openmicroscopy.shoola; | 2,120,290 |
try {
//Split the command
//Modify according to the OS.
//Create the process with streams assigned.
Process p = getOSSpecificProcess(command);
BufferedReader stdInput = new BufferedReader(new
InputStreamReader(p.getInputStream()));
... | try { Process p = getOSSpecificProcess(command); BufferedReader stdInput = new BufferedReader(new InputStreamReader(p.getInputStream())); BufferedReader stdError = new BufferedReader(new InputStreamReader(p.getErrorStream())); StringBuilder result = new StringBuilder(); String line; while ((line = stdInput.readLine()) ... | /**
* Executes the given command. Returns the output of the command. If any error occurs,
* method will merge previous output and errors and throw as an exception
*
* @param command command to execute
* @return result of the command.
* @throws RuntimeCommandException
*/ | Executes the given command. Returns the output of the command. If any error occurs, method will merge previous output and errors and throw as an exception | exec | {
"repo_name": "serayuzgur/heartbeat",
"path": "heartbeat-common/src/main/java/com/heartbeat/common/cli/RuntimeCommandExec.java",
"license": "mit",
"size": 2533
} | [
"java.io.BufferedReader",
"java.io.IOException",
"java.io.InputStreamReader"
] | import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; | import java.io.*; | [
"java.io"
] | java.io; | 475,508 |
public TString getContinuousUpdate() {
return continuousUpdate;
} | TString function() { return continuousUpdate; } | /**
* Get if effectiveness data should be provided continually or just once..
* <p>
* @return the ContinuousUpdate value in a {@link TString} data type
* @since 3.1.0
*/ | Get if effectiveness data should be provided continually or just once.. | getContinuousUpdate | {
"repo_name": "KeyBridge/lib-openssrf",
"path": "src/main/java/us/gov/dod/standard/ssrf/_3_1/radiationplan/JammingPerformance.java",
"license": "apache-2.0",
"size": 11288
} | [
"us.gov.dod.standard.ssrf._3_1.metadata.domains.TString"
] | import us.gov.dod.standard.ssrf._3_1.metadata.domains.TString; | import us.gov.dod.standard.ssrf.*; | [
"us.gov.dod"
] | us.gov.dod; | 1,892,459 |
public Object route(TransactionContext context) {
Object r;
if (log.isDebugEnabled()) {
log.debug("QlueRouter: Asked to route: " + context.getRequestUri());
}
// Loop through the configured routes
for (Route route : routes) {
if (log.isDebugEnabled()... | Object function(TransactionContext context) { Object r; if (log.isDebugEnabled()) { log.debug(STR + context.getRequestUri()); } for (Route route : routes) { if (log.isDebugEnabled()) { log.debug(STR + route.getPath()); } r = route.route(context); if (r != null) { return r; } } return null; } | /**
* Routes transaction using previously configured routes.
*/ | Routes transaction using previously configured routes | route | {
"repo_name": "ivanr/qlue",
"path": "src/main/java/com/webkreator/qlue/router/QlueRouteManager.java",
"license": "apache-2.0",
"size": 5394
} | [
"com.webkreator.qlue.TransactionContext"
] | import com.webkreator.qlue.TransactionContext; | import com.webkreator.qlue.*; | [
"com.webkreator.qlue"
] | com.webkreator.qlue; | 2,345,837 |
public String asString() throws TransformerException {
Properties outputProperties = new Properties();
outputProperties.put(javax.xml.transform.OutputKeys.OMIT_XML_DECLARATION, "yes");
return asString(outputProperties);
} | String function() throws TransformerException { Properties outputProperties = new Properties(); outputProperties.put(javax.xml.transform.OutputKeys.OMIT_XML_DECLARATION, "yes"); return asString(outputProperties); } | /**
* Serialize the XML document to a string excluding the XML declaration.
*
* @return
* the XML document as a string without the XML declaration at the
* beginning of the output.
*
* @throws TransformerException
*/ | Serialize the XML document to a string excluding the XML declaration | asString | {
"repo_name": "WenyuDeng/java-xmlbuilder",
"path": "src/main/java/com/jamesmurty/utils/BaseXMLBuilder.java",
"license": "apache-2.0",
"size": 49785
} | [
"java.util.Properties",
"javax.xml.transform.TransformerException"
] | import java.util.Properties; import javax.xml.transform.TransformerException; | import java.util.*; import javax.xml.transform.*; | [
"java.util",
"javax.xml"
] | java.util; javax.xml; | 1,170,319 |
@Pure
public SarlActionSourceAppender buildDefSarlAction(String name, ResourceSet resourceSet) {
SarlActionSourceAppender a = new SarlActionSourceAppender(createDefSarlAction(name, resourceSet));
getInjector().injectMembers(a);
return a;
} | SarlActionSourceAppender function(String name, ResourceSet resourceSet) { SarlActionSourceAppender a = new SarlActionSourceAppender(createDefSarlAction(name, resourceSet)); getInjector().injectMembers(a); return a; } | /** Create the appender for a Sarl SarlAction.
* @param name the name of the SarlAction
* @param resourceSet the set of the resources that must be used for
* containing the generated resource, and resolving types from names.
* @return the appender.
*/ | Create the appender for a Sarl SarlAction | buildDefSarlAction | {
"repo_name": "sarl/sarl",
"path": "main/coreplugins/io.sarl.lang/src-gen/io/sarl/lang/codebuilder/CodeBuilderFactory.java",
"license": "apache-2.0",
"size": 50509
} | [
"io.sarl.lang.codebuilder.appenders.SarlActionSourceAppender",
"org.eclipse.emf.ecore.resource.ResourceSet"
] | import io.sarl.lang.codebuilder.appenders.SarlActionSourceAppender; import org.eclipse.emf.ecore.resource.ResourceSet; | import io.sarl.lang.codebuilder.appenders.*; import org.eclipse.emf.ecore.resource.*; | [
"io.sarl.lang",
"org.eclipse.emf"
] | io.sarl.lang; org.eclipse.emf; | 2,625,280 |
private long peekId3PrivTimestamp(ExtractorInput input) throws IOException, InterruptedException {
input.resetPeekPosition();
if (!input.peekFully(id3Data.data, 0, Id3Decoder.ID3_HEADER_LENGTH, true)) {
return C.TIME_UNSET;
}
id3Data.reset(Id3Decoder.ID3_HEADER_LENGTH);
int id = id3Data.read... | long function(ExtractorInput input) throws IOException, InterruptedException { input.resetPeekPosition(); if (!input.peekFully(id3Data.data, 0, Id3Decoder.ID3_HEADER_LENGTH, true)) { return C.TIME_UNSET; } id3Data.reset(Id3Decoder.ID3_HEADER_LENGTH); int id = id3Data.readUnsignedInt24(); if (id != Id3Decoder.ID3_TAG) {... | /**
* Peek the presentation timestamp of the first sample in the chunk from an ID3 PRIV as defined
* in the HLS spec, version 20, Section 3.4. Returns {@link C#TIME_UNSET} if the frame is not
* found. This method only modifies the peek position.
*
* @param input The {@link ExtractorInput} to obtain the P... | Peek the presentation timestamp of the first sample in the chunk from an ID3 PRIV as defined in the HLS spec, version 20, Section 3.4. Returns <code>C#TIME_UNSET</code> if the frame is not found. This method only modifies the peek position | peekId3PrivTimestamp | {
"repo_name": "sanjaysingh1990/radio",
"path": "library/hls/src/main/java/com/google/android/exoplayer2/source/hls/HlsMediaChunk.java",
"license": "mit",
"size": 17054
} | [
"com.google.android.exoplayer2.extractor.ExtractorInput",
"com.google.android.exoplayer2.metadata.Metadata",
"com.google.android.exoplayer2.metadata.id3.Id3Decoder",
"com.google.android.exoplayer2.metadata.id3.PrivFrame",
"java.io.IOException"
] | import com.google.android.exoplayer2.extractor.ExtractorInput; import com.google.android.exoplayer2.metadata.Metadata; import com.google.android.exoplayer2.metadata.id3.Id3Decoder; import com.google.android.exoplayer2.metadata.id3.PrivFrame; import java.io.IOException; | import com.google.android.exoplayer2.extractor.*; import com.google.android.exoplayer2.metadata.*; import com.google.android.exoplayer2.metadata.id3.*; import java.io.*; | [
"com.google.android",
"java.io"
] | com.google.android; java.io; | 635,492 |
private void writeDimensions(DataOutputStream os, MLArray array) throws IOException
{
ByteArrayOutputStream buffer = new ByteArrayOutputStream();
DataOutputStream bufferDOS = new DataOutputStream(buffer);
int[] dims = array.getDimensions();
for ( int i = 0; i < dims.leng... | void function(DataOutputStream os, MLArray array) throws IOException { ByteArrayOutputStream buffer = new ByteArrayOutputStream(); DataOutputStream bufferDOS = new DataOutputStream(buffer); int[] dims = array.getDimensions(); for ( int i = 0; i < dims.length; i++ ) { bufferDOS.writeInt(dims[i]); } OSArrayTag tag = new ... | /**
* Writes MATRIX dimensions into <code>OutputStream</code>.
*
* @param os - <code>OutputStream</code>
* @param array - a <code>MLArray</code>
* @throws IOException
*/ | Writes MATRIX dimensions into <code>OutputStream</code> | writeDimensions | {
"repo_name": "lovro-i/apro",
"path": "lib/JMatIO.Mod/src/com/jmatio/io/MatFileIncrementalWriter.java",
"license": "lgpl-3.0",
"size": 17482
} | [
"com.jmatio.common.MatDataTypes",
"com.jmatio.types.MLArray",
"java.io.ByteArrayOutputStream",
"java.io.DataOutputStream",
"java.io.IOException"
] | import com.jmatio.common.MatDataTypes; import com.jmatio.types.MLArray; import java.io.ByteArrayOutputStream; import java.io.DataOutputStream; import java.io.IOException; | import com.jmatio.common.*; import com.jmatio.types.*; import java.io.*; | [
"com.jmatio.common",
"com.jmatio.types",
"java.io"
] | com.jmatio.common; com.jmatio.types; java.io; | 1,713,396 |
public Map<RouteDistinguisher, Map<BgpLinkLSIdentifier, PathAttrNlriDetails>> vpnLinkTree() {
return vpnLinkTree;
} | Map<RouteDistinguisher, Map<BgpLinkLSIdentifier, PathAttrNlriDetails>> function() { return vpnLinkTree; } | /**
* Returns the adjacency vpnLink.
*
* @return vpnLink adjacency RIB node
*/ | Returns the adjacency vpnLink | vpnLinkTree | {
"repo_name": "donNewtonAlpha/onos",
"path": "protocols/bgp/ctl/src/main/java/org/onosproject/bgp/controller/impl/VpnAdjRibIn.java",
"license": "apache-2.0",
"size": 8527
} | [
"java.util.Map",
"org.onosproject.bgpio.protocol.linkstate.BgpLinkLSIdentifier",
"org.onosproject.bgpio.protocol.linkstate.PathAttrNlriDetails",
"org.onosproject.bgpio.types.RouteDistinguisher"
] | import java.util.Map; import org.onosproject.bgpio.protocol.linkstate.BgpLinkLSIdentifier; import org.onosproject.bgpio.protocol.linkstate.PathAttrNlriDetails; import org.onosproject.bgpio.types.RouteDistinguisher; | import java.util.*; import org.onosproject.bgpio.protocol.linkstate.*; import org.onosproject.bgpio.types.*; | [
"java.util",
"org.onosproject.bgpio"
] | java.util; org.onosproject.bgpio; | 333,521 |
protected void outOfWorld()
{
this.attackEntityFrom(DamageSource.OUT_OF_WORLD, 4.0F);
} | void function() { this.attackEntityFrom(DamageSource.OUT_OF_WORLD, 4.0F); } | /**
* sets the dead flag. Used when you fall off the bottom of the world.
*/ | sets the dead flag. Used when you fall off the bottom of the world | outOfWorld | {
"repo_name": "Severed-Infinity/technium",
"path": "build/tmp/recompileMc/sources/net/minecraft/entity/EntityLivingBase.java",
"license": "gpl-3.0",
"size": 111956
} | [
"net.minecraft.util.DamageSource"
] | import net.minecraft.util.DamageSource; | import net.minecraft.util.*; | [
"net.minecraft.util"
] | net.minecraft.util; | 2,508,551 |
public List<ConfigPropertyType<ResourceadapterType<T>>> getAllConfigProperty()
{
List<ConfigPropertyType<ResourceadapterType<T>>> list = new ArrayList<ConfigPropertyType<ResourceadapterType<T>>>();
List<Node> nodeList = childNode.get("config-property");
for(Node node: nodeList)
{
... | List<ConfigPropertyType<ResourceadapterType<T>>> function() { List<ConfigPropertyType<ResourceadapterType<T>>> list = new ArrayList<ConfigPropertyType<ResourceadapterType<T>>>(); List<Node> nodeList = childNode.get(STR); for(Node node: nodeList) { ConfigPropertyType<ResourceadapterType<T>> type = new ConfigPropertyType... | /**
* Returns all <code>config-property</code> elements
* @return list of <code>config-property</code>
*/ | Returns all <code>config-property</code> elements | getAllConfigProperty | {
"repo_name": "forge/javaee-descriptors",
"path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/connector15/ResourceadapterTypeImpl.java",
"license": "epl-1.0",
"size": 14621
} | [
"java.util.ArrayList",
"java.util.List",
"org.jboss.shrinkwrap.descriptor.api.connector15.ConfigPropertyType",
"org.jboss.shrinkwrap.descriptor.api.connector15.ResourceadapterType",
"org.jboss.shrinkwrap.descriptor.spi.node.Node"
] | import java.util.ArrayList; import java.util.List; import org.jboss.shrinkwrap.descriptor.api.connector15.ConfigPropertyType; import org.jboss.shrinkwrap.descriptor.api.connector15.ResourceadapterType; import org.jboss.shrinkwrap.descriptor.spi.node.Node; | import java.util.*; import org.jboss.shrinkwrap.descriptor.api.connector15.*; import org.jboss.shrinkwrap.descriptor.spi.node.*; | [
"java.util",
"org.jboss.shrinkwrap"
] | java.util; org.jboss.shrinkwrap; | 778,655 |
@SuppressWarnings({"rawtypes", "deprecation", "unchecked"})
protected void saveSelectedWidgetsLocationAndStyle() {
savedWidgetInfoMap = new HashMap();
for (Iterator iterator = context.selectedWidgets.iterator(); iterator.hasNext();) {
Widget widget = (Widget) iterator.next();
SavedWidgetInfo in... | @SuppressWarnings({STR, STR, STR}) void function() { savedWidgetInfoMap = new HashMap(); for (Iterator iterator = context.selectedWidgets.iterator(); iterator.hasNext();) { Widget widget = (Widget) iterator.next(); SavedWidgetInfo info = new SavedWidgetInfo(); info.initialDraggableParent = widget.getParent(); if (info.... | /**
* Save the selected widgets' current location in case they much be restored due to a canceled
* drop.
*
* @see #restoreSelectedWidgetsLocation()
*/ | Save the selected widgets' current location in case they much be restored due to a canceled drop | saveSelectedWidgetsLocationAndStyle | {
"repo_name": "moutellou/gwt-connectors",
"path": "gwt-connectors/src/main/java/pl/tecna/gwt/connectors/client/drag/AxisXYDragController.java",
"license": "apache-2.0",
"size": 23573
} | [
"com.allen_sauer.gwt.dnd.client.util.WidgetLocation",
"com.google.gwt.core.client.GWT",
"com.google.gwt.user.client.DOM",
"com.google.gwt.user.client.ui.AbsolutePanel",
"com.google.gwt.user.client.ui.FlowPanel",
"com.google.gwt.user.client.ui.HorizontalPanel",
"com.google.gwt.user.client.ui.SimplePanel"... | import com.allen_sauer.gwt.dnd.client.util.WidgetLocation; import com.google.gwt.core.client.GWT; import com.google.gwt.user.client.DOM; import com.google.gwt.user.client.ui.AbsolutePanel; import com.google.gwt.user.client.ui.FlowPanel; import com.google.gwt.user.client.ui.HorizontalPanel; import com.google.gwt.user.cl... | import com.allen_sauer.gwt.dnd.client.util.*; import com.google.gwt.core.client.*; import com.google.gwt.user.client.*; import com.google.gwt.user.client.ui.*; import java.util.*; | [
"com.allen_sauer.gwt",
"com.google.gwt",
"java.util"
] | com.allen_sauer.gwt; com.google.gwt; java.util; | 2,682,820 |
@ServiceMethod(returns = ReturnType.SINGLE)
public SchemaContractInner createOrUpdate(
String resourceGroupName, String serviceName, String apiId, String schemaId, SchemaContractInner parameters) {
final String ifMatch = null;
return createOrUpdateAsync(resourceGroupName, serviceName, ap... | @ServiceMethod(returns = ReturnType.SINGLE) SchemaContractInner function( String resourceGroupName, String serviceName, String apiId, String schemaId, SchemaContractInner parameters) { final String ifMatch = null; return createOrUpdateAsync(resourceGroupName, serviceName, apiId, schemaId, parameters, ifMatch).block(); ... | /**
* Creates or updates schema configuration for the API.
*
* @param resourceGroupName The name of the resource group.
* @param serviceName The name of the API Management service.
* @param apiId API revision identifier. Must be unique in the current API Management service instance. Non-current... | Creates or updates schema configuration for the API | createOrUpdate | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/apimanagement/azure-resourcemanager-apimanagement/src/main/java/com/azure/resourcemanager/apimanagement/implementation/ApiSchemasClientImpl.java",
"license": "mit",
"size": 79226
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.resourcemanager.apimanagement.fluent.models.SchemaContractInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.resourcemanager.apimanagement.fluent.models.SchemaContractInner; | import com.azure.core.annotation.*; import com.azure.resourcemanager.apimanagement.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,294,575 |
public List<String> getAssociatedPois() {
return this.associatedPois;
} | List<String> function() { return this.associatedPois; } | /**
* <p>Getter for the field <code>associatedPois</code>.</p>
*
* @return a {@link java.util.List} object.
*/ | Getter for the field <code>associatedPois</code> | getAssociatedPois | {
"repo_name": "NotFound403/WePay",
"path": "src/main/java/cn/felord/wepay/ali/sdk/api/domain/AlipayEcoCplifeCommunityCreateModel.java",
"license": "apache-2.0",
"size": 6796
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,264,757 |
super.setUp();
final IKeyBuilderFactory keyBuilderFactory = new DefaultKeyBuilderFactory(
getProperties());
final IKeyBuilder keyBuilder = keyBuilderFactory.getKeyBuilder();
fixture = new LexiconKeyBuilder(keyBuilder);
}
| super.setUp(); final IKeyBuilderFactory keyBuilderFactory = new DefaultKeyBuilderFactory( getProperties()); final IKeyBuilder keyBuilder = keyBuilderFactory.getKeyBuilder(); fixture = new LexiconKeyBuilder(keyBuilder); } | /**
* {@inheritDoc}
* <p>
* Note: The {@link LexiconKeyBuilder} will wind up configured with the
* default {@link Locale} unless that gets overridden by
* {@link #getProperties()}
*/ | Note: The <code>LexiconKeyBuilder</code> will wind up configured with the default <code>Locale</code> unless that gets overridden by <code>#getProperties()</code> | setUp | {
"repo_name": "smalyshev/blazegraph",
"path": "bigdata-rdf/src/test/com/bigdata/rdf/lexicon/TestLexiconKeyBuilder.java",
"license": "gpl-2.0",
"size": 22607
} | [
"com.bigdata.btree.keys.DefaultKeyBuilderFactory",
"com.bigdata.btree.keys.IKeyBuilder",
"com.bigdata.btree.keys.IKeyBuilderFactory"
] | import com.bigdata.btree.keys.DefaultKeyBuilderFactory; import com.bigdata.btree.keys.IKeyBuilder; import com.bigdata.btree.keys.IKeyBuilderFactory; | import com.bigdata.btree.keys.*; | [
"com.bigdata.btree"
] | com.bigdata.btree; | 2,137,152 |
public void addPostActivateInterceptors(List<InterceptorFactory> interceptorFactory, int priority) {
postActivateInterceptors.add(interceptorFactory, priority);
} | void function(List<InterceptorFactory> interceptorFactory, int priority) { postActivateInterceptors.add(interceptorFactory, priority); } | /**
* Adds a post activate interceptor
*
* @param interceptorFactory The interceptor to add
* @param priority The priority
*/ | Adds a post activate interceptor | addPostActivateInterceptors | {
"repo_name": "99sono/wildfly",
"path": "ee/src/main/java/org/jboss/as/ee/component/ComponentConfiguration.java",
"license": "lgpl-2.1",
"size": 22115
} | [
"java.util.List",
"org.jboss.invocation.InterceptorFactory"
] | import java.util.List; import org.jboss.invocation.InterceptorFactory; | import java.util.*; import org.jboss.invocation.*; | [
"java.util",
"org.jboss.invocation"
] | java.util; org.jboss.invocation; | 2,778,371 |
DataSource getDataSource(); | DataSource getDataSource(); | /**
* Get the data source that describes the connection to the in-memory
* database.
*
* @return The data source.
*/ | Get the data source that describes the connection to the in-memory database | getDataSource | {
"repo_name": "bmatthews68/inmemdb-maven-plugin",
"path": "src/main/java/com/btmatthews/maven/plugins/inmemdb/SQLDatabase.java",
"license": "apache-2.0",
"size": 1157
} | [
"javax.sql.DataSource"
] | import javax.sql.DataSource; | import javax.sql.*; | [
"javax.sql"
] | javax.sql; | 1,692,252 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.