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 Map.Entry getFirst() {
// sentinel.next points to the "first" element of the sequence -- the head
// of the list, which is exactly the entry we need to return. We must test
// for an empty list though because we don't want to return the sentinel!
return (isEmpty()) ? null : sentinel.next;
} | Map.Entry function() { return (isEmpty()) ? null : sentinel.next; } | /**
* Return the entry for the "oldest" mapping. That is, return the Map.Entry
* for the key-value pair that was first put into the map when compared to
* all the other pairings in the map. This behavior is equivalent to using
* <code>entrySet().iterator().next()</code>, but this method provides an
... | Return the entry for the "oldest" mapping. That is, return the Map.Entry for the key-value pair that was first put into the map when compared to all the other pairings in the map. This behavior is equivalent to using <code>entrySet().iterator().next()</code>, but this method provides an optimized implementation | getFirst | {
"repo_name": "lewis-ing/bbossgroups-3.5",
"path": "bboss-persistent/src-jdk5/com/frameworkset/commons/dbcp/datasources/SequencedHashMap.java",
"license": "apache-2.0",
"size": 32335
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,751,575 |
void deleteBlockIndexEntriesForChunk(MetadataTransaction txn, String segmentName, long startOffset, long endOffset) {
this.garbageCollector.deleteBlockIndexEntriesForChunk(txn, segmentName, startOffset, endOffset);
} | void deleteBlockIndexEntriesForChunk(MetadataTransaction txn, String segmentName, long startOffset, long endOffset) { this.garbageCollector.deleteBlockIndexEntriesForChunk(txn, segmentName, startOffset, endOffset); } | /**
* Delete block index entries for given chunk.
*/ | Delete block index entries for given chunk | deleteBlockIndexEntriesForChunk | {
"repo_name": "pravega/pravega",
"path": "segmentstore/storage/src/main/java/io/pravega/segmentstore/storage/chunklayer/ChunkedSegmentStorage.java",
"license": "apache-2.0",
"size": 52641
} | [
"io.pravega.segmentstore.storage.metadata.MetadataTransaction"
] | import io.pravega.segmentstore.storage.metadata.MetadataTransaction; | import io.pravega.segmentstore.storage.metadata.*; | [
"io.pravega.segmentstore"
] | io.pravega.segmentstore; | 1,543,212 |
void setNotificationService(NotificationService notificationService); | void setNotificationService(NotificationService notificationService); | /**
* Set the notification service for this acceptor to use.
*
* @param notificationService the notification service
*/ | Set the notification service for this acceptor to use | setNotificationService | {
"repo_name": "jbertram/activemq-artemis-old",
"path": "artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/remoting/Acceptor.java",
"license": "apache-2.0",
"size": 2256
} | [
"org.apache.activemq.artemis.core.server.management.NotificationService"
] | import org.apache.activemq.artemis.core.server.management.NotificationService; | import org.apache.activemq.artemis.core.server.management.*; | [
"org.apache.activemq"
] | org.apache.activemq; | 1,321,007 |
@Override
public int getItemCount() {
int result = 0;
if (this.source != null) {
if (this.extract == TableOrder.BY_ROW) {
result = this.source.getColumnCount();
}
else if (this.extract == TableOrder.BY_COLUMN) {
result =... | int function() { int result = 0; if (this.source != null) { if (this.extract == TableOrder.BY_ROW) { result = this.source.getColumnCount(); } else if (this.extract == TableOrder.BY_COLUMN) { result = this.source.getRowCount(); } } return result; } | /**
* Returns the number of items (values) in the collection. If the
* underlying dataset is <code>null</code>, this method returns zero.
*
* @return The item count.
*/ | Returns the number of items (values) in the collection. If the underlying dataset is <code>null</code>, this method returns zero | getItemCount | {
"repo_name": "oskopek/jfreechart-fse",
"path": "src/main/java/org/jfree/data/category/CategoryToPieDataset.java",
"license": "lgpl-2.1",
"size": 11193
} | [
"org.jfree.chart.util.TableOrder"
] | import org.jfree.chart.util.TableOrder; | import org.jfree.chart.util.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 598,013 |
public static Reader getUpdateReader(Reader pReader, String xsltScript,
FreeMindMain frame) throws IOException {
StringWriter writer = null;
InputStream inputStream = null;
final java.util.logging.Logger logger = frame.getLogger(Tools.class
.getName());
logger.info("Updating the reader " + pReader
... | static Reader function(Reader pReader, String xsltScript, FreeMindMain frame) throws IOException { StringWriter writer = null; InputStream inputStream = null; final java.util.logging.Logger logger = frame.getLogger(Tools.class .getName()); logger.info(STR + pReader + STR); boolean successful = false; String errorMessag... | /**
* Creates a reader that pipes the input file through a XSLT-Script that
* updates the version to the current.
*
* @throws IOException
*/ | Creates a reader that pipes the input file through a XSLT-Script that updates the version to the current | getUpdateReader | {
"repo_name": "mibischo/freemind",
"path": "freemind/tools/ReaderProvider.java",
"license": "gpl-2.0",
"size": 5601
} | [
"java.io.IOException",
"java.io.InputStream",
"java.io.Reader",
"java.io.StringReader",
"java.io.StringWriter",
"javax.xml.transform.Result",
"javax.xml.transform.Source",
"javax.xml.transform.stream.StreamResult",
"javax.xml.transform.stream.StreamSource"
] | import java.io.IOException; import java.io.InputStream; import java.io.Reader; import java.io.StringReader; import java.io.StringWriter; import javax.xml.transform.Result; import javax.xml.transform.Source; import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamSource; | import java.io.*; import javax.xml.transform.*; import javax.xml.transform.stream.*; | [
"java.io",
"javax.xml"
] | java.io; javax.xml; | 484,729 |
public void testSerialization() throws Exception {
DoubleAdder x = new DoubleAdder();
DoubleAdder y = serialClone(x);
assertNotSame(x, y);
x.add(-22.0);
DoubleAdder z = serialClone(x);
assertEquals(-22.0, x.sum());
assertEquals(0.0, y.sum());
assertEqu... | void function() throws Exception { DoubleAdder x = new DoubleAdder(); DoubleAdder y = serialClone(x); assertNotSame(x, y); x.add(-22.0); DoubleAdder z = serialClone(x); assertEquals(-22.0, x.sum()); assertEquals(0.0, y.sum()); assertEquals(-22.0, z.sum()); } | /**
* a deserialized serialized adder holds same value
*/ | a deserialized serialized adder holds same value | testSerialization | {
"repo_name": "debian-pkg-android-tools/android-platform-libcore",
"path": "jsr166-tests/src/test/java/jsr166/DoubleAdderTest.java",
"license": "gpl-2.0",
"size": 4934
} | [
"java.util.concurrent.atomic.DoubleAdder"
] | import java.util.concurrent.atomic.DoubleAdder; | import java.util.concurrent.atomic.*; | [
"java.util"
] | java.util; | 2,218,134 |
@Nullable
default <T> T getCastedValue (@Nullable final KEYTYPE aKey)
{
return GenericReflection.uncheckedCast (getValue (aKey));
} | default <T> T getCastedValue (@Nullable final KEYTYPE aKey) { return GenericReflection.uncheckedCast (getValue (aKey)); } | /**
* Get the contained value casted to the return type.
*
* @param aKey
* The key to be accessed. May be <code>null</code>.
* @return The object value casted to the passed class. May be
* <code>null</code> if the contained value is <code>null</code>.
* @throws ClassCastException
... | Get the contained value casted to the return type | getCastedValue | {
"repo_name": "phax/ph-commons",
"path": "ph-commons/src/main/java/com/helger/commons/traits/IGetterByKeyTrait.java",
"license": "apache-2.0",
"size": 30218
} | [
"com.helger.commons.lang.GenericReflection",
"javax.annotation.Nullable"
] | import com.helger.commons.lang.GenericReflection; import javax.annotation.Nullable; | import com.helger.commons.lang.*; import javax.annotation.*; | [
"com.helger.commons",
"javax.annotation"
] | com.helger.commons; javax.annotation; | 396,055 |
@Override
protected boolean checkEntryNotValid(RegionEntry mapEntry)
{
return (super.checkEntryNotValid(mapEntry) || mapEntry.getKey() instanceof ThreadIdentifier);
} | boolean function(RegionEntry mapEntry) { return (super.checkEntryNotValid(mapEntry) mapEntry.getKey() instanceof ThreadIdentifier); } | /**
* This method is over-ridden since we do not want GII of ThreadIdentifier
* objects to happen
*/ | This method is over-ridden since we do not want GII of ThreadIdentifier objects to happen | checkEntryNotValid | {
"repo_name": "ysung-pivotal/incubator-geode",
"path": "gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/HARegion.java",
"license": "apache-2.0",
"size": 19227
} | [
"com.gemstone.gemfire.internal.cache.ha.ThreadIdentifier"
] | import com.gemstone.gemfire.internal.cache.ha.ThreadIdentifier; | import com.gemstone.gemfire.internal.cache.ha.*; | [
"com.gemstone.gemfire"
] | com.gemstone.gemfire; | 2,547,396 |
@Override
public void checkForWinningCondition() {
for (Player p : players) {
if ( // Check rows
(cfp(0, 0, p) && cfp(0, 1, p) && cfp(0, 2, p))
|| (cfp(1, 0, p) && cfp(1, 1, p) && cfp(1, 2, p))
|| (cfp(2, 0, p) && cfp(2, 1, p) && cf... | void function() { for (Player p : players) { if ( (cfp(0, 0, p) && cfp(0, 1, p) && cfp(0, 2, p)) (cfp(1, 0, p) && cfp(1, 1, p) && cfp(1, 2, p)) (cfp(2, 0, p) && cfp(2, 1, p) && cfp(2, 2, p)) (cfp(0, 0, p) && cfp(1, 0, p) && cfp(2, 0, p)) (cfp(0, 1, p) && cfp(1, 1, p) && cfp(2, 1, p)) (cfp(0, 2, p) && cfp(1, 2, p) && cf... | /**
* Checks whether one of the player meets the winning conditions: A full
* row, a full column or three diagonal fields.
*/ | Checks whether one of the player meets the winning conditions: A full row, a full column or three diagonal fields | checkForWinningCondition | {
"repo_name": "brad-richards/AIGS",
"path": "TicTacToe/src/org/fhnw/aigs/TicTacToe/server/GameLogic.java",
"license": "gpl-3.0",
"size": 10420
} | [
"org.fhnw.aigs.commons.Player",
"org.fhnw.aigs.commons.communication.GameEndsMessage"
] | import org.fhnw.aigs.commons.Player; import org.fhnw.aigs.commons.communication.GameEndsMessage; | import org.fhnw.aigs.commons.*; import org.fhnw.aigs.commons.communication.*; | [
"org.fhnw.aigs"
] | org.fhnw.aigs; | 642,174 |
public void updateMembers(IEntityGroup eg) throws GroupsException
{
Connection conn = null;
EntityGroupImpl egi = (EntityGroupImpl) eg;
if ( egi.isDirty() )
try
{
conn = RDBMServices.getConnection();
setAutoCommit(conn, false);
... | void function(IEntityGroup eg) throws GroupsException { Connection conn = null; EntityGroupImpl egi = (EntityGroupImpl) eg; if ( egi.isDirty() ) try { conn = RDBMServices.getConnection(); setAutoCommit(conn, false); try { primUpdateMembers(egi, conn); commit(conn); } catch ( SQLException sqle ) { rollback(conn); throw ... | /**
* Insert and delete group membership rows inside a transaction.
* @param eg org.jasig.portal.groups.IEntityGroup
*/ | Insert and delete group membership rows inside a transaction | updateMembers | {
"repo_name": "kole9273/uPortal",
"path": "uportal-war/src/main/java/org/jasig/portal/groups/RDBMEntityGroupStore.java",
"license": "apache-2.0",
"size": 60440
} | [
"java.sql.Connection",
"java.sql.SQLException",
"org.jasig.portal.RDBMServices"
] | import java.sql.Connection; import java.sql.SQLException; import org.jasig.portal.RDBMServices; | import java.sql.*; import org.jasig.portal.*; | [
"java.sql",
"org.jasig.portal"
] | java.sql; org.jasig.portal; | 2,535,640 |
public static String diffLines(List<String> lines1, List<String> lines2) {
final Diff<String> differencer = new Diff<>(lines1, lines2);
final List<Difference> differences = differencer.execute();
StringWriter sw = new StringWriter();
int offset = 0;
for (Difference d : differences) {
final i... | static String function(List<String> lines1, List<String> lines2) { final Diff<String> differencer = new Diff<>(lines1, lines2); final List<Difference> differences = differencer.execute(); StringWriter sw = new StringWriter(); int offset = 0; for (Difference d : differences) { final int as = d.getAddedStart() + 1; final... | /**
* Returns a string containing the difference between the two sets of lines.
*/ | Returns a string containing the difference between the two sets of lines | diffLines | {
"repo_name": "apache/calcite",
"path": "testkit/src/main/java/org/apache/calcite/test/DiffTestCase.java",
"license": "apache-2.0",
"size": 16244
} | [
"java.io.StringWriter",
"java.util.List",
"org.incava.diff.Diff",
"org.incava.diff.Difference"
] | import java.io.StringWriter; import java.util.List; import org.incava.diff.Diff; import org.incava.diff.Difference; | import java.io.*; import java.util.*; import org.incava.diff.*; | [
"java.io",
"java.util",
"org.incava.diff"
] | java.io; java.util; org.incava.diff; | 1,219,874 |
public void mergeNode(HashSet<OctNode> _tempList) {
HashSet<OctNode> _toAdd = new HashSet<OctNode>();
HashSet<OctNode> _toRemove = new HashSet<OctNode>();
for (OctNode temp : _tempList) {
if (nodeList.contains(temp)) {
_toRemove.add(temp);
_toRemove.addAll(temp.getSiblings());
_toAdd.add(temp.ge... | void function(HashSet<OctNode> _tempList) { HashSet<OctNode> _toAdd = new HashSet<OctNode>(); HashSet<OctNode> _toRemove = new HashSet<OctNode>(); for (OctNode temp : _tempList) { if (nodeList.contains(temp)) { _toRemove.add(temp); _toRemove.addAll(temp.getSiblings()); _toAdd.add(temp.getParent(1)); } } nodeList.remove... | /**
* Replaces list of nodes by their parent. Removes the siblings that are
* also in the parent, but not smaller nodes! Can create nested nodes!
*/ | Replaces list of nodes by their parent. Removes the siblings that are also in the parent, but not smaller nodes! Can create nested nodes | mergeNode | {
"repo_name": "thwegene/OCT",
"path": "src/oct/octree/OctOctree.java",
"license": "gpl-2.0",
"size": 34059
} | [
"java.util.HashSet"
] | import java.util.HashSet; | import java.util.*; | [
"java.util"
] | java.util; | 21,142 |
public void stop(BundleContext bc) throws Exception {
context = null;
logger.debug("Z-Wave binding has been stopped.");
}
| void function(BundleContext bc) throws Exception { context = null; logger.debug(STR); } | /**
* Called whenever the OSGi framework stops our bundle
* @param bc the bundle's execution context within the framework
*/ | Called whenever the OSGi framework stops our bundle | stop | {
"repo_name": "revenz/openhab",
"path": "bundles/binding/org.openhab.binding.zwave/src/main/java/org/openhab/binding/zwave/internal/ZWaveActivator.java",
"license": "epl-1.0",
"size": 1689
} | [
"org.osgi.framework.BundleContext"
] | import org.osgi.framework.BundleContext; | import org.osgi.framework.*; | [
"org.osgi.framework"
] | org.osgi.framework; | 2,593,181 |
public static OID getPriv(String privProtocol) {
switch (privProtocol) {
case "DES":
return PrivDES.ID;
case "3DES":
return Priv3DES.ID;
case "AES128":
return PrivAES128.ID;
case "AES192":
return PrivAES192.ID;
case "AES... | static OID function(String privProtocol) { switch (privProtocol) { case "DES": return PrivDES.ID; case "3DES": return Priv3DES.ID; case STR: return PrivAES128.ID; case STR: return PrivAES192.ID; case STR: return PrivAES256.ID; default: return null; } } | /**
* Method to return the private protocol given the property
* @param privProtocol property
* @return protocol
*/ | Method to return the private protocol given the property | getPriv | {
"repo_name": "WilliamNouet/nifi",
"path": "nifi-nar-bundles/nifi-snmp-bundle/nifi-snmp-processors/src/main/java/org/apache/nifi/snmp/processors/SNMPUtils.java",
"license": "apache-2.0",
"size": 10665
} | [
"org.snmp4j.security.Priv3DES",
"org.snmp4j.security.PrivAES128",
"org.snmp4j.security.PrivAES192",
"org.snmp4j.security.PrivAES256",
"org.snmp4j.security.PrivDES"
] | import org.snmp4j.security.Priv3DES; import org.snmp4j.security.PrivAES128; import org.snmp4j.security.PrivAES192; import org.snmp4j.security.PrivAES256; import org.snmp4j.security.PrivDES; | import org.snmp4j.security.*; | [
"org.snmp4j.security"
] | org.snmp4j.security; | 387,922 |
public static void calset(Calendar cal, int field, int value) {
int old = cal.get(field);
int d = value - old;
cal.roll(field, d);
} | static void function(Calendar cal, int field, int value) { int old = cal.get(field); int d = value - old; cal.roll(field, d); } | /**
* A slightly more sane wrapper for Calendar.set()
*
* Beware of Calendar.set! It doesn't properly work, as other fields may interfere,
* e.g. you set the month, but the week-of-year stays wrong, and - madness ensues.
*
* Calendar.set() can be used if clear() is called first
*
* @param cal
* @p... | A slightly more sane wrapper for Calendar.set() Beware of Calendar.set! It doesn't properly work, as other fields may interfere, e.g. you set the month, but the week-of-year stays wrong, and - madness ensues. Calendar.set() can be used if clear() is called first | calset | {
"repo_name": "sodash/open-code",
"path": "winterwell.utils/src/com/winterwell/utils/time/TimeUtils.java",
"license": "mit",
"size": 21909
} | [
"java.util.Calendar"
] | import java.util.Calendar; | import java.util.*; | [
"java.util"
] | java.util; | 1,848,579 |
private static int getDiskId(VolumeId hdfsVolumeId) {
// Initialize the diskId as -1 to indicate it is unknown
int diskId = -1;
if (hdfsVolumeId != null) {
// TODO: this is a hack and we'll have to address this by getting the
// public API. Also, we need to be very mindful of this when we cha... | static int function(VolumeId hdfsVolumeId) { int diskId = -1; if (hdfsVolumeId != null) { String volumeIdString = hdfsVolumeId.toString(); byte[] volumeIdBytes = StringUtils.hexStringToByte(volumeIdString); if (volumeIdBytes != null && volumeIdBytes.length == 4) { diskId = Bytes.toInt(volumeIdBytes); } else if (!hasLog... | /**
* Returns a disk id (0-based) index from the Hdfs VolumeId object.
* There is currently no public API to get at the volume id. We'll have to get it
* by accessing the internals.
*/ | Returns a disk id (0-based) index from the Hdfs VolumeId object. There is currently no public API to get at the volume id. We'll have to get it by accessing the internals | getDiskId | {
"repo_name": "kapilrastogi/Impala",
"path": "fe/src/main/java/com/cloudera/impala/catalog/HdfsTable.java",
"license": "apache-2.0",
"size": 81543
} | [
"org.apache.hadoop.fs.VolumeId",
"org.apache.hadoop.hbase.util.Bytes",
"org.apache.hadoop.util.StringUtils"
] | import org.apache.hadoop.fs.VolumeId; import org.apache.hadoop.hbase.util.Bytes; import org.apache.hadoop.util.StringUtils; | import org.apache.hadoop.fs.*; import org.apache.hadoop.hbase.util.*; import org.apache.hadoop.util.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,732,772 |
public static Response save(Gasto obj)
{
try
{
GastoFacade facade = (GastoFacade) ServiceLocator.getInstance().getBean(Constantes.GASTO_FACADE);
facade.save(obj);
return Response.status(Status.CREATED).build();
}
catch (Exception e)
{
LOGGER.error("Error al guardar un ingreso", e);
retur... | static Response function(Gasto obj) { try { GastoFacade facade = (GastoFacade) ServiceLocator.getInstance().getBean(Constantes.GASTO_FACADE); facade.save(obj); return Response.status(Status.CREATED).build(); } catch (Exception e) { LOGGER.error(STR, e); return Response.status(Status.INTERNAL_SERVER_ERROR).build(); } } | /**
* Guarda un ingreso
* @param obj
* @return
*/ | Guarda un ingreso | save | {
"repo_name": "dmaldonadol/adm-ceppi",
"path": "ws/ceppi-web/src/main/java/cl/ml/ceppi/web/logic/GastosLogic.java",
"license": "mit",
"size": 2318
} | [
"cl.ml.ceppi.core.facade.GastoFacade",
"cl.ml.ceppi.core.model.gasto.Gasto",
"cl.ml.ceppi.web.locator.ServiceLocator",
"cl.ml.ceppi.web.util.Constantes",
"javax.ws.rs.core.Response"
] | import cl.ml.ceppi.core.facade.GastoFacade; import cl.ml.ceppi.core.model.gasto.Gasto; import cl.ml.ceppi.web.locator.ServiceLocator; import cl.ml.ceppi.web.util.Constantes; import javax.ws.rs.core.Response; | import cl.ml.ceppi.core.facade.*; import cl.ml.ceppi.core.model.gasto.*; import cl.ml.ceppi.web.locator.*; import cl.ml.ceppi.web.util.*; import javax.ws.rs.core.*; | [
"cl.ml.ceppi",
"javax.ws"
] | cl.ml.ceppi; javax.ws; | 2,465,797 |
public void generateFIs()
{
Map curr, prev;
Iterator<Row> it;
Row row;
boolean verbose = Global.getVerbosity().get(C.V_FUNCTION);
for (int i = this.maxIndex; i > 1; --i)
{
if (verbose) System.err.println("Start: generating FIs from FCIs of size "+i);
//
c... | void function() { Map curr, prev; Iterator<Row> it; Row row; boolean verbose = Global.getVerbosity().get(C.V_FUNCTION); for (int i = this.maxIndex; i > 1; --i) { if (verbose) System.err.println(STR+i); prev = (Map) this.itemsetV.get(i-1); for (it = curr.values().iterator(); it.hasNext(); ) { row = it.next(); populateFI... | /**
* Generates all frequent itemsets from closed frequent itemsets.
* FCI => FI.
*/ | Generates all frequent itemsets from closed frequent itemsets. FCI => FI | generateFIs | {
"repo_name": "jabbalaci/Talky-G",
"path": "src/main/java/fr/loria/coronsys/coron/datastructure/Result2.java",
"license": "gpl-3.0",
"size": 5770
} | [
"fr.loria.coronsys.coron.helper.Global",
"java.util.Iterator",
"java.util.Map"
] | import fr.loria.coronsys.coron.helper.Global; import java.util.Iterator; import java.util.Map; | import fr.loria.coronsys.coron.helper.*; import java.util.*; | [
"fr.loria.coronsys",
"java.util"
] | fr.loria.coronsys; java.util; | 2,563,601 |
public Map<String, Serializable> getPostFields() throws HelloSignException {
Map<String, Serializable> fields = super.getPostFields();
try {
// Mandatory fields
List<String> templateIds = getTemplateIds();
for (int i = 0; i < templateIds.size(); i++) {
... | Map<String, Serializable> function() throws HelloSignException { Map<String, Serializable> fields = super.getPostFields(); try { List<String> templateIds = getTemplateIds(); for (int i = 0; i < templateIds.size(); i++) { fields.put(TEMPLATE_IDS + "[" + i + "]", templateIds.get(i)); } Map<String, Signer> signerz = getSi... | /**
* Internal method used to retrieve the necessary POST fields to submit the signature request.
*
* @return Map
* @throws HelloSignException thrown if there is a problem parsing the POST fields.
*/ | Internal method used to retrieve the necessary POST fields to submit the signature request | getPostFields | {
"repo_name": "HelloFax/hellosign-java-sdk",
"path": "src/main/java/com/hellosign/sdk/resource/TemplateSignatureRequest.java",
"license": "mit",
"size": 10111
} | [
"com.hellosign.sdk.HelloSignException",
"com.hellosign.sdk.resource.support.Signer",
"java.io.Serializable",
"java.util.List",
"java.util.Map"
] | import com.hellosign.sdk.HelloSignException; import com.hellosign.sdk.resource.support.Signer; import java.io.Serializable; import java.util.List; import java.util.Map; | import com.hellosign.sdk.*; import com.hellosign.sdk.resource.support.*; import java.io.*; import java.util.*; | [
"com.hellosign.sdk",
"java.io",
"java.util"
] | com.hellosign.sdk; java.io; java.util; | 932,012 |
@Deprecated
public static <R extends Readable & Closeable> String toString(
InputSupplier<R> supplier) throws IOException {
return asCharSource(supplier).read();
} | static <R extends Readable & Closeable> String function( InputSupplier<R> supplier) throws IOException { return asCharSource(supplier).read(); } | /**
* Returns the characters from a {@link Readable} & {@link Closeable} object
* supplied by a factory as a {@link String}.
*
* @param supplier the factory to read from
* @return a string containing all the characters
* @throws IOException if an I/O error occurs
* @deprecated Use {@link CharSource... | Returns the characters from a <code>Readable</code> & <code>Closeable</code> object supplied by a factory as a <code>String</code> | toString | {
"repo_name": "maxvetrenko/guava-libraries-17-0",
"path": "guava/src/com/google/common/io/CharStreams.java",
"license": "apache-2.0",
"size": 19794
} | [
"java.io.Closeable",
"java.io.IOException"
] | import java.io.Closeable; import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,097,254 |
public void setComposite(Composite comp) {
this.composite = comp;
if (comp instanceof AlphaComposite) {
AlphaComposite acomp = (AlphaComposite) comp;
int alpha = (int) (acomp.getAlpha() * 0xFF);
this.gc.setAlpha(alpha);
}
} | void function(Composite comp) { this.composite = comp; if (comp instanceof AlphaComposite) { AlphaComposite acomp = (AlphaComposite) comp; int alpha = (int) (acomp.getAlpha() * 0xFF); this.gc.setAlpha(alpha); } } | /**
* Sets the current composite. This implementation currently supports
* only the {@link AlphaComposite} class.
*
* @param comp the composite.
*/ | Sets the current composite. This implementation currently supports only the <code>AlphaComposite</code> class | setComposite | {
"repo_name": "int32at/sweaty",
"path": "src/src/at/int32/sweaty/ui/utils/SWTGraphics2D.java",
"license": "mit",
"size": 43576
} | [
"java.awt.AlphaComposite",
"java.awt.Composite"
] | import java.awt.AlphaComposite; import java.awt.Composite; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,219,559 |
public IndexScanOperation getIndexScanOperation(Index storeIndex, Table storeTable) {
assertActive();
try {
IndexScanOperation result = clusterTransaction.getIndexScanOperation(storeIndex, storeTable);
return result;
} catch (ClusterJException ex) {
throw ... | IndexScanOperation function(Index storeIndex, Table storeTable) { assertActive(); try { IndexScanOperation result = clusterTransaction.getIndexScanOperation(storeIndex, storeTable); return result; } catch (ClusterJException ex) { throw new ClusterJException( local.message(STR, storeTable.getName(), storeIndex.getName()... | /** Create an index scan operation for an index and table.
*
* @param storeIndex the index
* @param storeTable the table
* @return the index scan operation
*/ | Create an index scan operation for an index and table | getIndexScanOperation | {
"repo_name": "gunnarku/mysql-8.0",
"path": "storage/ndb/clusterj/clusterj-core/src/main/java/com/mysql/clusterj/core/SessionImpl.java",
"license": "gpl-2.0",
"size": 60102
} | [
"com.mysql.clusterj.ClusterJException",
"com.mysql.clusterj.core.store.Index",
"com.mysql.clusterj.core.store.IndexScanOperation",
"com.mysql.clusterj.core.store.Table"
] | import com.mysql.clusterj.ClusterJException; import com.mysql.clusterj.core.store.Index; import com.mysql.clusterj.core.store.IndexScanOperation; import com.mysql.clusterj.core.store.Table; | import com.mysql.clusterj.*; import com.mysql.clusterj.core.store.*; | [
"com.mysql.clusterj"
] | com.mysql.clusterj; | 1,230,836 |
public Iterable<ClassificationModel> getClassificationByName(FileModel model, String classificationName)
{
GremlinPipeline<Vertex, Vertex> pipeline = new GremlinPipeline<>(model.asVertex());
pipeline.in(ClassificationModel.FILE_MODEL);
pipeline.has(WindupVertexFrame.TYPE_PROP, Text.CONTA... | Iterable<ClassificationModel> function(FileModel model, String classificationName) { GremlinPipeline<Vertex, Vertex> pipeline = new GremlinPipeline<>(model.asVertex()); pipeline.in(ClassificationModel.FILE_MODEL); pipeline.has(WindupVertexFrame.TYPE_PROP, Text.CONTAINS, ClassificationModel.TYPE); pipeline.has(Classific... | /**
* Return all {@link ClassificationModel} instances that are attached to the given {@link FileModel} instance with a specific classification name.
*/ | Return all <code>ClassificationModel</code> instances that are attached to the given <code>FileModel</code> instance with a specific classification name | getClassificationByName | {
"repo_name": "OndraZizka/windup",
"path": "reporting/api/src/main/java/org/jboss/windup/reporting/service/ClassificationService.java",
"license": "epl-1.0",
"size": 14514
} | [
"com.thinkaurelius.titan.core.attribute.Text",
"com.tinkerpop.blueprints.Vertex",
"com.tinkerpop.frames.structures.FramedVertexIterable",
"com.tinkerpop.gremlin.java.GremlinPipeline",
"org.jboss.windup.graph.model.WindupVertexFrame",
"org.jboss.windup.graph.model.resource.FileModel",
"org.jboss.windup.r... | import com.thinkaurelius.titan.core.attribute.Text; import com.tinkerpop.blueprints.Vertex; import com.tinkerpop.frames.structures.FramedVertexIterable; import com.tinkerpop.gremlin.java.GremlinPipeline; import org.jboss.windup.graph.model.WindupVertexFrame; import org.jboss.windup.graph.model.resource.FileModel; impor... | import com.thinkaurelius.titan.core.attribute.*; import com.tinkerpop.blueprints.*; import com.tinkerpop.frames.structures.*; import com.tinkerpop.gremlin.java.*; import org.jboss.windup.graph.model.*; import org.jboss.windup.graph.model.resource.*; import org.jboss.windup.reporting.model.*; | [
"com.thinkaurelius.titan",
"com.tinkerpop.blueprints",
"com.tinkerpop.frames",
"com.tinkerpop.gremlin",
"org.jboss.windup"
] | com.thinkaurelius.titan; com.tinkerpop.blueprints; com.tinkerpop.frames; com.tinkerpop.gremlin; org.jboss.windup; | 2,129,229 |
public DataNode setValueScalar(Double value); | DataNode function(Double value); | /**
* nominal setpoint or average value
* - need [n] as may be a vector
* <p>
* <b>Type:</b> NX_FLOAT
* <b>Units:</b> NX_ANY
* <b>Dimensions:</b> 1: n;
* </p>
*
* @param value the value
*/ | nominal setpoint or average value - need [n] as may be a vector Type: NX_FLOAT Units: NX_ANY Dimensions: 1: n; | setValueScalar | {
"repo_name": "xen-0/dawnsci",
"path": "org.eclipse.dawnsci.nexus/autogen/org/eclipse/dawnsci/nexus/NXsensor.java",
"license": "epl-1.0",
"size": 17164
} | [
"org.eclipse.dawnsci.analysis.api.tree.DataNode"
] | import org.eclipse.dawnsci.analysis.api.tree.DataNode; | import org.eclipse.dawnsci.analysis.api.tree.*; | [
"org.eclipse.dawnsci"
] | org.eclipse.dawnsci; | 804,475 |
public static Object getOutputPath(final Class<?> clazz, final Context ctx, final Scriptable thisObj,
final Object[] args) {
validateClass(clazz, ctx, thisObj);
final Object arg0 = args.length >= 1 ? args[0] : Undefined.instance;
if (args.length < 1) ... | static Object function(final Class<?> clazz, final Context ctx, final Scriptable thisObj, final Object[] args) { validateClass(clazz, ctx, thisObj); final Object arg0 = args.length >= 1 ? args[0] : Undefined.instance; if (args.length < 1) { throw Utils.makeError(ctx, thisObj, LembosMessages.ONE_ARG_EXPECTED); } else if... | /**
* Java wrapper for {@link FileOutputFormat#getOutputPath(JobContext)}.
*
* @param clazz the class to invoke the method of
* @param ctx the JavaScript context
* @param thisObj the 'this' object
* @param args the function arguments
*
* @return the output path
*/ | Java wrapper for <code>FileOutputFormat#getOutputPath(JobContext)</code> | getOutputPath | {
"repo_name": "apigee/lembos",
"path": "src/main/java/io/apigee/lembos/node/types/FileOutputFormatHelper.java",
"license": "apache-2.0",
"size": 17655
} | [
"io.apigee.lembos.mapreduce.LembosMessages",
"io.apigee.lembos.utils.JavaScriptUtils",
"io.apigee.lembos.utils.ReflectionUtils",
"io.apigee.trireme.core.Utils",
"org.apache.hadoop.mapreduce.JobContext",
"org.mozilla.javascript.Context",
"org.mozilla.javascript.Scriptable",
"org.mozilla.javascript.Unde... | import io.apigee.lembos.mapreduce.LembosMessages; import io.apigee.lembos.utils.JavaScriptUtils; import io.apigee.lembos.utils.ReflectionUtils; import io.apigee.trireme.core.Utils; import org.apache.hadoop.mapreduce.JobContext; import org.mozilla.javascript.Context; import org.mozilla.javascript.Scriptable; import org.... | import io.apigee.lembos.mapreduce.*; import io.apigee.lembos.utils.*; import io.apigee.trireme.core.*; import org.apache.hadoop.mapreduce.*; import org.mozilla.javascript.*; | [
"io.apigee.lembos",
"io.apigee.trireme",
"org.apache.hadoop",
"org.mozilla.javascript"
] | io.apigee.lembos; io.apigee.trireme; org.apache.hadoop; org.mozilla.javascript; | 1,344,552 |
public static ims.emergency.vo.TIIGVo insert(DomainObjectMap map, ims.emergency.vo.TIIGVo valueObject, ims.core.admin.domain.objects.TIIG domainObject)
{
if (null == domainObject)
{
return valueObject;
}
if (null == map)
{
map = new DomainObjectMap();
}
valueObject.setID_TIIG(domainObj... | static ims.emergency.vo.TIIGVo function(DomainObjectMap map, ims.emergency.vo.TIIGVo valueObject, ims.core.admin.domain.objects.TIIG domainObject) { if (null == domainObject) { return valueObject; } if (null == map) { map = new DomainObjectMap(); } valueObject.setID_TIIG(domainObject.getId()); valueObject.setIsRIE(doma... | /**
* Update the ValueObject with the Domain Object.
* @param map DomainObjectMap of DomainObjects to already created ValueObjects.
* @param valueObject to be updated
* @param domainObject ims.core.admin.domain.objects.TIIG
*/ | Update the ValueObject with the Domain Object | insert | {
"repo_name": "open-health-hub/openMAXIMS",
"path": "openmaxims_workspace/ValueObjects/src/ims/emergency/vo/domain/TIIGVoAssembler.java",
"license": "agpl-3.0",
"size": 40637
} | [
"org.hibernate.proxy.HibernateProxy"
] | import org.hibernate.proxy.HibernateProxy; | import org.hibernate.proxy.*; | [
"org.hibernate.proxy"
] | org.hibernate.proxy; | 1,795,833 |
private Response remoteCall(final String path, final String configName)
throws ConfigurationException, InterruptedException
{
int i = 0;
while (true) {
try {
return remote.getRemoteConfiguration(path, configName);
} catch (final HttpConfigurationEx... | Response function(final String path, final String configName) throws ConfigurationException, InterruptedException { int i = 0; while (true) { try { return remote.getRemoteConfiguration(path, configName); } catch (final HttpConfigurationException nfe) { throw nfe; } catch (final ConfigurationException e) { LOG.debug(STR... | /**
* Perform exponential backoff/retry of acquiring a data file from an HTTP source.
*
* @param configName the configuration file name
* @return the HTTP response
* @throws ConfigurationException if the data cannot be acquired
* @throws InterruptedException usually if the application is s... | Perform exponential backoff/retry of acquiring a data file from an HTTP source | remoteCall | {
"repo_name": "CAFapi/caf-common",
"path": "config-rest/src/main/java/com/hpe/caf/config/rest/RestConfigurationSource.java",
"license": "apache-2.0",
"size": 7761
} | [
"com.hpe.caf.api.ConfigurationException"
] | import com.hpe.caf.api.ConfigurationException; | import com.hpe.caf.api.*; | [
"com.hpe.caf"
] | com.hpe.caf; | 2,010,350 |
boolean removeJob(String jobId) throws NotConnectedException, UnknownJobException, PermissionException; | boolean removeJob(String jobId) throws NotConnectedException, UnknownJobException, PermissionException; | /**
* Remove the job from the scheduler.
* <p>
* The jobId is given as a string. It's in fact the string returned by the
* {@link JobId#value()} method.<br>
* A user can only remove HIS job.<br>
* If the job does not exist, a schedulerException is sent with the proper
* message.
... | Remove the job from the scheduler. The jobId is given as a string. It's in fact the string returned by the <code>JobId#value()</code> method. A user can only remove HIS job. If the job does not exist, a schedulerException is sent with the proper message | removeJob | {
"repo_name": "marcocast/scheduling",
"path": "scheduler/scheduler-api/src/main/java/org/ow2/proactive/scheduler/common/Scheduler.java",
"license": "agpl-3.0",
"size": 61764
} | [
"org.ow2.proactive.scheduler.common.exception.NotConnectedException",
"org.ow2.proactive.scheduler.common.exception.PermissionException",
"org.ow2.proactive.scheduler.common.exception.UnknownJobException"
] | import org.ow2.proactive.scheduler.common.exception.NotConnectedException; import org.ow2.proactive.scheduler.common.exception.PermissionException; import org.ow2.proactive.scheduler.common.exception.UnknownJobException; | import org.ow2.proactive.scheduler.common.exception.*; | [
"org.ow2.proactive"
] | org.ow2.proactive; | 747,952 |
public String getAttributeKey() {
final String idModification = this.getParam("id");
String attributeKey = null;
Iterator < ITabController > controller = this.tabControllers.iterator();
while (controller.hasNext()) {
ITabController iGroupController = controller.nex... | String function() { final String idModification = this.getParam("id"); String attributeKey = null; Iterator < ITabController > controller = this.tabControllers.iterator(); while (controller.hasNext()) { ITabController iGroupController = controller.next(); attributeKey = iGroupController.getAttributeKey(idModification);... | /**
* Getter for the attribute key that is modified.
*
* @return the result.
*/ | Getter for the attribute key that is modified | getAttributeKey | {
"repo_name": "GIP-RECIA/esco-grouper-ui",
"path": "metier/esco-web/src/main/java/org/esco/grouperui/web/controllers/AbstractGroupController.java",
"license": "apache-2.0",
"size": 25245
} | [
"java.util.Iterator",
"org.esco.grouperui.web.beans.XMLResultString",
"org.esco.grouperui.web.plugins.ITabController",
"org.esco.grouperui.web.utils.XmlProducer"
] | import java.util.Iterator; import org.esco.grouperui.web.beans.XMLResultString; import org.esco.grouperui.web.plugins.ITabController; import org.esco.grouperui.web.utils.XmlProducer; | import java.util.*; import org.esco.grouperui.web.beans.*; import org.esco.grouperui.web.plugins.*; import org.esco.grouperui.web.utils.*; | [
"java.util",
"org.esco.grouperui"
] | java.util; org.esco.grouperui; | 1,629,519 |
public int getPlayerCount() throws JSONException, WebApiException {
Map<String, Object> params = new HashMap<String, Object>();
params.put("appid", this.appId);
String jsonString = WebApi.getJSON("ISteamUserStats", "GetNumberOfCurrentPlayers", 1, params);
JSONObject result = new JSON... | int function() throws JSONException, WebApiException { Map<String, Object> params = new HashMap<String, Object>(); params.put("appid", this.appId); String jsonString = WebApi.getJSON(STR, STR, 1, params); JSONObject result = new JSONObject(jsonString).getJSONObject(STR); return result.getInt(STR); } | /**
* Returns the overall number of players currently playing this game
*
* @return The number of players playing this game
* @throws JSONException In case of misformatted JSON data
* @throws WebApiException on Web API errors
*/ | Returns the overall number of players currently playing this game | getPlayerCount | {
"repo_name": "tomtomssi/Steam-API",
"path": "src/main/java/com/github/koraktor/steamcondenser/community/SteamGame.java",
"license": "bsd-3-clause",
"size": 11321
} | [
"com.github.koraktor.steamcondenser.exceptions.WebApiException",
"java.util.HashMap",
"java.util.Map",
"org.json.JSONException",
"org.json.JSONObject"
] | import com.github.koraktor.steamcondenser.exceptions.WebApiException; import java.util.HashMap; import java.util.Map; import org.json.JSONException; import org.json.JSONObject; | import com.github.koraktor.steamcondenser.exceptions.*; import java.util.*; import org.json.*; | [
"com.github.koraktor",
"java.util",
"org.json"
] | com.github.koraktor; java.util; org.json; | 702,589 |
public void testGetShares() {
RemoteOperationResult result = mActivity.getShares();
assertTrue(result.isSuccess());
assertTrue(result.getData() != null && result.getData().size() == 1);
}
| void function() { RemoteOperationResult result = mActivity.getShares(); assertTrue(result.isSuccess()); assertTrue(result.getData() != null && result.getData().size() == 1); } | /**
* Test Get Shares: the server must support SHARE API
*/ | Test Get Shares: the server must support SHARE API | testGetShares | {
"repo_name": "duke8804/Iluq-Cloud",
"path": "owncloud-android-library/test_client/tests/src/com/owncloud/android/lib/test_project/test/GetSharesTest.java",
"license": "gpl-2.0",
"size": 3226
} | [
"com.iluq_cloud.android.lib.common.operations.RemoteOperationResult"
] | import com.iluq_cloud.android.lib.common.operations.RemoteOperationResult; | import com.iluq_cloud.android.lib.common.operations.*; | [
"com.iluq_cloud.android"
] | com.iluq_cloud.android; | 589,803 |
@Test(expected=IllegalStateException.class)
public void testRestoreLatestCheckpointFailureWhenMaxParallelismChanges() throws Exception {
final JobID jid = new JobID();
final long timestamp = System.currentTimeMillis();
final JobVertexID jobVertexID1 = new JobVertexID();
final JobVertexID jobVertexID2 = new... | @Test(expected=IllegalStateException.class) void function() throws Exception { final JobID jid = new JobID(); final long timestamp = System.currentTimeMillis(); final JobVertexID jobVertexID1 = new JobVertexID(); final JobVertexID jobVertexID2 = new JobVertexID(); int parallelism1 = 3; int parallelism2 = 2; int maxPara... | /**
* Tests that the checkpoint restoration fails if the max parallelism of the job vertices has
* changed.
*
* @throws Exception
*/ | Tests that the checkpoint restoration fails if the max parallelism of the job vertices has changed | testRestoreLatestCheckpointFailureWhenMaxParallelismChanges | {
"repo_name": "WangTaoTheTonic/flink",
"path": "flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/CheckpointCoordinatorTest.java",
"license": "apache-2.0",
"size": 145372
} | [
"com.google.common.collect.Iterables",
"java.util.ArrayList",
"java.util.Arrays",
"java.util.HashMap",
"java.util.List",
"java.util.Map",
"org.apache.flink.api.common.JobID",
"org.apache.flink.runtime.concurrent.Executors",
"org.apache.flink.runtime.executiongraph.ExecutionJobVertex",
"org.apache.... | import com.google.common.collect.Iterables; import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.flink.api.common.JobID; import org.apache.flink.runtime.concurrent.Executors; import org.apache.flink.runtime.executiongraph.Execution... | import com.google.common.collect.*; import java.util.*; import org.apache.flink.api.common.*; import org.apache.flink.runtime.concurrent.*; import org.apache.flink.runtime.executiongraph.*; import org.apache.flink.runtime.jobgraph.*; import org.apache.flink.runtime.jobgraph.tasks.*; import org.apache.flink.runtime.mess... | [
"com.google.common",
"java.util",
"org.apache.flink",
"org.junit"
] | com.google.common; java.util; org.apache.flink; org.junit; | 681,603 |
protected final void immutableSetName(@NotNull final String name)
{
m__strName = name;
} | final void function(@NotNull final String name) { m__strName = name; } | /**
* Specifies the alias name.
* @param name the name.
*/ | Specifies the alias name | immutableSetName | {
"repo_name": "rydnr/queryj-sql",
"path": "src/main/java/org/acmsl/queryj/sql/TableAlias.java",
"license": "gpl-3.0",
"size": 3124
} | [
"org.jetbrains.annotations.NotNull"
] | import org.jetbrains.annotations.NotNull; | import org.jetbrains.annotations.*; | [
"org.jetbrains.annotations"
] | org.jetbrains.annotations; | 140,643 |
public static <T> FutureTask<T> runOnUiThread(FutureTask<T> task) {
if (runningOnUiThread()) {
task.run();
} else {
postOnUiThread(task);
}
return task;
} | static <T> FutureTask<T> function(FutureTask<T> task) { if (runningOnUiThread()) { task.run(); } else { postOnUiThread(task); } return task; } | /**
* Run the supplied FutureTask on the main thread. The method will block only if the current
* thread is the main thread.
*
* @param task The FutureTask to run
* @return The queried task (to aid inline construction)
*/ | Run the supplied FutureTask on the main thread. The method will block only if the current thread is the main thread | runOnUiThread | {
"repo_name": "mogoweb/chromium_webview",
"path": "java/src/org/chromium/base/ThreadUtils.java",
"license": "bsd-3-clause",
"size": 6559
} | [
"java.util.concurrent.FutureTask"
] | import java.util.concurrent.FutureTask; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 366,250 |
private String getReportDesignName( InputOptions options )
{
String reportDesignName = null;
if ( options != null )
{
HttpServletRequest request = (HttpServletRequest) options.getOption( InputOptions.OPT_REQUEST );
if ( request != null )
{
ViewerAttributeBean attrBean = (ViewerAttributeBean) req... | String function( InputOptions options ) { String reportDesignName = null; if ( options != null ) { HttpServletRequest request = (HttpServletRequest) options.getOption( InputOptions.OPT_REQUEST ); if ( request != null ) { ViewerAttributeBean attrBean = (ViewerAttributeBean) request.getAttribute( IBirtConstants.ATTRIBUTE... | /**
* Gets the report design name from the input options.
*
* @param options
* the input options
* @return the report design name if the request contains a valid name,
* otherwise null
*/ | Gets the report design name from the input options | getReportDesignName | {
"repo_name": "sguan-actuate/birt",
"path": "viewer/org.eclipse.birt.report.viewer/birt/WEB-INF/classes/org/eclipse/birt/report/service/BirtViewerReportService.java",
"license": "epl-1.0",
"size": 41374
} | [
"javax.servlet.http.HttpServletRequest",
"org.eclipse.birt.report.IBirtConstants",
"org.eclipse.birt.report.context.ViewerAttributeBean",
"org.eclipse.birt.report.service.api.InputOptions"
] | import javax.servlet.http.HttpServletRequest; import org.eclipse.birt.report.IBirtConstants; import org.eclipse.birt.report.context.ViewerAttributeBean; import org.eclipse.birt.report.service.api.InputOptions; | import javax.servlet.http.*; import org.eclipse.birt.report.*; import org.eclipse.birt.report.context.*; import org.eclipse.birt.report.service.api.*; | [
"javax.servlet",
"org.eclipse.birt"
] | javax.servlet; org.eclipse.birt; | 2,303,114 |
@Test
public void testOf() {
BSNR nr = BSNR.of("000002091");
assertEquals("000002091", nr.toString());
} | void function() { BSNR nr = BSNR.of(STR); assertEquals(STR, nr.toString()); } | /**
* Betriebsnummern koennen fuehrende Nullen enthalten.
*/ | Betriebsnummern koennen fuehrende Nullen enthalten | testOf | {
"repo_name": "oboehm/jfachwert",
"path": "src/test/java/de/jfachwert/med/BSNRTest.java",
"license": "apache-2.0",
"size": 2159
} | [
"org.testng.AssertJUnit"
] | import org.testng.AssertJUnit; | import org.testng.*; | [
"org.testng"
] | org.testng; | 2,259,694 |
//#ifdef JAVA4
public synchronized double getDouble(
String parameterName) throws SQLException {
return getDouble(findParameterIndex(parameterName));
}
//#endif JAVA4 | synchronized double function( String parameterName) throws SQLException { return getDouble(findParameterIndex(parameterName)); } | /**
* <!-- start generic documentation -->
*
* Retrieves the value of a JDBC <code>DOUBLE</code> parameter as a <code>double</code>
* in the Java programming language.
*
* <!-- end generic documentation -->
*
* <!-- start release-specific documentation -->
* <div class="Rele... | Retrieves the value of a JDBC <code>DOUBLE</code> parameter as a <code>double</code> in the Java programming language. HSQLDB-Specific Information: HSQLDB supports this feature. | getDouble | {
"repo_name": "ifcharming/voltdb2.0",
"path": "src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/JDBCCallableStatement.java",
"license": "gpl-3.0",
"size": 185755
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,458,769 |
public WebTestClient.ResponseSpec secure(String name, boolean expected) {
boolean isSecure = getCookie(name).isSecure();
this.exchangeResult.assertWithDiagnostics(() -> {
String message = getMessage(name) + " secure";
AssertionErrors.assertEquals(message, expected, isSecure);
});
return this.responseSp... | WebTestClient.ResponseSpec function(String name, boolean expected) { boolean isSecure = getCookie(name).isSecure(); this.exchangeResult.assertWithDiagnostics(() -> { String message = getMessage(name) + STR; AssertionErrors.assertEquals(message, expected, isSecure); }); return this.responseSpec; } | /**
* Assert a cookie's secure attribute.
*/ | Assert a cookie's secure attribute | secure | {
"repo_name": "spring-projects/spring-framework",
"path": "spring-test/src/main/java/org/springframework/test/web/reactive/server/CookieAssertions.java",
"license": "apache-2.0",
"size": 6957
} | [
"org.springframework.test.util.AssertionErrors"
] | import org.springframework.test.util.AssertionErrors; | import org.springframework.test.util.*; | [
"org.springframework.test"
] | org.springframework.test; | 435,319 |
@NotNull String getContentId(); | @NotNull String getContentId(); | /**
* Content ID of the attachment. Uniquely identifies an attachment.
*
* @return
* The content ID like "foo-bar-zot@abc.com", without
* surrounding '<' and '>' used as the transfer syntax.
*/ | Content ID of the attachment. Uniquely identifies an attachment | getContentId | {
"repo_name": "axDev-JDK/jaxws",
"path": "src/share/jaxws_classes/com/sun/xml/internal/ws/api/message/Attachment.java",
"license": "gpl-2.0",
"size": 2719
} | [
"com.sun.istack.internal.NotNull"
] | import com.sun.istack.internal.NotNull; | import com.sun.istack.internal.*; | [
"com.sun.istack"
] | com.sun.istack; | 1,210,886 |
public MappedFieldType unmappedFieldType(String type) {
final ImmutableMap<String, MappedFieldType> unmappedFieldMappers = this.unmappedFieldTypes;
MappedFieldType fieldType = unmappedFieldMappers.get(type);
if (fieldType == null) {
final Mapper.TypeParser.ParserContext parserCon... | MappedFieldType function(String type) { final ImmutableMap<String, MappedFieldType> unmappedFieldMappers = this.unmappedFieldTypes; MappedFieldType fieldType = unmappedFieldMappers.get(type); if (fieldType == null) { final Mapper.TypeParser.ParserContext parserContext = documentMapperParser().parserContext(); Mapper.Ty... | /**
* Given a type (eg. long, string, ...), return an anonymous field mapper that can be used for search operations.
*/ | Given a type (eg. long, string, ...), return an anonymous field mapper that can be used for search operations | unmappedFieldType | {
"repo_name": "hechunwen/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/index/mapper/MapperService.java",
"license": "apache-2.0",
"size": 28448
} | [
"com.google.common.collect.ImmutableMap",
"org.elasticsearch.index.mapper.Mapper"
] | import com.google.common.collect.ImmutableMap; import org.elasticsearch.index.mapper.Mapper; | import com.google.common.collect.*; import org.elasticsearch.index.mapper.*; | [
"com.google.common",
"org.elasticsearch.index"
] | com.google.common; org.elasticsearch.index; | 844,254 |
private static String tryDecodeUri(String uri) {
try {
// try to decode as the uri may contain %20 for spaces etc
uri = URLDecoder.decode(uri, "UTF-8");
} catch (Exception e) {
LOG.trace("Error URL decoding uri using UTF-8 encoding: {}. This exception is ignored."... | static String function(String uri) { try { uri = URLDecoder.decode(uri, "UTF-8"); } catch (Exception e) { LOG.trace(STR, uri); } return uri; } | /**
* Tries decoding the uri.
*
* @param uri the uri
* @return the decoded uri, or the original uri
*/ | Tries decoding the uri | tryDecodeUri | {
"repo_name": "mattrpav/blueprint-test",
"path": "blueprint-test/src/main/java/com/mediadriver/osgi/blueprint/test/BlueprintHelper.java",
"license": "apache-2.0",
"size": 30706
} | [
"java.net.URLDecoder"
] | import java.net.URLDecoder; | import java.net.*; | [
"java.net"
] | java.net; | 1,663,939 |
public int getVarIndex(SnmpVarBind varbind); | int function(SnmpVarBind varbind); | /**
* Returns the varbind index that should be embedded in an
* SnmpStatusException for this particular varbind.
* This does not necessarily correspond to the "real"
* index value that will be returned in the result PDU.
*
* @param varbind The varbind for which the index value is
* ... | Returns the varbind index that should be embedded in an SnmpStatusException for this particular varbind. This does not necessarily correspond to the "real" index value that will be returned in the result PDU | getVarIndex | {
"repo_name": "TheTypoMaster/Scaper",
"path": "openjdk/jdk/src/share/classes/com/sun/jmx/snmp/agent/SnmpMibRequest.java",
"license": "gpl-2.0",
"size": 6885
} | [
"com.sun.jmx.snmp.SnmpVarBind"
] | import com.sun.jmx.snmp.SnmpVarBind; | import com.sun.jmx.snmp.*; | [
"com.sun.jmx"
] | com.sun.jmx; | 1,081,847 |
Pattern[] getPatternsWithColors(Hex... hexes) throws IOException; | Pattern[] getPatternsWithColors(Hex... hexes) throws IOException; | /**
* A wrapper for {@link #getPatternsWithColors(int, Hex...)} (int)} which gets the first page.
*
* @param hexes
* @return
* @throws IOException when underlying {@link #executeRequest(ColourLoverRequest)} encounters an exception
* @see #executeRequest
* @see #getPatternsWithColors(i... | A wrapper for <code>#getPatternsWithColors(int, Hex...)</code> (int)} which gets the first page | getPatternsWithColors | {
"repo_name": "DFStoneburner/ColourLovers4J",
"path": "src/main/java/stone/colour/services/PatternService.java",
"license": "apache-2.0",
"size": 7664
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,409,550 |
public Date engineGetCreationDate(String alias) {
if (alias == null) {
return null;
}
return new Date();
} | Date function(String alias) { if (alias == null) { return null; } return new Date(); } | /**
* Returns the creation date of the entry identified by the given alias.
*
* @param alias the alias name
*
* @return the creation date of this entry, or null if the given alias does
* not exist
*/ | Returns the creation date of the entry identified by the given alias | engineGetCreationDate | {
"repo_name": "TheTypoMaster/Scaper",
"path": "openjdk/jdk/src/windows/classes/sun/security/mscapi/KeyStore.java",
"license": "gpl-2.0",
"size": 30243
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 1,333,346 |
private boolean isSkippableKey(@NonNull String key) {
return Arrays.asList(KEYS_TO_SKIP).contains(key);
} | boolean function(@NonNull String key) { return Arrays.asList(KEYS_TO_SKIP).contains(key); } | /**
* Determines if we need to skip a key due to Firebase restrictions.
*
* @param key The key to check if its skippable.
* @return <code>true</code> if a key is skippable, <code>false</code> otherwise.
*/ | Determines if we need to skip a key due to Firebase restrictions | isSkippableKey | {
"repo_name": "edx/edx-app-android",
"path": "OpenEdXMobile/src/main/java/org/edx/mobile/module/analytics/FirebaseEvent.java",
"license": "apache-2.0",
"size": 9258
} | [
"androidx.annotation.NonNull",
"java.util.Arrays"
] | import androidx.annotation.NonNull; import java.util.Arrays; | import androidx.annotation.*; import java.util.*; | [
"androidx.annotation",
"java.util"
] | androidx.annotation; java.util; | 969,792 |
public void updateChartData(List<YearSummary> inData, boolean savePosition) {
SlidingCategoryDataset eventsDataset = (SlidingCategoryDataset) createEventsDataset(inData);
SlidingCategoryDataset recordersDataset = (SlidingCategoryDataset) createRecordersDataset(inData);
SlidingCategoryDataset samplesData... | void function(List<YearSummary> inData, boolean savePosition) { SlidingCategoryDataset eventsDataset = (SlidingCategoryDataset) createEventsDataset(inData); SlidingCategoryDataset recordersDataset = (SlidingCategoryDataset) createRecordersDataset(inData); SlidingCategoryDataset samplesDataset = (SlidingCategoryDataset)... | /**
* This method updates the data in the graph which forces the graph to redraw.
*
* @param inData This is the list of the incoming YearSummary objects. It is the data used to update the graphs.
* @param savePosition When savePosition is set to true then this method will automatically scroll to the sectio... | This method updates the data in the graph which forces the graph to redraw | updateChartData | {
"repo_name": "petebrew/fhaes",
"path": "fhaes/src/main/java/org/fhaes/fhrecorder/view/GraphSummaryOverlay.java",
"license": "gpl-3.0",
"size": 11359
} | [
"java.util.List",
"org.fhaes.fhrecorder.util.YearSummary",
"org.jfree.data.category.SlidingCategoryDataset"
] | import java.util.List; import org.fhaes.fhrecorder.util.YearSummary; import org.jfree.data.category.SlidingCategoryDataset; | import java.util.*; import org.fhaes.fhrecorder.util.*; import org.jfree.data.category.*; | [
"java.util",
"org.fhaes.fhrecorder",
"org.jfree.data"
] | java.util; org.fhaes.fhrecorder; org.jfree.data; | 2,218,683 |
Slot getBase_Slot(); | Slot getBase_Slot(); | /**
* Returns the value of the '<em><b>Base Slot</b></em>' reference.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Base Slot</em>' reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Base Slot</em>' ... | Returns the value of the 'Base Slot' reference. If the meaning of the 'Base Slot' reference isn't clear, there really should be more of a description here... | getBase_Slot | {
"repo_name": "RobotML/RobotML-SDK-Juno",
"path": "plugins/robotml/com.cea.profiles.fcm/src/FCM/InterceptorConfiguration.java",
"license": "epl-1.0",
"size": 2802
} | [
"org.eclipse.uml2.uml.Slot"
] | import org.eclipse.uml2.uml.Slot; | import org.eclipse.uml2.uml.*; | [
"org.eclipse.uml2"
] | org.eclipse.uml2; | 128,386 |
public static void main(String[] args)
{
CLIRefuseServer server = null;
try
{
server = new CLIRefuseServer();
logger.info(CONST_MSG_MTA_OPEN);
server.open();
}
catch (MTAException e)
{
logger.debug(CONST_ERR_MTA_ERR... | static void function(String[] args) { CLIRefuseServer server = null; try { server = new CLIRefuseServer(); logger.info(CONST_MSG_MTA_OPEN); server.open(); } catch (MTAException e) { logger.debug(CONST_ERR_MTA_ERR, e); } } CLIRefuseServer() throws MTAException { super(System.in, System.out); mta = new RefuseMTA(STR); } | /**
* Run a CLI SinkMTA
*/ | Run a CLI SinkMTA | main | {
"repo_name": "technosf/SMuTPea",
"path": "smutpea-servers/src/main/java/com/github/technosf/smutpea/server/example/CLIRefuseServer.java",
"license": "apache-2.0",
"size": 3104
} | [
"com.github.technosf.smutpea.core.exceptions.MTAException",
"com.github.technosf.smutpea.mta.impl.RefuseMTA"
] | import com.github.technosf.smutpea.core.exceptions.MTAException; import com.github.technosf.smutpea.mta.impl.RefuseMTA; | import com.github.technosf.smutpea.core.exceptions.*; import com.github.technosf.smutpea.mta.impl.*; | [
"com.github.technosf"
] | com.github.technosf; | 88,067 |
default void attach(Solution solution){
ref().plugMonitor((IMonitorSolution) solution::record);
} | default void attach(Solution solution){ ref().plugMonitor((IMonitorSolution) solution::record); } | /**
* Attach a solution recorder to this solver
* @param solution solution object to be filled on solutions.
*/ | Attach a solution recorder to this solver | attach | {
"repo_name": "chocoteam/choco3",
"path": "src/main/java/org/chocosolver/solver/search/loop/monitors/ISearchMonitorFactory.java",
"license": "bsd-3-clause",
"size": 5104
} | [
"org.chocosolver.solver.Solution"
] | import org.chocosolver.solver.Solution; | import org.chocosolver.solver.*; | [
"org.chocosolver.solver"
] | org.chocosolver.solver; | 1,501,579 |
@After
public void tearDown() throws BadCredentialsException, MailboxException {
deleteAllMailboxes();
MailboxSession session = getMailboxManager().createSystemSession("test", LoggerFactory.getLogger("Test"));
session.close();
entityManagerFactory.close();
}
| void function() throws BadCredentialsException, MailboxException { deleteAllMailboxes(); MailboxSession session = getMailboxManager().createSystemSession("test", LoggerFactory.getLogger("Test")); session.close(); entityManagerFactory.close(); } | /**
* Close the system session and entityManagerFactory
*
* @throws MailboxException
* @throws BadCredentialsException
*/ | Close the system session and entityManagerFactory | tearDown | {
"repo_name": "mbaechler/james-mailbox",
"path": "jpa/src/test/java/org/apache/james/mailbox/jpa/JPAMailboxManagerTest.java",
"license": "apache-2.0",
"size": 5888
} | [
"org.apache.james.mailbox.MailboxSession",
"org.apache.james.mailbox.exception.BadCredentialsException",
"org.apache.james.mailbox.exception.MailboxException",
"org.slf4j.LoggerFactory"
] | import org.apache.james.mailbox.MailboxSession; import org.apache.james.mailbox.exception.BadCredentialsException; import org.apache.james.mailbox.exception.MailboxException; import org.slf4j.LoggerFactory; | import org.apache.james.mailbox.*; import org.apache.james.mailbox.exception.*; import org.slf4j.*; | [
"org.apache.james",
"org.slf4j"
] | org.apache.james; org.slf4j; | 1,194,858 |
void removeExpiration(String workspaceId) throws ServerException; | void removeExpiration(String workspaceId) throws ServerException; | /**
* Removes workspace expiration time (basically used on ws stop).
*
* @param workspaceId workspace id to remove expiration
* @throws ServerException when operation failed
*/ | Removes workspace expiration time (basically used on ws stop) | removeExpiration | {
"repo_name": "codenvy/che",
"path": "wsmaster/che-core-api-workspace-activity/src/main/java/org/eclipse/che/api/workspace/activity/WorkspaceActivityDao.java",
"license": "epl-1.0",
"size": 4936
} | [
"org.eclipse.che.api.core.ServerException"
] | import org.eclipse.che.api.core.ServerException; | import org.eclipse.che.api.core.*; | [
"org.eclipse.che"
] | org.eclipse.che; | 2,770,173 |
public void encode(byte tag, OutputStream out) throws IOException {
out.write(tag);
out.write(derEncoding, 1, derEncoding.length -1);
} | void function(byte tag, OutputStream out) throws IOException { out.write(tag); out.write(derEncoding, 1, derEncoding.length -1); } | /**
* Put the DER encoding of this PKCS9 attribute set on an
* DerOutputStream, tagged with the given implicit tag.
*
* @param tag the implicit tag to use in the DER encoding.
* @param out the output stream on which to put the DER encoding.
*
* @exception IOException on output error.... | Put the DER encoding of this PKCS9 attribute set on an DerOutputStream, tagged with the given implicit tag | encode | {
"repo_name": "rokn/Count_Words_2015",
"path": "testing/openjdk2/jdk/src/share/classes/sun/security/pkcs/PKCS9Attributes.java",
"license": "mit",
"size": 11969
} | [
"java.io.IOException",
"java.io.OutputStream"
] | import java.io.IOException; import java.io.OutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 1,615,322 |
private void indexMethods() {
this.modFunctions = new HashMap<>();
this.constFunctions = new HashMap<>();
this.events = new HashMap<>();
ContractAbiMethod[] methods = contract.getInfo().getAbiDefinition();
try {
for (ContractAbiMethod method : methods) {
... | void function() { this.modFunctions = new HashMap<>(); this.constFunctions = new HashMap<>(); this.events = new HashMap<>(); ContractAbiMethod[] methods = contract.getInfo().getAbiDefinition(); try { for (ContractAbiMethod method : methods) { ObjectMapper mapper = new ObjectMapper(); Function function = Function.fromJs... | /**
* called once to index functions by type.
*/ | called once to index functions by type | indexMethods | {
"repo_name": "cegeka/tether",
"path": "src/main/java/com/cegeka/tetherj/EthSmartContractFactory.java",
"license": "apache-2.0",
"size": 6709
} | [
"com.cegeka.tetherj.pojo.ContractAbiMethod",
"com.fasterxml.jackson.core.JsonProcessingException",
"com.fasterxml.jackson.databind.ObjectMapper",
"java.util.HashMap",
"org.ethereum.tether.core.CallTransaction"
] | import com.cegeka.tetherj.pojo.ContractAbiMethod; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.databind.ObjectMapper; import java.util.HashMap; import org.ethereum.tether.core.CallTransaction; | import com.cegeka.tetherj.pojo.*; import com.fasterxml.jackson.core.*; import com.fasterxml.jackson.databind.*; import java.util.*; import org.ethereum.tether.core.*; | [
"com.cegeka.tetherj",
"com.fasterxml.jackson",
"java.util",
"org.ethereum.tether"
] | com.cegeka.tetherj; com.fasterxml.jackson; java.util; org.ethereum.tether; | 1,532,533 |
@Nullable
public ECKey getConnectedKey(KeyBag keyBag) throws ScriptException {
TransactionOutput connectedOutput = getConnectedOutput();
checkNotNull(connectedOutput, "Input is not connected so cannot retrieve key");
Script connectedScript = connectedOutput.getScriptPubKey();
if ... | ECKey function(KeyBag keyBag) throws ScriptException { TransactionOutput connectedOutput = getConnectedOutput(); checkNotNull(connectedOutput, STR); Script connectedScript = connectedOutput.getScriptPubKey(); if (connectedScript.isSentToAddress()) { byte[] addressBytes = connectedScript.getPubKeyHash(); return keyBag.f... | /**
* Returns the ECKey identified in the connected output, for either pay-to-address scripts or pay-to-key scripts.
* For P2SH scripts you can use {@link #getConnectedRedeemData(org.bitcoinj.wallet.KeyBag)} and then get the
* key from RedeemData.
* If the script form cannot be understood, throws Sc... | Returns the ECKey identified in the connected output, for either pay-to-address scripts or pay-to-key scripts. For P2SH scripts you can use <code>#getConnectedRedeemData(org.bitcoinj.wallet.KeyBag)</code> and then get the key from RedeemData. If the script form cannot be understood, throws ScriptException | getConnectedKey | {
"repo_name": "egordon/CoinJoin",
"path": "lib/bitcoinj/bitcoinj-0.12-src/main/java/org/bitcoinj/core/TransactionOutPoint.java",
"license": "apache-2.0",
"size": 8849
} | [
"com.google.common.base.Preconditions",
"org.bitcoinj.script.Script",
"org.bitcoinj.wallet.KeyBag"
] | import com.google.common.base.Preconditions; import org.bitcoinj.script.Script; import org.bitcoinj.wallet.KeyBag; | import com.google.common.base.*; import org.bitcoinj.script.*; import org.bitcoinj.wallet.*; | [
"com.google.common",
"org.bitcoinj.script",
"org.bitcoinj.wallet"
] | com.google.common; org.bitcoinj.script; org.bitcoinj.wallet; | 1,712,746 |
public void deleteSharedScope(String scopeName, String tenantDomain) throws APIManagementException {
int tenantId = APIUtil.getTenantIdFromTenantDomain(tenantDomain);
try (Connection connection = APIMgtDBUtil.getConnection();
PreparedStatement statement = connection.prepareStatement(SQ... | void function(String scopeName, String tenantDomain) throws APIManagementException { int tenantId = APIUtil.getTenantIdFromTenantDomain(tenantDomain); try (Connection connection = APIMgtDBUtil.getConnection(); PreparedStatement statement = connection.prepareStatement(SQLConstants.DELETE_SHARED_SCOPE)) { try { connectio... | /**
* Delete shared scope.
*
* @param scopeName shared scope name
* @param tenantDomain tenant domain
* @throws APIManagementException if an error occurs while removing shared scope
*/ | Delete shared scope | deleteSharedScope | {
"repo_name": "fazlan-nazeem/carbon-apimgt",
"path": "components/apimgt/org.wso2.carbon.apimgt.impl/src/main/java/org/wso2/carbon/apimgt/impl/dao/ApiMgtDAO.java",
"license": "apache-2.0",
"size": 821235
} | [
"java.sql.Connection",
"java.sql.PreparedStatement",
"java.sql.SQLException",
"org.wso2.carbon.apimgt.api.APIManagementException",
"org.wso2.carbon.apimgt.impl.dao.constants.SQLConstants",
"org.wso2.carbon.apimgt.impl.utils.APIMgtDBUtil",
"org.wso2.carbon.apimgt.impl.utils.APIUtil"
] | import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.SQLException; import org.wso2.carbon.apimgt.api.APIManagementException; import org.wso2.carbon.apimgt.impl.dao.constants.SQLConstants; import org.wso2.carbon.apimgt.impl.utils.APIMgtDBUtil; import org.wso2.carbon.apimgt.impl.utils.APIUtil; | import java.sql.*; import org.wso2.carbon.apimgt.api.*; import org.wso2.carbon.apimgt.impl.dao.constants.*; import org.wso2.carbon.apimgt.impl.utils.*; | [
"java.sql",
"org.wso2.carbon"
] | java.sql; org.wso2.carbon; | 1,115,951 |
protected Guid asGuidOr404(String id) {
try {
return asGuid(id);
} catch (IllegalArgumentException iae) {
throw new WebApplicationException(Response.Status.NOT_FOUND);
}
} | Guid function(String id) { try { return asGuid(id); } catch (IllegalArgumentException iae) { throw new WebApplicationException(Response.Status.NOT_FOUND); } } | /**
* Convert a string to a Guid, or return a 404 response.
*
* If an invalid UUID is supplied to a sub-resource locator, this
* method will cause us to return a 404 response via the sub-resource
* constructor.
*
* @param id the incoming UUID
* @return a Guid
* @throws WebAp... | Convert a string to a Guid, or return a 404 response. If an invalid UUID is supplied to a sub-resource locator, this method will cause us to return a 404 response via the sub-resource constructor | asGuidOr404 | {
"repo_name": "anjalshireesh/gluster-ovirt-poc",
"path": "backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/AbstractBackendResource.java",
"license": "apache-2.0",
"size": 11969
} | [
"javax.ws.rs.WebApplicationException",
"javax.ws.rs.core.Response",
"org.ovirt.engine.core.compat.Guid"
] | import javax.ws.rs.WebApplicationException; import javax.ws.rs.core.Response; import org.ovirt.engine.core.compat.Guid; | import javax.ws.rs.*; import javax.ws.rs.core.*; import org.ovirt.engine.core.compat.*; | [
"javax.ws",
"org.ovirt.engine"
] | javax.ws; org.ovirt.engine; | 1,329,252 |
// <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click on the + sign on the left to edit the code.">
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
try {
searcherUtil.refreshI... | void function(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { try { searcherUtil.refreshIndexInformation(); LOG.debug(STR); } catch (InvalidIndexException ex) { LOG.error(STR + ex); } } | /**
* Handles the HTTP <code>GET</code> method.
* @param request servlet request
* @param response servlet response
* @throws ServletException if a servlet-specific error occurs
* @throws IOException if an I/O error occurs
*/ | Handles the HTTP <code>GET</code> method | doGet | {
"repo_name": "codesearch-github/codesearch",
"path": "src/searcher/src/main/java/org/codesearch/searcher/server/servlets/RefreshServlet.java",
"license": "gpl-3.0",
"size": 3364
} | [
"java.io.IOException",
"javax.servlet.ServletException",
"javax.servlet.http.HttpServletRequest",
"javax.servlet.http.HttpServletResponse",
"org.codesearch.searcher.server.InvalidIndexException"
] | import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.codesearch.searcher.server.InvalidIndexException; | import java.io.*; import javax.servlet.*; import javax.servlet.http.*; import org.codesearch.searcher.server.*; | [
"java.io",
"javax.servlet",
"org.codesearch.searcher"
] | java.io; javax.servlet; org.codesearch.searcher; | 1,708,548 |
public static ArrayList<HashMap<String, Object>> getProductRows(String condition, String orderby) throws SQLException {
return Product.getProductRows(condition, orderby, "ASC");
} | static ArrayList<HashMap<String, Object>> function(String condition, String orderby) throws SQLException { return Product.getProductRows(condition, orderby, "ASC"); } | /**
* Return Array list of Hashmap key/value
*
* @param condition
* @param orderby
* @return
* @throws SQLException
*/ | Return Array list of Hashmap key/value | getProductRows | {
"repo_name": "Gami-404/OnlineShope",
"path": "src/app/models/Product.java",
"license": "mit",
"size": 11897
} | [
"java.sql.SQLException",
"java.util.ArrayList",
"java.util.HashMap"
] | import java.sql.SQLException; import java.util.ArrayList; import java.util.HashMap; | import java.sql.*; import java.util.*; | [
"java.sql",
"java.util"
] | java.sql; java.util; | 925,337 |
public void setBatchRecordLimit(int batchRecordLimit) {
scanBatchRecordLimit = Math.max(1,
Math.min(batchRecordLimit, ValueVector.MAX_ROW_COUNT));
} | void function(int batchRecordLimit) { scanBatchRecordLimit = Math.max(1, Math.min(batchRecordLimit, ValueVector.MAX_ROW_COUNT)); } | /**
* Specify a custom batch record count. This is the maximum number of records
* per batch for this scan. Readers can adjust this, but the adjustment is capped
* at the value specified here
*
* @param scanBatchSize maximum records per batch
*/ | Specify a custom batch record count. This is the maximum number of records per batch for this scan. Readers can adjust this, but the adjustment is capped at the value specified here | setBatchRecordLimit | {
"repo_name": "Ben-Zvi/drill",
"path": "exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/scan/project/ScanSchemaOrchestrator.java",
"license": "apache-2.0",
"size": 17570
} | [
"org.apache.drill.exec.vector.ValueVector"
] | import org.apache.drill.exec.vector.ValueVector; | import org.apache.drill.exec.vector.*; | [
"org.apache.drill"
] | org.apache.drill; | 75,717 |
private void updateWaterCount() {
int waterCount = PreferenceUtilities.getWaterCount(this);
mWaterCountDisplay.setText(waterCount+"");
} | void function() { int waterCount = PreferenceUtilities.getWaterCount(this); mWaterCountDisplay.setText(waterCount+""); } | /**
* Updates the TextView to display the new water count from SharedPreferences
*/ | Updates the TextView to display the new water count from SharedPreferences | updateWaterCount | {
"repo_name": "f1dz/ud851-Exercises",
"path": "Lesson10-Hydration-Reminder/T10.02-Exercise-CreateNotification/app/src/main/java/com/example/android/background/MainActivity.java",
"license": "apache-2.0",
"size": 4531
} | [
"com.example.android.background.utilities.PreferenceUtilities"
] | import com.example.android.background.utilities.PreferenceUtilities; | import com.example.android.background.utilities.*; | [
"com.example.android"
] | com.example.android; | 990,195 |
@Test
public void testAddEntryNoRDNInEntry() throws Exception
{
DirContext ctx = ( DirContext ) getWiredContext( getLdapServer() ).lookup( BASE );
// Create a person
Attributes person = new BasicAttributes( "objectClass", "inetOrgPerson", true );
person.get( "objectClass" ).... | void function() throws Exception { DirContext ctx = ( DirContext ) getWiredContext( getLdapServer() ).lookup( BASE ); Attributes person = new BasicAttributes( STR, STR, true ); person.get( STR ).add( "top" ); person.get( STR ).add( STR ); person.get( STR ).add( STR ); person.put( "sn", STR ); person.put( "cn", STR ); D... | /**
* Create an entry a Rdn which is not present in the entry
*/ | Create an entry a Rdn which is not present in the entry | testAddEntryNoRDNInEntry | {
"repo_name": "lucastheisen/apache-directory-server",
"path": "server-integ/src/test/java/org/apache/directory/server/operations/ldapsdk/AddIT.java",
"license": "apache-2.0",
"size": 56338
} | [
"javax.naming.directory.Attributes",
"javax.naming.directory.BasicAttributes",
"javax.naming.directory.DirContext",
"org.apache.directory.api.ldap.model.entry.Attribute",
"org.apache.directory.server.integ.ServerIntegrationUtils",
"org.junit.Assert"
] | import javax.naming.directory.Attributes; import javax.naming.directory.BasicAttributes; import javax.naming.directory.DirContext; import org.apache.directory.api.ldap.model.entry.Attribute; import org.apache.directory.server.integ.ServerIntegrationUtils; import org.junit.Assert; | import javax.naming.directory.*; import org.apache.directory.api.ldap.model.entry.*; import org.apache.directory.server.integ.*; import org.junit.*; | [
"javax.naming",
"org.apache.directory",
"org.junit"
] | javax.naming; org.apache.directory; org.junit; | 1,258,261 |
public ValueFunctionApproximation generateVFA(double defaultWeightValue){
return new LinearVFA(this, defaultWeightValue);
}
| ValueFunctionApproximation function(double defaultWeightValue){ return new LinearVFA(this, defaultWeightValue); } | /**
* After all the tiling specifications have been set, this method can be called to produce a linear
* VFA object.
* @param defaultWeightValue the default value weights for the CMAC features will use.
* @return a linear ValueFunctionApproximation object that uses this feature database
*/ | After all the tiling specifications have been set, this method can be called to produce a linear VFA object | generateVFA | {
"repo_name": "nakulgopalan/burlap_pomdp_additions",
"path": "src/burlap/behavior/singleagent/vfa/cmac/FVCMACFeatureDatabase.java",
"license": "lgpl-3.0",
"size": 13406
} | [
"burlap.behavior.singleagent.vfa.ValueFunctionApproximation",
"burlap.behavior.singleagent.vfa.common.LinearVFA"
] | import burlap.behavior.singleagent.vfa.ValueFunctionApproximation; import burlap.behavior.singleagent.vfa.common.LinearVFA; | import burlap.behavior.singleagent.vfa.*; import burlap.behavior.singleagent.vfa.common.*; | [
"burlap.behavior.singleagent"
] | burlap.behavior.singleagent; | 1,011,541 |
@Override
public List<ITBook> getAllBooks() throws TransactionException {
List<ITBook> BookList = new ArrayList<ITBook>();
String query = "SELECT * FROM "+TransactionManager.BOOK_ENTITY;
try{
this.resultSet = this.statement.executeQuery(query);
while (this.r... | List<ITBook> function() throws TransactionException { List<ITBook> BookList = new ArrayList<ITBook>(); String query = STR+TransactionManager.BOOK_ENTITY; try{ this.resultSet = this.statement.executeQuery(query); while (this.resultSet.next()) { ITBook book = TransferFactory.getInstance().getBookTransfer(); copyResultBoo... | /**
* Searches all the Books stored at the DDBB
* @return The <code>{@link ITBook}</code> list including all the Books;
* <code>null</code> if no Book is found.
* @throws TransactionException if a DDBB exception occurred
*/ | Searches all the Books stored at the DDBB | getAllBooks | {
"repo_name": "pablo-albaladejo/javaee",
"path": "Modulo1/BookStore/src/bookstore/integration/book/BookDAO.java",
"license": "gpl-3.0",
"size": 9044
} | [
"java.sql.SQLException",
"java.util.ArrayList",
"java.util.List"
] | import java.sql.SQLException; import java.util.ArrayList; import java.util.List; | import java.sql.*; import java.util.*; | [
"java.sql",
"java.util"
] | java.sql; java.util; | 2,105,904 |
default void beforeMethod(final AdviceTargetObject target, final Method method, final Object[] args, final MethodInvocationResult result) {
} | default void beforeMethod(final AdviceTargetObject target, final Method method, final Object[] args, final MethodInvocationResult result) { } | /**
* Intercept the target method and weave the method before origin method. It will invoke before the origin calling.
*
* @param target the target object
* @param method the target method
* @param args all method arguments
* @param result wrapped class of result to detect whether or not t... | Intercept the target method and weave the method before origin method. It will invoke before the origin calling | beforeMethod | {
"repo_name": "apache/incubator-shardingsphere",
"path": "shardingsphere-agent/shardingsphere-agent-api/src/main/java/org/apache/shardingsphere/agent/api/advice/InstanceMethodAroundAdvice.java",
"license": "apache-2.0",
"size": 2754
} | [
"java.lang.reflect.Method",
"org.apache.shardingsphere.agent.api.result.MethodInvocationResult"
] | import java.lang.reflect.Method; import org.apache.shardingsphere.agent.api.result.MethodInvocationResult; | import java.lang.reflect.*; import org.apache.shardingsphere.agent.api.result.*; | [
"java.lang",
"org.apache.shardingsphere"
] | java.lang; org.apache.shardingsphere; | 474,834 |
public void addElementGroup(JRElementGroup group)
{
addElementGroup(children.size(), group);
}
| void function(JRElementGroup group) { addElementGroup(children.size(), group); } | /**
* Adds an element group to the frame.
*
* @param group the element group to add
*/ | Adds an element group to the frame | addElementGroup | {
"repo_name": "aleatorio12/ProVentasConnector",
"path": "jasperreports-6.2.1-project/jasperreports-6.2.1/src/net/sf/jasperreports/engine/design/JRDesignFrame.java",
"license": "gpl-3.0",
"size": 8988
} | [
"net.sf.jasperreports.engine.JRElementGroup"
] | import net.sf.jasperreports.engine.JRElementGroup; | import net.sf.jasperreports.engine.*; | [
"net.sf.jasperreports"
] | net.sf.jasperreports; | 1,077,139 |
public static byte[] getNTLM2SessionResponse(String password,
byte[] challenge, byte[] clientNonce) throws Exception {
byte[] ntlmHash = ntlmHash(password);
MessageDigest md5 = MessageDigest.getInstance("MD5");
md5.update(challenge);
md5.update(clientNonce);
byte[... | static byte[] function(String password, byte[] challenge, byte[] clientNonce) throws Exception { byte[] ntlmHash = ntlmHash(password); MessageDigest md5 = MessageDigest.getInstance("MD5"); md5.update(challenge); md5.update(clientNonce); byte[] sessionHash = new byte[8]; System.arraycopy(md5.digest(), 0, sessionHash, 0,... | /**
* Calculates the NTLM2 Session Response for the given challenge, using the
* specified password and client nonce.
*
* @param password The user's password.
* @param challenge The Type 2 challenge from the server.
* @param clientNonce The random 8-byte client nonce.
*
* @return... | Calculates the NTLM2 Session Response for the given challenge, using the specified password and client nonce | getNTLM2SessionResponse | {
"repo_name": "sardine/mina-ja",
"path": "src/mina-core/src/main/java/org/apache/mina/proxy/handlers/http/ntlm/NTLMResponses.java",
"license": "apache-2.0",
"size": 16604
} | [
"java.security.MessageDigest"
] | import java.security.MessageDigest; | import java.security.*; | [
"java.security"
] | java.security; | 342,377 |
public HidModel sendError(String hid, ErrorModel model) {
String method = "sendError";
try {
URI uri = buildUri(SEND_ERROR_URL.replace("{hid}", hid));
HidModel result = execute(new HttpPost(uri), JsonUtils.toJson(model), HidModel.class);
log(method, result);
return result;
} catch (Throwable e) {
... | HidModel function(String hid, ErrorModel model) { String method = STR; try { URI uri = buildUri(SEND_ERROR_URL.replace("{hid}", hid)); HidModel result = execute(new HttpPost(uri), JsonUtils.toJson(model), HidModel.class); log(method, result); return result; } catch (Throwable e) { throw handleException(e); } } | /**
* Sends POST request to submit an error
*
* @param model {@link ErrorModel} content of the error (code and message)
*
* @return {@link HidModel} containing external {@code hid} of the created audit
* log
*
* @throws AcnClientException if request failed
*/ | Sends POST request to submit an error | sendError | {
"repo_name": "arrow-acs/acn-sdk-java",
"path": "acn-client/src/main/java/com/arrow/acn/client/api/DeviceApi.java",
"license": "apache-2.0",
"size": 13158
} | [
"com.arrow.acs.JsonUtils",
"com.arrow.acs.client.model.ErrorModel",
"com.arrow.acs.client.model.HidModel",
"org.apache.http.client.methods.HttpPost"
] | import com.arrow.acs.JsonUtils; import com.arrow.acs.client.model.ErrorModel; import com.arrow.acs.client.model.HidModel; import org.apache.http.client.methods.HttpPost; | import com.arrow.acs.*; import com.arrow.acs.client.model.*; import org.apache.http.client.methods.*; | [
"com.arrow.acs",
"org.apache.http"
] | com.arrow.acs; org.apache.http; | 1,922,480 |
void saveStatisticsForVds(VdsNetworkStatistics stats); | void saveStatisticsForVds(VdsNetworkStatistics stats); | /**
* Saves the specified statistics
*
* @param stats
* the statistics
*/ | Saves the specified statistics | saveStatisticsForVds | {
"repo_name": "jtux270/translate",
"path": "ovirt/3.6_source/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/network/InterfaceDao.java",
"license": "gpl-3.0",
"size": 6660
} | [
"org.ovirt.engine.core.common.businessentities.network.VdsNetworkStatistics"
] | import org.ovirt.engine.core.common.businessentities.network.VdsNetworkStatistics; | import org.ovirt.engine.core.common.businessentities.network.*; | [
"org.ovirt.engine"
] | org.ovirt.engine; | 2,087,461 |
public Set<Host> loadHosts(String eid, String serviceName); | Set<Host> function(String eid, String serviceName); | /**
* Load local hosts
*
* @param eid the tc Runtime instance id
* @param serviceName the service's human id
* @return set of local hosts
*/ | Load local hosts | loadHosts | {
"repo_name": "pivotal/tcs-hq-management-plugin",
"path": "com.springsource.hq.plugin.tcserver.serverconfig.web/src/main/java/com/springsource/hq/plugin/tcserver/serverconfig/web/services/SettingsService.java",
"license": "gpl-2.0",
"size": 15742
} | [
"com.springsource.hq.plugin.tcserver.serverconfig.services.engine.Host",
"java.util.Set"
] | import com.springsource.hq.plugin.tcserver.serverconfig.services.engine.Host; import java.util.Set; | import com.springsource.hq.plugin.tcserver.serverconfig.services.engine.*; import java.util.*; | [
"com.springsource.hq",
"java.util"
] | com.springsource.hq; java.util; | 2,501,639 |
NodeAVL findNode(Session session, PersistentStore store, Object data,
int compareType, int readMode) {
readLock.lock();
try {
NodeAVL x = getAccessor(store);
NodeAVL n = null;
NodeAVL result = null;
Row ... | NodeAVL findNode(Session session, PersistentStore store, Object data, int compareType, int readMode) { readLock.lock(); try { NodeAVL x = getAccessor(store); NodeAVL n = null; NodeAVL result = null; Row currentRow = null; while (x != null) { currentRow = x.getRow(store); int i = colTypes[0].compare(session, data, curre... | /**
* Finds a match with a value
*
* @param session Session
* @param store PersistentStore
* @param data value data for the index columns
* @param compareType int
* @param readMode int
* @return matching node or null
*/ | Finds a match with a value | findNode | {
"repo_name": "RabadanLab/Pegasus",
"path": "resources/hsqldb-2.2.7/hsqldb/src/org/hsqldb/index/IndexAVL.java",
"license": "mit",
"size": 52803
} | [
"org.hsqldb.OpTypes",
"org.hsqldb.Row",
"org.hsqldb.Session",
"org.hsqldb.error.Error",
"org.hsqldb.error.ErrorCode",
"org.hsqldb.persist.PersistentStore"
] | import org.hsqldb.OpTypes; import org.hsqldb.Row; import org.hsqldb.Session; import org.hsqldb.error.Error; import org.hsqldb.error.ErrorCode; import org.hsqldb.persist.PersistentStore; | import org.hsqldb.*; import org.hsqldb.error.*; import org.hsqldb.persist.*; | [
"org.hsqldb",
"org.hsqldb.error",
"org.hsqldb.persist"
] | org.hsqldb; org.hsqldb.error; org.hsqldb.persist; | 693,472 |
@Override
default Object productElement(int n) {
switch (n) {
case 0:
return _1();
case 1:
return _2();
case 2:
return _3();
default:
throw new IndexOutOfBoundsException(Integer.toString(n));
}
} | default Object productElement(int n) { switch (n) { case 0: return _1(); case 1: return _2(); case 2: return _3(); default: throw new IndexOutOfBoundsException(Integer.toString(n)); } } | /**
* The n<sup>th</sup> element of this product, 0-based.
*
* @param n the index of the element to return
*
* @return the element {@code n} elements after the first element
*/ | The nth element of this product, 0-based | productElement | {
"repo_name": "GlacialThorns/Glacial-Java-Kotlin",
"path": "deziras/src/main/java/org/deziras/Product3.java",
"license": "gpl-3.0",
"size": 1123
} | [
"org.deziras.util.IndexOutOfBoundsException"
] | import org.deziras.util.IndexOutOfBoundsException; | import org.deziras.util.*; | [
"org.deziras.util"
] | org.deziras.util; | 2,355,624 |
public void setSearchCriterias(List<SearchCriteria> searchCriterias);
| void function(List<SearchCriteria> searchCriterias); | /**
* Sets the search criterias.
*
* @param searchCriterias
* the new search criterias
*/ | Sets the search criterias | setSearchCriterias | {
"repo_name": "JaLandry/MeasureAuthoringTool_LatestSprint",
"path": "mat/src/mat/dao/IQuery.java",
"license": "apache-2.0",
"size": 1821
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,600,799 |
@Deprecated
public Boolean isPreferredShortInCountry(String country) {
if (!StringUtils.isBlank(country) && this.locale != null) {
if (isShort() && this.locale.getCountry().equals(country)) {
return true;
}
}
return false;
}
| Boolean function(String country) { if (!StringUtils.isBlank(country) && this.locale != null) { if (isShort() && this.locale.getCountry().equals(country)) { return true; } } return false; } | /**
* Checks if this conceptName is a short name in a locale with a matching country
*
* @deprecated since version 1.7
* @see Concept#getShortNameInLocale(Locale)
* @see Concept#getShortestName(Locale, Boolean)
* @param country ISO 639 2-letter code for a country
* @return true if the name is a short name... | Checks if this conceptName is a short name in a locale with a matching country | isPreferredShortInCountry | {
"repo_name": "Winbobob/openmrs-core",
"path": "api/src/main/java/org/openmrs/ConceptName.java",
"license": "mpl-2.0",
"size": 18518
} | [
"org.apache.commons.lang.StringUtils"
] | import org.apache.commons.lang.StringUtils; | import org.apache.commons.lang.*; | [
"org.apache.commons"
] | org.apache.commons; | 2,898,084 |
public void setCurrentAmountField(Field currentAmountField) {
this.currentAmountField = currentAmountField;
}
| void function(Field currentAmountField) { this.currentAmountField = currentAmountField; } | /**
* Sets the currentAmountField attribute value.
* @param currentAmountField The currentAmountField to set.
*/ | Sets the currentAmountField attribute value | setCurrentAmountField | {
"repo_name": "ua-eas/ua-kfs-5.3",
"path": "work/src/org/kuali/kfs/sys/document/web/AccountingLineViewCurrentBaseAmount.java",
"license": "agpl-3.0",
"size": 14624
} | [
"org.kuali.rice.kns.web.ui.Field"
] | import org.kuali.rice.kns.web.ui.Field; | import org.kuali.rice.kns.web.ui.*; | [
"org.kuali.rice"
] | org.kuali.rice; | 919,623 |
protected Constraint makeOpposite() {
return new Opposite(this);
} | Constraint function() { return new Opposite(this); } | /**
* Make the opposite constraint of this.
* BEWARE: this method should never be called by the user
* but it can be overridden to provide better constraint negations
*/ | Make the opposite constraint of this. but it can be overridden to provide better constraint negations | makeOpposite | {
"repo_name": "chocoteam/choco3",
"path": "src/main/java/org/chocosolver/solver/constraints/Constraint.java",
"license": "bsd-3-clause",
"size": 13379
} | [
"org.chocosolver.solver.constraints.reification.Opposite"
] | import org.chocosolver.solver.constraints.reification.Opposite; | import org.chocosolver.solver.constraints.reification.*; | [
"org.chocosolver.solver"
] | org.chocosolver.solver; | 2,013,670 |
private void translateImageToCenterTouchPosition(float t) {
float targetX = startTouch.x + t * (endTouch.x - startTouch.x);
float targetY = startTouch.y + t * (endTouch.y - startTouch.y);
PointF curr = transformCoordBitmapToTouch(bitmapX, bitmapY);
matrix.postTran... | void function(float t) { float targetX = startTouch.x + t * (endTouch.x - startTouch.x); float targetY = startTouch.y + t * (endTouch.y - startTouch.y); PointF curr = transformCoordBitmapToTouch(bitmapX, bitmapY); matrix.postTranslate(targetX - curr.x, targetY - curr.y); } | /**
* Interpolate between where the image should start and end in order to translate
* the image so that the point that is touched is what ends up centered at the end
* of the zoom.
* @param t
*/ | Interpolate between where the image should start and end in order to translate the image so that the point that is touched is what ends up centered at the end of the zoom | translateImageToCenterTouchPosition | {
"repo_name": "Allesad/HabraClient",
"path": "app/src/main/java/com/allesad/habraclient/components/views/TouchImageView.java",
"license": "apache-2.0",
"size": 31559
} | [
"android.graphics.PointF"
] | import android.graphics.PointF; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 1,958,844 |
public static Map<String, SegmentName> getAllowedConsumingStateSegments(ExternalView externalView,
Map<String, SortedSet<SegmentName>> sortedSegmentsByPartition) {
Map<String, SegmentName> allowedSegmentInConsumingStateByPartition = new HashMap<>();
for (String partition : sortedSegmentsByPartition.keyS... | static Map<String, SegmentName> function(ExternalView externalView, Map<String, SortedSet<SegmentName>> sortedSegmentsByPartition) { Map<String, SegmentName> allowedSegmentInConsumingStateByPartition = new HashMap<>(); for (String partition : sortedSegmentsByPartition.keySet()) { SortedSet<SegmentName> sortedSegmentsFo... | /**
* Compute the map of allowed 'consuming' segments for each partition.
*
* @param externalView helix external view
* @param sortedSegmentsByPartition map of partition to sorted set of segment names.
* @return map of allowed consuming segment for each partition for routing.
*/ | Compute the map of allowed 'consuming' segments for each partition | getAllowedConsumingStateSegments | {
"repo_name": "apucher/pinot",
"path": "pinot-broker/src/main/java/com/linkedin/pinot/broker/routing/builder/LowLevelRoutingTableBuilderUtil.java",
"license": "apache-2.0",
"size": 3673
} | [
"com.linkedin.pinot.common.utils.CommonConstants",
"com.linkedin.pinot.common.utils.SegmentName",
"java.util.HashMap",
"java.util.Map",
"java.util.SortedSet",
"org.apache.helix.model.ExternalView"
] | import com.linkedin.pinot.common.utils.CommonConstants; import com.linkedin.pinot.common.utils.SegmentName; import java.util.HashMap; import java.util.Map; import java.util.SortedSet; import org.apache.helix.model.ExternalView; | import com.linkedin.pinot.common.utils.*; import java.util.*; import org.apache.helix.model.*; | [
"com.linkedin.pinot",
"java.util",
"org.apache.helix"
] | com.linkedin.pinot; java.util; org.apache.helix; | 2,288,306 |
public void move(Point screenLocation) {
if (origin == null) {
origin = screenLocation;
}
dragImage.setLocation(screenLocation.x, screenLocation.y);
} | void function(Point screenLocation) { if (origin == null) { origin = screenLocation; } dragImage.setLocation(screenLocation.x, screenLocation.y); } | /** Move the ghosted image to the requested location.
* @param screenLocation Where to draw the image, in screen coordinates
*/ | Move the ghosted image to the requested location | move | {
"repo_name": "trejkaz/jna",
"path": "contrib/platform/src/com/sun/jna/platform/dnd/GhostedDragImage.java",
"license": "lgpl-2.1",
"size": 5785
} | [
"java.awt.Point"
] | import java.awt.Point; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,771,226 |
@Test(groups = { "wso2.esb" }, description = "Data-mapper conversion of input xml messages with underscore "
+ "element names for xml messages with element names with underscore")
public void testXmlWithUnderscoreToXmlWithUnderscore() throws Exception {
uploadResourcesToGovernanceRegistry(RE... | @Test(groups = { STR }, description = STR + STR) void function() throws Exception { uploadResourcesToGovernanceRegistry(REGISTRY_ROOT_PATH + STR, ARTIFACT_ROOT_PATH + STR + File.separator); String expectedResponse = STRurn:sobject.partner.soap.sforce.com\STR xmlns:axis2ns11=\"urn:partner.soap.sforce.com\STR xmlns:xsi=\... | /**
* This method contains the test case for mapping single xml object with elements containing
* underscore in name to a single xml object with elements containing underscore in name
*
* @throws Exception
*/ | This method contains the test case for mapping single xml object with elements containing underscore in name to a single xml object with elements containing underscore in name | testXmlWithUnderscoreToXmlWithUnderscore | {
"repo_name": "milindaperera/product-ei",
"path": "integration/mediation-tests/tests-mediator-2/src/test/java/org/wso2/carbon/esb/mediator/test/datamapper/DataMapperSimpleTestCase.java",
"license": "apache-2.0",
"size": 14802
} | [
"java.io.File",
"org.testng.Assert",
"org.testng.annotations.Test"
] | import java.io.File; import org.testng.Assert; import org.testng.annotations.Test; | import java.io.*; import org.testng.*; import org.testng.annotations.*; | [
"java.io",
"org.testng",
"org.testng.annotations"
] | java.io; org.testng; org.testng.annotations; | 1,114,155 |
public void publish(WorkUnitState state) throws IOException {
publishMetadata(state);
publishData(state);
} | void function(WorkUnitState state) throws IOException { publishMetadata(state); publishData(state); } | /**
* First publish the metadata via {@link DataPublisher#publishMetadata(WorkUnitState)}, and then publish the output data
* via the {@link DataPublisher#publishData(WorkUnitState)} method.
*
* @param state is a {@link WorkUnitState}.
* @throws IOException if there is a problem with publishing the metad... | First publish the metadata via <code>DataPublisher#publishMetadata(WorkUnitState)</code>, and then publish the output data via the <code>DataPublisher#publishData(WorkUnitState)</code> method | publish | {
"repo_name": "slietz/gobblin",
"path": "gobblin-api/src/main/java/gobblin/publisher/DataPublisher.java",
"license": "apache-2.0",
"size": 4127
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,335,277 |
public final void parse( URL url ) throws IOException, ParsingException
{
parse( url.openStream() );
}
| final void function( URL url ) throws IOException, ParsingException { parse( url.openStream() ); } | /**
* Parses the given file.
*
* @param url
*
* @throws IOException
* @throws ParsingException
*/ | Parses the given file | parse | {
"repo_name": "CTDP/TGM-Utils",
"path": "src/net/ctdp/tgmutils/io/AbstractIniParser.java",
"license": "mit",
"size": 9493
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 486,789 |
public @NotNull Builder setTracingContext(TracingContext tracingContext) {
this.tracingContext = tracingContext;
return this;
} | @NotNull Builder function(TracingContext tracingContext) { this.tracingContext = tracingContext; return this; } | /**
* As of v.0.8.5, default {@link TracingContext} implementation will be automatically provided when a non-null
* {@link Tracer} instance is set via {@link #setTracer(Tracer)}.
* This method can still be used to provide a custom {@link TracingContext} implementation.
*/ | As of v.0.8.5, default <code>TracingContext</code> implementation will be automatically provided when a non-null <code>Tracer</code> instance is set via <code>#setTracer(Tracer)</code>. This method can still be used to provide a custom <code>TracingContext</code> implementation | setTracingContext | {
"repo_name": "uber/tchannel-java",
"path": "tchannel-core/src/main/java/com/uber/tchannel/api/TChannel.java",
"license": "mit",
"size": 20176
} | [
"com.uber.tchannel.tracing.TracingContext",
"org.jetbrains.annotations.NotNull"
] | import com.uber.tchannel.tracing.TracingContext; import org.jetbrains.annotations.NotNull; | import com.uber.tchannel.tracing.*; import org.jetbrains.annotations.*; | [
"com.uber.tchannel",
"org.jetbrains.annotations"
] | com.uber.tchannel; org.jetbrains.annotations; | 948,264 |
private void addItemsToEditMenu() {
this.backAction = new JMenuItem("Back");
this.frontAction = new JMenuItem("forward");
this.jMenu2.add(this.backAction);
this.jMenu2.add(this.frontAction);
} | void function() { this.backAction = new JMenuItem("Back"); this.frontAction = new JMenuItem(STR); this.jMenu2.add(this.backAction); this.jMenu2.add(this.frontAction); } | /**
* Method for initializing and inserting edit menu items.
*/ | Method for initializing and inserting edit menu items | addItemsToEditMenu | {
"repo_name": "karelhala/bachelor_thesis",
"path": "source/BT/src/GUI/MyMenuBar.java",
"license": "gpl-2.0",
"size": 9128
} | [
"javax.swing.JMenuItem"
] | import javax.swing.JMenuItem; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 1,217,625 |
public void removeConnectionListener(ConnectionListener listener) {
connectionListeners.remove(listener);
if(null != server) {
server.removeConnectionListener(listener);
}
} | void function(ConnectionListener listener) { connectionListeners.remove(listener); if(null != server) { server.removeConnectionListener(listener); } } | /**
* Removes a previously registered connection listener.
* @param listener
*/ | Removes a previously registered connection listener | removeConnectionListener | {
"repo_name": "AscariaQuynn/ZoneOfUprising-Central",
"path": "src/cz/ascaria/network/central/ServerWrapper.java",
"license": "bsd-3-clause",
"size": 12040
} | [
"com.jme3.network.ConnectionListener"
] | import com.jme3.network.ConnectionListener; | import com.jme3.network.*; | [
"com.jme3.network"
] | com.jme3.network; | 1,929,879 |
public static int convertDateToProleptic(int hybrid) {
int proleptic = hybrid;
if (hybrid < SWITCHOVER_DAYS) {
String dateStr = HYBRID_DATE_FORMAT.format(LocalDate.ofEpochDay(proleptic));
proleptic = (int) LocalDate.from(PROLEPTIC_DATE_FORMAT.parse(dateStr)).toEpochDay();
}
return prolepti... | static int function(int hybrid) { int proleptic = hybrid; if (hybrid < SWITCHOVER_DAYS) { String dateStr = HYBRID_DATE_FORMAT.format(LocalDate.ofEpochDay(proleptic)); proleptic = (int) LocalDate.from(PROLEPTIC_DATE_FORMAT.parse(dateStr)).toEpochDay(); } return proleptic; } | /**
* Convert an epoch day from the hybrid Julian/Gregorian calendar to the
* proleptic Gregorian.
* @param hybrid day of epoch in the hybrid Julian/Gregorian
* @return day of epoch in the proleptic Gregorian
*/ | Convert an epoch day from the hybrid Julian/Gregorian calendar to the proleptic Gregorian | convertDateToProleptic | {
"repo_name": "apache/orc",
"path": "java/core/src/java/org/apache/orc/impl/DateUtils.java",
"license": "apache-2.0",
"size": 8269
} | [
"java.time.LocalDate"
] | import java.time.LocalDate; | import java.time.*; | [
"java.time"
] | java.time; | 1,082,418 |
@FIXVersion(introduced="5.0")
@TagNumRef(tagNum=TagNum.UnderlyingAllocationPercent)
public Double getUnderlyingAllocationPercent() {
return underlyingAllocationPercent;
} | @FIXVersion(introduced="5.0") @TagNumRef(tagNum=TagNum.UnderlyingAllocationPercent) Double function() { return underlyingAllocationPercent; } | /**
* Message field getter.
* @return field value
*/ | Message field getter | getUnderlyingAllocationPercent | {
"repo_name": "marvisan/HadesFIX",
"path": "Model/src/main/java/net/hades/fix/message/comp/UnderlyingInstrument.java",
"license": "gpl-3.0",
"size": 91408
} | [
"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; | 711,058 |
void render(String key, String value, WebuiRequestContext context) throws IOException, Exception; | void render(String key, String value, WebuiRequestContext context) throws IOException, Exception; | /**
* Render the value control. At this point the value field already rendered on the page and writer stands
* just after it.
*
* @param key the key
* @param value the value to which add a control
* @param context the WebUI context
* @throws IOException Signals that an I/O exception has occurred.
... | Render the value control. At this point the value field already rendered on the page and writer stands just after it | render | {
"repo_name": "exodev/social",
"path": "component/webui/src/main/java/org/exoplatform/social/webui/profile/settings/UIValueControl.java",
"license": "lgpl-3.0",
"size": 1797
} | [
"java.io.IOException",
"org.exoplatform.webui.application.WebuiRequestContext"
] | import java.io.IOException; import org.exoplatform.webui.application.WebuiRequestContext; | import java.io.*; import org.exoplatform.webui.application.*; | [
"java.io",
"org.exoplatform.webui"
] | java.io; org.exoplatform.webui; | 2,822,357 |
protected String readLine() throws IOException {
if (pdfSource.isEOF()) {
throw new IOException("Error: End-of-File, expected line");
}
StringBuilder buffer = new StringBuilder(11);
int c;
while ((c = pdfSource.read()) != -1) {
if (isEOL(c)) {
break;
}
buffer.appe... | String function() throws IOException { if (pdfSource.isEOF()) { throw new IOException(STR); } StringBuilder buffer = new StringBuilder(11); int c; while ((c = pdfSource.read()) != -1) { if (isEOL(c)) { break; } buffer.append((char) c); } return buffer.toString(); } | /**
* This will read bytes until the first end of line marker occurs. Note: if you later unread the results of this function, you'll need to add a
* newline character to the end of the string.
*
* @return The characters between the current position and the end of the line.
*
* @throws IOException If... | This will read bytes until the first end of line marker occurs. Note: if you later unread the results of this function, you'll need to add a newline character to the end of the string | readLine | {
"repo_name": "sencko/NALB",
"path": "nalb2013/src/org/apache/pdfbox/pdfparser/BaseParser.java",
"license": "gpl-2.0",
"size": 46902
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 159,444 |
@Test
public void testMixed5() throws Exception {
String q = query + "b = filter a by " +
"(srcid == 10 or mrkt == 'us') and name == 'foo' and " +
"dstid == 30;" + "store b into 'out';";
test(q, Arrays.asList("srcid", "dstid", "mrkt"),
"(((srcid ==... | void function() throws Exception { String q = query + STR + STR + STR + STR; test(q, Arrays.asList("srcid", "dstid", "mrkt"), STR, STR); } | /**
* test case where filter has both conditions on partition cols and non
* partition cols and the filter condition will be split to extract the
* conditions on partition columns -
* This testcase has two partition col conditions with OR + non parition
* col conditions
*/ | test case where filter has both conditions on partition cols and non partition cols and the filter condition will be split to extract the conditions on partition columns - This testcase has two partition col conditions with OR + non parition col conditions | testMixed5 | {
"repo_name": "apache/pig",
"path": "test/org/apache/pig/test/TestNewPartitionFilterPushDown.java",
"license": "apache-2.0",
"size": 44644
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 1,099,474 |
public boolean isKeyDown(int code) {
return Keyboard.isKeyDown(code);
} | boolean function(int code) { return Keyboard.isKeyDown(code); } | /**
* Check if a particular key is down
*
* @param code The key code of the key to check
* @return True if the key is down
*/ | Check if a particular key is down | isKeyDown | {
"repo_name": "CyboticCatfish/code404",
"path": "CodingGame/lib/slick/src/org/newdawn/slick/Input.java",
"license": "gpl-2.0",
"size": 43080
} | [
"org.lwjgl.input.Keyboard"
] | import org.lwjgl.input.Keyboard; | import org.lwjgl.input.*; | [
"org.lwjgl.input"
] | org.lwjgl.input; | 2,419,991 |
@ApiModelProperty(value = "")
public ConversionDate getConversionDate() {
return conversionDate;
} | @ApiModelProperty(value = "") ConversionDate function() { return conversionDate; } | /**
* Get conversionDate
*
* @return conversionDate
*/ | Get conversionDate | getConversionDate | {
"repo_name": "XeroAPI/Xero-Java",
"path": "src/main/java/com/xero/models/accounting/Setup.java",
"license": "mit",
"size": 5326
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 92,039 |
public static void noNullValues(String name, Map<?, ?> value) throws NullPointerException {
if (Objects.requireNonNull(value, name).entrySet().stream().anyMatch(Objects::isNull)) {
throw new NullPointerException(name + " may not contain null elements!");
}
} | static void function(String name, Map<?, ?> value) throws NullPointerException { if (Objects.requireNonNull(value, name).entrySet().stream().anyMatch(Objects::isNull)) { throw new NullPointerException(name + STR); } } | /**
* Throws a {@code NullPointerExceptions} if value is null or any key or value within is null.
*
* @param name the name of the value
* @param value the value to check
*
* @throws NullPointerException if value == null or value contains null values
*/ | Throws a NullPointerExceptions if value is null or any key or value within is null | noNullValues | {
"repo_name": "autermann/SOS",
"path": "core/api/src/main/java/org/n52/sos/cache/CacheValidation.java",
"license": "gpl-2.0",
"size": 4836
} | [
"java.util.Map",
"java.util.Objects"
] | import java.util.Map; import java.util.Objects; | import java.util.*; | [
"java.util"
] | java.util; | 400,588 |
public Color getColor(int izV) {
return new Color(this.r[izV], this.g[izV], this.b[izV]);
} | Color function(int izV) { return new Color(this.r[izV], this.g[izV], this.b[izV]); } | /**
* Returns a color.
*
* @param izV ??.
*
* @return The color.
*/ | Returns a color | getColor | {
"repo_name": "raedle/univis",
"path": "lib/jfreechart-1.0.1/src/org/jfree/chart/plot/ColorPalette.java",
"license": "lgpl-2.1",
"size": 12117
} | [
"java.awt.Color"
] | import java.awt.Color; | import java.awt.*; | [
"java.awt"
] | java.awt; | 601,394 |
private int getImageWidth() {
DisplayMetrics dm = new DisplayMetrics();
mActivity.getWindowManager().getDefaultDisplay().getMetrics(dm);
return dm.widthPixels >> 2;
}
private class BitmapToLoad {
public String mUrl;
public ImageView mImageView;
publi... | int function() { DisplayMetrics dm = new DisplayMetrics(); mActivity.getWindowManager().getDefaultDisplay().getMetrics(dm); return dm.widthPixels >> 2; } private class BitmapToLoad { public String mUrl; public ImageView mImageView; public BitmapToLoad(String url, ImageView view) { mUrl = url; mImageView = view; } } pri... | /**
* return screen pixel width / 4 as image width
*/ | return screen pixel width / 4 as image width | getImageWidth | {
"repo_name": "tengrenfu/AsyncLoad",
"path": "AsyncLoad/src/com/displayjson/asyncload/ImageLoader.java",
"license": "gpl-2.0",
"size": 11223
} | [
"android.util.DisplayMetrics",
"android.widget.ImageView"
] | import android.util.DisplayMetrics; import android.widget.ImageView; | import android.util.*; import android.widget.*; | [
"android.util",
"android.widget"
] | android.util; android.widget; | 2,021,683 |
FileChooser createSaveToExcelChooser()
{
List<FileFilter> filterList = new ArrayList<FileFilter>();
FileFilter filter = new ExcelFilter();
filterList.add(filter);
FileChooser chooser =
new FileChooser(this, FileChooser.SAVE, "Save Results to Excel",
"Save the Results data to a file which can be load... | FileChooser createSaveToExcelChooser() { List<FileFilter> filterList = new ArrayList<FileFilter>(); FileFilter filter = new ExcelFilter(); filterList.add(filter); FileChooser chooser = new FileChooser(this, FileChooser.SAVE, STR, STR + STR, filterList); try { File f = UIUtilities.getDefaultFolder(); if (f != null) choo... | /**
* Creates a file chooser used to select where to save the results
* as an Excel file.
*
* @return See above.
*/ | Creates a file chooser used to select where to save the results as an Excel file | createSaveToExcelChooser | {
"repo_name": "tp81/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/measurement/view/MeasurementViewerUI.java",
"license": "gpl-2.0",
"size": 45535
} | [
"java.io.File",
"java.util.ArrayList",
"java.util.List",
"javax.swing.filechooser.FileFilter",
"org.openmicroscopy.shoola.util.filter.file.ExcelFilter",
"org.openmicroscopy.shoola.util.ui.UIUtilities",
"org.openmicroscopy.shoola.util.ui.filechooser.FileChooser"
] | import java.io.File; import java.util.ArrayList; import java.util.List; import javax.swing.filechooser.FileFilter; import org.openmicroscopy.shoola.util.filter.file.ExcelFilter; import org.openmicroscopy.shoola.util.ui.UIUtilities; import org.openmicroscopy.shoola.util.ui.filechooser.FileChooser; | import java.io.*; import java.util.*; import javax.swing.filechooser.*; import org.openmicroscopy.shoola.util.filter.file.*; import org.openmicroscopy.shoola.util.ui.*; import org.openmicroscopy.shoola.util.ui.filechooser.*; | [
"java.io",
"java.util",
"javax.swing",
"org.openmicroscopy.shoola"
] | java.io; java.util; javax.swing; org.openmicroscopy.shoola; | 2,861,456 |
public static CronTab findByName(String name) throws DatabaseException {
log.debug("findByName({})", name);
String qs = "from CronTab ct where ct.name=:name";
Session session = null;
try {
session = HibernateUtil.getSessionFactory().openSession();
Query q = session.createQuery(qs);
q.setString("n... | static CronTab function(String name) throws DatabaseException { log.debug(STR, name); String qs = STR; Session session = null; try { session = HibernateUtil.getSessionFactory().openSession(); Query q = session.createQuery(qs); q.setString("name", name); CronTab ret = (CronTab) q.setMaxResults(1).uniqueResult(); log.deb... | /**
* Find by filename
*/ | Find by filename | findByName | {
"repo_name": "papamas/DMS-KANGREG-XI-MANADO",
"path": "src/main/java/com/openkm/dao/CronTabDAO.java",
"license": "gpl-3.0",
"size": 6763
} | [
"com.openkm.core.DatabaseException",
"com.openkm.dao.bean.CronTab",
"org.hibernate.HibernateException",
"org.hibernate.Query",
"org.hibernate.Session"
] | import com.openkm.core.DatabaseException; import com.openkm.dao.bean.CronTab; import org.hibernate.HibernateException; import org.hibernate.Query; import org.hibernate.Session; | import com.openkm.core.*; import com.openkm.dao.bean.*; import org.hibernate.*; | [
"com.openkm.core",
"com.openkm.dao",
"org.hibernate"
] | com.openkm.core; com.openkm.dao; org.hibernate; | 493,915 |
public DiagonalMatrix transform(final DoubleUnaryOperator operator) {
final var D = new DiagonalMatrix(diag.length);
for (var i = 0; i < diag.length; i++) {
D.diag[i] = operator.applyAsDouble(diag[i]);
}
return D;
} | DiagonalMatrix function(final DoubleUnaryOperator operator) { final var D = new DiagonalMatrix(diag.length); for (var i = 0; i < diag.length; i++) { D.diag[i] = operator.applyAsDouble(diag[i]); } return D; } | /**
* Applies the given operator to all elements, returning a new Matrix.
*
* @param operator Operator to be applied to this Matrix and B
* @return new Matrix with the result
* @throws NullPointerException iff operator == null or B == null
* @see #transformEquals(DoubleUnaryOperator)
... | Applies the given operator to all elements, returning a new Matrix | transform | {
"repo_name": "tweimer/java-matrix",
"path": "src/main/java/jama2/DiagonalMatrix.java",
"license": "unlicense",
"size": 10968
} | [
"java.util.function.DoubleUnaryOperator"
] | import java.util.function.DoubleUnaryOperator; | import java.util.function.*; | [
"java.util"
] | java.util; | 2,059,681 |
public Record getSelectedParent() {
return newParent;
} | Record function() { return newParent; } | /**
* Gets current selection of parent object. It tries to use record from TreeGrid
* to propagate add/remove of record to view properly.
*/ | Gets current selection of parent object. It tries to use record from TreeGrid to propagate add/remove of record to view properly | getSelectedParent | {
"repo_name": "proarc/proarc",
"path": "proarc-webapp/src/main/java/cz/cas/lib/proarc/webapp/client/widget/ImportParentChooser.java",
"license": "gpl-3.0",
"size": 15089
} | [
"com.smartgwt.client.data.Record"
] | import com.smartgwt.client.data.Record; | import com.smartgwt.client.data.*; | [
"com.smartgwt.client"
] | com.smartgwt.client; | 637,848 |
private IQueryFilter<I_PP_Order> getPP_OrderInvoiceableFilter(final Object contextProvider)
{
final IQueryBL queryBL = Services.get(IQueryBL.class);
final ICompositeQueryFilter<I_PP_Order> filters = queryBL.createCompositeQueryFilter(I_PP_Order.class)
// Only those manufacturing orders which are closed...
... | IQueryFilter<I_PP_Order> function(final Object contextProvider) { final IQueryBL queryBL = Services.get(IQueryBL.class); final ICompositeQueryFilter<I_PP_Order> filters = queryBL.createCompositeQueryFilter(I_PP_Order.class) .addEqualsFilter(I_PP_Order.COLUMN_DocStatus, DocAction.STATUS_Closed) .addEqualsFilter(de.metas... | /**
* Gets a filter which accepts only those {@link I_PP_Order}s which are invoiceable.
*
* More precisely, manufacturing orders which:
* <ul>
* <li>reference a M_Material_Tracking and
* <li>are closed
* </ul>
*
* @return
*/ | Gets a filter which accepts only those <code>I_PP_Order</code>s which are invoiceable. More precisely, manufacturing orders which: reference a M_Material_Tracking and are closed | getPP_OrderInvoiceableFilter | {
"repo_name": "klst-com/metasfresh",
"path": "de.metas.materialtracking/src/main/java/de/metas/materialtracking/qualityBasedInvoicing/ic/spi/impl/PP_Order_MaterialTracking_HandlerDAO.java",
"license": "gpl-2.0",
"size": 5257
} | [
"org.adempiere.ad.dao.ICompositeQueryFilter",
"org.adempiere.ad.dao.IQueryBL",
"org.adempiere.ad.dao.IQueryFilter",
"org.adempiere.util.Services",
"org.compiere.model.IQuery",
"org.compiere.process.DocAction"
] | import org.adempiere.ad.dao.ICompositeQueryFilter; import org.adempiere.ad.dao.IQueryBL; import org.adempiere.ad.dao.IQueryFilter; import org.adempiere.util.Services; import org.compiere.model.IQuery; import org.compiere.process.DocAction; | import org.adempiere.ad.dao.*; import org.adempiere.util.*; import org.compiere.model.*; import org.compiere.process.*; | [
"org.adempiere.ad",
"org.adempiere.util",
"org.compiere.model",
"org.compiere.process"
] | org.adempiere.ad; org.adempiere.util; org.compiere.model; org.compiere.process; | 2,452,845 |
DiskUsage averageUsage(RoutingNode node, ImmutableOpenMap<String, DiskUsage> usages) {
if (usages.size() == 0) {
return new DiskUsage(node.nodeId(), node.node().getName(), "_na_", 0, 0);
}
long totalBytes = 0;
long freeBytes = 0;
for (ObjectCursor<DiskUsage> du : ... | DiskUsage averageUsage(RoutingNode node, ImmutableOpenMap<String, DiskUsage> usages) { if (usages.size() == 0) { return new DiskUsage(node.nodeId(), node.node().getName(), "_na_", 0, 0); } long totalBytes = 0; long freeBytes = 0; for (ObjectCursor<DiskUsage> du : usages.values()) { totalBytes += du.value.getTotalBytes(... | /**
* Returns a {@link DiskUsage} for the {@link RoutingNode} using the
* average usage of other nodes in the disk usage map.
* @param node Node to return an averaged DiskUsage object for
* @param usages Map of nodeId to DiskUsage for all known nodes
* @return DiskUsage representing given node ... | Returns a <code>DiskUsage</code> for the <code>RoutingNode</code> using the average usage of other nodes in the disk usage map | averageUsage | {
"repo_name": "nknize/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/cluster/routing/allocation/decider/DiskThresholdDecider.java",
"license": "apache-2.0",
"size": 31215
} | [
"com.carrotsearch.hppc.cursors.ObjectCursor",
"org.elasticsearch.cluster.DiskUsage",
"org.elasticsearch.cluster.routing.RoutingNode",
"org.elasticsearch.common.collect.ImmutableOpenMap"
] | import com.carrotsearch.hppc.cursors.ObjectCursor; import org.elasticsearch.cluster.DiskUsage; import org.elasticsearch.cluster.routing.RoutingNode; import org.elasticsearch.common.collect.ImmutableOpenMap; | import com.carrotsearch.hppc.cursors.*; import org.elasticsearch.cluster.*; import org.elasticsearch.cluster.routing.*; import org.elasticsearch.common.collect.*; | [
"com.carrotsearch.hppc",
"org.elasticsearch.cluster",
"org.elasticsearch.common"
] | com.carrotsearch.hppc; org.elasticsearch.cluster; org.elasticsearch.common; | 595,649 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.