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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
boolean isValid = min.compareTo(value) <= 0 && 0 <= max.compareTo(value);
if (!isValid) {
throw new MorphlineCompilationException(
String.format("Invalid choice: '%s' (choose from {%s..%s})",
value,
min,
max),
config);
}
... | boolean isValid = min.compareTo(value) <= 0 && 0 <= max.compareTo(value); if (!isValid) { throw new MorphlineCompilationException( String.format(STR, value, min, max), config); } } | /**
* Validates that the given value is contained in the range [min, max]
*/ | Validates that the given value is contained in the range [min, max] | validateRange | {
"repo_name": "cloudera/cdk",
"path": "cdk-morphlines/cdk-morphlines-core/src/main/java/com/cloudera/cdk/morphline/base/Validator.java",
"license": "apache-2.0",
"size": 2755
} | [
"com.cloudera.cdk.morphline.api.MorphlineCompilationException"
] | import com.cloudera.cdk.morphline.api.MorphlineCompilationException; | import com.cloudera.cdk.morphline.api.*; | [
"com.cloudera.cdk"
] | com.cloudera.cdk; | 2,868,365 |
public static boolean isOCSPSigning(CertificateToken certToken) {
return isExtendedKeyUsagePresent(certToken, KeyPurposeId.id_kp_OCSPSigning.toOID());
} | static boolean function(CertificateToken certToken) { return isExtendedKeyUsagePresent(certToken, KeyPurposeId.id_kp_OCSPSigning.toOID()); } | /**
* Indicates that a X509Certificates corresponding private key is used by an authority to sign OCSP-Responses.<br>
* http://www.ietf.org/rfc/rfc3280.txt <br>
* http://tools.ietf.org/pdf/rfc6960.pdf 4.2.2.2<br>
* {iso(1) identified-organization(3) dod(6) internet(1) security(5) mechanisms(5) pkix(7) keyPurpos... | Indicates that a X509Certificates corresponding private key is used by an authority to sign OCSP-Responses. HREF HREF 4.2.2.2 {iso(1) identified-organization(3) dod(6) internet(1) security(5) mechanisms(5) pkix(7) keyPurpose(3) ocspSigning(9)} | isOCSPSigning | {
"repo_name": "zsoltii/dss",
"path": "dss-spi/src/main/java/eu/europa/esig/dss/DSSASN1Utils.java",
"license": "lgpl-2.1",
"size": 33516
} | [
"eu.europa.esig.dss.x509.CertificateToken",
"org.bouncycastle.asn1.x509.KeyPurposeId"
] | import eu.europa.esig.dss.x509.CertificateToken; import org.bouncycastle.asn1.x509.KeyPurposeId; | import eu.europa.esig.dss.x509.*; import org.bouncycastle.asn1.x509.*; | [
"eu.europa.esig",
"org.bouncycastle.asn1"
] | eu.europa.esig; org.bouncycastle.asn1; | 1,018,490 |
private void addRpcString(JavaAttributeInfo javaAttributeInfoOfInput,
JavaAttributeInfo javaAttributeInfoOfOutput, YangPluginConfig pluginConfig,
String rpcName)
throws IOException {
String rpcInput = EMPTY_STRING;
String rpcOutput = VOID;
String rpcInputJ... | void function(JavaAttributeInfo javaAttributeInfoOfInput, JavaAttributeInfo javaAttributeInfoOfOutput, YangPluginConfig pluginConfig, String rpcName) throws IOException { String rpcInput = EMPTY_STRING; String rpcOutput = VOID; String rpcInputJavaDoc = EMPTY_STRING; if (javaAttributeInfoOfInput != null) { rpcInput = ge... | /**
* Adds rpc string information to applicable temp file.
*
* @param javaAttributeInfoOfInput rpc's input node attribute info
* @param javaAttributeInfoOfOutput rpc's output node attribute info
* @param rpcName name of the rpc function
* @param pluginConfig ... | Adds rpc string information to applicable temp file | addRpcString | {
"repo_name": "maheshraju-Huawei/actn",
"path": "utils/yangutils/plugin/src/main/java/org/onosproject/yangutils/translator/tojava/TempJavaServiceFragmentFiles.java",
"license": "apache-2.0",
"size": 30463
} | [
"java.io.IOException",
"org.onosproject.yangutils.translator.tojava.utils.MethodsGenerator",
"org.onosproject.yangutils.utils.io.impl.JavaDocGen",
"org.onosproject.yangutils.utils.io.impl.YangIoUtils",
"org.onosproject.yangutils.utils.io.impl.YangPluginConfig"
] | import java.io.IOException; import org.onosproject.yangutils.translator.tojava.utils.MethodsGenerator; import org.onosproject.yangutils.utils.io.impl.JavaDocGen; import org.onosproject.yangutils.utils.io.impl.YangIoUtils; import org.onosproject.yangutils.utils.io.impl.YangPluginConfig; | import java.io.*; import org.onosproject.yangutils.translator.tojava.utils.*; import org.onosproject.yangutils.utils.io.impl.*; | [
"java.io",
"org.onosproject.yangutils"
] | java.io; org.onosproject.yangutils; | 2,463,381 |
public int removeJournal() {
// loop all items and check if any of them is a journal
Inventory inventory = PlayerConverter.getPlayer(playerID).getInventory();
for (int i = 0; i < inventory.getSize(); i++) {
if (isJournal(inventory.getItem(i))) {
inventory.setItem(... | int function() { Inventory inventory = PlayerConverter.getPlayer(playerID).getInventory(); for (int i = 0; i < inventory.getSize(); i++) { if (isJournal(inventory.getItem(i))) { inventory.setItem(i, new ItemStack(Material.AIR)); return i; } } return -1; } | /**
* Removes journal from player's inventory.
*
* @param playerID
* ID of the player
* @return the slot from which the journal was removed
*/ | Removes journal from player's inventory | removeJournal | {
"repo_name": "adolfotupo/BetonQuest",
"path": "src/main/java/pl/betoncraft/betonquest/core/Journal.java",
"license": "gpl-3.0",
"size": 9280
} | [
"org.bukkit.Material",
"org.bukkit.inventory.Inventory",
"org.bukkit.inventory.ItemStack",
"pl.betoncraft.betonquest.utils.PlayerConverter"
] | import org.bukkit.Material; import org.bukkit.inventory.Inventory; import org.bukkit.inventory.ItemStack; import pl.betoncraft.betonquest.utils.PlayerConverter; | import org.bukkit.*; import org.bukkit.inventory.*; import pl.betoncraft.betonquest.utils.*; | [
"org.bukkit",
"org.bukkit.inventory",
"pl.betoncraft.betonquest"
] | org.bukkit; org.bukkit.inventory; pl.betoncraft.betonquest; | 2,294,263 |
@Override
public Calendar toJavaCalendar() {
return null;
} | Calendar function() { return null; } | /**
* Converts to a Java Calendar.
*/ | Converts to a Java Calendar | toJavaCalendar | {
"repo_name": "CleverCloud/Quercus",
"path": "quercus/src/main/java/com/caucho/quercus/env/NullValue.java",
"license": "gpl-2.0",
"size": 11788
} | [
"java.util.Calendar"
] | import java.util.Calendar; | import java.util.*; | [
"java.util"
] | java.util; | 1,785,001 |
public static void removeProperty(final String key, final Iterable<Element> elements) {
for (final Element element : elements) {
element.removeProperty(key);
}
} | static void function(final String key, final Iterable<Element> elements) { for (final Element element : elements) { element.removeProperty(key); } } | /**
* Remove a property from all elements in the provided iterable.
*
* @param key the property to remove by key
* @param elements the elements to remove the property from
*/ | Remove a property from all elements in the provided iterable | removeProperty | {
"repo_name": "echinopsii/net.echinopsii.3rdparty.blueprints",
"path": "blueprints-core/src/main/java/com/tinkerpop/blueprints/util/ElementHelper.java",
"license": "bsd-3-clause",
"size": 8259
} | [
"com.tinkerpop.blueprints.Element"
] | import com.tinkerpop.blueprints.Element; | import com.tinkerpop.blueprints.*; | [
"com.tinkerpop.blueprints"
] | com.tinkerpop.blueprints; | 274,878 |
public void run(final Document document, final Window win){
//
// If the document is loaded over the network, check that the
// class has permission to access the server
//
ParsedURL docURL = ((SVGOMDocument)document).getParsedURL();
if (docURL != null && docURL.getHo... | void function(final Document document, final Window win){ if (docURL != null && docURL.getHost() != null && !STR:STRSocketPermission accept STRacceptSTRSocketPermission connect STRconnectSTRSocketPermission resolve STRresolve"); } else { permissions = basePermissions; } | /**
* Runs this handler.
* @param document The current document.
* @param win An object which represents the current viewer.
*/ | Runs this handler | run | {
"repo_name": "sflyphotobooks/crp-batik",
"path": "test-resources/org/apache/batik/bridge/JarCheckPermissionsGranted.java",
"license": "apache-2.0",
"size": 12743
} | [
"org.apache.batik.script.Window",
"org.w3c.dom.Document"
] | import org.apache.batik.script.Window; import org.w3c.dom.Document; | import org.apache.batik.script.*; import org.w3c.dom.*; | [
"org.apache.batik",
"org.w3c.dom"
] | org.apache.batik; org.w3c.dom; | 1,943,758 |
public int getAxis()
{
return m_axis;
}
class PredOwner implements ExpressionOwner
{
int m_index;
PredOwner(int index)
{
m_index = index;
}
| int function() { return m_axis; } class PredOwner implements ExpressionOwner { int m_index; PredOwner(int index) { m_index = index; } | /**
* Get the axis that this step follows.
*
*
* @return The Axis for this test, one of of Axes.ANCESTORORSELF, etc.
*/ | Get the axis that this step follows | getAxis | {
"repo_name": "kcsl/immutability-benchmark",
"path": "benchmark-applications/reiminfer-oopsla-2012/source/Xalan/src/org/apache/xpath/patterns/StepPattern.java",
"license": "mit",
"size": 27784
} | [
"org.apache.xpath.ExpressionOwner"
] | import org.apache.xpath.ExpressionOwner; | import org.apache.xpath.*; | [
"org.apache.xpath"
] | org.apache.xpath; | 2,198,249 |
public HttpLogOptions addAllowedHeaderName(final String allowedHeaderName) {
Objects.requireNonNull(allowedHeaderName);
this.allowedHeaderNames.add(allowedHeaderName);
return this;
} | HttpLogOptions function(final String allowedHeaderName) { Objects.requireNonNull(allowedHeaderName); this.allowedHeaderNames.add(allowedHeaderName); return this; } | /**
* Sets the given whitelisted header to the default header set that should be logged.
*
* @param allowedHeaderName The whitelisted header name from the user.
* @return The updated HttpLogOptions object.
* @throws NullPointerException If {@code allowedHeaderName} is {@code null}.
*/ | Sets the given whitelisted header to the default header set that should be logged | addAllowedHeaderName | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/core/azure-core/src/main/java/com/azure/core/http/policy/HttpLogOptions.java",
"license": "mit",
"size": 7372
} | [
"java.util.Objects"
] | import java.util.Objects; | import java.util.*; | [
"java.util"
] | java.util; | 1,601,341 |
public ApplicationDescriptor removeAllPersistenceUnitRef()
{
model.removeChildren("persistence-unit-ref");
return this;
}
// --------------------------------------------------------------------------------------------------------||
// ClassName: ApplicationDescriptor ElementName: javaee:mes... | ApplicationDescriptor function() { model.removeChildren(STR); return this; } | /**
* Removes all <code>persistence-unit-ref</code> elements
* @return the current instance of <code>PersistenceUnitRefType<ApplicationDescriptor></code>
*/ | Removes all <code>persistence-unit-ref</code> elements | removeAllPersistenceUnitRef | {
"repo_name": "forge/javaee-descriptors",
"path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/application6/ApplicationDescriptorImpl.java",
"license": "epl-1.0",
"size": 49252
} | [
"org.jboss.shrinkwrap.descriptor.api.application6.ApplicationDescriptor"
] | import org.jboss.shrinkwrap.descriptor.api.application6.ApplicationDescriptor; | import org.jboss.shrinkwrap.descriptor.api.application6.*; | [
"org.jboss.shrinkwrap"
] | org.jboss.shrinkwrap; | 2,159,825 |
public void removeIdentityFromSecurityGroup(Identity identity, SecurityGroup secGroup); | void function(Identity identity, SecurityGroup secGroup); | /**
* Removes the identity from this security group or does nothing if the identity is not in the group at all.
*
* @param identity
* @param secGroup
*/ | Removes the identity from this security group or does nothing if the identity is not in the group at all | removeIdentityFromSecurityGroup | {
"repo_name": "RLDevOps/Demo",
"path": "src/main/java/org/olat/basesecurity/BaseSecurity.java",
"license": "apache-2.0",
"size": 15856
} | [
"org.olat.core.id.Identity"
] | import org.olat.core.id.Identity; | import org.olat.core.id.*; | [
"org.olat.core"
] | org.olat.core; | 1,289,614 |
public String syncDatabase()
{
MTable table = new MTable(getCtx(), getAD_Table_ID(), get_TrxName());
if (table.isView())
return "Cannot sync view";
table.set_TrxName(get_TrxName()); // otherwise table.getSQLCreate may miss current column
if (table.get_ID() == 0)
throw new AdempiereException("@NotFound... | String function() { MTable table = new MTable(getCtx(), getAD_Table_ID(), get_TrxName()); if (table.isView()) return STR; table.set_TrxName(get_TrxName()); if (table.get_ID() == 0) throw new AdempiereException(STR + getAD_Table_ID()); Connection conn = null; try { conn = DB.getConnectionRO(); DatabaseMetaData md = conn... | /**
* Sync this column with the database
* @return
*/ | Sync this column with the database | syncDatabase | {
"repo_name": "TaymourReda/-https-github.com-adempiere-adempiere",
"path": "base/src/org/compiere/model/MColumn.java",
"license": "gpl-2.0",
"size": 22901
} | [
"java.sql.Connection",
"java.sql.DatabaseMetaData",
"java.sql.SQLException",
"org.adempiere.exceptions.AdempiereException",
"org.compiere.util.DB"
] | import java.sql.Connection; import java.sql.DatabaseMetaData; import java.sql.SQLException; import org.adempiere.exceptions.AdempiereException; import org.compiere.util.DB; | import java.sql.*; import org.adempiere.exceptions.*; import org.compiere.util.*; | [
"java.sql",
"org.adempiere.exceptions",
"org.compiere.util"
] | java.sql; org.adempiere.exceptions; org.compiere.util; | 2,474,769 |
XYPlot getPlot();
| XYPlot getPlot(); | /**
* Returns the plot that this renderer has been assigned to.
*
* @return The plot.
*/ | Returns the plot that this renderer has been assigned to | getPlot | {
"repo_name": "jfree/jfreechart",
"path": "src/main/java/org/jfree/chart/renderer/xy/XYItemRenderer.java",
"license": "lgpl-2.1",
"size": 49520
} | [
"org.jfree.chart.plot.XYPlot"
] | import org.jfree.chart.plot.XYPlot; | import org.jfree.chart.plot.*; | [
"org.jfree.chart"
] | org.jfree.chart; | 1,703,943 |
public JsonObject getDHCPRelayServerResponse(
final IpcDataUnit[] responsePacket, final JsonObject requestBody,
final String getType) {
LOG.trace("Start getDHCPRelayServerResponse");
final JsonObject root = new JsonObject();
JsonArray relayServerArray = null;
LOG.debug("getType: " + getType);
Stri... | JsonObject function( final IpcDataUnit[] responsePacket, final JsonObject requestBody, final String getType) { LOG.trace(STR); final JsonObject root = new JsonObject(); JsonArray relayServerArray = null; LOG.debug(STR + getType); String opType = VtnServiceJsonConsts.NORMAL; if (requestBody.has(VtnServiceJsonConsts.OP))... | /**
* Function to create DHCP Relay Server Response (Show / List) There is no
* key structure
*
* @param responsePacket
* @param requestBody
* @param getType
* @return
*/ | Function to create DHCP Relay Server Response (Show / List) There is no key structure | getDHCPRelayServerResponse | {
"repo_name": "opendaylight/vtn",
"path": "coordinator/java/vtn-javaapi/src/org/opendaylight/vtn/javaapi/ipc/conversion/IpcLogicalResponseFactory.java",
"license": "epl-1.0",
"size": 506141
} | [
"com.google.gson.JsonArray",
"com.google.gson.JsonObject",
"org.opendaylight.vtn.core.ipc.IpcDataUnit",
"org.opendaylight.vtn.core.ipc.IpcStruct",
"org.opendaylight.vtn.javaapi.constants.VtnServiceConsts",
"org.opendaylight.vtn.javaapi.constants.VtnServiceIpcConsts",
"org.opendaylight.vtn.javaapi.consta... | import com.google.gson.JsonArray; import com.google.gson.JsonObject; import org.opendaylight.vtn.core.ipc.IpcDataUnit; import org.opendaylight.vtn.core.ipc.IpcStruct; import org.opendaylight.vtn.javaapi.constants.VtnServiceConsts; import org.opendaylight.vtn.javaapi.constants.VtnServiceIpcConsts; import org.opendayligh... | import com.google.gson.*; import org.opendaylight.vtn.core.ipc.*; import org.opendaylight.vtn.javaapi.constants.*; | [
"com.google.gson",
"org.opendaylight.vtn"
] | com.google.gson; org.opendaylight.vtn; | 1,015,575 |
public List<Prepare.Materialization> query(CalciteSchema rootSchema) {
final List<Prepare.Materialization> list =
new ArrayList<Prepare.Materialization>();
for (MaterializationActor.Materialization materialization
: actor.keyMap.values()) {
if (materialization.rootSchema == rootSchema
... | List<Prepare.Materialization> function(CalciteSchema rootSchema) { final List<Prepare.Materialization> list = new ArrayList<Prepare.Materialization>(); for (MaterializationActor.Materialization materialization : actor.keyMap.values()) { if (materialization.rootSchema == rootSchema && materialization.materializedTable !... | /** Gathers a list of all materialized tables known within a given root
* schema. (Each root schema defines a disconnected namespace, with no overlap
* with the current schema. Especially in a test run, the contents of two
* root schemas may look similar.) */ | Gathers a list of all materialized tables known within a given root schema. (Each root schema defines a disconnected namespace, with no overlap with the current schema. Especially in a test run, the contents of two | query | {
"repo_name": "mehant/incubator-calcite",
"path": "core/src/main/java/org/apache/calcite/materialize/MaterializationService.java",
"license": "apache-2.0",
"size": 14919
} | [
"java.util.ArrayList",
"java.util.List",
"org.apache.calcite.jdbc.CalciteSchema",
"org.apache.calcite.prepare.Prepare"
] | import java.util.ArrayList; import java.util.List; import org.apache.calcite.jdbc.CalciteSchema; import org.apache.calcite.prepare.Prepare; | import java.util.*; import org.apache.calcite.jdbc.*; import org.apache.calcite.prepare.*; | [
"java.util",
"org.apache.calcite"
] | java.util; org.apache.calcite; | 271,785 |
private boolean isPropertyNull(NodeState state, PropertyDefinition pd){
NodeState propertyNode = getPropertyNode(state, pd);
if (!propertyNode.exists()){
return false;
}
return !propertyNode.hasProperty(pd.nonRelativeName);
} | boolean function(NodeState state, PropertyDefinition pd){ NodeState propertyNode = getPropertyNode(state, pd); if (!propertyNode.exists()){ return false; } return !propertyNode.hasProperty(pd.nonRelativeName); } | /**
* Determine if the property as defined by PropertyDefinition exists or not.
*
* <p>For relative property if the intermediate nodes do not exist then property is
* <bold>not</bold> considered to be null</p>
*
* @return true if the property does not exist
*/ | Determine if the property as defined by PropertyDefinition exists or not. For relative property if the intermediate nodes do not exist then property is not considered to be null | isPropertyNull | {
"repo_name": "alexkli/jackrabbit-oak",
"path": "oak-lucene/src/main/java/org/apache/jackrabbit/oak/plugins/index/lucene/LuceneDocumentMaker.java",
"license": "apache-2.0",
"size": 29326
} | [
"org.apache.jackrabbit.oak.spi.state.NodeState"
] | import org.apache.jackrabbit.oak.spi.state.NodeState; | import org.apache.jackrabbit.oak.spi.state.*; | [
"org.apache.jackrabbit"
] | org.apache.jackrabbit; | 2,865,390 |
@Test
public void testEnableLedgerReplication() throws Exception {
isLedgerReplicationDisabled = true;
final LedgerUnderreplicationManager replicaMgr = lmf1
.newLedgerUnderreplicationManager();
// simulate few urLedgers before disabling
final Long ledgerA = 0xfea... | void function() throws Exception { isLedgerReplicationDisabled = true; final LedgerUnderreplicationManager replicaMgr = lmf1 .newLedgerUnderreplicationManager(); final Long ledgerA = 0xfeadeefdacL; final String missingReplica = STR; try { replicaMgr.markLedgerUnderreplicated(ledgerA, missingReplica); } catch (Unavailab... | /**
* Test enabling the ledger re-replication. After enableLedegerReplication,
* should continue getLedgerToRereplicate() task
*/ | Test enabling the ledger re-replication. After enableLedegerReplication, should continue getLedgerToRereplicate() task | testEnableLedgerReplication | {
"repo_name": "ivankelly/bookkeeper",
"path": "bookkeeper-server/src/test/java/org/apache/bookkeeper/replication/TestLedgerUnderreplicationManager.java",
"license": "apache-2.0",
"size": 31224
} | [
"org.apache.bookkeeper.meta.LedgerUnderreplicationManager",
"org.apache.bookkeeper.replication.ReplicationException",
"org.junit.Assert"
] | import org.apache.bookkeeper.meta.LedgerUnderreplicationManager; import org.apache.bookkeeper.replication.ReplicationException; import org.junit.Assert; | import org.apache.bookkeeper.meta.*; import org.apache.bookkeeper.replication.*; import org.junit.*; | [
"org.apache.bookkeeper",
"org.junit"
] | org.apache.bookkeeper; org.junit; | 1,680,529 |
public boolean validateLabel() {
String regEx = "^([-_0-9A-Za-z@.]{1,255})$";
Pattern pattern = Pattern.compile(regEx);
Matcher matcher = pattern.matcher(this.getTree().getLabel());
return matcher.matches();
} | boolean function() { String regEx = STR; Pattern pattern = Pattern.compile(regEx); Matcher matcher = pattern.matcher(this.getTree().getLabel()); return matcher.matches(); } | /**
* Validate the label to make sure:
*
* "The Distribution Label field should contain only letters, numbers, hyphens,
* periods, and underscores. It must also be at least 4 characters long."
*
* @return boolean if its valid or not
*/ | Validate the label to make sure: "The Distribution Label field should contain only letters, numbers, hyphens, periods, and underscores. It must also be at least 4 characters long." | validateLabel | {
"repo_name": "aronparsons/spacewalk",
"path": "java/code/src/com/redhat/rhn/manager/kickstart/tree/BaseTreeEditOperation.java",
"license": "gpl-2.0",
"size": 8768
} | [
"java.util.regex.Matcher",
"java.util.regex.Pattern"
] | import java.util.regex.Matcher; import java.util.regex.Pattern; | import java.util.regex.*; | [
"java.util"
] | java.util; | 1,644,570 |
protected boolean isConnectionHealthy() {
try {
Topic topic = createTopic(getTopicPrefix(getConf()) + "." + HEALTH_CHECK_TOPIC_SUFFIX);
MessageProducer producer = createProducer(topic);
Message msg = session.get().createTextMessage(HEALTH_CHECK_MSG);
producer.send(msg, DeliveryMode.NON_PER... | boolean function() { try { Topic topic = createTopic(getTopicPrefix(getConf()) + "." + HEALTH_CHECK_TOPIC_SUFFIX); MessageProducer producer = createProducer(topic); Message msg = session.get().createTextMessage(HEALTH_CHECK_MSG); producer.send(msg, DeliveryMode.NON_PERSISTENT, 4, 0); } catch (Exception e) { return fals... | /**
* Send a dummy message to probe if the JMS connection is healthy
* @return true if connection is healthy, false otherwise
*/ | Send a dummy message to probe if the JMS connection is healthy | isConnectionHealthy | {
"repo_name": "cschenyuan/hive-hack",
"path": "hcatalog/server-extensions/src/main/java/org/apache/hive/hcatalog/listener/NotificationListener.java",
"license": "apache-2.0",
"size": 19872
} | [
"javax.jms.DeliveryMode",
"javax.jms.Message",
"javax.jms.MessageProducer",
"javax.jms.Topic"
] | import javax.jms.DeliveryMode; import javax.jms.Message; import javax.jms.MessageProducer; import javax.jms.Topic; | import javax.jms.*; | [
"javax.jms"
] | javax.jms; | 1,596,458 |
public void setStiffness(float[] val) {
if ( stiffness == null ) {
stiffness = (MFFloat)getField( "stiffness" );
}
stiffness.setValue( val.length, val );
} | void function(float[] val) { if ( stiffness == null ) { stiffness = (MFFloat)getField( STR ); } stiffness.setValue( val.length, val ); } | /** Set the stiffness field.
* @param val The float[] to set. */ | Set the stiffness field | setStiffness | {
"repo_name": "Norkart/NK-VirtualGlobe",
"path": "Xj3D/src/java/org/xj3d/sai/internal/node/hanim/SAIHAnimJoint.java",
"license": "gpl-2.0",
"size": 12447
} | [
"org.web3d.x3d.sai.MFFloat"
] | import org.web3d.x3d.sai.MFFloat; | import org.web3d.x3d.sai.*; | [
"org.web3d.x3d"
] | org.web3d.x3d; | 2,122,257 |
public void testCloning() {
DefaultStatisticalCategoryDataset d1
= new DefaultStatisticalCategoryDataset();
d1.add(1.1, 2.2, "R1", "C1");
d1.add(3.3, 4.4, "R1", "C2");
d1.add(null, new Double(5.5), "R1", "C3");
d1.add(new Double(6.6), null, "R2", "C3");
... | void function() { DefaultStatisticalCategoryDataset d1 = new DefaultStatisticalCategoryDataset(); d1.add(1.1, 2.2, "R1", "C1"); d1.add(3.3, 4.4, "R1", "C2"); d1.add(null, new Double(5.5), "R1", "C3"); d1.add(new Double(6.6), null, "R2", "C3"); DefaultStatisticalCategoryDataset d2 = null; try { d2 = (DefaultStatisticalC... | /**
* Some checks for cloning.
*/ | Some checks for cloning | testCloning | {
"repo_name": "ilyessou/jfreechart",
"path": "tests/org/jfree/data/statistics/junit/DefaultStatisticalCategoryDatasetTests.java",
"license": "lgpl-2.1",
"size": 10706
} | [
"org.jfree.data.statistics.DefaultStatisticalCategoryDataset"
] | import org.jfree.data.statistics.DefaultStatisticalCategoryDataset; | import org.jfree.data.statistics.*; | [
"org.jfree.data"
] | org.jfree.data; | 451,092 |
@ApiModelProperty(value = "")
public Boolean isPublicUser() {
return publicUser;
} | @ApiModelProperty(value = "") Boolean function() { return publicUser; } | /**
* Get publicUser
* @return publicUser
**/ | Get publicUser | isPublicUser | {
"repo_name": "LogSentinel/logsentinel-java-client",
"path": "src/main/java/com/logsentinel/model/UserDetails.java",
"license": "mit",
"size": 23771
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 2,731,245 |
@Override
public int getPosition() {
try {
if (!playerLock.tryLock(50, TimeUnit.MILLISECONDS)) {
return INVALID_TIME;
}
} catch (InterruptedException e) {
return INVALID_TIME;
}
int retVal = INVALID_TIME;
if (playerStat... | int function() { try { if (!playerLock.tryLock(50, TimeUnit.MILLISECONDS)) { return INVALID_TIME; } } catch (InterruptedException e) { return INVALID_TIME; } int retVal = INVALID_TIME; if (playerStatus.isAtLeast(PlayerStatus.PREPARED)) { retVal = mediaPlayer.getCurrentPosition(); } if (retVal <= 0 && media != null && m... | /**
* Returns the position of the current media object or INVALID_TIME if the position could not be retrieved.
*/ | Returns the position of the current media object or INVALID_TIME if the position could not be retrieved | getPosition | {
"repo_name": "udif/AntennaPod",
"path": "core/src/main/java/de/danoeh/antennapod/core/service/playback/LocalPSMP.java",
"license": "mit",
"size": 36243
} | [
"android.util.Log",
"java.util.concurrent.TimeUnit"
] | import android.util.Log; import java.util.concurrent.TimeUnit; | import android.util.*; import java.util.concurrent.*; | [
"android.util",
"java.util"
] | android.util; java.util; | 2,676,546 |
public void getUsers(Collection<UserEdit> users)
{
for (Iterator<UserEdit> i = users.iterator(); i.hasNext();)
{
UserEdit user = (UserEdit) i.next();
if (!getUser(user))
{
i.remove();
}
}
} | void function(Collection<UserEdit> users) { for (Iterator<UserEdit> i = users.iterator(); i.hasNext();) { UserEdit user = (UserEdit) i.next(); if (!getUser(user)) { i.remove(); } } } | /**
* Access a collection of UserEdit objects; if the user is found, update the information, otherwise remove the UserEdit object from the collection.
*
* @param users
* The UserEdit objects (with id set) to fill in or remove.
*/ | Access a collection of UserEdit objects; if the user is found, update the information, otherwise remove the UserEdit object from the collection | getUsers | {
"repo_name": "OpenCollabZA/sakai",
"path": "providers/sample/src/java/org/sakaiproject/provider/user/SampleUserDirectoryProvider.java",
"license": "apache-2.0",
"size": 16596
} | [
"java.util.Collection",
"java.util.Iterator",
"org.sakaiproject.user.api.UserEdit"
] | import java.util.Collection; import java.util.Iterator; import org.sakaiproject.user.api.UserEdit; | import java.util.*; import org.sakaiproject.user.api.*; | [
"java.util",
"org.sakaiproject.user"
] | java.util; org.sakaiproject.user; | 1,831,381 |
protected void _fireTreeStructureChanged(Object parent)
{
TreeModelEvent event = new TreeModelEvent(this, this.getPath(parent));
for (TreeModelListener listener : this._listeners)
listener.treeStructureChanged(event);
}
| void function(Object parent) { TreeModelEvent event = new TreeModelEvent(this, this.getPath(parent)); for (TreeModelListener listener : this._listeners) listener.treeStructureChanged(event); } | /**
* Fires a 'tree structure change' event for any
* interested listeners.
*
* @param parent The node whose structure has been changed
*/ | Fires a 'tree structure change' event for any interested listeners | _fireTreeStructureChanged | {
"repo_name": "goc9000/UniArchive",
"path": "src/uniarchive/widgets/ArchiveGroupsView.java",
"license": "gpl-3.0",
"size": 55106
} | [
"javax.swing.event.TreeModelEvent",
"javax.swing.event.TreeModelListener"
] | import javax.swing.event.TreeModelEvent; import javax.swing.event.TreeModelListener; | import javax.swing.event.*; | [
"javax.swing"
] | javax.swing; | 502,401 |
public final SecretKey generateSecret(KeySpec keySpec)
throws InvalidKeySpecException
{
return skfSpi.engineGenerateSecret(keySpec);
} | final SecretKey function(KeySpec keySpec) throws InvalidKeySpecException { return skfSpi.engineGenerateSecret(keySpec); } | /**
* Generate a secret key from a key specification, if possible.
*
* @param keySpec The key specification.
* @return The secret key.
* @throws java.security.InvalidKeySpecException If the key specification
* cannot be transformed into a secret key.
*/ | Generate a secret key from a key specification, if possible | generateSecret | {
"repo_name": "taciano-perez/JamVM-PH",
"path": "src/classpath/javax/crypto/SecretKeyFactory.java",
"license": "gpl-2.0",
"size": 8572
} | [
"java.security.spec.InvalidKeySpecException",
"java.security.spec.KeySpec"
] | import java.security.spec.InvalidKeySpecException; import java.security.spec.KeySpec; | import java.security.spec.*; | [
"java.security"
] | java.security; | 2,538,234 |
List<FederationModel> getFederationResultRegistrations(); | List<FederationModel> getFederationResultRegistrations(); | /**
* Returns the list of registration results.
*
* @return the list of registration results
*/ | Returns the list of registration results | getFederationResultRegistrations | {
"repo_name": "culmat/gitblit",
"path": "src/main/java/com/gitblit/manager/IFederationManager.java",
"license": "apache-2.0",
"size": 5259
} | [
"com.gitblit.models.FederationModel",
"java.util.List"
] | import com.gitblit.models.FederationModel; import java.util.List; | import com.gitblit.models.*; import java.util.*; | [
"com.gitblit.models",
"java.util"
] | com.gitblit.models; java.util; | 2,786,659 |
private boolean topGraphsForTopInvocation() {
if (invocationQueue.isEmpty()) {
assert graphQueue.isEmpty();
return true;
}
if (currentInvocation().isRoot()) {
if (!graphQueue.isEmpty()) {
assert graphQueue.size() == 1;
}
... | boolean function() { if (invocationQueue.isEmpty()) { assert graphQueue.isEmpty(); return true; } if (currentInvocation().isRoot()) { if (!graphQueue.isEmpty()) { assert graphQueue.size() == 1; } return true; } final int remainingGraphs = currentInvocation().totalGraphs() - currentInvocation().processedGraphs(); final ... | /**
* Checks an invariant that {@link #moveForward()} must maintain: "the top invocation records
* how many concrete target methods (for it) remain on the {@link #graphQueue}; those targets
* 'belong' to the current invocation in question.
*/ | Checks an invariant that <code>#moveForward()</code> must maintain: "the top invocation records how many concrete target methods (for it) remain on the <code>#graphQueue</code>; those targets 'belong' to the current invocation in question | topGraphsForTopInvocation | {
"repo_name": "smarr/GraalCompiler",
"path": "graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/inlining/walker/InliningData.java",
"license": "gpl-2.0",
"size": 32922
} | [
"com.oracle.graal.phases.common.inlining.info.elem.Inlineable",
"com.oracle.graal.phases.common.inlining.info.elem.InlineableGraph",
"java.util.Iterator"
] | import com.oracle.graal.phases.common.inlining.info.elem.Inlineable; import com.oracle.graal.phases.common.inlining.info.elem.InlineableGraph; import java.util.Iterator; | import com.oracle.graal.phases.common.inlining.info.elem.*; import java.util.*; | [
"com.oracle.graal",
"java.util"
] | com.oracle.graal; java.util; | 878,819 |
protected boolean findAllFrequentPairsForBackwardExtensionCheck(int seqProcessedCount,
SequentialPattern prefix, PseudoSequenceBIDE maximumPeriod, int iPeriod, Map<PairBIDE, PairBIDE> mapPaires, Integer itemI, Integer itemIm1) {
int maxPeriodSize = maximumPeriod.size();
// for each itemset in that p... | boolean function(int seqProcessedCount, SequentialPattern prefix, PseudoSequenceBIDE maximumPeriod, int iPeriod, Map<PairBIDE, PairBIDE> mapPaires, Integer itemI, Integer itemIm1) { int maxPeriodSize = maximumPeriod.size(); for(int i=0; i< maxPeriodSize; i++){ int sizeOfItemsetAtI = maximumPeriod.getSizeOfItemsetAt(i);... | /**
* Method to update the support count of item in a maximum period
* @param prefix the current prefix
* @param mapPaires
* @param maximum periods a maximum period
* @return a set of pairs indicating the support of items (note that a pair distinguish
* between items in a postfix, prefix...)... | Method to update the support count of item in a maximum period | findAllFrequentPairsForBackwardExtensionCheck | {
"repo_name": "pommedeterresautee/spmf",
"path": "ca/pfv/spmf/algorithms/sequentialpatterns/BIDE_and_prefixspan/AlgoMaxSP.java",
"license": "gpl-3.0",
"size": 29486
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 331,484 |
public void endRevision(String uri, String localName, String qName) {
final_revision = new Revision(Integer.parseInt(id), timestamp,
minorChange, currentContributor.getContributor(), comment);
} | void function(String uri, String localName, String qName) { final_revision = new Revision(Integer.parseInt(id), timestamp, minorChange, currentContributor.getContributor(), comment); } | /**
* Called to when an ending revision element is encountered.
*
* @param uri
* The Namespace URI, or the empty string if the element has no
* Namespace URI or if Namespace processing is not being
* performed.
* @param localName
* The... | Called to when an ending revision element is encountered | endRevision | {
"repo_name": "fredrikelinder/scalaris",
"path": "contrib/wikipedia/src/de/zib/scalaris/examples/wikipedia/data/xml/XmlRevision.java",
"license": "apache-2.0",
"size": 9023
} | [
"de.zib.scalaris.examples.wikipedia.data.Revision"
] | import de.zib.scalaris.examples.wikipedia.data.Revision; | import de.zib.scalaris.examples.wikipedia.data.*; | [
"de.zib.scalaris"
] | de.zib.scalaris; | 655,487 |
public LearningActivityTry findByPrimaryKey(long latId)
throws NoSuchLearningActivityTryException, SystemException {
LearningActivityTry learningActivityTry = fetchByPrimaryKey(latId);
if (learningActivityTry == null) {
if (_log.isWarnEnabled()) {
_log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + latId);
... | LearningActivityTry function(long latId) throws NoSuchLearningActivityTryException, SystemException { LearningActivityTry learningActivityTry = fetchByPrimaryKey(latId); if (learningActivityTry == null) { if (_log.isWarnEnabled()) { _log.warn(_NO_SUCH_ENTITY_WITH_PRIMARY_KEY + latId); } throw new NoSuchLearningActivity... | /**
* Returns the learning activity try with the primary key or throws a {@link com.liferay.lms.NoSuchLearningActivityTryException} if it could not be found.
*
* @param latId the primary key of the learning activity try
* @return the learning activity try
* @throws com.liferay.lms.NoSuchLearningActivityTryExc... | Returns the learning activity try with the primary key or throws a <code>com.liferay.lms.NoSuchLearningActivityTryException</code> if it could not be found | findByPrimaryKey | {
"repo_name": "TelefonicaED/liferaylms-portlet",
"path": "docroot/WEB-INF/src/com/liferay/lms/service/persistence/LearningActivityTryPersistenceImpl.java",
"license": "agpl-3.0",
"size": 155464
} | [
"com.liferay.lms.NoSuchLearningActivityTryException",
"com.liferay.lms.model.LearningActivityTry",
"com.liferay.portal.kernel.exception.SystemException"
] | import com.liferay.lms.NoSuchLearningActivityTryException; import com.liferay.lms.model.LearningActivityTry; import com.liferay.portal.kernel.exception.SystemException; | import com.liferay.lms.*; import com.liferay.lms.model.*; import com.liferay.portal.kernel.exception.*; | [
"com.liferay.lms",
"com.liferay.portal"
] | com.liferay.lms; com.liferay.portal; | 544,671 |
@Test
public void testTemplateRunnerLoggedErrorForFile() throws Exception {
DataflowPipelineOptions options = PipelineOptionsFactory.as(DataflowPipelineOptions.class);
options.setJobName("TestJobName");
options.setRunner(DataflowRunner.class);
options.setTemplateLocation("//bad/path");
options.s... | void function() throws Exception { DataflowPipelineOptions options = PipelineOptionsFactory.as(DataflowPipelineOptions.class); options.setJobName(STR); options.setRunner(DataflowRunner.class); options.setTemplateLocation(STRtest-projectSTRCannot create output file at"); thrown.expect(RuntimeException.class); p.run(); } | /**
* Tests that the {@link DataflowRunner} with {@code --templateLocation} throws the appropriate
* exception when an output file is not writable.
*/ | Tests that the <code>DataflowRunner</code> with --templateLocation throws the appropriate exception when an output file is not writable | testTemplateRunnerLoggedErrorForFile | {
"repo_name": "jasonkuster/incubator-beam",
"path": "runners/google-cloud-dataflow-java/src/test/java/org/apache/beam/runners/dataflow/DataflowRunnerTest.java",
"license": "apache-2.0",
"size": 42730
} | [
"org.apache.beam.runners.dataflow.options.DataflowPipelineOptions",
"org.apache.beam.sdk.options.PipelineOptionsFactory"
] | import org.apache.beam.runners.dataflow.options.DataflowPipelineOptions; import org.apache.beam.sdk.options.PipelineOptionsFactory; | import org.apache.beam.runners.dataflow.options.*; import org.apache.beam.sdk.options.*; | [
"org.apache.beam"
] | org.apache.beam; | 2,551,385 |
public Element getXblPreviousElementSibling() {
return xblManager.getXblPreviousElementSibling(this);
} | Element function() { return xblManager.getXblPreviousElementSibling(this); } | /**
* Get the first element that precedes the current node in the
* xblParentNode's xblChildNodes list.
*/ | Get the first element that precedes the current node in the xblParentNode's xblChildNodes list | getXblPreviousElementSibling | {
"repo_name": "adufilie/flex-sdk",
"path": "modules/thirdparty/batik/sources/org/apache/flex/forks/batik/dom/AbstractDocument.java",
"license": "apache-2.0",
"size": 95805
} | [
"org.w3c.dom.Element"
] | import org.w3c.dom.Element; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 1,088,607 |
@ApiModelProperty(value = "")
public String getUrl() {
return url;
} | @ApiModelProperty(value = "") String function() { return url; } | /**
* Get url
* @return url
**/ | Get url | getUrl | {
"repo_name": "cliffano/swaggy-jenkins",
"path": "clients/java-pkmst/generated/src/main/java/com/prokarma/pkmst/model/QueueLeftItem.java",
"license": "mit",
"size": 8540
} | [
"io.swagger.annotations.ApiModelProperty"
] | import io.swagger.annotations.ApiModelProperty; | import io.swagger.annotations.*; | [
"io.swagger.annotations"
] | io.swagger.annotations; | 1,857,348 |
EClass getPassenger(); | EClass getPassenger(); | /**
* Returns the meta object for class '{@link com.paxelerate.model.agent.Passenger <em>Passenger</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Passenger</em>'.
* @see com.paxelerate.model.agent.Passenger
* @generated
*/ | Returns the meta object for class '<code>com.paxelerate.model.agent.Passenger Passenger</code>'. | getPassenger | {
"repo_name": "BauhausLuftfahrt/PAXelerate",
"path": "com.paxelerate.model/src/com/paxelerate/model/agent/AgentPackage.java",
"license": "epl-1.0",
"size": 45860
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 793,562 |
public void testDeserializationSimple() throws Exception {
Object obj =
SerializationTestHelper.deserializeStream(
"witness/serialization/simple.bin");
assertTrue(obj instanceof LoggingEvent);
LoggingEvent event = (LoggingEvent) obj;
assertEquals("Hello, world.", event.getMessage... | void function() throws Exception { Object obj = SerializationTestHelper.deserializeStream( STR); assertTrue(obj instanceof LoggingEvent); LoggingEvent event = (LoggingEvent) obj; assertEquals(STR, event.getMessage()); assertEquals(Level.INFO, event.getLevel()); } | /**
* Deserialize a simple logging event.
* @throws Exception if exception during test.
*
*/ | Deserialize a simple logging event | testDeserializationSimple | {
"repo_name": "umadevik/log4j-android",
"path": "tests/src/java/org/apache/log4j/spi/LoggingEventTest.java",
"license": "apache-2.0",
"size": 8625
} | [
"org.apache.log4j.Level",
"org.apache.log4j.util.SerializationTestHelper"
] | import org.apache.log4j.Level; import org.apache.log4j.util.SerializationTestHelper; | import org.apache.log4j.*; import org.apache.log4j.util.*; | [
"org.apache.log4j"
] | org.apache.log4j; | 354,653 |
@SuppressWarnings("deprecation")
public static void fillVars(TabList tabList) {
NovaPlayer nPlayer = tabList.getPlayer();
Map<VarKey, String> vars = tabList.getVars();
tabList.clear();
//Online players excluding vanished
int onlinePlayersCount = 0;
for(Player player : CompatibilityUtils.getOnlinePlayer... | @SuppressWarnings(STR) static void function(TabList tabList) { NovaPlayer nPlayer = tabList.getPlayer(); Map<VarKey, String> vars = tabList.getVars(); tabList.clear(); int onlinePlayersCount = 0; for(Player player : CompatibilityUtils.getOnlinePlayers()) { if(!plugin.getPlayerManager().isVanished(player)) { onlinePlaye... | /**
* Fills variables in a tablist
*
* @param tabList tablist
*/ | Fills variables in a tablist | fillVars | {
"repo_name": "MarcinWieczorek/NovaGuilds",
"path": "src/main/java/co/marcin/novaguilds/util/TabUtils.java",
"license": "gpl-3.0",
"size": 11118
} | [
"co.marcin.novaguilds.api.basic.ConfigWrapper",
"co.marcin.novaguilds.api.basic.NovaPlayer",
"co.marcin.novaguilds.api.basic.TabList",
"co.marcin.novaguilds.enums.VarKey",
"java.util.Calendar",
"java.util.Date",
"java.util.List",
"java.util.Map",
"org.bukkit.Bukkit",
"org.bukkit.entity.Player"
] | import co.marcin.novaguilds.api.basic.ConfigWrapper; import co.marcin.novaguilds.api.basic.NovaPlayer; import co.marcin.novaguilds.api.basic.TabList; import co.marcin.novaguilds.enums.VarKey; import java.util.Calendar; import java.util.Date; import java.util.List; import java.util.Map; import org.bukkit.Bukkit; import ... | import co.marcin.novaguilds.api.basic.*; import co.marcin.novaguilds.enums.*; import java.util.*; import org.bukkit.*; import org.bukkit.entity.*; | [
"co.marcin.novaguilds",
"java.util",
"org.bukkit",
"org.bukkit.entity"
] | co.marcin.novaguilds; java.util; org.bukkit; org.bukkit.entity; | 317,282 |
@Test
public void testGetThrowable() {
ErrorObject err = new ErrorObject<>(null);
assertFalse(err.isError());
err.setThrowable(new IllegalArgumentException());
assertNotNull(err.getThrowable());
} | void function() { ErrorObject err = new ErrorObject<>(null); assertFalse(err.isError()); err.setThrowable(new IllegalArgumentException()); assertNotNull(err.getThrowable()); } | /**
* Test method for {@link de.braintags.vertx.util.ErrorObject#getThrowable()}.
*/ | Test method for <code>de.braintags.vertx.util.ErrorObject#getThrowable()</code> | testGetThrowable | {
"repo_name": "BraintagsGmbH/vertx-util",
"path": "src/test/java/de/braintags/vertx/util/ErrorObjectTest.java",
"license": "epl-1.0",
"size": 4073
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 71,700 |
@Override
public List<String> getValidationWarnings(OozieJobExecutorConfig config) {
List<String> messages = new ArrayList<String>();
// verify there is a job name
if(StringUtil.isEmpty(config.getJobEntryName())) {
messages.add(BaseMessages.getString(OozieJobExecutorJobEntry.class, "ValidationMes... | List<String> function(OozieJobExecutorConfig config) { List<String> messages = new ArrayList<String>(); if(StringUtil.isEmpty(config.getJobEntryName())) { messages.add(BaseMessages.getString(OozieJobExecutorJobEntry.class, STR)); } if(StringUtil.isEmpty(config.getOozieUrl())) { messages.add(BaseMessages.getString(Oozie... | /**
* Validates the current configuration of the step.
* <p/>
* <strong>To be valid in Quick Setup mode:</strong>
* <ul>
* <li>Name is required</li>
* <li>Oozie URL is required and must be a valid oozie location</li>
* <li>Workflow Properties file path is required and must be a valid job properties... | Validates the current configuration of the step. To be valid in Quick Setup mode: Name is required Oozie URL is required and must be a valid oozie location Workflow Properties file path is required and must be a valid job properties file | getValidationWarnings | {
"repo_name": "mtseu/big-data-plugin",
"path": "src/org/pentaho/di/job/entries/oozie/OozieJobExecutorJobEntry.java",
"license": "apache-2.0",
"size": 11351
} | [
"java.io.IOException",
"java.net.ConnectException",
"java.net.MalformedURLException",
"java.util.ArrayList",
"java.util.List",
"java.util.Properties",
"org.apache.oozie.client.OozieClient",
"org.apache.oozie.client.OozieClientException",
"org.pentaho.di.core.exception.KettleFileException",
"org.pe... | import java.io.IOException; import java.net.ConnectException; import java.net.MalformedURLException; import java.util.ArrayList; import java.util.List; import java.util.Properties; import org.apache.oozie.client.OozieClient; import org.apache.oozie.client.OozieClientException; import org.pentaho.di.core.exception.Kettl... | import java.io.*; import java.net.*; import java.util.*; import org.apache.oozie.client.*; import org.pentaho.di.core.exception.*; import org.pentaho.di.core.util.*; import org.pentaho.di.i18n.*; import org.pentaho.di.job.*; | [
"java.io",
"java.net",
"java.util",
"org.apache.oozie",
"org.pentaho.di"
] | java.io; java.net; java.util; org.apache.oozie; org.pentaho.di; | 2,582,642 |
public AnimationBuilder pivotX(float... pivotX) {
ObjectAnimator.ofFloat(getView(), "pivotX", getValues(pivotX));
return this;
} | AnimationBuilder function(float... pivotX) { ObjectAnimator.ofFloat(getView(), STR, getValues(pivotX)); return this; } | /**
* Rotation x animation builder.
*
* @param pivotX the rotation x
* @return the animation builder
*/ | Rotation x animation builder | pivotX | {
"repo_name": "angcyo/RLibrary",
"path": "github/src/main/java/com/github/florent37/viewanimator/AnimationBuilder.java",
"license": "apache-2.0",
"size": 19185
} | [
"android.animation.ObjectAnimator"
] | import android.animation.ObjectAnimator; | import android.animation.*; | [
"android.animation"
] | android.animation; | 1,512,126 |
static MyToken createTokens(Text renewer)
throws IOException {
Text user1= new Text("user1");
MyDelegationTokenSecretManager sm = new MyDelegationTokenSecretManager(
DFSConfigKeys.DFS_NAMENODE_DELEGATION_KEY_UPDATE_INTERVAL_DEFAULT,
DFSConfigKeys.DFS_NAMENODE_DELEGATION_TOKEN_MAX_LIF... | static MyToken createTokens(Text renewer) throws IOException { Text user1= new Text("user1"); MyDelegationTokenSecretManager sm = new MyDelegationTokenSecretManager( DFSConfigKeys.DFS_NAMENODE_DELEGATION_KEY_UPDATE_INTERVAL_DEFAULT, DFSConfigKeys.DFS_NAMENODE_DELEGATION_TOKEN_MAX_LIFETIME_DEFAULT, DFSConfigKeys.DFS_NAM... | /**
* Auxiliary - create token
* @param renewer
* @return
* @throws IOException
*/ | Auxiliary - create token | createTokens | {
"repo_name": "steveloughran/hadoop",
"path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/security/TestDelegationTokenRenewer.java",
"license": "apache-2.0",
"size": 76016
} | [
"java.io.IOException",
"org.apache.hadoop.hdfs.DFSConfigKeys",
"org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenIdentifier",
"org.apache.hadoop.io.Text"
] | import java.io.IOException; import org.apache.hadoop.hdfs.DFSConfigKeys; import org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenIdentifier; import org.apache.hadoop.io.Text; | import java.io.*; import org.apache.hadoop.hdfs.*; import org.apache.hadoop.hdfs.security.token.delegation.*; import org.apache.hadoop.io.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 984,076 |
@Generated
@Selector("setInputView:")
public native void setInputView(UIView value); | @Selector(STR) native void function(UIView value); | /**
* Presented when object becomes first responder. If set to nil, reverts to following responder chain. If
* set while first responder, will not take effect until reloadInputViews is called.
*/ | Presented when object becomes first responder. If set to nil, reverts to following responder chain. If set while first responder, will not take effect until reloadInputViews is called | setInputView | {
"repo_name": "multi-os-engine/moe-core",
"path": "moe.apple/moe.platform.ios/src/main/java/apple/uikit/UITextField.java",
"license": "apache-2.0",
"size": 46138
} | [
"org.moe.natj.objc.ann.Selector"
] | import org.moe.natj.objc.ann.Selector; | import org.moe.natj.objc.ann.*; | [
"org.moe.natj"
] | org.moe.natj; | 2,335,808 |
public static void initTableSnapshotMapperJob(String snapshotName, Scan scan,
Class<? extends TableMapper> mapper,
Class<?> outputKeyClass,
Class<?> outputValueClass, Job job,
boolean addDependencyJars, Path tmpRestoreDir)
throws IOException {
TableSnapshotInputFormat.setInput(job, snaps... | static void function(String snapshotName, Scan scan, Class<? extends TableMapper> mapper, Class<?> outputKeyClass, Class<?> outputValueClass, Job job, boolean addDependencyJars, Path tmpRestoreDir) throws IOException { TableSnapshotInputFormat.setInput(job, snapshotName, tmpRestoreDir); initTableMapperJob(snapshotName,... | /**
* Sets up the job for reading from a table snapshot. It bypasses hbase servers
* and read directly from snapshot files.
*
* @param snapshotName The name of the snapshot (of a table) to read from.
* @param scan The scan instance with the columns, time range etc.
* @param mapper The mapper class t... | Sets up the job for reading from a table snapshot. It bypasses hbase servers and read directly from snapshot files | initTableSnapshotMapperJob | {
"repo_name": "baishuo/hbase-1.0.0-cdh5.4.7_baishuo",
"path": "hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.java",
"license": "apache-2.0",
"size": 38939
} | [
"com.yammer.metrics.core.MetricsRegistry",
"java.io.IOException",
"org.apache.hadoop.fs.Path",
"org.apache.hadoop.hbase.client.Scan",
"org.apache.hadoop.mapreduce.Job"
] | import com.yammer.metrics.core.MetricsRegistry; import java.io.IOException; import org.apache.hadoop.fs.Path; import org.apache.hadoop.hbase.client.Scan; import org.apache.hadoop.mapreduce.Job; | import com.yammer.metrics.core.*; import java.io.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.mapreduce.*; | [
"com.yammer.metrics",
"java.io",
"org.apache.hadoop"
] | com.yammer.metrics; java.io; org.apache.hadoop; | 2,079,628 |
//noinspection ThrowableInstanceNeverThrown
return new SoySyntaxException(
"Invalid expression in 'switch' command text \"" + getCommandText() + "\".", cause);
} | return new SoySyntaxException( STRSTR\".", cause); } | /**
* Private helper for the constructor.
* @param cause The underlying exception.
* @return The SoySyntaxException to be thrown.
*/ | Private helper for the constructor | createExceptionForInvalidExpr | {
"repo_name": "prop/closure-templates",
"path": "java/src/com/google/template/soy/soytree/SwitchNode.java",
"license": "apache-2.0",
"size": 3153
} | [
"com.google.template.soy.base.SoySyntaxException"
] | import com.google.template.soy.base.SoySyntaxException; | import com.google.template.soy.base.*; | [
"com.google.template"
] | com.google.template; | 2,674,489 |
public void test_clone1() {
SysexMessage message = new SysexMessage();
assertTrue(message.clone() != message);
assertEquals(message.clone().getClass(), message.getClass());
SysexMessage tmessage;
tmessage = (SysexMessage) message.clone();
assertEquals(message.ge... | void function() { SysexMessage message = new SysexMessage(); assertTrue(message.clone() != message); assertEquals(message.clone().getClass(), message.getClass()); SysexMessage tmessage; tmessage = (SysexMessage) message.clone(); assertEquals(message.getLength(), tmessage.getLength()); assertEquals(message.getMessage().... | /**
* Test method clone() of class SysexMessage.
*/ | Test method clone() of class SysexMessage | test_clone1 | {
"repo_name": "skyHALud/codenameone",
"path": "Ports/iOSPort/xmlvm/apache-harmony-6.0-src-r991881/classlib/modules/sound/src/test/java/org/apache/harmony/sound/tests/javax/sound/midi/SysexMessageTest.java",
"license": "gpl-2.0",
"size": 14476
} | [
"javax.sound.midi.SysexMessage"
] | import javax.sound.midi.SysexMessage; | import javax.sound.midi.*; | [
"javax.sound"
] | javax.sound; | 1,270,219 |
public HttpPost createPostMethod(final String path, final Map<String, List<String>> params) {
return new HttpPost(repositoryURL + path + queryString(params));
} | HttpPost function(final String path, final Map<String, List<String>> params) { return new HttpPost(repositoryURL + path + queryString(params)); } | /**
* Create POST method with list of parameters
* @param path Resource path, relative to repository baseURL
* @param params Query parameters
* @return PUT method
**/ | Create POST method with list of parameters | createPostMethod | {
"repo_name": "fcrepo4-labs/fcrepo4-client",
"path": "fcrepo-client-impl/src/main/java/org/fcrepo/client/utils/HttpHelper.java",
"license": "apache-2.0",
"size": 17056
} | [
"java.util.List",
"java.util.Map",
"org.apache.http.client.methods.HttpPost"
] | import java.util.List; import java.util.Map; import org.apache.http.client.methods.HttpPost; | import java.util.*; import org.apache.http.client.methods.*; | [
"java.util",
"org.apache.http"
] | java.util; org.apache.http; | 1,253,103 |
public List<String> buildCommandLine(
PathFragment shExecutable,
String command,
NestedSetBuilder<Artifact> inputs,
String scriptPostFix) {
return buildCommandLine(
shExecutable, command, inputs, scriptPostFix, ImmutableMap.<String, String>of());
} | List<String> function( PathFragment shExecutable, String command, NestedSetBuilder<Artifact> inputs, String scriptPostFix) { return buildCommandLine( shExecutable, command, inputs, scriptPostFix, ImmutableMap.<String, String>of()); } | /**
* Builds the set of command-line arguments. Creates a bash script if the command line is longer
* than the allowed maximum {@link #maxCommandLength}. Fixes up the input artifact list with the
* created bash script when required.
*/ | Builds the set of command-line arguments. Creates a bash script if the command line is longer than the allowed maximum <code>#maxCommandLength</code>. Fixes up the input artifact list with the created bash script when required | buildCommandLine | {
"repo_name": "dropbox/bazel",
"path": "src/main/java/com/google/devtools/build/lib/analysis/CommandHelper.java",
"license": "apache-2.0",
"size": 12930
} | [
"com.google.common.collect.ImmutableMap",
"com.google.devtools.build.lib.actions.Artifact",
"com.google.devtools.build.lib.collect.nestedset.NestedSetBuilder",
"com.google.devtools.build.lib.vfs.PathFragment",
"java.util.List"
] | import com.google.common.collect.ImmutableMap; import com.google.devtools.build.lib.actions.Artifact; import com.google.devtools.build.lib.collect.nestedset.NestedSetBuilder; import com.google.devtools.build.lib.vfs.PathFragment; import java.util.List; | import com.google.common.collect.*; import com.google.devtools.build.lib.actions.*; import com.google.devtools.build.lib.collect.nestedset.*; import com.google.devtools.build.lib.vfs.*; import java.util.*; | [
"com.google.common",
"com.google.devtools",
"java.util"
] | com.google.common; com.google.devtools; java.util; | 1,917,755 |
public void setProfile(Profile profile)
{
this.profile = profile;
} | void function(Profile profile) { this.profile = profile; } | /**
* Set the profile
*
* @param profile
* the profile to set
*/ | Set the profile | setProfile | {
"repo_name": "awph/Corporations",
"path": "src/ch/hearc/corporations/controller/AccountController.java",
"license": "mit",
"size": 6977
} | [
"ch.hearc.corporations.model.Profile"
] | import ch.hearc.corporations.model.Profile; | import ch.hearc.corporations.model.*; | [
"ch.hearc.corporations"
] | ch.hearc.corporations; | 2,701,341 |
@PUT
@Path("session")
@Consumes(MediaType.APPLICATION_FORM_URLENCODED)
@Produces("application/json")
String loginOrRenewSession(@HeaderParam("sessionid") String sessionId, @FormParam("username") String username,
@FormParam("password") String password)
throws SchedulerRestExce... | @Path(STR) @Consumes(MediaType.APPLICATION_FORM_URLENCODED) @Produces(STR) String loginOrRenewSession(@HeaderParam(STR) String sessionId, @FormParam(STR) String username, @FormParam(STR) String password) throws SchedulerRestException, LoginException, NotConnectedRestException; | /**
* Renew the session identified by the given {@code sessionId} if it exists
* or create a new session.
*
* @param username
* username
* @param password
* password
* @param sessionId
* session id identifying a session to renew.
* @retu... | Renew the session identified by the given sessionId if it exists or create a new session | loginOrRenewSession | {
"repo_name": "tobwiens/scheduling",
"path": "rest/rest-api/src/main/java/org/ow2/proactive_grid_cloud_portal/common/SchedulerRestInterface.java",
"license": "agpl-3.0",
"size": 80291
} | [
"javax.security.auth.login.LoginException",
"javax.ws.rs.Consumes",
"javax.ws.rs.FormParam",
"javax.ws.rs.HeaderParam",
"javax.ws.rs.Path",
"javax.ws.rs.Produces",
"javax.ws.rs.core.MediaType",
"org.ow2.proactive_grid_cloud_portal.scheduler.exception.NotConnectedRestException",
"org.ow2.proactive_gr... | import javax.security.auth.login.LoginException; import javax.ws.rs.Consumes; import javax.ws.rs.FormParam; import javax.ws.rs.HeaderParam; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; import org.ow2.proactive_grid_cloud_portal.scheduler.exception.NotConnectedRestException; i... | import javax.security.auth.login.*; import javax.ws.rs.*; import javax.ws.rs.core.*; import org.ow2.proactive_grid_cloud_portal.scheduler.exception.*; | [
"javax.security",
"javax.ws",
"org.ow2.proactive_grid_cloud_portal"
] | javax.security; javax.ws; org.ow2.proactive_grid_cloud_portal; | 443,791 |
private void setButton(
ImageButton b, int text, int drawableId, boolean enabled, int visibility) {
b.setContentDescription(getActivity().getResources().getString(text));
b.setImageResource(drawableId);
b.setVisibility(visibility);
b.setEnabled(enabled);
} | void function( ImageButton b, int text, int drawableId, boolean enabled, int visibility) { b.setContentDescription(getActivity().getResources().getString(text)); b.setImageResource(drawableId); b.setVisibility(visibility); b.setEnabled(enabled); } | /***
* Set a single button with the string and states provided.
* @param b - Button view to update
* @param text - Text in button
* @param enabled - enable/disables the button
* @param visibility - Show/hide the button
*/ | Set a single button with the string and states provided | setButton | {
"repo_name": "alexcpsec/coursera-android-hw",
"path": "Week 1/DevelopmentEnvironment/Misc/DeskClock/src/com/android/deskclock/stopwatch/StopwatchFragment.java",
"license": "mit",
"size": 28992
} | [
"android.widget.ImageButton"
] | import android.widget.ImageButton; | import android.widget.*; | [
"android.widget"
] | android.widget; | 1,169,003 |
public final <C extends Page> Page startPage(Class<C> pageClass, PageParameters parameters)
{
processRequestCycle(pageClass, parameters);
return getLastRenderedPage();
} | final <C extends Page> Page function(Class<C> pageClass, PageParameters parameters) { processRequestCycle(pageClass, parameters); return getLastRenderedPage(); } | /**
* Renders a <code>Page</code> from its default constructor.
*
* @param <C>
*
* @param pageClass
* a test <code>Page</code> class with default constructor
* @param parameters
* the parameters to use for the class.
* @return the rendered <code>Page</code>
*/ | Renders a <code>Page</code> from its default constructor | startPage | {
"repo_name": "Servoy/wicket",
"path": "wicket/src/main/java/org/apache/wicket/util/tester/BaseWicketTester.java",
"license": "apache-2.0",
"size": 48419
} | [
"org.apache.wicket.Page",
"org.apache.wicket.PageParameters"
] | import org.apache.wicket.Page; import org.apache.wicket.PageParameters; | import org.apache.wicket.*; | [
"org.apache.wicket"
] | org.apache.wicket; | 1,739,187 |
public Map<String, List<APICredentialsOrganization>> getApiCredentials() throws ApiException {
return getApiCredentialsWithHttpInfo().getData();
} | Map<String, List<APICredentialsOrganization>> function() throws ApiException { return getApiCredentialsWithHttpInfo().getData(); } | /**
* API credentials per organization from organizations owned by partner
*
* @return Map<String, List<APICredentialsOrganization>>
* @throws ApiException if fails to make API call
*/ | API credentials per organization from organizations owned by partner | getApiCredentials | {
"repo_name": "LogSentinel/logsentinel-java-client",
"path": "src/main/java/com/logsentinel/api/PartnersApi.java",
"license": "mit",
"size": 12210
} | [
"com.logsentinel.ApiException",
"com.logsentinel.model.APICredentialsOrganization",
"java.util.List",
"java.util.Map"
] | import com.logsentinel.ApiException; import com.logsentinel.model.APICredentialsOrganization; import java.util.List; import java.util.Map; | import com.logsentinel.*; import com.logsentinel.model.*; import java.util.*; | [
"com.logsentinel",
"com.logsentinel.model",
"java.util"
] | com.logsentinel; com.logsentinel.model; java.util; | 55,170 |
public void setInt(int parameterIndex, int x) throws SQLException {
setInternal(parameterIndex, String.valueOf(x));
this.parameterTypes[parameterIndex - 1 + getParameterIndexOffset()] = Types.INTEGER;
} | void function(int parameterIndex, int x) throws SQLException { setInternal(parameterIndex, String.valueOf(x)); this.parameterTypes[parameterIndex - 1 + getParameterIndexOffset()] = Types.INTEGER; } | /**
* Set a parameter to a Java int value. The driver converts this to a SQL
* INTEGER value when it sends it to the database.
*
* @param parameterIndex
* the first parameter is 1...
* @param x
* the parameter value
*
* @exception SQLException
* if a database a... | Set a parameter to a Java int value. The driver converts this to a SQL INTEGER value when it sends it to the database | setInt | {
"repo_name": "hdkim0426/forsenior",
"path": "mysql-connector-java-5.1.30/src/com/mysql/jdbc/PreparedStatement.java",
"license": "gpl-2.0",
"size": 165027
} | [
"java.sql.SQLException",
"java.sql.Types"
] | import java.sql.SQLException; import java.sql.Types; | import java.sql.*; | [
"java.sql"
] | java.sql; | 105,723 |
List<CompilerInput> getExternsInOrder() {
return Collections.<CompilerInput>unmodifiableList(externs);
}
public static class IntermediateState implements Serializable {
private static final long serialVersionUID = 1L;
Node externsRoot;
private Node jsRoot;
private List<CompilerInput> exte... | List<CompilerInput> getExternsInOrder() { return Collections.<CompilerInput>unmodifiableList(externs); } public static class IntermediateState implements Serializable { private static final long serialVersionUID = 1L; Node externsRoot; private Node jsRoot; private List<CompilerInput> externs; private List<CompilerInput... | /**
* Gets the externs in the order in which they are being processed.
*/ | Gets the externs in the order in which they are being processed | getExternsInOrder | {
"repo_name": "leapingbrainlabs/closure-compiler",
"path": "src/com/google/javascript/jscomp/Compiler.java",
"license": "apache-2.0",
"size": 77466
} | [
"com.google.javascript.rhino.Node",
"com.google.javascript.rhino.jstype.JSTypeRegistry",
"java.io.Serializable",
"java.util.Collections",
"java.util.List",
"java.util.Map"
] | import com.google.javascript.rhino.Node; import com.google.javascript.rhino.jstype.JSTypeRegistry; import java.io.Serializable; import java.util.Collections; import java.util.List; import java.util.Map; | import com.google.javascript.rhino.*; import com.google.javascript.rhino.jstype.*; import java.io.*; import java.util.*; | [
"com.google.javascript",
"java.io",
"java.util"
] | com.google.javascript; java.io; java.util; | 2,494,744 |
private boolean isLegalComment(final TextBlock comment) {
if (legalComment == null) {
return false;
}
// multi-line comment can not be legal
if (comment.getStartLineNo() != comment.getEndLineNo()) {
return false;
}
String commentText = comment.... | boolean function(final TextBlock comment) { if (legalComment == null) { return false; } if (comment.getStartLineNo() != comment.getEndLineNo()) { return false; } String commentText = comment.getText()[0]; commentText = commentText.substring(2); if (commentText.endsWith("*/")) { commentText = commentText.substring(0, co... | /**
* Checks if given comment is legal (single-line and matches to the
* pattern).
* @param comment comment to check.
* @return true if the comment if legal.
*/ | Checks if given comment is legal (single-line and matches to the pattern) | isLegalComment | {
"repo_name": "naver/checkstyle",
"path": "src/main/java/com/puppycrawl/tools/checkstyle/checks/TrailingCommentCheck.java",
"license": "lgpl-2.1",
"size": 7914
} | [
"com.puppycrawl.tools.checkstyle.api.TextBlock"
] | import com.puppycrawl.tools.checkstyle.api.TextBlock; | import com.puppycrawl.tools.checkstyle.api.*; | [
"com.puppycrawl.tools"
] | com.puppycrawl.tools; | 1,328,943 |
private boolean updateCachedSettings() {
synchronized (mLock) {
boolean oldChromeSyncEnabled = mChromeSyncEnabled;
boolean oldMasterSyncEnabled = mMasterSyncEnabled;
StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskWrites();
if (mAccount != null)... | boolean function() { synchronized (mLock) { boolean oldChromeSyncEnabled = mChromeSyncEnabled; boolean oldMasterSyncEnabled = mMasterSyncEnabled; StrictMode.ThreadPolicy oldPolicy = StrictMode.allowThreadDiskWrites(); if (mAccount != null) { mIsSyncable = mSyncContentResolverDelegate.getIsSyncable(mAccount, mContractAu... | /**
* Update the three cached settings from the content resolver.
*
* @return Whether either chromeSyncEnabled or masterSyncEnabled changed.
*/ | Update the three cached settings from the content resolver | updateCachedSettings | {
"repo_name": "endlessm/chromium-browser",
"path": "components/sync/android/java/src/org/chromium/components/sync/AndroidSyncSettings.java",
"license": "bsd-3-clause",
"size": 11920
} | [
"android.os.StrictMode"
] | import android.os.StrictMode; | import android.os.*; | [
"android.os"
] | android.os; | 629,740 |
public static <T> Set<T> convertDtoSet(Collection<? extends ToDto<T>> toDtoSet) {
Set<T> set = Collections.emptySet();
if (toDtoSet != null && !toDtoSet.isEmpty()) {
set = new HashSet<>();
for (ToDto<T> object : toDtoSet) {
set.add(object.toDto());
... | static <T> Set<T> function(Collection<? extends ToDto<T>> toDtoSet) { Set<T> set = Collections.emptySet(); if (toDtoSet != null && !toDtoSet.isEmpty()) { set = new HashSet<>(); for (ToDto<T> object : toDtoSet) { set.add(object.toDto()); } } return set; } | /**
* This method convert list of model objects to dto objects.
*
* @param <T> Type of model object
* @param toDtoSet List of model objects.
* @return List of converted objects.
*/ | This method convert list of model objects to dto objects | convertDtoSet | {
"repo_name": "Deepnekroz/kaa",
"path": "server/common/dao/src/main/java/org/kaaproject/kaa/server/common/dao/impl/DaoUtil.java",
"license": "apache-2.0",
"size": 4978
} | [
"java.util.Collection",
"java.util.Collections",
"java.util.HashSet",
"java.util.Set",
"org.kaaproject.kaa.server.common.dao.model.ToDto"
] | import java.util.Collection; import java.util.Collections; import java.util.HashSet; import java.util.Set; import org.kaaproject.kaa.server.common.dao.model.ToDto; | import java.util.*; import org.kaaproject.kaa.server.common.dao.model.*; | [
"java.util",
"org.kaaproject.kaa"
] | java.util; org.kaaproject.kaa; | 171,764 |
public static synchronized void restrictToFipsIfEmpty() throws GeneralSecurityException {
if (keyManagerMap.isEmpty()) {
TinkFipsUtil.setFipsRestricted();
return;
}
throw new GeneralSecurityException("Could not enable FIPS mode as Registry is not empty.");
}
private Registry() {} | static synchronized void function() throws GeneralSecurityException { if (keyManagerMap.isEmpty()) { TinkFipsUtil.setFipsRestricted(); return; } throw new GeneralSecurityException(STR); } private Registry() {} | /**
* Tries to enable the FIPS restrictions if the Registry is empty.
*
* @throws GeneralSecurityException if any key manager has already been registered.
*/ | Tries to enable the FIPS restrictions if the Registry is empty | restrictToFipsIfEmpty | {
"repo_name": "google/tink",
"path": "java_src/src/main/java/com/google/crypto/tink/Registry.java",
"license": "apache-2.0",
"size": 48234
} | [
"com.google.crypto.tink.config.internal.TinkFipsUtil",
"java.security.GeneralSecurityException"
] | import com.google.crypto.tink.config.internal.TinkFipsUtil; import java.security.GeneralSecurityException; | import com.google.crypto.tink.config.internal.*; import java.security.*; | [
"com.google.crypto",
"java.security"
] | com.google.crypto; java.security; | 2,688,764 |
// TODO return an empty list if there are none?
public List<String> getFilters()
{
List<String> names = null;
COSBase filters = parameters.getDictionaryObject(COSName.F, COSName.FILTER);
if (filters instanceof COSName)
{
COSName name = (COSName) filters;
... | List<String> function() { List<String> names = null; COSBase filters = parameters.getDictionaryObject(COSName.F, COSName.FILTER); if (filters instanceof COSName) { COSName name = (COSName) filters; names = new COSArrayList<String>(name.getName(), name, parameters, COSName.FILTER); } else if (filters instanceof COSArray... | /**
* Returns a list of filters applied to this stream, or null if there are none.
*
* @return a list of filters applied to this stream
*/ | Returns a list of filters applied to this stream, or null if there are none | getFilters | {
"repo_name": "TomRoush/PdfBox-Android",
"path": "library/src/main/java/com/tom_roush/pdfbox/pdmodel/graphics/image/PDInlineImage.java",
"license": "apache-2.0",
"size": 11568
} | [
"com.tom_roush.pdfbox.cos.COSArray",
"com.tom_roush.pdfbox.cos.COSBase",
"com.tom_roush.pdfbox.cos.COSName",
"com.tom_roush.pdfbox.pdmodel.common.COSArrayList",
"java.util.List"
] | import com.tom_roush.pdfbox.cos.COSArray; import com.tom_roush.pdfbox.cos.COSBase; import com.tom_roush.pdfbox.cos.COSName; import com.tom_roush.pdfbox.pdmodel.common.COSArrayList; import java.util.List; | import com.tom_roush.pdfbox.cos.*; import com.tom_roush.pdfbox.pdmodel.common.*; import java.util.*; | [
"com.tom_roush.pdfbox",
"java.util"
] | com.tom_roush.pdfbox; java.util; | 523,377 |
public boolean deleteDevice(long deviceId) {
int numEvents = deleteEvents(deviceId);
if (DEBUG) Logger.d(TAG, "delete device with id " + deviceId + ": " + numEvents + " associated events removed");
return mDb.delete(DEVICE_TABLE_NAME, KEY_DEVICE_ID + "=" + deviceId, null) > 0;
}
| boolean function(long deviceId) { int numEvents = deleteEvents(deviceId); if (DEBUG) Logger.d(TAG, STR + deviceId + STR + numEvents + STR); return mDb.delete(DEVICE_TABLE_NAME, KEY_DEVICE_ID + "=" + deviceId, null) > 0; } | /**
* Delete the device with the given rowId
*
* @param rowId id of device to delete
* @return true if deleted, false otherwise
*/ | Delete the device with the given rowId | deleteDevice | {
"repo_name": "yujiaao/amarino",
"path": "amarino/src/at/abraxas/amarino/AmarinoDbAdapter.java",
"license": "gpl-3.0",
"size": 14143
} | [
"at.abraxas.amarino.log.Logger"
] | import at.abraxas.amarino.log.Logger; | import at.abraxas.amarino.log.*; | [
"at.abraxas.amarino"
] | at.abraxas.amarino; | 982,869 |
public ResourceFinderResult findChildResources(AttributeValue parentResourceId) {
Iterator it = childModules.iterator();
while (it.hasNext()) {
ResourceFinderModule module = (ResourceFinderModule) (it.next());
// ask the module to find the resources
ResourceFind... | ResourceFinderResult function(AttributeValue parentResourceId) { Iterator it = childModules.iterator(); while (it.hasNext()) { ResourceFinderModule module = (ResourceFinderModule) (it.next()); ResourceFinderResult result = module.findChildResources(parentResourceId); if (!result.isEmpty()) return result; } logger.info(... | /**
* Finds Resource Ids using the Children scope, and returns all resolved identifiers as well as
* any errors that occurred. If no modules can handle the given Resource Id, then an empty
* result is returned.
*
* @deprecated As of version 1.2, replaced by
* {@link #findChild... | Finds Resource Ids using the Children scope, and returns all resolved identifiers as well as any errors that occurred. If no modules can handle the given Resource Id, then an empty result is returned | findChildResources | {
"repo_name": "shaundmorris/arbitro",
"path": "modules/arbitro-core/src/main/java/com/connexta/arbitro/finder/ResourceFinder.java",
"license": "apache-2.0",
"size": 11021
} | [
"com.connexta.arbitro.attr.AttributeValue",
"java.util.Iterator"
] | import com.connexta.arbitro.attr.AttributeValue; import java.util.Iterator; | import com.connexta.arbitro.attr.*; import java.util.*; | [
"com.connexta.arbitro",
"java.util"
] | com.connexta.arbitro; java.util; | 958,646 |
public void setFirewallPortForwardingConfiguration(List<FirewallPortForwardConfigIP<? extends IPAddress>> firewallConfiguration) throws KuraException; | void function(List<FirewallPortForwardConfigIP<? extends IPAddress>> firewallConfiguration) throws KuraException; | /**
* Sets the 'port forwarding' portion of the firewall configuration
*
* @param firewallConfiguration A list of FirewallPortForwardConfigIP Objects representing the configuration to set
* @throws KuraException
*/ | Sets the 'port forwarding' portion of the firewall configuration | setFirewallPortForwardingConfiguration | {
"repo_name": "mhddurrah/kura",
"path": "kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/net/NetworkAdminService.java",
"license": "epl-1.0",
"size": 6751
} | [
"java.util.List",
"org.eclipse.kura.KuraException",
"org.eclipse.kura.net.firewall.FirewallPortForwardConfigIP"
] | import java.util.List; import org.eclipse.kura.KuraException; import org.eclipse.kura.net.firewall.FirewallPortForwardConfigIP; | import java.util.*; import org.eclipse.kura.*; import org.eclipse.kura.net.firewall.*; | [
"java.util",
"org.eclipse.kura"
] | java.util; org.eclipse.kura; | 1,518,253 |
public java.util.List<fr.lip6.move.pnml.hlpn.terms.hlapi.UserOperatorHLAPI> getSubterm_terms_UserOperatorHLAPI(){
java.util.List<fr.lip6.move.pnml.hlpn.terms.hlapi.UserOperatorHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.terms.hlapi.UserOperatorHLAPI>();
for (Term elemnt : getSubterm()) {
if(elem... | java.util.List<fr.lip6.move.pnml.hlpn.terms.hlapi.UserOperatorHLAPI> function(){ java.util.List<fr.lip6.move.pnml.hlpn.terms.hlapi.UserOperatorHLAPI> retour = new ArrayList<fr.lip6.move.pnml.hlpn.terms.hlapi.UserOperatorHLAPI>(); for (Term elemnt : getSubterm()) { if(elemnt.getClass().equals(fr.lip6.move.pnml.hlpn.term... | /**
* This accessor return a list of encapsulated subelement, only of UserOperatorHLAPI kind.
* WARNING : this method can creates a lot of new object in memory.
*/ | This accessor return a list of encapsulated subelement, only of UserOperatorHLAPI kind. WARNING : this method can creates a lot of new object in memory | getSubterm_terms_UserOperatorHLAPI | {
"repo_name": "lhillah/pnmlframework",
"path": "pnmlFw-HLPN/src/fr/lip6/move/pnml/hlpn/lists/hlapi/LengthHLAPI.java",
"license": "epl-1.0",
"size": 108262
} | [
"fr.lip6.move.pnml.hlpn.terms.Term",
"java.util.ArrayList",
"java.util.List"
] | import fr.lip6.move.pnml.hlpn.terms.Term; import java.util.ArrayList; import java.util.List; | import fr.lip6.move.pnml.hlpn.terms.*; import java.util.*; | [
"fr.lip6.move",
"java.util"
] | fr.lip6.move; java.util; | 379,278 |
public void init(final GeneralConfig mainConfig) {
try {
this.dateSourcePollingThread.init(mainConfig);
this.mappingFactory.init(mainConfig);
this.regExHolder = new RegExHolder(mainConfig.regexComponentConfigPath());
this.messageSender.init(mainConfig);
} catch (MessageSenderException e) {
logger... | void function(final GeneralConfig mainConfig) { try { this.dateSourcePollingThread.init(mainConfig); this.mappingFactory.init(mainConfig); this.regExHolder = new RegExHolder(mainConfig.regexComponentConfigPath()); this.messageSender.init(mainConfig); } catch (MessageSenderException e) { logger.error(STR, e); IfMapClien... | /**
* initialize components from passed in Config-Object
*
* @param mainConfig
* the main Configuration-Object
*/ | initialize components from passed in Config-Object | init | {
"repo_name": "decoit/decomap",
"path": "src/main/java/de/simu/decomap/component/DataSourceComponent.java",
"license": "apache-2.0",
"size": 4887
} | [
"de.simu.decomap.config.interfaces.GeneralConfig",
"de.simu.decomap.config.regex.RegExHolder",
"de.simu.decomap.main.IfMapClient",
"de.simu.decomap.messaging.sender.MessageSenderException"
] | import de.simu.decomap.config.interfaces.GeneralConfig; import de.simu.decomap.config.regex.RegExHolder; import de.simu.decomap.main.IfMapClient; import de.simu.decomap.messaging.sender.MessageSenderException; | import de.simu.decomap.config.interfaces.*; import de.simu.decomap.config.regex.*; import de.simu.decomap.main.*; import de.simu.decomap.messaging.sender.*; | [
"de.simu.decomap"
] | de.simu.decomap; | 364,938 |
public static ColorUIResource getTextHighlightColor()
{
if (theme != null)
return theme.getTextHighlightColor();
return null;
} | static ColorUIResource function() { if (theme != null) return theme.getTextHighlightColor(); return null; } | /**
* Returns the color used to highlight text, from the installed theme.
*
* @return The color used to highlight text.
*/ | Returns the color used to highlight text, from the installed theme | getTextHighlightColor | {
"repo_name": "ivmai/JCGO",
"path": "goclsp/clsp_fix/javax/swing/plaf/metal/MetalLookAndFeel.java",
"license": "gpl-2.0",
"size": 48610
} | [
"javax.swing.plaf.ColorUIResource"
] | import javax.swing.plaf.ColorUIResource; | import javax.swing.plaf.*; | [
"javax.swing"
] | javax.swing; | 379,457 |
protected void assertErrorCountEquals(String errorMessage, ReportDto report, int errorCount) {
if (errorCount != report.getErrorCount()) {
String error = errorMessage + " Expected: <" + errorCount + "> but was <" + report.getErrorCount() + ">";
error += "\n Report details : \n" + ... | void function(String errorMessage, ReportDto report, int errorCount) { if (errorCount != report.getErrorCount()) { String error = errorMessage + STR + errorCount + STR + report.getErrorCount() + ">"; error += STR + report; Assert.fail(error); } } | /**
* Test the error count into report.
* @param errorMessage the error message
* @param report the report to test.
* @param errorCount the error count.
*/ | Test the error count into report | assertErrorCountEquals | {
"repo_name": "aguillem/festival-manager",
"path": "festival-manager-core/src/test/java/com/aguillem/festival/manager/core/test/util/BaseTestCase.java",
"license": "gpl-3.0",
"size": 5403
} | [
"org.junit.Assert",
"org.scub.foundation.framework.base.dto.report.ReportDto"
] | import org.junit.Assert; import org.scub.foundation.framework.base.dto.report.ReportDto; | import org.junit.*; import org.scub.foundation.framework.base.dto.report.*; | [
"org.junit",
"org.scub.foundation"
] | org.junit; org.scub.foundation; | 2,508,583 |
public void draw(DrawingPanel panel, Graphics g) {
if (!visible) {
return;
}
if(dirtyImage){
image = Toolkit.getDefaultToolkit().createImage(imageSource);
}
if (image == null) {
panel.setMessage(DisplayRes.getString("Null Image")); //$NON-NLS-1$
return;
}
Graphics2D g2 = (Graphics2D) g;
... | void function(DrawingPanel panel, Graphics g) { if (!visible) { return; } if(dirtyImage){ image = Toolkit.getDefaultToolkit().createImage(imageSource); } if (image == null) { panel.setMessage(DisplayRes.getString(STR)); return; } Graphics2D g2 = (Graphics2D) g; AffineTransform gat = g2.getTransform(); RenderingHints hi... | /**
* Draws the image and the grid.
*
* @param panel
* @param g
*/ | Draws the image and the grid | draw | {
"repo_name": "dobrown/tracker-mvn",
"path": "src/main/java/org/opensourcephysics/display/IntegerImage.java",
"license": "gpl-3.0",
"size": 10665
} | [
"java.awt.Graphics",
"java.awt.Graphics2D",
"java.awt.RenderingHints",
"java.awt.Toolkit",
"java.awt.geom.AffineTransform",
"org.opensourcephysics.display.DisplayRes",
"org.opensourcephysics.display.DrawingPanel",
"org.opensourcephysics.display.OSPRuntime"
] | import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.RenderingHints; import java.awt.Toolkit; import java.awt.geom.AffineTransform; import org.opensourcephysics.display.DisplayRes; import org.opensourcephysics.display.DrawingPanel; import org.opensourcephysics.display.OSPRuntime; | import java.awt.*; import java.awt.geom.*; import org.opensourcephysics.display.*; | [
"java.awt",
"org.opensourcephysics.display"
] | java.awt; org.opensourcephysics.display; | 2,629,118 |
public final String toString() {
StringBuffer text = new StringBuffer();
text.append(ARFF_ATTRIBUTE).append(" ").append(Utils.quote(m_Name)).append(" ");
switch (m_Type) {
case NOMINAL:
text.append('{');
Enumeration enu = enumerateValues();
while (enu.hasMoreElements()) {
... | final String function() { StringBuffer text = new StringBuffer(); text.append(ARFF_ATTRIBUTE).append(" ").append(Utils.quote(m_Name)).append(" "); switch (m_Type) { case NOMINAL: text.append('{'); Enumeration enu = enumerateValues(); while (enu.hasMoreElements()) { text.append(Utils.quote((String) enu.nextElement())); ... | /**
* Returns a description of this attribute in ARFF format. Quotes
* strings if they contain whitespace characters, or if they
* are a question mark.
*
* @return a description of this attribute as a string
*/ | Returns a description of this attribute in ARFF format. Quotes strings if they contain whitespace characters, or if they are a question mark | toString | {
"repo_name": "williamClanton/singularity",
"path": "weka/src/main/java/weka/core/Attribute.java",
"license": "mit",
"size": 51065
} | [
"java.util.Enumeration"
] | import java.util.Enumeration; | import java.util.*; | [
"java.util"
] | java.util; | 1,630,175 |
public static List<LimitOrder> createOrders(CurrencyPair currencyPair, Order.OrderType orderType, BigDecimal[][] orders) {
List<LimitOrder> limitOrders = new ArrayList<LimitOrder>();
for (BigDecimal[] order : orders) {
limitOrders.add(createOrder(currencyPair, order, orderType, null, null));
}
... | static List<LimitOrder> function(CurrencyPair currencyPair, Order.OrderType orderType, BigDecimal[][] orders) { List<LimitOrder> limitOrders = new ArrayList<LimitOrder>(); for (BigDecimal[] order : orders) { limitOrders.add(createOrder(currencyPair, order, orderType, null, null)); } return limitOrders; } | /**
* Create a list of orders from a list of asks or bids.
*/ | Create a list of orders from a list of asks or bids | createOrders | {
"repo_name": "stevenuray/XChange",
"path": "xchange-bitcoinde/src/main/java/org/knowm/xchange/bitcoinde/BitcoindeAdapters.java",
"license": "mit",
"size": 3732
} | [
"java.math.BigDecimal",
"java.util.ArrayList",
"java.util.List",
"org.knowm.xchange.currency.CurrencyPair",
"org.knowm.xchange.dto.Order",
"org.knowm.xchange.dto.trade.LimitOrder"
] | import java.math.BigDecimal; import java.util.ArrayList; import java.util.List; import org.knowm.xchange.currency.CurrencyPair; import org.knowm.xchange.dto.Order; import org.knowm.xchange.dto.trade.LimitOrder; | import java.math.*; import java.util.*; import org.knowm.xchange.currency.*; import org.knowm.xchange.dto.*; import org.knowm.xchange.dto.trade.*; | [
"java.math",
"java.util",
"org.knowm.xchange"
] | java.math; java.util; org.knowm.xchange; | 519,787 |
public TargetsRpcService getTargetService() {
return _targetService;
} | TargetsRpcService function() { return _targetService; } | /**
* Gets the target service.
*
* @return the target service
*/ | Gets the target service | getTargetService | {
"repo_name": "Governance/dtgov",
"path": "dtgov-ui-war/src/main/java/org/overlord/dtgov/ui/client/local/pages/TargetPage.java",
"license": "apache-2.0",
"size": 23891
} | [
"org.overlord.dtgov.ui.client.local.services.TargetsRpcService"
] | import org.overlord.dtgov.ui.client.local.services.TargetsRpcService; | import org.overlord.dtgov.ui.client.local.services.*; | [
"org.overlord.dtgov"
] | org.overlord.dtgov; | 2,912,497 |
public void setExpression(Expression expression) {
this.expression = expression;
}
/**
* Returns {@link ModelKind#RETURN_STATEMENT} which represents this element kind.
* @return {@link ModelKind#RETURN_STATEMENT} | void function(Expression expression) { this.expression = expression; } /** * Returns {@link ModelKind#RETURN_STATEMENT} which represents this element kind. * @return {@link ModelKind#RETURN_STATEMENT} | /**
* Sets the return value.
* @param expression the return value, or {@code null} if it is not specified
*/ | Sets the return value | setExpression | {
"repo_name": "akirakw/asakusafw",
"path": "utils-project/java-dom/src/main/java/com/asakusafw/utils/java/internal/model/syntax/ReturnStatementImpl.java",
"license": "apache-2.0",
"size": 1889
} | [
"com.asakusafw.utils.java.model.syntax.Expression",
"com.asakusafw.utils.java.model.syntax.ModelKind"
] | import com.asakusafw.utils.java.model.syntax.Expression; import com.asakusafw.utils.java.model.syntax.ModelKind; | import com.asakusafw.utils.java.model.syntax.*; | [
"com.asakusafw.utils"
] | com.asakusafw.utils; | 1,830,646 |
public Node setNamedItemNS(Node arg)
throws DOMException {
boolean errCheck = ownerNode.ownerDocument().errorChecking;
if (errCheck) {
if (isReadOnly()) {
String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NO_MODIFICATION_ALLOWED_ERR", nu... | Node function(Node arg) throws DOMException { boolean errCheck = ownerNode.ownerDocument().errorChecking; if (errCheck) { if (isReadOnly()) { String msg = DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, STR, null); throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR, msg); } if(arg.getOwne... | /**
* Adds an attribute using its namespaceURI and localName.
* @see org.w3c.dom.NamedNodeMap#setNamedItem
* @return If the new Node replaces an existing node the replaced Node is
* returned, otherwise null is returned.
* @param arg A node to store in a named node map.
*/ | Adds an attribute using its namespaceURI and localName | setNamedItemNS | {
"repo_name": "haikuowuya/android_system_code",
"path": "src/com/sun/org/apache/xerces/internal/dom/AttributeMap.java",
"license": "apache-2.0",
"size": 22222
} | [
"java.util.ArrayList",
"org.w3c.dom.DOMException",
"org.w3c.dom.Node"
] | import java.util.ArrayList; import org.w3c.dom.DOMException; import org.w3c.dom.Node; | import java.util.*; import org.w3c.dom.*; | [
"java.util",
"org.w3c.dom"
] | java.util; org.w3c.dom; | 1,267,114 |
@Override
public String getIndexName(Event event) {
TimestampedEvent timestampedEvent = new TimestampedEvent(event);
long timestamp = timestampedEvent.getTimestamp();
String realIndexPrefix = BucketPath.escapeString(indexPrefix, event.getHeaders());
return new StringBuilder(realIndexPrefix).append('... | String function(Event event) { TimestampedEvent timestampedEvent = new TimestampedEvent(event); long timestamp = timestampedEvent.getTimestamp(); String realIndexPrefix = BucketPath.escapeString(indexPrefix, event.getHeaders()); return new StringBuilder(realIndexPrefix).append('-') .append(fastDateFormat.format(timesta... | /**
* Gets the name of the index to use for an index request
* @param event
* Event for which the name of index has to be prepared
* @return index name of the form 'indexPrefix-formattedTimestamp'
*/ | Gets the name of the index to use for an index request | getIndexName | {
"repo_name": "lucidfrontier45/ElasticsearchSink2",
"path": "src/main/java/com/frontier45/flume/sink/elasticsearch2/TimeBasedIndexNameBuilder.java",
"license": "apache-2.0",
"size": 3318
} | [
"org.apache.flume.Event",
"org.apache.flume.formatter.output.BucketPath"
] | import org.apache.flume.Event; import org.apache.flume.formatter.output.BucketPath; | import org.apache.flume.*; import org.apache.flume.formatter.output.*; | [
"org.apache.flume"
] | org.apache.flume; | 1,363,825 |
private static String getExecutionTime(final long start, final long end) {
NumberFormat formatter = new DecimalFormat("#.000");
long millis = end - start;
long minutes = TimeUnit.MILLISECONDS.toMinutes(millis);
String seconds = formatter.format(millis / 1000d);
String executionTime;
if (minutes > 0) {
... | static String function(final long start, final long end) { NumberFormat formatter = new DecimalFormat("#.000"); long millis = end - start; long minutes = TimeUnit.MILLISECONDS.toMinutes(millis); String seconds = formatter.format(millis / 1000d); String executionTime; if (minutes > 0) { executionTime = String.format(STR... | /**
* get Formatted Execution Time for printing
*
* @param start
* @param end
* @return
*/ | get Formatted Execution Time for printing | getExecutionTime | {
"repo_name": "testobject/testobject-gradle-plugin",
"path": "src/main/java/org/testobject/gradle/TestObjectTestServer.java",
"license": "apache-2.0",
"size": 10155
} | [
"java.text.DecimalFormat",
"java.text.NumberFormat",
"java.util.concurrent.TimeUnit"
] | import java.text.DecimalFormat; import java.text.NumberFormat; import java.util.concurrent.TimeUnit; | import java.text.*; import java.util.concurrent.*; | [
"java.text",
"java.util"
] | java.text; java.util; | 471,616 |
public static boolean isInClassPath(URL location) throws MalformedURLException {
String classPath = getClassPath();
StringTokenizer st = new StringTokenizer(classPath, File.pathSeparator);
while (st.hasMoreTokens()) {
String path = st.nextToken();
if (location.equals(new File(path).toURI().toU... | static boolean function(URL location) throws MalformedURLException { String classPath = getClassPath(); StringTokenizer st = new StringTokenizer(classPath, File.pathSeparator); while (st.hasMoreTokens()) { String path = st.nextToken(); if (location.equals(new File(path).toURI().toURL())) { return true; } } return false... | /**
* Returns true if the specified location is in the JVM classpath. This may ignore additions to
* the classpath that are not reflected by the value in
* {@code System.getProperty("java.class.path")}.
*
* @param location the directory or jar URL to test for
* @return true if location is in the JVM ... | Returns true if the specified location is in the JVM classpath. This may ignore additions to the classpath that are not reflected by the value in System.getProperty("java.class.path") | isInClassPath | {
"repo_name": "pivotal-amurmann/geode",
"path": "geode-core/src/main/java/org/apache/geode/internal/lang/SystemUtils.java",
"license": "apache-2.0",
"size": 10966
} | [
"java.io.File",
"java.net.MalformedURLException",
"java.util.StringTokenizer"
] | import java.io.File; import java.net.MalformedURLException; import java.util.StringTokenizer; | import java.io.*; import java.net.*; import java.util.*; | [
"java.io",
"java.net",
"java.util"
] | java.io; java.net; java.util; | 484,077 |
public void removeActionListener(final ActionListener a) {
actionListener.remove(a);
} | void function(final ActionListener a) { actionListener.remove(a); } | /**
* DOCUMENT ME!
*
* @param a DOCUMENT ME!
*/ | DOCUMENT ME | removeActionListener | {
"repo_name": "cismet/cismap-commons",
"path": "src/main/java/de/cismet/cismap/commons/wfsforms/AbstractWFSForm.java",
"license": "lgpl-3.0",
"size": 17282
} | [
"java.awt.event.ActionListener"
] | import java.awt.event.ActionListener; | import java.awt.event.*; | [
"java.awt"
] | java.awt; | 1,890,143 |
boolean exists(VmDeviceId id); | boolean exists(VmDeviceId id); | /**
* Check if the {@link VmDevice} with the given id exists or not.
* @param id
* The device id.
* @return Does the device exist or not.
*/ | Check if the <code>VmDevice</code> with the given id exists or not | exists | {
"repo_name": "halober/ovirt-engine",
"path": "backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmDeviceDAO.java",
"license": "apache-2.0",
"size": 2566
} | [
"org.ovirt.engine.core.common.businessentities.VmDeviceId"
] | import org.ovirt.engine.core.common.businessentities.VmDeviceId; | import org.ovirt.engine.core.common.businessentities.*; | [
"org.ovirt.engine"
] | org.ovirt.engine; | 922,021 |
Collection<String> getGroupNames(int startIndex, int numResults);
| Collection<String> getGroupNames(int startIndex, int numResults); | /**
* Returns the Collection of all groups in the system.
*
* @param startIndex start index in results.
* @param numResults number of results to return.
* @return the Collection of all group names given the
* <tt>startIndex</tt> and <tt>numResults</tt>.
*/ | Returns the Collection of all groups in the system | getGroupNames | {
"repo_name": "mouhao/job-manager-console",
"path": "src/java/org/jivesoftware/openfire/group/GroupProvider.java",
"license": "gpl-2.0",
"size": 7654
} | [
"java.util.Collection"
] | import java.util.Collection; | import java.util.*; | [
"java.util"
] | java.util; | 519,793 |
public TIntSet getVmRemval(int vid) {
TIntSet remvals = vmRemval[vid];
if (remvals == null) {
remvals = new TIntHashSet(16, .5f, NO_ENTRY);
vmRemval[vid] = remvals;
}
return vmRemval[vid];
} | TIntSet function(int vid) { TIntSet remvals = vmRemval[vid]; if (remvals == null) { remvals = new TIntHashSet(16, .5f, NO_ENTRY); vmRemval[vid] = remvals; } return vmRemval[vid]; } | /**
* Get the removed values associated with 'vid'
*
* @param vid the variable id
* @return the set of removed values up to now
*/ | Get the removed values associated with 'vid' | getVmRemval | {
"repo_name": "piyushsh/choco3",
"path": "choco-solver/src/main/java/org/chocosolver/solver/explanations/Rules.java",
"license": "bsd-3-clause",
"size": 5945
} | [
"gnu.trove.set.TIntSet",
"gnu.trove.set.hash.TIntHashSet"
] | import gnu.trove.set.TIntSet; import gnu.trove.set.hash.TIntHashSet; | import gnu.trove.set.*; import gnu.trove.set.hash.*; | [
"gnu.trove.set"
] | gnu.trove.set; | 2,630,337 |
@Override
public void tightUnmarshal(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException {
super.tightUnmarshal(wireFormat, o, dataIn, bs);
} | void function(OpenWireFormat wireFormat, Object o, DataInput dataIn, BooleanStream bs) throws IOException { super.tightUnmarshal(wireFormat, o, dataIn, bs); } | /**
* Un-marshal an object instance from the data input stream
*
* @param o
* the object to un-marshal
* @param dataIn
* the data input stream to build the object from
* @throws IOException
*/ | Un-marshal an object instance from the data input stream | tightUnmarshal | {
"repo_name": "apache/activemq-openwire",
"path": "openwire-legacy/src/main/java/org/apache/activemq/openwire/codec/v10/OpenWireTopicMarshaller.java",
"license": "apache-2.0",
"size": 3547
} | [
"java.io.DataInput",
"java.io.IOException",
"org.apache.activemq.openwire.codec.BooleanStream",
"org.apache.activemq.openwire.codec.OpenWireFormat"
] | import java.io.DataInput; import java.io.IOException; import org.apache.activemq.openwire.codec.BooleanStream; import org.apache.activemq.openwire.codec.OpenWireFormat; | import java.io.*; import org.apache.activemq.openwire.codec.*; | [
"java.io",
"org.apache.activemq"
] | java.io; org.apache.activemq; | 977,571 |
@Override
public boolean update(User user) {
boolean result = false;
user.setCreateDate(this.store.get(user.getId()).getCreateDate());
if (this.store.put(user.getId(), user) == null) {
result = true;
}
return result;
} | boolean function(User user) { boolean result = false; user.setCreateDate(this.store.get(user.getId()).getCreateDate()); if (this.store.put(user.getId(), user) == null) { result = true; } return result; } | /**
* Update user in store.
* @param user
* @return true if successful otherwise false.
*/ | Update user in store | update | {
"repo_name": "alekseyponkin/aponkin",
"path": "Servlet_JSP/src/main/java/ru/job4j/dao/MemoryStore.java",
"license": "apache-2.0",
"size": 2807
} | [
"ru.job4j.model.User"
] | import ru.job4j.model.User; | import ru.job4j.model.*; | [
"ru.job4j.model"
] | ru.job4j.model; | 469,177 |
ResName getResName();
| ResName getResName(); | /**
* Returns the <code>ResName</code> attribute. Might be <code>null</code>.
*
* @return Returns the <code>ResName</code> attribute. Might be
* <code>null</code> .
*/ | Returns the <code>ResName</code> attribute. Might be <code>null</code> | getResName | {
"repo_name": "SAP/xliff-1-2",
"path": "com.sap.mlt.xliff12.api/src/main/java/com/sap/mlt/xliff12/api/element/structural/BinUnit.java",
"license": "apache-2.0",
"size": 9132
} | [
"com.sap.mlt.xliff12.api.attribute.ResName"
] | import com.sap.mlt.xliff12.api.attribute.ResName; | import com.sap.mlt.xliff12.api.attribute.*; | [
"com.sap.mlt"
] | com.sap.mlt; | 1,906,828 |
public void cursor(boolean show) throws IOException {
displayCommand(CURSOR_ON, show);
} | void function(boolean show) throws IOException { displayCommand(CURSOR_ON, show); } | /**
* Shows or hides the underline cursor.
*/ | Shows or hides the underline cursor | cursor | {
"repo_name": "jbman/captain-picar",
"path": "src/main/java/com/github/jbman/jgrove/sensors/i2c/RgbLcd.java",
"license": "mit",
"size": 3216
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 739,888 |
private void listenersInit() {
// column name
nameTextField.getDocument().addDocumentListener(new DocumentListener() { | void function() { nameTextField.getDocument().addDocumentListener(new DocumentListener() { | /**
* Pridani listeneru k formularovym polim
*/ | Pridani listeneru k formularovym polim | listenersInit | {
"repo_name": "ligenzatomas/firebird-vizualization-tool",
"path": "src/main/java/org/tinyuml/ui/EditColDialog.java",
"license": "gpl-2.0",
"size": 26367
} | [
"javax.swing.event.DocumentListener"
] | import javax.swing.event.DocumentListener; | import javax.swing.event.*; | [
"javax.swing"
] | javax.swing; | 2,588,716 |
public void readEntityFromNBT(NBTTagCompound tagCompund)
{
this.xpOrbHealth = tagCompund.getShort("Health") & 255;
this.xpOrbAge = tagCompund.getShort("Age");
this.xpValue = tagCompund.getShort("Value");
} | void function(NBTTagCompound tagCompund) { this.xpOrbHealth = tagCompund.getShort(STR) & 255; this.xpOrbAge = tagCompund.getShort("Age"); this.xpValue = tagCompund.getShort("Value"); } | /**
* (abstract) Protected helper method to read subclass entity data from NBT.
*/ | (abstract) Protected helper method to read subclass entity data from NBT | readEntityFromNBT | {
"repo_name": "Hexeption/Youtube-Hacked-Client-1.8",
"path": "minecraft/net/minecraft/entity/item/EntityXPOrb.java",
"license": "mit",
"size": 9072
} | [
"net.minecraft.nbt.NBTTagCompound"
] | import net.minecraft.nbt.NBTTagCompound; | import net.minecraft.nbt.*; | [
"net.minecraft.nbt"
] | net.minecraft.nbt; | 1,360,568 |
public void addRequestHeaders(HttpState state, HttpConnection conn)
throws IOException, HttpException {
// set the default utf-8 encoding, if not already present
if (getRequestHeader("Content-Type") == null ) super.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
super.... | void function(HttpState state, HttpConnection conn) throws IOException, HttpException { if (getRequestHeader(STR) == null ) super.setRequestHeader(STR, STR); super.addRequestHeaders(state, conn); } | /**
* Generate additional headers needed by the request.
*
* @param state State token
* @param conn the connection
*/ | Generate additional headers needed by the request | addRequestHeaders | {
"repo_name": "markkimsal/pengyou-clients",
"path": "webdavclient/clientlib/src/java/org/apache/webdav/lib/methods/AclMethod.java",
"license": "apache-2.0",
"size": 7577
} | [
"java.io.IOException",
"org.apache.commons.httpclient.HttpConnection",
"org.apache.commons.httpclient.HttpException",
"org.apache.commons.httpclient.HttpState"
] | import java.io.IOException; import org.apache.commons.httpclient.HttpConnection; import org.apache.commons.httpclient.HttpException; import org.apache.commons.httpclient.HttpState; | import java.io.*; import org.apache.commons.httpclient.*; | [
"java.io",
"org.apache.commons"
] | java.io; org.apache.commons; | 2,221,666 |
public List<T> instantiateTypes(Collection<Class<?>> types) {
Assert.notNull(types, "Types must not be null");
return instantiate(types.stream().map((type) -> TypeSupplier.forType(type)));
} | List<T> function(Collection<Class<?>> types) { Assert.notNull(types, STR); return instantiate(types.stream().map((type) -> TypeSupplier.forType(type))); } | /**
* Instantiate the given set of classes, injecting constructor arguments as necessary.
* @param types the types to instantiate
* @return a list of instantiated instances
* @since 2.4.8
*/ | Instantiate the given set of classes, injecting constructor arguments as necessary | instantiateTypes | {
"repo_name": "htynkn/spring-boot",
"path": "spring-boot-project/spring-boot/src/main/java/org/springframework/boot/util/Instantiator.java",
"license": "apache-2.0",
"size": 8352
} | [
"java.util.Collection",
"java.util.List",
"org.springframework.util.Assert"
] | import java.util.Collection; import java.util.List; import org.springframework.util.Assert; | import java.util.*; import org.springframework.util.*; | [
"java.util",
"org.springframework.util"
] | java.util; org.springframework.util; | 2,408,163 |
public String[] addNewCommentOnTaskByTaskId(String taskID, String comment)
throws RestClientException, IOException, JSONException {
String url = serviceURL + "runtime/tasks/" + taskID + "/comments";
DefaultHttpClient httpClient = getHttpClient();
HttpPost httpPost = new HttpPost(... | String[] function(String taskID, String comment) throws RestClientException, IOException, JSONException { String url = serviceURL + STR + taskID + STR; DefaultHttpClient httpClient = getHttpClient(); HttpPost httpPost = new HttpPost(url); StringEntity params = new StringEntity("{\"message\STRSTR\",\"saveProcessInstance... | /**
* Method used to add a new comment to a task
*
* @param taskID used to identify the task
* @param comment comment to be added
* @return String Array containing status and the message
* @throws IOException
* @throws JSONException
*/ | Method used to add a new comment to a task | addNewCommentOnTaskByTaskId | {
"repo_name": "milindaperera/product-ei",
"path": "integration/business-process-tests/tests-common/admin-clients/src/main/java/org/wso2/ei/businessprocess/integration/common/clients/bpmn/ActivitiRestClient.java",
"license": "apache-2.0",
"size": 25592
} | [
"java.io.IOException",
"org.apache.commons.httpclient.HttpStatus",
"org.apache.http.HttpResponse",
"org.apache.http.client.methods.HttpPost",
"org.apache.http.entity.ContentType",
"org.apache.http.entity.StringEntity",
"org.apache.http.impl.client.DefaultHttpClient",
"org.apache.http.util.EntityUtils"... | import java.io.IOException; import org.apache.commons.httpclient.HttpStatus; import org.apache.http.HttpResponse; import org.apache.http.client.methods.HttpPost; import org.apache.http.entity.ContentType; import org.apache.http.entity.StringEntity; import org.apache.http.impl.client.DefaultHttpClient; import org.apache... | import java.io.*; import org.apache.commons.httpclient.*; import org.apache.http.*; import org.apache.http.client.methods.*; import org.apache.http.entity.*; import org.apache.http.impl.client.*; import org.apache.http.util.*; import org.json.*; | [
"java.io",
"org.apache.commons",
"org.apache.http",
"org.json"
] | java.io; org.apache.commons; org.apache.http; org.json; | 2,792,213 |
try{
MatOfByte matOfByte = new MatOfByte();
Highgui.imencode(".jpg", img, matOfByte);
byte[] byteArray = matOfByte.toArray();
InputStream in = new ByteArrayInputStream(byteArray);
BufferedImage image = ImageIO.read(in);
ImageIcon ii = new I... | try{ MatOfByte matOfByte = new MatOfByte(); Highgui.imencode(".jpg", img, matOfByte); byte[] byteArray = matOfByte.toArray(); InputStream in = new ByteArrayInputStream(byteArray); BufferedImage image = ImageIO.read(in); ImageIcon ii = new ImageIcon(image); jScrollPane1 = new JScrollPane(new JLabel(ii)); } catch (IOExce... | /**
* This method is called from within the constructor to initialize the form.
* WARNING: Do NOT modify this code. The content of this method is always
* regenerated by the Form Editor.
*/ | This method is called from within the constructor to initialize the form. regenerated by the Form Editor | initComponents | {
"repo_name": "aivakov/HyperSpecUtils",
"path": "HyperImageVisualiseLDA/PredictedImage.java",
"license": "gpl-3.0",
"size": 6543
} | [
"java.awt.image.BufferedImage",
"java.io.ByteArrayInputStream",
"java.io.IOException",
"java.io.InputStream",
"java.util.logging.Level",
"java.util.logging.Logger",
"javax.imageio.ImageIO",
"javax.swing.ImageIcon",
"javax.swing.JLabel",
"javax.swing.JScrollPane",
"org.opencv.core.MatOfByte",
"... | import java.awt.image.BufferedImage; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.util.logging.Level; import java.util.logging.Logger; import javax.imageio.ImageIO; import javax.swing.ImageIcon; import javax.swing.JLabel; import javax.swing.JScrollPane; import... | import java.awt.image.*; import java.io.*; import java.util.logging.*; import javax.imageio.*; import javax.swing.*; import org.opencv.core.*; import org.opencv.highgui.*; | [
"java.awt",
"java.io",
"java.util",
"javax.imageio",
"javax.swing",
"org.opencv.core",
"org.opencv.highgui"
] | java.awt; java.io; java.util; javax.imageio; javax.swing; org.opencv.core; org.opencv.highgui; | 2,802,498 |
Format getSelectedFormat(); | Format getSelectedFormat(); | /**
* Returns the {@link Format} of the individual selected track.
*/ | Returns the <code>Format</code> of the individual selected track | getSelectedFormat | {
"repo_name": "superbderrick/ExoPlayer",
"path": "library/core/src/main/java/com/google/android/exoplayer2/trackselection/TrackSelection.java",
"license": "apache-2.0",
"size": 11300
} | [
"com.google.android.exoplayer2.Format"
] | import com.google.android.exoplayer2.Format; | import com.google.android.exoplayer2.*; | [
"com.google.android"
] | com.google.android; | 627,870 |
EClass getRequestBaseType(); | EClass getRequestBaseType(); | /**
* Returns the meta object for class '{@link net.opengis.wcs11.RequestBaseType <em>Request Base Type</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Request Base Type</em>'.
* @see net.opengis.wcs11.RequestBaseType
* @generated
*/ | Returns the meta object for class '<code>net.opengis.wcs11.RequestBaseType Request Base Type</code>'. | getRequestBaseType | {
"repo_name": "geotools/geotools",
"path": "modules/ogc/net.opengis.wcs/src/net/opengis/wcs11/Wcs11Package.java",
"license": "lgpl-2.1",
"size": 160605
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 895,667 |
void enterWindowSource(@NotNull CQLParser.WindowSourceContext ctx);
void exitWindowSource(@NotNull CQLParser.WindowSourceContext ctx); | void enterWindowSource(@NotNull CQLParser.WindowSourceContext ctx); void exitWindowSource(@NotNull CQLParser.WindowSourceContext ctx); | /**
* Exit a parse tree produced by {@link CQLParser#windowSource}.
*/ | Exit a parse tree produced by <code>CQLParser#windowSource</code> | exitWindowSource | {
"repo_name": "HuaweiBigData/StreamCQL",
"path": "cql/src/main/java/com/huawei/streaming/cql/semanticanalyzer/parser/CQLParserListener.java",
"license": "apache-2.0",
"size": 58667
} | [
"org.antlr.v4.runtime.misc.NotNull"
] | import org.antlr.v4.runtime.misc.NotNull; | import org.antlr.v4.runtime.misc.*; | [
"org.antlr.v4"
] | org.antlr.v4; | 2,798,755 |
public List<ResultRow> switchToPage(LookupResultsSelectable selectable, int maxRowsPerPage); | List<ResultRow> function(LookupResultsSelectable selectable, int maxRowsPerPage); | /**
* This method performs the operations necessary for a multiple value lookup to switch to another page of results and rerender
* the page
*
* @param multipleValueLookupForm
* @param maxRowsPerPage
* @return a list of result rows, used by the UI to render the page
*/ | This method performs the operations necessary for a multiple value lookup to switch to another page of results and rerender the page | switchToPage | {
"repo_name": "bhutchinson/kfs",
"path": "kfs-core/src/main/java/org/kuali/kfs/gl/web/struts/LookupDisplayTagSurrogate.java",
"license": "agpl-3.0",
"size": 5486
} | [
"java.util.List",
"org.kuali.rice.kns.web.ui.ResultRow"
] | import java.util.List; import org.kuali.rice.kns.web.ui.ResultRow; | import java.util.*; import org.kuali.rice.kns.web.ui.*; | [
"java.util",
"org.kuali.rice"
] | java.util; org.kuali.rice; | 1,116,927 |
public void addTo(Element elem) {
removeFromParent();
parent = elem;
parent.appendChild(element);
} | void function(Element elem) { removeFromParent(); parent = elem; parent.appendChild(element); } | /**
* Adds this drag handle to an HTML element.
*
* @param elem
* an element
*/ | Adds this drag handle to an HTML element | addTo | {
"repo_name": "jdahlstrom/vaadin.react",
"path": "client/src/main/java/com/vaadin/client/ui/dd/DragHandle.java",
"license": "apache-2.0",
"size": 6522
} | [
"com.google.gwt.dom.client.Element"
] | import com.google.gwt.dom.client.Element; | import com.google.gwt.dom.client.*; | [
"com.google.gwt"
] | com.google.gwt; | 2,275,785 |
@Test
public final void testToURL() throws URISyntaxException {
MCRSecureTokenV2 token = getWowzaSample();
String baseURL = "http://192.168.1.1:1935/";
String suffix = "/playlist.m3u8";
String hashParameterName = "myTokenPrefixhash";
String expectedURL = baseURL + "vod/sa... | final void function() throws URISyntaxException { MCRSecureTokenV2 token = getWowzaSample(); String baseURL = STR/playlist.m3u8STRmyTokenPrefixhashSTRvod/sample.mp4STR?myTokenPrefixstarttime=1395230400&myTokenPrefixendtime=1500000000&myTokenPrefixCustomParameter=abcdef&STR=TgJft5hsjKyC5Rem_EoUNP7xZvxbqVPhhd0GxIcA2oo=";... | /**
* Test method for {@link org.mycore.frontend.support.MCRSecureTokenV2#toURI(java.lang.String, java.lang.String)}.
*/ | Test method for <code>org.mycore.frontend.support.MCRSecureTokenV2#toURI(java.lang.String, java.lang.String)</code> | testToURL | {
"repo_name": "MyCoRe-Org/mycore",
"path": "mycore-base/src/test/java/org/mycore/frontend/support/MCRSecureTokenV2Test.java",
"license": "gpl-3.0",
"size": 2933
} | [
"java.net.URISyntaxException",
"org.junit.Assert"
] | import java.net.URISyntaxException; import org.junit.Assert; | import java.net.*; import org.junit.*; | [
"java.net",
"org.junit"
] | java.net; org.junit; | 919,508 |
private void populateMessageAttachmentsFromResponse(AttachmentMessage inOrOut, Iterator<Attachment> attachments) {
while (attachments.hasNext()) {
Attachment attachment = attachments.next();
inOrOut.addAttachment(attachment.getContentId(), attachment.getDataHandler());
}
... | void function(AttachmentMessage inOrOut, Iterator<Attachment> attachments) { while (attachments.hasNext()) { Attachment attachment = attachments.next(); inOrOut.addAttachment(attachment.getContentId(), attachment.getDataHandler()); } } | /**
* Populates message attachments from soap response attachments
*/ | Populates message attachments from soap response attachments | populateMessageAttachmentsFromResponse | {
"repo_name": "DariusX/camel",
"path": "components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/SpringWebserviceProducer.java",
"license": "apache-2.0",
"size": 16315
} | [
"java.util.Iterator",
"org.apache.camel.attachment.AttachmentMessage",
"org.springframework.ws.mime.Attachment"
] | import java.util.Iterator; import org.apache.camel.attachment.AttachmentMessage; import org.springframework.ws.mime.Attachment; | import java.util.*; import org.apache.camel.attachment.*; import org.springframework.ws.mime.*; | [
"java.util",
"org.apache.camel",
"org.springframework.ws"
] | java.util; org.apache.camel; org.springframework.ws; | 828,431 |
@Override
public FileSystem getFileSystem() {
return fs;
} | FileSystem function() { return fs; } | /**
* Returns the file system that created this object.
*/ | Returns the file system that created this object | getFileSystem | {
"repo_name": "apache/sis",
"path": "cloud/sis-cloud-S3/src/main/java/org/apache/sis/cloud/aws/s3/KeyPath.java",
"license": "apache-2.0",
"size": 33691
} | [
"java.nio.file.FileSystem"
] | import java.nio.file.FileSystem; | import java.nio.file.*; | [
"java.nio"
] | java.nio; | 529,012 |
public Diagnostic analyzeResourceProblems(Resource resource, Exception exception) {
if (!resource.getErrors().isEmpty() || !resource.getWarnings().isEmpty()) {
BasicDiagnostic basicDiagnostic =
new BasicDiagnostic
(Diagnostic.ERROR,
"net.mlanoe.language.vhdl.editor",
0,
getString("_UI... | Diagnostic function(Resource resource, Exception exception) { if (!resource.getErrors().isEmpty() !resource.getWarnings().isEmpty()) { BasicDiagnostic basicDiagnostic = new BasicDiagnostic (Diagnostic.ERROR, STR, 0, getString(STR, resource.getURI()), new Object [] { exception == null ? (Object)resource : exception }); ... | /**
* Returns a diagnostic describing the errors and warnings listed in the resource
* and the specified exception (if any).
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | Returns a diagnostic describing the errors and warnings listed in the resource and the specified exception (if any). | analyzeResourceProblems | {
"repo_name": "mlanoe/x-vhdl",
"path": "plugins/net.mlanoe.language.vhdl.editor/src-gen/net/mlanoe/language/vhdl/expression/presentation/ExpressionEditor.java",
"license": "gpl-3.0",
"size": 55367
} | [
"org.eclipse.emf.common.util.BasicDiagnostic",
"org.eclipse.emf.common.util.Diagnostic",
"org.eclipse.emf.ecore.resource.Resource",
"org.eclipse.emf.ecore.util.EcoreUtil"
] | import org.eclipse.emf.common.util.BasicDiagnostic; import org.eclipse.emf.common.util.Diagnostic; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.ecore.util.EcoreUtil; | import org.eclipse.emf.common.util.*; import org.eclipse.emf.ecore.resource.*; import org.eclipse.emf.ecore.util.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,738,672 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<PagedResponse<DetectorDefinitionResourceInner>> listSiteDetectorsSlotNextSinglePageAsync(
String nextLink, Context context) {
if (nextLink == null) {
return Mono.error(new IllegalArgumentException("Parameter nextLink is require... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<PagedResponse<DetectorDefinitionResourceInner>> function( String nextLink, Context context) { if (nextLink == null) { return Mono.error(new IllegalArgumentException(STR)); } if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR));... | /**
* Get the next page of items.
*
* @param nextLink The nextLink parameter.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws DefaultErrorResponseErrorException thrown if the request is re... | Get the next page of items | listSiteDetectorsSlotNextSinglePageAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanager/azure-resourcemanager-appservice/src/main/java/com/azure/resourcemanager/appservice/implementation/DiagnosticsClientImpl.java",
"license": "mit",
"size": 288640
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedResponse",
"com.azure.core.http.rest.PagedResponseBase",
"com.azure.core.util.Context",
"com.azure.resourcemanager.appservice.fluent.models.DetectorDefinitionResourceInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.util.Context; import com.azure.resourcemanager.appservice.fluent.models.DetectorDefinitionResourceInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.appservice.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 393,048 |
private static Gson constructGsonConverter() {
return new GsonBuilder()
.setDateFormat("yyyy'-'MM'-'dd'T'HH':'mm':'ss'.'SSS'Z'")
.registerTypeAdapterFactory(new ItemTypeAdapterFactory())
.create();
} | static Gson function() { return new GsonBuilder() .setDateFormat(STR) .registerTypeAdapterFactory(new ItemTypeAdapterFactory()) .create(); } | /**
* Construct Gson converter
*
* @return Gson converter
*/ | Construct Gson converter | constructGsonConverter | {
"repo_name": "dkhmelenko/Varis-Android",
"path": "app/src/main/java/com/khmelenko/lab/varis/dagger/module/NetworkModule.java",
"license": "apache-2.0",
"size": 2897
} | [
"com.google.gson.Gson",
"com.google.gson.GsonBuilder",
"com.khmelenko.lab.varis.network.retrofit.ItemTypeAdapterFactory"
] | import com.google.gson.Gson; import com.google.gson.GsonBuilder; import com.khmelenko.lab.varis.network.retrofit.ItemTypeAdapterFactory; | import com.google.gson.*; import com.khmelenko.lab.varis.network.retrofit.*; | [
"com.google.gson",
"com.khmelenko.lab"
] | com.google.gson; com.khmelenko.lab; | 25,289 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.