method stringlengths 13 441k | clean_method stringlengths 7 313k | doc stringlengths 17 17.3k | comment stringlengths 3 1.42k | method_name stringlengths 1 273 | extra dict | imports list | imports_info stringlengths 19 34.8k | cluster_imports_info stringlengths 15 3.66k | libraries list | libraries_info stringlengths 6 661 | id int64 0 2.92M |
|---|---|---|---|---|---|---|---|---|---|---|---|
public KeywordDefinition getFirstKeyword(KeywordDefinition keyword) {
List<KeywordDefinition> keywordsList = getAllKeywords(keyword);
if (keywordsList.size() > 0)
return keywordsList.get(0);
else
return null;
} | KeywordDefinition function(KeywordDefinition keyword) { List<KeywordDefinition> keywordsList = getAllKeywords(keyword); if (keywordsList.size() > 0) return keywordsList.get(0); else return null; } | /**
* Get the first occurrence of the given keyword on the API
*
* @param keyword Keyword object
* @return keyword if the keyword/type is present in the API, otherwise,
* null
*/ | Get the first occurrence of the given keyword on the API | getFirstKeyword | {
"repo_name": "saltlab/Pangor",
"path": "js-learning/src/ca/ubc/ece/salt/pangor/learning/apis/AbstractAPI.java",
"license": "apache-2.0",
"size": 6775
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 721,320 |
public static Properties loadProperties (final Class serviceClass,
final ClassLoader loader, final Properties defsmap, boolean debug)
{
if (serviceClass==null) throw new IllegalArgumentException("service class is null");
if (defsmap==null) throw new IllegalArgumentException("map is null");
i... | static Properties function (final Class serviceClass, final ClassLoader loader, final Properties defsmap, boolean debug) { if (serviceClass==null) throw new IllegalArgumentException(STR); if (defsmap==null) throw new IllegalArgumentException(STR); if (loader==null) throw new IllegalArgumentException(STR); final String ... | /**
* Gets the properties for the passed class.
* All the files with as name the Class.getName() value
* is searched in the class path under the
* META-INF/services/ path.
* If at least one file with at least one property
* is found, an Hashtable of properties is returned,
* otherwise... | Gets the properties for the passed class. All the files with as name the Class.getName() value is searched in the class path under the META-INF/services/ path. If at least one file with at least one property is found, an Hashtable of properties is returned, otherwise null is returned | loadProperties | {
"repo_name": "eleumik/eleusoft_jaxs",
"path": "src/main/java/org/eleusoft/jaxs/PropertiesLoader.java",
"license": "apache-2.0",
"size": 8558
} | [
"java.io.IOException",
"java.io.InputStream",
"java.util.Enumeration",
"java.util.Properties",
"java.util.Vector"
] | import java.io.IOException; import java.io.InputStream; import java.util.Enumeration; import java.util.Properties; import java.util.Vector; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 2,512,073 |
public final int[] getSampleSize()
{
int size = DataBuffer.getDataTypeSize(getDataType());
int[] sizes = new int[numBands];
java.util.Arrays.fill(sizes, size);
return sizes;
} | final int[] function() { int size = DataBuffer.getDataTypeSize(getDataType()); int[] sizes = new int[numBands]; java.util.Arrays.fill(sizes, size); return sizes; } | /**
* Returns the size in bits for each sample (one per band). For this sample
* model, each band has the same sample size and this is determined by the
* data type for the sample model.
*
* @return The sample sizes.
*
* @see SampleModel#getDataType()
*/ | Returns the size in bits for each sample (one per band). For this sample model, each band has the same sample size and this is determined by the data type for the sample model | getSampleSize | {
"repo_name": "SanDisk-Open-Source/SSD_Dashboard",
"path": "uefi/gcc/gcc-4.6.3/libjava/classpath/java/awt/image/ComponentSampleModel.java",
"license": "gpl-2.0",
"size": 26287
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 366,256 |
protected String readString(int n, Charset charset) throws IOException {
if (n > 0) {
return mTiffStream.readString(n, charset);
} else {
return "";
}
} | String function(int n, Charset charset) throws IOException { if (n > 0) { return mTiffStream.readString(n, charset); } else { return ""; } } | /**
* Reads a String from the InputStream with the given charset. The parser
* will read n bytes and convert it to string. This is used for reading
* values of type {@link ExifTag#TYPE_ASCII}.
*/ | Reads a String from the InputStream with the given charset. The parser will read n bytes and convert it to string. This is used for reading values of type <code>ExifTag#TYPE_ASCII</code> | readString | {
"repo_name": "honeyflyfish/qksms",
"path": "QKSMS/src/main/java/com/moez/QKSMS/exif/ExifParser.java",
"license": "gpl-3.0",
"size": 34386
} | [
"java.io.IOException",
"java.nio.charset.Charset"
] | import java.io.IOException; import java.nio.charset.Charset; | import java.io.*; import java.nio.charset.*; | [
"java.io",
"java.nio"
] | java.io; java.nio; | 1,941,801 |
private void writeObject(ObjectOutputStream stream) throws IOException {
stream.defaultWriteObject();
SerialUtils.writePaint(this.arrowPaint, stream);
SerialUtils.writeStroke(this.arrowStroke, stream);
} | void function(ObjectOutputStream stream) throws IOException { stream.defaultWriteObject(); SerialUtils.writePaint(this.arrowPaint, stream); SerialUtils.writeStroke(this.arrowStroke, stream); } | /**
* Provides serialization support.
*
* @param stream the output stream.
*
* @throws IOException if there is an I/O error.
*/ | Provides serialization support | writeObject | {
"repo_name": "jfree/jfreechart",
"path": "src/main/java/org/jfree/chart/annotations/CategoryPointerAnnotation.java",
"license": "lgpl-2.1",
"size": 16810
} | [
"java.io.IOException",
"java.io.ObjectOutputStream",
"org.jfree.chart.internal.SerialUtils"
] | import java.io.IOException; import java.io.ObjectOutputStream; import org.jfree.chart.internal.SerialUtils; | import java.io.*; import org.jfree.chart.internal.*; | [
"java.io",
"org.jfree.chart"
] | java.io; org.jfree.chart; | 2,559,607 |
@Test
public void testSendPartialBatchFailure() throws Exception {
int batchSize = 5;
int failedMsgCount = 1;
int expectedSuccessCount = batchSize - failedMsgCount;
BatchSQSMsgSender sqsMsgSender =
new BatchSQSMsgSender("https://some-fake/url", "us-east-1", "someAwsA... | void function() throws Exception { int batchSize = 5; int failedMsgCount = 1; int expectedSuccessCount = batchSize - failedMsgCount; BatchSQSMsgSender sqsMsgSender = new BatchSQSMsgSender(STRSome message payload"; byte[] mockMsgPayload = msgBody.getBytes(); Event mockEvent = Mockito.mock(Event.class); when(mockEvent.ge... | /**
* Tests the {@link BatchSQSMsgSender#send(org.apache.flume.Channel)} method. Tests the failure scenario when
* certain messages in the batch failed to be delivered to SQS.
* <p>
* <pre>
* Expected:
* - No EventDeliveryException is thrown
* - The BatchSQSMsgSender returns successfu... | Tests the <code>BatchSQSMsgSender#send(org.apache.flume.Channel)</code> method. Tests the failure scenario when certain messages in the batch failed to be delivered to SQS. <code> Expected: - No EventDeliveryException is thrown - The BatchSQSMsgSender returns successfully processed events count </code> | testSendPartialBatchFailure | {
"repo_name": "dpandya/flume-ng-aws-sqs-sink",
"path": "src/test/java/com/dushyant/flume/sink/aws/sqs/BatchSQSMsgSenderTest.java",
"license": "apache-2.0",
"size": 24691
} | [
"org.apache.flume.Channel",
"org.apache.flume.Event",
"org.junit.Assert",
"org.mockito.Mockito"
] | import org.apache.flume.Channel; import org.apache.flume.Event; import org.junit.Assert; import org.mockito.Mockito; | import org.apache.flume.*; import org.junit.*; import org.mockito.*; | [
"org.apache.flume",
"org.junit",
"org.mockito"
] | org.apache.flume; org.junit; org.mockito; | 490,368 |
public static Date parseDate(
String dateValue,
Collection<String> dateFormats,
Date startDate
) throws DateParseException {
if (dateValue == null) {
throw new IllegalArgumentException("dateValue is null");
}
if (dateFormats == null) {
... | static Date function( String dateValue, Collection<String> dateFormats, Date startDate ) throws DateParseException { if (dateValue == null) { throw new IllegalArgumentException(STR); } if (dateFormats == null) { dateFormats = DEFAULT_PATTERNS; } if (startDate == null) { startDate = DEFAULT_TWO_DIGIT_YEAR_START; } if (d... | /**
* Parses the date value using the given date formats.
*
* @param dateValue the date value to parse
* @param dateFormats the date formats to use
* @param startDate During parsing, two digit years will be placed in the range
* <code>startDate</code> to <code>startD... | Parses the date value using the given date formats | parseDate | {
"repo_name": "jroper/async-http-client",
"path": "api/src/main/java/org/asynchttpclient/util/DateUtil.java",
"license": "apache-2.0",
"size": 8768
} | [
"java.text.ParseException",
"java.text.SimpleDateFormat",
"java.util.Collection",
"java.util.Date",
"java.util.Iterator",
"java.util.Locale",
"java.util.TimeZone"
] | import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Collection; import java.util.Date; import java.util.Iterator; import java.util.Locale; import java.util.TimeZone; | import java.text.*; import java.util.*; | [
"java.text",
"java.util"
] | java.text; java.util; | 187,218 |
private void storeStreamingMusicItem(
final File sourceFile,
final File destinationFile,
final JSONObject metaData) throws ConverterExecutionException,
ConvertingFailedException {
// create the parental directories
final File musicItemFileDir = destina... | void function( final File sourceFile, final File destinationFile, final JSONObject metaData) throws ConverterExecutionException, ConvertingFailedException { final File musicItemFileDir = destinationFile.getParentFile(); if (musicItemFileDir != null) { musicItemFileDir.mkdirs(); } @SuppressWarnings(STR) final AvconvComm... | /**
* store the streaming version of a music item having a certain bit rate
*
* @param sourceFile
* music file to be converted
* @param destinationFile
* target file for the converted version
* @param metaData
* meta data to be written to the des... | store the streaming version of a music item having a certain bit rate | storeStreamingMusicItem | {
"repo_name": "Metalcon/musicStorageServer",
"path": "src/main/java/de/metalcon/musicStorageServer/MusicStorageServer.java",
"license": "gpl-3.0",
"size": 20812
} | [
"de.metalcon.musicStorageServer.converting.AvconvCommand",
"de.metalcon.musicStorageServer.converting.exceptions.ConverterExecutionException",
"de.metalcon.musicStorageServer.converting.exceptions.ConvertingFailedException",
"java.io.File",
"org.json.simple.JSONObject"
] | import de.metalcon.musicStorageServer.converting.AvconvCommand; import de.metalcon.musicStorageServer.converting.exceptions.ConverterExecutionException; import de.metalcon.musicStorageServer.converting.exceptions.ConvertingFailedException; import java.io.File; import org.json.simple.JSONObject; | import de.metalcon.*; import java.io.*; import org.json.simple.*; | [
"de.metalcon",
"java.io",
"org.json.simple"
] | de.metalcon; java.io; org.json.simple; | 881,190 |
public static void validateCosmosDBConf(Configuration conf)
throws YarnException {
if (conf == null) {
throw new NullPointerException("Configuration cannot be null");
}
if (isNullOrEmpty(conf.get(TIMELINE_SERVICE_COSMOSDB_ENDPOINT),
conf.get(TIMELINE_SERVICE_COSMOSDB_MASTER_KEY))) {
... | static void function(Configuration conf) throws YarnException { if (conf == null) { throw new NullPointerException(STR); } if (isNullOrEmpty(conf.get(TIMELINE_SERVICE_COSMOSDB_ENDPOINT), conf.get(TIMELINE_SERVICE_COSMOSDB_MASTER_KEY))) { throw new YarnException(STR + STR); } } | /**
* Checks whether the cosmosdb conf are set properly in yarn-site.xml conf.
* @param conf
* related to yarn
* @throws YarnException if required config properties are missing
*/ | Checks whether the cosmosdb conf are set properly in yarn-site.xml conf | validateCosmosDBConf | {
"repo_name": "lukmajercak/hadoop",
"path": "hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-timelineservice-documentstore/src/main/java/org/apache/hadoop/yarn/server/timelineservice/documentstore/DocumentStoreUtils.java",
"license": "apache-2.0",
"size": 19160
} | [
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.yarn.exceptions.YarnException"
] | import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.yarn.exceptions.YarnException; | import org.apache.hadoop.conf.*; import org.apache.hadoop.yarn.exceptions.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 605,597 |
public void removeRolleFromAllOrganisationseinheiten(RolleId _rolleId) throws StdException
{
PreparedStatement pst = getPstRemoveRolleFromAllOrganisationsEinheiten();
pst.setRolleId(1, _rolleId);
pst.execute();
pst.close();
} | void function(RolleId _rolleId) throws StdException { PreparedStatement pst = getPstRemoveRolleFromAllOrganisationsEinheiten(); pst.setRolleId(1, _rolleId); pst.execute(); pst.close(); } | /**
* Entzieht allen Personen die Berechtigungen der ggb. Rolle in Bezug auf
* *alle* Organisationseinheiten.
*
* @param _rolleId
* @throws StdException
*/ | Entzieht allen Personen die Berechtigungen der ggb. Rolle in Bezug auf alle* Organisationseinheiten | removeRolleFromAllOrganisationseinheiten | {
"repo_name": "schakko/zabos",
"path": "src/zabos/src/main/java/de/ecw/zabos/sql/dao/OrganisationsEinheitDAO.java",
"license": "gpl-3.0",
"size": 23825
} | [
"de.ecw.zabos.exceptions.StdException",
"de.ecw.zabos.sql.util.PreparedStatement",
"de.ecw.zabos.types.id.RolleId"
] | import de.ecw.zabos.exceptions.StdException; import de.ecw.zabos.sql.util.PreparedStatement; import de.ecw.zabos.types.id.RolleId; | import de.ecw.zabos.exceptions.*; import de.ecw.zabos.sql.util.*; import de.ecw.zabos.types.id.*; | [
"de.ecw.zabos"
] | de.ecw.zabos; | 1,611,067 |
TestWaiter.waitFor(new Callable<Integer>() { | TestWaiter.waitFor(new Callable<Integer>() { | /**
* Wait for the registry to have exactly nodeNumber nodes registered.
*
* @param r
* @param nodeNumber
*/ | Wait for the registry to have exactly nodeNumber nodes registered | waitForNode | {
"repo_name": "vinay-qa/vinayit-android-server-apk",
"path": "java/server/test/org/openqa/grid/e2e/utils/RegistryTestHelper.java",
"license": "apache-2.0",
"size": 2038
} | [
"java.util.concurrent.Callable",
"org.openqa.selenium.TestWaiter"
] | import java.util.concurrent.Callable; import org.openqa.selenium.TestWaiter; | import java.util.concurrent.*; import org.openqa.selenium.*; | [
"java.util",
"org.openqa.selenium"
] | java.util; org.openqa.selenium; | 908,904 |
public Observable<ServiceResponse<KeyBundle>> getKeyWithServiceResponseAsync(String vaultBaseUrl, String keyName, String keyVersion) {
if (vaultBaseUrl == null) {
throw new IllegalArgumentException("Parameter vaultBaseUrl is required and cannot be null.");
}
if (keyName == null) ... | Observable<ServiceResponse<KeyBundle>> function(String vaultBaseUrl, String keyName, String keyVersion) { if (vaultBaseUrl == null) { throw new IllegalArgumentException(STR); } if (keyName == null) { throw new IllegalArgumentException(STR); } if (keyVersion == null) { throw new IllegalArgumentException(STR); } if (this... | /**
* Gets the public part of a stored key. The get key operation is applicable to all key types. If the requested key is symmetric, then no key material is released in the response. Authorization: Requires the keys/get permission.
*
* @param vaultBaseUrl The vault name, for example https://myvault.vault... | Gets the public part of a stored key. The get key operation is applicable to all key types. If the requested key is symmetric, then no key material is released in the response. Authorization: Requires the keys/get permission | getKeyWithServiceResponseAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/keyvault/microsoft-azure-keyvault/src/main/java/com/microsoft/azure/keyvault/KeyVaultClientImpl.java",
"license": "mit",
"size": 398315
} | [
"com.microsoft.azure.keyvault.models.KeyBundle",
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.azure.keyvault.models.KeyBundle; import com.microsoft.rest.ServiceResponse; | import com.microsoft.azure.keyvault.models.*; import com.microsoft.rest.*; | [
"com.microsoft.azure",
"com.microsoft.rest"
] | com.microsoft.azure; com.microsoft.rest; | 2,374,985 |
@Test
public void testSimpleMixed() throws Exception {
String q = query + "b = filter a by srcid == 10 and name == 'foo';" + "store b into 'out';";
test(q, Arrays.asList("srcid"), "(srcid == 10)", "(name == 'foo')");
} | void function() throws Exception { String q = query + STR + STR; test(q, Arrays.asList("srcid"), STR, STR); } | /**
* test case where there is a single expression on partition columns in
* the filter expression along with an expression on non partition column
* @throws Exception
*/ | test case where there is a single expression on partition columns in the filter expression along with an expression on non partition column | testSimpleMixed | {
"repo_name": "dmeister/pig-cll-gz",
"path": "test/org/apache/pig/test/TestPartitionFilterPushDown.java",
"license": "apache-2.0",
"size": 28574
} | [
"java.util.Arrays"
] | import java.util.Arrays; | import java.util.*; | [
"java.util"
] | java.util; | 2,168,487 |
@Test
public void testProcessReceivedLsa() throws Exception {
LsaWrapperImpl lsaWrapper = new LsaWrapperImpl();
LsdbAgeImpl lsdbAge = new LsdbAgeImpl(new OspfAreaImpl());
lsdbAge.ageLsaAndFlood();
lsaWrapper.setLsdbAge(lsdbAge);
lsaWrapper.setLsaHeader(new NetworkLsa());
... | void function() throws Exception { LsaWrapperImpl lsaWrapper = new LsaWrapperImpl(); LsdbAgeImpl lsdbAge = new LsdbAgeImpl(new OspfAreaImpl()); lsdbAge.ageLsaAndFlood(); lsaWrapper.setLsdbAge(lsdbAge); lsaWrapper.setLsaHeader(new NetworkLsa()); RouterLsa routerlsa = new RouterLsa(); routerlsa.setLsType(1); routerlsa.se... | /**
* Tests processReceivedLsa() method.
*/ | Tests processReceivedLsa() method | testProcessReceivedLsa | {
"repo_name": "Phaneendra-Huawei/demo",
"path": "protocols/ospf/ctl/src/test/java/org/onosproject/ospf/controller/impl/OspfNbrImplTest.java",
"license": "apache-2.0",
"size": 21601
} | [
"org.easymock.EasyMock",
"org.hamcrest.CoreMatchers",
"org.hamcrest.MatcherAssert",
"org.jboss.netty.channel.Channel",
"org.onlab.packet.Ip4Address",
"org.onosproject.ospf.controller.OspfLsaType",
"org.onosproject.ospf.controller.area.OspfAreaImpl",
"org.onosproject.ospf.controller.lsdb.LsaWrapperImpl... | import org.easymock.EasyMock; import org.hamcrest.CoreMatchers; import org.hamcrest.MatcherAssert; import org.jboss.netty.channel.Channel; import org.onlab.packet.Ip4Address; import org.onosproject.ospf.controller.OspfLsaType; import org.onosproject.ospf.controller.area.OspfAreaImpl; import org.onosproject.ospf.control... | import org.easymock.*; import org.hamcrest.*; import org.jboss.netty.channel.*; import org.onlab.packet.*; import org.onosproject.ospf.controller.*; import org.onosproject.ospf.controller.area.*; import org.onosproject.ospf.controller.lsdb.*; import org.onosproject.ospf.protocol.lsa.types.*; import org.onosproject.ospf... | [
"org.easymock",
"org.hamcrest",
"org.jboss.netty",
"org.onlab.packet",
"org.onosproject.ospf"
] | org.easymock; org.hamcrest; org.jboss.netty; org.onlab.packet; org.onosproject.ospf; | 752,408 |
protected int addNode(int type, int expandedTypeID,
int parentIndex, int previousSibling,
int dataOrPrefix, boolean canHaveFirstChild)
{
// Common to all nodes:
int nodeIndex = m_size++;
// Have we overflowed a DTM Identity's addressing range?
if(m_dt... | int function(int type, int expandedTypeID, int parentIndex, int previousSibling, int dataOrPrefix, boolean canHaveFirstChild) { int nodeIndex = m_size++; if(m_dtmIdent.size() == (nodeIndex>>>DTMManager.IDENT_DTM_NODE_BITS)) { addNewDTMID(nodeIndex); } m_firstch.addElement(canHaveFirstChild ? NOTPROCESSED : DTM.NULL); m... | /**
* Construct the node map from the node.
*
* @param type raw type ID, one of DTM.XXX_NODE.
* @param expandedTypeID The expended type ID.
* @param parentIndex The current parent index.
* @param previousSibling The previous sibling index.
* @param dataOrPrefix index into m_data table, or string ha... | Construct the node map from the node | addNode | {
"repo_name": "shun634501730/java_source_cn",
"path": "src_en/com/sun/org/apache/xml/internal/dtm/ref/sax2dtm/SAX2DTM.java",
"license": "apache-2.0",
"size": 80315
} | [
"com.sun.org.apache.xml.internal.dtm.DTMManager"
] | import com.sun.org.apache.xml.internal.dtm.DTMManager; | import com.sun.org.apache.xml.internal.dtm.*; | [
"com.sun.org"
] | com.sun.org; | 2,380,214 |
public List getKeys() {
List result = Collections.EMPTY_LIST;
if (this.source != null) {
if (this.extract == TableOrder.BY_ROW) {
result = this.source.getColumnKeys();
}
else if (this.extract == TableOrder.BY_COLUMN) {
result = this... | List function() { List result = Collections.EMPTY_LIST; if (this.source != null) { if (this.extract == TableOrder.BY_ROW) { result = this.source.getColumnKeys(); } else if (this.extract == TableOrder.BY_COLUMN) { result = this.source.getRowKeys(); } } return result; } | /**
* Returns the keys for the dataset.
* <p>
* If the underlying dataset is <code>null</code>, this method returns an
* empty list.
*
* @return The keys.
*/ | Returns the keys for the dataset. If the underlying dataset is <code>null</code>, this method returns an empty list | getKeys | {
"repo_name": "ibestvina/multithread-centiscape",
"path": "CentiScaPe2.1/src/main/java/org/jfree/data/category/CategoryToPieDataset.java",
"license": "mit",
"size": 10695
} | [
"java.util.Collections",
"java.util.List",
"org.jfree.util.TableOrder"
] | import java.util.Collections; import java.util.List; import org.jfree.util.TableOrder; | import java.util.*; import org.jfree.util.*; | [
"java.util",
"org.jfree.util"
] | java.util; org.jfree.util; | 1,182,382 |
default AdvancedQueueServiceEndpointConsumerBuilder exchangePattern(
ExchangePattern exchangePattern) {
doSetProperty("exchangePattern", exchangePattern);
return this;
} | default AdvancedQueueServiceEndpointConsumerBuilder exchangePattern( ExchangePattern exchangePattern) { doSetProperty(STR, exchangePattern); return this; } | /**
* Sets the exchange pattern when the consumer creates an exchange.
*
* The option is a: <code>org.apache.camel.ExchangePattern</code> type.
*
* Group: consumer (advanced)
*/ | Sets the exchange pattern when the consumer creates an exchange. The option is a: <code>org.apache.camel.ExchangePattern</code> type. Group: consumer (advanced) | exchangePattern | {
"repo_name": "adessaigne/camel",
"path": "core/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/QueueServiceEndpointBuilderFactory.java",
"license": "apache-2.0",
"size": 32373
} | [
"org.apache.camel.ExchangePattern"
] | import org.apache.camel.ExchangePattern; | import org.apache.camel.*; | [
"org.apache.camel"
] | org.apache.camel; | 278,794 |
public SiteInner withHostingEnvironmentProfile(HostingEnvironmentProfile hostingEnvironmentProfile) {
this.hostingEnvironmentProfile = hostingEnvironmentProfile;
return this;
} | SiteInner function(HostingEnvironmentProfile hostingEnvironmentProfile) { this.hostingEnvironmentProfile = hostingEnvironmentProfile; return this; } | /**
* Set the hostingEnvironmentProfile value.
*
* @param hostingEnvironmentProfile the hostingEnvironmentProfile value to set
* @return the SiteInner object itself.
*/ | Set the hostingEnvironmentProfile value | withHostingEnvironmentProfile | {
"repo_name": "pomortaz/azure-sdk-for-java",
"path": "azure-mgmt-appservice/src/main/java/com/microsoft/azure/management/appservice/implementation/SiteInner.java",
"license": "mit",
"size": 19264
} | [
"com.microsoft.azure.management.appservice.HostingEnvironmentProfile"
] | import com.microsoft.azure.management.appservice.HostingEnvironmentProfile; | import com.microsoft.azure.management.appservice.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 1,046,315 |
public static @Nonnull List<Permission> getAll() {
return ALL_VIEW;
}
private static final List<Permission> ALL = new CopyOnWriteArrayList<Permission>();
private static final List<Permission> ALL_VIEW = Collections.unmodifiableList(ALL);
//
//
// Because of the initialization order issue... | static @Nonnull List<Permission> function() { return ALL_VIEW; } private static final List<Permission> ALL = new CopyOnWriteArrayList<Permission>(); private static final List<Permission> ALL_VIEW = Collections.unmodifiableList(ALL); public static final PermissionGroup HUDSON_PERMISSIONS = new PermissionGroup(Hudson.cla... | /**
* Returns all the {@link Permission}s available in the system.
* @return
* always non-null. Read-only.
*/ | Returns all the <code>Permission</code>s available in the system | getAll | {
"repo_name": "synopsys-arc-oss/jenkins",
"path": "core/src/main/java/hudson/security/Permission.java",
"license": "mit",
"size": 12154
} | [
"hudson.model.Hudson",
"java.util.Collections",
"java.util.List",
"java.util.concurrent.CopyOnWriteArrayList",
"javax.annotation.Nonnull"
] | import hudson.model.Hudson; import java.util.Collections; import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; import javax.annotation.Nonnull; | import hudson.model.*; import java.util.*; import java.util.concurrent.*; import javax.annotation.*; | [
"hudson.model",
"java.util",
"javax.annotation"
] | hudson.model; java.util; javax.annotation; | 2,079,751 |
public HttpExchange asyncGet(String path, String args, FritzahaCallback callback) {
if (!isAuthenticated()) {
authenticate();
}
HttpExchange getExchange = new FritzahaContentExchange(callback);
getExchange.setMethod("GET");
getExchange.setURL(getURL(path, addSID(a... | HttpExchange function(String path, String args, FritzahaCallback callback) { if (!isAuthenticated()) { authenticate(); } HttpExchange getExchange = new FritzahaContentExchange(callback); getExchange.setMethod("GET"); getExchange.setURL(getURL(path, addSID(args))); try { asyncclient.send(getExchange); } catch (IOExcepti... | /**
* Sends an HTTP GET request using the asynchronous client
*
* @param Path
* Path of the requested resource
* @param Args
* Arguments for the request
* @param Callback
* Callback to handle the response with
*/ | Sends an HTTP GET request using the asynchronous client | asyncGet | {
"repo_name": "computergeek1507/openhab",
"path": "bundles/binding/org.openhab.binding.fritzaha/src/main/java/org/openhab/binding/fritzaha/internal/hardware/FritzahaWebInterface.java",
"license": "epl-1.0",
"size": 11937
} | [
"java.io.IOException",
"org.eclipse.jetty.client.HttpExchange",
"org.openhab.binding.fritzaha.internal.hardware.callbacks.FritzahaCallback"
] | import java.io.IOException; import org.eclipse.jetty.client.HttpExchange; import org.openhab.binding.fritzaha.internal.hardware.callbacks.FritzahaCallback; | import java.io.*; import org.eclipse.jetty.client.*; import org.openhab.binding.fritzaha.internal.hardware.callbacks.*; | [
"java.io",
"org.eclipse.jetty",
"org.openhab.binding"
] | java.io; org.eclipse.jetty; org.openhab.binding; | 2,447,568 |
public Object getFactoryProperty( Module module, ElementPropertyDefn prop,
boolean forExport )
{
return getFactoryProperty( module, prop );
} | Object function( Module module, ElementPropertyDefn prop, boolean forExport ) { return getFactoryProperty( module, prop ); } | /**
* Delegates {@link #getFactoryProperty(Module, ElementPropertyDefn)}.
* Derived classes can add special handling when {@code forExport} is set.
*
* @param module
* the module
* @param prop
* definition of the property
* @param forExport
* indicates whether the pro... | Delegates <code>#getFactoryProperty(Module, ElementPropertyDefn)</code>. Derived classes can add special handling when forExport is set | getFactoryProperty | {
"repo_name": "sguan-actuate/birt",
"path": "model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/core/DesignElement.java",
"license": "epl-1.0",
"size": 113258
} | [
"org.eclipse.birt.report.model.metadata.ElementPropertyDefn"
] | import org.eclipse.birt.report.model.metadata.ElementPropertyDefn; | import org.eclipse.birt.report.model.metadata.*; | [
"org.eclipse.birt"
] | org.eclipse.birt; | 132,697 |
public static int getOGLTextureType(Graphics g) {
if (!(g instanceof SunGraphics2D)) {
return 0;
}
SurfaceData sData = ((SunGraphics2D)g).surfaceData;
if (!(sData instanceof OGLSurfaceData)) {
return 0;
}
return ((OGLSurfaceData)sData).getTextu... | static int function(Graphics g) { if (!(g instanceof SunGraphics2D)) { return 0; } SurfaceData sData = ((SunGraphics2D)g).surfaceData; if (!(sData instanceof OGLSurfaceData)) { return 0; } return ((OGLSurfaceData)sData).getTextureTarget(); } | /**
* Returns the OpenGL texture target constant (either GL_TEXTURE_2D
* or GL_TEXTURE_RECTANGLE_ARB) for the surface associated with the
* given Graphics object. This method is only useful for those surface
* types that are backed by an OpenGL texture, namely {@code TEXTURE},
* {@code FBOBJEC... | Returns the OpenGL texture target constant (either GL_TEXTURE_2D or GL_TEXTURE_RECTANGLE_ARB) for the surface associated with the given Graphics object. This method is only useful for those surface types that are backed by an OpenGL texture, namely TEXTURE, FBOBJECT, and (on Windows only) PBUFFER | getOGLTextureType | {
"repo_name": "isaacl/openjdk-jdk",
"path": "src/share/classes/sun/java2d/opengl/OGLUtilities.java",
"license": "gpl-2.0",
"size": 14541
} | [
"java.awt.Graphics"
] | import java.awt.Graphics; | import java.awt.*; | [
"java.awt"
] | java.awt; | 125,472 |
public boolean setupDatabase(final DatabaseDriverInfo driverInfo,
final String hostName,
final String dbName,
final String username,
final String password,
... | boolean function(final DatabaseDriverInfo driverInfo, final String hostName, final String dbName, final String username, final String password, final String firstName, final String lastName, final String email, final DisciplineType disciplineType) { log.info(STR+dbName+"..."); String connStr = driverInfo.getConnectionS... | /**
* Drops, Creates and Builds the Database.
*
* @throws SQLException
* @throws IOException
*/ | Drops, Creates and Builds the Database | setupDatabase | {
"repo_name": "specify/specify6",
"path": "src/edu/ku/brc/specify/web/SpecifyExplorer.java",
"license": "gpl-2.0",
"size": 168165
} | [
"edu.ku.brc.af.core.AppContextMgr",
"edu.ku.brc.af.core.SchemaI18NService",
"edu.ku.brc.af.core.db.DBTableIdMgr",
"edu.ku.brc.af.prefs.AppPreferences",
"edu.ku.brc.dbsupport.DBConnection",
"edu.ku.brc.dbsupport.DataProviderFactory",
"edu.ku.brc.dbsupport.DataProviderSessionIFace",
"edu.ku.brc.dbsuppor... | import edu.ku.brc.af.core.AppContextMgr; import edu.ku.brc.af.core.SchemaI18NService; import edu.ku.brc.af.core.db.DBTableIdMgr; import edu.ku.brc.af.prefs.AppPreferences; import edu.ku.brc.dbsupport.DBConnection; import edu.ku.brc.dbsupport.DataProviderFactory; import edu.ku.brc.dbsupport.DataProviderSessionIFace; imp... | import edu.ku.brc.af.core.*; import edu.ku.brc.af.core.db.*; import edu.ku.brc.af.prefs.*; import edu.ku.brc.dbsupport.*; import edu.ku.brc.specify.config.*; import edu.ku.brc.specify.datamodel.*; import edu.ku.brc.ui.*; import java.sql.*; import java.util.*; import org.apache.commons.lang.*; | [
"edu.ku.brc",
"java.sql",
"java.util",
"org.apache.commons"
] | edu.ku.brc; java.sql; java.util; org.apache.commons; | 910,185 |
public BDD varRange(long lo, long hi) {
return varRange(BigInteger.valueOf(lo), BigInteger.valueOf(hi));
} | BDD function(long lo, long hi) { return varRange(BigInteger.valueOf(lo), BigInteger.valueOf(hi)); } | /**
* Returns the BDD that defines the given range of values, inclusive,
* for this finite domain block.
*
* @return BDD
*/ | Returns the BDD that defines the given range of values, inclusive, for this finite domain block | varRange | {
"repo_name": "aindilis/sandbox-gamer",
"path": "JavaBDD/net/sf/javabdd/BDDDomain.java",
"license": "gpl-3.0",
"size": 11530
} | [
"java.math.BigInteger"
] | import java.math.BigInteger; | import java.math.*; | [
"java.math"
] | java.math; | 640,906 |
public void contextDestroyed(ServletContextEvent event) {
if (this.contextLoader != null) {
this.contextLoader.closeWebApplicationContext(event.getServletContext());
}
}
| void function(ServletContextEvent event) { if (this.contextLoader != null) { this.contextLoader.closeWebApplicationContext(event.getServletContext()); } } | /**
* Close the root web application context.
*/ | Close the root web application context | contextDestroyed | {
"repo_name": "codeApeFromChina/resource",
"path": "frame_packages/java_libs/spring-2.5.6-src/src/org/springframework/web/context/ContextLoaderListener.java",
"license": "unlicense",
"size": 2224
} | [
"javax.servlet.ServletContextEvent"
] | import javax.servlet.ServletContextEvent; | import javax.servlet.*; | [
"javax.servlet"
] | javax.servlet; | 807,530 |
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
switch (notification.getFeatureID(Template.class)) {
case CausalityPackage.TEMPLATE__ELEMENTS:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
return;
}
... | void function(Notification notification) { updateChildren(notification); switch (notification.getFeatureID(Template.class)) { case CausalityPackage.TEMPLATE__ELEMENTS: fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false)); return; } super.notifyChanged(notification); } | /**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This handles model notifications by calling <code>#updateChildren</code> to update any cached children and by creating a viewer notification, which it passes to <code>#fireNotifyChanged</code>. | notifyChanged | {
"repo_name": "Nasdanika/amur-lang",
"path": "org.nasdanika.amur.lang.causality.edit/src/org/nasdanika/amur/lang/causality/provider/TemplateItemProvider.java",
"license": "epl-1.0",
"size": 6151
} | [
"org.eclipse.emf.common.notify.Notification",
"org.eclipse.emf.edit.provider.ViewerNotification",
"org.nasdanika.amur.lang.causality.CausalityPackage",
"org.nasdanika.amur.lang.causality.Template"
] | import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.edit.provider.ViewerNotification; import org.nasdanika.amur.lang.causality.CausalityPackage; import org.nasdanika.amur.lang.causality.Template; | import org.eclipse.emf.common.notify.*; import org.eclipse.emf.edit.provider.*; import org.nasdanika.amur.lang.causality.*; | [
"org.eclipse.emf",
"org.nasdanika.amur"
] | org.eclipse.emf; org.nasdanika.amur; | 451,438 |
g.setColor(Color.LIGHT_GRAY);
g.fillRect(x, y, w, h);
g.setColor(Color.BLACK);
g.drawRect(x, y, w, h);
}
| g.setColor(Color.LIGHT_GRAY); g.fillRect(x, y, w, h); g.setColor(Color.BLACK); g.drawRect(x, y, w, h); } | /**
* Fill first, then draw the boundary
*/ | Fill first, then draw the boundary | fillDraw | {
"repo_name": "romainguy/filthy-rich-clients",
"path": "GraphicsFundamentals/FillDraw/src/FillDraw.java",
"license": "bsd-3-clause",
"size": 3734
} | [
"java.awt.Color"
] | import java.awt.Color; | import java.awt.*; | [
"java.awt"
] | java.awt; | 1,721,076 |
public void updateLabelGap(Graphics2D g, Rectangle2D rect) {
if (this.getTickValues() == null) {
return;
}
double len;
int n = this.getTickValues().length;
int nn;
if (this.xAxis) {
len = rect.getWidth();
int labLen = thi... | void function(Graphics2D g, Rectangle2D rect) { if (this.getTickValues() == null) { return; } double len; int n = this.getTickValues().length; int nn; if (this.xAxis) { len = rect.getWidth(); int labLen = this.getMaxLabelLength(g); nn = (int) ((len * 0.8) / labLen); } else { len = rect.getHeight(); FontMetrics metrics ... | /**
* Update lable gap
*
* @param g Graphics2D
* @param rect The rectangle
*/ | Update lable gap | updateLabelGap | {
"repo_name": "meteoinfo/meteoinfolib",
"path": "src/org/meteoinfo/chart/axis/Axis.java",
"license": "lgpl-3.0",
"size": 53295
} | [
"java.awt.FontMetrics",
"java.awt.Graphics2D",
"java.awt.geom.Rectangle2D"
] | import java.awt.FontMetrics; import java.awt.Graphics2D; import java.awt.geom.Rectangle2D; | import java.awt.*; import java.awt.geom.*; | [
"java.awt"
] | java.awt; | 403,346 |
public Color[] getFontColors() {
Color[] colors=new Color[fontColors.size()];
for (int i=0;i<colors.length;i++) {
try {
String s=fontColors.get(i);
String[] rgb=s.split(",");
colors[i]=new Color(Integer.valueOf(rgb[0]),Integer.valueOf(rgb[1]),Integer.valueOf(rgb[2]));
}catch (Exception e) {
No... | Color[] function() { Color[] colors=new Color[fontColors.size()]; for (int i=0;i<colors.length;i++) { try { String s=fontColors.get(i); String[] rgb=s.split(","); colors[i]=new Color(Integer.valueOf(rgb[0]),Integer.valueOf(rgb[1]),Integer.valueOf(rgb[2])); }catch (Exception e) { NotificationManager.addInfo(PluginServic... | /**
* Return the font color of text to overwrite the images.
*
* @return Color[]
*/ | Return the font color of text to overwrite the images | getFontColors | {
"repo_name": "iCarto/siga",
"path": "_fwAndami/src/com/iver/andami/ui/theme/Theme.java",
"license": "gpl-3.0",
"size": 10140
} | [
"com.iver.andami.PluginServices",
"com.iver.andami.messages.NotificationManager",
"java.awt.Color"
] | import com.iver.andami.PluginServices; import com.iver.andami.messages.NotificationManager; import java.awt.Color; | import com.iver.andami.*; import com.iver.andami.messages.*; import java.awt.*; | [
"com.iver.andami",
"java.awt"
] | com.iver.andami; java.awt; | 2,149,740 |
void saveWorkflowToServer(boolean async)
{
List<WorkflowData> workflowList = new ArrayList<WorkflowData>();
Iterator<WorkflowData> workflowIterator = workflows.values().iterator();
while (workflowIterator.hasNext())
workflowList.add(workflowIterator.next());
try {
ExperimenterData exp =
(Experime... | void saveWorkflowToServer(boolean async) { List<WorkflowData> workflowList = new ArrayList<WorkflowData>(); Iterator<WorkflowData> workflowIterator = workflows.values().iterator(); while (workflowIterator.hasNext()) workflowList.add(workflowIterator.next()); try { ExperimenterData exp = (ExperimenterData) MeasurementAg... | /**
* Saves the current ROISet in the ROI component to server.
*
* @param async Pass <code>true</code> to save the ROI asynchronously,
* <code>false</code> otherwise.
*/ | Saves the current ROISet in the ROI component to server | saveWorkflowToServer | {
"repo_name": "chris-allan/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/measurement/view/MeasurementViewerModel.java",
"license": "gpl-2.0",
"size": 50154
} | [
"java.util.ArrayList",
"java.util.Iterator",
"java.util.List",
"org.openmicroscopy.shoola.agents.measurement.MeasurementAgent",
"org.openmicroscopy.shoola.agents.measurement.WorkflowSaver",
"org.openmicroscopy.shoola.env.data.OmeroImageService",
"org.openmicroscopy.shoola.env.log.Logger"
] | import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.openmicroscopy.shoola.agents.measurement.MeasurementAgent; import org.openmicroscopy.shoola.agents.measurement.WorkflowSaver; import org.openmicroscopy.shoola.env.data.OmeroImageService; import org.openmicroscopy.shoola.env.log.Log... | import java.util.*; import org.openmicroscopy.shoola.agents.measurement.*; import org.openmicroscopy.shoola.env.data.*; import org.openmicroscopy.shoola.env.log.*; | [
"java.util",
"org.openmicroscopy.shoola"
] | java.util; org.openmicroscopy.shoola; | 2,202,929 |
@Override
public Department mapRow(ResultSet rs, int rowNum) throws SQLException {
Department department = new Department();
department.setId(rs.getLong("id"));
department.setCompanyId(rs.getLong("companyid"));
department.setName(rs.getString("name"));
department.setBillingAddress(rs.getString("billingadd... | Department function(ResultSet rs, int rowNum) throws SQLException { Department department = new Department(); department.setId(rs.getLong("id")); department.setCompanyId(rs.getLong(STR)); department.setName(rs.getString("name")); department.setBillingAddress(rs.getString(STR)); department.setShippingAddress(rs.getStrin... | /**
* Constructor for DepartmentRowMapper that creates an instance of
* {@link net.bhira.sample.model.Department} from row represented by rowNum in the given
* ResultSet.
*
* @param rs
* an instance of ResultSet to be processed.
* @param rowNum
* integer representing the row numbe... | Constructor for DepartmentRowMapper that creates an instance of <code>net.bhira.sample.model.Department</code> from row represented by rowNum in the given ResultSet | mapRow | {
"repo_name": "baldeephira/employee-app",
"path": "api/src/main/java/net/bhira/sample/api/jdbc/DepartmentRowMapper.java",
"license": "mit",
"size": 2525
} | [
"java.sql.ResultSet",
"java.sql.SQLException",
"net.bhira.sample.model.Department"
] | import java.sql.ResultSet; import java.sql.SQLException; import net.bhira.sample.model.Department; | import java.sql.*; import net.bhira.sample.model.*; | [
"java.sql",
"net.bhira.sample"
] | java.sql; net.bhira.sample; | 563,429 |
public String[] getSlaveServerNames() {
return SlaveServer.getSlaveServerNames( slaveServers );
} | String[] function() { return SlaveServer.getSlaveServerNames( slaveServers ); } | /**
* Gets an array of slave server names.
*
* @return An array list slave server names
*/ | Gets an array of slave server names | getSlaveServerNames | {
"repo_name": "codek/pentaho-kettle",
"path": "engine/src/org/pentaho/di/base/AbstractMeta.java",
"license": "apache-2.0",
"size": 46271
} | [
"org.pentaho.di.cluster.SlaveServer"
] | import org.pentaho.di.cluster.SlaveServer; | import org.pentaho.di.cluster.*; | [
"org.pentaho.di"
] | org.pentaho.di; | 765,132 |
EClass getRTO(); | EClass getRTO(); | /**
* Returns the meta object for class '{@link CIM.IEC61970.Informative.MarketOperations.RTO <em>RTO</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>RTO</em>'.
* @see CIM.IEC61970.Informative.MarketOperations.RTO
* @generated
*/ | Returns the meta object for class '<code>CIM.IEC61970.Informative.MarketOperations.RTO RTO</code>'. | getRTO | {
"repo_name": "georghinkel/ttc2017smartGrids",
"path": "solutions/ModelJoin/src/main/java/CIM/IEC61970/Informative/MarketOperations/MarketOperationsPackage.java",
"license": "mit",
"size": 688294
} | [
"org.eclipse.emf.ecore.EClass"
] | import org.eclipse.emf.ecore.EClass; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,431,796 |
public List<FeedbackSessionAttributes> getFeedbackSessionsForCourse(String courseId) {
Assumption.assertNotNull(courseId);
return feedbackSessionsLogic.getFeedbackSessionsForCourse(courseId);
} | List<FeedbackSessionAttributes> function(String courseId) { Assumption.assertNotNull(courseId); return feedbackSessionsLogic.getFeedbackSessionsForCourse(courseId); } | /**
* Preconditions: <br>
* * All parameters are non-null.
*/ | Preconditions: All parameters are non-null | getFeedbackSessionsForCourse | {
"repo_name": "thenaesh/teammates",
"path": "src/main/java/teammates/logic/api/Logic.java",
"license": "gpl-2.0",
"size": 87996
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 602,709 |
private BigDecimal toSeconds() {
return BigDecimal.valueOf(seconds).add(BigDecimal.valueOf(nanos, 9));
} | BigDecimal function() { return BigDecimal.valueOf(seconds).add(BigDecimal.valueOf(nanos, 9)); } | /**
* Converts this duration to the total length in seconds and
* fractional nanoseconds expressed as a {@code BigDecimal}.
*
* @return the total length of the duration in seconds, with a scale of 9, not null
*/ | Converts this duration to the total length in seconds and fractional nanoseconds expressed as a BigDecimal | toSeconds | {
"repo_name": "flyzsd/java-code-snippets",
"path": "ibm.jdk8/src/java/time/Duration.java",
"license": "mit",
"size": 56548
} | [
"java.math.BigDecimal"
] | import java.math.BigDecimal; | import java.math.*; | [
"java.math"
] | java.math; | 568,734 |
public static URLConnection prepareForAuthentication(final URLConnection connection) {
NullArgumentException.validateNotNull(connection, "url connection cannot be null");
if (connection.getURL().getUserInfo() != null) {
// Need to decode username/password because it may contain encoded
... | static URLConnection function(final URLConnection connection) { NullArgumentException.validateNotNull(connection, STR); if (connection.getURL().getUserInfo() != null) { String decodedUserInfo = decode(connection.getURL().getUserInfo()); String base64Encoded = io.fabric8.utils.Base64Encoder.encode(decodedUserInfo); base... | /**
* Prepares an url connection for authentication if necessary.
*
* @param connection the connection to be prepared
*
* @return the prepared conection
*/ | Prepares an url connection for authentication if necessary | prepareForAuthentication | {
"repo_name": "aslakknutsen/fabric8",
"path": "components/fabric-utils/src/main/java/io/fabric8/utils/URLUtils.java",
"license": "apache-2.0",
"size": 5650
} | [
"java.net.URLConnection"
] | import java.net.URLConnection; | import java.net.*; | [
"java.net"
] | java.net; | 1,231,525 |
public final Property<Currency> putCurrency() {
return metaBean().putCurrency().createProperty(this);
} | final Property<Currency> function() { return metaBean().putCurrency().createProperty(this); } | /**
* Gets the the {@code putCurrency} property.
* @return the property, not null
*/ | Gets the the putCurrency property | putCurrency | {
"repo_name": "McLeodMoores/starling",
"path": "projects/financial-types/src/main/java/com/opengamma/financial/security/option/FXOptionSecurity.java",
"license": "apache-2.0",
"size": 21800
} | [
"com.opengamma.util.money.Currency",
"org.joda.beans.Property"
] | import com.opengamma.util.money.Currency; import org.joda.beans.Property; | import com.opengamma.util.money.*; import org.joda.beans.*; | [
"com.opengamma.util",
"org.joda.beans"
] | com.opengamma.util; org.joda.beans; | 297,641 |
private boolean isArray(Element e) {
if (e.hasAttribute(WsdlUtils.MAXOCCURS_ATTR)
&& !"1".equals(e.getAttribute(WsdlUtils.MAXOCCURS_ATTR))) {
return true;
}
if (e.hasAttribute(WsdlUtils.MINOCCURS_ATTR)) {
String minOccurs = e.getAttribute(WsdlUtils.M... | boolean function(Element e) { if (e.hasAttribute(WsdlUtils.MAXOCCURS_ATTR) && !"1".equals(e.getAttribute(WsdlUtils.MAXOCCURS_ATTR))) { return true; } if (e.hasAttribute(WsdlUtils.MINOCCURS_ATTR)) { String minOccurs = e.getAttribute(WsdlUtils.MINOCCURS_ATTR); try { int i = Integer.parseInt(minOccurs); if (i > 1) { retur... | /**
* Does this element represent an array type?
*
* @param e Element to check.
* @return true if this element represents an array type.
*/ | Does this element represent an array type | isArray | {
"repo_name": "panbasten/imeta",
"path": "imeta2.x/imeta-src/imeta/src/main/java/com/panet/imeta/trans/steps/webservices/wsdl/WsdlOpParameter.java",
"license": "gpl-2.0",
"size": 12622
} | [
"org.w3c.dom.Element"
] | import org.w3c.dom.Element; | import org.w3c.dom.*; | [
"org.w3c.dom"
] | org.w3c.dom; | 1,834,406 |
private Document loadDocument(File sourceFile) throws ParserConfigurationException, SAXException, IOException {
log.debug("Begin loadDocument(...)");
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
Documen... | Document function(File sourceFile) throws ParserConfigurationException, SAXException, IOException { log.debug(STR); DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); Document document = builder.parse(sourceFile); log.debug(STR); return documen... | /**
* Load an XML document from file
*
* @param sourceFile Source file
* @return XML Document from file contents
* @throws ParserConfigurationException
* @throws SAXException
* @throws IOException
*/ | Load an XML document from file | loadDocument | {
"repo_name": "alameluchidambaram/CONNECT",
"path": "Product/Production/Utilities/ConfigurationUtility/src/main/java/gov/hhs/fha/nhinc/util/config/app/ConfigurationUtil.java",
"license": "bsd-3-clause",
"size": 15037
} | [
"java.io.File",
"java.io.IOException",
"javax.xml.parsers.DocumentBuilder",
"javax.xml.parsers.DocumentBuilderFactory",
"javax.xml.parsers.ParserConfigurationException",
"org.w3c.dom.Document",
"org.xml.sax.SAXException"
] | import java.io.File; import java.io.IOException; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; import org.w3c.dom.Document; import org.xml.sax.SAXException; | import java.io.*; import javax.xml.parsers.*; import org.w3c.dom.*; import org.xml.sax.*; | [
"java.io",
"javax.xml",
"org.w3c.dom",
"org.xml.sax"
] | java.io; javax.xml; org.w3c.dom; org.xml.sax; | 2,551,065 |
public final MetaProperty<String> observationTime() {
return _observationTime;
} | final MetaProperty<String> function() { return _observationTime; } | /**
* The meta-property for the {@code observationTime} property.
* @return the meta-property, not null
*/ | The meta-property for the observationTime property | observationTime | {
"repo_name": "codeaudit/OG-Platform",
"path": "projects/OG-Integration/src/main/java/com/opengamma/integration/timeseries/snapshot/CronTriggerComponentFactory.java",
"license": "apache-2.0",
"size": 34660
} | [
"org.joda.beans.MetaProperty"
] | import org.joda.beans.MetaProperty; | import org.joda.beans.*; | [
"org.joda.beans"
] | org.joda.beans; | 925,149 |
public static void sendView(Context context, String appScreen) {
if (!GHConstants.DEBUG) {
Tracker t = getTracker(context);
if (t != null) {
t.setScreenName(appScreen);
t.send(new HitBuilders.AppViewBuilder().build());
}
}
}
public static final String CAT_NO... | static void function(Context context, String appScreen) { if (!GHConstants.DEBUG) { Tracker t = getTracker(context); if (t != null) { t.setScreenName(appScreen); t.send(new HitBuilders.AppViewBuilder().build()); } } } public static final String CAT_NOTIF = "notif"; public static final String CAT_UI = "ui"; public stati... | /**
* Track screen view.
*
* @param context
* @param appScreen
*/ | Track screen view | sendView | {
"repo_name": "nickvergessen/ghwatch",
"path": "src/com/daskiworks/ghwatch/ActivityTracker.java",
"license": "apache-2.0",
"size": 3005
} | [
"android.content.Context",
"com.daskiworks.ghwatch.backend.GHConstants",
"com.google.android.gms.analytics.HitBuilders",
"com.google.android.gms.analytics.Tracker"
] | import android.content.Context; import com.daskiworks.ghwatch.backend.GHConstants; import com.google.android.gms.analytics.HitBuilders; import com.google.android.gms.analytics.Tracker; | import android.content.*; import com.daskiworks.ghwatch.backend.*; import com.google.android.gms.analytics.*; | [
"android.content",
"com.daskiworks.ghwatch",
"com.google.android"
] | android.content; com.daskiworks.ghwatch; com.google.android; | 2,123,134 |
private void incrementSequencesWithLowValue(Database database, String schemaName) {
if (!database.supportsSequences()) {
return;
}
Set<String> sequenceNames = database.getSequenceNames(schemaName);
for (String sequenceName : sequenceNames) {
if (database.getSe... | void function(Database database, String schemaName) { if (!database.supportsSequences()) { return; } Set<String> sequenceNames = database.getSequenceNames(schemaName); for (String sequenceName : sequenceNames) { if (database.getSequenceValue(schemaName, sequenceName) < lowestAcceptableSequenceValue) { logger.debug(STR ... | /**
* Increments all sequences in the given schema whose value is too low.
*
* @param database The database support, not null
* @param schemaName The schema, not null
*/ | Increments all sequences in the given schema whose value is too low | incrementSequencesWithLowValue | {
"repo_name": "fcamblor/dbmaintain-maven-plugin",
"path": "dbmaintain/src/main/java/org/dbmaintain/structure/sequence/impl/DefaultSequenceUpdater.java",
"license": "apache-2.0",
"size": 4407
} | [
"java.util.Set",
"org.dbmaintain.database.Database"
] | import java.util.Set; import org.dbmaintain.database.Database; | import java.util.*; import org.dbmaintain.database.*; | [
"java.util",
"org.dbmaintain.database"
] | java.util; org.dbmaintain.database; | 1,625,998 |
public void writePacketData(PacketBuffer data) throws IOException
{
data.writeFloat(this.field_149401_a);
data.writeVarIntToBuffer(this.field_149400_c);
data.writeVarIntToBuffer(this.field_149399_b);
} | void function(PacketBuffer data) throws IOException { data.writeFloat(this.field_149401_a); data.writeVarIntToBuffer(this.field_149400_c); data.writeVarIntToBuffer(this.field_149399_b); } | /**
* Writes the raw packet data to the data stream.
*/ | Writes the raw packet data to the data stream | writePacketData | {
"repo_name": "Hexeption/Youtube-Hacked-Client-1.8",
"path": "minecraft/net/minecraft/network/play/server/S1FPacketSetExperience.java",
"license": "mit",
"size": 1932
} | [
"java.io.IOException",
"net.minecraft.network.PacketBuffer"
] | import java.io.IOException; import net.minecraft.network.PacketBuffer; | import java.io.*; import net.minecraft.network.*; | [
"java.io",
"net.minecraft.network"
] | java.io; net.minecraft.network; | 165,444 |
public void beginTransactionWithListenerDeferred(
SQLiteTransactionListener transactionListener) {
beginTransaction(transactionListener, SQLiteSession.TRANSACTION_MODE_DEFERRED);
}
/**
* Begins a transaction in EXCLUSIVE mode.
* <p>
* Transactions can be nested.
* Wh... | void function( SQLiteTransactionListener transactionListener) { beginTransaction(transactionListener, SQLiteSession.TRANSACTION_MODE_DEFERRED); } /** * Begins a transaction in EXCLUSIVE mode. * <p> * Transactions can be nested. * When the outer transaction is ended all of * the work done in that transaction and all of ... | /**
* Begins a transaction in DEFERRED mode.
*
* @param transactionListener listener that should be notified when the transaction begins,
* commits, or is rolled back, either explicitly or by a call to
* {@link #yieldIfContendedSafely}.
*/ | Begins a transaction in DEFERRED mode | beginTransactionWithListenerDeferred | {
"repo_name": "requery/sqlite-android",
"path": "sqlite-android/src/main/java/io/requery/android/database/sqlite/SQLiteDatabase.java",
"license": "apache-2.0",
"size": 108328
} | [
"android.database.sqlite.SQLiteTransactionListener"
] | import android.database.sqlite.SQLiteTransactionListener; | import android.database.sqlite.*; | [
"android.database"
] | android.database; | 2,446,823 |
final List<T> all = new ArrayList<>();
final List<T> custom = new ArrayList<>();
final Pattern pattern = Pattern.compile(".*(?:custom_)([a-zA-Z_]+)\\.csv$");
for (T file : files) {
String name = file.toString();
if (pattern.matcher(name).matches()) {
custom.add(file);
} else {
all.add(file);
... | final List<T> all = new ArrayList<>(); final List<T> custom = new ArrayList<>(); final Pattern pattern = Pattern.compile(STR); for (T file : files) { String name = file.toString(); if (pattern.matcher(name).matches()) { custom.add(file); } else { all.add(file); } } all.addAll(custom); return all; } | /**
* Move custom csv files at the end of the list.
*/ | Move custom csv files at the end of the list | orderFiles | {
"repo_name": "donsunsoft/axelor-development-kit",
"path": "axelor-core/src/main/java/com/axelor/meta/loader/I18nLoader.java",
"license": "agpl-3.0",
"size": 5675
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.regex.Pattern"
] | import java.util.ArrayList; import java.util.List; import java.util.regex.Pattern; | import java.util.*; import java.util.regex.*; | [
"java.util"
] | java.util; | 2,640,750 |
@Override
public void onGenericTag(final PdfWriter writer, final Document document, final Rectangle rect,
final String text) {
// rien ici
}
| void function(final PdfWriter writer, final Document document, final Rectangle rect, final String text) { } | /**
* we override the onGenericTag method.
*
* @param writer
* PdfWriter
* @param document
* Document
* @param rect
* Rectangle
* @param text
* String
*/ | we override the onGenericTag method | onGenericTag | {
"repo_name": "javamelody/javamelody",
"path": "javamelody-swing/src/main/java/net/bull/javamelody/swing/print/AdvancedPageNumberEvents.java",
"license": "apache-2.0",
"size": 3896
} | [
"com.lowagie.text.Document",
"com.lowagie.text.Rectangle",
"com.lowagie.text.pdf.PdfWriter"
] | import com.lowagie.text.Document; import com.lowagie.text.Rectangle; import com.lowagie.text.pdf.PdfWriter; | import com.lowagie.text.*; import com.lowagie.text.pdf.*; | [
"com.lowagie.text"
] | com.lowagie.text; | 2,502,230 |
public static Map<String, String> jsonToMap(String jsonString) {
Map<String, String> result = Maps.newHashMap();
if (jsonString != null) {
try {
JSONObject json = new JSONObject(jsonString);
for (String key : json.keySet()) {
String va... | static Map<String, String> function(String jsonString) { Map<String, String> result = Maps.newHashMap(); if (jsonString != null) { try { JSONObject json = new JSONObject(jsonString); for (String key : json.keySet()) { String value = json.optString(key); if (value != null) { result.put(key, value); } } } catch (Exceptio... | /**
* Converts a string (which is assumed to contain a JSON object whose values are strings only) to a map, for use in JSPs.<p>
*
* If the input can't be interpreted as JSON, an empty map is returned.
*
* @param jsonString the JSON string
* @return the map with the keys/values from the JSO... | Converts a string (which is assumed to contain a JSON object whose values are strings only) to a map, for use in JSPs. If the input can't be interpreted as JSON, an empty map is returned | jsonToMap | {
"repo_name": "ggiudetti/opencms-core",
"path": "src/org/opencms/jsp/util/CmsJspElFunctions.java",
"license": "lgpl-2.1",
"size": 22211
} | [
"com.google.common.collect.Maps",
"java.util.Map",
"org.opencms.json.JSONObject"
] | import com.google.common.collect.Maps; import java.util.Map; import org.opencms.json.JSONObject; | import com.google.common.collect.*; import java.util.*; import org.opencms.json.*; | [
"com.google.common",
"java.util",
"org.opencms.json"
] | com.google.common; java.util; org.opencms.json; | 756,519 |
public final Provider getProvider() {
return provider;
} | final Provider function() { return provider; } | /**
* Returns the provider for this {@code KeyAgreement} instance.
*
* @return the provider for this {@code KeyAgreement} instance.
*/ | Returns the provider for this KeyAgreement instance | getProvider | {
"repo_name": "JSDemos/android-sdk-20",
"path": "src/javax/crypto/KeyAgreement.java",
"license": "apache-2.0",
"size": 11952
} | [
"java.security.Provider"
] | import java.security.Provider; | import java.security.*; | [
"java.security"
] | java.security; | 2,484,431 |
public void testFlipBitPositiveInside1() {
byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26};
int aSign = 1;
int number = 15;
byte rBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, -93, 26};
BigInteger aNumber = new BigInteger(aSign, aBytes);
BigInteger result = ... | void function() { byte aBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, 35, 26}; int aSign = 1; int number = 15; byte rBytes[] = {1, -128, 56, 100, -2, -76, 89, 45, 91, 3, -15, -93, 26}; BigInteger aNumber = new BigInteger(aSign, aBytes); BigInteger result = aNumber.flipBit(number); byte resBytes[] = new byte... | /**
* flipBit(int n) inside a positive number.
*/ | flipBit(int n) inside a positive number | testFlipBitPositiveInside1 | {
"repo_name": "google/j2cl",
"path": "jre/javatests/com/google/gwt/emultest/java/math/BigIntegerOperateBitsTest.java",
"license": "apache-2.0",
"size": 47597
} | [
"java.math.BigInteger"
] | import java.math.BigInteger; | import java.math.*; | [
"java.math"
] | java.math; | 936,659 |
public Observable<ServiceResponse<Page<SecretItem>>> getSecretsSinglePageAsync(final String vaultBaseUrl) {
if (vaultBaseUrl == null) {
throw new IllegalArgumentException("Parameter vaultBaseUrl is required and cannot be null.");
}
if (this.apiVersion() == null) {
thr... | Observable<ServiceResponse<Page<SecretItem>>> function(final String vaultBaseUrl) { if (vaultBaseUrl == null) { throw new IllegalArgumentException(STR); } if (this.apiVersion() == null) { throw new IllegalArgumentException(STR); } | /**
* List secrets in a specified key vault.
* The Get Secrets operation is applicable to the entire vault. However, only the base secret identifier and its attributes are provided in the response. Individual secret versions are not listed in the response. This operation requires the secrets/list permission.
... | List secrets in a specified key vault. The Get Secrets operation is applicable to the entire vault. However, only the base secret identifier and its attributes are provided in the response. Individual secret versions are not listed in the response. This operation requires the secrets/list permission | getSecretsSinglePageAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/keyvault/microsoft-azure-keyvault/src/main/java/com/microsoft/azure/keyvault/implementation/KeyVaultClientBaseImpl.java",
"license": "mit",
"size": 884227
} | [
"com.microsoft.azure.Page",
"com.microsoft.azure.keyvault.models.SecretItem",
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.azure.Page; import com.microsoft.azure.keyvault.models.SecretItem; import com.microsoft.rest.ServiceResponse; | import com.microsoft.azure.*; import com.microsoft.azure.keyvault.models.*; import com.microsoft.rest.*; | [
"com.microsoft.azure",
"com.microsoft.rest"
] | com.microsoft.azure; com.microsoft.rest; | 1,553,055 |
@Deprecated
public static void writeLines(final Collection<?> lines, final String lineEnding,
final OutputStream output) throws IOException {
writeLines(lines, lineEnding, output, Charset.defaultCharset());
} | static void function(final Collection<?> lines, final String lineEnding, final OutputStream output) throws IOException { writeLines(lines, lineEnding, output, Charset.defaultCharset()); } | /**
* Writes the <code>toString()</code> value of each item in a collection to
* an <code>OutputStream</code> line by line, using the default character
* encoding of the platform and the specified line ending.
*
* @param lines
* the lines to write, null entries produce blank lines
* @param line... | Writes the <code>toString()</code> value of each item in a collection to an <code>OutputStream</code> line by line, using the default character encoding of the platform and the specified line ending | writeLines | {
"repo_name": "jaredrummler/TrueTypeParser",
"path": "lib-truetypeparser/src/main/java/com/jaredrummler/fontreader/io/IOUtils.java",
"license": "apache-2.0",
"size": 119152
} | [
"java.io.IOException",
"java.io.OutputStream",
"java.nio.charset.Charset",
"java.util.Collection"
] | import java.io.IOException; import java.io.OutputStream; import java.nio.charset.Charset; import java.util.Collection; | import java.io.*; import java.nio.charset.*; import java.util.*; | [
"java.io",
"java.nio",
"java.util"
] | java.io; java.nio; java.util; | 124,081 |
// Rack related maintenance methods
boolean isRackDirty();
void newRack() throws DatastoreException;
String getRackDataModelName();
void loadRackFromFile( String filename ) throws DatastoreException, IOException; | boolean isRackDirty(); void newRack() throws DatastoreException; String getRackDataModelName(); void loadRackFromFile( String filename ) throws DatastoreException, IOException; | /**
* <p>Load a rack from a file on the filesystem.</p>
* <p>The main rendering component for the rack will be
* updated appropriately to show any components contained in
* this new rack on successful load.</p>
* @param filename filesystem path of the rack to load
* @throws DatastoreException on unrecoverab... | Load a rack from a file on the filesystem. The main rendering component for the rack will be updated appropriately to show any components contained in this new rack on successful load | loadRackFromFile | {
"repo_name": "danielhams/mad-java",
"path": "1PROJECTS/COMPONENTDESIGNER/component-designer-services/src/uk/co/modularaudio/componentdesigner/controller/front/ComponentDesignerFrontController.java",
"license": "gpl-3.0",
"size": 12195
} | [
"java.io.IOException",
"uk.co.modularaudio.util.exception.DatastoreException"
] | import java.io.IOException; import uk.co.modularaudio.util.exception.DatastoreException; | import java.io.*; import uk.co.modularaudio.util.exception.*; | [
"java.io",
"uk.co.modularaudio"
] | java.io; uk.co.modularaudio; | 9,801 |
private Pair<Integer, Integer> splitAbsolutePosition(int position, String errorMessage)
{
final int group = getGroupByAbsPosition(position);
final int positionInGroup = getPositionInGroup(position);
if (group == INVALID_POSITION || positionInGroup == INVALID_POSITION)
{
handleInvalidPosition(... | Pair<Integer, Integer> function(int position, String errorMessage) { final int group = getGroupByAbsPosition(position); final int positionInGroup = getPositionInGroup(position); if (group == INVALID_POSITION positionInGroup == INVALID_POSITION) { handleInvalidPosition(errorMessage, position, group, positionInGroup); re... | /**
* Splits absolute position to pair of (group, position in group)
*
* @param position absolute position
* @param errorMessage message for the log if split fails
* @return splitted pair. null if split failed
*/ | Splits absolute position to pair of (group, position in group) | splitAbsolutePosition | {
"repo_name": "vasilenkomike/omim",
"path": "android/src/com/mapswithme/country/DownloadedAdapter.java",
"license": "apache-2.0",
"size": 11380
} | [
"android.util.Pair"
] | import android.util.Pair; | import android.util.*; | [
"android.util"
] | android.util; | 57,602 |
public static void runJobInTransaction(KeycloakSessionFactory factory, KeycloakSessionTask task) {
KeycloakSession session = factory.create();
KeycloakTransaction tx = session.getTransaction();
try {
tx.begin();
task.run(session);
if (tx.isActive()) {
... | static void function(KeycloakSessionFactory factory, KeycloakSessionTask task) { KeycloakSession session = factory.create(); KeycloakTransaction tx = session.getTransaction(); try { tx.begin(); task.run(session); if (tx.isActive()) { if (tx.getRollbackOnly()) { tx.rollback(); } else { tx.commit(); } } } catch (RuntimeE... | /**
* Wrap given runnable job into KeycloakTransaction.
*
* @param factory
* @param task
*/ | Wrap given runnable job into KeycloakTransaction | runJobInTransaction | {
"repo_name": "gregjones60/keycloak",
"path": "model/api/src/main/java/org/keycloak/models/utils/KeycloakModelUtils.java",
"license": "apache-2.0",
"size": 18258
} | [
"org.keycloak.models.KeycloakSession",
"org.keycloak.models.KeycloakSessionFactory",
"org.keycloak.models.KeycloakSessionTask",
"org.keycloak.models.KeycloakTransaction"
] | import org.keycloak.models.KeycloakSession; import org.keycloak.models.KeycloakSessionFactory; import org.keycloak.models.KeycloakSessionTask; import org.keycloak.models.KeycloakTransaction; | import org.keycloak.models.*; | [
"org.keycloak.models"
] | org.keycloak.models; | 1,278,371 |
public static RefWatcher install(Application application,
Class<? extends AbstractAnalysisResultService> listenerServiceClass,
ExcludedRefs excludedRefs) {
if (isInAnalyzerProcess(application)) {
return RefWatcher.DISABLED;
}
enableDisplayLeakActivity(application);
HeapDump.Listener ... | static RefWatcher function(Application application, Class<? extends AbstractAnalysisResultService> listenerServiceClass, ExcludedRefs excludedRefs) { if (isInAnalyzerProcess(application)) { return RefWatcher.DISABLED; } enableDisplayLeakActivity(application); HeapDump.Listener heapDumpListener = new ServiceHeapDumpList... | /**
* Creates a {@link RefWatcher} that reports results to the provided service, and starts watching
* activity references (on ICS+).
*/ | Creates a <code>RefWatcher</code> that reports results to the provided service, and starts watching activity references (on ICS+) | install | {
"repo_name": "cheyiliu/leakcanary",
"path": "leakcanary-android/src/main/java/com/squareup/leakcanary/LeakCanary.java",
"license": "apache-2.0",
"size": 5355
} | [
"android.app.Application"
] | import android.app.Application; | import android.app.*; | [
"android.app"
] | android.app; | 629,106 |
public void setDebugStatus( Reporter reporter, String message ) {
if ( debug ) {
System.out.println( message );
reporter.setStatus( message );
}
} | void function( Reporter reporter, String message ) { if ( debug ) { System.out.println( message ); reporter.setStatus( message ); } } | /**
* Set the reporter status if {@code debug == true}.
*/ | Set the reporter status if debug == true | setDebugStatus | {
"repo_name": "SergeyTravin/pentaho-hadoop-shims",
"path": "common/mapred/src/main/java/org/pentaho/hadoop/mapreduce/OutputCollectorRowListener.java",
"license": "apache-2.0",
"size": 8258
} | [
"org.apache.hadoop.mapred.Reporter"
] | import org.apache.hadoop.mapred.Reporter; | import org.apache.hadoop.mapred.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,440,385 |
protected Map<String, QB> getAlternateVersions() {
return Collections.emptyMap();
}
/**
* Parses the query provided as string argument and compares it with the expected result provided as argument as a {@link QueryBuilder} | Map<String, QB> function() { return Collections.emptyMap(); } /** * Parses the query provided as string argument and compares it with the expected result provided as argument as a {@link QueryBuilder} | /**
* Returns alternate string representation of the query that need to be tested as they are never used as output
* of {@link QueryBuilder#toXContent(XContentBuilder, ToXContent.Params)}. By default there are no alternate versions.
*/ | Returns alternate string representation of the query that need to be tested as they are never used as output of <code>QueryBuilder#toXContent(XContentBuilder, ToXContent.Params)</code>. By default there are no alternate versions | getAlternateVersions | {
"repo_name": "gfyoung/elasticsearch",
"path": "test/framework/src/main/java/org/elasticsearch/test/AbstractQueryTestCase.java",
"license": "apache-2.0",
"size": 37053
} | [
"java.util.Collections",
"java.util.Map",
"org.elasticsearch.index.query.QueryBuilder"
] | import java.util.Collections; import java.util.Map; import org.elasticsearch.index.query.QueryBuilder; | import java.util.*; import org.elasticsearch.index.query.*; | [
"java.util",
"org.elasticsearch.index"
] | java.util; org.elasticsearch.index; | 2,608,946 |
protected boolean handleDirtyConflict() {
return
MessageDialog.openQuestion
(getSite().getShell(),
getString("_UI_FileConflict_label"),
getString("_WARN_FileConflict"));
}
public mesplibraryEditor() {
super();
initializeEditingDomain();
} | boolean function() { return MessageDialog.openQuestion (getSite().getShell(), getString(STR), getString(STR)); } public mesplibraryEditor() { super(); initializeEditingDomain(); } | /**
* Shows a dialog that asks if conflicting changes should be discarded.
* @generated
*/ | Shows a dialog that asks if conflicting changes should be discarded | handleDirtyConflict | {
"repo_name": "parraman/micobs",
"path": "mesp/es.uah.aut.srg.micobs.mesp/src/es/uah/aut/srg/micobs/mesp/library/mesplibrary/presentation/mesplibraryEditor.java",
"license": "epl-1.0",
"size": 43634
} | [
"org.eclipse.jface.dialogs.MessageDialog"
] | import org.eclipse.jface.dialogs.MessageDialog; | import org.eclipse.jface.dialogs.*; | [
"org.eclipse.jface"
] | org.eclipse.jface; | 789,122 |
@Idempotent
void allowSnapshot(String snapshotRoot)
throws IOException; | void allowSnapshot(String snapshotRoot) throws IOException; | /**
* Allow snapshot on a directory.
* @param snapshotRoot the directory to be snapped
* @throws IOException on error
*/ | Allow snapshot on a directory | allowSnapshot | {
"repo_name": "Ethanlm/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/protocol/ClientProtocol.java",
"license": "apache-2.0",
"size": 63582
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,460,649 |
PagedIterable<ConfigurationProfile> listByResourceGroup(String resourceGroupName, Context context); | PagedIterable<ConfigurationProfile> listByResourceGroup(String resourceGroupName, Context context); | /**
* Retrieve a list of configuration profile within a given resource group.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param context The context to associate with this operation.
* @throws IllegalArgumentException thrown if parameters fail th... | Retrieve a list of configuration profile within a given resource group | listByResourceGroup | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/automanage/azure-resourcemanager-automanage/src/main/java/com/azure/resourcemanager/automanage/models/ConfigurationProfiles.java",
"license": "mit",
"size": 8158
} | [
"com.azure.core.http.rest.PagedIterable",
"com.azure.core.util.Context"
] | import com.azure.core.http.rest.PagedIterable; import com.azure.core.util.Context; | import com.azure.core.http.rest.*; import com.azure.core.util.*; | [
"com.azure.core"
] | com.azure.core; | 1,336,344 |
@Generated
@CVariable()
@MappedReturn(ObjCStringMapper.class)
public static native String UIApplicationLaunchOptionsEventAttributionKey(); | @CVariable() @MappedReturn(ObjCStringMapper.class) static native String function(); | /**
* userInfo contains a UIEventAttribution to go along with a URL open on launch
*/ | userInfo contains a UIEventAttribution to go along with a URL open on launch | UIApplicationLaunchOptionsEventAttributionKey | {
"repo_name": "multi-os-engine/moe-core",
"path": "moe.apple/moe.platform.ios/src/main/java/apple/uikit/c/UIKit.java",
"license": "apache-2.0",
"size": 134869
} | [
"org.moe.natj.c.ann.CVariable",
"org.moe.natj.general.ann.MappedReturn",
"org.moe.natj.objc.map.ObjCStringMapper"
] | import org.moe.natj.c.ann.CVariable; import org.moe.natj.general.ann.MappedReturn; import org.moe.natj.objc.map.ObjCStringMapper; | import org.moe.natj.c.ann.*; import org.moe.natj.general.ann.*; import org.moe.natj.objc.map.*; | [
"org.moe.natj"
] | org.moe.natj; | 1,741,817 |
public GitClient rebase(RebaseData data) {
ArrayBuilder<String> builder = new ArrayBuilder<String>(String.class);
builder.add("rebase");
if (!StringUtil.isEmpty(data.getNewbase())) {
builder.add("--onto").add(data.getNewbase());
}
if (!StringUtil.isEmpty(data.getU... | GitClient function(RebaseData data) { ArrayBuilder<String> builder = new ArrayBuilder<String>(String.class); builder.add(STR); if (!StringUtil.isEmpty(data.getNewbase())) { builder.add(STR).add(data.getNewbase()); } if (!StringUtil.isEmpty(data.getUpstream())) { builder.add(data.getUpstream()); } for (StringData branch... | /** Forward-ports local commits to the updated upstream head.
* @param data a {@link RebaseData} object that specifies the rebase
* @return a reference to <code>this</code> */ | Forward-ports local commits to the updated upstream head | rebase | {
"repo_name": "AludraTest/aludratest",
"path": "src/main/java/org/aludratest/service/gitclient/GitClient.java",
"license": "apache-2.0",
"size": 28327
} | [
"org.aludratest.service.gitclient.data.RebaseData",
"org.aludratest.util.data.StringData",
"org.databene.commons.ArrayBuilder",
"org.databene.commons.StringUtil"
] | import org.aludratest.service.gitclient.data.RebaseData; import org.aludratest.util.data.StringData; import org.databene.commons.ArrayBuilder; import org.databene.commons.StringUtil; | import org.aludratest.service.gitclient.data.*; import org.aludratest.util.data.*; import org.databene.commons.*; | [
"org.aludratest.service",
"org.aludratest.util",
"org.databene.commons"
] | org.aludratest.service; org.aludratest.util; org.databene.commons; | 1,188,025 |
public List<String> getStackUpgradeAutoRetryCustomCommandNamesToIgnore() {
String value = getProperty(STACK_UPGRADE_AUTO_RETRY_CUSTOM_COMMAND_NAMES_TO_IGNORE);
List<String> list = convertCSVwithQuotesToList(value);
listToLowerCase(list);
return list;
} | List<String> function() { String value = getProperty(STACK_UPGRADE_AUTO_RETRY_CUSTOM_COMMAND_NAMES_TO_IGNORE); List<String> list = convertCSVwithQuotesToList(value); listToLowerCase(list); return list; } | /**
* If auto-retry during stack upgrade is enabled, skip any tasks whose custom command name contains at least one
* of the strings in the following CSV property. Note that values have to be enclosed in quotes and separated by commas.
* @return
*/ | If auto-retry during stack upgrade is enabled, skip any tasks whose custom command name contains at least one of the strings in the following CSV property. Note that values have to be enclosed in quotes and separated by commas | getStackUpgradeAutoRetryCustomCommandNamesToIgnore | {
"repo_name": "sekikn/ambari",
"path": "ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java",
"license": "apache-2.0",
"size": 252637
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 860,380 |
public RouteDefinition from(EndpointConsumerBuilder endpoint) {
setInput(new FromDefinition(endpoint));
return this;
} | RouteDefinition function(EndpointConsumerBuilder endpoint) { setInput(new FromDefinition(endpoint)); return this; } | /**
* Creates an input to the route
*
* @param endpoint the from endpoint
* @return the builder
*/ | Creates an input to the route | from | {
"repo_name": "davidkarlsen/camel",
"path": "core/camel-core/src/main/java/org/apache/camel/model/RouteDefinition.java",
"license": "apache-2.0",
"size": 29962
} | [
"org.apache.camel.builder.EndpointConsumerBuilder"
] | import org.apache.camel.builder.EndpointConsumerBuilder; | import org.apache.camel.builder.*; | [
"org.apache.camel"
] | org.apache.camel; | 2,575,850 |
public void query(String server, int port, String database, String username, String password, String query)
throws Exception {
int value = 0;
switch (getCallType()) {
case SQLUDF_TF_FIRST:
// Established the connection to MySQL.
Class.forName("com.mysql.jd... | void function(String server, int port, String database, String username, String password, String query) throws Exception { int value = 0; switch (getCallType()) { case SQLUDF_TF_FIRST: Class.forName(STR); conn = DriverManager.getConnection(STRuser=STR&password=STRidSTR02000STRUnexpected call type of " + getCallType());... | /**
* Establishes a connection to MySQL with the given credentials
* an performs the query in the remote database.
*
* @param server
* Name of the server or IP address where the MySQL server resides.
* @param port
* Port number in which MySQL listens.
* @par... | Establishes a connection to MySQL with the given credentials an performs the query in the remote database | query | {
"repo_name": "angoca/db2-mysql-wrapper",
"path": "MySQLTable.java",
"license": "gpl-3.0",
"size": 3734
} | [
"java.sql.DriverManager"
] | import java.sql.DriverManager; | import java.sql.*; | [
"java.sql"
] | java.sql; | 1,134,775 |
public void add(Widget child, SafeHtml html) {
tabs.add(child, html.asString(), true);
}
| void function(Widget child, SafeHtml html) { tabs.add(child, html.asString(), true); } | /**
* Adds a widget to the panel. If the Widget is already attached, it will be
* moved to the right-most index.
*
* @param child
* the widget to be added
* @param html
* the html to be shown on its tab
*/ | Adds a widget to the panel. If the Widget is already attached, it will be moved to the right-most index | add | {
"repo_name": "AlexeyKashintsev/PlatypusJS",
"path": "web-client/src/platypus/src/com/bearsoft/gwt/ui/containers/TabsDecoratedPanel.java",
"license": "apache-2.0",
"size": 19940
} | [
"com.google.gwt.safehtml.shared.SafeHtml",
"com.google.gwt.user.client.ui.Widget"
] | import com.google.gwt.safehtml.shared.SafeHtml; import com.google.gwt.user.client.ui.Widget; | import com.google.gwt.safehtml.shared.*; import com.google.gwt.user.client.ui.*; | [
"com.google.gwt"
] | com.google.gwt; | 2,713,574 |
private static File generateConfigFile(
final List<String> interServerCertLines,
final List<String> listenerCertLines)
throws Exception
{
final File configFile = createTempFile();
assertTrue(configFile.delete());
try (LDIFWriter ldifWriter... | static File function( final List<String> interServerCertLines, final List<String> listenerCertLines) throws Exception { final File configFile = createTempFile(); assertTrue(configFile.delete()); try (LDIFWriter ldifWriter = new LDIFWriter(configFile)) { ldifWriter.writeEntry(new Entry( STR, STR, STR, STR)); ldifWriter.... | /**
* Generates a sample configuration file that may be used for testing.
*
* @param interServerCertLines A list of the lines that comprise the
* inter-server certificate content to include.
* It may be {@code null} or empty if no
* ... | Generates a sample configuration file that may be used for testing | generateConfigFile | {
"repo_name": "UnboundID/ldapsdk",
"path": "tests/unit/src/com/unboundid/ldap/sdk/unboundidds/TopologyRegistryTrustManagerTestCase.java",
"license": "gpl-2.0",
"size": 45549
} | [
"com.unboundid.ldap.sdk.Entry",
"com.unboundid.ldif.LDIFWriter",
"com.unboundid.util.StaticUtils",
"java.io.File",
"java.util.List"
] | import com.unboundid.ldap.sdk.Entry; import com.unboundid.ldif.LDIFWriter; import com.unboundid.util.StaticUtils; import java.io.File; import java.util.List; | import com.unboundid.ldap.sdk.*; import com.unboundid.ldif.*; import com.unboundid.util.*; import java.io.*; import java.util.*; | [
"com.unboundid.ldap",
"com.unboundid.ldif",
"com.unboundid.util",
"java.io",
"java.util"
] | com.unboundid.ldap; com.unboundid.ldif; com.unboundid.util; java.io; java.util; | 1,169,591 |
public static boolean isConnectEnabled(SelectionKey key)
{
return ((key.interestOps() & SelectionKey.OP_CONNECT) != 0);
} | static boolean function(SelectionKey key) { return ((key.interestOps() & SelectionKey.OP_CONNECT) != 0); } | /**
* Returns {@code true} if the specified selection key has connect enabled,
* {@code false} otherwise.
*/ | Returns true if the specified selection key has connect enabled, false otherwise | isConnectEnabled | {
"repo_name": "cfloersch/Stdlib",
"path": "src/main/java/xpertss/io/NIOUtils.java",
"license": "gpl-2.0",
"size": 16983
} | [
"java.nio.channels.SelectionKey"
] | import java.nio.channels.SelectionKey; | import java.nio.channels.*; | [
"java.nio"
] | java.nio; | 2,775,915 |
@Test
public void testLocalInterfaceWithBeanNameStatelessServletRequestFieldInjection()
throws Exception {
checkServletRequestInjection(OneLocalWithBeanNameFieldInjectionView.class);
} | void function() throws Exception { checkServletRequestInjection(OneLocalWithBeanNameFieldInjectionView.class); } | /**
* Tests that a {@link Stateless} single local interface view EJB JAX-RS
* resource can have JAX-RS {@link HttpServletRequest} field injections.
*/ | Tests that a <code>Stateless</code> single local interface view EJB JAX-RS resource can have JAX-RS <code>HttpServletRequest</code> field injections | testLocalInterfaceWithBeanNameStatelessServletRequestFieldInjection | {
"repo_name": "kgibm/open-liberty",
"path": "dev/io.openliberty.ws.global.handler.internal_fat/fat/src/com/ibm/ws/webservices/handler/fat/OneInterfaceEJBTest.java",
"license": "epl-1.0",
"size": 27557
} | [
"com.ibm.ws.jaxrs.fat.ejbjaxrsinwar.onelocalinterface.withbeanname.OneLocalWithBeanNameFieldInjectionView"
] | import com.ibm.ws.jaxrs.fat.ejbjaxrsinwar.onelocalinterface.withbeanname.OneLocalWithBeanNameFieldInjectionView; | import com.ibm.ws.jaxrs.fat.ejbjaxrsinwar.onelocalinterface.withbeanname.*; | [
"com.ibm.ws"
] | com.ibm.ws; | 2,563,455 |
private static int read(InputStream input)
throws IOException
{
int value = input.read();
if( -1 == value ) {
throw new EOFException( "Unexpected EOF reached" );
}
return value;
} | static int function(InputStream input) throws IOException { int value = input.read(); if( -1 == value ) { throw new EOFException( STR ); } return value; } | /**
* Reads the next byte from the input stream.
* @param input the stream
* @return the byte
* @throws IOException if the end of file is reached
*/ | Reads the next byte from the input stream | read | {
"repo_name": "copyliu/Spoutcraft_CJKPatch",
"path": "src/minecraft/org/apache/commons/io/EndianUtils.java",
"license": "lgpl-3.0",
"size": 16613
} | [
"java.io.EOFException",
"java.io.IOException",
"java.io.InputStream"
] | import java.io.EOFException; import java.io.IOException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 885,922 |
private String postprocessCodeSnippet(String snippet, String indentation) {
// patch content prefix
StringBuffer buffer= new StringBuffer();
ILineTracker tracker= new DefaultLineTracker();
String patch= indentation + MultiCommentLine.MULTI_COMMENT_CONTENT_PREFIX;
// remove trailing spaces
int i= snippet... | String function(String snippet, String indentation) { StringBuffer buffer= new StringBuffer(); ILineTracker tracker= new DefaultLineTracker(); String patch= indentation + MultiCommentLine.MULTI_COMMENT_CONTENT_PREFIX; int i= snippet.length(); while (i > 0 && ' ' == snippet.charAt(i-1)) i--; snippet= snippet.substring(0... | /**
* Postprocesses the given code snippet with the given indentation.
*
* @param snippet the code snippet
* @param indentation the indentation
* @return the postprocessed code snippet
*/ | Postprocesses the given code snippet with the given indentation | postprocessCodeSnippet | {
"repo_name": "maxeler/eclipse",
"path": "eclipse.jdt.core/org.eclipse.jdt.core/formatter/org/eclipse/jdt/internal/formatter/comment/JavaDocRegion.java",
"license": "epl-1.0",
"size": 12070
} | [
"org.eclipse.jface.text.BadLocationException",
"org.eclipse.jface.text.DefaultLineTracker",
"org.eclipse.jface.text.ILineTracker"
] | import org.eclipse.jface.text.BadLocationException; import org.eclipse.jface.text.DefaultLineTracker; import org.eclipse.jface.text.ILineTracker; | import org.eclipse.jface.text.*; | [
"org.eclipse.jface"
] | org.eclipse.jface; | 2,202,781 |
public void showErrorMessage(String fetcherTitle, String localizedException) {
showMessage(Localization.lang("Error while fetching from %0", fetcherTitle) + "\n" +
Localization.lang("Please try again later and/or check your network connection.") + "\n" +
localizedExce... | void function(String fetcherTitle, String localizedException) { showMessage(Localization.lang(STR, fetcherTitle) + "\n" + Localization.lang(STR) + "\n" + localizedException, Localization.lang(STR, fetcherTitle), JOptionPane.ERROR_MESSAGE); } | /**
* Displays a dialog which tells the user that an error occurred while fetching entries
*/ | Displays a dialog which tells the user that an error occurred while fetching entries | showErrorMessage | {
"repo_name": "tobiasdiez/jabref",
"path": "src/main/java/org/jabref/gui/importer/ImportInspectionDialog.java",
"license": "mit",
"size": 60704
} | [
"javax.swing.JOptionPane",
"org.jabref.logic.l10n.Localization"
] | import javax.swing.JOptionPane; import org.jabref.logic.l10n.Localization; | import javax.swing.*; import org.jabref.logic.l10n.*; | [
"javax.swing",
"org.jabref.logic"
] | javax.swing; org.jabref.logic; | 1,086,474 |
protected void set(ContentResource other) {
set(other, false);
} | void function(ContentResource other) { set(other, false); } | /**
* Take all values from this object
*
* @param other
* The other object to take values from.
*/ | Take all values from this object | set | {
"repo_name": "marktriggs/nyu-sakai-10.4",
"path": "kernel/kernel-impl/src/main/java/org/sakaiproject/content/impl/BaseContentService.java",
"license": "apache-2.0",
"size": 426240
} | [
"org.sakaiproject.content.api.ContentResource"
] | import org.sakaiproject.content.api.ContentResource; | import org.sakaiproject.content.api.*; | [
"org.sakaiproject.content"
] | org.sakaiproject.content; | 2,109,333 |
@Override
public void finer(final String message, final Object... parameters) {
logWrapper.logIfEnabled(loggerName, Level.TRACE, null, message, parameters);
} | void function(final String message, final Object... parameters) { logWrapper.logIfEnabled(loggerName, Level.TRACE, null, message, parameters); } | /**
* Logs a message with parameters at the {@code Level.TRACE} level.
*
* @param message the message to log; the format depends on the message factory.
* @param parameters parameters to the message.
*/ | Logs a message with parameters at the Level.TRACE level | finer | {
"repo_name": "PurelyApplied/geode",
"path": "geode-core/src/main/java/org/apache/geode/internal/logging/log4j/LogWriterLogger.java",
"license": "apache-2.0",
"size": 56907
} | [
"org.apache.logging.log4j.Level"
] | import org.apache.logging.log4j.Level; | import org.apache.logging.log4j.*; | [
"org.apache.logging"
] | org.apache.logging; | 2,215,505 |
public static void except(TagExtension subject, TagExtension object) throws Exception {
if (subject != null && object != null) {
TagManager tm = EXT.getTagManager();
try (AutoClosingIterable<Bean> i = tm.iterate(object.getBizId())) {
for (Bean bean : i) {
// TagManager method handles if this bean wa... | static void function(TagExtension subject, TagExtension object) throws Exception { if (subject != null && object != null) { TagManager tm = EXT.getTagManager(); try (AutoClosingIterable<Bean> i = tm.iterate(object.getBizId())) { for (Bean bean : i) { tm.untag(subject.getBizId(), bean); } } subject.setUploadTagged(Long.... | /**
* Deletes from the subject Tag items which are in the object Tag.
*
* @param subject
* @param object
* @throws Exception
*/ | Deletes from the subject Tag items which are in the object Tag | except | {
"repo_name": "skyvers/skyve",
"path": "skyve-ejb/src/main/java/modules/admin/Tag/TagBizlet.java",
"license": "lgpl-2.1",
"size": 11569
} | [
"org.skyve.EXT",
"org.skyve.domain.Bean",
"org.skyve.persistence.AutoClosingIterable",
"org.skyve.tag.TagManager"
] | import org.skyve.EXT; import org.skyve.domain.Bean; import org.skyve.persistence.AutoClosingIterable; import org.skyve.tag.TagManager; | import org.skyve.*; import org.skyve.domain.*; import org.skyve.persistence.*; import org.skyve.tag.*; | [
"org.skyve",
"org.skyve.domain",
"org.skyve.persistence",
"org.skyve.tag"
] | org.skyve; org.skyve.domain; org.skyve.persistence; org.skyve.tag; | 1,696,381 |
public DBColumnExpr pgToTsvector(DBColumnExpr expr)
{
return new PostgresFuncExpr(expr, PostgresSqlPhrase.TO_TSVECTOR, null, DataType.UNKNOWN);
} | DBColumnExpr function(DBColumnExpr expr) { return new PostgresFuncExpr(expr, PostgresSqlPhrase.TO_TSVECTOR, null, DataType.UNKNOWN); } | /**
* See https://www.postgresql.org/docs/current/textsearch-controls.html
*/ | See HREF | pgToTsvector | {
"repo_name": "apache/empire-db",
"path": "empire-db/src/main/java/org/apache/empire/dbms/postgresql/DBCommandPostgres.java",
"license": "apache-2.0",
"size": 5707
} | [
"org.apache.empire.data.DataType",
"org.apache.empire.db.DBColumnExpr"
] | import org.apache.empire.data.DataType; import org.apache.empire.db.DBColumnExpr; | import org.apache.empire.data.*; import org.apache.empire.db.*; | [
"org.apache.empire"
] | org.apache.empire; | 749,811 |
public FunctionResult execute(final Evaluator evaluator, final String arguments)
throws FunctionException {
String result = null;
String exceptionMessage = "One string and one integer argument "
+ "are required.";
ArrayList values = FunctionHelper.getOneStringAndOneInteger(arguments,
Evaluat... | FunctionResult function(final Evaluator evaluator, final String arguments) throws FunctionException { String result = null; String exceptionMessage = STR + STR; ArrayList values = FunctionHelper.getOneStringAndOneInteger(arguments, EvaluationConstants.FUNCTION_ARGUMENT_SEPARATOR); if (values.size() != 2) { throw new Fu... | /**
* Executes the function for the specified argument. This method is called
* internally by Evaluator.
*
* @param evaluator
* An instance of Evaluator.
* @param arguments
* A string argument that will be converted into one string and
* one integer argument. Th... | Executes the function for the specified argument. This method is called internally by Evaluator | execute | {
"repo_name": "yvbbrjdr/yv3A-android",
"path": "yv3DAudio/src/net/sourceforge/jeval/function/string/CharAt.java",
"license": "gpl-2.0",
"size": 3776
} | [
"java.util.ArrayList",
"net.sourceforge.jeval.EvaluationConstants",
"net.sourceforge.jeval.Evaluator",
"net.sourceforge.jeval.function.FunctionConstants",
"net.sourceforge.jeval.function.FunctionException",
"net.sourceforge.jeval.function.FunctionHelper",
"net.sourceforge.jeval.function.FunctionResult"
... | import java.util.ArrayList; import net.sourceforge.jeval.EvaluationConstants; import net.sourceforge.jeval.Evaluator; import net.sourceforge.jeval.function.FunctionConstants; import net.sourceforge.jeval.function.FunctionException; import net.sourceforge.jeval.function.FunctionHelper; import net.sourceforge.jeval.funct... | import java.util.*; import net.sourceforge.jeval.*; import net.sourceforge.jeval.function.*; | [
"java.util",
"net.sourceforge.jeval"
] | java.util; net.sourceforge.jeval; | 65,995 |
private static void printToFile(String log) {
try {
if (Settings.isShortLogs()){
log = log.substring(0, Settings.getShortLogsLength()) + "\r\n";
}
bufferedWriter.write(log);
if (Settings.isFlushEveryTime()){
bufferedWriter.flus... | static void function(String log) { try { if (Settings.isShortLogs()){ log = log.substring(0, Settings.getShortLogsLength()) + "\r\n"; } bufferedWriter.write(log); if (Settings.isFlushEveryTime()){ bufferedWriter.flush(); } } catch (IOException ex) { ex.printStackTrace(); } } | /**
* Prints log to file using BufferedWriter. Based on current settings it can shorten log message to set length.
*
* @param log String with log message.
*/ | Prints log to file using BufferedWriter. Based on current settings it can shorten log message to set length | printToFile | {
"repo_name": "lukas-srom/loghandler",
"path": "src/cz/lsrom/loghandler/LogHandler.java",
"license": "mit",
"size": 6382
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 541,457 |
@Override
public void endPrefixMapping(final String prefix) throws SAXException {
if (depth > 2) {
handler.endPrefixMapping(prefix);
}
} | void function(final String prefix) throws SAXException { if (depth > 2) { handler.endPrefixMapping(prefix); } } | /**
* Don't end prefix mappings if we are at the root element. Leave the end
* processing method to do this.
*/ | Don't end prefix mappings if we are at the root element. Leave the end processing method to do this | endPrefixMapping | {
"repo_name": "gchq/stroom",
"path": "stroom-pipeline/src/main/java/stroom/pipeline/record/XMLRecordEmitter.java",
"license": "apache-2.0",
"size": 10680
} | [
"org.xml.sax.SAXException"
] | import org.xml.sax.SAXException; | import org.xml.sax.*; | [
"org.xml.sax"
] | org.xml.sax; | 1,040,170 |
public void setChunkedStreamingMode(int chunkLength) throws IOException {
if (conn == null) {
throw new IOException("Cannot open output stream on non opened connection");
}
conn.setChunkedStreamingMode(chunkLength);
} | void function(int chunkLength) throws IOException { if (conn == null) { throw new IOException(STR); } conn.setChunkedStreamingMode(chunkLength); } | /**
* Set chunked encoding for the file to be uploaded. This avoid the output
* stream to buffer all data before transmitting it.
*
* @param chunkLength the length of the single chunk
*/ | Set chunked encoding for the file to be uploaded. This avoid the output stream to buffer all data before transmitting it | setChunkedStreamingMode | {
"repo_name": "accesstest3/AndroidFunambol",
"path": "externals/jme-sdk/common/src/com/funambol/platform/se/HttpConnectionAdapter.java",
"license": "agpl-3.0",
"size": 13935
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,048,190 |
final void append(final AttributedCharacterIterator it, final StringBuffer toAppendTo) {
final int offset = toAppendTo.length();
int currentRunLimit = 0; // Next index where to check for attributes.
for (char c=it.first(); c!=DONE; c=it.next()) {
... | final void append(final AttributedCharacterIterator it, final StringBuffer toAppendTo) { final int offset = toAppendTo.length(); int currentRunLimit = 0; for (char c=it.first(); c!=DONE; c=it.next()) { toAppendTo.append(c); if (it.getIndex() == currentRunLimit) { currentRunLimit = it.getRunLimit(); for (final Map.Entry... | /**
* Appends all characters and attributes from the given iterator.
*
* @param toAppendTo shall be the same instance than {@link #text}.
*/ | Appends all characters and attributes from the given iterator | append | {
"repo_name": "apache/sis",
"path": "core/sis-utility/src/main/java/org/apache/sis/measure/FormattedCharacterIterator.java",
"license": "apache-2.0",
"size": 17944
} | [
"java.text.AttributedCharacterIterator",
"java.util.Map"
] | import java.text.AttributedCharacterIterator; import java.util.Map; | import java.text.*; import java.util.*; | [
"java.text",
"java.util"
] | java.text; java.util; | 415,035 |
public SwapFixedIborDefinition getUnderlyingSwap() {
return _underlyingSwap;
} | SwapFixedIborDefinition function() { return _underlyingSwap; } | /**
* Gets the underlying swap.
* @return The underlying swap
*/ | Gets the underlying swap | getUnderlyingSwap | {
"repo_name": "nssales/OG-Platform",
"path": "projects/OG-Analytics/src/main/java/com/opengamma/analytics/financial/instrument/payment/CouponCMSDefinition.java",
"license": "apache-2.0",
"size": 12028
} | [
"com.opengamma.analytics.financial.instrument.swap.SwapFixedIborDefinition"
] | import com.opengamma.analytics.financial.instrument.swap.SwapFixedIborDefinition; | import com.opengamma.analytics.financial.instrument.swap.*; | [
"com.opengamma.analytics"
] | com.opengamma.analytics; | 2,065,648 |
@Deprecated
public default Traversal.Admin eval(final Bytecode bytecode) throws ScriptException {
final Bindings bindings = this.createBindings();
bindings.putAll(bytecode.getBindings());
return eval(bytecode, bindings);
}
/**
* Evaluates {@link Traversal} {@link Bytecode} ... | default Traversal.Admin function(final Bytecode bytecode) throws ScriptException { final Bindings bindings = this.createBindings(); bindings.putAll(bytecode.getBindings()); return eval(bytecode, bindings); } /** * Evaluates {@link Traversal} {@link Bytecode} with the specified {@code Bindings}. These {@code Bindings} | /**
* Evaluates {@link Traversal} {@link Bytecode}. This method assumes that the traversal source to execute the
* bytecode against is in the global bindings and is named "g".
*
* @deprecated As of release 3.2.7, replaced by {@link #eval(Bytecode, String)}.
*/ | Evaluates <code>Traversal</code> <code>Bytecode</code>. This method assumes that the traversal source to execute the bytecode against is in the global bindings and is named "g" | eval | {
"repo_name": "artem-aliev/tinkerpop",
"path": "gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/jsr223/GremlinScriptEngine.java",
"license": "apache-2.0",
"size": 3667
} | [
"javax.script.Bindings",
"javax.script.ScriptException",
"org.apache.tinkerpop.gremlin.process.traversal.Bytecode",
"org.apache.tinkerpop.gremlin.process.traversal.Traversal"
] | import javax.script.Bindings; import javax.script.ScriptException; import org.apache.tinkerpop.gremlin.process.traversal.Bytecode; import org.apache.tinkerpop.gremlin.process.traversal.Traversal; | import javax.script.*; import org.apache.tinkerpop.gremlin.process.traversal.*; | [
"javax.script",
"org.apache.tinkerpop"
] | javax.script; org.apache.tinkerpop; | 2,796,280 |
public static Test suite() {
return new TestSuite(LongToStringTest.class);
} | static Test function() { return new TestSuite(LongToStringTest.class); } | /**
* Returns the test suite.
*
* @return the suite
*/ | Returns the test suite | suite | {
"repo_name": "waikato-datamining/adams-base",
"path": "adams-core/src/test/java/adams/data/conversion/LongToStringTest.java",
"license": "gpl-3.0",
"size": 2564
} | [
"junit.framework.Test",
"junit.framework.TestSuite"
] | import junit.framework.Test; import junit.framework.TestSuite; | import junit.framework.*; | [
"junit.framework"
] | junit.framework; | 910,249 |
public static File getOrCreateStatisticDirectory(final Identity identity, final String courseName) {
final File exportFolder = new File( // folder where exported user data should be
// put
FolderConfig.getCanonicalRoot() + FolderConfig.getUserHomes() + "/" + identity.getName() + "/private/statistics/"
... | static File function(final Identity identity, final String courseName) { final File exportFolder = new File( FolderConfig.getCanonicalRoot() + FolderConfig.getUserHomes() + "/" + identity.getName() + STR + Formatter.makeStringFilesystemSave(courseName)); if (exportFolder.exists()) { if (!exportFolder.isDirectory()) { t... | /**
* Returns the data export directory. If the directory does not yet exist the directory will be created
*
* @param ureq The user request
* @param courseName The course name or title. Will be used as directory name
* @return The file representing the dat export directory
*/ | Returns the data export directory. If the directory does not yet exist the directory will be created | getOrCreateStatisticDirectory | {
"repo_name": "RLDevOps/Demo",
"path": "src/main/java/org/olat/course/CourseFactory.java",
"license": "apache-2.0",
"size": 50856
} | [
"java.io.File",
"org.olat.core.commons.modules.bc.FolderConfig",
"org.olat.core.id.Identity",
"org.olat.core.logging.OLATRuntimeException",
"org.olat.core.util.ExportUtil",
"org.olat.core.util.Formatter"
] | import java.io.File; import org.olat.core.commons.modules.bc.FolderConfig; import org.olat.core.id.Identity; import org.olat.core.logging.OLATRuntimeException; import org.olat.core.util.ExportUtil; import org.olat.core.util.Formatter; | import java.io.*; import org.olat.core.commons.modules.bc.*; import org.olat.core.id.*; import org.olat.core.logging.*; import org.olat.core.util.*; | [
"java.io",
"org.olat.core"
] | java.io; org.olat.core; | 602,630 |
void setSelectedFigures(List<ROIShape> l)
{
FigureTableModel tableModel = (FigureTableModel) fieldTable.getModel();
Iterator<ROIShape> i = l.iterator();
//Register error and notify user.
ROIShape shape;
try {
TableCellEditor editor = fieldTable.getCellEditor();
if (editor != null) editor.stopCellEdi... | void setSelectedFigures(List<ROIShape> l) { FigureTableModel tableModel = (FigureTableModel) fieldTable.getModel(); Iterator<ROIShape> i = l.iterator(); ROIShape shape; try { TableCellEditor editor = fieldTable.getCellEditor(); if (editor != null) editor.stopCellEditing(); while (i.hasNext()) { shape = i.next(); tableM... | /**
* Sets the new figure retrieved from the passed collection.
*
* @param l The collection to handle.
*/ | Sets the new figure retrieved from the passed collection | setSelectedFigures | {
"repo_name": "ximenesuk/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/measurement/view/ObjectInspector.java",
"license": "gpl-2.0",
"size": 15155
} | [
"java.util.Iterator",
"java.util.List",
"javax.swing.table.TableCellEditor",
"org.openmicroscopy.shoola.agents.measurement.MeasurementAgent",
"org.openmicroscopy.shoola.agents.measurement.util.model.FigureTableModel",
"org.openmicroscopy.shoola.util.roi.model.ROIShape"
] | import java.util.Iterator; import java.util.List; import javax.swing.table.TableCellEditor; import org.openmicroscopy.shoola.agents.measurement.MeasurementAgent; import org.openmicroscopy.shoola.agents.measurement.util.model.FigureTableModel; import org.openmicroscopy.shoola.util.roi.model.ROIShape; | import java.util.*; import javax.swing.table.*; import org.openmicroscopy.shoola.agents.measurement.*; import org.openmicroscopy.shoola.agents.measurement.util.model.*; import org.openmicroscopy.shoola.util.roi.model.*; | [
"java.util",
"javax.swing",
"org.openmicroscopy.shoola"
] | java.util; javax.swing; org.openmicroscopy.shoola; | 1,384,731 |
@ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION)
public SyncPoller<PollResult<WorkloadNetworkPublicIpInner>, WorkloadNetworkPublicIpInner> beginCreatePublicIp(
String resourceGroupName,
String privateCloudName,
String publicIpId,
WorkloadNetworkPublicIpInner workloadNe... | @ServiceMethod(returns = ReturnType.LONG_RUNNING_OPERATION) SyncPoller<PollResult<WorkloadNetworkPublicIpInner>, WorkloadNetworkPublicIpInner> function( String resourceGroupName, String privateCloudName, String publicIpId, WorkloadNetworkPublicIpInner workloadNetworkPublicIp) { return beginCreatePublicIpAsync(resourceG... | /**
* Create a Public IP Block by id in a private cloud workload network.
*
* @param resourceGroupName The name of the resource group. The name is case insensitive.
* @param privateCloudName Name of the private cloud.
* @param publicIpId NSX Public IP Block identifier. Generally the same as the... | Create a Public IP Block by id in a private cloud workload network | beginCreatePublicIp | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/avs/azure-resourcemanager-avs/src/main/java/com/azure/resourcemanager/avs/implementation/WorkloadNetworksClientImpl.java",
"license": "mit",
"size": 538828
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.management.polling.PollResult",
"com.azure.core.util.polling.SyncPoller",
"com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPublicIpInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.management.polling.PollResult; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.avs.fluent.models.WorkloadNetworkPublicIpInner; | import com.azure.core.annotation.*; import com.azure.core.management.polling.*; import com.azure.core.util.polling.*; import com.azure.resourcemanager.avs.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 1,416,599 |
public void testCompleteOnTimeout_completed() {
for (Integer v1 : new Integer[] { 1, null })
{
CompletableFuture<Integer> f = new CompletableFuture<>();
CompletableFuture<Integer> g = new CompletableFuture<>();
long startTime = System.nanoTime();
f.complete(v1);
a... | void function() { for (Integer v1 : new Integer[] { 1, null }) { CompletableFuture<Integer> f = new CompletableFuture<>(); CompletableFuture<Integer> g = new CompletableFuture<>(); long startTime = System.nanoTime(); f.complete(v1); assertSame(f, f.completeOnTimeout(-1, LONG_DELAY_MS, MILLISECONDS)); assertSame(g, g.co... | /**
* completeOnTimeout has no effect if completed within timeout
*/ | completeOnTimeout has no effect if completed within timeout | testCompleteOnTimeout_completed | {
"repo_name": "google/desugar_jdk_libs",
"path": "jdk11/src/libcore/ojluni/src/test/java/util/concurrent/tck/CompletableFutureTest.java",
"license": "gpl-2.0",
"size": 182910
} | [
"java.util.concurrent.CompletableFuture"
] | import java.util.concurrent.CompletableFuture; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 114,329 |
@Generated
@Selector("setNumberOfTapsRequired:")
public native void setNumberOfTapsRequired(@NUInt long value); | @Selector(STR) native void function(@NUInt long value); | /**
* Default is 0. The number of full taps required before the press for gesture to be recognized
*/ | Default is 0. The number of full taps required before the press for gesture to be recognized | setNumberOfTapsRequired | {
"repo_name": "multi-os-engine/moe-core",
"path": "moe.apple/moe.platform.ios/src/main/java/apple/uikit/UILongPressGestureRecognizer.java",
"license": "apache-2.0",
"size": 7519
} | [
"org.moe.natj.general.ann.NUInt",
"org.moe.natj.objc.ann.Selector"
] | import org.moe.natj.general.ann.NUInt; import org.moe.natj.objc.ann.Selector; | import org.moe.natj.general.ann.*; import org.moe.natj.objc.ann.*; | [
"org.moe.natj"
] | org.moe.natj; | 1,077,447 |
public boolean setProtocol(String _proto)
{
String uri = this.getURI();
if (!StringTools.isBlank(_proto) && URIArg.isAbsoluteURL(uri)) {
try {
URL oldURI = new URL(uri);
String proto = _proto;
String host = oldURI.getHost();
... | boolean function(String _proto) { String uri = this.getURI(); if (!StringTools.isBlank(_proto) && URIArg.isAbsoluteURL(uri)) { try { URL oldURI = new URL(uri); String proto = _proto; String host = oldURI.getHost(); int port = oldURI.getPort(); String file = oldURI.getFile(); URL newURI = new URL(proto, host, port, file... | /**
*** Sets the 'protocol'
**/ | Sets the 'protocol' | setProtocol | {
"repo_name": "paragp/GTS-PreUAT",
"path": "src/org/opengts/util/URIArg.java",
"license": "apache-2.0",
"size": 41433
} | [
"java.net.MalformedURLException"
] | import java.net.MalformedURLException; | import java.net.*; | [
"java.net"
] | java.net; | 584,267 |
@Override
protected T doSwitch(int classifierID, EObject theEObject) {
switch (classifierID) {
case SPLevoDiffPackage.SP_LEVO_DIFF: {
SPLevoDiff spLevoDiff = (SPLevoDiff) theEObject;
T result = caseSPLevoDiff(spLevoDiff);
if (result == null)
re... | T function(int classifierID, EObject theEObject) { switch (classifierID) { case SPLevoDiffPackage.SP_LEVO_DIFF: { SPLevoDiff spLevoDiff = (SPLevoDiff) theEObject; T result = caseSPLevoDiff(spLevoDiff); if (result == null) result = caseDiff(spLevoDiff); if (result == null) result = defaultCase(theEObject); return result... | /**
* Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the first non-null result returned by a <code>caseXXX</code> call.
* @generated
*/ | Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result. | doSwitch | {
"repo_name": "kopl/SPLevo",
"path": "Diffing/org.splevo.diffing/src-gen/org/splevo/diffing/splevodiff/util/SPLevoDiffSwitch.java",
"license": "epl-1.0",
"size": 4694
} | [
"org.eclipse.emf.ecore.EObject",
"org.splevo.diffing.splevodiff.SPLevoDiff",
"org.splevo.diffing.splevodiff.SPLevoDiffPackage"
] | import org.eclipse.emf.ecore.EObject; import org.splevo.diffing.splevodiff.SPLevoDiff; import org.splevo.diffing.splevodiff.SPLevoDiffPackage; | import org.eclipse.emf.ecore.*; import org.splevo.diffing.splevodiff.*; | [
"org.eclipse.emf",
"org.splevo.diffing"
] | org.eclipse.emf; org.splevo.diffing; | 2,098,780 |
public void test_create_disk01() throws IOException {
final Properties properties = getProperties();
final Journal journal = new Journal(properties);
try {
final DiskOnlyStrategy bufferStrategy = (DiskOnlyStrategy) journal
.getBufferStrategy();
... | void function() throws IOException { final Properties properties = getProperties(); final Journal journal = new Journal(properties); try { final DiskOnlyStrategy bufferStrategy = (DiskOnlyStrategy) journal .getBufferStrategy(); assertTrue(STR, bufferStrategy.isStable()); assertFalse(STR, bufferStrategy.isFullyBuffered(... | /**
* Verify normal operation and basic assumptions when creating a new journal
* using {@link BufferMode#Disk}.
*
* @throws IOException
*/ | Verify normal operation and basic assumptions when creating a new journal using <code>BufferMode#Disk</code> | test_create_disk01 | {
"repo_name": "wikimedia/wikidata-query-blazegraph",
"path": "bigdata-core-test/bigdata/src/test/com/bigdata/journal/TestDiskJournal.java",
"license": "gpl-2.0",
"size": 11044
} | [
"java.io.IOException",
"java.util.Properties"
] | import java.io.IOException; import java.util.Properties; | import java.io.*; import java.util.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 650,354 |
@Test
public void testConstructionWithIndex() {
final String name = IPV4_HEADER_NAME + DOT + DST_ADDR + "[1]";
final PiMatchFieldId piMatchFieldId = PiMatchFieldId.of(name);
assertThat(piMatchFieldId, is(notNullValue()));
assertThat(piMatchFieldId.id(), is(name));
} | void function() { final String name = IPV4_HEADER_NAME + DOT + DST_ADDR + "[1]"; final PiMatchFieldId piMatchFieldId = PiMatchFieldId.of(name); assertThat(piMatchFieldId, is(notNullValue())); assertThat(piMatchFieldId.id(), is(name)); } | /**
* Checks the construction of a PiMatchFieldId object with index.
*/ | Checks the construction of a PiMatchFieldId object with index | testConstructionWithIndex | {
"repo_name": "gkatsikas/onos",
"path": "core/api/src/test/java/org/onosproject/net/pi/runtime/PiMatchFieldIdTest.java",
"license": "apache-2.0",
"size": 4000
} | [
"org.hamcrest.MatcherAssert",
"org.hamcrest.Matchers",
"org.onosproject.net.pi.model.PiMatchFieldId"
] | import org.hamcrest.MatcherAssert; import org.hamcrest.Matchers; import org.onosproject.net.pi.model.PiMatchFieldId; | import org.hamcrest.*; import org.onosproject.net.pi.model.*; | [
"org.hamcrest",
"org.onosproject.net"
] | org.hamcrest; org.onosproject.net; | 402,238 |
void upgradeFrom(ChannelHandlerContext ctx);
} | void upgradeFrom(ChannelHandlerContext ctx); } | /**
* Removes this codec (i.e. all associated handlers) from the pipeline.
*/ | Removes this codec (i.e. all associated handlers) from the pipeline | upgradeFrom | {
"repo_name": "gerdriesselmann/netty",
"path": "codec-http/src/main/java/io/netty/handler/codec/http/HttpClientUpgradeHandler.java",
"license": "apache-2.0",
"size": 10697
} | [
"io.netty.channel.ChannelHandlerContext"
] | import io.netty.channel.ChannelHandlerContext; | import io.netty.channel.*; | [
"io.netty.channel"
] | io.netty.channel; | 1,945,351 |
public static final native OrionKeyStrokeOverlay create(
int keyCode,
boolean modifier1,
boolean modifier2,
boolean modifier3,
boolean modifier4,
String type,
JavaScriptObject keyBindingModule) ; | static final native OrionKeyStrokeOverlay function( int keyCode, boolean modifier1, boolean modifier2, boolean modifier3, boolean modifier4, String type, JavaScriptObject keyBindingModule) ; | /**
* Constructs a new key stroke with the given key code, modifiers and event type.
*
* @param keyCode the key code.
* @param modifier1 the primary modifier (usually Command on Mac and Control on other platforms).
* @param modifier2 the secondary modifier (usually Shift).
* @param modifier3 the third... | Constructs a new key stroke with the given key code, modifiers and event type | create | {
"repo_name": "jonahkichwacoders/che",
"path": "ide/che-core-orion-editor/src/main/java/org/eclipse/che/ide/editor/orion/client/jso/OrionKeyStrokeOverlay.java",
"license": "epl-1.0",
"size": 2371
} | [
"com.google.gwt.core.client.JavaScriptObject"
] | import com.google.gwt.core.client.JavaScriptObject; | import com.google.gwt.core.client.*; | [
"com.google.gwt"
] | com.google.gwt; | 54,781 |
public MessageDestinationType<T> messageDestinationName(String messageDestinationName)
{
childNode.getOrCreate("message-destination-name").text(messageDestinationName);
return this;
} | MessageDestinationType<T> function(String messageDestinationName) { childNode.getOrCreate(STR).text(messageDestinationName); return this; } | /**
* Sets the <code>message-destination-name</code> element
* @param messageDestinationName the value for the element <code>message-destination-name</code>
* @return the current instance of <code>MessageDestinationType<T></code>
*/ | Sets the <code>message-destination-name</code> element | messageDestinationName | {
"repo_name": "forge/javaee-descriptors",
"path": "impl/src/main/java/org/jboss/shrinkwrap/descriptor/impl/javaee6/MessageDestinationTypeImpl.java",
"license": "epl-1.0",
"size": 12103
} | [
"org.jboss.shrinkwrap.descriptor.api.javaee6.MessageDestinationType"
] | import org.jboss.shrinkwrap.descriptor.api.javaee6.MessageDestinationType; | import org.jboss.shrinkwrap.descriptor.api.javaee6.*; | [
"org.jboss.shrinkwrap"
] | org.jboss.shrinkwrap; | 1,277,512 |
@Override
protected void resolveAttributes(ComponentHasAttributes component,
boolean nullId) throws Exception {
cacheProperties();
for (final Attribute att : component.getAttributes()) {
att.getName();
att.getAlternateTerminologyIds().keySet();
if (nullId) {
att.setId(null);
... | void function(ComponentHasAttributes component, boolean nullId) throws Exception { cacheProperties(); for (final Attribute att : component.getAttributes()) { att.getName(); att.getAlternateTerminologyIds().keySet(); if (nullId) { att.setId(null); } if (prop.getProperty(att.getValue()) != null) { att.setValue( prop.getP... | /**
* Resolve attributes.
*
* @param component the component
* @param nullId the null id
* @throws Exception the exception
*/ | Resolve attributes | resolveAttributes | {
"repo_name": "WestCoastInformatics/UMLS-Terminology-Server",
"path": "jpa-services/src/main/java/com/wci/umls/server/jpa/services/handlers/SnomedctGraphResolutionHandler.java",
"license": "apache-2.0",
"size": 6320
} | [
"com.wci.umls.server.model.content.Attribute",
"com.wci.umls.server.model.content.ComponentHasAttributes"
] | import com.wci.umls.server.model.content.Attribute; import com.wci.umls.server.model.content.ComponentHasAttributes; | import com.wci.umls.server.model.content.*; | [
"com.wci.umls"
] | com.wci.umls; | 981,248 |
private ByteBuffer readRecord() throws IOException {
recordBuffer.rewind();
final int readNow = archive.read(recordBuffer);
if (readNow != recordSize) {
return null;
}
return recordBuffer;
} | ByteBuffer function() throws IOException { recordBuffer.rewind(); final int readNow = archive.read(recordBuffer); if (readNow != recordSize) { return null; } return recordBuffer; } | /**
* Read a record from the input stream and return the data.
*
* @return The record data or null if EOF has been hit.
* @throws IOException if reading from the archive fails
*/ | Read a record from the input stream and return the data | readRecord | {
"repo_name": "apache/commons-compress",
"path": "src/main/java/org/apache/commons/compress/archivers/tar/TarFile.java",
"license": "apache-2.0",
"size": 29365
} | [
"java.io.IOException",
"java.nio.ByteBuffer"
] | import java.io.IOException; import java.nio.ByteBuffer; | import java.io.*; import java.nio.*; | [
"java.io",
"java.nio"
] | java.io; java.nio; | 1,267,785 |
public JButton getRightButton1() {
return this.right1;
} | JButton function() { return this.right1; } | /**
* Returns a reference to button 2, allowing the caller to set labels, action-listeners etc.
*
* @return the right button 1.
*/ | Returns a reference to button 2, allowing the caller to set labels, action-listeners etc | getRightButton1 | {
"repo_name": "ematiyuk/simple-edit",
"path": "src/simpleedit/FontChooserDialog.java",
"license": "mit",
"size": 22580
} | [
"javax.swing.JButton"
] | import javax.swing.JButton; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 2,366,140 |
private int gradientUpdate(List<TensorBuilder> factors,
List<TensorBuilder> unaryFactors, double stepSize) {
// The best assignment, as computed from only the unary factors.
int[] variableNums = new int[unaryFactors.size()];
int[] variableSizes = new int[unaryFactors.size()];
int[] variableValue... | int function(List<TensorBuilder> factors, List<TensorBuilder> unaryFactors, double stepSize) { int[] variableNums = new int[unaryFactors.size()]; int[] variableSizes = new int[unaryFactors.size()]; int[] variableValues = new int[unaryFactors.size()]; locallyDecodeFactors(unaryFactors, variableNums, variableSizes, varia... | /**
* Perform a single subgradient step, updating {@code factors} and
* {@code unaryFactors} with the computed subgradient.
*
* @param factors
* @param unaryFactors
* @param stepSize
* @return
*/ | Perform a single subgradient step, updating factors and unaryFactors with the computed subgradient | gradientUpdate | {
"repo_name": "jayantk/jklol",
"path": "src/com/jayantkrish/jklol/inference/DualDecomposition.java",
"license": "bsd-2-clause",
"size": 7984
} | [
"com.google.common.collect.Lists",
"com.jayantkrish.jklol.tensor.SparseTensor",
"com.jayantkrish.jklol.tensor.TensorBuilder",
"java.util.Arrays",
"java.util.List"
] | import com.google.common.collect.Lists; import com.jayantkrish.jklol.tensor.SparseTensor; import com.jayantkrish.jklol.tensor.TensorBuilder; import java.util.Arrays; import java.util.List; | import com.google.common.collect.*; import com.jayantkrish.jklol.tensor.*; import java.util.*; | [
"com.google.common",
"com.jayantkrish.jklol",
"java.util"
] | com.google.common; com.jayantkrish.jklol; java.util; | 1,196,631 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.