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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
@Test(expected = IllegalArgumentException.class)
public void testBlankPropertyName(){
List<User> list = toList(new User("张飞", 28), new User("刘备", 32), new User("刘备", 30));
CollectionsUtil.forEach(list, " ", 88);
} | @Test(expected = IllegalArgumentException.class) void function(){ List<User> list = toList(new User("张飞", 28), new User("刘备", 32), new User("刘备", 30)); CollectionsUtil.forEach(list, " ", 88); } | /**
* Test blank property name.
*/ | Test blank property name | testBlankPropertyName | {
"repo_name": "venusdrogon/feilong-core",
"path": "src/test/java/com/feilong/core/util/collectionsutiltest/ForEachTest.java",
"license": "apache-2.0",
"size": 3480
} | [
"com.feilong.core.bean.ConvertUtil",
"com.feilong.core.util.CollectionsUtil",
"com.feilong.store.member.User",
"java.util.List",
"org.junit.Test"
] | import com.feilong.core.bean.ConvertUtil; import com.feilong.core.util.CollectionsUtil; import com.feilong.store.member.User; import java.util.List; import org.junit.Test; | import com.feilong.core.bean.*; import com.feilong.core.util.*; import com.feilong.store.member.*; import java.util.*; import org.junit.*; | [
"com.feilong.core",
"com.feilong.store",
"java.util",
"org.junit"
] | com.feilong.core; com.feilong.store; java.util; org.junit; | 1,172,679 |
@Override
@Deprecated
public List<Runnable> shutdownNow() {
throw new UnsupportedOperationException();
} | List<Runnable> function() { throw new UnsupportedOperationException(); } | /**
* Not supported and throws an exception when used.
*/ | Not supported and throws an exception when used | shutdownNow | {
"repo_name": "trangnt57/Nhom7_CacVanDeHienDaiCNTT",
"path": "BlueSkyLauncher/launcher3/src/main/java/g7/bluesky/launcher3/MainThreadExecutor.java",
"license": "apache-2.0",
"size": 2101
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 921,913 |
public boolean connect() throws IOException, InterruptedException {
computeEncHash();
RequestBuilder rb = new RequestBuilder();
rb.setHeader(SecureShuffleUtils.HTTP_HEADER_URL_HASH, encHash);
rb.setHeader(ShuffleHeader.HTTP_HEADER_NAME, ShuffleHeader.DEFAULT_HTTP_HEADER_NAME);
rb.setHeader(Shuffl... | boolean function() throws IOException, InterruptedException { computeEncHash(); RequestBuilder rb = new RequestBuilder(); rb.setHeader(SecureShuffleUtils.HTTP_HEADER_URL_HASH, encHash); rb.setHeader(ShuffleHeader.HTTP_HEADER_NAME, ShuffleHeader.DEFAULT_HTTP_HEADER_NAME); rb.setHeader(ShuffleHeader.HTTP_HEADER_VERSION, ... | /**
* Connect to source
*
* @return true if connection was successful
* false if connection was previously cleaned up
* @throws IOException upon connection failure
*/ | Connect to source | connect | {
"repo_name": "ChetnaChaudhari/tez",
"path": "tez-runtime-library/src/main/java/org/apache/tez/http/async/netty/AsyncHttpConnection.java",
"license": "apache-2.0",
"size": 8950
} | [
"com.ning.http.client.Request",
"com.ning.http.client.RequestBuilder",
"java.io.IOException",
"java.net.HttpURLConnection",
"org.apache.tez.runtime.library.common.security.SecureShuffleUtils",
"org.apache.tez.runtime.library.common.shuffle.orderedgrouped.ShuffleHeader"
] | import com.ning.http.client.Request; import com.ning.http.client.RequestBuilder; import java.io.IOException; import java.net.HttpURLConnection; import org.apache.tez.runtime.library.common.security.SecureShuffleUtils; import org.apache.tez.runtime.library.common.shuffle.orderedgrouped.ShuffleHeader; | import com.ning.http.client.*; import java.io.*; import java.net.*; import org.apache.tez.runtime.library.common.security.*; import org.apache.tez.runtime.library.common.shuffle.orderedgrouped.*; | [
"com.ning.http",
"java.io",
"java.net",
"org.apache.tez"
] | com.ning.http; java.io; java.net; org.apache.tez; | 348,993 |
public Cache getCache() {
if (cache != null) {
boolean isReconnecting = cache.isReconnecting();
if (isReconnecting) {
Cache newCache = cache.getReconnectedCache();
if (newCache != null) {
cache = newCache;
}
}
}
return cache;
} | Cache function() { if (cache != null) { boolean isReconnecting = cache.isReconnecting(); if (isReconnecting) { Cache newCache = cache.getReconnectedCache(); if (newCache != null) { cache = newCache; } } } return cache; } | /**
* Gets a reference to the {@code Cache} that was created by this {@code ServerLauncher}.
*
* @return a reference to the Cache
* @see Cache
*/ | Gets a reference to the Cache that was created by this ServerLauncher | getCache | {
"repo_name": "davebarnes97/geode",
"path": "geode-core/src/main/java/org/apache/geode/distributed/ServerLauncher.java",
"license": "apache-2.0",
"size": 107062
} | [
"org.apache.geode.cache.Cache"
] | import org.apache.geode.cache.Cache; | import org.apache.geode.cache.*; | [
"org.apache.geode"
] | org.apache.geode; | 1,727,214 |
private URL gerarURL(Estado estado) throws MalformedURLException {
return new URL("http://dadosabertos.almg.gov.br/ws/brasil/localidades/ufs/"
+ estado.getUf() + "/municipios");
} | URL function(Estado estado) throws MalformedURLException { return new URL(STR/municipios"); } | /**
* Gera a URL correta para acessar o web service do governo.
*
* @param estado estado ao qual deseja-se fazer a consulta
* @return a URL
*
* @throws MalformedURLException
*/ | Gera a URL correta para acessar o web service do governo | gerarURL | {
"repo_name": "kleberkruger/localidades",
"path": "LocalidadesWebService/src/main/java/br/ufms/localidades/app/BaseDados.java",
"license": "gpl-3.0",
"size": 8301
} | [
"br.ufms.localidades.model.Estado",
"java.net.MalformedURLException"
] | import br.ufms.localidades.model.Estado; import java.net.MalformedURLException; | import br.ufms.localidades.model.*; import java.net.*; | [
"br.ufms.localidades",
"java.net"
] | br.ufms.localidades; java.net; | 1,362,949 |
default void checkCanGrantTablePrivilege(SystemSecurityContext context, Privilege privilege, CatalogSchemaTableName table, PrestoPrincipal grantee, boolean grantOption)
{
denyGrantTablePrivilege(privilege.toString(), table.toString());
} | default void checkCanGrantTablePrivilege(SystemSecurityContext context, Privilege privilege, CatalogSchemaTableName table, PrestoPrincipal grantee, boolean grantOption) { denyGrantTablePrivilege(privilege.toString(), table.toString()); } | /**
* Check if identity is allowed to grant the specified privilege to the grantee on the specified table.
*
* @throws AccessDeniedException if not allowed
*/ | Check if identity is allowed to grant the specified privilege to the grantee on the specified table | checkCanGrantTablePrivilege | {
"repo_name": "erichwang/presto",
"path": "presto-spi/src/main/java/io/prestosql/spi/security/SystemAccessControl.java",
"license": "apache-2.0",
"size": 23331
} | [
"io.prestosql.spi.connector.CatalogSchemaTableName",
"io.prestosql.spi.security.AccessDeniedException"
] | import io.prestosql.spi.connector.CatalogSchemaTableName; import io.prestosql.spi.security.AccessDeniedException; | import io.prestosql.spi.connector.*; import io.prestosql.spi.security.*; | [
"io.prestosql.spi"
] | io.prestosql.spi; | 1,035,503 |
public void setMbeanServer(MBeanServer mbeanServer)
{
this.mbeanServer = mbeanServer;
} | void function(MBeanServer mbeanServer) { this.mbeanServer = mbeanServer; } | /**
* Use this mbean server to register management beans. If not set, no mbeans will be registered.
*
* @param mbeanServer
*/ | Use this mbean server to register management beans. If not set, no mbeans will be registered | setMbeanServer | {
"repo_name": "jbertram/activemq-artemis-old",
"path": "artemis-server/src/main/java/org/apache/activemq/artemis/core/server/embedded/EmbeddedActiveMQ.java",
"license": "apache-2.0",
"size": 3960
} | [
"javax.management.MBeanServer"
] | import javax.management.MBeanServer; | import javax.management.*; | [
"javax.management"
] | javax.management; | 2,695,257 |
public void assertion(boolean b, java.lang.String msg)
{
if (!b)
{
java.lang.String fMsg = XSLMessages.createXPATHMessage(
XPATHErrorResources.ER_INCORRECT_PROGRAMMER_ASSERTION,
new Object[]{ msg });
throw new RuntimeException(fMsg);
}
} | void function(boolean b, java.lang.String msg) { if (!b) { java.lang.String fMsg = XSLMessages.createXPATHMessage( XPATHErrorResources.ER_INCORRECT_PROGRAMMER_ASSERTION, new Object[]{ msg }); throw new RuntimeException(fMsg); } } | /**
* Tell the user of an assertion error, and probably throw an
* exception.
*
* @param b If false, a runtime exception will be thrown.
* @param msg The assertion message, which should be informative.
*
* @throws RuntimeException if the b argument is false.
*
* @throws javax.xml.transform.T... | Tell the user of an assertion error, and probably throw an exception | assertion | {
"repo_name": "rokn/Count_Words_2015",
"path": "testing/openjdk2/jaxp/src/com/sun/org/apache/xpath/internal/Expression.java",
"license": "mit",
"size": 18185
} | [
"com.sun.org.apache.xalan.internal.res.XSLMessages",
"com.sun.org.apache.xpath.internal.res.XPATHErrorResources"
] | import com.sun.org.apache.xalan.internal.res.XSLMessages; import com.sun.org.apache.xpath.internal.res.XPATHErrorResources; | import com.sun.org.apache.xalan.internal.res.*; import com.sun.org.apache.xpath.internal.res.*; | [
"com.sun.org"
] | com.sun.org; | 686,755 |
private void getUserInformation(Document doc) {
final UserProfile upInstance = UserProfile.getInstance();
stubs = new ArrayList<ProfileModel>();
// Title
Elements userInfo = doc.select("div[id=main_userinfo]");
Elements title = userInfo.select("h2");
upInstance.setUserTitle(title... | void function(Document doc) { final UserProfile upInstance = UserProfile.getInstance(); stubs = new ArrayList<ProfileModel>(); Elements userInfo = doc.select(STR); Elements title = userInfo.select("h2"); upInstance.setUserTitle(title.text()); Elements statisticInfo = doc.select(STR); Elements post = statisticInfo.selec... | /**
* Get the user information from the users profile
* @param doc The page document
*/ | Get the user information from the users profile | getUserInformation | {
"repo_name": "paimonsoror/RX8Club.com-Forum-Application",
"path": "src/com/normalexception/app/rx8club/fragment/ProfileFragment.java",
"license": "mit",
"size": 9375
} | [
"com.normalexception.app.rx8club.WebUrls",
"com.normalexception.app.rx8club.html.VBForumFactory",
"com.normalexception.app.rx8club.user.UserProfile",
"com.normalexception.app.rx8club.view.profile.ProfileModel",
"java.util.ArrayList",
"org.jsoup.nodes.Document",
"org.jsoup.nodes.Element",
"org.jsoup.se... | import com.normalexception.app.rx8club.WebUrls; import com.normalexception.app.rx8club.html.VBForumFactory; import com.normalexception.app.rx8club.user.UserProfile; import com.normalexception.app.rx8club.view.profile.ProfileModel; import java.util.ArrayList; import org.jsoup.nodes.Document; import org.jsoup.nodes.Eleme... | import com.normalexception.app.rx8club.*; import com.normalexception.app.rx8club.html.*; import com.normalexception.app.rx8club.user.*; import com.normalexception.app.rx8club.view.profile.*; import java.util.*; import org.jsoup.nodes.*; import org.jsoup.select.*; | [
"com.normalexception.app",
"java.util",
"org.jsoup.nodes",
"org.jsoup.select"
] | com.normalexception.app; java.util; org.jsoup.nodes; org.jsoup.select; | 1,582,578 |
protected Path getOutputDir() {
return new Path("output");
} | Path function() { return new Path(STR); } | /**
* Returns a path to the output directory for the testcase.
*
* @return path to the output directory for the tescase.
*/ | Returns a path to the output directory for the testcase | getOutputDir | {
"repo_name": "dhootha/hadoop-common",
"path": "src/test/org/apache/hadoop/mapred/ClusterMapReduceTestCase.java",
"license": "apache-2.0",
"size": 5812
} | [
"org.apache.hadoop.fs.Path"
] | import org.apache.hadoop.fs.Path; | import org.apache.hadoop.fs.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 1,131,922 |
return columnName;
}
}
public Manager(DatabaseSchema dbSchema, Row row) {
super(dbSchema, row, OvsdbTable.MANAGER, VersionNum.VERSION100);
}
| return columnName; } } public Manager(DatabaseSchema dbSchema, Row row) { super(dbSchema, row, OvsdbTable.MANAGER, VersionNum.VERSION100); } | /**
* Returns the table column name for ManagerColumn.
* @return the table column name
*/ | Returns the table column name for ManagerColumn | columnName | {
"repo_name": "kuangrewawa/OnosFw",
"path": "ovsdb/rfc/src/main/java/org/onosproject/ovsdb/rfc/table/Manager.java",
"license": "apache-2.0",
"size": 10757
} | [
"org.onosproject.ovsdb.rfc.notation.Row",
"org.onosproject.ovsdb.rfc.schema.DatabaseSchema"
] | import org.onosproject.ovsdb.rfc.notation.Row; import org.onosproject.ovsdb.rfc.schema.DatabaseSchema; | import org.onosproject.ovsdb.rfc.notation.*; import org.onosproject.ovsdb.rfc.schema.*; | [
"org.onosproject.ovsdb"
] | org.onosproject.ovsdb; | 2,509,370 |
protected void parsePropertiesInKeyValueFormat(List<GetValue> values) {
if (values == null) {
return;
}
for (GetValue getValue : values) {
String key = getValue.getKey();
if (!StringUtils.endsWithIgnoreCase(key, "/")) {
key = key.replace(context, "").replace('/', '.');
String value = getDecod... | void function(List<GetValue> values) { if (values == null) { return; } for (GetValue getValue : values) { String key = getValue.getKey(); if (!StringUtils.endsWithIgnoreCase(key, "/")) { key = key.replace(context, "").replace('/', '.'); String value = getDecoded(getValue.getValue()); properties.put(key, value); } } } | /**
* Parses the properties in key value style i.e., values are expected to be either a
* sub key or a constant
*
* @param values
*/ | Parses the properties in key value style i.e., values are expected to be either a sub key or a constant | parsePropertiesInKeyValueFormat | {
"repo_name": "bpgray/spring-cloud-consul",
"path": "spring-cloud-consul-config/src/main/java/org/springframework/cloud/consul/config/ConsulPropertySource.java",
"license": "apache-2.0",
"size": 5216
} | [
"com.ecwid.consul.v1.kv.model.GetValue",
"java.util.List",
"org.springframework.util.StringUtils"
] | import com.ecwid.consul.v1.kv.model.GetValue; import java.util.List; import org.springframework.util.StringUtils; | import com.ecwid.consul.v1.kv.model.*; import java.util.*; import org.springframework.util.*; | [
"com.ecwid.consul",
"java.util",
"org.springframework.util"
] | com.ecwid.consul; java.util; org.springframework.util; | 1,621,150 |
@Test
public final void testDefinitionFieldName() {
final PublisherNodeDefinitionBuilder rootDefinitionBuilder = new PublisherNodeDefinitionBuilder();
try {
rootDefinitionBuilder.addStringField("testString");
Assert.fail();
} catch (final IllegalArgumentException a) {
// succes
}
try {
rootDe... | final void function() { final PublisherNodeDefinitionBuilder rootDefinitionBuilder = new PublisherNodeDefinitionBuilder(); try { rootDefinitionBuilder.addStringField(STR); Assert.fail(); } catch (final IllegalArgumentException a) { } try { rootDefinitionBuilder.addBooleanField(STR); Assert.fail(); } catch (final Illega... | /**
* Test le nommage d'une definition.
*/ | Test le nommage d'une definition | testDefinitionFieldName | {
"repo_name": "KleeGroup/vertigo-addons",
"path": "vertigo-quarto/src/test/java/io/vertigo/quarto/services/publisher/standard/PublisherManagerTest.java",
"license": "apache-2.0",
"size": 7009
} | [
"io.vertigo.quarto.services.publisher.metamodel.PublisherNodeDefinitionBuilder",
"org.junit.Assert"
] | import io.vertigo.quarto.services.publisher.metamodel.PublisherNodeDefinitionBuilder; import org.junit.Assert; | import io.vertigo.quarto.services.publisher.metamodel.*; import org.junit.*; | [
"io.vertigo.quarto",
"org.junit"
] | io.vertigo.quarto; org.junit; | 857,539 |
public ManagedConnectionMetaData getMetaData() throws ResourceException {
return new ValidManagedConnectionMetaData();
} | ManagedConnectionMetaData function() throws ResourceException { return new ValidManagedConnectionMetaData(); } | /**
* Gets the metadata information for this connection's underlying EIS resource manager instance.
*
* @return ManagedConnectionMetaData instance
* @throws javax.resource.ResourceException generic exception if operation fails
*/ | Gets the metadata information for this connection's underlying EIS resource manager instance | getMetaData | {
"repo_name": "jstourac/wildfly",
"path": "testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/jca/beanvalidation/ra/ValidManagedConnection.java",
"license": "lgpl-2.1",
"size": 6967
} | [
"javax.resource.ResourceException",
"javax.resource.spi.ManagedConnectionMetaData"
] | import javax.resource.ResourceException; import javax.resource.spi.ManagedConnectionMetaData; | import javax.resource.*; import javax.resource.spi.*; | [
"javax.resource"
] | javax.resource; | 1,681,352 |
public static TimestampLessThanCondition.Builder lt(String variable, Date expectedValue) {
return TimestampLessThanCondition.builder().variable(variable).expectedValue(expectedValue);
} | static TimestampLessThanCondition.Builder function(String variable, Date expectedValue) { return TimestampLessThanCondition.builder().variable(variable).expectedValue(expectedValue); } | /**
* Binary condition for Timestamp less than comparison. Dates are converted to ISO8601 UTC timestamps.
*
* @param variable The JSONPath expression that determines which piece of the input document is used for the comparison.
* @param expectedValue The expected value for this condition.
... | Binary condition for Timestamp less than comparison. Dates are converted to ISO8601 UTC timestamps | lt | {
"repo_name": "jentfoo/aws-sdk-java",
"path": "aws-java-sdk-stepfunctions/src/main/java/com/amazonaws/services/stepfunctions/builder/StepFunctionBuilder.java",
"license": "apache-2.0",
"size": 30378
} | [
"com.amazonaws.services.stepfunctions.builder.conditions.TimestampLessThanCondition",
"java.util.Date"
] | import com.amazonaws.services.stepfunctions.builder.conditions.TimestampLessThanCondition; import java.util.Date; | import com.amazonaws.services.stepfunctions.builder.conditions.*; import java.util.*; | [
"com.amazonaws.services",
"java.util"
] | com.amazonaws.services; java.util; | 2,038,499 |
public void validate(KeyStore keyStore, Certificate cert) throws CertificateException
{
Certificate[] certChain = null;
if (cert != null && cert instanceof X509Certificate)
{
((X509Certificate)cert).checkValidity();
String certAlias = null;
... | void function(KeyStore keyStore, Certificate cert) throws CertificateException { Certificate[] certChain = null; if (cert != null && cert instanceof X509Certificate) { ((X509Certificate)cert).checkValidity(); String certAlias = null; try { if (keyStore == null) { throw new InvalidParameterException(STR); } certAlias = ... | /**
* validates a specific certificate inside of the keystore being passed in
*
* @param keyStore
* @param cert
* @throws CertificateException
*/ | validates a specific certificate inside of the keystore being passed in | validate | {
"repo_name": "soulfly/guinea-pig-smart-bot",
"path": "node_modules/quickblox/samples/cordova/text_chat/plugins/cordova-plugin-websocket/src/android/org/eclipse/jetty/util/security/CertificateValidator.java",
"license": "apache-2.0",
"size": 8477
} | [
"java.security.InvalidParameterException",
"java.security.KeyStore",
"java.security.KeyStoreException",
"java.security.cert.Certificate",
"java.security.cert.CertificateException",
"java.security.cert.X509Certificate"
] | import java.security.InvalidParameterException; import java.security.KeyStore; import java.security.KeyStoreException; import java.security.cert.Certificate; import java.security.cert.CertificateException; import java.security.cert.X509Certificate; | import java.security.*; import java.security.cert.*; | [
"java.security"
] | java.security; | 2,851,015 |
public static String getXMLHeader( String encoding ) {
return "<?xml version=\"1.0\" encoding=\"" + encoding + "\"?>" + Const.CR;
} | static String function( String encoding ) { return STR1.0\STRSTR\"?>" + Const.CR; } | /**
* The header string to specify encoding in an XML file
*
* @param encoding The desired encoding to use in the XML file
* @return The XML header.
*/ | The header string to specify encoding in an XML file | getXMLHeader | {
"repo_name": "wseyler/pentaho-kettle",
"path": "core/src/main/java/org/pentaho/di/core/xml/XMLHandler.java",
"license": "apache-2.0",
"size": 40125
} | [
"org.pentaho.di.core.Const"
] | import org.pentaho.di.core.Const; | import org.pentaho.di.core.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 346,787 |
@Override
public void process(Map<K, V> tuple)
{
for (Map.Entry<K, V> e: tuple.entrySet()) {
MutableDouble val = basemap.get(e.getKey());
if (!doprocessKey(e.getKey())) {
continue;
}
if (val == null) { // Only process keys that are in the basemap
val... | void function(Map<K, V> tuple) { for (Map.Entry<K, V> e: tuple.entrySet()) { MutableDouble val = basemap.get(e.getKey()); if (!doprocessKey(e.getKey())) { continue; } if (val == null) { val = new MutableDouble(e.getValue().doubleValue()); basemap.put(cloneKey(e.getKey()), val); continue; } double change = e.getValue().... | /**
* Process each key, compute change or percent, and emits it.
*/ | Process each key, compute change or percent, and emits it | process | {
"repo_name": "skekre98/apex-mlhr",
"path": "library/src/main/java/com/datatorrent/lib/math/ChangeAlertMap.java",
"license": "apache-2.0",
"size": 4334
} | [
"com.datatorrent.api.DefaultOutputPort",
"java.util.HashMap",
"java.util.Map",
"javax.validation.constraints.Min",
"org.apache.commons.lang.mutable.MutableDouble"
] | import com.datatorrent.api.DefaultOutputPort; import java.util.HashMap; import java.util.Map; import javax.validation.constraints.Min; import org.apache.commons.lang.mutable.MutableDouble; | import com.datatorrent.api.*; import java.util.*; import javax.validation.constraints.*; import org.apache.commons.lang.mutable.*; | [
"com.datatorrent.api",
"java.util",
"javax.validation",
"org.apache.commons"
] | com.datatorrent.api; java.util; javax.validation; org.apache.commons; | 6,315 |
static Result in(Pipeline pipeline, PCollection<HealthcareIOError<String>> failedBodies) {
return new Result(pipeline, failedBodies, null);
} | static Result in(Pipeline pipeline, PCollection<HealthcareIOError<String>> failedBodies) { return new Result(pipeline, failedBodies, null); } | /**
* Creates a {@link FhirIO.Write.Result} in the given {@link Pipeline}. @param pipeline the
* pipeline
*
* @param failedBodies the failed inserts
* @return the result
*/ | Creates a <code>FhirIO.Write.Result</code> in the given <code>Pipeline</code>. @param pipeline the pipeline | in | {
"repo_name": "iemejia/incubator-beam",
"path": "sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/healthcare/FhirIO.java",
"license": "apache-2.0",
"size": 45554
} | [
"org.apache.beam.sdk.Pipeline",
"org.apache.beam.sdk.values.PCollection"
] | import org.apache.beam.sdk.Pipeline; import org.apache.beam.sdk.values.PCollection; | import org.apache.beam.sdk.*; import org.apache.beam.sdk.values.*; | [
"org.apache.beam"
] | org.apache.beam; | 2,481,417 |
public List<IViolation> getByProvider(String providerId); | List<IViolation> function(String providerId); | /**
* Returns Violations from the database by providerId.
* The violations are sorted descendent by datetime.
*
* @param providerId
* @return the corresponding Violations by providerId from the database
*/ | Returns Violations from the database by providerId. The violations are sorted descendent by datetime | getByProvider | {
"repo_name": "mbarrientos/SeaCloudsPlatform",
"path": "sla/sla-core/sla-repository/src/main/java/eu/atos/sla/dao/IViolationDAO.java",
"license": "apache-2.0",
"size": 5087
} | [
"eu.atos.sla.datamodel.IViolation",
"java.util.List"
] | import eu.atos.sla.datamodel.IViolation; import java.util.List; | import eu.atos.sla.datamodel.*; import java.util.*; | [
"eu.atos.sla",
"java.util"
] | eu.atos.sla; java.util; | 2,248,992 |
public Enumeration getUsers() {
return (homes.keys());
}
// ------------------------------------------------------ Private Methods | Enumeration function() { return (homes.keys()); } | /**
* Return an enumeration of the usernames defined on this server.
*/ | Return an enumeration of the usernames defined on this server | getUsers | {
"repo_name": "Netprophets/JBOSSWEB_7_0_13_FINAL",
"path": "java/org/apache/catalina/startup/PasswdUserDatabase.java",
"license": "lgpl-3.0",
"size": 5045
} | [
"java.util.Enumeration"
] | import java.util.Enumeration; | import java.util.*; | [
"java.util"
] | java.util; | 631,312 |
private void executeCommand(Session roboRioSession, String command, String errorString) throws JSchException, IOException {
// Extract the JRE
m_logger.debug("Running command " + command);
ChannelExec channel = (ChannelExec) roboRioSession.openChannel(EXEC_COMMAND);
channel.setComman... | void function(Session roboRioSession, String command, String errorString) throws JSchException, IOException { m_logger.debug(STR + command); ChannelExec channel = (ChannelExec) roboRioSession.openChannel(EXEC_COMMAND); channel.setCommand(command); channel.connect(); int sleepCount = 0; do { try { Thread.sleep(100); } c... | /**
* Convenience method to execute a command on the given remote session, using the given string
* as part of the error if it fails to run.
*
* @param roboRioSession The ssh session of the roboRio
* @param command The command to execute
* @param errorString The error string to p... | Convenience method to execute a command on the given remote session, using the given string as part of the error if it fails to run | executeCommand | {
"repo_name": "333fred/java-installer",
"path": "src/main/java/edu/wpi/first/wpilib/javainstaller/controllers/DeployController.java",
"license": "bsd-3-clause",
"size": 10007
} | [
"com.jcraft.jsch.ChannelExec",
"com.jcraft.jsch.JSchException",
"com.jcraft.jsch.Session",
"java.io.IOException"
] | import com.jcraft.jsch.ChannelExec; import com.jcraft.jsch.JSchException; import com.jcraft.jsch.Session; import java.io.IOException; | import com.jcraft.jsch.*; import java.io.*; | [
"com.jcraft.jsch",
"java.io"
] | com.jcraft.jsch; java.io; | 462,405 |
private static ValidationResult[] combineSimilarResults(ValidationResult[] validationResults)
{
List<ValidationResult> newResultList = new ArrayList<ValidationResult>();
for(int i = 0; i < validationResults.length; i++)
{
ValidationResult oldResult = validationResult... | static ValidationResult[] function(ValidationResult[] validationResults) { List<ValidationResult> newResultList = new ArrayList<ValidationResult>(); for(int i = 0; i < validationResults.length; i++) { ValidationResult oldResult = validationResults[i]; boolean foundMatch = false; for (ValidationResult newResult: newResu... | /**
* Combine similar results. They are considered similar if they have the same error text. The results are combined, with multiple xpaths.
*
* @param validationResults an array of ValidationResult objects to combine
*/ | Combine similar results. They are considered similar if they have the same error text. The results are combined, with multiple xpaths | combineSimilarResults | {
"repo_name": "bmatern-nmdp/MiringValidator",
"path": "src/main/java/org/nmdp/miring/ReportGenerator.java",
"license": "gpl-3.0",
"size": 19162
} | [
"java.util.ArrayList",
"java.util.Collections",
"java.util.List"
] | import java.util.ArrayList; import java.util.Collections; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,989,881 |
private void logStatistics(
Long taskId,
Long queryStartTime,
QueryStatisticsRecorder recorder
) {
if (null != recorder) {
QueryStatistic queryStatistic = new QueryStatistic();
queryStatistic.addFixedTimeStatistic(QueryStatisticsConstants.EXECUTOR_PART,
System.currentTim... | void function( Long taskId, Long queryStartTime, QueryStatisticsRecorder recorder ) { if (null != recorder) { QueryStatistic queryStatistic = new QueryStatistic(); queryStatistic.addFixedTimeStatistic(QueryStatisticsConstants.EXECUTOR_PART, System.currentTimeMillis() - queryStartTime); recorder.recordStatistics(querySt... | /**
* For Logging the Statistics
* @param taskId
* @param queryStartTime
* @param recorder
*/ | For Logging the Statistics | logStatistics | {
"repo_name": "jackylk/incubator-carbondata",
"path": "integration/presto/src/main/java/org/apache/carbondata/presto/PrestoCarbonVectorizedRecordReader.java",
"license": "apache-2.0",
"size": 9715
} | [
"org.apache.carbondata.core.stats.QueryStatistic",
"org.apache.carbondata.core.stats.QueryStatisticsConstants",
"org.apache.carbondata.core.stats.QueryStatisticsRecorder",
"org.apache.carbondata.core.stats.TaskStatistics"
] | import org.apache.carbondata.core.stats.QueryStatistic; import org.apache.carbondata.core.stats.QueryStatisticsConstants; import org.apache.carbondata.core.stats.QueryStatisticsRecorder; import org.apache.carbondata.core.stats.TaskStatistics; | import org.apache.carbondata.core.stats.*; | [
"org.apache.carbondata"
] | org.apache.carbondata; | 2,798,670 |
void store(K key, File artifactFile, @Nullable ExternalResourceMetaData metaData); | void store(K key, File artifactFile, @Nullable ExternalResourceMetaData metaData); | /**
* Adds a resolution to the index.
*
* The incoming file is expected to be in the persistent local. This method will not move/copy the file there.
* <p>
*
* @param key The key to cache this resolution under in the index. Cannot be null.
* @param artifactFile The artifact file in th... | Adds a resolution to the index. The incoming file is expected to be in the persistent local. This method will not move/copy the file there. | store | {
"repo_name": "robinverduijn/gradle",
"path": "subprojects/dependency-management/src/main/java/org/gradle/internal/resource/cached/CachedExternalResourceIndex.java",
"license": "apache-2.0",
"size": 2430
} | [
"java.io.File",
"javax.annotation.Nullable",
"org.gradle.internal.resource.metadata.ExternalResourceMetaData"
] | import java.io.File; import javax.annotation.Nullable; import org.gradle.internal.resource.metadata.ExternalResourceMetaData; | import java.io.*; import javax.annotation.*; import org.gradle.internal.resource.metadata.*; | [
"java.io",
"javax.annotation",
"org.gradle.internal"
] | java.io; javax.annotation; org.gradle.internal; | 612,280 |
@Override
public void removeChild(Container child) {
if (child == null) {
return;
}
try {
if (child.getState().isAvailable()) {
child.stop();
}
} catch (LifecycleException e) {
log.error("ContainerBase.removeChild:... | void function(Container child) { if (child == null) { return; } try { if (child.getState().isAvailable()) { child.stop(); } } catch (LifecycleException e) { log.error(STR, e); } try { if (!LifecycleState.DESTROYING.equals(child.getState())) { child.destroy(); } } catch (LifecycleException e) { log.error(STR, e); } sync... | /**
* Remove an existing child Container from association with this parent
* Container.
*
* @param child Existing child Container to be removed
*/ | Remove an existing child Container from association with this parent Container | removeChild | {
"repo_name": "mayonghui2112/helloWorld",
"path": "sourceCode/apache-tomcat-7.0.82-src/java/org/apache/catalina/core/ContainerBase.java",
"license": "apache-2.0",
"size": 53688
} | [
"org.apache.catalina.Container",
"org.apache.catalina.LifecycleException",
"org.apache.catalina.LifecycleState"
] | import org.apache.catalina.Container; import org.apache.catalina.LifecycleException; import org.apache.catalina.LifecycleState; | import org.apache.catalina.*; | [
"org.apache.catalina"
] | org.apache.catalina; | 446,875 |
@Test
public void testConcurrentMap_computeIfPresent_racy() {
final AtomicBoolean b = new AtomicBoolean(true);
final ConcurrentMap<Long,Long> map = new ImplementsConcurrentMap<>();
final Long two = 2L;
BiFunction<Long,Long,Long> f, g;
for (Long val : new Long[] { null, 8... | void function() { final AtomicBoolean b = new AtomicBoolean(true); final ConcurrentMap<Long,Long> map = new ImplementsConcurrentMap<>(); final Long two = 2L; BiFunction<Long,Long,Long> f, g; for (Long val : new Long[] { null, 86L }) { map.clear(); f = (k, v) -> { map.put(two, 42L); return val; }; assertNull(map.compute... | /**
* Simulates races by modifying the map within the remapping function.
*/ | Simulates races by modifying the map within the remapping function | testConcurrentMap_computeIfPresent_racy | {
"repo_name": "YouDiSN/OpenJDK-Research",
"path": "jdk9/jdk/test/java/util/Map/Defaults.java",
"license": "gpl-2.0",
"size": 45038
} | [
"java.util.concurrent.ConcurrentMap",
"java.util.concurrent.atomic.AtomicBoolean",
"java.util.function.BiFunction",
"org.testng.Assert"
] | import java.util.concurrent.ConcurrentMap; import java.util.concurrent.atomic.AtomicBoolean; import java.util.function.BiFunction; import org.testng.Assert; | import java.util.concurrent.*; import java.util.concurrent.atomic.*; import java.util.function.*; import org.testng.*; | [
"java.util",
"org.testng"
] | java.util; org.testng; | 630,338 |
public static void buildResourceNameToIdMap(
ProjectFilesystem filesystem,
Path pathToRDotTxtFile,
Map<String, Integer> stringResourceNameToIdMap,
Map<String, Integer> pluralsResourceNameToIdMap,
Map<String, Integer> arrayResourceNameToIdMap)
throws IOException {
List<String> f... | static void function( ProjectFilesystem filesystem, Path pathToRDotTxtFile, Map<String, Integer> stringResourceNameToIdMap, Map<String, Integer> pluralsResourceNameToIdMap, Map<String, Integer> arrayResourceNameToIdMap) throws IOException { List<String> fileLines = filesystem.readLines(pathToRDotTxtFile); for (String l... | /**
* Parses the R.txt file generated by aapt, looks for resources of type {@code string}, {@code
* plurals} and {@code array}, and builds a map of resource names to their corresponding ids.
*/ | Parses the R.txt file generated by aapt, looks for resources of type string, plurals and array, and builds a map of resource names to their corresponding ids | buildResourceNameToIdMap | {
"repo_name": "brettwooldridge/buck",
"path": "src/com/facebook/buck/android/CompileStringsStep.java",
"license": "apache-2.0",
"size": 18185
} | [
"com.facebook.buck.io.filesystem.ProjectFilesystem",
"java.io.IOException",
"java.nio.file.Path",
"java.util.List",
"java.util.Map",
"java.util.regex.Matcher"
] | import com.facebook.buck.io.filesystem.ProjectFilesystem; import java.io.IOException; import java.nio.file.Path; import java.util.List; import java.util.Map; import java.util.regex.Matcher; | import com.facebook.buck.io.filesystem.*; import java.io.*; import java.nio.file.*; import java.util.*; import java.util.regex.*; | [
"com.facebook.buck",
"java.io",
"java.nio",
"java.util"
] | com.facebook.buck; java.io; java.nio; java.util; | 1,924,856 |
public static File getFileByTitle(final ModelObject obj, final String nameToMatch,
final boolean matchExactly) {
if (obj == null) {
return null;
}
final Collection<File> files = obj.get_Files();
if (files == null || files.isEmpty()) {
return nul... | static File function(final ModelObject obj, final String nameToMatch, final boolean matchExactly) { if (obj == null) { return null; } final Collection<File> files = obj.get_Files(); if (files == null files.isEmpty()) { return null; } for (final File f : files) { final String name = f.getTitle(); if (matchExactly) { if ... | /**
* Return file attached to ModelObject
*/ | Return file attached to ModelObject | getFileByTitle | {
"repo_name": "homiak/pims-lims",
"path": "src/presentation/org/pimslims/presentation/ServletUtil.java",
"license": "bsd-2-clause",
"size": 25653
} | [
"java.util.Collection",
"org.pimslims.metamodel.ModelObject",
"org.pimslims.util.File"
] | import java.util.Collection; import org.pimslims.metamodel.ModelObject; import org.pimslims.util.File; | import java.util.*; import org.pimslims.metamodel.*; import org.pimslims.util.*; | [
"java.util",
"org.pimslims.metamodel",
"org.pimslims.util"
] | java.util; org.pimslims.metamodel; org.pimslims.util; | 1,666,916 |
public PageBlobsResizeHeaders setDateProperty(OffsetDateTime dateProperty) {
if (dateProperty == null) {
this.dateProperty = null;
} else {
this.dateProperty = new DateTimeRfc1123(dateProperty);
}
return this;
} | PageBlobsResizeHeaders function(OffsetDateTime dateProperty) { if (dateProperty == null) { this.dateProperty = null; } else { this.dateProperty = new DateTimeRfc1123(dateProperty); } return this; } | /**
* Set the dateProperty property: The Date property.
*
* @param dateProperty the dateProperty value to set.
* @return the PageBlobsResizeHeaders object itself.
*/ | Set the dateProperty property: The Date property | setDateProperty | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/storage/azure-storage-blob/src/main/java/com/azure/storage/blob/implementation/models/PageBlobsResizeHeaders.java",
"license": "mit",
"size": 5919
} | [
"com.azure.core.util.DateTimeRfc1123",
"java.time.OffsetDateTime"
] | import com.azure.core.util.DateTimeRfc1123; import java.time.OffsetDateTime; | import com.azure.core.util.*; import java.time.*; | [
"com.azure.core",
"java.time"
] | com.azure.core; java.time; | 1,279,944 |
public static void closeSession() throws HibernateException {
Session session = (Session) threadLocal.get();
threadLocal.set(null);
if (session != null) {
session.close();
}
} | static void function() throws HibernateException { Session session = (Session) threadLocal.get(); threadLocal.set(null); if (session != null) { session.close(); } } | /**
* Close the single hibernate session instance.
*
* @throws HibernateException
*/ | Close the single hibernate session instance | closeSession | {
"repo_name": "talek69/curso",
"path": "101-dominon-hibernate/src/com/dominion/hibernate/HibernateSessionFactory.java",
"license": "gpl-3.0",
"size": 3248
} | [
"org.hibernate.HibernateException",
"org.hibernate.Session"
] | import org.hibernate.HibernateException; import org.hibernate.Session; | import org.hibernate.*; | [
"org.hibernate"
] | org.hibernate; | 1,958,368 |
private void focusItem(final int pos, @Nullable final FocusCallback callback) {
// If the item is already in view, focus it; otherwise, scroll to it and focus it.
RecyclerView.ViewHolder vh = mView.findViewHolderForAdapterPosition(pos);
if (vh != null) {
if (vh.itemView.requestFo... | void function(final int pos, @Nullable final FocusCallback callback) { RecyclerView.ViewHolder vh = mView.findViewHolderForAdapterPosition(pos); if (vh != null) { if (vh.itemView.requestFocus() && callback != null) { callback.onFocus(vh.itemView); } | /**
* Requests focus for the item in the given adapter position, scrolling the RecyclerView if
* necessary.
*
* @param pos
* @param callback A callback to call after the given item has been focused.
*/ | Requests focus for the item in the given adapter position, scrolling the RecyclerView if necessary | focusItem | {
"repo_name": "xorware/android_frameworks_base",
"path": "packages/DocumentsUI/src/com/android/documentsui/dirlist/FocusManager.java",
"license": "apache-2.0",
"size": 22407
} | [
"android.annotation.Nullable",
"android.support.v7.widget.RecyclerView"
] | import android.annotation.Nullable; import android.support.v7.widget.RecyclerView; | import android.annotation.*; import android.support.v7.widget.*; | [
"android.annotation",
"android.support"
] | android.annotation; android.support; | 501,434 |
public List<PatternRule> patterns() {
return this.patterns;
} | List<PatternRule> function() { return this.patterns; } | /**
* Get the patterns value.
*
* @return the patterns value
*/ | Get the patterns value | patterns | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/cognitiveservices/ms-azure-cs-luis-authoring/src/main/java/com/microsoft/azure/cognitiveservices/language/luis/authoring/models/LuisApp.java",
"license": "mit",
"size": 10717
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,288,037 |
private void addApplyTemplates(Document wrapperDoc,
Element utfxWrapperElement, String sourceContextNode) {
// compose select expression for xsl:apply-templates
StringBuffer selectExpression = new StringBuffer(
"$utfx-wrapper-removed");
if (sourceContextNode.... | void function(Document wrapperDoc, Element utfxWrapperElement, String sourceContextNode) { StringBuffer selectExpression = new StringBuffer( STR); if (sourceContextNode.length() == 0) { selectExpression.append(STR); } else if (sourceContextNode.equals("/")) { log.error(STR/\STR); } else { selectExpression.append(source... | /**
* Adds XSLT-elements for apply-templates to wrapperDoc
*
* creates the element <xsl:apply-templates
* select="$utfx-wrapper-removed/child::node()"/> and appends
* it to utfxWrapperElement
*
* @param wrapperDoc
* DOM Document representing the UTF-X test de... | Adds XSLT-elements for apply-templates to wrapperDoc creates the element and appends it to utfxWrapperElement | addApplyTemplates | {
"repo_name": "bwagner/utf-x-framework-svn-trunk",
"path": "src/java/utfx/framework/WrapperStylesheetGenerator.java",
"license": "gpl-2.0",
"size": 14222
} | [
"org.w3c.dom.Document",
"org.w3c.dom.Element"
] | import org.w3c.dom.Document; import org.w3c.dom.Element; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 1,483,399 |
private void fillSelectionList() {
listMaps.setItems(new String[] {});
Vector v = new Vector();
Vector selected = ((ExportWizard) getWizard()).getSelectedDiagrams();
Vector vIndices = new Vector();
int i = 0;
String filteredName, diagramName;
for (Iterator i... | void function() { listMaps.setItems(new String[] {}); Vector v = new Vector(); Vector selected = ((ExportWizard) getWizard()).getSelectedDiagrams(); Vector vIndices = new Vector(); int i = 0; String filteredName, diagramName; for (Iterator iter = mapsToExport.iterator(); iter.hasNext();) { IURNDiagram diagram = (IURNDi... | /**
* Refresh listMaps to list all Maps (if ExportPreferenceHelper.UCM) or all URNspecs otherwise
*
*/ | Refresh listMaps to list all Maps (if ExportPreferenceHelper.UCM) or all URNspecs otherwise | fillSelectionList | {
"repo_name": "gmussbacher/seg.jUCMNav",
"path": "src/seg/jUCMNav/views/wizards/importexport/ExportWizardMapSelectionPage.java",
"license": "epl-1.0",
"size": 16607
} | [
"java.util.Iterator",
"java.util.Vector"
] | import java.util.Iterator; import java.util.Vector; | import java.util.*; | [
"java.util"
] | java.util; | 2,210,964 |
public void stateChanged(ChangeEvent evt)
{
Object source = evt.getSource();
if (source == tabbedPane) {
JTabbedPane tabbedPane = (JTabbedPane) evt.getSource();
JPanel activePanel = (JPanel) tabbedPane.getSelectedComponent();
// default to projects
int newDataType = Importer.PROJECT_TYPE;
... | void function(ChangeEvent evt) { Object source = evt.getSource(); if (source == tabbedPane) { JTabbedPane tabbedPane = (JTabbedPane) evt.getSource(); JPanel activePanel = (JPanel) tabbedPane.getSelectedComponent(); int newDataType = Importer.PROJECT_TYPE; if (activePanel == screenPanel) newDataType = Importer.SCREEN_TY... | /**
* Listener for the swapping of Screen / Project tabs
* @see ChangeListener
*/ | Listener for the swapping of Screen / Project tabs | stateChanged | {
"repo_name": "stelfrich/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/fsimporter/chooser/LocationDialog.java",
"license": "gpl-2.0",
"size": 56281
} | [
"javax.swing.JPanel",
"javax.swing.JTabbedPane",
"javax.swing.event.ChangeEvent",
"org.openmicroscopy.shoola.agents.fsimporter.view.ImportLocationDetails",
"org.openmicroscopy.shoola.agents.fsimporter.view.Importer"
] | import javax.swing.JPanel; import javax.swing.JTabbedPane; import javax.swing.event.ChangeEvent; import org.openmicroscopy.shoola.agents.fsimporter.view.ImportLocationDetails; import org.openmicroscopy.shoola.agents.fsimporter.view.Importer; | import javax.swing.*; import javax.swing.event.*; import org.openmicroscopy.shoola.agents.fsimporter.view.*; | [
"javax.swing",
"org.openmicroscopy.shoola"
] | javax.swing; org.openmicroscopy.shoola; | 1,965,312 |
protected void decodeAttributes(mxCodec dec, Node node, Object obj)
{
NamedNodeMap attrs = node.getAttributes();
if (attrs != null)
{
for (int i = 0; i < attrs.getLength(); i++)
{
Node attr = attrs.item(i);
decodeAttribute(dec, attr, obj);
}
}
} | void function(mxCodec dec, Node node, Object obj) { NamedNodeMap attrs = node.getAttributes(); if (attrs != null) { for (int i = 0; i < attrs.getLength(); i++) { Node attr = attrs.item(i); decodeAttribute(dec, attr, obj); } } } | /**
* Decodes all attributes of the given node using decodeAttribute.
*/ | Decodes all attributes of the given node using decodeAttribute | decodeAttributes | {
"repo_name": "jgraph/mxgraph",
"path": "java/src/com/mxgraph/io/mxObjectCodec.java",
"license": "apache-2.0",
"size": 33561
} | [
"org.w3c.dom.NamedNodeMap",
"org.w3c.dom.Node"
] | import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 1,835,699 |
@Override
public OperationStatusResponse removeFromNetworkInterface(String serviceName, String deploymentName, String roleName, String networkInterfaceName, String networkSecurityGroupName) throws InterruptedException, ExecutionException, ServiceException, IOException {
NetworkManagementClient client2 =... | OperationStatusResponse function(String serviceName, String deploymentName, String roleName, String networkInterfaceName, String networkSecurityGroupName) throws InterruptedException, ExecutionException, ServiceException, IOException { NetworkManagementClient client2 = this.getClient(); boolean shouldTrace = CloudTraci... | /**
* Removes a Network Security Group from a network interface.
*
* @param serviceName Required.
* @param deploymentName Required.
* @param roleName Required.
* @param networkInterfaceName Required.
* @param networkSecurityGroupName Required.
* @throws InterruptedException Thrown when a... | Removes a Network Security Group from a network interface | removeFromNetworkInterface | {
"repo_name": "southworkscom/azure-sdk-for-java",
"path": "service-management/azure-svc-mgmt-network/src/main/java/com/microsoft/windowsazure/management/network/NetworkSecurityGroupOperationsImpl.java",
"license": "apache-2.0",
"size": 192233
} | [
"com.microsoft.windowsazure.core.OperationStatus",
"com.microsoft.windowsazure.core.OperationStatusResponse",
"com.microsoft.windowsazure.exception.CloudError",
"com.microsoft.windowsazure.exception.ServiceException",
"com.microsoft.windowsazure.tracing.ClientRequestTrackingHandler",
"com.microsoft.window... | import com.microsoft.windowsazure.core.OperationStatus; import com.microsoft.windowsazure.core.OperationStatusResponse; import com.microsoft.windowsazure.exception.CloudError; import com.microsoft.windowsazure.exception.ServiceException; import com.microsoft.windowsazure.tracing.ClientRequestTrackingHandler; import com... | import com.microsoft.windowsazure.core.*; import com.microsoft.windowsazure.exception.*; import com.microsoft.windowsazure.tracing.*; import java.io.*; import java.util.*; import java.util.concurrent.*; | [
"com.microsoft.windowsazure",
"java.io",
"java.util"
] | com.microsoft.windowsazure; java.io; java.util; | 1,654,654 |
public Task getTask();
| Task function(); | /**
* get the current task
*/ | get the current task | getTask | {
"repo_name": "motorina0/flowable-engine",
"path": "modules/flowable-cdi/src/main/java/org/flowable/cdi/impl/context/ContextAssociationManager.java",
"license": "apache-2.0",
"size": 2128
} | [
"org.flowable.engine.task.Task"
] | import org.flowable.engine.task.Task; | import org.flowable.engine.task.*; | [
"org.flowable.engine"
] | org.flowable.engine; | 1,070,922 |
private void resetDefaultBorders() {
try {
// Etched Borders
Field highLightColor = EtchedBorder.class.getDeclaredField("highlight");
highLightColor.setAccessible(true);
Field shadowcolor = EtchedBorder.class.getDeclaredField("shadow");
shadowcolor... | void function() { try { Field highLightColor = EtchedBorder.class.getDeclaredField(STR); highLightColor.setAccessible(true); Field shadowcolor = EtchedBorder.class.getDeclaredField(STR); shadowcolor.setAccessible(true); Border etchedBorder = BorderFactory.createEtchedBorder(); highLightColor.set(etchedBorder, null); sh... | /**
* Border factory is static so we need to do some nasty reflection tricks to change it.
* @param d
*/ | Border factory is static so we need to do some nasty reflection tricks to change it | resetDefaultBorders | {
"repo_name": "khuxtable/seaglass",
"path": "src/main/java/com/seaglasslookandfeel/SeaGlassLookAndFeel.java",
"license": "apache-2.0",
"size": 180407
} | [
"java.lang.reflect.Field",
"javax.swing.BorderFactory",
"javax.swing.border.BevelBorder",
"javax.swing.border.Border",
"javax.swing.border.EtchedBorder"
] | import java.lang.reflect.Field; import javax.swing.BorderFactory; import javax.swing.border.BevelBorder; import javax.swing.border.Border; import javax.swing.border.EtchedBorder; | import java.lang.reflect.*; import javax.swing.*; import javax.swing.border.*; | [
"java.lang",
"javax.swing"
] | java.lang; javax.swing; | 25,026 |
public Map<String, String> getProperties(final Map<String, String> defaultProperties, final long additionalRetentionMs) {
// internal topic config overridden rule: library overrides < global config overrides < per-topic config overrides
final Map<String, String> topicConfig = new HashMap<>(UNWINDOWE... | Map<String, String> function(final Map<String, String> defaultProperties, final long additionalRetentionMs) { final Map<String, String> topicConfig = new HashMap<>(UNWINDOWED_STORE_CHANGELOG_TOPIC_DEFAULT_OVERRIDES); topicConfig.putAll(defaultProperties); topicConfig.putAll(topicConfigs); return topicConfig; } | /**
* Get the configured properties for this topic. If retentionMs is set then
* we add additionalRetentionMs to work out the desired retention when cleanup.policy=compact,delete
*
* @param additionalRetentionMs - added to retention to allow for clock drift etc
* @return Properties to be used w... | Get the configured properties for this topic. If retentionMs is set then we add additionalRetentionMs to work out the desired retention when cleanup.policy=compact,delete | getProperties | {
"repo_name": "KevinLiLu/kafka",
"path": "streams/src/main/java/org/apache/kafka/streams/processor/internals/UnwindowedChangelogTopicConfig.java",
"license": "apache-2.0",
"size": 3351
} | [
"java.util.HashMap",
"java.util.Map"
] | import java.util.HashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 955,090 |
public void invokeNotification(
String methodName, Object argument, OutputStream ops)
throws IOException {
writeRequest(methodName, argument, ops, null);
ops.flush();
} | void function( String methodName, Object argument, OutputStream ops) throws IOException { writeRequest(methodName, argument, ops, null); ops.flush(); } | /**
* Invokes the given method on the remote service passing
* the given argument without reading or expecting a return
* response.
*
* @see #writeRequest(String, Object, OutputStream, String)
* @param methodName the method to invoke
* @param argument the argument to pass to the method
* @param ops the ... | Invokes the given method on the remote service passing the given argument without reading or expecting a return response | invokeNotification | {
"repo_name": "butla/jsonrpc4j",
"path": "src/main/java/com/googlecode/jsonrpc4j/JsonRpcClient.java",
"license": "mit",
"size": 17377
} | [
"java.io.IOException",
"java.io.OutputStream"
] | import java.io.IOException; import java.io.OutputStream; | import java.io.*; | [
"java.io"
] | java.io; | 8,638 |
public void setControl(Control swtControl) {
this.control = swtControl;
assert (checkReady());
invoke(OPERATION_SET_CONTROL);
}
/**
* {@inheritDoc} | void function(Control swtControl) { this.control = swtControl; assert (checkReady()); invoke(OPERATION_SET_CONTROL); } /** * {@inheritDoc} | /**
* This method sets the
* {@link org.eclipse.swt.widgets.TabItem#setControl(org.eclipse.swt.widgets.Control)
* control} of the tab-item.
*
* @param swtControl is the tabs control.
*/ | This method sets the <code>org.eclipse.swt.widgets.TabItem#setControl(org.eclipse.swt.widgets.Control) control</code> of the tab-item | setControl | {
"repo_name": "m-m-m/multimedia",
"path": "mmm-uit/mmm-uit-impl-swt/src/main/java/net/sf/mmm/ui/toolkit/impl/swt/view/sync/SyncTabItemAccess.java",
"license": "apache-2.0",
"size": 4329
} | [
"org.eclipse.swt.widgets.Control"
] | import org.eclipse.swt.widgets.Control; | import org.eclipse.swt.widgets.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 160,179 |
@Test
public void testUnion2()
{
final int[] ints1 = {33, 100000};
final int[] ints2 = {34, 200000};
List<Integer> expected = Arrays.asList(33, 34, 100000, 200000);
ConciseSet set1 = new ConciseSet();
for (int i : ints1) {
set1.add(i);
}
ConciseSet set2 = new ConciseSet();
f... | void function() { final int[] ints1 = {33, 100000}; final int[] ints2 = {34, 200000}; List<Integer> expected = Arrays.asList(33, 34, 100000, 200000); ConciseSet set1 = new ConciseSet(); for (int i : ints1) { set1.add(i); } ConciseSet set2 = new ConciseSet(); for (int i : ints2) { set2.add(i); } List<ImmutableConciseSet... | /**
* Set 1: zero literal, zero fill with flipped bit 33, literal
* Set 2: zero literal, zero fill with flipped bit 34, literal
* <p/>
* Testing merge
*/ | Set 1: zero literal, zero fill with flipped bit 33, literal Set 2: zero literal, zero fill with flipped bit 34, literal Testing merge | testUnion2 | {
"repo_name": "dkhwangbo/druid",
"path": "extendedset/src/test/java/org/apache/druid/extendedset/intset/ImmutableConciseSetTest.java",
"license": "apache-2.0",
"size": 38639
} | [
"java.util.Arrays",
"java.util.List"
] | import java.util.Arrays; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 17,528 |
void execute(BoxRequest request); | void execute(BoxRequest request); | /***
* Executes the request using the appropriate executor
*
* @param request the request
*/ | Executes the request using the appropriate executor | execute | {
"repo_name": "box/box-android-browse-sdk",
"path": "box-browse-sdk/src/main/java/com/box/androidsdk/browse/service/BrowseController.java",
"license": "apache-2.0",
"size": 5075
} | [
"com.box.androidsdk.content.requests.BoxRequest"
] | import com.box.androidsdk.content.requests.BoxRequest; | import com.box.androidsdk.content.requests.*; | [
"com.box.androidsdk"
] | com.box.androidsdk; | 51,862 |
@Override
public void prepare() throws IOException {
if (!ready()) {
handshake();
}
} | void function() throws IOException { if (!ready()) { handshake(); } } | /**
* Prepares the channel to accept read or write. We do handshake if not yet complete
* @throws IOException
*/ | Prepares the channel to accept read or write. We do handshake if not yet complete | prepare | {
"repo_name": "vgkholla/ambry",
"path": "ambry-network/src/main/java/com.github.ambry.network/SSLTransmission.java",
"license": "apache-2.0",
"size": 26895
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 442,315 |
@Override
public Row readRow() throws DataAccessObjectException {
if (!isOpen) {
open();
}
List<String> record;
synchronized (lock) {
try {
record = csvReader.nextRecord();
} catch (IOException e) {
throw new Da... | Row function() throws DataAccessObjectException { if (!isOpen) { open(); } List<String> record; synchronized (lock) { try { record = csvReader.nextRecord(); } catch (IOException e) { throw new DataAccessObjectException(e); } } if (!DAORowUtil.isValidRow(record)) { return null; } if (record.size() > headerRow.size()) { ... | /**
* Gets the next row from the current data access object data source. <i>Side effect:</i> Updates the current record
* number
*/ | Gets the next row from the current data access object data source. Side effect: Updates the current record number | readRow | {
"repo_name": "dsipasseuth/dataloader",
"path": "src/main/java/com/salesforce/dataloader/dao/csv/CSVFileReader.java",
"license": "bsd-3-clause",
"size": 9503
} | [
"com.salesforce.dataloader.config.Messages",
"com.salesforce.dataloader.exception.DataAccessObjectException",
"com.salesforce.dataloader.exception.DataAccessRowException",
"com.salesforce.dataloader.model.Row",
"com.salesforce.dataloader.util.DAORowUtil",
"java.io.IOException",
"java.util.List"
] | import com.salesforce.dataloader.config.Messages; import com.salesforce.dataloader.exception.DataAccessObjectException; import com.salesforce.dataloader.exception.DataAccessRowException; import com.salesforce.dataloader.model.Row; import com.salesforce.dataloader.util.DAORowUtil; import java.io.IOException; import java... | import com.salesforce.dataloader.config.*; import com.salesforce.dataloader.exception.*; import com.salesforce.dataloader.model.*; import com.salesforce.dataloader.util.*; import java.io.*; import java.util.*; | [
"com.salesforce.dataloader",
"java.io",
"java.util"
] | com.salesforce.dataloader; java.io; java.util; | 25,164 |
@Test
public void createInfinite() {
Mass m = new Mass(new Vector2(), 0, 0);
TestCase.assertTrue(m.isInfinite());
TestCase.assertTrue(m.getCenter().equals(new Vector2()));
TestCase.assertEquals(m.getMass(), 0.0);
TestCase.assertEquals(m.getInertia(), 0.0);
}
| void function() { Mass m = new Mass(new Vector2(), 0, 0); TestCase.assertTrue(m.isInfinite()); TestCase.assertTrue(m.getCenter().equals(new Vector2())); TestCase.assertEquals(m.getMass(), 0.0); TestCase.assertEquals(m.getInertia(), 0.0); } | /**
* Test the create infinite method.
* @since 2.0.0
*/ | Test the create infinite method | createInfinite | {
"repo_name": "pravin02/dyn4j",
"path": "junit/org/dyn4j/geometry/MassTest.java",
"license": "bsd-3-clause",
"size": 12448
} | [
"junit.framework.TestCase",
"org.dyn4j.geometry.Mass",
"org.dyn4j.geometry.Vector2"
] | import junit.framework.TestCase; import org.dyn4j.geometry.Mass; import org.dyn4j.geometry.Vector2; | import junit.framework.*; import org.dyn4j.geometry.*; | [
"junit.framework",
"org.dyn4j.geometry"
] | junit.framework; org.dyn4j.geometry; | 1,763,954 |
@Test
public void testLocalLinkReadDuringRename() throws IOException {
HBaseTestingUtil testUtil = new HBaseTestingUtil();
FileSystem fs = testUtil.getTestFileSystem();
assertEquals("file", fs.getUri().getScheme());
testLinkReadDuringRename(fs, testUtil.getDataTestDir());
} | void function() throws IOException { HBaseTestingUtil testUtil = new HBaseTestingUtil(); FileSystem fs = testUtil.getTestFileSystem(); assertEquals("file", fs.getUri().getScheme()); testLinkReadDuringRename(fs, testUtil.getDataTestDir()); } | /**
* Test, on a local filesystem, that the FileLink is still readable
* even when the current file gets renamed.
*/ | Test, on a local filesystem, that the FileLink is still readable even when the current file gets renamed | testLocalLinkReadDuringRename | {
"repo_name": "apurtell/hbase",
"path": "hbase-server/src/test/java/org/apache/hadoop/hbase/io/TestFileLink.java",
"license": "apache-2.0",
"size": 11797
} | [
"java.io.IOException",
"org.apache.hadoop.fs.FileSystem",
"org.apache.hadoop.hbase.HBaseTestingUtil",
"org.junit.Assert"
] | import java.io.IOException; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.hbase.HBaseTestingUtil; import org.junit.Assert; | import java.io.*; import org.apache.hadoop.fs.*; import org.apache.hadoop.hbase.*; import org.junit.*; | [
"java.io",
"org.apache.hadoop",
"org.junit"
] | java.io; org.apache.hadoop; org.junit; | 1,786,876 |
public void normal() {
mHintView.setVisibility(View.VISIBLE);
mProgressBar.setVisibility(View.GONE);
}
| void function() { mHintView.setVisibility(View.VISIBLE); mProgressBar.setVisibility(View.GONE); } | /**
* normal status
*/ | normal status | normal | {
"repo_name": "yangyankai/XListView",
"path": "app/src/main/java/com/sf/manager/xlistview/view/XListViewFooter.java",
"license": "apache-2.0",
"size": 2954
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 579,001 |
public static String getKeyLowerLimit(String path) {
String from = PathUtils.concat(path, "a");
from = getIdFromPath(from);
from = from.substring(0, from.length() - 1);
return from;
} | static String function(String path) { String from = PathUtils.concat(path, "a"); from = getIdFromPath(from); from = from.substring(0, from.length() - 1); return from; } | /**
* Returns the lower key limit to retrieve the children of the given
* <code>path</code>.
*
* @param path a path.
* @return the lower key limit.
*/ | Returns the lower key limit to retrieve the children of the given <code>path</code> | getKeyLowerLimit | {
"repo_name": "denismo/jackrabbit-dynamodb-store",
"path": "oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/document/util/Utils.java",
"license": "apache-2.0",
"size": 15036
} | [
"org.apache.jackrabbit.oak.commons.PathUtils"
] | import org.apache.jackrabbit.oak.commons.PathUtils; | import org.apache.jackrabbit.oak.commons.*; | [
"org.apache.jackrabbit"
] | org.apache.jackrabbit; | 1,323,392 |
private void mountInternal(RpcContext rpcContext, LockedInodePath inodePath, AlluxioURI ufsPath,
MountOptions options) throws InvalidPathException, FileAlreadyExistsException,
FileDoesNotExistException, IOException, AccessControlException {
// Check that the Alluxio Path does not exist
if (inodePa... | void function(RpcContext rpcContext, LockedInodePath inodePath, AlluxioURI ufsPath, MountOptions options) throws InvalidPathException, FileAlreadyExistsException, FileDoesNotExistException, IOException, AccessControlException { if (inodePath.fullPathExists()) { throw new InvalidPathException( ExceptionMessage.MOUNT_POI... | /**
* Mounts a UFS path onto an Alluxio path.
*
* @param rpcContext the rpc context
* @param inodePath the Alluxio path to mount to
* @param ufsPath the UFS path to mount
* @param options the mount options
*/ | Mounts a UFS path onto an Alluxio path | mountInternal | {
"repo_name": "PasaLab/tachyon",
"path": "core/server/master/src/main/java/alluxio/master/file/DefaultFileSystemMaster.java",
"license": "apache-2.0",
"size": 150549
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 626,804 |
private void calculate() {
boolean enabled;
PIDSource pidInput;
synchronized (this) {
if (m_pidInput == null) {
return;
}
if (m_pidOutput == null) {
return;
}
enabled = m_enabled; // take snapshot of... | void function() { boolean enabled; PIDSource pidInput; synchronized (this) { if (m_pidInput == null) { return; } if (m_pidOutput == null) { return; } enabled = m_enabled; pidInput = m_pidInput; } if (enabled) { double input = pidInput.pidGet(); double result; PIDOutput pidOutput = null; synchronized (this) { m_error = ... | /**
* Read the input, calculate the output accordingly, and write to the
* output. This should only be called by the PIDTask and is created during
* initialization.
*/ | Read the input, calculate the output accordingly, and write to the output. This should only be called by the PIDTask and is created during initialization | calculate | {
"repo_name": "CodeRed2771/Sally",
"path": "src/com/coderedrobotics/libs/dash/PIDControllerAIAO.java",
"license": "bsd-3-clause",
"size": 13214
} | [
"edu.wpi.first.wpilibj.PIDOutput",
"edu.wpi.first.wpilibj.PIDSource"
] | import edu.wpi.first.wpilibj.PIDOutput; import edu.wpi.first.wpilibj.PIDSource; | import edu.wpi.first.wpilibj.*; | [
"edu.wpi.first"
] | edu.wpi.first; | 316,172 |
public static <T> ImmutableTreeSet<T> toImmutableTreeSet(Iterable<? extends T> source, Comparator<? super T> comparator) {
if (source instanceof ImmutableTreeSet<?>) {
ImmutableTreeSet<? extends T> existingSet = (ImmutableTreeSet<? extends T>)source;
// This cast is safe because we ... | static <T> ImmutableTreeSet<T> function(Iterable<? extends T> source, Comparator<? super T> comparator) { if (source instanceof ImmutableTreeSet<?>) { ImmutableTreeSet<? extends T> existingSet = (ImmutableTreeSet<? extends T>)source; @SuppressWarnings(Suppressions.UNCHECKED_SAFE) ImmutableTreeSet<T> upcastSet = (Immuta... | /**
* Iterates a sequence exactly once and produces an immutable set of its contents.
*
* @param <T> The type of element in the sequence.
* @param source The sequence to iterate.
* @param comparator The comparator to use for initializing and adding members to the sorted set.
* @return An i... | Iterates a sequence exactly once and produces an immutable set of its contents | toImmutableTreeSet | {
"repo_name": "tunnelvisionlabs/java-immutable",
"path": "src/com/tvl/util/Immutables.java",
"license": "mit",
"size": 3373
} | [
"java.util.Comparator"
] | import java.util.Comparator; | import java.util.*; | [
"java.util"
] | java.util; | 323,967 |
public List<String> getActions();
| List<String> function(); | /** Gets the component actions
*
* @return
*/ | Gets the component actions | getActions | {
"repo_name": "mhosio/vaadin-osgi-demo",
"path": "demo-app/src/main/java/org/vaadin/osgi/bridge/uifragments/UIFragment.java",
"license": "apache-2.0",
"size": 439
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 92,740 |
protected String nullOrderForDirection(@SuppressWarnings("unused") Direction descending) {
return nullOrder();
}
| String function(@SuppressWarnings(STR) Direction descending) { return nullOrder(); } | /**
* A database platform may need to specify the null order by direction.
*
* <p>If a null order is not required for a SQL dialect descendant classes need to implement this method.</p>
*
* @return the null order for an SQL dialect
*/ | A database platform may need to specify the null order by direction. If a null order is not required for a SQL dialect descendant classes need to implement this method | nullOrderForDirection | {
"repo_name": "badgerwithagun/morf",
"path": "morf-testsupport/src/main/java/org/alfasoftware/morf/jdbc/AbstractSqlDialectTest.java",
"license": "apache-2.0",
"size": 201465
} | [
"org.alfasoftware.morf.sql.element.Direction"
] | import org.alfasoftware.morf.sql.element.Direction; | import org.alfasoftware.morf.sql.element.*; | [
"org.alfasoftware.morf"
] | org.alfasoftware.morf; | 2,713,440 |
@Override
public boolean logModified(Logger log) {
return _depend.logModified(log);
} | boolean function(Logger log) { return _depend.logModified(log); } | /**
* Returns true if the dependency is modified.
*/ | Returns true if the dependency is modified | logModified | {
"repo_name": "CleverCloud/Bianca",
"path": "bianca/src/main/java/com/clevercloud/vfs/Jar.java",
"license": "gpl-2.0",
"size": 21977
} | [
"java.util.logging.Logger"
] | import java.util.logging.Logger; | import java.util.logging.*; | [
"java.util"
] | java.util; | 1,582,841 |
@Override
public Adapter createSwitchCaseContainerAdapter() {
if (switchCaseContainerItemProvider == null) {
switchCaseContainerItemProvider = new SwitchCaseContainerItemProvider(this);
}
return switchCaseContainerItemProvider;
}
protected SwitchDefaultContainerItemProvider switchDefaultContainerItem... | Adapter function() { if (switchCaseContainerItemProvider == null) { switchCaseContainerItemProvider = new SwitchCaseContainerItemProvider(this); } return switchCaseContainerItemProvider; } protected SwitchDefaultContainerItemProvider switchDefaultContainerItemProvider; | /**
* This creates an adapter for a {@link org.wso2.developerstudio.eclipse.gmf.esb.SwitchCaseContainer}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This creates an adapter for a <code>org.wso2.developerstudio.eclipse.gmf.esb.SwitchCaseContainer</code>. | createSwitchCaseContainerAdapter | {
"repo_name": "rajeevanv89/developer-studio",
"path": "esb/org.wso2.developerstudio.eclipse.gmf.esb.edit/src/org/wso2/developerstudio/eclipse/gmf/esb/provider/EsbItemProviderAdapterFactory.java",
"license": "apache-2.0",
"size": 286852
} | [
"org.eclipse.emf.common.notify.Adapter"
] | import org.eclipse.emf.common.notify.Adapter; | import org.eclipse.emf.common.notify.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,344,679 |
public static void failWithVerboseMessage(final Collection<?> expects,
final Collection<?> actuals)
{
Assert.fail("\nexpect (" + expects.size() + "):\n" + asLined(expects) + "\nbut was (" +
actuals.size() + "):\n" + asLined(actuals));
} | static void function(final Collection<?> expects, final Collection<?> actuals) { Assert.fail(STR + expects.size() + "):\n" + asLined(expects) + STR + actuals.size() + "):\n" + asLined(actuals)); } | /**
* Fails with a verbose error message.
*
* @param expects
* a <code>Collection</code> object
* @param actuals
* a <code>Collection</code> object
*/ | Fails with a verbose error message | failWithVerboseMessage | {
"repo_name": "astubbs/wicket.get-portals2",
"path": "wicket/src/main/java/org/apache/wicket/util/tester/WicketTesterHelper.java",
"license": "apache-2.0",
"size": 4487
} | [
"java.util.Collection",
"junit.framework.Assert"
] | import java.util.Collection; import junit.framework.Assert; | import java.util.*; import junit.framework.*; | [
"java.util",
"junit.framework"
] | java.util; junit.framework; | 923,995 |
public void update(Client client);
| void function(Client client); | /**
* Updates the client with the specified id
*
* @author Coni
* @param client
* @throws BusinessException
*/ | Updates the client with the specified id | update | {
"repo_name": "CodeSphere/termitaria",
"path": "TermitariaCM/src/ro/cs/cm/model/dao/IDaoClient.java",
"license": "agpl-3.0",
"size": 2525
} | [
"ro.cs.cm.entity.Client"
] | import ro.cs.cm.entity.Client; | import ro.cs.cm.entity.*; | [
"ro.cs.cm"
] | ro.cs.cm; | 2,226,171 |
//-----------------------------------------------------------------------
public Curve getCurve() {
return curve;
} | Curve function() { return curve; } | /**
* Gets the Black volatility curve.
* <p>
* The x-value of the curve is the expiry, as a year fraction.
* The y-value of the curve is the volatility.
* @return the value of the property, not null
*/ | Gets the Black volatility curve. The x-value of the curve is the expiry, as a year fraction. The y-value of the curve is the volatility | getCurve | {
"repo_name": "OpenGamma/Strata",
"path": "modules/pricer/src/main/java/com/opengamma/strata/pricer/capfloor/BlackIborCapletFloorletExpiryFlatVolatilities.java",
"license": "apache-2.0",
"size": 18667
} | [
"com.opengamma.strata.market.curve.Curve"
] | import com.opengamma.strata.market.curve.Curve; | import com.opengamma.strata.market.curve.*; | [
"com.opengamma.strata"
] | com.opengamma.strata; | 2,891,964 |
public RunType runType() {
return this.runType;
} | RunType function() { return this.runType; } | /**
* Get the runType property: The type of run.
*
* @return the runType value.
*/ | Get the runType property: The type of run | runType | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/resourcemanagerhybrid/azure-resourcemanager-containerregistry/src/main/java/com/azure/resourcemanager/containerregistry/fluent/models/RunInner.java",
"license": "mit",
"size": 16245
} | [
"com.azure.resourcemanager.containerregistry.models.RunType"
] | import com.azure.resourcemanager.containerregistry.models.RunType; | import com.azure.resourcemanager.containerregistry.models.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 1,728,909 |
@NonNull
public B integration(@NonNull String key, @NonNull Map<String, Object> options) {
assertNotNullOrEmpty(key, "key");
assertNotNullOrEmpty(options, "options");
if (integrationsBuilder == null) {
integrationsBuilder = new LinkedHashMap<>();
... | B function(@NonNull String key, @NonNull Map<String, Object> options) { assertNotNullOrEmpty(key, "key"); assertNotNullOrEmpty(options, STR); if (integrationsBuilder == null) { integrationsBuilder = new LinkedHashMap<>(); } integrationsBuilder.put(key, immutableCopyOf(options)); return self(); } | /**
* Pass in some options that will only be used by the target integration. This will
* implicitly mark the integration as enabled.
*
* @see <a href="https://segment.com/docs/spec/common/#integrations">Integrations</a>
*/ | Pass in some options that will only be used by the target integration. This will implicitly mark the integration as enabled | integration | {
"repo_name": "segmentio/analytics-android",
"path": "analytics/src/main/java/com/segment/analytics/integrations/BasePayload.java",
"license": "mit",
"size": 14855
} | [
"androidx.annotation.NonNull",
"com.segment.analytics.internal.Utils",
"java.util.LinkedHashMap",
"java.util.Map"
] | import androidx.annotation.NonNull; import com.segment.analytics.internal.Utils; import java.util.LinkedHashMap; import java.util.Map; | import androidx.annotation.*; import com.segment.analytics.internal.*; import java.util.*; | [
"androidx.annotation",
"com.segment.analytics",
"java.util"
] | androidx.annotation; com.segment.analytics; java.util; | 2,356,215 |
public Db addTestDb(String dbName, String comment) {
Db db = catalog_.getDb(dbName);
Preconditions.checkState(db == null, "Test db must not already exist.");
db = new Db(dbName, new org.apache.hadoop.hive.metastore.api.Database(
dbName, comment, "", Collections.<String, String>emptyMap()));
ca... | Db function(String dbName, String comment) { Db db = catalog_.getDb(dbName); Preconditions.checkState(db == null, STR); db = new Db(dbName, new org.apache.hadoop.hive.metastore.api.Database( dbName, comment, "", Collections.<String, String>emptyMap())); catalog_.addDb(db); testDbs_.add(db); return db; } | /**
* Add a new dummy database with the given name to the catalog.
* Returns the new dummy database.
* The database is registered in testDbs_ and removed in the @After method.
*/ | Add a new dummy database with the given name to the catalog. Returns the new dummy database. The database is registered in testDbs_ and removed in the @After method | addTestDb | {
"repo_name": "cloudera/Impala",
"path": "fe/src/test/java/org/apache/impala/common/FrontendFixture.java",
"license": "apache-2.0",
"size": 14947
} | [
"com.google.common.base.Preconditions",
"java.util.Collections",
"org.apache.impala.catalog.Db"
] | import com.google.common.base.Preconditions; import java.util.Collections; import org.apache.impala.catalog.Db; | import com.google.common.base.*; import java.util.*; import org.apache.impala.catalog.*; | [
"com.google.common",
"java.util",
"org.apache.impala"
] | com.google.common; java.util; org.apache.impala; | 1,162,971 |
@GET
@Path("/index")
public boolean index(
@QueryParam("clean") boolean clean) {
return new SolrIndexer().indexAll(clean);
}
| @Path(STR) boolean function( @QueryParam("clean") boolean clean) { return new SolrIndexer().indexAll(clean); } | /**
* This resource starts the process that generates the Solr index.
* <ul>
* <li>rest/v1/search/index?clean=true</li>
* </ul>
*
* @param clean If true the index will be completely cleared before
* indexing.
* @return True if the process was ... | This resource starts the process that generates the Solr index. rest/v1/search/index?clean=true | index | {
"repo_name": "PhilippE11/core",
"path": "openinfra_core/src/main/java/de/btu/openinfra/backend/rest/solr/SearchResource.java",
"license": "gpl-3.0",
"size": 7920
} | [
"de.btu.openinfra.backend.solr.SolrIndexer",
"javax.ws.rs.Path",
"javax.ws.rs.QueryParam"
] | import de.btu.openinfra.backend.solr.SolrIndexer; import javax.ws.rs.Path; import javax.ws.rs.QueryParam; | import de.btu.openinfra.backend.solr.*; import javax.ws.rs.*; | [
"de.btu.openinfra",
"javax.ws"
] | de.btu.openinfra; javax.ws; | 2,665,059 |
public void renameJobEntry( JobEntryCopy jobEntry, String newName ) {
JobEntryCopy[] jobs = jobMeta.getAllJobGraphEntries( newName );
if ( jobs != null && jobs.length > 0 ) {
MessageBox mb = new MessageBox( shell, SWT.OK | SWT.ICON_INFORMATION );
mb.setMessage( BaseMessages.getString( PKG, "Spoon.... | void function( JobEntryCopy jobEntry, String newName ) { JobEntryCopy[] jobs = jobMeta.getAllJobGraphEntries( newName ); if ( jobs != null && jobs.length > 0 ) { MessageBox mb = new MessageBox( shell, SWT.OK SWT.ICON_INFORMATION ); mb.setMessage( BaseMessages.getString( PKG, STR, newName ) ); mb.setText( BaseMessages.g... | /**
* Method gets called, when the user wants to change a job entries name and he indeed entered a different name then
* the old one. Make sure that no other job entry matches this name and rename in case of uniqueness.
*
* @param jobEntry
* @param newName
*/ | Method gets called, when the user wants to change a job entries name and he indeed entered a different name then the old one. Make sure that no other job entry matches this name and rename in case of uniqueness | renameJobEntry | {
"repo_name": "IvanNikolaychuk/pentaho-kettle",
"path": "ui/src/org/pentaho/di/ui/spoon/job/JobGraph.java",
"license": "apache-2.0",
"size": 136777
} | [
"org.eclipse.swt.widgets.MessageBox",
"org.pentaho.di.i18n.BaseMessages",
"org.pentaho.di.job.entry.JobEntryCopy"
] | import org.eclipse.swt.widgets.MessageBox; import org.pentaho.di.i18n.BaseMessages; import org.pentaho.di.job.entry.JobEntryCopy; | import org.eclipse.swt.widgets.*; import org.pentaho.di.i18n.*; import org.pentaho.di.job.entry.*; | [
"org.eclipse.swt",
"org.pentaho.di"
] | org.eclipse.swt; org.pentaho.di; | 1,298,796 |
@Override
public Set<String> getActionNames() {
return commands;
} | Set<String> function() { return commands; } | /**
* Gets the ActionNames attribute of the Save object.
*
* @return the ActionNames value
*/ | Gets the ActionNames attribute of the Save object | getActionNames | {
"repo_name": "DoctorQ/jmeter",
"path": "src/core/org/apache/jmeter/gui/action/Save.java",
"license": "apache-2.0",
"size": 19917
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,841,185 |
@Test
public void testCreation() {
final HousePortal portal = new HousePortal("henhouse");
assertNotNull(portal);
assertTrue(portal.isStorable());
assertEquals("henhouse", portal.getDoorId());
assertEquals("house_portal", portal.get("type"));
} | void function() { final HousePortal portal = new HousePortal(STR); assertNotNull(portal); assertTrue(portal.isStorable()); assertEquals(STR, portal.getDoorId()); assertEquals(STR, portal.get("type")); } | /**
* Tests for creation.
*/ | Tests for creation | testCreation | {
"repo_name": "AntumDeluge/arianne-stendhal",
"path": "tests/games/stendhal/server/entity/mapstuff/portal/HousePortalTest.java",
"license": "gpl-2.0",
"size": 5340
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 1,819,256 |
Difficulty getDifficulty(String worldName) throws WorldError; | Difficulty getDifficulty(String worldName) throws WorldError; | /**
* Get the Difficulty of the World
* @param worldName Name of the World
* @return The difficulty of the World
* @throws WorldError Will be thrown if the Plugin don't know the World.
*/ | Get the Difficulty of the World | getDifficulty | {
"repo_name": "Dimmer2222/DLIB",
"path": "src/main/java/com/github/Dimmer2222/DLIB/interfaces/WorldGenerator.java",
"license": "mit",
"size": 5746
} | [
"com.github.Dimmer2222",
"org.bukkit.Difficulty"
] | import com.github.Dimmer2222; import org.bukkit.Difficulty; | import com.github.*; import org.bukkit.*; | [
"com.github",
"org.bukkit"
] | com.github; org.bukkit; | 1,699,788 |
@Override
public Result invoke(Invoker<?> invoker, Invocation invocation) throws RpcException {
if (cacheFactory != null && ConfigUtils.isNotEmpty(invoker.getUrl().getMethodParameter(invocation.getMethodName(), Constants.CACHE_KEY))) {
Cache cache = cacheFactory.getCache(invoker.getUrl(),... | Result function(Invoker<?> invoker, Invocation invocation) throws RpcException { if (cacheFactory != null && ConfigUtils.isNotEmpty(invoker.getUrl().getMethodParameter(invocation.getMethodName(), Constants.CACHE_KEY))) { Cache cache = cacheFactory.getCache(invoker.getUrl(), invocation); if (cache != null) { String key ... | /**
* If cache is configured, dubbo will invoke method on each method call. If cache value is returned by cache store
* then it will return otherwise call the remote method and return value. If remote method's return valeu has error
* then it will not cache the value.
* @param invoker service... | If cache is configured, dubbo will invoke method on each method call. If cache value is returned by cache store then it will return otherwise call the remote method and return value. If remote method's return valeu has error then it will not cache the value | invoke | {
"repo_name": "alibaba/dubbo",
"path": "dubbo-filter/dubbo-filter-cache/src/main/java/org/apache/dubbo/cache/filter/CacheFilter.java",
"license": "apache-2.0",
"size": 5611
} | [
"java.io.Serializable",
"org.apache.dubbo.cache.Cache",
"org.apache.dubbo.common.Constants",
"org.apache.dubbo.common.utils.ConfigUtils",
"org.apache.dubbo.common.utils.StringUtils",
"org.apache.dubbo.rpc.Invocation",
"org.apache.dubbo.rpc.Invoker",
"org.apache.dubbo.rpc.Result",
"org.apache.dubbo.r... | import java.io.Serializable; import org.apache.dubbo.cache.Cache; import org.apache.dubbo.common.Constants; import org.apache.dubbo.common.utils.ConfigUtils; import org.apache.dubbo.common.utils.StringUtils; import org.apache.dubbo.rpc.Invocation; import org.apache.dubbo.rpc.Invoker; import org.apache.dubbo.rpc.Result;... | import java.io.*; import org.apache.dubbo.cache.*; import org.apache.dubbo.common.*; import org.apache.dubbo.common.utils.*; import org.apache.dubbo.rpc.*; | [
"java.io",
"org.apache.dubbo"
] | java.io; org.apache.dubbo; | 2,388,949 |
public Builder setMongoDB(@Nonnull DB db,
int blobCacheSizeMB) {
return setMongoDB(db, new MongoStatus(db), blobCacheSizeMB);
} | Builder function(@Nonnull DB db, int blobCacheSizeMB) { return setMongoDB(db, new MongoStatus(db), blobCacheSizeMB); } | /**
* Use the given MongoDB as backend storage for the DocumentNodeStore.
*
* @param db the MongoDB connection
* @return this
*/ | Use the given MongoDB as backend storage for the DocumentNodeStore | setMongoDB | {
"repo_name": "chetanmeh/jackrabbit-oak",
"path": "oak-store-document/src/main/java/org/apache/jackrabbit/oak/plugins/document/DocumentMK.java",
"license": "apache-2.0",
"size": 54533
} | [
"javax.annotation.Nonnull",
"org.apache.jackrabbit.oak.plugins.document.mongo.MongoStatus"
] | import javax.annotation.Nonnull; import org.apache.jackrabbit.oak.plugins.document.mongo.MongoStatus; | import javax.annotation.*; import org.apache.jackrabbit.oak.plugins.document.mongo.*; | [
"javax.annotation",
"org.apache.jackrabbit"
] | javax.annotation; org.apache.jackrabbit; | 375,994 |
@SuppressWarnings({ "nls", "unused" })
private final boolean loadRelativeSeparator(String pathname)
{
URL url = null;
// Try to remove the leading file separator, if one exist.
if (pathname.startsWith(File.separator))
{
try
{
// Maybe the file pathname is relative.
url = Thread.currentThread... | @SuppressWarnings({ "nls", STR }) final boolean function(String pathname) { URL url = null; if (pathname.startsWith(File.separator)) { try { url = Thread.currentThread().getContextClassLoader().getResource(pathname.replaceFirst(File.separator, STR")); try { directory = new File(url.toURI()); if (directory.getAbsoluteFi... | /**
* Loads the file considering its pathname is relative.
* <hr>
* @param pathname Resource path name.
* @return {@code True} if the resource can be loaded, {@code false} otherwise.
*/ | Loads the file considering its pathname is relative. | loadRelativeSeparator | {
"repo_name": "ressec/athena",
"path": "athena-base/src/main/java/com/heliosphere/athena/base/file/internal/resource/AbstractResource.java",
"license": "apache-2.0",
"size": 5740
} | [
"java.io.File",
"java.io.IOException",
"java.net.URISyntaxException"
] | import java.io.File; import java.io.IOException; import java.net.URISyntaxException; | import java.io.*; import java.net.*; | [
"java.io",
"java.net"
] | java.io; java.net; | 1,883,357 |
RedHxOperatingStatus getMemoryOperatingStatus(); | RedHxOperatingStatus getMemoryOperatingStatus(); | /**
* get the Computer Memory Summary.
*
* @return a null if the system memory was not defined otherwise a the summary.
*/ | get the Computer Memory Summary | getMemoryOperatingStatus | {
"repo_name": "RedHelixOrg/RedHelix-1",
"path": "redhx-build-all/redhx-core-api/src/main/java/org/redhelix/core/computer/system/RedHxComputerMemorySummary.java",
"license": "apache-2.0",
"size": 1191
} | [
"org.redhelix.core.util.RedHxOperatingStatus"
] | import org.redhelix.core.util.RedHxOperatingStatus; | import org.redhelix.core.util.*; | [
"org.redhelix.core"
] | org.redhelix.core; | 500,570 |
public long getRootLsn() {
if (root == null) {
return DbLsn.NULL_LSN;
} else {
return root.getLsn();
}
}
| long function() { if (root == null) { return DbLsn.NULL_LSN; } else { return root.getLsn(); } } | /**
* Get LSN of the rootIN. Obtained without latching, should only be
* accessed while quiescent.
*/ | Get LSN of the rootIN. Obtained without latching, should only be accessed while quiescent | getRootLsn | {
"repo_name": "ckaestne/CIDE",
"path": "CIDE_Samples/cide_samples/Berkeley DB JE/src/com/sleepycat/je/tree/Tree.java",
"license": "gpl-3.0",
"size": 131570
} | [
"com.sleepycat.je.utilint.DbLsn"
] | import com.sleepycat.je.utilint.DbLsn; | import com.sleepycat.je.utilint.*; | [
"com.sleepycat.je"
] | com.sleepycat.je; | 2,649,212 |
public static synchronized Process createProcess(Name name) {
ProcessFactory factory = createProcessFactory(name);
if (factory == null) return null;
return factory.create(name);
} | static synchronized Process function(Name name) { ProcessFactory factory = createProcessFactory(name); if (factory == null) return null; return factory.create(name); } | /**
* Look up an implementation of the named process on the classpath.
*
* @param name Name of the Process to create
* @return created process
*/ | Look up an implementation of the named process on the classpath | createProcess | {
"repo_name": "geotools/geotools",
"path": "modules/unsupported/process/src/main/java/org/geotools/process/Processors.java",
"license": "lgpl-2.1",
"size": 7299
} | [
"org.opengis.feature.type.Name"
] | import org.opengis.feature.type.Name; | import org.opengis.feature.type.*; | [
"org.opengis.feature"
] | org.opengis.feature; | 1,306,411 |
List<Vo> getVosWhereUserIsAdmin(PerunSession perunSession, User user) throws UserNotExistsException, PrivilegeException; | List<Vo> getVosWhereUserIsAdmin(PerunSession perunSession, User user) throws UserNotExistsException, PrivilegeException; | /**
* Returns list of VOs, where the user is an Administrator.
*
* @param perunSession
* @param user
* @return list of VOs, where the user is an Administrator.
* @throws InternalErrorException
* @throws PrivilegeException
* @throws UserNotExistsException
*/ | Returns list of VOs, where the user is an Administrator | getVosWhereUserIsAdmin | {
"repo_name": "zoraseb/perun",
"path": "perun-core/src/main/java/cz/metacentrum/perun/core/api/UsersManager.java",
"license": "bsd-2-clause",
"size": 54525
} | [
"cz.metacentrum.perun.core.api.exceptions.PrivilegeException",
"cz.metacentrum.perun.core.api.exceptions.UserNotExistsException",
"java.util.List"
] | import cz.metacentrum.perun.core.api.exceptions.PrivilegeException; import cz.metacentrum.perun.core.api.exceptions.UserNotExistsException; import java.util.List; | import cz.metacentrum.perun.core.api.exceptions.*; import java.util.*; | [
"cz.metacentrum.perun",
"java.util"
] | cz.metacentrum.perun; java.util; | 1,342,912 |
public ObjectDataSenderBuilder addPageInfo() {
pageInfo = new ObjectDataSenderBuilder(PageInfo.PAGE_QUERY_OBJECT_NAME, PageInfo.class, false);
return this;
}
| ObjectDataSenderBuilder function() { pageInfo = new ObjectDataSenderBuilder(PageInfo.PAGE_QUERY_OBJECT_NAME, PageInfo.class, false); return this; } | /**
* Adds a query to retrieve the full, default PageInfo object
*
* @return ObjectDataSenderBuilder, current object
*
* @since 0.5.0
*/ | Adds a query to retrieve the full, default PageInfo object | addPageInfo | {
"repo_name": "OpenCode4Workspace/Watson-Work-Services-Java-SDK",
"path": "wws-api/src/main/java/org/opencode4workspace/builders/ObjectDataSenderBuilder.java",
"license": "apache-2.0",
"size": 17884
} | [
"org.opencode4workspace.bo.PageInfo"
] | import org.opencode4workspace.bo.PageInfo; | import org.opencode4workspace.bo.*; | [
"org.opencode4workspace.bo"
] | org.opencode4workspace.bo; | 1,992,803 |
public boolean isCreateRenewalAuthorized(ProtocolForm protocolForm); | boolean function(ProtocolForm protocolForm); | /**
* This method is to check whether user is authorized to create renewal
* Also apply rules if any.
* @param protocolForm
* @return
*/ | This method is to check whether user is authorized to create renewal Also apply rules if any | isCreateRenewalAuthorized | {
"repo_name": "vivantech/kc_fixes",
"path": "src/main/java/org/kuali/kra/irb/actions/IrbProtocolActionRequestService.java",
"license": "apache-2.0",
"size": 17752
} | [
"org.kuali.kra.irb.ProtocolForm"
] | import org.kuali.kra.irb.ProtocolForm; | import org.kuali.kra.irb.*; | [
"org.kuali.kra"
] | org.kuali.kra; | 2,654,076 |
public void transitionToIntentCaptureLayout() {
mIntentReviewLayout.setVisibility(View.GONE);
mCaptureLayout.setVisibility(View.VISIBLE);
mCancelLayout.setVisibility(View.GONE);
mMode = MODE_INTENT;
} | void function() { mIntentReviewLayout.setVisibility(View.GONE); mCaptureLayout.setVisibility(View.VISIBLE); mCancelLayout.setVisibility(View.GONE); mMode = MODE_INTENT; } | /**
* Perform a transition to the global intent layout. The current layout
* state of the bottom bar is irrelevant.
*/ | Perform a transition to the global intent layout. The current layout state of the bottom bar is irrelevant | transitionToIntentCaptureLayout | {
"repo_name": "s20121035/rk3288_android5.1_repo",
"path": "packages/apps/Camera2/src/com/android/camera/ui/BottomBar.java",
"license": "gpl-3.0",
"size": 19453
} | [
"android.view.View"
] | import android.view.View; | import android.view.*; | [
"android.view"
] | android.view; | 9,827 |
public void doLeftJoin(final LeftJoin action, final List statements)
throws Exception {
final String srcSchemaName = action.getDataSetSchemaName();
final String srcTableName = action.getLeftTable();
final String trgtSchemaName = action.getRightSchema();
final String trgtTableName = action.getRightTable();... | void function(final LeftJoin action, final List statements) throws Exception { final String srcSchemaName = action.getDataSetSchemaName(); final String srcTableName = action.getLeftTable(); final String trgtSchemaName = action.getRightSchema(); final String trgtTableName = action.getRightTable(); final String mergeTabl... | /**
* Performs an action.
*
* @param action
* the action to perform.
* @param statements
* the list into which statements will be added.
* @throws Exception
* if anything goes wrong.
*/ | Performs an action | doLeftJoin | {
"repo_name": "pubmed2ensembl/MartScript",
"path": "src/org/biomart/builder/controller/dialects/OracleDialect.java",
"license": "lgpl-2.1",
"size": 34195
} | [
"java.util.Iterator",
"java.util.List",
"org.biomart.builder.model.MartConstructorAction"
] | import java.util.Iterator; import java.util.List; import org.biomart.builder.model.MartConstructorAction; | import java.util.*; import org.biomart.builder.model.*; | [
"java.util",
"org.biomart.builder"
] | java.util; org.biomart.builder; | 1,516,122 |
static java.lang.reflect.Type[] resolveActualTypeArguments(final TypeVariable<?>[] vars, final java.lang.reflect.Type[] typeArguments,
final Type<?> reference) {
java.lang.reflect.Type[] actualTypeArguments = new java.lang.reflect.Type[typeArguments.length];
java.lang.reflec... | static java.lang.reflect.Type[] resolveActualTypeArguments(final TypeVariable<?>[] vars, final java.lang.reflect.Type[] typeArguments, final Type<?> reference) { java.lang.reflect.Type[] actualTypeArguments = new java.lang.reflect.Type[typeArguments.length]; java.lang.reflect.Type[] defaultTypeArguments = new java.lang... | /**
* Resolves the array of provided actual type arguments using the actual
* types of the reference type and the type variables list for comparison.
*
* @param vars
* @param typeArguments
* @param reference
* @return
*/ | Resolves the array of provided actual type arguments using the actual types of the reference type and the type variables list for comparison | resolveActualTypeArguments | {
"repo_name": "Log10Solutions/orika",
"path": "core/src/main/java/ma/glasnost/orika/metadata/TypeUtil.java",
"license": "apache-2.0",
"size": 16492
} | [
"java.lang.reflect.TypeVariable"
] | import java.lang.reflect.TypeVariable; | import java.lang.reflect.*; | [
"java.lang"
] | java.lang; | 732,792 |
public static byte[] getNTResponse ( CIFSContext tc, Type2Message type2, String password ) throws GeneralSecurityException {
if ( password == null )
return null;
return getNTResponse(tc, type2, NtlmUtil.getNTHash(password));
} | static byte[] function ( CIFSContext tc, Type2Message type2, String password ) throws GeneralSecurityException { if ( password == null ) return null; return getNTResponse(tc, type2, NtlmUtil.getNTHash(password)); } | /**
* Constructs the NT response to the given Type-2 message using
* the supplied password.
*
* @param tc
* context to use
* @param type2
* The Type-2 message.
* @param password
* The password.
* @return A <code>byte[]</code> containing... | Constructs the NT response to the given Type-2 message using the supplied password | getNTResponse | {
"repo_name": "codelibs/jcifs",
"path": "src/main/java/jcifs/ntlmssp/Type3Message.java",
"license": "lgpl-2.1",
"size": 31310
} | [
"java.security.GeneralSecurityException",
"jcifs.smb.NtlmUtil"
] | import java.security.GeneralSecurityException; import jcifs.smb.NtlmUtil; | import java.security.*; import jcifs.smb.*; | [
"java.security",
"jcifs.smb"
] | java.security; jcifs.smb; | 1,852,036 |
@Deprecated
public void concatenate2CTM(double a, double b, double c, double d, double e, double f) throws IOException
{
transform(new Matrix((float) a, (float) b, (float) c, (float) d, (float) e, (float) f));
} | void function(double a, double b, double c, double d, double e, double f) throws IOException { transform(new Matrix((float) a, (float) b, (float) c, (float) d, (float) e, (float) f)); } | /**
* The cm operator. Concatenates the current transformation matrix with the given values.
* @param a The a value of the matrix.
* @param b The b value of the matrix.
* @param c The c value of the matrix.
* @param d The d value of the matrix.
* @param e The e value of the matrix.
* ... | The cm operator. Concatenates the current transformation matrix with the given values | concatenate2CTM | {
"repo_name": "benmccann/pdfbox",
"path": "pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDPageContentStream.java",
"license": "apache-2.0",
"size": 73640
} | [
"java.io.IOException",
"org.apache.pdfbox.util.Matrix"
] | import java.io.IOException; import org.apache.pdfbox.util.Matrix; | import java.io.*; import org.apache.pdfbox.util.*; | [
"java.io",
"org.apache.pdfbox"
] | java.io; org.apache.pdfbox; | 1,370,662 |
public static IGetDNSContextAsyncWithFuture createAsyncWithFuture(int setFromOs,
HashMap<ContextOptionName, Object> contextOptions) throws GetDNSException {
return createContext(setFromOs, contextOptions);
} | static IGetDNSContextAsyncWithFuture function(int setFromOs, HashMap<ContextOptionName, Object> contextOptions) throws GetDNSException { return createContext(setFromOs, contextOptions); } | /**
* <p>
* Creates a context for calling the API asynchronously using <a href=
* "http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/Future.html"
* target="_blank">Future</a>.<br>
* That is, when an application calls one of these asynchronous functions, the
* API returns a future object which wi... | Creates a context for calling the API asynchronously using Future. That is, when an application calls one of these asynchronous functions, the API returns a future object which will be populated with the response or exception when run() is invoked | createAsyncWithFuture | {
"repo_name": "getdnsapi/getdns-java-bindings",
"path": "src/main/java/com/verisign/getdns/GetDNSFactory.java",
"license": "bsd-3-clause",
"size": 6667
} | [
"java.util.HashMap"
] | import java.util.HashMap; | import java.util.*; | [
"java.util"
] | java.util; | 2,299,983 |
public static IntComparator getComparator(Table table, Sort key) {
Iterator<Map.Entry<String, Sort.Order>> entries = key.iterator();
Map.Entry<String, Sort.Order> sort = entries.next();
Column<?> column = table.column(sort.getKey());
return SortUtils.rowComparator(column, sort.getValue());
} | static IntComparator function(Table table, Sort key) { Iterator<Map.Entry<String, Sort.Order>> entries = key.iterator(); Map.Entry<String, Sort.Order> sort = entries.next(); Column<?> column = table.column(sort.getKey()); return SortUtils.rowComparator(column, sort.getValue()); } | /**
* Returns a comparator that can be used to sort the records in this table according to the given
* sort key
*/ | Returns a comparator that can be used to sort the records in this table according to the given sort key | getComparator | {
"repo_name": "jtablesaw/tablesaw",
"path": "core/src/main/java/tech/tablesaw/sorting/SortUtils.java",
"license": "apache-2.0",
"size": 2028
} | [
"it.unimi.dsi.fastutil.ints.IntComparator",
"java.util.Iterator",
"java.util.Map",
"tech.tablesaw.api.Table",
"tech.tablesaw.columns.Column"
] | import it.unimi.dsi.fastutil.ints.IntComparator; import java.util.Iterator; import java.util.Map; import tech.tablesaw.api.Table; import tech.tablesaw.columns.Column; | import it.unimi.dsi.fastutil.ints.*; import java.util.*; import tech.tablesaw.api.*; import tech.tablesaw.columns.*; | [
"it.unimi.dsi",
"java.util",
"tech.tablesaw.api",
"tech.tablesaw.columns"
] | it.unimi.dsi; java.util; tech.tablesaw.api; tech.tablesaw.columns; | 241,867 |
protected void markStatementsForDeletion(StatementDocument currentDocument,
List<Statement> deleteStatements) {
for (Statement statement : deleteStatements) {
boolean found = false;
for (StatementGroup sg : currentDocument.getStatementGroups()) {
if (!sg.getProperty().equals(
statement.getClaim(... | void function(StatementDocument currentDocument, List<Statement> deleteStatements) { for (Statement statement : deleteStatements) { boolean found = false; for (StatementGroup sg : currentDocument.getStatementGroups()) { if (!sg.getProperty().equals( statement.getClaim().getMainSnak().getPropertyId())) { continue; } Sta... | /**
* Marks the given list of statements for deletion. It is verified that the
* current document actually contains the statements before doing so. This
* check is based on exact statement equality, including qualifier order and
* statement id.
*
* @param currentDocument
* the document with the... | Marks the given list of statements for deletion. It is verified that the current document actually contains the statements before doing so. This check is based on exact statement equality, including qualifier order and statement id | markStatementsForDeletion | {
"repo_name": "notconfusing/Wikidata-Toolkit",
"path": "wdtk-wikibaseapi/src/main/java/org/wikidata/wdtk/wikibaseapi/StatementUpdate.java",
"license": "apache-2.0",
"size": 14299
} | [
"java.util.List",
"org.wikidata.wdtk.datamodel.interfaces.Statement",
"org.wikidata.wdtk.datamodel.interfaces.StatementDocument",
"org.wikidata.wdtk.datamodel.interfaces.StatementGroup"
] | import java.util.List; import org.wikidata.wdtk.datamodel.interfaces.Statement; import org.wikidata.wdtk.datamodel.interfaces.StatementDocument; import org.wikidata.wdtk.datamodel.interfaces.StatementGroup; | import java.util.*; import org.wikidata.wdtk.datamodel.interfaces.*; | [
"java.util",
"org.wikidata.wdtk"
] | java.util; org.wikidata.wdtk; | 2,058,443 |
public void onClick_returnClaim(View v) {
if (comment.getText().toString().equals("")) {
toast("You must add a comment");
} else if (!isApproved && !isReturned) {
toast("You must pick an option");
} else if (isApproved && isReturned) {
toast("Only one option allowed");
} else if (comment.getText().... | void function(View v) { if (comment.getText().toString().equals(STRYou must add a commentSTRYou must pick an optionSTROnly one option allowedSTRYou must leave a comment"); } else { Claim claim = ClaimController.getInstance().getSelectedClaim(); ApproverComment approvercomment = new ApproverComment(); approvercomment.se... | /**
* tells user what is left to fill out before pressing button again
* Submits claim otherwise, before leaving activity for previous activity
* @param v View
*/ | tells user what is left to fill out before pressing button again Submits claim otherwise, before leaving activity for previous activity | onClick_returnClaim | {
"repo_name": "CMPUT301W15T14/ExpenseExpress",
"path": "src/team14/expenseexpress/activity/ReturnClaimActivity.java",
"license": "gpl-3.0",
"size": 3051
} | [
"android.content.Intent",
"android.view.View"
] | import android.content.Intent; import android.view.View; | import android.content.*; import android.view.*; | [
"android.content",
"android.view"
] | android.content; android.view; | 458,764 |
public static final MetricsServiceV2Api create(MetricsServiceV2Settings settings)
throws IOException {
return new MetricsServiceV2Api(settings);
}
protected MetricsServiceV2Api(MetricsServiceV2Settings settings) throws IOException {
this.settings = settings;
this.executor = settings.getExecu... | static final MetricsServiceV2Api function(MetricsServiceV2Settings settings) throws IOException { return new MetricsServiceV2Api(settings); } protected MetricsServiceV2Api(MetricsServiceV2Settings settings) throws IOException { this.settings = settings; this.executor = settings.getExecutorProvider().getOrBuildExecutor(... | /**
* Constructs an instance of MetricsServiceV2Api, using the given settings.
* The channels are created based on the settings passed in, or defaults for any
* settings that are not set.
*/ | Constructs an instance of MetricsServiceV2Api, using the given settings. The channels are created based on the settings passed in, or defaults for any settings that are not set | create | {
"repo_name": "tangiel/google-cloud-java",
"path": "google-cloud-logging/src/main/java/com/google/cloud/logging/spi/v2/MetricsServiceV2Api.java",
"license": "apache-2.0",
"size": 23789
} | [
"com.google.api.gax.grpc.ApiCallable",
"java.io.IOException"
] | import com.google.api.gax.grpc.ApiCallable; import java.io.IOException; | import com.google.api.gax.grpc.*; import java.io.*; | [
"com.google.api",
"java.io"
] | com.google.api; java.io; | 88,756 |
public Options withFrequency(Policy policy, Duration frequency) {
this.schedulingPolicy = policy;
this.frequencyMillis = frequency.toMillis();
return this;
} | Options function(Policy policy, Duration frequency) { this.schedulingPolicy = policy; this.frequencyMillis = frequency.toMillis(); return this; } | /**
* Configure the task to execute repeatedly.
*
* @param policy
* Repetition schedulingPolicy to use for the task. See {@link Policy} for the
* supported options.
* @param frequency
* How frequently to repeat the execution. The interpretation of this
* parameter... | Configure the task to execute repeatedly | withFrequency | {
"repo_name": "Netflix/spectator",
"path": "spectator-api/src/main/java/com/netflix/spectator/impl/Scheduler.java",
"license": "apache-2.0",
"size": 16685
} | [
"java.time.Duration"
] | import java.time.Duration; | import java.time.*; | [
"java.time"
] | java.time; | 2,522,458 |
public void setSettlementDate(ZonedDateTime settlementDate) {
JodaBeanUtils.notNull(settlementDate, "settlementDate");
this._settlementDate = settlementDate;
} | void function(ZonedDateTime settlementDate) { JodaBeanUtils.notNull(settlementDate, STR); this._settlementDate = settlementDate; } | /**
* Sets the settlement date.
* @param settlementDate the new value of the property, not null
*/ | Sets the settlement date | setSettlementDate | {
"repo_name": "McLeodMoores/starling",
"path": "projects/financial-types/src/main/java/com/opengamma/financial/security/option/FXDigitalOptionSecurity.java",
"license": "apache-2.0",
"size": 22282
} | [
"org.joda.beans.JodaBeanUtils",
"org.threeten.bp.ZonedDateTime"
] | import org.joda.beans.JodaBeanUtils; import org.threeten.bp.ZonedDateTime; | import org.joda.beans.*; import org.threeten.bp.*; | [
"org.joda.beans",
"org.threeten.bp"
] | org.joda.beans; org.threeten.bp; | 2,180,970 |
DatanodeRegistration createBPRegistration(NamespaceInfo nsInfo) {
StorageInfo storageInfo = storage.getBPStorage(nsInfo.getBlockPoolID());
if (storageInfo == null) {
// it's null in the case of SimulatedDataSet
storageInfo = new StorageInfo(
DataNodeLayoutVersion.CURRENT_LAYOUT_VERSION,
... | DatanodeRegistration createBPRegistration(NamespaceInfo nsInfo) { StorageInfo storageInfo = storage.getBPStorage(nsInfo.getBlockPoolID()); if (storageInfo == null) { storageInfo = new StorageInfo( DataNodeLayoutVersion.CURRENT_LAYOUT_VERSION, nsInfo.getNamespaceID(), nsInfo.clusterID, nsInfo.getCTime(), NodeType.DATA_N... | /**
* Create a DatanodeRegistration for a specific block pool.
* @param nsInfo the namespace info from the first part of the NN handshake
*/ | Create a DatanodeRegistration for a specific block pool | createBPRegistration | {
"repo_name": "GeLiXin/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/DataNode.java",
"license": "apache-2.0",
"size": 133328
} | [
"org.apache.hadoop.hdfs.protocol.DatanodeID",
"org.apache.hadoop.hdfs.security.token.block.ExportedBlockKeys",
"org.apache.hadoop.hdfs.server.common.HdfsServerConstants",
"org.apache.hadoop.hdfs.server.common.StorageInfo",
"org.apache.hadoop.hdfs.server.protocol.DatanodeRegistration",
"org.apache.hadoop.h... | import org.apache.hadoop.hdfs.protocol.DatanodeID; import org.apache.hadoop.hdfs.security.token.block.ExportedBlockKeys; import org.apache.hadoop.hdfs.server.common.HdfsServerConstants; import org.apache.hadoop.hdfs.server.common.StorageInfo; import org.apache.hadoop.hdfs.server.protocol.DatanodeRegistration; import or... | import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.security.token.block.*; import org.apache.hadoop.hdfs.server.common.*; import org.apache.hadoop.hdfs.server.protocol.*; import org.apache.hadoop.util.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 705,072 |
public int getMonth(final Calendar calendar) {
return get(calendar, Calendar.MONTH);
} | int function(final Calendar calendar) { return get(calendar, Calendar.MONTH); } | /**
* Retrieves the month field of the given <code>Calendar</code>.
*
* @param calendar the <code>Calendar</code> from which to get the field value
* @return the month field value
*/ | Retrieves the month field of the given <code>Calendar</code> | getMonth | {
"repo_name": "chillenious/commons",
"path": "core/src/main/java/com/chillenious/common/util/Time.java",
"license": "mit",
"size": 16348
} | [
"java.util.Calendar"
] | import java.util.Calendar; | import java.util.*; | [
"java.util"
] | java.util; | 2,496,073 |
public static CriteriaTemplate findBytypeId_First(int criteria_type_id,
OrderByComparator<CriteriaTemplate> orderByComparator)
throws tj.criterias.exception.NoSuchCriteriaTemplateException {
return getPersistence()
.findBytypeId_First(criteria_type_id, orderByComparator);
} | static CriteriaTemplate function(int criteria_type_id, OrderByComparator<CriteriaTemplate> orderByComparator) throws tj.criterias.exception.NoSuchCriteriaTemplateException { return getPersistence() .findBytypeId_First(criteria_type_id, orderByComparator); } | /**
* Returns the first criteria template in the ordered set where criteria_type_id = ?.
*
* @param criteria_type_id the criteria_type_id
* @param orderByComparator the comparator to order the set by (optionally <code>null</code>)
* @return the first matching criteria template
* @throws NoSuchCriteriaTemplate... | Returns the first criteria template in the ordered set where criteria_type_id = ? | findBytypeId_First | {
"repo_name": "falko0000/moduleEProc",
"path": "Criterias/Criterias-api/src/main/java/tj/criterias/service/persistence/CriteriaTemplateUtil.java",
"license": "lgpl-2.1",
"size": 34445
} | [
"com.liferay.portal.kernel.util.OrderByComparator"
] | import com.liferay.portal.kernel.util.OrderByComparator; | import com.liferay.portal.kernel.util.*; | [
"com.liferay.portal"
] | com.liferay.portal; | 114,695 |
public int readNext(int offset, boolean ignoreComments) throws CoreException {
setOffset(offset);
return readNext(ignoreComments);
} | int function(int offset, boolean ignoreComments) throws CoreException { setOffset(offset); return readNext(ignoreComments); } | /**
* Reads the next token from the given offset.
* @param offset The offset to start reading from.
* @param ignoreComments If set, comments will be overread.
* @return Returns the token id.
* @exception CoreException Thrown when the end of the file has been reached (code END_OF_FILE)
* or a lexical error w... | Reads the next token from the given offset | readNext | {
"repo_name": "Niky4000/UsefulUtils",
"path": "projects/others/eclipse-platform-parent/eclipse.jdt.core-master/org.eclipse.jdt.core/dom/org/eclipse/jdt/internal/core/dom/rewrite/TokenScanner.java",
"license": "gpl-3.0",
"size": 8444
} | [
"org.eclipse.core.runtime.CoreException"
] | import org.eclipse.core.runtime.CoreException; | import org.eclipse.core.runtime.*; | [
"org.eclipse.core"
] | org.eclipse.core; | 2,503,352 |
@Deprecated
public static <C> Either<Exception, C> either(Callable<C> c) {
try {
return Either.right(c.call());
} catch (Exception e) {
return Either.left(e);
}
} | static <C> Either<Exception, C> function(Callable<C> c) { try { return Either.right(c.call()); } catch (Exception e) { return Either.left(e); } } | /**
* Capture the "evaluate something and return it wrapped in an Either.right if successful, or return a thrown
* exception as Either.left if not successful.
*/ | Capture the "evaluate something and return it wrapped in an Either.right if successful, or return a thrown exception as Either.left if not successful | either | {
"repo_name": "statsbiblioteket/digital-pligtaflevering-aviser-tools",
"path": "main/dpa-doms/src/test/java/dk/statsbiblioteket/digital_pligtaflevering_aviser/doms/ToolResultsReportTest.java",
"license": "apache-2.0",
"size": 15303
} | [
"io.vavr.control.Either",
"java.util.concurrent.Callable"
] | import io.vavr.control.Either; import java.util.concurrent.Callable; | import io.vavr.control.*; import java.util.concurrent.*; | [
"io.vavr.control",
"java.util"
] | io.vavr.control; java.util; | 1,509,734 |
StatementGroup getStatementGroup(List<Statement> statements); | StatementGroup getStatementGroup(List<Statement> statements); | /**
* Creates a {@link StatementGroup}.
*
* @param statements
* a non-empty list of statements that use the same subject and
* main-snak property in their claim
* @return a {@link StatementGroup} corresponding to the input
*/ | Creates a <code>StatementGroup</code> | getStatementGroup | {
"repo_name": "zazi/Wikidata-Toolkit",
"path": "wdtk-datamodel/src/main/java/org/wikidata/wdtk/datamodel/interfaces/DataObjectFactory.java",
"license": "apache-2.0",
"size": 11503
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,909,592 |
protected Launcher createLauncher(BuildListener listener) throws IOException, InterruptedException {
return getCurrentNode().createLauncher(listener);
} | Launcher function(BuildListener listener) throws IOException, InterruptedException { return getCurrentNode().createLauncher(listener); } | /**
* Creates a {@link Launcher} that this build will use. This can be overridden by derived types
* to decorate the resulting {@link Launcher}.
*
* @param listener
* Always non-null. Connected to the main build output.
*/ | Creates a <code>Launcher</code> that this build will use. This can be overridden by derived types to decorate the resulting <code>Launcher</code> | createLauncher | {
"repo_name": "fujibee/hudson",
"path": "core/src/main/java/hudson/model/AbstractBuild.java",
"license": "mit",
"size": 32205
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,520,280 |
public void init(ServletConfig config) throws ServletException
{
super.init(config);
M_log.info("init()");
defaultReturnUrl = ServerConfigurationService.getString("portalPath", "/portal");
} | void function(ServletConfig config) throws ServletException { super.init(config); M_log.info(STR); defaultReturnUrl = ServerConfigurationService.getString(STR, STR); } | /**
* Initialize the servlet.
*
* @param config
* The servlet config.
* @throws ServletException
*/ | Initialize the servlet | init | {
"repo_name": "marktriggs/nyu-sakai-10.4",
"path": "login/login-tool/tool/src/java/org/sakaiproject/login/tool/ContainerLogin.java",
"license": "apache-2.0",
"size": 4698
} | [
"javax.servlet.ServletConfig",
"javax.servlet.ServletException",
"org.sakaiproject.component.cover.ServerConfigurationService"
] | import javax.servlet.ServletConfig; import javax.servlet.ServletException; import org.sakaiproject.component.cover.ServerConfigurationService; | import javax.servlet.*; import org.sakaiproject.component.cover.*; | [
"javax.servlet",
"org.sakaiproject.component"
] | javax.servlet; org.sakaiproject.component; | 2,121,600 |
private UUID generateId() {
return UUID.randomUUID();
} | UUID function() { return UUID.randomUUID(); } | /**
* generate random UUID
*
* @return UUID
*/ | generate random UUID | generateId | {
"repo_name": "krzysztof-kabala/TomatoApp",
"path": "src/as/tomatoapp/service/SaleProvider.java",
"license": "mit",
"size": 2548
} | [
"java.util.UUID"
] | import java.util.UUID; | import java.util.*; | [
"java.util"
] | java.util; | 2,595,771 |
void setup(OperatorContext context, OutputMutator output) throws ExecutionSetupException; | void setup(OperatorContext context, OutputMutator output) throws ExecutionSetupException; | /**
* Configure the RecordReader with the provided schema and the record batch that should be written to.
*
* @param context operator context for the reader
* @param output
* The place where output for a particular scan should be written. The record reader is responsible for
* mutati... | Configure the RecordReader with the provided schema and the record batch that should be written to | setup | {
"repo_name": "hnfgns/incubator-drill",
"path": "exec/java-exec/src/main/java/org/apache/drill/exec/store/RecordReader.java",
"license": "apache-2.0",
"size": 2216
} | [
"org.apache.drill.common.exceptions.ExecutionSetupException",
"org.apache.drill.exec.ops.OperatorContext",
"org.apache.drill.exec.physical.impl.OutputMutator"
] | import org.apache.drill.common.exceptions.ExecutionSetupException; import org.apache.drill.exec.ops.OperatorContext; import org.apache.drill.exec.physical.impl.OutputMutator; | import org.apache.drill.common.exceptions.*; import org.apache.drill.exec.ops.*; import org.apache.drill.exec.physical.impl.*; | [
"org.apache.drill"
] | org.apache.drill; | 1,462,087 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.