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 void openCore() throws StandardException { beginTime = getCurrentTimeMillis(); if (SanityManager.DEBUG) SanityManager.ASSERT( ! isOpen, "ScrollInsensitiveResultSet already open"); source.openCore(); isOpen = true; numOpens++; final int[] keyCols = new int[] { 0 }; ht =...
void function() throws StandardException { beginTime = getCurrentTimeMillis(); if (SanityManager.DEBUG) SanityManager.ASSERT( ! isOpen, STR); source.openCore(); isOpen = true; numOpens++; final int[] keyCols = new int[] { 0 }; ht = new BackingStoreHashtable(getTransactionController(), null, keyCols, false, -1, HashScan...
/** * open a scan on the source. scan parameters are evaluated * at each open, so there is probably some way of altering * their values... * * @exception StandardException thrown on failure */
open a scan on the source. scan parameters are evaluated at each open, so there is probably some way of altering their values..
openCore
{ "repo_name": "scnakandala/derby", "path": "java/engine/org/apache/derby/impl/sql/execute/ScrollInsensitiveResultSet.java", "license": "apache-2.0", "size": 33262 }
[ "org.apache.derby.iapi.error.StandardException", "org.apache.derby.iapi.store.access.BackingStoreHashtable", "org.apache.derby.shared.common.sanity.SanityManager" ]
import org.apache.derby.iapi.error.StandardException; import org.apache.derby.iapi.store.access.BackingStoreHashtable; import org.apache.derby.shared.common.sanity.SanityManager;
import org.apache.derby.iapi.error.*; import org.apache.derby.iapi.store.access.*; import org.apache.derby.shared.common.sanity.*;
[ "org.apache.derby" ]
org.apache.derby;
12,974
private void scheduleStorageUsageMonthlyBaseFetcher() { long sleepDurationInSecs = secondsToNextTick(currentMonth, config.mysqlMonthlyBaseFetchOffsetSec); logger.info("Schedule to fetch container storage monthly base after {} seconds", sleepDurationInSecs); scheduler.schedule(this::fetchStorageUsageMonthl...
void function() { long sleepDurationInSecs = secondsToNextTick(currentMonth, config.mysqlMonthlyBaseFetchOffsetSec); logger.info(STR, sleepDurationInSecs); scheduler.schedule(this::fetchStorageUsageMonthlyBase, sleepDurationInSecs, TimeUnit.SECONDS); }
/** * Schedule the task to fetch storage usage monthly base for next month. */
Schedule the task to fetch storage usage monthly base for next month
scheduleStorageUsageMonthlyBaseFetcher
{ "repo_name": "linkedin/ambry", "path": "ambry-quota/src/main/java/com/github/ambry/quota/storage/MySqlStorageUsageRefresher.java", "license": "apache-2.0", "size": 24084 }
[ "java.util.concurrent.TimeUnit" ]
import java.util.concurrent.TimeUnit;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
2,841,142
public static String base64Decode(String encodedSurveyId) { if (encodedSurveyId == null) { return encodedSurveyId; } ByteArrayInputStream bais = new ByteArrayInputStream(encodedSurveyId.getBytes()); InputStream b64is = null; try { b64is = MimeUtility.d...
static String function(String encodedSurveyId) { if (encodedSurveyId == null) { return encodedSurveyId; } ByteArrayInputStream bais = new ByteArrayInputStream(encodedSurveyId.getBytes()); InputStream b64is = null; try { b64is = MimeUtility.decode(bais, STR); } catch (MessagingException e) { LOGGER.error(e); } byte[] tm...
/** * Decodes the encoded string passed, this function is used to get the * information about the users and surveys from the URL. * * @param surveyId * String to be decoded. * @return String Decoded String. */
Decodes the encoded string passed, this function is used to get the information about the users and surveys from the URL
base64Decode
{ "repo_name": "ctsidev/SecureWise", "path": "wise/src/edu/ucla/wise/commons/CommonUtils.java", "license": "bsd-3-clause", "size": 5909 }
[ "java.io.ByteArrayInputStream", "java.io.IOException", "java.io.InputStream", "javax.mail.MessagingException", "javax.mail.internet.MimeUtility" ]
import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import javax.mail.MessagingException; import javax.mail.internet.MimeUtility;
import java.io.*; import javax.mail.*; import javax.mail.internet.*;
[ "java.io", "javax.mail" ]
java.io; javax.mail;
2,828,130
private void loadPropertyTags() { checkState(getSearchResultPresenter().getProviderData().getDisplayedItem() != null, "There should be a selected collection item."); checkState(getSearchResultPresenter().getProviderData().getDisplayedItem().getItem() != null, "The displayed collectio...
void function() { checkState(getSearchResultPresenter().getProviderData().getDisplayedItem() != null, STR); checkState(getSearchResultPresenter().getProviderData().getDisplayedItem().getItem() != null, STR); final RESTTopicCollectionItemV1 selectedItem = getSearchResultPresenter().getProviderData().getSelectedItem(); f...
/** * This method will load the complete list of property tags (and set allPropertyTagsLoadInitiated to true), and load * the property tags assigned to the latest revision of the topic (and set propertyTagsLoadInitiated to true). */
This method will load the complete list of property tags (and set allPropertyTagsLoadInitiated to true), and load the property tags assigned to the latest revision of the topic (and set propertyTagsLoadInitiated to true)
loadPropertyTags
{ "repo_name": "pressgang-ccms/PressGangCCMSUI", "path": "src/main/java/org/jboss/pressgang/ccms/ui/client/local/mvp/presenter/topic/searchresults/topics/TopicFilteredResultsAndDetailsPresenter.java", "license": "gpl-3.0", "size": 214511 }
[ "com.google.common.base.Preconditions", "org.jboss.pressgang.ccms.rest.v1.collections.items.RESTTopicCollectionItemV1", "org.jboss.pressgang.ccms.rest.v1.entities.RESTTopicV1" ]
import com.google.common.base.Preconditions; import org.jboss.pressgang.ccms.rest.v1.collections.items.RESTTopicCollectionItemV1; import org.jboss.pressgang.ccms.rest.v1.entities.RESTTopicV1;
import com.google.common.base.*; import org.jboss.pressgang.ccms.rest.v1.collections.items.*; import org.jboss.pressgang.ccms.rest.v1.entities.*;
[ "com.google.common", "org.jboss.pressgang" ]
com.google.common; org.jboss.pressgang;
2,436,860
public void leap(Reaction reaction, PopulationState state, Model model, boolean calcLogP, double thisdt) { // Calculate corrected rate double rho = reaction.getPropensity()*thisdt + 0.5*corrections.get(reaction)*thisdt*thisdt; // Draw number of reactions...
void function(Reaction reaction, PopulationState state, Model model, boolean calcLogP, double thisdt) { double rho = reaction.getPropensity()*thisdt + 0.5*corrections.get(reaction)*thisdt*thisdt; double q = Randomizer.nextPoisson(rho); if (calcLogP) { if (rho>0) stepLogP += -rho + q*Math.log(rho/thisdt) - Gamma.logGamm...
/** * Generate appropriate random state change according to Sehl's * step anticipation tau-leaping algorithm. * * @param reaction * @param state PopulationState to modify. * @param model * @param calcLogP * @param thisdt */
Generate appropriate random state change according to Sehl's step anticipation tau-leaping algorithm
leap
{ "repo_name": "CompEvol/MASTER", "path": "src/master/steppers/SALStepper.java", "license": "gpl-3.0", "size": 8061 }
[ "org.apache.commons.math.special.Gamma" ]
import org.apache.commons.math.special.Gamma;
import org.apache.commons.math.special.*;
[ "org.apache.commons" ]
org.apache.commons;
2,394,366
protected void createHhea(FontFileReader in, int size) throws IOException { OFDirTabEntry entry = dirTabs.get(OFTableName.HHEA); if (entry != null) { pad4(); seekTab(in, OFTableName.HHEA, 0); writeBytes(in.getBytes((int) entry.getOffset(), (int) entry.getLength())...
void function(FontFileReader in, int size) throws IOException { OFDirTabEntry entry = dirTabs.get(OFTableName.HHEA); if (entry != null) { pad4(); seekTab(in, OFTableName.HHEA, 0); writeBytes(in.getBytes((int) entry.getOffset(), (int) entry.getLength())); writeUShort((int) entry.getLength() + currentPos - 2, size); upda...
/** * Copy the hhea table as is from original font to subset font * and fill in size of hmtx table */
Copy the hhea table as is from original font to subset font and fill in size of hmtx table
createHhea
{ "repo_name": "StrategyObject/fop", "path": "src/java/org/apache/fop/fonts/truetype/TTFSubSetFile.java", "license": "apache-2.0", "size": 24571 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
530,646
return InetAddress.getLocalHost().getHostName(); } /** * Get the application working directory {@link Path}. * * @param fs a {@link FileSystem} instance on which {@link FileSystem#getHomeDirectory()} is called * to get the home directory of the {@link FileSystem} of the application working di...
return InetAddress.getLocalHost().getHostName(); } /** * Get the application working directory {@link Path}. * * @param fs a {@link FileSystem} instance on which {@link FileSystem#getHomeDirectory()} is called * to get the home directory of the {@link FileSystem} of the application working directory * @param applicatio...
/** * Get the name of the current host. * * @return the name of the current host * @throws UnknownHostException if the host name is unknown */
Get the name of the current host
getHostname
{ "repo_name": "yukuai518/gobblin", "path": "gobblin-cluster/src/main/java/gobblin/cluster/GobblinClusterUtils.java", "license": "apache-2.0", "size": 2117 }
[ "java.net.InetAddress", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.fs.Path" ]
import java.net.InetAddress; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path;
import java.net.*; import org.apache.hadoop.fs.*;
[ "java.net", "org.apache.hadoop" ]
java.net; org.apache.hadoop;
1,347,111
@Test public void testAllPositiveCopyFilesOptionsValues() { try { CopyFilesOptions opts = new CopyFilesOptions() .setChangelistId(100) .setNoUpdate(true) .setQuiet(true) .setNoClientSyncOrMod(false) .setBidirectional(true) ...
void function() { try { CopyFilesOptions opts = new CopyFilesOptions() .setChangelistId(100) .setNoUpdate(true) .setQuiet(true) .setNoClientSyncOrMod(false) .setBidirectional(true) .setReverseMapping(false) .setMaxFiles(1000); assertEquals(100, opts.getChangelistId()); assertEquals(true, opts.isNoUpdate()); assertEqual...
/** * Test positive values. */
Test positive values
testAllPositiveCopyFilesOptionsValues
{ "repo_name": "groboclown/p4ic4idea", "path": "p4java/src/test/java/com/perforce/p4java/tests/dev/unit/features131/CopyFilesOptionsQuietTest.java", "license": "apache-2.0", "size": 2772 }
[ "com.perforce.p4java.option.client.CopyFilesOptions", "org.junit.Assert" ]
import com.perforce.p4java.option.client.CopyFilesOptions; import org.junit.Assert;
import com.perforce.p4java.option.client.*; import org.junit.*;
[ "com.perforce.p4java", "org.junit" ]
com.perforce.p4java; org.junit;
318,546
@DataProvider(name = "isValidDurationDataProvider") public Object[][] isValidDurationDataProvider() { return new Object[][]{ {"10 us", true}, {"10 us", true}, {"100 MicroSeconds", true}, {"5 MS", true}, {"5\tMILLISECONDS", true}, ...
@DataProvider(name = STR) Object[][] function() { return new Object[][]{ {STR, true}, {STR, true}, {STR, true}, {STR, true}, {STR, true}, {STR, true}, {STR, true}, {STR, true}, {STR, true}, {STR, true}, {STR, true}, {"10us", false}, {STR, false}, {"5", false}, {STR, false}, {STR, false}, {STR, false} }; }
/** * Data provider. * * @return Test data. */
Data provider
isValidDurationDataProvider
{ "repo_name": "elasticlib/elasticlib", "path": "elasticlib-common/src/test/java/org/elasticlib/common/config/ConfigUtilTest.java", "license": "apache-2.0", "size": 7816 }
[ "org.testng.annotations.DataProvider" ]
import org.testng.annotations.DataProvider;
import org.testng.annotations.*;
[ "org.testng.annotations" ]
org.testng.annotations;
1,654,969
@ServiceMethod(returns = ReturnType.SINGLE) public SyncPoller<PollResult<ServerSecurityAlertPolicyInner>, ServerSecurityAlertPolicyInner> beginCreateOrUpdate( String resourceGroupName, String serverName, SecurityAlertPolicyName securityAlertPolicyName, ServerSecurityAlertPolicyIn...
@ServiceMethod(returns = ReturnType.SINGLE) SyncPoller<PollResult<ServerSecurityAlertPolicyInner>, ServerSecurityAlertPolicyInner> function( String resourceGroupName, String serverName, SecurityAlertPolicyName securityAlertPolicyName, ServerSecurityAlertPolicyInner parameters, Context context) { return beginCreateOrUpd...
/** * Creates or updates a threat detection policy. * * @param resourceGroupName The name of the resource group. The name is case insensitive. * @param serverName The name of the server. * @param securityAlertPolicyName The name of the threat detection policy. * @param parameters The serve...
Creates or updates a threat detection policy
beginCreateOrUpdate
{ "repo_name": "Azure/azure-sdk-for-java", "path": "sdk/mariadb/azure-resourcemanager-mariadb/src/main/java/com/azure/resourcemanager/mariadb/implementation/ServerSecurityAlertPoliciesClientImpl.java", "license": "mit", "size": 43102 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.management.polling.PollResult", "com.azure.core.util.Context", "com.azure.core.util.polling.SyncPoller", "com.azure.resourcemanager.mariadb.fluent.models.ServerSecurityAlertPolicyInner", "com.azure.resourc...
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.management.polling.PollResult; import com.azure.core.util.Context; import com.azure.core.util.polling.SyncPoller; import com.azure.resourcemanager.mariadb.fluent.models.ServerSecurityAlertPolicyInner; impo...
import com.azure.core.annotation.*; import com.azure.core.management.polling.*; import com.azure.core.util.*; import com.azure.core.util.polling.*; import com.azure.resourcemanager.mariadb.fluent.models.*; import com.azure.resourcemanager.mariadb.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
1,896,166
protected Element renameElement(Element el, String newName, boolean isIn) throws MapperException { Element newEl = null; if (isIn) newEl = inResultDoc.createElementNS(FACE_URI, newName); else if (!isIn) newEl = outResultDoc.createElementNS(FACE_URI, newName); // set all attributes of the constraine...
Element function(Element el, String newName, boolean isIn) throws MapperException { Element newEl = null; if (isIn) newEl = inResultDoc.createElementNS(FACE_URI, newName); else if (!isIn) newEl = outResultDoc.createElementNS(FACE_URI, newName); for (int a = 0; a < el.getAttributes().getLength();a++) { Attr at = (Attr)e...
/** * copy an element and all its attributes to the new document, renaming it * and putting it in no namespace. * @param el * @param newName * @param isIn true for the in-transform, false for the out-transform * @return * @throws MapperException */
copy an element and all its attributes to the new document, renaming it and putting it in no namespace
renameElement
{ "repo_name": "openmapsoftware/mappingtools", "path": "openmap-mapper-lib/src/main/java/com/openMap1/mapper/converters/FACEWrapper.java", "license": "epl-1.0", "size": 11744 }
[ "org.w3c.dom.Attr", "org.w3c.dom.Element" ]
import org.w3c.dom.Attr; import org.w3c.dom.Element;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
1,284,288
public static void verifyFilesEqual(FileSystem fs, Path p1, Path p2, int len) throws IOException { try (FSDataInputStream in1 = fs.open(p1); FSDataInputStream in2 = fs.open(p2)) { for (int i = 0; i < len; i++) { assertEquals("Mismatch at byte " + i, in1.read(), in2.read()); } ...
static void function(FileSystem fs, Path p1, Path p2, int len) throws IOException { try (FSDataInputStream in1 = fs.open(p1); FSDataInputStream in2 = fs.open(p2)) { for (int i = 0; i < len; i++) { assertEquals(STR + i, in1.read(), in2.read()); } } }
/** * Verify that two files have the same contents. * * @param fs The file system containing the two files. * @param p1 The path of the first file. * @param p2 The path of the second file. * @param len The length of the two files. * @throws IOException */
Verify that two files have the same contents
verifyFilesEqual
{ "repo_name": "dennishuo/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java", "license": "apache-2.0", "size": 90485 }
[ "java.io.IOException", "org.apache.hadoop.fs.FSDataInputStream", "org.apache.hadoop.fs.FileSystem", "org.apache.hadoop.fs.Path", "org.junit.Assert" ]
import java.io.IOException; import org.apache.hadoop.fs.FSDataInputStream; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; import org.junit.Assert;
import java.io.*; import org.apache.hadoop.fs.*; import org.junit.*;
[ "java.io", "org.apache.hadoop", "org.junit" ]
java.io; org.apache.hadoop; org.junit;
1,901,770
@Override public void toStream(ObjectOutput out) throws CacheLoaderException { try { Set<InternalCacheEntry> loadAll = loadAll(); int count = 0; for (InternalCacheEntry entry : loadAll) { getMarshaller().objectToObjectStream(entry, out); count++; }...
void function(ObjectOutput out) throws CacheLoaderException { try { Set<InternalCacheEntry> loadAll = loadAll(); int count = 0; for (InternalCacheEntry entry : loadAll) { getMarshaller().objectToObjectStream(entry, out); count++; } getMarshaller().objectToObjectStream(null, out); } catch (IOException e) { throw new Cac...
/** * Writes to a stream the number of entries (long) then the entries themselves. */
Writes to a stream the number of entries (long) then the entries themselves
toStream
{ "repo_name": "oscerd/infinispan-cachestore-cassandra", "path": "src/main/java/org/infinispan/loaders/cassandra/CassandraCacheStore.java", "license": "apache-2.0", "size": 24410 }
[ "java.io.IOException", "java.io.ObjectOutput", "java.util.Set", "org.infinispan.container.entries.InternalCacheEntry", "org.infinispan.loaders.CacheLoaderException" ]
import java.io.IOException; import java.io.ObjectOutput; import java.util.Set; import org.infinispan.container.entries.InternalCacheEntry; import org.infinispan.loaders.CacheLoaderException;
import java.io.*; import java.util.*; import org.infinispan.container.entries.*; import org.infinispan.loaders.*;
[ "java.io", "java.util", "org.infinispan.container", "org.infinispan.loaders" ]
java.io; java.util; org.infinispan.container; org.infinispan.loaders;
641,414
private synchronized CmsModule importModule(CmsObject cms, I_CmsReport report, CmsImportParameters parameters) throws CmsSecurityException, CmsConfigurationException, CmsException { // check if the user has the required permissions OpenCms.getRoleManager().checkRole(cms, CmsRole.DATABASE_MANAGE...
synchronized CmsModule function(CmsObject cms, I_CmsReport report, CmsImportParameters parameters) throws CmsSecurityException, CmsConfigurationException, CmsException { OpenCms.getRoleManager().checkRole(cms, CmsRole.DATABASE_MANAGER); CmsModule importedModule = readModuleFromImport(parameters.getPath()); if (OpenCms....
/** * Imports a module from an external file source.<p> * * @param cms must have been initialized with {@link CmsRole#DATABASE_MANAGER} permissions * @param report the report to print the progress information to * @param parameters the import parameters * * @return the imported module...
Imports a module from an external file source
importModule
{ "repo_name": "alkacon/opencms-core", "path": "src/org/opencms/module/CmsModuleImportExportHandler.java", "license": "lgpl-2.1", "size": 31918 }
[ "java.util.ArrayList", "java.util.List", "org.opencms.configuration.CmsConfigurationException", "org.opencms.file.CmsObject", "org.opencms.importexport.CmsImportParameters", "org.opencms.main.CmsException", "org.opencms.main.OpenCms", "org.opencms.security.CmsRole", "org.opencms.security.CmsSecurity...
import java.util.ArrayList; import java.util.List; import org.opencms.configuration.CmsConfigurationException; import org.opencms.file.CmsObject; import org.opencms.importexport.CmsImportParameters; import org.opencms.main.CmsException; import org.opencms.main.OpenCms; import org.opencms.security.CmsRole; import org.op...
import java.util.*; import org.opencms.configuration.*; import org.opencms.file.*; import org.opencms.importexport.*; import org.opencms.main.*; import org.opencms.security.*; import org.opencms.util.*;
[ "java.util", "org.opencms.configuration", "org.opencms.file", "org.opencms.importexport", "org.opencms.main", "org.opencms.security", "org.opencms.util" ]
java.util; org.opencms.configuration; org.opencms.file; org.opencms.importexport; org.opencms.main; org.opencms.security; org.opencms.util;
2,541,049
@Test public void testGetWithRunningVmsWhereThereAreNone() { VDSGroup result = dao.getWithRunningVms(groupWithNoRunningVms.getId()); assertNull(result); }
void function() { VDSGroup result = dao.getWithRunningVms(groupWithNoRunningVms.getId()); assertNull(result); }
/** * Ensures that null is returned. */
Ensures that null is returned
testGetWithRunningVmsWhereThereAreNone
{ "repo_name": "derekhiggins/ovirt-engine", "path": "backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/VdsGroupDAOTest.java", "license": "apache-2.0", "size": 9506 }
[ "org.junit.Assert", "org.ovirt.engine.core.common.businessentities.VDSGroup" ]
import org.junit.Assert; import org.ovirt.engine.core.common.businessentities.VDSGroup;
import org.junit.*; import org.ovirt.engine.core.common.businessentities.*;
[ "org.junit", "org.ovirt.engine" ]
org.junit; org.ovirt.engine;
1,458,554
//------------// // contextual // //------------// public static double contextual (double inter, double[] partners, double[] ratios) { Objects.requireNonNull(ratios, "Null ratios array"); Objects.requ...
static double function (double inter, double[] partners, double[] ratios) { Objects.requireNonNull(ratios, STR); Objects.requireNonNull(partners, STR); if (ratios.length != partners.length) { throw new IllegalArgumentException(STR); } double contribution = 0; for (int i = 0; i < partners.length; i++) { contribution += ...
/** * Compute contextual grade, knowing inter grade and, for each partner, * its intrinsic grade and the ratio brought by supporting relation. * * @param inter the (intrinsic grade of the) inter * @param partners the array of (intrinsic grades of the) supporting partners * @param ...
Compute contextual grade, knowing inter grade and, for each partner, its intrinsic grade and the ratio brought by supporting relation
contextual
{ "repo_name": "Audiveris/audiveris", "path": "src/main/org/audiveris/omr/sig/GradeUtil.java", "license": "agpl-3.0", "size": 5695 }
[ "java.util.Objects" ]
import java.util.Objects;
import java.util.*;
[ "java.util" ]
java.util;
2,849,497
@RequestMapping(value = "/search/{keyWord}") public List<DrugSearchResult> fetchMedList(@PathVariable String keyWord) { return drugService.fetchMedList(keyWord); }
@RequestMapping(value = STR) List<DrugSearchResult> function(@PathVariable String keyWord) { return drugService.fetchMedList(keyWord); }
/** * GET: {@link http://ec2-54-243-195-170.compute-1.amazonaws.com:8080/drugs/search/{keyWord}}. * This rest endpoint is to search the OpenFDA API data source. * * @return A list of Drug Search Results * @see DrugService * @see RequestMapping * @see <a href="https://open.fda.gov/drug/label/">Ope...
This rest endpoint is to search the OpenFDA API data source
fetchMedList
{ "repo_name": "keithb418/medcheckerapp", "path": "MedAnalyzerResources/src/main/java/com/longview/gsa/controller/DrugLabelingController.java", "license": "cc0-1.0", "size": 3786 }
[ "com.longview.gsa.domain.DrugSearchResult", "java.util.List", "org.springframework.web.bind.annotation.PathVariable", "org.springframework.web.bind.annotation.RequestMapping" ]
import com.longview.gsa.domain.DrugSearchResult; import java.util.List; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping;
import com.longview.gsa.domain.*; import java.util.*; import org.springframework.web.bind.annotation.*;
[ "com.longview.gsa", "java.util", "org.springframework.web" ]
com.longview.gsa; java.util; org.springframework.web;
516,030
@Override public void loadDataToPage(Page page, ReportContext context, WizardSession session) throws Exception { String query = context.getId(); CreateTeamConfig form = new CreateTeamConfig(); // The form will be in the format Account;Pod - grab the former: String account = query.split(";")[0]; // Pre-p...
void function(Page page, ReportContext context, WizardSession session) throws Exception { String query = context.getId(); CreateTeamConfig form = new CreateTeamConfig(); String account = query.split(";")[0]; form.setAccount(account); page.getFlist().getByFieldId(FORM_ID + STR).setEditable(false); session.getSessionAttr...
/** * This sets up the initial fields and provides default values (in this case * the account name) */
This sets up the initial fields and provides default values (in this case the account name)
loadDataToPage
{ "repo_name": "CiscoUKIDCDev/ucsd-spark-plugin", "path": "Spark/src/com/cisco/ukidcv/spark/reports/teams/actions/CreateTeamAction.java", "license": "apache-2.0", "size": 4245 }
[ "com.cisco.ukidcv.spark.tasks.teams.CreateTeamConfig", "com.cloupia.model.cIM.ReportContext", "com.cloupia.service.cIM.inframgr.forms.wizard.Page", "com.cloupia.service.cIM.inframgr.forms.wizard.WizardSession" ]
import com.cisco.ukidcv.spark.tasks.teams.CreateTeamConfig; import com.cloupia.model.cIM.ReportContext; import com.cloupia.service.cIM.inframgr.forms.wizard.Page; import com.cloupia.service.cIM.inframgr.forms.wizard.WizardSession;
import com.cisco.ukidcv.spark.tasks.teams.*; import com.cloupia.model.*; import com.cloupia.service.*;
[ "com.cisco.ukidcv", "com.cloupia.model", "com.cloupia.service" ]
com.cisco.ukidcv; com.cloupia.model; com.cloupia.service;
755,856
public void setEPService(EPServiceProvider epService);
void function(EPServiceProvider epService);
/** * Set the epService * @param epService - the value to set */
Set the epService
setEPService
{ "repo_name": "georgenicoll/esper", "path": "esperio-csv/src/main/java/com/espertech/esperio/CoordinatedAdapter.java", "license": "gpl-2.0", "size": 2158 }
[ "com.espertech.esper.client.EPServiceProvider" ]
import com.espertech.esper.client.EPServiceProvider;
import com.espertech.esper.client.*;
[ "com.espertech.esper" ]
com.espertech.esper;
1,190,139
T getAssigned(IAssignedTask task); PortMapper PORT_MAPPER = new PortMapper();
T getAssigned(IAssignedTask task); PortMapper PORT_MAPPER = new PortMapper();
/** * Gets assigned resource values stored in {@code task}. * * @param task Task to get assigned resources from. * @return Assigned resource values. */
Gets assigned resource values stored in task
getAssigned
{ "repo_name": "apache/aurora", "path": "src/main/java/org/apache/aurora/scheduler/resources/ResourceMapper.java", "license": "apache-2.0", "size": 3557 }
[ "org.apache.aurora.scheduler.storage.entities.IAssignedTask" ]
import org.apache.aurora.scheduler.storage.entities.IAssignedTask;
import org.apache.aurora.scheduler.storage.entities.*;
[ "org.apache.aurora" ]
org.apache.aurora;
1,664,972
@Override public double estimate(final Node node, final BitExp goal) { return estimateCost(node, goal); }
double function(final Node node, final BitExp goal) { return estimateCost(node, goal); }
/** * Return the estimated distance to the goal to reach the specified state. If the return value is * <code>DOUBLE.MAX_VALUE</code>, it means that the goal is unreachable from the specified * state. * * @param node the state from which the distance to the goal must be estimated. * @param ...
Return the estimated distance to the goal to reach the specified state. If the return value is <code>DOUBLE.MAX_VALUE</code>, it means that the goal is unreachable from the specified state
estimate
{ "repo_name": "pellierd/pddl4j", "path": "src/main/java/fr/uga/pddl4j/heuristics/relaxation/MinCost.java", "license": "lgpl-3.0", "size": 5032 }
[ "fr.uga.pddl4j.planners.statespace.search.strategy.Node", "fr.uga.pddl4j.util.BitExp" ]
import fr.uga.pddl4j.planners.statespace.search.strategy.Node; import fr.uga.pddl4j.util.BitExp;
import fr.uga.pddl4j.planners.statespace.search.strategy.*; import fr.uga.pddl4j.util.*;
[ "fr.uga.pddl4j" ]
fr.uga.pddl4j;
2,657,600
public static void logRenameFileOperation(Context context) { logHistogram(context, COUNT_FILEOP_SYSTEM, FILEOP_RENAME); }
static void function(Context context) { logHistogram(context, COUNT_FILEOP_SYSTEM, FILEOP_RENAME); }
/** * Logs rename file operation. It is a part of file operation stats. We do not differentiate * between internal and external locations, all rename operations are logged under * COUNT_FILEOP_SYSTEM. Call this when a rename file operation has completed. * * @param context */
Logs rename file operation. It is a part of file operation stats. We do not differentiate between internal and external locations, all rename operations are logged under COUNT_FILEOP_SYSTEM. Call this when a rename file operation has completed
logRenameFileOperation
{ "repo_name": "xorware/android_frameworks_base", "path": "packages/DocumentsUI/src/com/android/documentsui/Metrics.java", "license": "apache-2.0", "size": 34732 }
[ "android.content.Context" ]
import android.content.Context;
import android.content.*;
[ "android.content" ]
android.content;
1,258,293
Timeouts pageLoadTimeout(long time, TimeUnit unit); }
Timeouts pageLoadTimeout(long time, TimeUnit unit); }
/** * Sets the amount of time to wait for a page load to complete before throwing an error. * If the timeout is negative, page loads can be indefinite. * * @param time The timeout value. * @param unit The unit of time. * @return A Timeouts interface. */
Sets the amount of time to wait for a page load to complete before throwing an error. If the timeout is negative, page loads can be indefinite
pageLoadTimeout
{ "repo_name": "saikrishna321/java-client", "path": "src/main/java/org/openqa/selenium/WebDriver.java", "license": "apache-2.0", "size": 19339 }
[ "java.util.concurrent.TimeUnit" ]
import java.util.concurrent.TimeUnit;
import java.util.concurrent.*;
[ "java.util" ]
java.util;
1,528,227
private void validateEvent(Event event) { if (event.getType() == Event.Type.StartEvent) assertNSequenceFlows(event, 0, 0, 1, 1); else if (event.getType() == Event.Type.EndEvent) assertNSequenceFlows(event, 1, 1, 0, 0); else if (event.getType() == Event.Type.IntermediateEvent) assertNSequenceFlow...
void function(Event event) { if (event.getType() == Event.Type.StartEvent) assertNSequenceFlows(event, 0, 0, 1, 1); else if (event.getType() == Event.Type.EndEvent) assertNSequenceFlows(event, 1, 1, 0, 0); else if (event.getType() == Event.Type.IntermediateEvent) assertNSequenceFlows(event, 1, 1, 1, 1); else throw new ...
/** * Validates an Event with checks for type and number of allowed incoming/outgoing sequence flows. * * @param event * Event to validate */
Validates an Event with checks for type and number of allowed incoming/outgoing sequence flows
validateEvent
{ "repo_name": "fhaer/BPMN-XPDL-to-AristaFlow", "path": "src/de/bpmnaftool/model/bpmn/BpmnValidatorImpl.java", "license": "gpl-3.0", "size": 10946 }
[ "de.bpmnaftool.model.bpmn.flowobject.Event", "de.bpmnaftool.model.transformation.NotTransformableException" ]
import de.bpmnaftool.model.bpmn.flowobject.Event; import de.bpmnaftool.model.transformation.NotTransformableException;
import de.bpmnaftool.model.bpmn.flowobject.*; import de.bpmnaftool.model.transformation.*;
[ "de.bpmnaftool.model" ]
de.bpmnaftool.model;
203,932
public DBExpression transformToStorableType(DBExpression columnExpression) { return columnExpression; }
DBExpression function(DBExpression columnExpression) { return columnExpression; }
/** * Transform a datatype not supported by the database into a type that the * database does support. * * <p> * Used mostly to turn Booleans into numbers. * * <p> * By default this method just returns the input DBExpression. * * @param columnExpression a column expression that might need ...
Transform a datatype not supported by the database into a type that the database does support. Used mostly to turn Booleans into numbers. By default this method just returns the input DBExpression
transformToStorableType
{ "repo_name": "gregorydgraham/DBvolution", "path": "src/main/java/nz/co/gregs/dbvolution/databases/definitions/DBDefinition.java", "license": "apache-2.0", "size": 191012 }
[ "nz.co.gregs.dbvolution.expressions.DBExpression" ]
import nz.co.gregs.dbvolution.expressions.DBExpression;
import nz.co.gregs.dbvolution.expressions.*;
[ "nz.co.gregs" ]
nz.co.gregs;
1,295,343
public void setArrowPaint(Paint paint) { this.arrowPaint = paint; }
void function(Paint paint) { this.arrowPaint = paint; }
/** * Sets the paint used for the arrow. * * @param paint the arrow paint (<code>null</code> not permitted). */
Sets the paint used for the arrow
setArrowPaint
{ "repo_name": "raedle/univis", "path": "lib/jfreechart-1.0.1/src/org/jfree/chart/annotations/XYPointerAnnotation.java", "license": "lgpl-2.1", "size": 14740 }
[ "java.awt.Paint" ]
import java.awt.Paint;
import java.awt.*;
[ "java.awt" ]
java.awt;
1,927,077
return Duration.ofSeconds(5); } @Value.Default default boolean isLimitConnectionPool() { return true; }
return Duration.ofSeconds(5); } @Value.Default default boolean isLimitConnectionPool() { return true; }
/** * Timeout to check out a connection from the connection pool. * * This connection pool checkout won't occur until you call {@link javax.ws.rs.client.InvocationInvocation#invoke()}. * If the time to get a connection surpasses this value, a runtime exception will be thrown. * * Supported...
Timeout to check out a connection from the connection pool. This connection pool checkout won't occur until you call <code>javax.ws.rs.client.InvocationInvocation#invoke()</code>. If the time to get a connection surpasses this value, a runtime exception will be thrown. Supported: resteasy-apache, resteasy Unsupported: ...
getConnectionPoolTimeout
{ "repo_name": "opentable/otj-jaxrs", "path": "client/src/main/java/com/opentable/jaxrs/JaxRsClientConfig.java", "license": "apache-2.0", "size": 7783 }
[ "java.time.Duration", "org.immutables.value.Value" ]
import java.time.Duration; import org.immutables.value.Value;
import java.time.*; import org.immutables.value.*;
[ "java.time", "org.immutables.value" ]
java.time; org.immutables.value;
2,573,293
public static int run(String[] args, ClassLoader classLoader) throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InvocationTargetException { final Options options = new Options(); if (args.length ==0) { usage(); return -1; } for (Str...
static int function(String[] args, ClassLoader classLoader) throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InvocationTargetException { final Options options = new Options(); if (args.length ==0) { usage(); return -1; } for (String arg : args) { if (arg.equals("-help")) { usage(); return -...
/** * Runs the schema generator. * * @param classLoader * the schema generator will run in this classLoader. * It needs to be able to load APT and JAXB RI classes. Note that * JAXB RI classes refer to APT classes. Must not be null. * * @return * exit code...
Runs the schema generator
run
{ "repo_name": "samskivert/ikvm-openjdk", "path": "build/linux-amd64/impsrc/com/sun/tools/internal/jxc/SchemaGenerator.java", "license": "gpl-2.0", "size": 7531 }
[ "com.sun.tools.internal.jxc.apt.Options", "com.sun.tools.internal.xjc.BadCommandLineException", "java.io.File", "java.lang.reflect.InvocationTargetException", "java.lang.reflect.Method", "java.util.ArrayList", "java.util.List" ]
import com.sun.tools.internal.jxc.apt.Options; import com.sun.tools.internal.xjc.BadCommandLineException; import java.io.File; import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.ArrayList; import java.util.List;
import com.sun.tools.internal.jxc.apt.*; import com.sun.tools.internal.xjc.*; import java.io.*; import java.lang.reflect.*; import java.util.*;
[ "com.sun.tools", "java.io", "java.lang", "java.util" ]
com.sun.tools; java.io; java.lang; java.util;
129,656
public void test_before_after() { Calendar early = Calendar.getInstance(); Calendar late = Calendar.getInstance(); // test by second early.set(2008, 3, 20, 17, 28, 12); late.set(2008, 3, 20, 17, 28, 22); // test before() assertTrue(early.before(late)); ...
void function() { Calendar early = Calendar.getInstance(); Calendar late = Calendar.getInstance(); early.set(2008, 3, 20, 17, 28, 12); late.set(2008, 3, 20, 17, 28, 22); assertTrue(early.before(late)); assertFalse(early.before(early)); assertFalse(late.before(early)); assertTrue(late.after(early)); assertFalse(late.aft...
/** * java.util.Calendar#before(Object) * java.util.Calendar#after(Object) */
java.util.Calendar#before(Object) java.util.Calendar#after(Object)
test_before_after
{ "repo_name": "mirego/j2objc", "path": "jre_emul/android/platform/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/CalendarTest.java", "license": "apache-2.0", "size": 35571 }
[ "java.util.Calendar" ]
import java.util.Calendar;
import java.util.*;
[ "java.util" ]
java.util;
387,560
protected static Map<String, String> extractResponseHeaders(Header[] responseHeaders) { if (responseHeaders == null || responseHeaders.length == 0) { return null; } Map<String, String> answer = new HashMap<>(); for (Header header : responseHeaders) { answer.p...
static Map<String, String> function(Header[] responseHeaders) { if (responseHeaders == null responseHeaders.length == 0) { return null; } Map<String, String> answer = new HashMap<>(); for (Header header : responseHeaders) { answer.put(header.getName(), header.getValue()); } return answer; }
/** * Extracts the response headers * * @param responseHeaders the headers * @return the extracted headers or <tt>null</tt> if no headers existed */
Extracts the response headers
extractResponseHeaders
{ "repo_name": "ullgren/camel", "path": "components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java", "license": "apache-2.0", "size": 27966 }
[ "java.util.HashMap", "java.util.Map", "org.apache.http.Header" ]
import java.util.HashMap; import java.util.Map; import org.apache.http.Header;
import java.util.*; import org.apache.http.*;
[ "java.util", "org.apache.http" ]
java.util; org.apache.http;
886,960
void enterBuiltin_typeof(@NotNull EsperEPL2GrammarParser.Builtin_typeofContext ctx); void exitBuiltin_typeof(@NotNull EsperEPL2GrammarParser.Builtin_typeofContext ctx);
void enterBuiltin_typeof(@NotNull EsperEPL2GrammarParser.Builtin_typeofContext ctx); void exitBuiltin_typeof(@NotNull EsperEPL2GrammarParser.Builtin_typeofContext ctx);
/** * Exit a parse tree produced by {@link EsperEPL2GrammarParser#builtin_typeof}. * @param ctx the parse tree */
Exit a parse tree produced by <code>EsperEPL2GrammarParser#builtin_typeof</code>
exitBuiltin_typeof
{ "repo_name": "georgenicoll/esper", "path": "esper/src/main/java/com/espertech/esper/epl/generated/EsperEPL2GrammarListener.java", "license": "gpl-2.0", "size": 114105 }
[ "org.antlr.v4.runtime.misc.NotNull" ]
import org.antlr.v4.runtime.misc.NotNull;
import org.antlr.v4.runtime.misc.*;
[ "org.antlr.v4" ]
org.antlr.v4;
2,636,920
public static TypeInference forScalarFunction( DataTypeFactory typeFactory, Class<? extends ScalarFunction> function) { final FunctionMappingExtractor mappingExtractor = new FunctionMappingExtractor( typeFactory, function, UserDefinedFunctionHelper.SCALAR_EVAL, createParameterSignatureExtraction(...
static TypeInference function( DataTypeFactory typeFactory, Class<? extends ScalarFunction> function) { final FunctionMappingExtractor mappingExtractor = new FunctionMappingExtractor( typeFactory, function, UserDefinedFunctionHelper.SCALAR_EVAL, createParameterSignatureExtraction(0), null, createReturnTypeResultExtract...
/** * Extracts a type inference from a {@link ScalarFunction}. */
Extracts a type inference from a <code>ScalarFunction</code>
forScalarFunction
{ "repo_name": "darionyaphet/flink", "path": "flink-table/flink-table-common/src/main/java/org/apache/flink/table/types/extraction/TypeInferenceExtractor.java", "license": "apache-2.0", "size": 10427 }
[ "org.apache.flink.table.catalog.DataTypeFactory", "org.apache.flink.table.functions.ScalarFunction", "org.apache.flink.table.functions.UserDefinedFunctionHelper", "org.apache.flink.table.types.extraction.FunctionMappingExtractor", "org.apache.flink.table.types.inference.TypeInference" ]
import org.apache.flink.table.catalog.DataTypeFactory; import org.apache.flink.table.functions.ScalarFunction; import org.apache.flink.table.functions.UserDefinedFunctionHelper; import org.apache.flink.table.types.extraction.FunctionMappingExtractor; import org.apache.flink.table.types.inference.TypeInference;
import org.apache.flink.table.catalog.*; import org.apache.flink.table.functions.*; import org.apache.flink.table.types.extraction.*; import org.apache.flink.table.types.inference.*;
[ "org.apache.flink" ]
org.apache.flink;
1,480,639
@ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux<VirtualMachineInner> listByResourceGroupAsync(String resourceGroupName);
@ServiceMethod(returns = ReturnType.COLLECTION) PagedFlux<VirtualMachineInner> listByResourceGroupAsync(String resourceGroupName);
/** * Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to * get the next page of virtual machines. * * @param resourceGroupName The name of the resource group. * @throws IllegalArgumentException thrown if parameters fail the validation...
Lists all of the virtual machines in the specified resource group. Use the nextLink property in the response to get the next page of virtual machines
listByResourceGroupAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/resourcemanager/azure-resourcemanager-compute/src/main/java/com/azure/resourcemanager/compute/fluent/VirtualMachinesClient.java", "license": "mit", "size": 106942 }
[ "com.azure.core.annotation.ReturnType", "com.azure.core.annotation.ServiceMethod", "com.azure.core.http.rest.PagedFlux", "com.azure.resourcemanager.compute.fluent.models.VirtualMachineInner" ]
import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedFlux; import com.azure.resourcemanager.compute.fluent.models.VirtualMachineInner;
import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.resourcemanager.compute.fluent.models.*;
[ "com.azure.core", "com.azure.resourcemanager" ]
com.azure.core; com.azure.resourcemanager;
2,054,097
public static void compileSortRecordFactory(Vector<Sort> sortObjects, ClassGenerator classGen, MethodGenerator methodGen) { String sortRecordClass = compileSortRecord(sortObjects, classGen, methodGen); boolean needsSortRecordFactory = false; final int nsorts = sortOb...
static void function(Vector<Sort> sortObjects, ClassGenerator classGen, MethodGenerator methodGen) { String sortRecordClass = compileSortRecord(sortObjects, classGen, methodGen); boolean needsSortRecordFactory = false; final int nsorts = sortObjects.size(); for (int i = 0; i < nsorts; i++) { final Sort sort = sortObjec...
/** * Compiles code that instantiates a NodeSortRecordFactory object which * will produce NodeSortRecord objects of a specific type. */
Compiles code that instantiates a NodeSortRecordFactory object which will produce NodeSortRecord objects of a specific type
compileSortRecordFactory
{ "repo_name": "wangsongpeng/jdk-src", "path": "src/main/java/com/sun/org/apache/xalan/internal/xsltc/compiler/Sort.java", "license": "apache-2.0", "size": 30304 }
[ "com.sun.org.apache.bcel.internal.generic.ConstantPoolGen", "com.sun.org.apache.bcel.internal.generic.InstructionList", "com.sun.org.apache.bcel.internal.generic.LocalVariableGen", "com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator", "com.sun.org.apache.xalan.internal.xsltc.compiler.util....
import com.sun.org.apache.bcel.internal.generic.ConstantPoolGen; import com.sun.org.apache.bcel.internal.generic.InstructionList; import com.sun.org.apache.bcel.internal.generic.LocalVariableGen; import com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator; import com.sun.org.apache.xalan.internal.xsltc....
import com.sun.org.apache.bcel.internal.generic.*; import com.sun.org.apache.xalan.internal.xsltc.compiler.util.*; import java.util.*;
[ "com.sun.org", "java.util" ]
com.sun.org; java.util;
2,032,133
@JsonProperty(K_FIELD_SEPARATOR_ESCAPE) public String getFieldSeparatorEscape() { return fieldSeparatorEscape; }
@JsonProperty(K_FIELD_SEPARATOR_ESCAPE) String function() { return fieldSeparatorEscape; }
/** * Returns the escape character for the field separator. * @return the escape character, or {@code null} if it is specified */
Returns the escape character for the field separator
getFieldSeparatorEscape
{ "repo_name": "asakusafw/asakusafw", "path": "info/hive/src/main/java/com/asakusafw/info/hive/DelimitedRowFormatInfo.java", "license": "apache-2.0", "size": 9899 }
[ "com.fasterxml.jackson.annotation.JsonProperty" ]
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.*;
[ "com.fasterxml.jackson" ]
com.fasterxml.jackson;
1,240,789
protected Instances calculateCenters(Instances data, Clusterer clusterer, Instances outputFormat) { Instances result; Hashtable<Integer,Instances> clusters; List<Integer> indices; int i; int cluster; boolean error; String errorMsg; Instances subset; double[] ...
Instances function(Instances data, Clusterer clusterer, Instances outputFormat) { Instances result; Hashtable<Integer,Instances> clusters; List<Integer> indices; int i; int cluster; boolean error; String errorMsg; Instances subset; double[] values; Instance inst; int[] counts; int maxIndex; result = new Instances(outpu...
/** * Calculates the centers. * * @param data the input data used for training the clusterer * @param clusterer the built clusterer * @param outputFormat the format to use for the output * @return the generated output */
Calculates the centers
calculateCenters
{ "repo_name": "waikato-datamining/adams-base", "path": "adams-weka/src/main/java/adams/flow/transformer/wekaclusterer/ClusterCenters.java", "license": "gpl-3.0", "size": 7089 }
[ "java.util.ArrayList", "java.util.Collections", "java.util.Hashtable", "java.util.List" ]
import java.util.ArrayList; import java.util.Collections; import java.util.Hashtable; import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,790,551
public static int[] sampleOOBRows(int nrows, float rate, Random sampler, int[] oob) { int oobcnt = 0; // Number of oob rows Arrays.fill(oob, 0); for(int row = 0; row < nrows; row++) { if (sampler.nextFloat() >= rate) { // it is out-of-bag row oob[1+oobcnt++] = row; if (1+oobcnt>=oob....
static int[] function(int nrows, float rate, Random sampler, int[] oob) { int oobcnt = 0; Arrays.fill(oob, 0); for(int row = 0; row < nrows; row++) { if (sampler.nextFloat() >= rate) { oob[1+oobcnt++] = row; if (1+oobcnt>=oob.length) oob = Arrays.copyOf(oob, Math.round(1.2f*nrows+0.5f)+2); } } oob[0] = oobcnt; return o...
/** * In-situ version of {@link #sampleOOBRows(int, float, Random)}. * * @param oob an initial array to hold sampled rows. Can be internally reallocated. * @return an array containing sampled rows. * * @see #sampleOOBRows(int, float, Random) */
In-situ version of <code>#sampleOOBRows(int, float, Random)</code>
sampleOOBRows
{ "repo_name": "spennihana/h2o-3", "path": "h2o-genmodel/src/main/java/water/util/ModelUtils.java", "license": "apache-2.0", "size": 1887 }
[ "java.util.Arrays", "java.util.Random" ]
import java.util.Arrays; import java.util.Random;
import java.util.*;
[ "java.util" ]
java.util;
318,925
public void setFilePaths(Path... filePaths) { if (!supportsMultiPaths() && filePaths.length > 1) { throw new UnsupportedOperationException( "Multiple paths are not supported by this FileInputFormat."); } if (filePaths.length < 1) { throw new Illega...
void function(Path... filePaths) { if (!supportsMultiPaths() && filePaths.length > 1) { throw new UnsupportedOperationException( STR); } if (filePaths.length < 1) { throw new IllegalArgumentException(STR); } if (filePaths.length == 1) { this.filePath = filePaths[0]; } else { this.filePath = null; } this.filePaths = fil...
/** * Sets multiple paths of files to be read. * * @param filePaths The paths of the files to read. */
Sets multiple paths of files to be read
setFilePaths
{ "repo_name": "aljoscha/flink", "path": "flink-core/src/main/java/org/apache/flink/api/common/io/FileInputFormat.java", "license": "apache-2.0", "size": 43342 }
[ "org.apache.flink.core.fs.Path" ]
import org.apache.flink.core.fs.Path;
import org.apache.flink.core.fs.*;
[ "org.apache.flink" ]
org.apache.flink;
1,612,507
List<PokemonDTO> getPokemonsByTrainer(int trainerId);
List<PokemonDTO> getPokemonsByTrainer(int trainerId);
/** * Gets existing Pokemons by Trainer ID * * @param trainerId * @return List of PokemonDTOs */
Gets existing Pokemons by Trainer ID
getPokemonsByTrainer
{ "repo_name": "domhanak/pa165-pkmn-league", "path": "pkmnleague-api/src/main/java/cz/fi/muni/pa165/seminar/pkmnleague/facade/PokemonFacade.java", "license": "mit", "size": 2730 }
[ "cz.fi.muni.pa165.seminar.pkmnleague.dto.PokemonDTO", "java.util.List" ]
import cz.fi.muni.pa165.seminar.pkmnleague.dto.PokemonDTO; import java.util.List;
import cz.fi.muni.pa165.seminar.pkmnleague.dto.*; import java.util.*;
[ "cz.fi.muni", "java.util" ]
cz.fi.muni; java.util;
2,186,019
public void updateLogo(Logo logo) { if (logo == null) { if (maybeShowDefaultLogo()) return; mLogo = null; invalidate(); return; } String contentDescription = TextUtils.isEmpty(logo.altText) ? null : getResource...
void function(Logo logo) { if (logo == null) { if (maybeShowDefaultLogo()) return; mLogo = null; invalidate(); return; } String contentDescription = TextUtils.isEmpty(logo.altText) ? null : getResources().getString(R.string.accessibility_google_doodle, logo.altText); updateLogo( logo.image, contentDescription, false, i...
/** * Fades in a new logo over the current logo. * * @param logo The new logo to fade in. */
Fades in a new logo over the current logo
updateLogo
{ "repo_name": "ric2b/Vivaldi-browser", "path": "chromium/chrome/android/java/src/org/chromium/chrome/browser/ntp/LogoView.java", "license": "bsd-3-clause", "size": 15340 }
[ "android.text.TextUtils", "org.chromium.chrome.browser.ntp.LogoBridge" ]
import android.text.TextUtils; import org.chromium.chrome.browser.ntp.LogoBridge;
import android.text.*; import org.chromium.chrome.browser.ntp.*;
[ "android.text", "org.chromium.chrome" ]
android.text; org.chromium.chrome;
1,934,426
public OutputStream getOutputStream() { return this.os; }
OutputStream function() { return this.os; }
/** * Returns the outputstream * * @return the outputstream */
Returns the outputstream
getOutputStream
{ "repo_name": "pellcorp/fop", "path": "src/java/org/apache/fop/afp/modca/StreamedResourceGroup.java", "license": "apache-2.0", "size": 2646 }
[ "java.io.OutputStream" ]
import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
689,544
@Metadata(label = "security", secret = true) public void setOauthTokenUrl(String oauthTokenUrl) { configuration.setOauthTokenUrl(oauthTokenUrl); }
@Metadata(label = STR, secret = true) void function(String oauthTokenUrl) { configuration.setOauthTokenUrl(oauthTokenUrl); }
/** * OAuth token Url */
OAuth token Url
setOauthTokenUrl
{ "repo_name": "kevinearls/camel", "path": "components/camel-servicenow/camel-servicenow-component/src/main/java/org/apache/camel/component/servicenow/ServiceNowComponent.java", "license": "apache-2.0", "size": 8815 }
[ "org.apache.camel.spi.Metadata" ]
import org.apache.camel.spi.Metadata;
import org.apache.camel.spi.*;
[ "org.apache.camel" ]
org.apache.camel;
33,763
public static float convertPixelsToDp(float px, Context context) { Resources resources = context.getResources(); DisplayMetrics metrics = resources.getDisplayMetrics(); float dp = px / (metrics.densityDpi / 160f); return dp; }
static float function(float px, Context context) { Resources resources = context.getResources(); DisplayMetrics metrics = resources.getDisplayMetrics(); float dp = px / (metrics.densityDpi / 160f); return dp; }
/** * This method converts device specific pixels to density independent pixels. * * @param px A value in px (pixels) unit. Which we need to convert into db * @param context Context to get resources and device specific display metrics * @return A float value to represent dp equivalent to px value */
This method converts device specific pixels to density independent pixels
convertPixelsToDp
{ "repo_name": "OleksandrKucherenko/spacefish", "path": "_libs/artfulbits-sdk/src/main/com/artfulbits/utils/Use.java", "license": "mit", "size": 46048 }
[ "android.content.Context", "android.content.res.Resources", "android.util.DisplayMetrics" ]
import android.content.Context; import android.content.res.Resources; import android.util.DisplayMetrics;
import android.content.*; import android.content.res.*; import android.util.*;
[ "android.content", "android.util" ]
android.content; android.util;
154,603
public static YamlConfiguration loadConfiguration(Reader reader) { Validate.notNull(reader, "Stream cannot be null"); YamlConfiguration config = new YamlConfiguration(); try { config.load(reader); } catch (IOException ex) { Bukkit.getLogger().log(Level.SEVER...
static YamlConfiguration function(Reader reader) { Validate.notNull(reader, STR); YamlConfiguration config = new YamlConfiguration(); try { config.load(reader); } catch (IOException ex) { Bukkit.getLogger().log(Level.SEVERE, STR, ex); } catch (InvalidConfigurationException ex) { Bukkit.getLogger().log(Level.SEVERE, STR...
/** * Creates a new {@link YamlConfiguration}, loading from the given reader. * <p> * Any errors loading the Configuration will be logged and then ignored. * If the specified input is not a valid config, a blank config will be * returned. * * @param reader input * @return resulti...
Creates a new <code>YamlConfiguration</code>, loading from the given reader. Any errors loading the Configuration will be logged and then ignored. If the specified input is not a valid config, a blank config will be returned
loadConfiguration
{ "repo_name": "GlowstoneMC/Glowkit-Legacy", "path": "src/main/java/org/bukkit/configuration/file/YamlConfiguration.java", "license": "gpl-3.0", "size": 8259 }
[ "java.io.IOException", "java.io.Reader", "java.util.logging.Level", "org.apache.commons.lang.Validate", "org.bukkit.Bukkit", "org.bukkit.configuration.InvalidConfigurationException" ]
import java.io.IOException; import java.io.Reader; import java.util.logging.Level; import org.apache.commons.lang.Validate; import org.bukkit.Bukkit; import org.bukkit.configuration.InvalidConfigurationException;
import java.io.*; import java.util.logging.*; import org.apache.commons.lang.*; import org.bukkit.*; import org.bukkit.configuration.*;
[ "java.io", "java.util", "org.apache.commons", "org.bukkit", "org.bukkit.configuration" ]
java.io; java.util; org.apache.commons; org.bukkit; org.bukkit.configuration;
573,416
public static Map<String, Collection<ClusterNode>> neighborhood(Iterable<ClusterNode> nodes) { Map<String, Collection<ClusterNode>> map = new HashMap<>(); for (ClusterNode n : nodes) { String macs = n.attribute(ATTR_MACS); assert macs != null : "Missing MACs attribute: " + ...
static Map<String, Collection<ClusterNode>> function(Iterable<ClusterNode> nodes) { Map<String, Collection<ClusterNode>> map = new HashMap<>(); for (ClusterNode n : nodes) { String macs = n.attribute(ATTR_MACS); assert macs != null : STR + n; Collection<ClusterNode> neighbors = map.get(macs); if (neighbors == null) map...
/** * Groups given nodes by the node's physical computer (host). * <p> * Detection of the same physical computer (host) is based on comparing set of network interface MACs. * If two nodes have the same set of MACs, Ignite considers these nodes running on the same * physical computer. * ...
Groups given nodes by the node's physical computer (host). Detection of the same physical computer (host) is based on comparing set of network interface MACs. If two nodes have the same set of MACs, Ignite considers these nodes running on the same physical computer
neighborhood
{ "repo_name": "apache/ignite", "path": "modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java", "license": "apache-2.0", "size": 387878 }
[ "java.util.ArrayList", "java.util.Collection", "java.util.HashMap", "java.util.Map", "org.apache.ignite.cluster.ClusterNode" ]
import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.Map; import org.apache.ignite.cluster.ClusterNode;
import java.util.*; import org.apache.ignite.cluster.*;
[ "java.util", "org.apache.ignite" ]
java.util; org.apache.ignite;
1,234,869
private static List<ProfileThreadSnapshotRecord> querySnapshot(String segmentId, IProfileThreadSnapshotQueryDAO threadSnapshotQueryDAO, ProfiledBasicInfo.SequenceRange sequenceRange) throws IOException { for (int i = 1; i <= QUERY_PROFILE_SNAPSHOT_RETRY_COUNT; i++) { try { return...
static List<ProfileThreadSnapshotRecord> function(String segmentId, IProfileThreadSnapshotQueryDAO threadSnapshotQueryDAO, ProfiledBasicInfo.SequenceRange sequenceRange) throws IOException { for (int i = 1; i <= QUERY_PROFILE_SNAPSHOT_RETRY_COUNT; i++) { try { return threadSnapshotQueryDAO.queryRecords(segmentId, seque...
/** * query snapshots with retry mechanism */
query snapshots with retry mechanism
querySnapshot
{ "repo_name": "ascrutae/sky-walking", "path": "oap-server/server-tools/profile-exporter/tool-profile-snapshot-bootstrap/src/main/java/org/apache/skywalking/oap/server/tool/profile/exporter/ProfileSnapshotDumper.java", "license": "apache-2.0", "size": 5162 }
[ "java.io.IOException", "java.util.List", "org.apache.skywalking.oap.server.core.profile.ProfileThreadSnapshotRecord", "org.apache.skywalking.oap.server.core.storage.profile.IProfileThreadSnapshotQueryDAO" ]
import java.io.IOException; import java.util.List; import org.apache.skywalking.oap.server.core.profile.ProfileThreadSnapshotRecord; import org.apache.skywalking.oap.server.core.storage.profile.IProfileThreadSnapshotQueryDAO;
import java.io.*; import java.util.*; import org.apache.skywalking.oap.server.core.profile.*; import org.apache.skywalking.oap.server.core.storage.profile.*;
[ "java.io", "java.util", "org.apache.skywalking" ]
java.io; java.util; org.apache.skywalking;
907,379
private ArrayList<TrafficLight> stringListToTrafficLightList(ArrayList<String> stringList) { ArrayList<TrafficLight> trafficLightList = new ArrayList<TrafficLight>(10); for(String string : stringList) { TrafficLight trafficLight = TrafficLightCenter.getTrafficLightByName(string); if(trafficLig...
ArrayList<TrafficLight> function(ArrayList<String> stringList) { ArrayList<TrafficLight> trafficLightList = new ArrayList<TrafficLight>(10); for(String string : stringList) { TrafficLight trafficLight = TrafficLightCenter.getTrafficLightByName(string); if(trafficLight != null) trafficLightList.add(trafficLight); } retu...
/** * This method converts a string list of traffic light names into an object list * containing the corresponding traffic lights by iteratively looking up traffic * light objects by name. * * @param stringList * string list containing names of traffic lights to look up * * @return * ...
This method converts a string list of traffic light names into an object list containing the corresponding traffic lights by iteratively looking up traffic light objects by name
stringListToTrafficLightList
{ "repo_name": "Karasion/Capstone2015-PurpleOcean2", "path": "OpenDS3.0/src/eu/opends/environment/TrafficLight.java", "license": "gpl-3.0", "size": 13793 }
[ "java.util.ArrayList" ]
import java.util.ArrayList;
import java.util.*;
[ "java.util" ]
java.util;
253,675
public static ims.core.admin.domain.objects.EmergencyAttendance extractEmergencyAttendance(ims.domain.ILightweightDomainFactory domainFactory, ims.emergency.vo.EmergencyAttendanceForEDDischargeVo valueObject) { return extractEmergencyAttendance(domainFactory, valueObject, new HashMap()); }
static ims.core.admin.domain.objects.EmergencyAttendance function(ims.domain.ILightweightDomainFactory domainFactory, ims.emergency.vo.EmergencyAttendanceForEDDischargeVo valueObject) { return extractEmergencyAttendance(domainFactory, valueObject, new HashMap()); }
/** * Create the domain object from the value object. * @param domainFactory - used to create existing (persistent) domain objects. * @param valueObject - extract the domain object fields from this. */
Create the domain object from the value object
extractEmergencyAttendance
{ "repo_name": "IMS-MAXIMS/openMAXIMS", "path": "Source Library/openmaxims_workspace/ValueObjects/src/ims/emergency/vo/domain/EmergencyAttendanceForEDDischargeVoAssembler.java", "license": "agpl-3.0", "size": 19870 }
[ "java.util.HashMap" ]
import java.util.HashMap;
import java.util.*;
[ "java.util" ]
java.util;
457,535
protected SystemConfigurationType getConfiguration() throws FaultMessage { return getObject(SystemConfigurationType.class, SystemObjectsType.SYSTEM_CONFIGURATION.value()); }
SystemConfigurationType function() throws FaultMessage { return getObject(SystemConfigurationType.class, SystemObjectsType.SYSTEM_CONFIGURATION.value()); }
/** * Retrieves and returns actual system configuration * */
Retrieves and returns actual system configuration
getConfiguration
{ "repo_name": "Pardus-Engerek/engerek", "path": "testing/wstest/src/test/java/com/evolveum/midpoint/testing/wstest/AbstractWebserviceTest.java", "license": "apache-2.0", "size": 34670 }
[ "com.evolveum.midpoint.xml.ns._public.common.common_3.SystemConfigurationType", "com.evolveum.midpoint.xml.ns._public.common.common_3.SystemObjectsType", "com.evolveum.midpoint.xml.ns._public.common.fault_3.FaultMessage" ]
import com.evolveum.midpoint.xml.ns._public.common.common_3.SystemConfigurationType; import com.evolveum.midpoint.xml.ns._public.common.common_3.SystemObjectsType; import com.evolveum.midpoint.xml.ns._public.common.fault_3.FaultMessage;
import com.evolveum.midpoint.xml.ns._public.common.common_3.*; import com.evolveum.midpoint.xml.ns._public.common.fault_3.*;
[ "com.evolveum.midpoint" ]
com.evolveum.midpoint;
2,033,527
public List<Tuple3<FieldsAssociation, FieldsDetectedWithMethod, FieldsAssociationDetectionType>> getRelationshipDetectedBy(List<String> ids, List<String> fromFields, List<String> relFields, List<String> toFields) throws IOException, JsonClientException { List<Object> args = new ArrayList<Object>(); ...
List<Tuple3<FieldsAssociation, FieldsDetectedWithMethod, FieldsAssociationDetectionType>> function(List<String> ids, List<String> fromFields, List<String> relFields, List<String> toFields) throws IOException, JsonClientException { List<Object> args = new ArrayList<Object>(); args.add(ids); args.add(fromFields); args.ad...
/** * <p>Original spec-file function name: get_relationship_DetectedBy</p> * <pre> * </pre> * @param ids instance of list of String * @param fromFields instance of list of String * @param relFields instance of list of String * @param toFields instance of list of String...
Original spec-file function name: get_relationship_DetectedBy <code> </code>
getRelationshipDetectedBy
{ "repo_name": "kbase/trees", "path": "src/us/kbase/cdmientityapi/CDMIEntityAPIClient.java", "license": "mit", "size": 869221 }
[ "com.fasterxml.jackson.core.type.TypeReference", "java.io.IOException", "java.util.ArrayList", "java.util.List", "us.kbase.common.service.JsonClientException", "us.kbase.common.service.Tuple3" ]
import com.fasterxml.jackson.core.type.TypeReference; import java.io.IOException; import java.util.ArrayList; import java.util.List; import us.kbase.common.service.JsonClientException; import us.kbase.common.service.Tuple3;
import com.fasterxml.jackson.core.type.*; import java.io.*; import java.util.*; import us.kbase.common.service.*;
[ "com.fasterxml.jackson", "java.io", "java.util", "us.kbase.common" ]
com.fasterxml.jackson; java.io; java.util; us.kbase.common;
1,967,559
public void setFixedDomainAxisSpace(AxisSpace space) { setFixedDomainAxisSpace(space, true); }
void function(AxisSpace space) { setFixedDomainAxisSpace(space, true); }
/** * Sets the fixed domain axis space and sends a {@link PlotChangeEvent} to * all registered listeners. * * @param space the space (<code>null</code> permitted). * * @see #getFixedDomainAxisSpace() */
Sets the fixed domain axis space and sends a <code>PlotChangeEvent</code> to all registered listeners
setFixedDomainAxisSpace
{ "repo_name": "Epsilon2/Memetic-Algorithm-for-TSP", "path": "jfreechart-1.0.16/source/org/jfree/chart/plot/XYPlot.java", "license": "mit", "size": 199979 }
[ "org.jfree.chart.axis.AxisSpace" ]
import org.jfree.chart.axis.AxisSpace;
import org.jfree.chart.axis.*;
[ "org.jfree.chart" ]
org.jfree.chart;
2,198,172
@Test public void setNoTtlForDirectoryWithTtl() throws Exception { CreateDirectoryOptions createDirectoryOptions = CreateDirectoryOptions.defaults().setRecursive(true).setTtl(0); mFileSystemMaster.createDirectory(NESTED_URI, createDirectoryOptions); // After setting TTL to NO_TTL, the original T...
void function() throws Exception { CreateDirectoryOptions createDirectoryOptions = CreateDirectoryOptions.defaults().setRecursive(true).setTtl(0); mFileSystemMaster.createDirectory(NESTED_URI, createDirectoryOptions); mFileSystemMaster.setAttribute(NESTED_URI, SetAttributeOptions.defaults().setTtl(Constants.NO_TTL)); H...
/** * Tests that the original TTL is removed after setting it to {@link Constants#NO_TTL} for * a directory. */
Tests that the original TTL is removed after setting it to <code>Constants#NO_TTL</code> for a directory
setNoTtlForDirectoryWithTtl
{ "repo_name": "Reidddddd/mo-alluxio", "path": "core/server/master/src/test/java/alluxio/master/file/FileSystemMasterTest.java", "license": "apache-2.0", "size": 81136 }
[ "java.net.URI", "org.junit.Assert" ]
import java.net.URI; import org.junit.Assert;
import java.net.*; import org.junit.*;
[ "java.net", "org.junit" ]
java.net; org.junit;
253,357
EClass getReviewOfSystemsSection();
EClass getReviewOfSystemsSection();
/** * Returns the meta object for class '{@link org.openhealthtools.mdht.uml.cda.hitsp.ReviewOfSystemsSection <em>Review Of Systems Section</em>}'. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @return the meta object for class '<em>Review Of Systems Section</em>'. * @see org.openhealthtools.mdht.u...
Returns the meta object for class '<code>org.openhealthtools.mdht.uml.cda.hitsp.ReviewOfSystemsSection Review Of Systems Section</code>'.
getReviewOfSystemsSection
{ "repo_name": "drbgfc/mdht", "path": "cda/deprecated/org.openhealthtools.mdht.uml.cda.hitsp/src/org/openhealthtools/mdht/uml/cda/hitsp/HITSPPackage.java", "license": "epl-1.0", "size": 366422 }
[ "org.eclipse.emf.ecore.EClass" ]
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
271,904
public void stageInFile2FileSystem(Job job) { List<FileItem> fList = job.getFileList(); for (FileItem file : fList) { switch (ReplicaCatalog.getFileSystem()) { case LOCAL: ReplicaCatalog.addFileToStorage(file.getName(), this.getName()...
void function(Job job) { List<FileItem> fList = job.getFileList(); for (FileItem file : fList) { switch (ReplicaCatalog.getFileSystem()) { case LOCAL: ReplicaCatalog.addFileToStorage(file.getName(), this.getName()); break; case SHARED: ReplicaCatalog.addFileToStorage(file.getName(), this.getName()); break; default: bre...
/** * Stage in files for a stage-in job. For a local file system (such as * condor-io) add files to the local storage; For a shared file system (such * as NFS) add files to the shared storage * * @param cl, the job * @pre $none * @post $none */
Stage in files for a stage-in job. For a local file system (such as condor-io) add files to the local storage; For a shared file system (such as NFS) add files to the shared storage
stageInFile2FileSystem
{ "repo_name": "hkchen1983/ComplexCloudSim", "path": "sources/org/workflowsim/WorkflowDatacenter.java", "license": "lgpl-3.0", "size": 16083 }
[ "java.util.List", "org.workflowsim.utils.ReplicaCatalog" ]
import java.util.List; import org.workflowsim.utils.ReplicaCatalog;
import java.util.*; import org.workflowsim.utils.*;
[ "java.util", "org.workflowsim.utils" ]
java.util; org.workflowsim.utils;
1,629,289
public Observable<ServiceResponse<ImagePrediction>> classifyImageWithNoStoreWithServiceResponseAsync(UUID projectId, String publishedName, byte[] imageData, ClassifyImageWithNoStoreOptionalParameter classifyImageWithNoStoreOptionalParameter) { if (this.client.endpoint() == null) { throw new Ille...
Observable<ServiceResponse<ImagePrediction>> function(UUID projectId, String publishedName, byte[] imageData, ClassifyImageWithNoStoreOptionalParameter classifyImageWithNoStoreOptionalParameter) { if (this.client.endpoint() == null) { throw new IllegalArgumentException(STR); } if (projectId == null) { throw new Illegal...
/** * Classify an image without saving the result. * * @param projectId The project id. * @param publishedName Specifies the name of the model to evaluate against. * @param imageData Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports images up to 0MB. * @param class...
Classify an image without saving the result
classifyImageWithNoStoreWithServiceResponseAsync
{ "repo_name": "selvasingh/azure-sdk-for-java", "path": "sdk/cognitiveservices/ms-azure-cs-customvision-prediction/src/main/java/com/microsoft/azure/cognitiveservices/vision/customvision/prediction/implementation/PredictionsImpl.java", "license": "mit", "size": 89979 }
[ "com.microsoft.azure.cognitiveservices.vision.customvision.prediction.models.ClassifyImageWithNoStoreOptionalParameter", "com.microsoft.azure.cognitiveservices.vision.customvision.prediction.models.ImagePrediction", "com.microsoft.rest.ServiceResponse" ]
import com.microsoft.azure.cognitiveservices.vision.customvision.prediction.models.ClassifyImageWithNoStoreOptionalParameter; import com.microsoft.azure.cognitiveservices.vision.customvision.prediction.models.ImagePrediction; import com.microsoft.rest.ServiceResponse;
import com.microsoft.azure.cognitiveservices.vision.customvision.prediction.models.*; import com.microsoft.rest.*;
[ "com.microsoft.azure", "com.microsoft.rest" ]
com.microsoft.azure; com.microsoft.rest;
2,859,896
@Test public final void testGetJobs() throws IOException, ClassNotFoundException { final Map<LocalDate, List<Job>> map = Calendar.getInstance().getJobs(); final List<Job> list = map.get(LocalDate.parse("2015-08-19")); final Job job = list.get(0); try { job.addVoluntee...
final void function() throws IOException, ClassNotFoundException { final Map<LocalDate, List<Job>> map = Calendar.getInstance().getJobs(); final List<Job> list = map.get(LocalDate.parse(STR)); final Job job = list.get(0); try { job.addVolunteer(tester, 'l'); } catch (final BusinessRuleException theE) { fail(theE.toStri...
/** * Test method for {@link model.Volunteer#getJobs()}. * * @throws IOException if the file isn't found * @throws ClassNotFoundException */
Test method for <code>model.Volunteer#getJobs()</code>
testGetJobs
{ "repo_name": "Grantapher/group3factorial-project", "path": "src/tests/VolunteerTest.java", "license": "gpl-2.0", "size": 3100 }
[ "java.io.IOException", "java.time.LocalDate", "java.util.List", "java.util.Map", "org.junit.Assert" ]
import java.io.IOException; import java.time.LocalDate; import java.util.List; import java.util.Map; import org.junit.Assert;
import java.io.*; import java.time.*; import java.util.*; import org.junit.*;
[ "java.io", "java.time", "java.util", "org.junit" ]
java.io; java.time; java.util; org.junit;
2,263,562
public int getAusgleichsMandate(Bundesland bl) { int anzahl = 0; final Set<Bundesland> set = this.ausgleichsMandate.keySet(); final Iterator<Bundesland> i = set.iterator(); while (i.hasNext()) { final Bundesland key = i.next(); if (key.equals(bl)) { anzahl += this.ausgleichsMandate.get(key...
int function(Bundesland bl) { int anzahl = 0; final Set<Bundesland> set = this.ausgleichsMandate.keySet(); final Iterator<Bundesland> i = set.iterator(); while (i.hasNext()) { final Bundesland key = i.next(); if (key.equals(bl)) { anzahl += this.ausgleichsMandate.get(key); } } return anzahl; }
/** * Gibt die Anzahl der Ausgleichsmandate pro Bundesland zurueck. * * @param bl * das ausgewaehlte Bundesland. * @return die Anzahl der Ausgleichsmandate. */
Gibt die Anzahl der Ausgleichsmandate pro Bundesland zurueck
getAusgleichsMandate
{ "repo_name": "smolvo/OpenBundestagswahl", "path": "Implementierung/Mandatsrechner/src/main/java/model/Partei.java", "license": "gpl-3.0", "size": 18784 }
[ "java.util.Iterator", "java.util.Set" ]
import java.util.Iterator; import java.util.Set;
import java.util.*;
[ "java.util" ]
java.util;
798,089
public ServizioComponent getServizio() { return this.servizio; }
ServizioComponent function() { return this.servizio; }
/** * Restituisce il Servizio selezionato */
Restituisce il Servizio selezionato
getServizio
{ "repo_name": "SpeearthTeam/Speearth", "path": "src/com/speearth/view/eventi/EventoSelezionaServizio.java", "license": "cc0-1.0", "size": 974 }
[ "com.speearth.model.core.ServizioComponent" ]
import com.speearth.model.core.ServizioComponent;
import com.speearth.model.core.*;
[ "com.speearth.model" ]
com.speearth.model;
2,421,050
@VisibleForTesting public static List<Edge> getEdges(QueryPlan plan, Index index) { Map<String, Pair<SelectOperator, org.apache.hadoop.hive.ql.metadata.Table>> finalSelOps = index.getFinalSelectOps(); Map<String, Vertex> vertexCache = new LinkedHashMap<String, Vertex>(); List<Edge> edges = new A...
static List<Edge> function(QueryPlan plan, Index index) { Map<String, Pair<SelectOperator, org.apache.hadoop.hive.ql.metadata.Table>> finalSelOps = index.getFinalSelectOps(); Map<String, Vertex> vertexCache = new LinkedHashMap<String, Vertex>(); List<Edge> edges = new ArrayList<Edge>(); for (Pair<SelectOperator, org.ap...
/** * Based on the final select operator, find out all the target columns. * For each target column, find out its sources based on the dependency index. */
Based on the final select operator, find out all the target columns. For each target column, find out its sources based on the dependency index
getEdges
{ "repo_name": "vineetgarg02/hive", "path": "ql/src/java/org/apache/hadoop/hive/ql/hooks/LineageLogger.java", "license": "apache-2.0", "size": 17172 }
[ "com.google.common.collect.Lists", "java.util.ArrayList", "java.util.LinkedHashMap", "java.util.LinkedHashSet", "java.util.List", "java.util.Map", "java.util.Set", "org.apache.commons.lang3.tuple.Pair", "org.apache.hadoop.hive.metastore.api.FieldSchema", "org.apache.hadoop.hive.metastore.api.Table...
import com.google.common.collect.Lists; import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Set; import org.apache.commons.lang3.tuple.Pair; import org.apache.hadoop.hive.metastore.api.FieldSchema; import org.apache.ha...
import com.google.common.collect.*; import java.util.*; import org.apache.commons.lang3.tuple.*; import org.apache.hadoop.hive.metastore.api.*; import org.apache.hadoop.hive.ql.*; import org.apache.hadoop.hive.ql.exec.*; import org.apache.hadoop.hive.ql.hooks.*; import org.apache.hadoop.hive.ql.optimizer.lineage.*;
[ "com.google.common", "java.util", "org.apache.commons", "org.apache.hadoop" ]
com.google.common; java.util; org.apache.commons; org.apache.hadoop;
385,571
DecodeResult decodeRequest(Channel ch, SessionProtocol sessionProtocol, String hostname, String path, String mappedPath, ByteBuf in, Object originalRequest, Promise<Object> promise) throws Exception;
DecodeResult decodeRequest(Channel ch, SessionProtocol sessionProtocol, String hostname, String path, String mappedPath, ByteBuf in, Object originalRequest, Promise<Object> promise) throws Exception;
/** * Decodes an invocation request. */
Decodes an invocation request
decodeRequest
{ "repo_name": "brant-hwang/armeria", "path": "src/main/java/com/linecorp/armeria/server/ServiceCodec.java", "license": "apache-2.0", "size": 9224 }
[ "com.linecorp.armeria.common.SessionProtocol", "io.netty.buffer.ByteBuf", "io.netty.channel.Channel", "io.netty.util.concurrent.Promise" ]
import com.linecorp.armeria.common.SessionProtocol; import io.netty.buffer.ByteBuf; import io.netty.channel.Channel; import io.netty.util.concurrent.Promise;
import com.linecorp.armeria.common.*; import io.netty.buffer.*; import io.netty.channel.*; import io.netty.util.concurrent.*;
[ "com.linecorp.armeria", "io.netty.buffer", "io.netty.channel", "io.netty.util" ]
com.linecorp.armeria; io.netty.buffer; io.netty.channel; io.netty.util;
264,894
public void addQualifier(XMPNode qualNode) throws XMPException { assertQualifierNotExisting(qualNode.getName()); qualNode.setParent(this); qualNode.getOptions().setQualifier(true); getOptions().setHasQualifiers(true); // contraints if (qualNode.isLanguageNode()) { // "xml:lang" is always first a...
void function(XMPNode qualNode) throws XMPException { assertQualifierNotExisting(qualNode.getName()); qualNode.setParent(this); qualNode.getOptions().setQualifier(true); getOptions().setHasQualifiers(true); if (qualNode.isLanguageNode()) { options.setHasLanguage(true); getQualifier().add(0, qualNode); } else if (qualNo...
/** * Appends a qualifier to the qualifier list and sets respective options. * @param qualNode a qualifier node. * @throws XMPException */
Appends a qualifier to the qualifier list and sets respective options
addQualifier
{ "repo_name": "kesenhoo/Camera2", "path": "src/com/adobe/xmp/impl/XMPNode.java", "license": "apache-2.0", "size": 19696 }
[ "com.adobe.xmp.XMPException" ]
import com.adobe.xmp.XMPException;
import com.adobe.xmp.*;
[ "com.adobe.xmp" ]
com.adobe.xmp;
2,494,832
public List orFilter(int[] filterFlags, String[] filterPatterns, POS pos, int maxResults) { if (filterFlags.length != filterPatterns.length) throw new RiWordNetError(ERROR_FLAGS_AND_PATTERNS); RiFilter[] filters = new RiFilter[filterFlags.length]; for (int i = 0; i < filterPatterns.length; i+...
List function(int[] filterFlags, String[] filterPatterns, POS pos, int maxResults) { if (filterFlags.length != filterPatterns.length) throw new RiWordNetError(ERROR_FLAGS_AND_PATTERNS); RiFilter[] filters = new RiFilter[filterFlags.length]; for (int i = 0; i < filterPatterns.length; i++) filters[i] = RiFilter.create(fi...
/** * Runs the specified <code>filters</code> over the * <code>pos</code> accepting if ANY of the filters accept, * returning at most <code>maxResults</code> instances * @see RiFilter#accept(String) */
Runs the specified <code>filters</code> over the <code>pos</code> accepting if ANY of the filters accept, returning at most <code>maxResults</code> instances
orFilter
{ "repo_name": "cqx931/RiTa", "path": "java/rita/wordnet/WordnetFilters.java", "license": "gpl-3.0", "size": 6927 }
[ "java.util.List" ]
import java.util.List;
import java.util.*;
[ "java.util" ]
java.util;
2,698,310
private boolean delBlockFromDisk(File blockFile, File metaFile, Block b) { if (blockFile == null) { LOG.warn("No file exists for block: " + b); return true; } if (!blockFile.delete()) { LOG.warn("Not able to delete the block file: " + blockFile); return false; } else { // ...
boolean function(File blockFile, File metaFile, Block b) { if (blockFile == null) { LOG.warn(STR + b); return true; } if (!blockFile.delete()) { LOG.warn(STR + blockFile); return false; } else { if (metaFile != null && !metaFile.delete()) { LOG.warn(STR + metaFile); return false; } } return true; }
/** * Remove a block from disk * @param blockFile block file * @param metaFile block meta file * @param b a block * @return true if on-disk files are deleted; false otherwise */
Remove a block from disk
delBlockFromDisk
{ "repo_name": "hash-X/hadoop", "path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/fsdataset/impl/FsDatasetImpl.java", "license": "apache-2.0", "size": 114698 }
[ "java.io.File", "org.apache.hadoop.hdfs.protocol.Block" ]
import java.io.File; import org.apache.hadoop.hdfs.protocol.Block;
import java.io.*; import org.apache.hadoop.hdfs.protocol.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
1,400,432
public void addPort(Port port) { boolean newPort = ports.add(port.number().toLong()); boolean isMaster = context.mastershipService().isLocalMaster(device.id()); if (newPort && isMaster) { log.debug("Sending initial probe to port {}@{}", port.number().toLong(), device.id()); ...
void function(Port port) { boolean newPort = ports.add(port.number().toLong()); boolean isMaster = context.mastershipService().isLocalMaster(device.id()); if (newPort && isMaster) { log.debug(STR, port.number().toLong(), device.id()); sendProbes(port.number().toLong()); } }
/** * Add physical port to discovery process. * Send out initial LLDP and label it as slow port. * * @param port the port */
Add physical port to discovery process. Send out initial LLDP and label it as slow port
addPort
{ "repo_name": "Phaneendra-Huawei/demo", "path": "providers/lldpcommon/src/main/java/org/onosproject/provider/lldpcommon/LinkDiscovery.java", "license": "apache-2.0", "size": 9316 }
[ "org.onosproject.net.Port" ]
import org.onosproject.net.Port;
import org.onosproject.net.*;
[ "org.onosproject.net" ]
org.onosproject.net;
1,468,466
public static void writeUint64(OutputStream out, long val) throws IOException { if (val > 0x7FFFFFFFFFFFFFFFL || val < 0) { throw new IOException("value is too large (wrapped sign)!"); } long v = val & 0x7FFFFFFFFFFFFFFFL; byte[] b = new byte[8]; b[0] = (...
static void function(OutputStream out, long val) throws IOException { if (val > 0x7FFFFFFFFFFFFFFFL val < 0) { throw new IOException(STR); } long v = val & 0x7FFFFFFFFFFFFFFFL; byte[] b = new byte[8]; b[0] = (byte) (v & 0xFF); b[1] = (byte) ((v >> 8) & 0xFF); b[2] = (byte) ((v >> 16) & 0xFF); b[3] = (byte) ((v >> 24) &...
/** * This isn't quite a Uint64, but rather a Uint63 - we will only write positive numbers * @param out * @param val * @throws IOException */
This isn't quite a Uint64, but rather a Uint63 - we will only write positive numbers
writeUint64
{ "repo_name": "compgen-io/compgen-common", "path": "src/java/io/compgen/common/io/DataIO.java", "license": "bsd-3-clause", "size": 11302 }
[ "java.io.IOException", "java.io.OutputStream" ]
import java.io.IOException; import java.io.OutputStream;
import java.io.*;
[ "java.io" ]
java.io;
808,240
private void generateContextC() { try { PrintStream stream_contextc = new PrintStream(new File(dir + "Context.c")); printHeader(stream_contextc); // TODO - Should be using OCR macros instead of cnc_mm.h stream_contextc.println("#include \"cnc_mm.h\""); stream_contextc.println("#include \"Context.h\"...
void function() { try { PrintStream stream_contextc = new PrintStream(new File(dir + STR)); printHeader(stream_contextc); stream_contextc.println(STRcnc_mm.h\""); stream_contextc.println(STRContext.h\STR#include <string.h>STRContext *initGraph() {STR\tint i;STR\tContext *CnCGraph = (Context*)cnc_malloc(sizeof(Context))...
/** * Generate method to initialize and delete the context: context.c */
Generate method to initialize and delete the context: context.c
generateContextC
{ "repo_name": "pelmers/cnc-ocr", "path": "CnCLPGParser/src/CnCParser/CncHcGenerator.java", "license": "bsd-3-clause", "size": 65250 }
[ "java.io.File", "java.io.IOException", "java.io.PrintStream" ]
import java.io.File; import java.io.IOException; import java.io.PrintStream;
import java.io.*;
[ "java.io" ]
java.io;
24,506
public static ImageJobResult runShader( File shaderJobResultFile, File shaderJobFile, IShaderDispatcher imageGenerator, Optional<File> referenceShaderResult, ShaderJobFileOperations fileOps) throws ShaderDispatchException, InterruptedException, IOException { LOGGER.info("Runni...
static ImageJobResult function( File shaderJobResultFile, File shaderJobFile, IShaderDispatcher imageGenerator, Optional<File> referenceShaderResult, ShaderJobFileOperations fileOps) throws ShaderDispatchException, InterruptedException, IOException { LOGGER.info(STR, shaderJobFile); ImageJob imageJob = new ImageJob(); ...
/** * This method runs shaderJobFile using the imageGenerator (IShaderDispatcher), * writes the ImageJobResult to shaderJobResultFile, and returns the ImageJobResult. * If you don't need an output file, you can just use an IShaderDispatcher directly. * * @param shaderJobResultFile E.g. "variant_blah.info...
This method runs shaderJobFile using the imageGenerator (IShaderDispatcher), writes the ImageJobResult to shaderJobResultFile, and returns the ImageJobResult. If you don't need an output file, you can just use an IShaderDispatcher directly
runShader
{ "repo_name": "google/graphicsfuzz", "path": "common/src/main/java/com/graphicsfuzz/shadersets/RunShaderFamily.java", "license": "apache-2.0", "size": 7977 }
[ "com.graphicsfuzz.common.util.ShaderJobFileOperations", "com.graphicsfuzz.server.thrift.ImageJob", "com.graphicsfuzz.server.thrift.ImageJobResult", "java.io.File", "java.io.IOException", "java.util.Optional" ]
import com.graphicsfuzz.common.util.ShaderJobFileOperations; import com.graphicsfuzz.server.thrift.ImageJob; import com.graphicsfuzz.server.thrift.ImageJobResult; import java.io.File; import java.io.IOException; import java.util.Optional;
import com.graphicsfuzz.common.util.*; import com.graphicsfuzz.server.thrift.*; import java.io.*; import java.util.*;
[ "com.graphicsfuzz.common", "com.graphicsfuzz.server", "java.io", "java.util" ]
com.graphicsfuzz.common; com.graphicsfuzz.server; java.io; java.util;
1,623,191
synchronized public void startRing(String remoteContact) { saveAudioState(); if(!ringer.isRinging()) { ringer.ring(remoteContact, service.getPrefs().getRingtone()); }else { Log.d(THIS_FILE, "Already ringing ...."); } }
synchronized void function(String remoteContact) { saveAudioState(); if(!ringer.isRinging()) { ringer.ring(remoteContact, service.getPrefs().getRingtone()); }else { Log.d(THIS_FILE, STR); } }
/** * Start ringing announce for a given contact. * It will also focus audio for us. * @param remoteContact the contact to ring for. May resolve the contact ringtone if any. */
Start ringing announce for a given contact. It will also focus audio for us
startRing
{ "repo_name": "xiejianying/csipsimple", "path": "src/com/csipsimple/service/MediaManager.java", "license": "lgpl-3.0", "size": 28524 }
[ "com.csipsimple.utils.Log" ]
import com.csipsimple.utils.Log;
import com.csipsimple.utils.*;
[ "com.csipsimple.utils" ]
com.csipsimple.utils;
1,125,560
@BeforeClass(groups = { "structured", "postgres","nightly" }) @Parameters({ "RaptureURL", "RaptureUser", "RapturePassword" }) public void setUp(@Optional("http://localhost:8665/rapture") String url, @Optional("rapture") String username, @Optional("rapture") String password) { // If running from ec...
@BeforeClass(groups = { STR, STR,STR }) @Parameters({ STR, STR, STR }) void function(@Optional(STRCannot connect to IntegrationTestHelper STRAnother UserSTRuser@incapture.netSTRMONGODB"); }
/** * Setup TestNG method to create Rapture login object and objects. * * @param RaptureURL * Passed in from <env>_testng.xml suite file * @param RaptureUser * Passed in from <env>_testng.xml suite file * @param RapturePassword * Passed in from <e...
Setup TestNG method to create Rapture login object and objects
setUp
{ "repo_name": "scarabus/Rapture", "path": "Apps/RaptureIntTests/src/test/java/rapture/structured/StructuredApiIntegrationTests.java", "license": "mit", "size": 36099 }
[ "org.testng.annotations.BeforeClass", "org.testng.annotations.Optional", "org.testng.annotations.Parameters" ]
import org.testng.annotations.BeforeClass; import org.testng.annotations.Optional; import org.testng.annotations.Parameters;
import org.testng.annotations.*;
[ "org.testng.annotations" ]
org.testng.annotations;
389,839
public void run(@Nullable final ConsoleView consoleView) throws ExecutionException { run(createCommandLine().getEnvironment(), consoleView); }
void function(@Nullable final ConsoleView consoleView) throws ExecutionException { run(createCommandLine().getEnvironment(), consoleView); }
/** * Runs command using env vars from facet * @param consoleView console view to be used for command or null to create new * @throws ExecutionException failed to execute command */
Runs command using env vars from facet
run
{ "repo_name": "caot/intellij-community", "path": "python/src/com/jetbrains/python/run/PythonTask.java", "license": "apache-2.0", "size": 8743 }
[ "com.intellij.execution.ExecutionException", "com.intellij.execution.ui.ConsoleView", "org.jetbrains.annotations.Nullable" ]
import com.intellij.execution.ExecutionException; import com.intellij.execution.ui.ConsoleView; import org.jetbrains.annotations.Nullable;
import com.intellij.execution.*; import com.intellij.execution.ui.*; import org.jetbrains.annotations.*;
[ "com.intellij.execution", "org.jetbrains.annotations" ]
com.intellij.execution; org.jetbrains.annotations;
2,884,719
EList<Expression> getSubscripts();
EList<Expression> getSubscripts();
/** * Returns the value of the '<em><b>Subscripts</b></em>' containment reference list. * The list contents are of type {@link org.xtext.example.delphi.astm.Expression}. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>Subscripts</em>' containment reference list isn't clear, * there really shoul...
Returns the value of the 'Subscripts' containment reference list. The list contents are of type <code>org.xtext.example.delphi.astm.Expression</code>. If the meaning of the 'Subscripts' containment reference list isn't clear, there really should be more of a description here...
getSubscripts
{ "repo_name": "adolfosbh/cs2as", "path": "org.xtext.example.delphi/emf-gen/org/xtext/example/delphi/astm/ArrayAccess.java", "license": "epl-1.0", "size": 2609 }
[ "org.eclipse.emf.common.util.EList" ]
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.*;
[ "org.eclipse.emf" ]
org.eclipse.emf;
2,392,192
public JsonBuilder addDoc(Map<String, Object> doc) throws IOException { try (XContentBuilder builder = XContentBuilder.builder(XContentType.JSON.xContent())) { builder.map(doc); bytes.add(ByteBuffer.wrap(BytesReference.toBytes(BytesReference.bytes(builder)))); ...
JsonBuilder function(Map<String, Object> doc) throws IOException { try (XContentBuilder builder = XContentBuilder.builder(XContentType.JSON.xContent())) { builder.map(doc); bytes.add(ByteBuffer.wrap(BytesReference.toBytes(BytesReference.bytes(builder)))); } return this; }
/** * Add a document via an object map * * @param doc document object to add to bulk request * @throws IOException on parsing/serialization errors */
Add a document via an object map
addDoc
{ "repo_name": "nknize/elasticsearch", "path": "client/rest-high-level/src/main/java/org/elasticsearch/client/ml/PostDataRequest.java", "license": "apache-2.0", "size": 8193 }
[ "java.io.IOException", "java.nio.ByteBuffer", "java.util.Map", "org.elasticsearch.common.bytes.BytesReference", "org.elasticsearch.common.xcontent.XContentBuilder", "org.elasticsearch.common.xcontent.XContentType" ]
import java.io.IOException; import java.nio.ByteBuffer; import java.util.Map; import org.elasticsearch.common.bytes.BytesReference; import org.elasticsearch.common.xcontent.XContentBuilder; import org.elasticsearch.common.xcontent.XContentType;
import java.io.*; import java.nio.*; import java.util.*; import org.elasticsearch.common.bytes.*; import org.elasticsearch.common.xcontent.*;
[ "java.io", "java.nio", "java.util", "org.elasticsearch.common" ]
java.io; java.nio; java.util; org.elasticsearch.common;
600,507
@Before public void beforeTest() { config = mainConfiguration.copy(); DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); try { factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);factory.setXIncludeAware(false); factory.setExpandEntityReferences(false);factory.setVal...
void function() { config = mainConfiguration.copy(); DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); try { factory.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, true);factory.setXIncludeAware(false); factory.setExpandEntityReferences(false);factory.setValidating(false); doc = factory.newDocu...
/** Make sure that whatever changes a test have made to the * configuration, next test is not affected. */
Make sure that whatever changes a test have made to the configuration, next test is not affected
beforeTest
{ "repo_name": "kirilluk/statechum", "path": "tests/statechum/analysis/learning/rpnicore/TestRejectManipulation.java", "license": "gpl-3.0", "size": 12822 }
[ "javax.xml.XMLConstants", "javax.xml.parsers.DocumentBuilderFactory", "javax.xml.parsers.ParserConfigurationException" ]
import javax.xml.XMLConstants; import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException;
import javax.xml.*; import javax.xml.parsers.*;
[ "javax.xml" ]
javax.xml;
482,890
protected Field getField(Object obj, String fieldname) { Class<?> type = obj.getClass(); // Creates the fields cache if (fields == null) { fields = new HashMap<Class, Map<String, Field>>(); } // Creates the fields cache entry for the given type Map<String, Field> map = fields.get(type); if (ma...
Field function(Object obj, String fieldname) { Class<?> type = obj.getClass(); if (fields == null) { fields = new HashMap<Class, Map<String, Field>>(); } Map<String, Field> map = fields.get(type); if (map == null) { map = new HashMap<String, Field>(); fields.put(type, map); } Field field = map.get(fieldname); if (field...
/** * Returns the field with the specified name. */
Returns the field with the specified name
getField
{ "repo_name": "jgraph/mxgraph", "path": "java/src/com/mxgraph/io/mxObjectCodec.java", "license": "apache-2.0", "size": 33561 }
[ "java.lang.reflect.Field", "java.util.HashMap", "java.util.Map", "java.util.logging.Level" ]
import java.lang.reflect.Field; import java.util.HashMap; import java.util.Map; import java.util.logging.Level;
import java.lang.reflect.*; import java.util.*; import java.util.logging.*;
[ "java.lang", "java.util" ]
java.lang; java.util;
1,835,688
public static AbstractBooleanAssert<?> then(Boolean actual) { return assertThat(actual); }
static AbstractBooleanAssert<?> function(Boolean actual) { return assertThat(actual); }
/** * Creates a new instance of <code>{@link org.assertj.core.api.BooleanAssert}</code>. * * @param actual the actual value. * @return the created assertion object. */
Creates a new instance of <code><code>org.assertj.core.api.BooleanAssert</code></code>
then
{ "repo_name": "hazendaz/assertj-core", "path": "src/main/java/org/assertj/core/api/Java6BDDAssertions.java", "license": "apache-2.0", "size": 42180 }
[ "org.assertj.core.api.Java6Assertions" ]
import org.assertj.core.api.Java6Assertions;
import org.assertj.core.api.*;
[ "org.assertj.core" ]
org.assertj.core;
1,763,007
public void characters(XMLString text, Augmentations augs) throws XNIException { boolean callNextCharacters = true; // REVISIT: [Q] Is there a more efficient way of doing this? // Perhaps if the scanner told us so we don't have to // look at the characters a...
void function(XMLString text, Augmentations augs) throws XNIException { boolean callNextCharacters = true; boolean allWhiteSpace = true; for (int i=text.offset; i< text.offset+text.length; i++) { if (!isSpace(text.ch[i])) { allWhiteSpace = false; break; } } if (fInElementContent && allWhiteSpace && !fInCDATASection) { ...
/** * Character content. * * @param text The content. * * @param augs Additional information that may include infoset augmentations * * @throws XNIException Thrown by handler to signal an error. */
Character content
characters
{ "repo_name": "AaronZhangL/SplitCharater", "path": "xerces-2_11_0/src/org/apache/xerces/impl/dtd/XMLDTDValidator.java", "license": "gpl-2.0", "size": 87117 }
[ "org.apache.xerces.impl.Constants", "org.apache.xerces.impl.XMLErrorReporter", "org.apache.xerces.impl.msg.XMLMessageFormatter", "org.apache.xerces.xni.Augmentations", "org.apache.xerces.xni.XMLString", "org.apache.xerces.xni.XNIException" ]
import org.apache.xerces.impl.Constants; import org.apache.xerces.impl.XMLErrorReporter; import org.apache.xerces.impl.msg.XMLMessageFormatter; import org.apache.xerces.xni.Augmentations; import org.apache.xerces.xni.XMLString; import org.apache.xerces.xni.XNIException;
import org.apache.xerces.impl.*; import org.apache.xerces.impl.msg.*; import org.apache.xerces.xni.*;
[ "org.apache.xerces" ]
org.apache.xerces;
511,487
public static <T extends Number> IPoint4<T> revertShear( final IPoint4<T> pointToShear, final IShearFactor<?> shearFactor) { IMatrix4<? extends Number> shearMatrix = GeometricOperations .inverseShearMatrix(shearFactor); return VectorAlgebraicOperations.multiply(shearMat...
static <T extends Number> IPoint4<T> function( final IPoint4<T> pointToShear, final IShearFactor<?> shearFactor) { IMatrix4<? extends Number> shearMatrix = GeometricOperations .inverseShearMatrix(shearFactor); return VectorAlgebraicOperations.multiply(shearMatrix, pointToShear, pointToShear.getType()); }
/** * Reverts the shear of the {@link IPoint4 Point} by the provided * {@link IShearFactor ShearFactor Factor}. * * @param <T> * the {@link Number} type of the {@link IPoint4 Point} to shear. * * @param pointToShear * the {@link IPoint4 Point} to shear. ...
Reverts the shear of the <code>IPoint4 Point</code> by the provided <code>IShearFactor ShearFactor Factor</code>
revertShear
{ "repo_name": "aftenkap/jutility", "path": "jutility-math/src/main/java/org/jutility/math/geometry/GeometricOperations.java", "license": "apache-2.0", "size": 125764 }
[ "org.jutility.math.vectoralgebra.IMatrix4", "org.jutility.math.vectoralgebra.IPoint4", "org.jutility.math.vectoralgebra.VectorAlgebraicOperations" ]
import org.jutility.math.vectoralgebra.IMatrix4; import org.jutility.math.vectoralgebra.IPoint4; import org.jutility.math.vectoralgebra.VectorAlgebraicOperations;
import org.jutility.math.vectoralgebra.*;
[ "org.jutility.math" ]
org.jutility.math;
2,838,842
@JsonProperty(value = "max") public void setMax(Object max) { this.max = max; }
@JsonProperty(value = "max") void function(Object max) { this.max = max; }
/** * setter used during deserialization of the 'max' field of the metadata cache file. * * @param max */
setter used during deserialization of the 'max' field of the metadata cache file
setMax
{ "repo_name": "shakamunyi/drill", "path": "exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/Metadata.java", "license": "apache-2.0", "size": 71648 }
[ "com.fasterxml.jackson.annotation.JsonProperty" ]
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.*;
[ "com.fasterxml.jackson" ]
com.fasterxml.jackson;
2,816,834
public ServiceResponse<List<Integer>> getIntInvalidString() throws ErrorException, IOException { Call<ResponseBody> call = service.getIntInvalidString(); return getIntInvalidStringDelegate(call.execute()); }
ServiceResponse<List<Integer>> function() throws ErrorException, IOException { Call<ResponseBody> call = service.getIntInvalidString(); return getIntInvalidStringDelegate(call.execute()); }
/** * Get integer array value [1, 'integer', 0]. * * @throws ErrorException exception thrown from REST call * @throws IOException exception thrown from serialization/deserialization * @return the List&lt;Integer&gt; object wrapped in {@link ServiceResponse} if successful. */
Get integer array value [1, 'integer', 0]
getIntInvalidString
{ "repo_name": "stankovski/AutoRest", "path": "AutoRest/Generators/Java/Java.Tests/src/main/java/fixtures/bodyarray/ArrayOperationsImpl.java", "license": "mit", "size": 167174 }
[ "com.microsoft.rest.ServiceResponse", "java.io.IOException", "java.util.List" ]
import com.microsoft.rest.ServiceResponse; import java.io.IOException; import java.util.List;
import com.microsoft.rest.*; import java.io.*; import java.util.*;
[ "com.microsoft.rest", "java.io", "java.util" ]
com.microsoft.rest; java.io; java.util;
2,041,918
@Override public void initialize(Map<String, Object> externalProperty) { setExternalProperties(externalProperty); initializePropertyReader(); }
void function(Map<String, Object> externalProperty) { setExternalProperties(externalProperty); initializePropertyReader(); }
/** * Initialize redis client factory. */
Initialize redis client factory
initialize
{ "repo_name": "impetus-opensource/Kundera", "path": "src/kundera-redis/src/main/java/com/impetus/client/redis/RedisClientFactory.java", "license": "apache-2.0", "size": 13718 }
[ "java.util.Map" ]
import java.util.Map;
import java.util.*;
[ "java.util" ]
java.util;
2,188,791
public boolean hasAlphabeticCharacters() { for (Component component : components) { if (!Objects.equals(component.alphaSequence, NO_ALPHA_SEQUENCE)) { return true; } } return false; }
boolean function() { for (Component component : components) { if (!Objects.equals(component.alphaSequence, NO_ALPHA_SEQUENCE)) { return true; } } return false; }
/** * Returns true if this version number has any alphabetic characters, such as 'alpha' in * "7.3alpha.2". */
Returns true if this version number has any alphabetic characters, such as 'alpha' in "7.3alpha.2"
hasAlphabeticCharacters
{ "repo_name": "twitter-forks/bazel", "path": "src/main/java/com/google/devtools/build/lib/rules/apple/DottedVersion.java", "license": "apache-2.0", "size": 15202 }
[ "java.util.Objects" ]
import java.util.Objects;
import java.util.*;
[ "java.util" ]
java.util;
2,279,410
protected Node newNode() { return new SVGOMTitleElement(); }
Node function() { return new SVGOMTitleElement(); }
/** * Returns a new uninitialized instance of this object's class. */
Returns a new uninitialized instance of this object's class
newNode
{ "repo_name": "sflyphotobooks/crp-batik", "path": "sources/org/apache/batik/dom/svg/SVGOMTitleElement.java", "license": "apache-2.0", "size": 1939 }
[ "org.w3c.dom.Node" ]
import org.w3c.dom.Node;
import org.w3c.dom.*;
[ "org.w3c.dom" ]
org.w3c.dom;
389,802
public void process(ControlFrame frame);
void function(ControlFrame frame);
/** * <p>Processes the given control frame, * for example by updating the stream's state or by calling listeners.</p> * * @param frame the control frame to process * @see #process(DataInfo) */
Processes the given control frame, for example by updating the stream's state or by calling listeners
process
{ "repo_name": "jamiepg1/jetty.project", "path": "jetty-spdy/spdy-core/src/main/java/org/eclipse/jetty/spdy/IStream.java", "license": "apache-2.0", "size": 3905 }
[ "org.eclipse.jetty.spdy.frames.ControlFrame" ]
import org.eclipse.jetty.spdy.frames.ControlFrame;
import org.eclipse.jetty.spdy.frames.*;
[ "org.eclipse.jetty" ]
org.eclipse.jetty;
1,832,678
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.application_list_fragment, container, false); applicationListView = (ListView) view .findViewById(R.id.applicationListView); adapter = new Application...
View function(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.application_list_fragment, container, false); applicationListView = (ListView) view .findViewById(R.id.applicationListView); adapter = new ApplicationViewAdapter(getActivity(), ApplicationList....
/** * Creates the fragment. Loading the ApplicationViewAdapter with it's data and giving it to the listview. */
Creates the fragment. Loading the ApplicationViewAdapter with it's data and giving it to the listview
onCreateView
{ "repo_name": "madelinecameron/CS397", "path": "src/com/Lumension/android/permission_scanner/ApplicationListFragment.java", "license": "mit", "size": 1683 }
[ "android.os.Bundle", "android.view.LayoutInflater", "android.view.View", "android.view.ViewGroup", "android.widget.AdapterView", "android.widget.ListView" ]
import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.AdapterView; import android.widget.ListView;
import android.os.*; import android.view.*; import android.widget.*;
[ "android.os", "android.view", "android.widget" ]
android.os; android.view; android.widget;
1,240,009
public synchronized void mapOutputLost(TaskAttemptID taskid, String errorMsg) throws IOException { TaskInProgress tip = tasks.get(taskid); if (tip != null) { tip.mapOutputLost(errorMsg); } else { LOG.warn("Unknown child with bad map output: "+taskid+". ...
synchronized void function(TaskAttemptID taskid, String errorMsg) throws IOException { TaskInProgress tip = tasks.get(taskid); if (tip != null) { tip.mapOutputLost(errorMsg); } else { LOG.warn(STR+taskid+STR); } } static class RunningJob{ private JobID jobid; private JobConf jobConf; private volatile InterTrackerProtoc...
/** * A completed map task's output has been lost. */
A completed map task's output has been lost
mapOutputLost
{ "repo_name": "rvadali/fb-raid-refactoring", "path": "src/mapred/org/apache/hadoop/mapred/TaskTracker.java", "license": "apache-2.0", "size": 135755 }
[ "java.io.IOException", "java.util.HashSet", "java.util.Set", "org.apache.hadoop.io.Writable" ]
import java.io.IOException; import java.util.HashSet; import java.util.Set; import org.apache.hadoop.io.Writable;
import java.io.*; import java.util.*; import org.apache.hadoop.io.*;
[ "java.io", "java.util", "org.apache.hadoop" ]
java.io; java.util; org.apache.hadoop;
1,677,861
public List<ResourceLookup> getResourcesByIdList(List<Long> idList);
List<ResourceLookup> function(List<Long> idList);
/** * Lists resources by internal IDs. * * @param idList the list of IDs of the resources to be listed * @return a list of {@link ResourceLookup} objects * @since 3.7.0 */
Lists resources by internal IDs
getResourcesByIdList
{ "repo_name": "leocockroach/JasperServer5.6", "path": "jasperserver-api/metadata/src/main/java/com/jaspersoft/jasperserver/api/metadata/common/service/RepositoryService.java", "license": "gpl-2.0", "size": 27135 }
[ "com.jaspersoft.jasperserver.api.metadata.common.domain.ResourceLookup", "java.util.List" ]
import com.jaspersoft.jasperserver.api.metadata.common.domain.ResourceLookup; import java.util.List;
import com.jaspersoft.jasperserver.api.metadata.common.domain.*; import java.util.*;
[ "com.jaspersoft.jasperserver", "java.util" ]
com.jaspersoft.jasperserver; java.util;
1,998,620
public static ByteArrayComparable parseFrom( final byte[] pbBytes ) { DataInput in = new DataInputStream( new ByteArrayInputStream( pbBytes ) ); try { boolean m_value = new Boolean( in.readBoolean() ); return new DeserializedBooleanComparator( m_value ); } catch ( IOException e ) { throw...
static ByteArrayComparable function( final byte[] pbBytes ) { DataInput in = new DataInputStream( new ByteArrayInputStream( pbBytes ) ); try { boolean m_value = new Boolean( in.readBoolean() ); return new DeserializedBooleanComparator( m_value ); } catch ( IOException e ) { throw new RuntimeException( STR, e ); } }
/** * Needed for hbase-0.95+ * * @throws java.io.IOException */
Needed for hbase-0.95+
parseFrom
{ "repo_name": "andrei-viaryshka/pentaho-hadoop-shims", "path": "common/hbase-comparators/src/main/java/org/pentaho/hbase/shim/common/DeserializedBooleanComparator.java", "license": "apache-2.0", "size": 6476 }
[ "java.io.ByteArrayInputStream", "java.io.DataInput", "java.io.DataInputStream", "java.io.IOException", "org.apache.hadoop.hbase.filter.ByteArrayComparable" ]
import java.io.ByteArrayInputStream; import java.io.DataInput; import java.io.DataInputStream; import java.io.IOException; import org.apache.hadoop.hbase.filter.ByteArrayComparable;
import java.io.*; import org.apache.hadoop.hbase.filter.*;
[ "java.io", "org.apache.hadoop" ]
java.io; org.apache.hadoop;
207,621
@RequestMapping( value = "", method = RequestMethod.GET, produces = "application/json" ) public @ResponseBody List<String> getNamespaces( HttpServletResponse response ) throws IOException { return userKeyJsonValueService.getNamespacesByUser( currentUserService.getCurrentUser() ); }
@RequestMapping( value = STRapplication/json" ) @ResponseBody List<String> function( HttpServletResponse response ) throws IOException { return userKeyJsonValueService.getNamespacesByUser( currentUserService.getCurrentUser() ); }
/** * Returns a JSON array of strings representing the different namespaces used. * If no namespaces exist, an empty array is returned. */
Returns a JSON array of strings representing the different namespaces used. If no namespaces exist, an empty array is returned
getNamespaces
{ "repo_name": "uonafya/jphes-core", "path": "dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/UserKeyJsonValueController.java", "license": "bsd-3-clause", "size": 9381 }
[ "java.io.IOException", "java.util.List", "javax.servlet.http.HttpServletResponse", "org.springframework.web.bind.annotation.RequestMapping", "org.springframework.web.bind.annotation.ResponseBody" ]
import java.io.IOException; import java.util.List; import javax.servlet.http.HttpServletResponse; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody;
import java.io.*; import java.util.*; import javax.servlet.http.*; import org.springframework.web.bind.annotation.*;
[ "java.io", "java.util", "javax.servlet", "org.springframework.web" ]
java.io; java.util; javax.servlet; org.springframework.web;
257,929
report.set(GalenReportsContainer.get().registerTest(getTestName(), null)); }
report.set(GalenReportsContainer.get().registerTest(getTestName(), null)); }
/** * Initializes the TestReport instance with the name of current test method and stores it in {@link ThreadLocal} */
Initializes the TestReport instance with the name of current test method and stores it in <code>ThreadLocal</code>
initReport
{ "repo_name": "tommywo/galen", "path": "galen-java-support/src/main/java/com/galenframework/junit/GalenJUnitTestBase.java", "license": "apache-2.0", "size": 2436 }
[ "com.galenframework.support.GalenReportsContainer" ]
import com.galenframework.support.GalenReportsContainer;
import com.galenframework.support.*;
[ "com.galenframework.support" ]
com.galenframework.support;
2,423,662
@Override public URI getURI() throws IOException { if (this.uri != null) { return this.uri; } else { return super.getURI(); } }
URI function() throws IOException { if (this.uri != null) { return this.uri; } else { return super.getURI(); } }
/** * This implementation returns the underlying URI directly, * if possible. */
This implementation returns the underlying URI directly, if possible
getURI
{ "repo_name": "boggad/jdk9-sample", "path": "sample-catalog/spring-jdk9/src/spring.core/org/springframework/core/io/UrlResource.java", "license": "mit", "size": 7936 }
[ "java.io.IOException" ]
import java.io.IOException;
import java.io.*;
[ "java.io" ]
java.io;
946,442
return new PropertySourcesPlaceholderConfigurer(); }
return new PropertySourcesPlaceholderConfigurer(); }
/** * This is needed to make property resolving work on annotations ... * (see http://stackoverflow.com/questions/11925952/custom-spring-property-source-does-not-resolve-placeholders-in-value) * * @Scheduled(cron="${someProperty}") */
This is needed to make property resolving work on annotations ... (see HREF)
propertySourcesPlaceholderConfigurer
{ "repo_name": "motorina0/flowable-engine", "path": "modules/flowable-ui-admin/src/main/java/org/flowable/admin/conf/ApplicationConfiguration.java", "license": "apache-2.0", "size": 2562 }
[ "org.springframework.context.support.PropertySourcesPlaceholderConfigurer" ]
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
import org.springframework.context.support.*;
[ "org.springframework.context" ]
org.springframework.context;
232,589
@Override public void finishedItem(Item item) { try { store(item); } catch (ObjectStoreException e) { throw new RuntimeException(e); } count++; if (count % 10000 == 0) { long now = System.currentT...
void function(Item item) { try { store(item); } catch (ObjectStoreException e) { throw new RuntimeException(e); } count++; if (count % 10000 == 0) { long now = System.currentTimeMillis(); if (times[(int) ((count / 10000) % 20)] == -1) { LOG.info(STR + count + STR + (600000000L / (now - time)) + STR + ((60000L * count) ...
/** * Do something useful with the Item. * @param item the Item */
Do something useful with the Item
finishedItem
{ "repo_name": "JoeCarlson/intermine", "path": "intermine/integrate/main/src/org/intermine/dataconversion/FullXmlConverter.java", "license": "lgpl-2.1", "size": 3295 }
[ "org.intermine.objectstore.ObjectStoreException", "org.intermine.xml.full.Item" ]
import org.intermine.objectstore.ObjectStoreException; import org.intermine.xml.full.Item;
import org.intermine.objectstore.*; import org.intermine.xml.full.*;
[ "org.intermine.objectstore", "org.intermine.xml" ]
org.intermine.objectstore; org.intermine.xml;
1,953,522
public RectF getZoomedRect() { if (mScaleType == ScaleType.FIT_XY) { throw new UnsupportedOperationException("getZoomedRect() not supported with FIT_XY"); } PointF topLeft = transformCoordTouchToBitmap(0, 0, true); PointF bottomRight = transformCoordTouchToBitmap(viewWidt...
RectF function() { if (mScaleType == ScaleType.FIT_XY) { throw new UnsupportedOperationException(STR); } PointF topLeft = transformCoordTouchToBitmap(0, 0, true); PointF bottomRight = transformCoordTouchToBitmap(viewWidth, viewHeight, true); float w = getDrawable().getIntrinsicWidth(); float h = getDrawable().getIntrin...
/** * Return a Rect representing the zoomed image. * @return rect representing zoomed image */
Return a Rect representing the zoomed image
getZoomedRect
{ "repo_name": "dbuscaglia/codepath_project_2", "path": "app/src/main/java/danbuscaglia/googleimagesearch/components/TouchImageView.java", "license": "apache-2.0", "size": 42695 }
[ "android.graphics.PointF", "android.graphics.RectF" ]
import android.graphics.PointF; import android.graphics.RectF;
import android.graphics.*;
[ "android.graphics" ]
android.graphics;
864,511
private void rewriteCallSites(SimpleDefinitionFinder defFinder, Definition definition, String newMethodName) { Collection<UseSite> useSites = defFinder.getUseSites(definition); for (UseSite site : useSites) { Node node = site.node; No...
void function(SimpleDefinitionFinder defFinder, Definition definition, String newMethodName) { Collection<UseSite> useSites = defFinder.getUseSites(definition); for (UseSite site : useSites) { Node node = site.node; Node parent = node.getParent(); Node objectNode = node.getFirstChild(); node.removeChild(objectNode); pa...
/** * Rewrites object method call sites as calls to global functions * that take "this" as their first argument. * * Before: * o.foo(a, b, c) * * After: * foo(o, a, b, c) */
Rewrites object method call sites as calls to global functions that take "this" as their first argument. Before: o.foo(a, b, c) After: foo(o, a, b, c)
rewriteCallSites
{ "repo_name": "ralic/closure-compiler", "path": "src/com/google/javascript/jscomp/DevirtualizePrototypeMethods.java", "license": "apache-2.0", "size": 13194 }
[ "com.google.common.base.Preconditions", "com.google.javascript.jscomp.DefinitionsRemover", "com.google.javascript.rhino.IR", "com.google.javascript.rhino.Node", "java.util.Collection" ]
import com.google.common.base.Preconditions; import com.google.javascript.jscomp.DefinitionsRemover; import com.google.javascript.rhino.IR; import com.google.javascript.rhino.Node; import java.util.Collection;
import com.google.common.base.*; import com.google.javascript.jscomp.*; import com.google.javascript.rhino.*; import java.util.*;
[ "com.google.common", "com.google.javascript", "java.util" ]
com.google.common; com.google.javascript; java.util;
1,873,172
protected void rethrow(SQLException e) { throw new RuntimeException(e.getMessage()); }
void function(SQLException e) { throw new RuntimeException(e.getMessage()); }
/** * Rethrow the SQLException as a RuntimeException. This implementation * creates a new RuntimeException with the SQLException's error message. * @param e SQLException to rethrow * @since DbUtils 1.1 */
Rethrow the SQLException as a RuntimeException. This implementation creates a new RuntimeException with the SQLException's error message
rethrow
{ "repo_name": "penggangshu/uhm", "path": "src/main/java/org/apache/commons/dbutils/ResultSetIterator.java", "license": "unlicense", "size": 4278 }
[ "java.sql.SQLException" ]
import java.sql.SQLException;
import java.sql.*;
[ "java.sql" ]
java.sql;
1,430,615
public boolean hasInstanceOf(Class clazz) { for (BaseBrick item : this.items) { if (clazz.isInstance(item)) { return true; } } return false; }
boolean function(Class clazz) { for (BaseBrick item : this.items) { if (clazz.isInstance(item)) { return true; } } return false; }
/** * If all items have instance of clazz. * * @param clazz class to be found * @return whether the clazz is in the all items */
If all items have instance of clazz
hasInstanceOf
{ "repo_name": "patbeagan1/brickkit-android", "path": "BrickKit/bricks/src/main/java/com/wayfair/brickkit/BrickDataManager.java", "license": "apache-2.0", "size": 41493 }
[ "com.wayfair.brickkit.brick.BaseBrick" ]
import com.wayfair.brickkit.brick.BaseBrick;
import com.wayfair.brickkit.brick.*;
[ "com.wayfair.brickkit" ]
com.wayfair.brickkit;
1,577,083
public Stat setAcl(String path, List<ACL> acls, int version) throws KeeperException, InterruptedException { TraceScope traceScope = null; try { traceScope = Trace.startSpan("RecoverableZookeeper.setAcl"); RetryCounter retryCounter = retryCounterFactory.create(); while (true) { try ...
Stat function(String path, List<ACL> acls, int version) throws KeeperException, InterruptedException { TraceScope traceScope = null; try { traceScope = Trace.startSpan(STR); RetryCounter retryCounter = retryCounterFactory.create(); while (true) { try { long startTime = EnvironmentEdgeManager.currentTime(); Stat nodeSta...
/** * setAcl is an idempotent operation. Retry before throwing exception * @return list of ACLs */
setAcl is an idempotent operation. Retry before throwing exception
setAcl
{ "repo_name": "JingchengDu/hbase", "path": "hbase-client/src/main/java/org/apache/hadoop/hbase/zookeeper/RecoverableZooKeeper.java", "license": "apache-2.0", "size": 34075 }
[ "java.util.List", "org.apache.hadoop.hbase.util.EnvironmentEdgeManager", "org.apache.hadoop.hbase.util.RetryCounter", "org.apache.htrace.Trace", "org.apache.htrace.TraceScope", "org.apache.zookeeper.KeeperException", "org.apache.zookeeper.data.Stat" ]
import java.util.List; import org.apache.hadoop.hbase.util.EnvironmentEdgeManager; import org.apache.hadoop.hbase.util.RetryCounter; import org.apache.htrace.Trace; import org.apache.htrace.TraceScope; import org.apache.zookeeper.KeeperException; import org.apache.zookeeper.data.Stat;
import java.util.*; import org.apache.hadoop.hbase.util.*; import org.apache.htrace.*; import org.apache.zookeeper.*; import org.apache.zookeeper.data.*;
[ "java.util", "org.apache.hadoop", "org.apache.htrace", "org.apache.zookeeper" ]
java.util; org.apache.hadoop; org.apache.htrace; org.apache.zookeeper;
1,426,217
public void testHasNonnegativePayrollAmount_No() throws Exception { String testTarget = "hasNonnegativePayrollAmount.no."; EffortCertificationDocument document = this.loadEffortCertificationDocument(testTarget); List<EffortCertificationDetail> details = document.getEffortCertificationDe...
void function() throws Exception { String testTarget = STR; EffortCertificationDocument document = this.loadEffortCertificationDocument(testTarget); List<EffortCertificationDetail> details = document.getEffortCertificationDetailLines(); for (EffortCertificationDetail detailLine : details) { assertFalse(EffortCertificat...
/** * the payroll amount of the detail line is a negatitive number */
the payroll amount of the detail line is a negatitive number
testHasNonnegativePayrollAmount_No
{ "repo_name": "ua-eas/ua-kfs-5.3", "path": "test/unit/src/org/kuali/kfs/module/ec/document/validation/impl/EffortCertificationDocumentRuleUtilTest.java", "license": "agpl-3.0", "size": 30412 }
[ "java.util.List", "org.kuali.kfs.module.ec.businessobject.EffortCertificationDetail", "org.kuali.kfs.module.ec.document.EffortCertificationDocument" ]
import java.util.List; import org.kuali.kfs.module.ec.businessobject.EffortCertificationDetail; import org.kuali.kfs.module.ec.document.EffortCertificationDocument;
import java.util.*; import org.kuali.kfs.module.ec.businessobject.*; import org.kuali.kfs.module.ec.document.*;
[ "java.util", "org.kuali.kfs" ]
java.util; org.kuali.kfs;
2,505,644
public Reader getCharacterStream() throws SQLException { return this.clob.getCharacterStream(); }
Reader function() throws SQLException { return this.clob.getCharacterStream(); }
/** * Retrieves the <code>CLOB</code> value designated by this * <code>Clob</code> object as a <code>java.io.Reader</code> object (or as a * stream of characters). * * @return a <code>java.io.Reader</code> object containing the * <code>CLOB</code> data * @exception SQL...
Retrieves the <code>CLOB</code> value designated by this <code>Clob</code> object as a <code>java.io.Reader</code> object (or as a stream of characters)
getCharacterStream
{ "repo_name": "abecquereau/awake-file", "path": "src-main/org/kawanfw/commons/jdbc/abstracts/AbstractClob.java", "license": "lgpl-2.1", "size": 12608 }
[ "java.io.Reader", "java.sql.SQLException" ]
import java.io.Reader; import java.sql.SQLException;
import java.io.*; import java.sql.*;
[ "java.io", "java.sql" ]
java.io; java.sql;
2,426,517
private JScrollPane getScrollPane() { if (scrollPane == null) { scrollPane = new JScrollPane(); scrollPane.setViewportView(getTable()); } return scrollPane; }
JScrollPane function() { if (scrollPane == null) { scrollPane = new JScrollPane(); scrollPane.setViewportView(getTable()); } return scrollPane; }
/** * This method initializes scrollPane * * @return javax.swing.JScrollPane */
This method initializes scrollPane
getScrollPane
{ "repo_name": "bwkimmel/java-util", "path": "src/main/java/ca/eandb/util/progress/ProgressPanel.java", "license": "mit", "size": 3561 }
[ "javax.swing.JScrollPane" ]
import javax.swing.JScrollPane;
import javax.swing.*;
[ "javax.swing" ]
javax.swing;
2,227,769