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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
@Override
public String getText(Object object) {
BooleanLiteralExp booleanLiteralExp = (BooleanLiteralExp)object;
return getString("_UI_BooleanLiteralExp_type") + " " + booleanLiteralExp.isBool();
}
| String function(Object object) { BooleanLiteralExp booleanLiteralExp = (BooleanLiteralExp)object; return getString(STR) + " " + booleanLiteralExp.isBool(); } | /**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | This returns the label text for the adapted class. | getText | {
"repo_name": "diverse-project/kcvl",
"path": "fr.inria.diverse.kcvl.metamodel.edit/src/main/java/org/omg/CVLMetamodelMaster/cvl/provider/BooleanLiteralExpItemProvider.java",
"license": "epl-1.0",
"size": 3818
} | [
"org.omg.CVLMetamodelMaster"
] | import org.omg.CVLMetamodelMaster; | import org.omg.*; | [
"org.omg"
] | org.omg; | 2,056,640 |
private void createTableHeader(final SelectionHandlers requireHandler, final int startIndex, final int selectedIndexlocal,
final boolean isSelectAllCheckBoxes) {
Images images = GWT.create(Images.class);
final TableHeader header = tableData.getHeader();
final LinkedList<HeaderColumn> columns = header.getHea... | void function(final SelectionHandlers requireHandler, final int startIndex, final int selectedIndexlocal, final boolean isSelectAllCheckBoxes) { Images images = GWT.create(Images.class); final TableHeader header = tableData.getHeader(); final LinkedList<HeaderColumn> columns = header.getHeaderColumns(requireHandler); S... | /**
* To create table headers.
*
* @param requireHandler SelectionHandlers
*/ | To create table headers | createTableHeader | {
"repo_name": "ungerik/ephesoft",
"path": "Ephesoft_Community_Release_4.0.2.0/source/dcma-gwt/dcma-gwt-core/src/main/java/com/ephesoft/dcma/gwt/core/client/ui/table/Table.java",
"license": "agpl-3.0",
"size": 28230
} | [
"com.ephesoft.dcma.gwt.core.client.i18n.CoreCommonConstants",
"com.ephesoft.dcma.gwt.core.client.ui.table.TableHeader",
"com.ephesoft.dcma.gwt.core.client.util.WindowUtil",
"com.ephesoft.dcma.gwt.core.shared.StringUtil",
"com.google.gwt.core.client.GWT",
"com.google.gwt.event.dom.client.ClickHandler",
"... | import com.ephesoft.dcma.gwt.core.client.i18n.CoreCommonConstants; import com.ephesoft.dcma.gwt.core.client.ui.table.TableHeader; import com.ephesoft.dcma.gwt.core.client.util.WindowUtil; import com.ephesoft.dcma.gwt.core.shared.StringUtil; import com.google.gwt.core.client.GWT; import com.google.gwt.event.dom.client.C... | import com.ephesoft.dcma.gwt.core.client.i18n.*; import com.ephesoft.dcma.gwt.core.client.ui.table.*; import com.ephesoft.dcma.gwt.core.client.util.*; import com.ephesoft.dcma.gwt.core.shared.*; import com.google.gwt.core.client.*; import com.google.gwt.event.dom.client.*; import com.google.gwt.user.client.*; import co... | [
"com.ephesoft.dcma",
"com.google.gwt",
"java.util"
] | com.ephesoft.dcma; com.google.gwt; java.util; | 879,026 |
@NonNull
public static String idFor(@NonNull Class<?> clazz) {
return clazz.getName().replace('$','.');
} | static String function(@NonNull Class<?> clazz) { return clazz.getName().replace('$','.'); } | /**
* Generates an ID based on a class.
*
* @param clazz The class to use to generate an ID.
* @return The ID generated based on the specified class.
*
* @since 2.244
*/ | Generates an ID based on a class | idFor | {
"repo_name": "DanielWeber/jenkins",
"path": "core/src/main/java/hudson/model/DownloadService.java",
"license": "mit",
"size": 20063
} | [
"edu.umd.cs.findbugs.annotations.NonNull"
] | import edu.umd.cs.findbugs.annotations.NonNull; | import edu.umd.cs.findbugs.annotations.*; | [
"edu.umd.cs"
] | edu.umd.cs; | 1,498,952 |
public static ImmutableBiMap<SourcePath, Path> resolveDuplicateRelativePaths(
ImmutableSortedSet<SourcePath> sourcePaths,
SourcePathResolver resolver) {
// This serves a dual purpose - it keeps track of whether a particular relative path had been
// assigned to a SourcePath and how many times a pa... | static ImmutableBiMap<SourcePath, Path> function( ImmutableSortedSet<SourcePath> sourcePaths, SourcePathResolver resolver) { Multiset<Path> assignedPaths = HashMultiset.create(); ImmutableBiMap.Builder<SourcePath, Path> builder = ImmutableBiMap.builder(); List<SourcePath> conflicts = new ArrayList<>(); for (SourcePath ... | /**
* Because of cross-cell, multiple {@link SourcePath}s can resolve to the same relative path,
* despite having distinct absolute paths. This presents a challenge for rules that require
* gathering all of the inputs in one directory.
*
* @param sourcePaths set of SourcePaths to process
* @param reso... | Because of cross-cell, multiple <code>SourcePath</code>s can resolve to the same relative path, despite having distinct absolute paths. This presents a challenge for rules that require gathering all of the inputs in one directory | resolveDuplicateRelativePaths | {
"repo_name": "Dominator008/buck",
"path": "src/com/facebook/buck/rules/SymlinkTree.java",
"license": "apache-2.0",
"size": 7533
} | [
"com.facebook.buck.io.MorePaths",
"com.google.common.collect.HashMultiset",
"com.google.common.collect.ImmutableBiMap",
"com.google.common.collect.ImmutableSortedSet",
"com.google.common.collect.Multiset",
"java.nio.file.Path",
"java.util.ArrayList",
"java.util.List"
] | import com.facebook.buck.io.MorePaths; import com.google.common.collect.HashMultiset; import com.google.common.collect.ImmutableBiMap; import com.google.common.collect.ImmutableSortedSet; import com.google.common.collect.Multiset; import java.nio.file.Path; import java.util.ArrayList; import java.util.List; | import com.facebook.buck.io.*; import com.google.common.collect.*; import java.nio.file.*; import java.util.*; | [
"com.facebook.buck",
"com.google.common",
"java.nio",
"java.util"
] | com.facebook.buck; com.google.common; java.nio; java.util; | 1,730,644 |
public int size(DeviceProtocolInfoSource<?> type) {
setsLock.readLock().lock();
try {
SortedSet<ProtocolInfo> set = protocolInfoSets.get(type);
return set == null ? 0 : set.size();
} finally {
setsLock.readLock().unlock();
}
} | int function(DeviceProtocolInfoSource<?> type) { setsLock.readLock().lock(); try { SortedSet<ProtocolInfo> set = protocolInfoSets.get(type); return set == null ? 0 : set.size(); } finally { setsLock.readLock().unlock(); } } | /**
* Returns the number of elements of the given
* {@link DeviceProtocolInfoSource} type. If this contains more than
* {@link Integer#MAX_VALUE} elements, returns {@link Integer#MAX_VALUE}.
*
* @param type the {@link DeviceProtocolInfoSource} type to get the number
* of elements for.
* @return... | Returns the number of elements of the given <code>DeviceProtocolInfoSource</code> type. If this contains more than <code>Integer#MAX_VALUE</code> elements, returns <code>Integer#MAX_VALUE</code> | size | {
"repo_name": "Sami32/DigitalMediaServer",
"path": "src/main/java/net/pms/dlna/protocolinfo/DeviceProtocolInfo.java",
"license": "gpl-2.0",
"size": 30632
} | [
"java.util.SortedSet"
] | import java.util.SortedSet; | import java.util.*; | [
"java.util"
] | java.util; | 1,322,359 |
public File getFile() { return file; } | public File getFile() { return file; } | /**
* Returns the files associated to the file failing to import.
*
* @return See above.
*/ | Returns the files associated to the file failing to import | getUsedFiles | {
"repo_name": "jballanc/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/util/file/ImportErrorObject.java",
"license": "gpl-2.0",
"size": 4646
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 1,891,401 |
public void delete ()
{
m_aCachedContent = null;
final File aTempFile = getStoreLocation ();
if (aTempFile != null)
{
final FileIOError aIOError = FileOperations.deleteFileIfExisting (aTempFile);
if (aIOError.isFailure ())
if (LOGGER.isErrorEnabled ())
LOGGER.error ("Fa... | void function () { m_aCachedContent = null; final File aTempFile = getStoreLocation (); if (aTempFile != null) { final FileIOError aIOError = FileOperations.deleteFileIfExisting (aTempFile); if (aIOError.isFailure ()) if (LOGGER.isErrorEnabled ()) LOGGER.error (STR + aTempFile + STR + aIOError.toString ()); } } | /**
* Deletes the underlying storage for a file item, including deleting any
* associated temporary disk file. Although this storage will be deleted
* automatically when the <code>FileItem</code> instance is garbage collected,
* this method can be used to ensure that this is done at an earlier time,
* th... | Deletes the underlying storage for a file item, including deleting any associated temporary disk file. Although this storage will be deleted automatically when the <code>FileItem</code> instance is garbage collected, this method can be used to ensure that this is done at an earlier time, thus preserving system resource... | delete | {
"repo_name": "phax/ph-web",
"path": "ph-web/src/main/java/com/helger/web/fileupload/parse/DiskFileItem.java",
"license": "apache-2.0",
"size": 20311
} | [
"com.helger.commons.io.file.FileIOError",
"com.helger.commons.io.file.FileOperations",
"java.io.File"
] | import com.helger.commons.io.file.FileIOError; import com.helger.commons.io.file.FileOperations; import java.io.File; | import com.helger.commons.io.file.*; import java.io.*; | [
"com.helger.commons",
"java.io"
] | com.helger.commons; java.io; | 498,960 |
public static long getDays( Date date )
{
return date.getTime() / MS_PER_DAY;
}
| static long function( Date date ) { return date.getTime() / MS_PER_DAY; } | /**
* Returns the number of days since 01/01/1970. The value is rounded off to
* the floor value and does not take daylight saving time into account.
*
* @param date the date.
* @return number of days since Epoch.
*/ | Returns the number of days since 01/01/1970. The value is rounded off to the floor value and does not take daylight saving time into account | getDays | {
"repo_name": "erlingfjelstad/SA-DHIS-TrackerCapture",
"path": "SDK/src/main/java/org/hisp/dhis/android/sdk/utils/DateUtils.java",
"license": "bsd-3-clause",
"size": 17871
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 582,048 |
public void assemble(List<PropertyPair> results) {
DataGraph dataGraph = PlasmaDataFactory.INSTANCE.createDataGraph();
this.root = (PlasmaDataObject) dataGraph.createRootObject(this.rootType);
if (log.isDebugEnabled())
log.debug("assembling root: " + this.root.getType().getName());
CoreNode ro... | void function(List<PropertyPair> results) { DataGraph dataGraph = PlasmaDataFactory.INSTANCE.createDataGraph(); this.root = (PlasmaDataObject) dataGraph.createRootObject(this.rootType); if (log.isDebugEnabled()) log.debug(STR + this.root.getType().getName()); CoreNode rootNode = (CoreNode) this.root; if (snapshotDate !... | /**
* Initiates the assembly of a data graph based on the given results list.
*
* @param results
* the results list
*
* @see DataGraphAssembler.getDataGraph()
*/ | Initiates the assembly of a data graph based on the given results list | assemble | {
"repo_name": "plasma-framework/plasma",
"path": "plasma-jdbc/src/main/java/org/plasma/sdo/jdbc/service/GraphAssembler.java",
"license": "apache-2.0",
"size": 20936
} | [
"java.util.ArrayList",
"java.util.List",
"org.plasma.sdo.PlasmaDataObject",
"org.plasma.sdo.PlasmaProperty",
"org.plasma.sdo.PlasmaType",
"org.plasma.sdo.access.DataAccessException",
"org.plasma.sdo.access.provider.common.PropertyPair",
"org.plasma.sdo.core.CoreConstants",
"org.plasma.sdo.core.CoreN... | import java.util.ArrayList; import java.util.List; import org.plasma.sdo.PlasmaDataObject; import org.plasma.sdo.PlasmaProperty; import org.plasma.sdo.PlasmaType; import org.plasma.sdo.access.DataAccessException; import org.plasma.sdo.access.provider.common.PropertyPair; import org.plasma.sdo.core.CoreConstants; import... | import java.util.*; import org.plasma.sdo.*; import org.plasma.sdo.access.*; import org.plasma.sdo.access.provider.common.*; import org.plasma.sdo.core.*; import org.plasma.sdo.helper.*; import org.plasma.sdo.profile.*; | [
"java.util",
"org.plasma.sdo"
] | java.util; org.plasma.sdo; | 1,222,157 |
public synchronized void changeTitle(String luid, String newTitle,
Progress pg) throws IOException {
MetaData meta = getInfo(luid);
if (meta == null) {
throw new IOException("Story not found: " + luid);
}
changeSTA(luid, meta.getSource(), newTitle, meta.getAuthor(), pg);
} | synchronized void function(String luid, String newTitle, Progress pg) throws IOException { MetaData meta = getInfo(luid); if (meta == null) { throw new IOException(STR + luid); } changeSTA(luid, meta.getSource(), newTitle, meta.getAuthor(), pg); } | /**
* Change the title (name) of the given {@link Story}.
*
* @param luid
* the {@link Story} LUID
* @param newTitle
* the new title
* @param pg
* the optional progress reporter
*
* @throws IOException
* in case of I/O error or if the {@link Story} wa... | Change the title (name) of the given <code>Story</code> | changeTitle | {
"repo_name": "nikiroo/fanfix",
"path": "src/be/nikiroo/fanfix/library/BasicLibrary.java",
"license": "gpl-3.0",
"size": 25523
} | [
"be.nikiroo.fanfix.data.MetaData",
"be.nikiroo.utils.Progress",
"java.io.IOException"
] | import be.nikiroo.fanfix.data.MetaData; import be.nikiroo.utils.Progress; import java.io.IOException; | import be.nikiroo.fanfix.data.*; import be.nikiroo.utils.*; import java.io.*; | [
"be.nikiroo.fanfix",
"be.nikiroo.utils",
"java.io"
] | be.nikiroo.fanfix; be.nikiroo.utils; java.io; | 2,270,509 |
public void testHaving() {
IgniteCache<Integer, Integer> c = ignite(0).getOrCreateCache(cacheConfig("having", true,
Integer.class, Integer.class));
try {
Random rnd = new GridRandom();
Map<Integer, AtomicLong> cntMap = new HashMap<>();
for (int i = ... | void function() { IgniteCache<Integer, Integer> c = ignite(0).getOrCreateCache(cacheConfig(STR, true, Integer.class, Integer.class)); try { Random rnd = new GridRandom(); Map<Integer, AtomicLong> cntMap = new HashMap<>(); for (int i = 0; i < 1000; i++) { int v = (int)(50 * rnd.nextGaussian()); c.put(i, v); AtomicLong c... | /**
* Test HAVING clause.
*/ | Test HAVING clause | testHaving | {
"repo_name": "nivanov/ignite",
"path": "modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/IgniteSqlSplitterSelfTest.java",
"license": "apache-2.0",
"size": 70741
} | [
"java.util.HashMap",
"java.util.List",
"java.util.Map",
"java.util.Random",
"java.util.concurrent.atomic.AtomicLong",
"org.apache.ignite.IgniteCache",
"org.apache.ignite.cache.query.SqlFieldsQuery",
"org.apache.ignite.internal.util.GridRandom",
"org.apache.ignite.internal.util.typedef.X"
] | import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Random; import java.util.concurrent.atomic.AtomicLong; import org.apache.ignite.IgniteCache; import org.apache.ignite.cache.query.SqlFieldsQuery; import org.apache.ignite.internal.util.GridRandom; import org.apache.ignite.internal.u... | import java.util.*; import java.util.concurrent.atomic.*; import org.apache.ignite.*; import org.apache.ignite.cache.query.*; import org.apache.ignite.internal.util.*; import org.apache.ignite.internal.util.typedef.*; | [
"java.util",
"org.apache.ignite"
] | java.util; org.apache.ignite; | 2,852,222 |
@Override
public void populateHeaderFields(WorkflowDocument workflowDocument) {
super.populateHeaderFields(workflowDocument);
getDocInfo().add(new HeaderField("DataDictionary.CustomerInvoiceDocument.attributes.sourceTotal", (String) new CurrencyFormatter().format(getCustomerInvoiceDocument().get... | void function(WorkflowDocument workflowDocument) { super.populateHeaderFields(workflowDocument); getDocInfo().add(new HeaderField(STR, (String) new CurrencyFormatter().format(getCustomerInvoiceDocument().getSourceTotal()))); getDocInfo().add(new HeaderField(STR, (String) new CurrencyFormatter().format(getCustomerInvoic... | /**
* By overriding this method, we can add the invoice total and open amount to the document header.
*
* @see org.kuali.rice.kns.web.struts.form.KualiForm#getDocInfo()
* <p>
* KRAD Conversion: Performs the customization of the header fields.
* No data dictionary is involved here.
*/ | By overriding this method, we can add the invoice total and open amount to the document header | populateHeaderFields | {
"repo_name": "quikkian-ua-devops/will-financials",
"path": "kfs-ar/src/main/java/org/kuali/kfs/module/ar/document/web/struts/CustomerInvoiceForm.java",
"license": "agpl-3.0",
"size": 9944
} | [
"org.kuali.kfs.kns.web.ui.HeaderField",
"org.kuali.rice.core.web.format.CurrencyFormatter",
"org.kuali.rice.kew.api.WorkflowDocument"
] | import org.kuali.kfs.kns.web.ui.HeaderField; import org.kuali.rice.core.web.format.CurrencyFormatter; import org.kuali.rice.kew.api.WorkflowDocument; | import org.kuali.kfs.kns.web.ui.*; import org.kuali.rice.core.web.format.*; import org.kuali.rice.kew.api.*; | [
"org.kuali.kfs",
"org.kuali.rice"
] | org.kuali.kfs; org.kuali.rice; | 978,907 |
public TermVectorsRequest selectedFields(String... fields) {
selectedFields = fields != null && fields.length != 0 ? Sets.newHashSet(fields) : null;
return this;
} | TermVectorsRequest function(String... fields) { selectedFields = fields != null && fields.length != 0 ? Sets.newHashSet(fields) : null; return this; } | /**
* Return only term vectors for special selected fields. Returns the term
* vectors for all fields if selectedFields == null
*/ | Return only term vectors for special selected fields. Returns the term vectors for all fields if selectedFields == null | selectedFields | {
"repo_name": "wuranbo/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/action/termvectors/TermVectorsRequest.java",
"license": "apache-2.0",
"size": 24229
} | [
"org.elasticsearch.common.util.set.Sets"
] | import org.elasticsearch.common.util.set.Sets; | import org.elasticsearch.common.util.set.*; | [
"org.elasticsearch.common"
] | org.elasticsearch.common; | 1,681,558 |
public void testDependenceOnConstraint()
throws SQLException{
PreparedStatement ps =
prepareStatement("select * from t1 " +
"--derby-properties constraint = cons1");
JDBC.assertFullResultSet(ps.executeQuery(), FULL_TABLE);
Statement st =... | void function() throws SQLException{ PreparedStatement ps = prepareStatement(STR + STR); JDBC.assertFullResultSet(ps.executeQuery(), FULL_TABLE); Statement st = createStatement(); st.executeUpdate(STR); assertStatementError("42Y48", ps); st.executeUpdate(STR + STR); ps.close(); st.close(); } | /**
* Verify that statements are dependent
* on specified constraint.
*/ | Verify that statements are dependent on specified constraint | testDependenceOnConstraint | {
"repo_name": "kavin256/Derby",
"path": "java/testing/org/apache/derbyTesting/functionTests/tests/lang/OptimizerOverridesTest.java",
"license": "apache-2.0",
"size": 20454
} | [
"java.sql.PreparedStatement",
"java.sql.SQLException",
"java.sql.Statement",
"org.apache.derbyTesting.junit.JDBC"
] | import java.sql.PreparedStatement; import java.sql.SQLException; import java.sql.Statement; import org.apache.derbyTesting.junit.JDBC; | import java.sql.*; import org.apache.*; | [
"java.sql",
"org.apache"
] | java.sql; org.apache; | 1,959,462 |
public static Set<String> restoreSearchTags(Context context) {
SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context);
return sp.getStringSet(SEARCH_TAGS, new HashSet<>());
} | static Set<String> function(Context context) { SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(context); return sp.getStringSet(SEARCH_TAGS, new HashSet<>()); } | /**
* restore search tags
*
* @param context context
* @return search tags
*/ | restore search tags | restoreSearchTags | {
"repo_name": "demonyan/douban-movie",
"path": "app/src/main/java/com/demon/doubanmovies/utils/PrefsUtil.java",
"license": "apache-2.0",
"size": 3995
} | [
"android.content.Context",
"android.content.SharedPreferences",
"android.support.v7.preference.PreferenceManager",
"java.util.HashSet",
"java.util.Set"
] | import android.content.Context; import android.content.SharedPreferences; import android.support.v7.preference.PreferenceManager; import java.util.HashSet; import java.util.Set; | import android.content.*; import android.support.v7.preference.*; import java.util.*; | [
"android.content",
"android.support",
"java.util"
] | android.content; android.support; java.util; | 2,169,889 |
public Aspect getSuctionType(ForgeDirection face); | Aspect function(ForgeDirection face); | /**
* Returns the type of suction this block is applying.
*
* @param loc the location from where the suction is being checked
* @return a return type of null indicates the suction is untyped and the first thing available will be drawn
*/ | Returns the type of suction this block is applying | getSuctionType | {
"repo_name": "yolp900/ItsJustaCharmOutdated",
"path": "src/api/java/thaumcraft/api/aspects/IEssentiaTransport.java",
"license": "gpl-2.0",
"size": 2701
} | [
"net.minecraftforge.common.util.ForgeDirection"
] | import net.minecraftforge.common.util.ForgeDirection; | import net.minecraftforge.common.util.*; | [
"net.minecraftforge.common"
] | net.minecraftforge.common; | 782,847 |
private WeatherState parseWeatherState(String iconCode) {
WeatherState resultState = WeatherState.UNKNOWN;
if ("clear-day".equals(iconCode) || "clear-night".equals(iconCode)
|| "wind".equals(iconCode)) {
resultState = WeatherState.CLEAR;
} else if ("rain".equals(... | WeatherState function(String iconCode) { WeatherState resultState = WeatherState.UNKNOWN; if (STR.equals(iconCode) STR.equals(iconCode) "wind".equals(iconCode)) { resultState = WeatherState.CLEAR; } else if ("rain".equals(iconCode)) { resultState = WeatherState.RAIN; } else if (STR.equals(iconCode) STR.equals(iconCode)... | /**
* Parses the iconCode returned from the API can converts it into the
* WeatherState enumeration.
*
* @param iconCode the icon for forecast
* @return the weatherstate
*/ | Parses the iconCode returned from the API can converts it into the WeatherState enumeration | parseWeatherState | {
"repo_name": "chanomie/weathernext",
"path": "src/main/java/net/chaosserver/weathernext/weather/services/ForecastIoWeatherService.java",
"license": "apache-2.0",
"size": 9814
} | [
"net.chaosserver.weathernext.weather.WeatherState"
] | import net.chaosserver.weathernext.weather.WeatherState; | import net.chaosserver.weathernext.weather.*; | [
"net.chaosserver.weathernext"
] | net.chaosserver.weathernext; | 199,935 |
protected List<Pair<String [], String []>> createLinuxDeviceDiscoveryPairs (final String inputName, final String outputName)
{
final List<Pair<String [], String []>> results = new ArrayList<> ();
results.add (this.addDeviceDiscoveryPair (inputName, outputName));
for (int i = 1; i < 2... | List<Pair<String [], String []>> function (final String inputName, final String outputName) { final List<Pair<String [], String []>> results = new ArrayList<> (); results.add (this.addDeviceDiscoveryPair (inputName, outputName)); for (int i = 1; i < 20; i++) results.add (this.addDeviceDiscoveryPair (String.format (STR,... | /**
* Creates 20 Linux variations from the given device name for auto lookup. It appends '
* [hw:x,0,0]' to the given input and output names.
*
* @param inputName The base name to use
* @param outputName The base name to use
* @return The created pairs
*/ | Creates 20 Linux variations from the given device name for auto lookup. It appends ' [hw:x,0,0]' to the given input and output names | createLinuxDeviceDiscoveryPairs | {
"repo_name": "git-moss/DrivenByMoss",
"path": "src/main/java/de/mossgrabers/framework/controller/DefaultControllerDefinition.java",
"license": "lgpl-3.0",
"size": 7452
} | [
"de.mossgrabers.framework.utils.Pair",
"java.util.ArrayList",
"java.util.List"
] | import de.mossgrabers.framework.utils.Pair; import java.util.ArrayList; import java.util.List; | import de.mossgrabers.framework.utils.*; import java.util.*; | [
"de.mossgrabers.framework",
"java.util"
] | de.mossgrabers.framework; java.util; | 2,176,102 |
protected void deleteBucket(final Bucket bucket) throws Exception {
bucketDeleter.deleteBucket(bucket);
} | void function(final Bucket bucket) throws Exception { bucketDeleter.deleteBucket(bucket); } | /**
* Deletes the specified bucket.
*/ | Deletes the specified bucket | deleteBucket | {
"repo_name": "sonatype/nexus-public",
"path": "components/nexus-repository/src/main/java/org/sonatype/nexus/repository/storage/internal/StorageFacetManagerImpl.java",
"license": "epl-1.0",
"size": 5715
} | [
"org.sonatype.nexus.repository.storage.Bucket"
] | import org.sonatype.nexus.repository.storage.Bucket; | import org.sonatype.nexus.repository.storage.*; | [
"org.sonatype.nexus"
] | org.sonatype.nexus; | 914,992 |
private static boolean isProductInventoryAvailableByFacility(String productId, String inventoryFacilityId, BigDecimal quantity, LocalDispatcher dispatcher) {
BigDecimal availableToPromise = null;
try {
Map<String, Object> result = dispatcher.runSync("getInventoryAvailableByFacility",
... | static boolean function(String productId, String inventoryFacilityId, BigDecimal quantity, LocalDispatcher dispatcher) { BigDecimal availableToPromise = null; try { Map<String, Object> result = dispatcher.runSync(STR, UtilMisc.toMap(STR, productId, STR, inventoryFacilityId)); availableToPromise = (BigDecimal) result.ge... | /**
* invokes the getInventoryAvailableByFacility service, returns true if specified quantity is available, else false
* this is only used in the related method that uses a ProductConfigWrapper, until that is refactored into a service as well...
*/ | invokes the getInventoryAvailableByFacility service, returns true if specified quantity is available, else false this is only used in the related method that uses a ProductConfigWrapper, until that is refactored into a service as well.. | isProductInventoryAvailableByFacility | {
"repo_name": "yuri0x7c1/ofbiz-explorer",
"path": "src/test/resources/apache-ofbiz-17.12.04/applications/product/src/main/java/org/apache/ofbiz/product/product/ProductWorker.java",
"license": "apache-2.0",
"size": 64843
} | [
"java.math.BigDecimal",
"java.util.Map",
"org.apache.ofbiz.base.util.Debug",
"org.apache.ofbiz.base.util.UtilMisc",
"org.apache.ofbiz.service.GenericServiceException",
"org.apache.ofbiz.service.LocalDispatcher",
"org.apache.ofbiz.service.ModelService"
] | import java.math.BigDecimal; import java.util.Map; import org.apache.ofbiz.base.util.Debug; import org.apache.ofbiz.base.util.UtilMisc; import org.apache.ofbiz.service.GenericServiceException; import org.apache.ofbiz.service.LocalDispatcher; import org.apache.ofbiz.service.ModelService; | import java.math.*; import java.util.*; import org.apache.ofbiz.base.util.*; import org.apache.ofbiz.service.*; | [
"java.math",
"java.util",
"org.apache.ofbiz"
] | java.math; java.util; org.apache.ofbiz; | 2,519,627 |
private synchronized void reconfigure(String config) throws IOException {
checkNotNull(processStdIn, "sandboxfs already has been destroyed");
processStdIn.write(config);
processStdIn.flush();
checkNotNull(processStdOut, "sandboxfs has already been destroyed");
String done = processStdOut.readLine... | synchronized void function(String config) throws IOException { checkNotNull(processStdIn, STR); processStdIn.write(config); processStdIn.flush(); checkNotNull(processStdOut, STR); String done = processStdOut.readLine(); if (done == null) { throw new IOException(STR); } if (!done.equals("Done")) { throw new IOException(... | /**
* Pushes a new configuration to sandboxfs and waits for acceptance.
*
* @param config the configuration chunk to push to sandboxfs
* @throws IOException if sandboxfs cannot be reconfigured either because of an error in the
* configuration or because we failed to communicate with the subprocess
... | Pushes a new configuration to sandboxfs and waits for acceptance | reconfigure | {
"repo_name": "dropbox/bazel",
"path": "src/main/java/com/google/devtools/build/lib/sandbox/RealSandboxfsProcess.java",
"license": "apache-2.0",
"size": 9709
} | [
"com.google.common.base.Preconditions",
"java.io.IOException"
] | import com.google.common.base.Preconditions; import java.io.IOException; | import com.google.common.base.*; import java.io.*; | [
"com.google.common",
"java.io"
] | com.google.common; java.io; | 1,804,667 |
private HdfsLocatedFileStatus createLocatedFileStatus(byte[] path,
INode node, int snapshot) throws IOException {
assert hasReadLock();
long size = 0; // length is zero for directories
short replication = 0;
long blocksize = 0;
LocatedBlocks loc = null;
if (node.isFile()) {
final I... | HdfsLocatedFileStatus function(byte[] path, INode node, int snapshot) throws IOException { assert hasReadLock(); long size = 0; short replication = 0; long blocksize = 0; LocatedBlocks loc = null; if (node.isFile()) { final INodeFile fileNode = node.asFile(); size = fileNode.computeFileSize(snapshot); replication = fil... | /**
* Create FileStatus with location info by file INode
*/ | Create FileStatus with location info by file INode | createLocatedFileStatus | {
"repo_name": "yelshater/hadoop-2.3.0",
"path": "hadoop-hdfs-2.3.0-cdh5.1.0/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java",
"license": "apache-2.0",
"size": 110238
} | [
"java.io.IOException",
"org.apache.hadoop.hdfs.protocol.HdfsLocatedFileStatus",
"org.apache.hadoop.hdfs.protocol.LocatedBlock",
"org.apache.hadoop.hdfs.protocol.LocatedBlocks",
"org.apache.hadoop.hdfs.server.namenode.snapshot.Snapshot"
] | import java.io.IOException; import org.apache.hadoop.hdfs.protocol.HdfsLocatedFileStatus; import org.apache.hadoop.hdfs.protocol.LocatedBlock; import org.apache.hadoop.hdfs.protocol.LocatedBlocks; import org.apache.hadoop.hdfs.server.namenode.snapshot.Snapshot; | import java.io.*; import org.apache.hadoop.hdfs.protocol.*; import org.apache.hadoop.hdfs.server.namenode.snapshot.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 2,343,454 |
EReference getListLiteral_L5(); | EReference getListLiteral_L5(); | /**
* Returns the meta object for the containment reference list '{@link com.euclideanspace.spad.editor.ListLiteral#getL5 <em>L5</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference list '<em>L5</em>'.
* @see com.euclideanspace.spad.editor.List... | Returns the meta object for the containment reference list '<code>com.euclideanspace.spad.editor.ListLiteral#getL5 L5</code>'. | getListLiteral_L5 | {
"repo_name": "martinbaker/euclideanspace",
"path": "com.euclideanspace.spad/src-gen/com/euclideanspace/spad/editor/EditorPackage.java",
"license": "agpl-3.0",
"size": 593321
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 1,228,807 |
@Test
public void testResize() {
Point transln = new Point(12.0, 34.0);
Dimension sizeDelta = new Dimension(23.9, -34.0);
Envelope resizeBounds = this.expectedBounds.resize(transln, sizeDelta);
this.testInstance.resize(transln, sizeDelta);
assertEquals("expected bounds", resizeBounds, this.testInstance.ge... | void function() { Point transln = new Point(12.0, 34.0); Dimension sizeDelta = new Dimension(23.9, -34.0); Envelope resizeBounds = this.expectedBounds.resize(transln, sizeDelta); this.testInstance.resize(transln, sizeDelta); assertEquals(STR, resizeBounds, this.testInstance.getBounds()); CanvasResizeEventValidator vali... | /**
* Test method for {@link org.pathwayeditor.businessobjects.impl.ShapeAttribute#resize(org.pathwayeditor.figure.geometry.Point, org.pathwayeditor.figure.geometry.Dimension)}.
*/ | Test method for <code>org.pathwayeditor.businessobjects.impl.ShapeAttribute#resize(org.pathwayeditor.figure.geometry.Point, org.pathwayeditor.figure.geometry.Dimension)</code> | testResize | {
"repo_name": "stumoodie/VisualLanguageToolkit",
"path": "test/org/pathwayeditor/businessobjects/impl/ShapeAttributeTest.java",
"license": "apache-2.0",
"size": 21957
} | [
"org.junit.Assert",
"org.pathwayeditor.figure.geometry.Dimension",
"org.pathwayeditor.figure.geometry.Envelope",
"org.pathwayeditor.figure.geometry.Point",
"org.pathwayeditor.testfixture.CanvasResizeEventValidator"
] | import org.junit.Assert; import org.pathwayeditor.figure.geometry.Dimension; import org.pathwayeditor.figure.geometry.Envelope; import org.pathwayeditor.figure.geometry.Point; import org.pathwayeditor.testfixture.CanvasResizeEventValidator; | import org.junit.*; import org.pathwayeditor.figure.geometry.*; import org.pathwayeditor.testfixture.*; | [
"org.junit",
"org.pathwayeditor.figure",
"org.pathwayeditor.testfixture"
] | org.junit; org.pathwayeditor.figure; org.pathwayeditor.testfixture; | 1,620,725 |
protected void showTabs() {
if (getPageCount() > 1) {
setPageText(0, getString("_UI_SelectionPage_label"));
if (getContainer() instanceof CTabFolder) {
((CTabFolder)getContainer()).setTabHeight(SWT.DEFAULT);
Point point = getContainer().getSize();
getContainer().setSize(point.x, point.y - 6... | void function() { if (getPageCount() > 1) { setPageText(0, getString(STR)); if (getContainer() instanceof CTabFolder) { ((CTabFolder)getContainer()).setTabHeight(SWT.DEFAULT); Point point = getContainer().getSize(); getContainer().setSize(point.x, point.y - 6); } } } | /**
* If there is more than one page in the multi-page editor part,
* this shows the tabs at the bottom.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/ | If there is more than one page in the multi-page editor part, this shows the tabs at the bottom. | showTabs | {
"repo_name": "imbur/EMF-IncQuery-Examples",
"path": "stochsim/org.eclipse.viatra2.emf.incquery.stochsim.model.editor/src/stochsim/presentation/StochsimEditor.java",
"license": "epl-1.0",
"size": 55472
} | [
"org.eclipse.swt.custom.CTabFolder",
"org.eclipse.swt.graphics.Point"
] | import org.eclipse.swt.custom.CTabFolder; import org.eclipse.swt.graphics.Point; | import org.eclipse.swt.custom.*; import org.eclipse.swt.graphics.*; | [
"org.eclipse.swt"
] | org.eclipse.swt; | 1,725,636 |
public static void main(String[] argv) {
try {
AppGameContainer container = new AppGameContainer(new AntiAliasTest());
container.setDisplayMode(800,600,false);
container.start();
} catch (SlickException e) {
e.printStackTrace();
}
}
| static void function(String[] argv) { try { AppGameContainer container = new AppGameContainer(new AntiAliasTest()); container.setDisplayMode(800,600,false); container.start(); } catch (SlickException e) { e.printStackTrace(); } } | /**
* Entry point to our test
*
* @param argv The arguments passed to the test
*/ | Entry point to our test | main | {
"repo_name": "SenshiSentou/SourceFight",
"path": "slick_dev/tags/Slick0.1/src/org/newdawn/slick/tests/AntiAliasTest.java",
"license": "bsd-2-clause",
"size": 1673
} | [
"org.newdawn.slick.AppGameContainer",
"org.newdawn.slick.SlickException"
] | import org.newdawn.slick.AppGameContainer; import org.newdawn.slick.SlickException; | import org.newdawn.slick.*; | [
"org.newdawn.slick"
] | org.newdawn.slick; | 365,227 |
private void updateAssignAllowedStack(Node n, boolean entering) {
switch (n.getType()) {
case CASE:
case FOR:
case FUNCTION:
case HOOK:
case IF:
case SWITCH:
case WHILE:
if (entering) {
assignAllowed.push(0);
} else {
... | void function(Node n, boolean entering) { switch (n.getType()) { case CASE: case FOR: case FUNCTION: case HOOK: case IF: case SWITCH: case WHILE: if (entering) { assignAllowed.push(0); } else { assignAllowed.remove(); } break; } } | /**
* Determines whether assignment to a define should be allowed
* in the subtree of the given node, and if not, records that fact.
*
* @param n The node whose subtree we're about to enter or exit.
* @param entering True if we're entering the subtree, false otherwise.
*/ | Determines whether assignment to a define should be allowed in the subtree of the given node, and if not, records that fact | updateAssignAllowedStack | {
"repo_name": "Medium/closure-compiler",
"path": "src/com/google/javascript/jscomp/ProcessDefines.java",
"license": "apache-2.0",
"size": 18333
} | [
"com.google.javascript.rhino.Node"
] | import com.google.javascript.rhino.Node; | import com.google.javascript.rhino.*; | [
"com.google.javascript"
] | com.google.javascript; | 235,710 |
protected void saveAssertions(HierarchicalStreamWriter writer, MarshallingContext context, SampleResult res,
SampleSaveConfiguration save) {
if (save.saveAssertions()) {
AssertionResult[] assertionResults = res.getAssertionResults();
for (int i = 0; i < assertionResults.l... | void function(HierarchicalStreamWriter writer, MarshallingContext context, SampleResult res, SampleSaveConfiguration save) { if (save.saveAssertions()) { AssertionResult[] assertionResults = res.getAssertionResults(); for (int i = 0; i < assertionResults.length; i++) { writeItem(assertionResults[i], context, writer); }... | /**
* Save assertion results from the sample result into the stream
*
* @param writer
* stream to save objects into
* @param context
* context for xstream to allow nested objects
* @param res
* sample to be saved
* @param save
* ... | Save assertion results from the sample result into the stream | saveAssertions | {
"repo_name": "hizhangqi/jmeter-1",
"path": "src/core/org/apache/jmeter/save/converters/SampleResultConverter.java",
"license": "apache-2.0",
"size": 20776
} | [
"com.thoughtworks.xstream.converters.MarshallingContext",
"com.thoughtworks.xstream.io.HierarchicalStreamWriter",
"org.apache.jmeter.assertions.AssertionResult",
"org.apache.jmeter.samplers.SampleResult",
"org.apache.jmeter.samplers.SampleSaveConfiguration"
] | import com.thoughtworks.xstream.converters.MarshallingContext; import com.thoughtworks.xstream.io.HierarchicalStreamWriter; import org.apache.jmeter.assertions.AssertionResult; import org.apache.jmeter.samplers.SampleResult; import org.apache.jmeter.samplers.SampleSaveConfiguration; | import com.thoughtworks.xstream.converters.*; import com.thoughtworks.xstream.io.*; import org.apache.jmeter.assertions.*; import org.apache.jmeter.samplers.*; | [
"com.thoughtworks.xstream",
"org.apache.jmeter"
] | com.thoughtworks.xstream; org.apache.jmeter; | 1,764,097 |
public void set(int index, NullableIntHolder holder) throws IllegalArgumentException {
if (holder.isSet < 0) {
throw new IllegalArgumentException();
} else if (holder.isSet > 0) {
BitVectorHelper.setValidityBitToOne(validityBuffer, index);
setValue(index, holder.value);
} else {
Bi... | void function(int index, NullableIntHolder holder) throws IllegalArgumentException { if (holder.isSet < 0) { throw new IllegalArgumentException(); } else if (holder.isSet > 0) { BitVectorHelper.setValidityBitToOne(validityBuffer, index); setValue(index, holder.value); } else { BitVectorHelper.setValidityBit(validityBuf... | /**
* Set the element at the given index to the value set in data holder.
* If the value in holder is not indicated as set, element in the
* at the given index will be null.
*
* @param index position of element
* @param holder nullable data holder for value of element
*/ | Set the element at the given index to the value set in data holder. If the value in holder is not indicated as set, element in the at the given index will be null | set | {
"repo_name": "majetideepak/arrow",
"path": "java/vector/src/main/java/org/apache/arrow/vector/IntVector.java",
"license": "apache-2.0",
"size": 11417
} | [
"org.apache.arrow.vector.holders.NullableIntHolder"
] | import org.apache.arrow.vector.holders.NullableIntHolder; | import org.apache.arrow.vector.holders.*; | [
"org.apache.arrow"
] | org.apache.arrow; | 1,576,514 |
ObjectSet<Map.Entry<Float, V>> entrySet();
/** Returns a type-specific set view of the mappings contained in this map.
*
* <p>This method is necessary because there is no inheritance along
* type parameters: it is thus impossible to strengthen {@link #entrySet()}
* so that it returns an {@link it.unimi.dsi.fa... | ObjectSet<Map.Entry<Float, V>> entrySet(); /** Returns a type-specific set view of the mappings contained in this map. * * <p>This method is necessary because there is no inheritance along * type parameters: it is thus impossible to strengthen {@link #entrySet()} * so that it returns an {@link it.unimi.dsi.fastutil.obj... | /** Returns a set view of the mappings contained in this map.
* <P>Note that this specification strengthens the one given in {@link Map#entrySet()}.
*
* @return a set view of the mappings contained in this map.
* @see Map#entrySet()
*/ | Returns a set view of the mappings contained in this map. Note that this specification strengthens the one given in <code>Map#entrySet()</code> | entrySet | {
"repo_name": "karussell/fastutil",
"path": "src/it/unimi/dsi/fastutil/floats/Float2ReferenceMap.java",
"license": "apache-2.0",
"size": 5079
} | [
"it.unimi.dsi.fastutil.objects.ObjectSet",
"java.util.Map"
] | import it.unimi.dsi.fastutil.objects.ObjectSet; import java.util.Map; | import it.unimi.dsi.fastutil.objects.*; import java.util.*; | [
"it.unimi.dsi",
"java.util"
] | it.unimi.dsi; java.util; | 764,569 |
//-----------------------------------------------------------------------
public Period toPeriod() {
return new Period(getStartMillis(), getEndMillis(), getChronology());
} | Period function() { return new Period(getStartMillis(), getEndMillis(), getChronology()); } | /**
* Converts the duration of the interval to a <code>Period</code> using the
* All period type.
* <p>
* This method should be used to extract the field values describing the
* difference between the start and end instants.
*
* @return a time period derived from the interval
*/ | Converts the duration of the interval to a <code>Period</code> using the All period type. This method should be used to extract the field values describing the difference between the start and end instants | toPeriod | {
"repo_name": "PavelSozonov/JodaTimeTesting",
"path": "src/main/java/org/joda/time/base/AbstractInterval.java",
"license": "apache-2.0",
"size": 18997
} | [
"org.joda.time.Period"
] | import org.joda.time.Period; | import org.joda.time.*; | [
"org.joda.time"
] | org.joda.time; | 189,934 |
private boolean equal(File[] array1, File[] array2) {
if (array1.length != array2.length) {
return false;
}
for (int i = 0; i < array1.length; i++) {
boolean found = false;
for (int j = 0; j < array2.length; j++) {
if (equal(array1[i].getAbsoluteFile(),
array2[... | boolean function(File[] array1, File[] array2) { if (array1.length != array2.length) { return false; } for (int i = 0; i < array1.length; i++) { boolean found = false; for (int j = 0; j < array2.length; j++) { if (equal(array1[i].getAbsoluteFile(), array2[j].getAbsoluteFile())) { found = true; break; } } if (!found) { ... | /**
* Returns whether or not two <code>File</code> arrays specify the
* same files.
*/ | Returns whether or not two <code>File</code> arrays specify the same files | equal | {
"repo_name": "ysung-pivotal/incubator-geode",
"path": "gemfire-core/src/main/java/com/gemstone/gemfire/internal/cache/xmlcache/RegionAttributesCreation.java",
"license": "apache-2.0",
"size": 54928
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 2,593,227 |
private int computeSimpleCredsHashCode( SimpleCredentials c ) {
String userID = c.getUserID();
char[] password = c.getPassword();
Map<String, Object> m = getAttributeMap(c);
final int prime = 31;
int result = 1;
result = prime * result + ((userID == null) ? 0 : userID... | int function( SimpleCredentials c ) { String userID = c.getUserID(); char[] password = c.getPassword(); Map<String, Object> m = getAttributeMap(c); final int prime = 31; int result = 1; result = prime * result + ((userID == null) ? 0 : userID.hashCode()); for (int i = 0; i < password.length; i++) { result = prime * res... | /**
* Computes hash code of a SimpleCredentials instance. Ignores its own hashCode() method because it's not overridden in
* SimpleCredentials.
*
* @param c the credentials
* @return the hash code
*/ | Computes hash code of a SimpleCredentials instance. Ignores its own hashCode() method because it's not overridden in SimpleCredentials | computeSimpleCredsHashCode | {
"repo_name": "weebl2000/modeshape",
"path": "modeshape-jca/src/main/java/org/modeshape/jca/JcrConnectionRequestInfo.java",
"license": "apache-2.0",
"size": 6633
} | [
"java.util.Map",
"javax.jcr.SimpleCredentials"
] | import java.util.Map; import javax.jcr.SimpleCredentials; | import java.util.*; import javax.jcr.*; | [
"java.util",
"javax.jcr"
] | java.util; javax.jcr; | 2,447,848 |
public List<Link> getSourceConnections() {
return outputLinks;
}
| List<Link> function() { return outputLinks; } | /**
* Get source connections.
*
* @return the source connections
*/ | Get source connections | getSourceConnections | {
"repo_name": "capitalone/Hydrograph",
"path": "hydrograph.ui/hydrograph.ui.model/src/main/java/hydrograph/ui/graph/model/Component.java",
"license": "apache-2.0",
"size": 47136
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,340,369 |
static protected void encodeFont(String name, Object font, PrintWriter out)
{
assert ((font instanceof FontProxy) || (font instanceof Font));
String family = null;
int style = Font.PLAIN;
int size = 0;
if (font instanceof Font)
{
family = ((Font)font).getName();
style = ((Font)... | static void function(String name, Object font, PrintWriter out) { assert ((font instanceof FontProxy) (font instanceof Font)); String family = null; int style = Font.PLAIN; int size = 0; if (font instanceof Font) { family = ((Font)font).getName(); style = ((Font)font).getStyle(); size = ((Font)font).getSize(); } else {... | /**
* Encodes a font. The specified object must be an
* instance of AWT Font or org.apache.myfaces.trinidadinternal.style.util.FontProxy.
*/ | Encodes a font. The specified object must be an instance of AWT Font or org.apache.myfaces.trinidadinternal.style.util.FontProxy | encodeFont | {
"repo_name": "adamrduffy/trinidad-1.0.x",
"path": "trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/image/xml/encode/AbstractXMLEncoder.java",
"license": "apache-2.0",
"size": 9893
} | [
"java.awt.Font",
"java.io.PrintWriter",
"org.apache.myfaces.trinidadinternal.style.util.FontProxy"
] | import java.awt.Font; import java.io.PrintWriter; import org.apache.myfaces.trinidadinternal.style.util.FontProxy; | import java.awt.*; import java.io.*; import org.apache.myfaces.trinidadinternal.style.util.*; | [
"java.awt",
"java.io",
"org.apache.myfaces"
] | java.awt; java.io; org.apache.myfaces; | 1,999,547 |
@Beta(SinceVersion.V1_4_0)
Update withoutHostHeader(); | @Beta(SinceVersion.V1_4_0) Update withoutHostHeader(); | /**
* Specifies that no host header should be used.
* @return the next stage of the update
*/ | Specifies that no host header should be used | withoutHostHeader | {
"repo_name": "martinsawicki/azure-sdk-for-java",
"path": "azure-mgmt-network/src/main/java/com/microsoft/azure/management/network/ApplicationGatewayBackendHttpConfiguration.java",
"license": "mit",
"size": 35048
} | [
"com.microsoft.azure.management.apigeneration.Beta"
] | import com.microsoft.azure.management.apigeneration.Beta; | import com.microsoft.azure.management.apigeneration.*; | [
"com.microsoft.azure"
] | com.microsoft.azure; | 924,457 |
public SearchSourceBuilder slice(SliceBuilder builder) {
this.sliceBuilder = builder;
return this;
} | SearchSourceBuilder function(SliceBuilder builder) { this.sliceBuilder = builder; return this; } | /**
* Sets a filter that will restrict the search hits, the top hits and the aggregations to a slice of the results
* of the main query.
*/ | Sets a filter that will restrict the search hits, the top hits and the aggregations to a slice of the results of the main query | slice | {
"repo_name": "fuchao01/elasticsearch",
"path": "core/src/main/java/org/elasticsearch/search/builder/SearchSourceBuilder.java",
"license": "apache-2.0",
"size": 58416
} | [
"org.elasticsearch.search.slice.SliceBuilder"
] | import org.elasticsearch.search.slice.SliceBuilder; | import org.elasticsearch.search.slice.*; | [
"org.elasticsearch.search"
] | org.elasticsearch.search; | 1,750,998 |
public void initRootLayout() {
try {
// Load root layout from fxml file.
FXMLLoader loader = new FXMLLoader();
loader.setLocation(MainApp.class.getResource("view/RootLayout.fxml"));
rootLayout = (BorderPane) loader.load();
// Show the scene containing the root layout.
Scene scene = new Scene(... | void function() { try { FXMLLoader loader = new FXMLLoader(); loader.setLocation(MainApp.class.getResource(STR)); rootLayout = (BorderPane) loader.load(); Scene scene = new Scene(rootLayout); primaryStage.setScene(scene); RootLayoutController controller = loader.getController(); controller.setMainApp(this); Platform.se... | /**
* Initializes the root layout.
*/ | Initializes the root layout | initRootLayout | {
"repo_name": "piotrek1668/BookkeeperApp",
"path": "src/de/piba/bookkeeping/MainApp.java",
"license": "mit",
"size": 7685
} | [
"de.piba.bookkeeping.view.RootLayoutController"
] | import de.piba.bookkeeping.view.RootLayoutController; | import de.piba.bookkeeping.view.*; | [
"de.piba.bookkeeping"
] | de.piba.bookkeeping; | 18,063 |
public boolean parseBoolean() throws IOException {
String tok = lexer.getString();
if ("true".equals(tok)) {
return true;
} else if ("false".equals(tok)) {
return false;
} else {
lexer.reportError("\"true\" or \"false\" expected, \"" + tok
... | boolean function() throws IOException { String tok = lexer.getString(); if ("true".equals(tok)) { return true; } else if ("false".equals(tok)) { return false; } else { lexer.reportError("\"true\STRfalse\STRSTR\STR); return false; } } | /**
* Parse a boolean value
**/ | Parse a boolean value | parseBoolean | {
"repo_name": "oliverlietz/bd-j",
"path": "AuthoringTools/com.hdcookbook.grin/com.hdcookbook.grin-se/src/main/java/com/hdcookbook/grin/io/text/ShowParser.java",
"license": "bsd-3-clause",
"size": 115846
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 620,358 |
EAttribute getPhysicalTypeDefinitionSecondary_Number(); | EAttribute getPhysicalTypeDefinitionSecondary_Number(); | /**
* Returns the meta object for the attribute '{@link net.mlanoe.language.vhdl.type.PhysicalTypeDefinitionSecondary#getNumber <em>Number</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Number</em>'.
* @see net.mlanoe.language.vhdl.type.PhysicalTypeD... | Returns the meta object for the attribute '<code>net.mlanoe.language.vhdl.type.PhysicalTypeDefinitionSecondary#getNumber Number</code>'. | getPhysicalTypeDefinitionSecondary_Number | {
"repo_name": "mlanoe/x-vhdl",
"path": "plugins/net.mlanoe.language.vhdl/src-gen/net/mlanoe/language/vhdl/type/TypePackage.java",
"license": "gpl-3.0",
"size": 43919
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 2,609,952 |
private SessionPanel getSession() {
if (session == null) {
session = new SessionPanel(false,false);
}
return session;
} | SessionPanel function() { if (session == null) { session = new SessionPanel(false,false); } return session; } | /**
* This method initializes session
*
* @return javax.swing.JPanel
*/ | This method initializes session | getSession | {
"repo_name": "NCIP/cagrid",
"path": "cagrid/Software/core/caGrid/projects/gaards-ui/src/org/cagrid/gaards/ui/dorian/federation/TrustedIdPsWindow.java",
"license": "bsd-3-clause",
"size": 13042
} | [
"org.cagrid.gaards.ui.dorian.SessionPanel"
] | import org.cagrid.gaards.ui.dorian.SessionPanel; | import org.cagrid.gaards.ui.dorian.*; | [
"org.cagrid.gaards"
] | org.cagrid.gaards; | 1,000,952 |
public static boolean deepEquals(JSONObject requireObject, JSONObject haveObject)
{
List<String> wantKeys = new ArrayList<>();
Iterator<String> requireObjIterator = requireObject.keys();
while (requireObjIterator.hasNext())
{
wantKeys.add(requireObjIterator.next());
... | static boolean function(JSONObject requireObject, JSONObject haveObject) { List<String> wantKeys = new ArrayList<>(); Iterator<String> requireObjIterator = requireObject.keys(); while (requireObjIterator.hasNext()) { wantKeys.add(requireObjIterator.next()); } for (String key : wantKeys) { if (!haveObject.has(key)) { re... | /**
* String or JSON matching
*/ | String or JSON matching | deepEquals | {
"repo_name": "crescentflare/SmartMockServer",
"path": "MockLibAndroid/SmartMockLib/src/main/java/com/crescentflare/smartmock/utility/SmartMockParamMatcher.java",
"license": "mit",
"size": 4934
} | [
"java.util.ArrayList",
"java.util.Iterator",
"java.util.List",
"org.json.JSONObject"
] | import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.json.JSONObject; | import java.util.*; import org.json.*; | [
"java.util",
"org.json"
] | java.util; org.json; | 1,719,341 |
Set<Class<? extends Event>> getSinks(); | Set<Class<? extends Event>> getSinks(); | /**
* Returns the set of all event classes for which sinks are presently
* registered.
*
* @return set of event classes
*/ | Returns the set of all event classes for which sinks are presently registered | getSinks | {
"repo_name": "maxkondr/onos-porta",
"path": "core/api/src/main/java/org/onosproject/event/EventSinkRegistry.java",
"license": "apache-2.0",
"size": 1787
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 1,784,731 |
CompletableFuture<Void> asyncClose(); | CompletableFuture<Void> asyncClose(); | /**
* Close the LockManager and release all the locks.
*
* @return a future that will track the completion of the operation
* @throws MetadataStoreException
* if there's a failure in closing the LockManager
*/ | Close the LockManager and release all the locks | asyncClose | {
"repo_name": "yahoo/pulsar",
"path": "pulsar-metadata/src/main/java/org/apache/pulsar/metadata/api/coordination/LockManager.java",
"license": "apache-2.0",
"size": 4122
} | [
"java.util.concurrent.CompletableFuture"
] | import java.util.concurrent.CompletableFuture; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 1,156,035 |
@Deprecated
public static void runOnUiThreadBlocking(final Runnable r) {
if (runningOnUiThread()) {
r.run();
} else {
FutureTask<Void> task = new FutureTask<Void>(r, null);
postOnUiThread(task);
try {
task.get();
} catch... | static void function(final Runnable r) { if (runningOnUiThread()) { r.run(); } else { FutureTask<Void> task = new FutureTask<Void>(r, null); postOnUiThread(task); try { task.get(); } catch (Exception e) { throw new RuntimeException(STR, e); } } } | /**
* Run the supplied Runnable on the main thread. The method will block until the Runnable
* completes.
*
* @deprecated Use {@link
* org.chromium.content_public.browser.test.util.TestThreadUtils#runOnUiThreadBlocking(Runnable)
* TestThreadUtils.runOnUiThreadBlocking(r)} i... | Run the supplied Runnable on the main thread. The method will block until the Runnable completes | runOnUiThreadBlocking | {
"repo_name": "endlessm/chromium-browser",
"path": "base/android/java/src/org/chromium/base/ThreadUtils.java",
"license": "bsd-3-clause",
"size": 12535
} | [
"java.util.concurrent.FutureTask"
] | import java.util.concurrent.FutureTask; | import java.util.concurrent.*; | [
"java.util"
] | java.util; | 1,735,083 |
public List<Integer> calculate(List<Integer> list, int[] array,
int begin, int length) {
int index;
List<Integer> result = new ArrayList<Integer>();
for(index = begin; index < list.size() && index < array.length &&
index < begin + length; index++) {
result.add(list.get(index) * array[index]);
... | List<Integer> function(List<Integer> list, int[] array, int begin, int length) { int index; List<Integer> result = new ArrayList<Integer>(); for(index = begin; index < list.size() && index < array.length && index < begin + length; index++) { result.add(list.get(index) * array[index]); } for(int i = index; i < list.size... | /**
* Multiplies the list by the values within the array between the indices. Missing
* data points due to uneven list and array sizes are treated as zeroes.
* @param List<Integer> list the list
* @param int[] array the array
* @param int begin beginning index of the subset
... | Multiplies the list by the values within the array between the indices. Missing data points due to uneven list and array sizes are treated as zeroes | calculate | {
"repo_name": "jessemull/MicroFlex",
"path": "src/main/java/com/github/jessemull/microflex/integerflex/math/MultiplicationInteger.java",
"license": "apache-2.0",
"size": 18499
} | [
"java.util.ArrayList",
"java.util.List"
] | import java.util.ArrayList; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 757,491 |
public String[] parseCompilerCommandLine(String line) throws TTK91CompileException {
int fieldEnd = 0;
int nextToCheck = 0;
String label = "";
String opcode = "";
String value = "";
int intValue;
String[] parsedLine;
String comment; // for exception
line = line.toLowerCase();
line = line.replace('... | String[] function(String line) throws TTK91CompileException { int fieldEnd = 0; int nextToCheck = 0; String label = STRSTRSTR;STR STR((dc) (ds) (equ) (def))STRCompilation failed: {0}STRinvalid opcode {0}.STRdefSTRCompilation failed: {0}STRinvalid value {0}.STRdsSTRCompilation failed: {0}STRinvalid value for a DS {0}.ST... | /** This function tries to find a compiler command from the
line. Works much like parseLine but this time valid opcodes
are DEF, EQU, DC and DS.
@param line String representing one line from source code.
@return String array with label in position 0, command in the
position 1 and position 2 contains the parame... | This function tries to find a compiler command from the | parseCompilerCommandLine | {
"repo_name": "titokone/koski",
"path": "fi/hu/cs/titokone/Compiler.java",
"license": "lgpl-2.1",
"size": 39376
} | [
"fi.hu.cs.ttk91.TTK91CompileException"
] | import fi.hu.cs.ttk91.TTK91CompileException; | import fi.hu.cs.ttk91.*; | [
"fi.hu.cs"
] | fi.hu.cs; | 2,432,647 |
@Test
public void testGetSuperType() {
String result = target.getSuperType();
assertThat(result, is("LinkLayerizer"));
} | void function() { String result = target.getSuperType(); assertThat(result, is(STR)); } | /**
* Test method for {@link org.o3project.odenos.component.linklayerizer.LinkLayerizer#getSuperType()}.
*/ | Test method for <code>org.o3project.odenos.component.linklayerizer.LinkLayerizer#getSuperType()</code> | testGetSuperType | {
"repo_name": "narry/odenos",
"path": "src/test/java/org/o3project/odenos/component/linklayerizer/LinkLayerizerTest.java",
"license": "apache-2.0",
"size": 127722
} | [
"org.hamcrest.CoreMatchers",
"org.junit.Assert"
] | import org.hamcrest.CoreMatchers; import org.junit.Assert; | import org.hamcrest.*; import org.junit.*; | [
"org.hamcrest",
"org.junit"
] | org.hamcrest; org.junit; | 1,904,102 |
public final void debug( final String message )
{
m_logger.log( Level.FINE, message );
} | final void function( final String message ) { m_logger.log( Level.FINE, message ); } | /**
* Log a debug message.
*
* @param message the message
*/ | Log a debug message | debug | {
"repo_name": "eva-xuyen/excalibur",
"path": "framework/impl/src/main/java/org/apache/avalon/framework/logger/Jdk14Logger.java",
"license": "apache-2.0",
"size": 6365
} | [
"java.util.logging.Level"
] | import java.util.logging.Level; | import java.util.logging.*; | [
"java.util"
] | java.util; | 303,058 |
public static long UNIXTIMESTAMP_SECONDS(ZonedDateTime date) {
validate(date, "UNIXTIMESTAMP_SECONDS");
return date.toEpochSecond();
} | static long function(ZonedDateTime date) { validate(date, STR); return date.toEpochSecond(); } | /**
* Converts a date to long -- unix timestamp in seconds.
*
* @param date to be converted to unix timestamp.
* @return unixtimestamp of the date.
*/ | Converts a date to long -- unix timestamp in seconds | UNIXTIMESTAMP_SECONDS | {
"repo_name": "hydrator/wrangler",
"path": "wrangler-core/src/main/java/io/cdap/functions/Dates.java",
"license": "apache-2.0",
"size": 8069
} | [
"java.time.ZonedDateTime"
] | import java.time.ZonedDateTime; | import java.time.*; | [
"java.time"
] | java.time; | 2,290,202 |
final List<Rule> rulesList = parsePattern();
mRules = rulesList.toArray(new Rule[rulesList.size()]);
int len = 0;
for (int i=mRules.length; --i >= 0; ) {
len += mRules[i].estimateLength();
}
mMaxLengthEstimate = len;
} | final List<Rule> rulesList = parsePattern(); mRules = rulesList.toArray(new Rule[rulesList.size()]); int len = 0; for (int i=mRules.length; --i >= 0; ) { len += mRules[i].estimateLength(); } mMaxLengthEstimate = len; } | /**
* <p>Initializes the instance for first use.</p>
*/ | Initializes the instance for first use | init | {
"repo_name": "rikles/commons-lang",
"path": "src/main/java/org/apache/commons/lang3/time/FastDatePrinter.java",
"license": "apache-2.0",
"size": 43550
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 1,548,241 |
public void deleteLocationFolder(final UnitLocationFolder unitLocationFolder, final String username) throws EnMeNoResultsFoundException{
final GeoPointFolder locationFolder = getLocationFolder(unitLocationFolder.getId(), username);
log.info("deleteLocationFolder locationFolder "+locationFolder);
... | void function(final UnitLocationFolder unitLocationFolder, final String username) throws EnMeNoResultsFoundException{ final GeoPointFolder locationFolder = getLocationFolder(unitLocationFolder.getId(), username); log.info(STR+locationFolder); if (locationFolder == null) { throw new EnMeNoResultsFoundException(STR); } e... | /**
* Delete Location Folder.
* @param unitLocationFolder
* @param username
* @throws EnMeExpcetion
*/ | Delete Location Folder | deleteLocationFolder | {
"repo_name": "cristiani/encuestame",
"path": "enme-business/src/main/java/org/encuestame/business/service/GeoLocationService.java",
"license": "apache-2.0",
"size": 30042
} | [
"java.util.List",
"org.encuestame.persistence.domain.GeoPoint",
"org.encuestame.persistence.domain.GeoPointFolder",
"org.encuestame.persistence.exception.EnMeNoResultsFoundException",
"org.encuestame.utils.web.UnitLocationFolder"
] | import java.util.List; import org.encuestame.persistence.domain.GeoPoint; import org.encuestame.persistence.domain.GeoPointFolder; import org.encuestame.persistence.exception.EnMeNoResultsFoundException; import org.encuestame.utils.web.UnitLocationFolder; | import java.util.*; import org.encuestame.persistence.domain.*; import org.encuestame.persistence.exception.*; import org.encuestame.utils.web.*; | [
"java.util",
"org.encuestame.persistence",
"org.encuestame.utils"
] | java.util; org.encuestame.persistence; org.encuestame.utils; | 265,009 |
void setLocalName(String name) {
this.name = DFSUtil.string2Bytes(name);
} | void setLocalName(String name) { this.name = DFSUtil.string2Bytes(name); } | /**
* Set local file name
*/ | Set local file name | setLocalName | {
"repo_name": "moreus/hadoop",
"path": "hadoop-0.23.10/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INode.java",
"license": "apache-2.0",
"size": 13513
} | [
"org.apache.hadoop.hdfs.DFSUtil"
] | import org.apache.hadoop.hdfs.DFSUtil; | import org.apache.hadoop.hdfs.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 2,404,893 |
public static String getAPIId(String apiContext, String apiVersion) throws NamingException, SQLException {
String apiId = null;
/// String sql = "select * from am_subscription";
Connection conn = null;
PreparedStatement ps = null;
ResultSet rs = null;
try {
... | static String function(String apiContext, String apiVersion) throws NamingException, SQLException { String apiId = null; Connection conn = null; PreparedStatement ps = null; ResultSet rs = null; try { String sql = STR; if(apiVersion != null){ sql += STR; } conn = getAMDBConnection(); ps = conn.prepareStatement(sql); ps... | /**
* Gets the API id.
*
* @param apiContext the api name
* @return the API id
* @throws NamingException the naming exception
* @throws SQLException the SQL exception
*/ | Gets the API id | getAPIId | {
"repo_name": "WSO2Telco/component-dep",
"path": "components/verification-handler/src/main/java/com/wso2telco/dep/verificationhandler/verifier/DatabaseUtils.java",
"license": "apache-2.0",
"size": 26531
} | [
"java.sql.Connection",
"java.sql.PreparedStatement",
"java.sql.ResultSet",
"java.sql.SQLException",
"javax.naming.NamingException",
"org.wso2.carbon.apimgt.impl.utils.APIMgtDBUtil"
] | import java.sql.Connection; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import javax.naming.NamingException; import org.wso2.carbon.apimgt.impl.utils.APIMgtDBUtil; | import java.sql.*; import javax.naming.*; import org.wso2.carbon.apimgt.impl.utils.*; | [
"java.sql",
"javax.naming",
"org.wso2.carbon"
] | java.sql; javax.naming; org.wso2.carbon; | 2,077,471 |
private void delete(AbstractUser[] users, boolean finalRun) throws StorageException {
if (users != null && users.length > 0) {
// Just delegate this to the insert(AbstractUser, false) method.
for (AbstractUser user : users) {
delete(user, false);
}
}
} | void function(AbstractUser[] users, boolean finalRun) throws StorageException { if (users != null && users.length > 0) { for (AbstractUser user : users) { delete(user, false); } } } | /**
* This method is called by the public delete(AbstractUser[]) method. It
* tries to create the table needed to store the data object if it doesn't
* already exist. However, it will only try once. If it doesn't succeed on
* its first try, it will stop trying by throwing an exception.
*
* @param users The... | This method is called by the public delete(AbstractUser[]) method. It tries to create the table needed to store the data object if it doesn't already exist. However, it will only try once. If it doesn't succeed on its first try, it will stop trying by throwing an exception | delete | {
"repo_name": "iotap-center/elis-platform",
"path": "Elis user and persistent storage service implementations/src/main/java/se/mah/elis/impl/services/storage/StorageImpl.java",
"license": "mit",
"size": 63812
} | [
"se.mah.elis.services.storage.exceptions.StorageException",
"se.mah.elis.services.users.AbstractUser"
] | import se.mah.elis.services.storage.exceptions.StorageException; import se.mah.elis.services.users.AbstractUser; | import se.mah.elis.services.storage.exceptions.*; import se.mah.elis.services.users.*; | [
"se.mah.elis"
] | se.mah.elis; | 1,427,015 |
public final void addProperty(String name, String defaultValue, String caption,
String editorType, String[] editorArgs, PropertyEditor editor) {
int type = EditableProperty.TYPE_NORMAL;
if (!isPropertyPersisted(name)) {
type |= EditableProperty.TYPE_NONPERSISTED;
}
if (!isPropertyVisible(... | final void function(String name, String defaultValue, String caption, String editorType, String[] editorArgs, PropertyEditor editor) { int type = EditableProperty.TYPE_NORMAL; if (!isPropertyPersisted(name)) { type = EditableProperty.TYPE_NONPERSISTED; } if (!isPropertyVisible(name)) { type = EditableProperty.TYPE_INVI... | /**
* Adds a new property for the component.
*
* @param name property name
* @param defaultValue default value of property
* @param caption property's caption for use in the ui
* @param editorType editor type for the property
* @param editorArgs additional editor arguments
* @param editor ... | Adds a new property for the component | addProperty | {
"repo_name": "ewpatton/appinventor-sources",
"path": "appinventor/appengine/src/com/google/appinventor/client/editor/simple/components/MockComponent.java",
"license": "apache-2.0",
"size": 41403
} | [
"com.google.appinventor.client.widgets.properties.EditableProperty",
"com.google.appinventor.client.widgets.properties.PropertyEditor"
] | import com.google.appinventor.client.widgets.properties.EditableProperty; import com.google.appinventor.client.widgets.properties.PropertyEditor; | import com.google.appinventor.client.widgets.properties.*; | [
"com.google.appinventor"
] | com.google.appinventor; | 2,422,405 |
public Date getEffective (); | Date function (); | /**
* Gets that date that this <code>IPermission</code> should become effective on.
* @return date that this <code>IPermission</code> should become effective on
*/ | Gets that date that this <code>IPermission</code> should become effective on | getEffective | {
"repo_name": "MichaelVose2/uPortal",
"path": "uportal-war/src/main/java/org/apereo/portal/security/IPermission.java",
"license": "apache-2.0",
"size": 8023
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 1,586,222 |
@Override
public void readExternal(final ObjectInput in)
throws IOException, ClassNotFoundException {
// read the base class
final double t = readBaseExternal(in);
if (currentState == null) {
currentDerivative = null;
} else {
currentDerivative = new double[currentState.length... | void function(final ObjectInput in) throws IOException, ClassNotFoundException { final double t = readBaseExternal(in); if (currentState == null) { currentDerivative = null; } else { currentDerivative = new double[currentState.length]; for (int i = 0; i < currentDerivative.length; ++i) { currentDerivative[i] = in.readD... | /** Read the instance from an input channel.
* @param in input channel
* @exception IOException if the instance cannot be read
*/ | Read the instance from an input channel | readExternal | {
"repo_name": "cesarramirez/GearVRf",
"path": "GVRf/Framework/contrib/commons-math3-3.2-src/src/test/java/org/apache/commons/math3/ode/sampling/DummyStepInterpolator.java",
"license": "apache-2.0",
"size": 5428
} | [
"java.io.IOException",
"java.io.ObjectInput"
] | import java.io.IOException; import java.io.ObjectInput; | import java.io.*; | [
"java.io"
] | java.io; | 265,693 |
public Symbol getSymbolDeclaredBy(FunctionType fn) {
Preconditions.checkState(fn.isConstructor() || fn.isInterface());
ObjectType instanceType = fn.getInstanceType();
String name = instanceType.getReferenceName();
if (name == null || globalScope == null) {
return null;
}
Node source = f... | Symbol function(FunctionType fn) { Preconditions.checkState(fn.isConstructor() fn.isInterface()); ObjectType instanceType = fn.getInstanceType(); String name = instanceType.getReferenceName(); if (name == null globalScope == null) { return null; } Node source = fn.getSource(); return (source == null ? globalScope : get... | /**
* Gets the symbol for the given constuctor or interface.
*/ | Gets the symbol for the given constuctor or interface | getSymbolDeclaredBy | {
"repo_name": "Dandandan/wikiprogramming",
"path": "jsrepl/tools/closure-compiler/trunk/src/com/google/javascript/jscomp/SymbolTable.java",
"license": "mit",
"size": 30515
} | [
"com.google.common.base.Preconditions",
"com.google.javascript.rhino.Node",
"com.google.javascript.rhino.jstype.FunctionType",
"com.google.javascript.rhino.jstype.ObjectType"
] | import com.google.common.base.Preconditions; import com.google.javascript.rhino.Node; import com.google.javascript.rhino.jstype.FunctionType; import com.google.javascript.rhino.jstype.ObjectType; | import com.google.common.base.*; import com.google.javascript.rhino.*; import com.google.javascript.rhino.jstype.*; | [
"com.google.common",
"com.google.javascript"
] | com.google.common; com.google.javascript; | 171,358 |
@Test
public void testPoint2fConstructor()
{
final Point3f v = new ImmutablePoint3f(new MutablePoint2f(3, 2));
assertEquals(3, v.x, 0.001f);
assertEquals(2, v.y, 0.001f);
assertEquals(0, v.z, 0.001f);
} | void function() { final Point3f v = new ImmutablePoint3f(new MutablePoint2f(3, 2)); assertEquals(3, v.x, 0.001f); assertEquals(2, v.y, 0.001f); assertEquals(0, v.z, 0.001f); } | /**
* Tests the constructor with a Point2f argument.
*/ | Tests the constructor with a Point2f argument | testPoint2fConstructor | {
"repo_name": "kayahr/gramath",
"path": "src/test/java/de/ailis/gramath/ImmutablePoint3fTest.java",
"license": "mit",
"size": 3908
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 1,237,796 |
private Node generateNarrativeItem(MeasureExport me,
XmlProcessor humanReadableProcessor, String searchText)
throws XPathExpressionException {
Node dataCritItemNode = me.getHQMFXmlProcessor().getOriginalDoc().createElement("item");
Node dataCritContentNode = me.getHQMFXmlProcessor().getOriginalDoc().crea... | Node function(MeasureExport me, XmlProcessor humanReadableProcessor, String searchText) throws XPathExpressionException { Node dataCritItemNode = me.getHQMFXmlProcessor().getOriginalDoc().createElement("item"); Node dataCritContentNode = me.getHQMFXmlProcessor().getOriginalDoc().createElement(STR); ((Element)dataCritCo... | /**
* Generate narrative item.
*
* @param me the me
* @param humanReadableProcessor the human readable processor
* @param searchText the search text
* @return the node
* @throws XPathExpressionException the x path expression exception
*/ | Generate narrative item | generateNarrativeItem | {
"repo_name": "MeasureAuthoringTool/MeasureAuthoringTool_LatestSprint",
"path": "mat/src/main/java/mat/server/hqmf/qdm/HQMFGenerator.java",
"license": "cc0-1.0",
"size": 15464
} | [
"javax.xml.xpath.XPathExpressionException",
"org.w3c.dom.Element",
"org.w3c.dom.Node"
] | import javax.xml.xpath.XPathExpressionException; import org.w3c.dom.Element; import org.w3c.dom.Node; | import javax.xml.xpath.*; import org.w3c.dom.*; | [
"javax.xml",
"org.w3c.dom"
] | javax.xml; org.w3c.dom; | 2,343,557 |
@Query("select o from Antique o where o.type.id =:type")
public Page<Antique> searchByType(@Param("type") int type, Pageable pageable); | @Query(STR) Page<Antique> function(@Param("type") int type, Pageable pageable); | /**
* search by Object
*/ | search by Object | searchByType | {
"repo_name": "psyco4j/asdf",
"path": "src/main/java/psyco/repository/AntiqueRepository.java",
"license": "gpl-2.0",
"size": 4560
} | [
"org.springframework.data.domain.Page",
"org.springframework.data.domain.Pageable",
"org.springframework.data.jpa.repository.Query",
"org.springframework.data.repository.query.Param"
] | import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; | import org.springframework.data.domain.*; import org.springframework.data.jpa.repository.*; import org.springframework.data.repository.query.*; | [
"org.springframework.data"
] | org.springframework.data; | 197,207 |
public void registerMetrics(MetricRegistry metricRegistry) {
if (id() != null) {
metricName = MetricRegistry.name(Pipeline.class, id(), "executed");
executed = metricRegistry.meter(metricName);
}
} | void function(MetricRegistry metricRegistry) { if (id() != null) { metricName = MetricRegistry.name(Pipeline.class, id(), STR); executed = metricRegistry.meter(metricName); } } | /**
* Register the metrics attached to this pipeline.
*
* @param metricRegistry the registry to add the metrics to
*/ | Register the metrics attached to this pipeline | registerMetrics | {
"repo_name": "Graylog2/graylog2-server",
"path": "graylog2-server/src/main/java/org/graylog/plugins/pipelineprocessor/ast/Pipeline.java",
"license": "gpl-3.0",
"size": 3097
} | [
"com.codahale.metrics.MetricRegistry"
] | import com.codahale.metrics.MetricRegistry; | import com.codahale.metrics.*; | [
"com.codahale.metrics"
] | com.codahale.metrics; | 1,130,122 |
public static GetSnapshotsRequest getSnapshotsRequest(String... repositories) {
return new GetSnapshotsRequest(repositories);
} | static GetSnapshotsRequest function(String... repositories) { return new GetSnapshotsRequest(repositories); } | /**
* Gets snapshots from repositories
*
* @param repositories repository names
* @return get snapshot request
*/ | Gets snapshots from repositories | getSnapshotsRequest | {
"repo_name": "nknize/elasticsearch",
"path": "server/src/main/java/org/elasticsearch/client/Requests.java",
"license": "apache-2.0",
"size": 19767
} | [
"org.elasticsearch.action.admin.cluster.snapshots.get.GetSnapshotsRequest"
] | import org.elasticsearch.action.admin.cluster.snapshots.get.GetSnapshotsRequest; | import org.elasticsearch.action.admin.cluster.snapshots.get.*; | [
"org.elasticsearch.action"
] | org.elasticsearch.action; | 2,267,383 |
public static TimelineMetricAggregator createTimelineClusterAggregatorMinute(
PhoenixHBaseAccessor hBaseAccessor, Configuration metricsConf,
MetricCollectorHAController haController) {
String checkpointDir = metricsConf.get(
TIMELINE_METRICS_AGGREGATOR_CHECKPOINT_DIR, DEFAULT_CHECKPOINT_LOCATION);
... | static TimelineMetricAggregator function( PhoenixHBaseAccessor hBaseAccessor, Configuration metricsConf, MetricCollectorHAController haController) { String checkpointDir = metricsConf.get( TIMELINE_METRICS_AGGREGATOR_CHECKPOINT_DIR, DEFAULT_CHECKPOINT_LOCATION); String checkpointLocation = FilenameUtils.concat(checkpoi... | /**
* Minute aggregation for cluster.
* Interval : 5 mins
*/ | Minute aggregation for cluster. Interval : 5 mins | createTimelineClusterAggregatorMinute | {
"repo_name": "arenadata/ambari",
"path": "ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/aggregators/TimelineMetricAggregatorFactory.java",
"license": "apache-2.0",
"size": 21043
} | [
"java.util.concurrent.TimeUnit",
"org.apache.commons.io.FilenameUtils",
"org.apache.hadoop.conf.Configuration",
"org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.PhoenixHBaseAccessor",
"org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.availability.MetricCollec... | import java.util.concurrent.TimeUnit; import org.apache.commons.io.FilenameUtils; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.PhoenixHBaseAccessor; import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.availabilit... | import java.util.concurrent.*; import org.apache.commons.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.*; import org.apache.hadoop.yarn.server.applicationhistoryservice.metrics.timeline.availability.*; | [
"java.util",
"org.apache.commons",
"org.apache.hadoop"
] | java.util; org.apache.commons; org.apache.hadoop; | 433,902 |
public KualiDecimal getLetterOfCreditAmount() {
return letterOfCreditAmount;
} | KualiDecimal function() { return letterOfCreditAmount; } | /**
* Gets the letterOfCreditAmount attribute.
*
* @return Returns the letterOfCreditAmount.
*/ | Gets the letterOfCreditAmount attribute | getLetterOfCreditAmount | {
"repo_name": "quikkian-ua-devops/will-financials",
"path": "kfs-ar/src/main/java/org/kuali/kfs/module/ar/businessobject/ContractsGrantsLetterOfCreditReviewDetail.java",
"license": "agpl-3.0",
"size": 14511
} | [
"org.kuali.rice.core.api.util.type.KualiDecimal"
] | import org.kuali.rice.core.api.util.type.KualiDecimal; | import org.kuali.rice.core.api.util.type.*; | [
"org.kuali.rice"
] | org.kuali.rice; | 2,136,188 |
public List<FrameworkMethod> getAnnotatedMethods() {
List<FrameworkMethod> methods = collectValues(fMethodsForAnnotations);
Collections.sort(methods, METHOD_COMPARATOR);
return methods;
} | List<FrameworkMethod> function() { List<FrameworkMethod> methods = collectValues(fMethodsForAnnotations); Collections.sort(methods, METHOD_COMPARATOR); return methods; } | /**
* Returns, efficiently, all the non-overridden methods in this class and
* its superclasses that are annotated}.
*
* @since 4.12
*/ | Returns, efficiently, all the non-overridden methods in this class and its superclasses that are annotated} | getAnnotatedMethods | {
"repo_name": "1974kpkpkp/junit",
"path": "src/main/java/org/junit/runners/model/TestClass.java",
"license": "epl-1.0",
"size": 10797
} | [
"java.util.Collections",
"java.util.List"
] | import java.util.Collections; import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 506,597 |
public void startUndoTimer(long timeout) {
stopUndoTimer();
this.mUndoTimer = new Timer();
this.mUndoTimer.schedule(new UndoTimer(), timeout > 0 ? timeout : UNDO_TIMEOUT);
} | void function(long timeout) { stopUndoTimer(); this.mUndoTimer = new Timer(); this.mUndoTimer.schedule(new UndoTimer(), timeout > 0 ? timeout : UNDO_TIMEOUT); } | /**
* Start Undo timer with custom timeout
*
* @param timeout
*/ | Start Undo timer with custom timeout | startUndoTimer | {
"repo_name": "taimur97/FlexibleAdapter",
"path": "flexibleAdapter/src/main/java/eu/davidea/common/FlexibleAdapter.java",
"license": "apache-2.0",
"size": 6940
} | [
"java.util.Timer"
] | import java.util.Timer; | import java.util.*; | [
"java.util"
] | java.util; | 2,453 |
public static ImmutableByteSequence copyFrom(byte[] original) {
checkArgument(original != null && original.length > 0,
"Cannot copy from an empty or null array");
return new ImmutableByteSequence(
ByteBuffer.allocate(original.length).put(original));
} | static ImmutableByteSequence function(byte[] original) { checkArgument(original != null && original.length > 0, STR); return new ImmutableByteSequence( ByteBuffer.allocate(original.length).put(original)); } | /**
* Creates a new immutable byte sequence with the same content and order of
* the passed byte array.
*
* @param original a byte array value
* @return a new immutable byte sequence
*/ | Creates a new immutable byte sequence with the same content and order of the passed byte array | copyFrom | {
"repo_name": "kuujo/onos",
"path": "utils/misc/src/main/java/org/onlab/util/ImmutableByteSequence.java",
"license": "apache-2.0",
"size": 17149
} | [
"com.google.common.base.Preconditions",
"java.nio.ByteBuffer"
] | import com.google.common.base.Preconditions; import java.nio.ByteBuffer; | import com.google.common.base.*; import java.nio.*; | [
"com.google.common",
"java.nio"
] | com.google.common; java.nio; | 2,222,341 |
@RequestMapping(value = "/{id}/delete", method = RequestMethod.GET)
public String deleteProject(@PathVariable("id") Long projectId, ModelMap model, RedirectAttributes redirectAttributes) {
Project project = projectService.getProject(projectId);
UserAccount user = (UserAccount) model.get(CURRENT_USER);
if (p... | @RequestMapping(value = STR, method = RequestMethod.GET) String function(@PathVariable("id") Long projectId, ModelMap model, RedirectAttributes redirectAttributes) { Project project = projectService.getProject(projectId); UserAccount user = (UserAccount) model.get(CURRENT_USER); if (project.isDeletable(user)) { project... | /**
* delete the project with the ID.
*
* @param projectId
* @param model
* @param redirectAttributes
* @return {@value #USER_PROFILE_REDIRECT} if successful, {@value #SHOW_PROJECTS_REDIRECT}/{projectId} otherwise
*/ | delete the project with the ID | deleteProject | {
"repo_name": "jereh16/bankroll",
"path": "src/main/java/de/rehpoehler/project/controller/ProjectsController.java",
"license": "gpl-3.0",
"size": 4934
} | [
"de.rehpoehler.mvc.AlertMessage",
"de.rehpoehler.project.model.Project",
"de.rehpoehler.user.model.UserAccount",
"org.springframework.security.access.AccessDeniedException",
"org.springframework.ui.ModelMap",
"org.springframework.web.bind.annotation.PathVariable",
"org.springframework.web.bind.annotatio... | import de.rehpoehler.mvc.AlertMessage; import de.rehpoehler.project.model.Project; import de.rehpoehler.user.model.UserAccount; import org.springframework.security.access.AccessDeniedException; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.PathVariable; import org.springframewor... | import de.rehpoehler.mvc.*; import de.rehpoehler.project.model.*; import de.rehpoehler.user.model.*; import org.springframework.security.access.*; import org.springframework.ui.*; import org.springframework.web.bind.annotation.*; import org.springframework.web.servlet.mvc.support.*; | [
"de.rehpoehler.mvc",
"de.rehpoehler.project",
"de.rehpoehler.user",
"org.springframework.security",
"org.springframework.ui",
"org.springframework.web"
] | de.rehpoehler.mvc; de.rehpoehler.project; de.rehpoehler.user; org.springframework.security; org.springframework.ui; org.springframework.web; | 1,631,561 |
public static String getString(DatagramPacket pack) {
return new String(pack.getData());
} | static String function(DatagramPacket pack) { return new String(pack.getData()); } | /**
* Gets the package data as a string.
* @param pack is a Java DatagramPacket object.
* @return A string with the packets data.
*/ | Gets the package data as a string | getString | {
"repo_name": "ic9/ic9",
"path": "src/com/lehman/ic9/net/udpPacket.java",
"license": "apache-2.0",
"size": 5112
} | [
"java.net.DatagramPacket"
] | import java.net.DatagramPacket; | import java.net.*; | [
"java.net"
] | java.net; | 1,567,607 |
DocumentSnapshot snapshot = position.getSnapshot();
Document document = snapshot.getVersionedDocument().getDocument();
if (!(document instanceof BaseDocument)) {
return null;
}
BaseDocument baseDocument = (BaseDocument)document;
SnapshotPosition idStart = getWordSta... | DocumentSnapshot snapshot = position.getSnapshot(); Document document = snapshot.getVersionedDocument().getDocument(); if (!(document instanceof BaseDocument)) { return null; } BaseDocument baseDocument = (BaseDocument)document; SnapshotPosition idStart = getWordStart(position); if (idStart != null) { SnapshotPosition ... | /** Get the identifier around the given position or null if there's no identifier
* around the given position. The identifier must be
* accepted by SyntaxSupport.isIdnetifier() otherwise null is returned.
* @param position position in document - usually the caret.getDot()
* @return the block (starting a... | Get the identifier around the given position or null if there's no identifier around the given position. The identifier must be accepted by SyntaxSupport.isIdnetifier() otherwise null is returned | getIdentifierBlock | {
"repo_name": "tunnelvisionlabs/antlrworks2",
"path": "org-antlr-netbeans/src/org/antlr/netbeans/editor/text/DocumentTextUtilities.java",
"license": "gpl-2.0",
"size": 18039
} | [
"javax.swing.text.Document",
"org.netbeans.editor.BaseDocument"
] | import javax.swing.text.Document; import org.netbeans.editor.BaseDocument; | import javax.swing.text.*; import org.netbeans.editor.*; | [
"javax.swing",
"org.netbeans.editor"
] | javax.swing; org.netbeans.editor; | 2,812,070 |
public static void initTableMapperJob(byte[] table, Scan scan,
Class<? extends TableMapper> mapper,
Class<?> outputKeyClass,
Class<?> outputValueClass, Job job)
throws IOException {
initTableMapperJob(Bytes.toString(table), scan, mapper, outputKeyClass, outputValueClass,
job, ... | static void function(byte[] table, Scan scan, Class<? extends TableMapper> mapper, Class<?> outputKeyClass, Class<?> outputValueClass, Job job) throws IOException { initTableMapperJob(Bytes.toString(table), scan, mapper, outputKeyClass, outputValueClass, job, true); } | /**
* Use this before submitting a TableMap job. It will appropriately set up
* the job.
*
* @param table Binary representation of the table name to read from.
* @param scan The scan instance with the columns, time range etc.
* @param mapper The mapper class to use.
* @param outputKeyClass The c... | Use this before submitting a TableMap job. It will appropriately set up the job | initTableMapperJob | {
"repo_name": "ChinmaySKulkarni/hbase",
"path": "hbase-mapreduce/src/main/java/org/apache/hadoop/hbase/mapreduce/TableMapReduceUtil.java",
"license": "apache-2.0",
"size": 45625
} | [
"java.io.IOException",
"org.apache.hadoop.hbase.client.Scan",
"org.apache.hadoop.hbase.util.Bytes",
"org.apache.hadoop.mapreduce.Job"
] | import java.io.IOException; import org.apache.hadoop.hbase.client.Scan; import org.apache.hadoop.hbase.util.Bytes; import org.apache.hadoop.mapreduce.Job; | import java.io.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.util.*; import org.apache.hadoop.mapreduce.*; | [
"java.io",
"org.apache.hadoop"
] | java.io; org.apache.hadoop; | 492,431 |
public void testGetModifyStyleSheet( ) throws AccessDeniedException
{
MockHttpServletRequest request = new MockHttpServletRequest( );
request.addParameter( Parameters.STYLESHEET_ID, Integer.toString( stylesheet.getId( ) ) );
Utils.registerAdminUserWithRigth( request, new AdminUser( ), St... | void function( ) throws AccessDeniedException { MockHttpServletRequest request = new MockHttpServletRequest( ); request.addParameter( Parameters.STYLESHEET_ID, Integer.toString( stylesheet.getId( ) ) ); Utils.registerAdminUserWithRigth( request, new AdminUser( ), StyleSheetJspBean.RIGHT_MANAGE_STYLESHEET ); instance.in... | /**
* Test of getModifyStyleSheet method, of class fr.paris.lutece.portal.web.stylesheet.StyleSheetJspBean.
*/ | Test of getModifyStyleSheet method, of class fr.paris.lutece.portal.web.stylesheet.StyleSheetJspBean | testGetModifyStyleSheet | {
"repo_name": "lutece-platform/lutece-core",
"path": "src/test/java/fr/paris/lutece/portal/web/stylesheet/StyleSheetJspBeanTest.java",
"license": "bsd-3-clause",
"size": 21020
} | [
"fr.paris.lutece.portal.business.user.AdminUser",
"fr.paris.lutece.portal.service.admin.AccessDeniedException",
"fr.paris.lutece.portal.web.constants.Parameters",
"fr.paris.lutece.test.Utils",
"org.springframework.mock.web.MockHttpServletRequest"
] | import fr.paris.lutece.portal.business.user.AdminUser; import fr.paris.lutece.portal.service.admin.AccessDeniedException; import fr.paris.lutece.portal.web.constants.Parameters; import fr.paris.lutece.test.Utils; import org.springframework.mock.web.MockHttpServletRequest; | import fr.paris.lutece.portal.business.user.*; import fr.paris.lutece.portal.service.admin.*; import fr.paris.lutece.portal.web.constants.*; import fr.paris.lutece.test.*; import org.springframework.mock.web.*; | [
"fr.paris.lutece",
"org.springframework.mock"
] | fr.paris.lutece; org.springframework.mock; | 507,919 |
public void removeControllerType(GVRControllerType controllerType)
{
if (cursorControllerTypes != null)
{
cursorControllerTypes.remove(controllerType);
}
} | void function(GVRControllerType controllerType) { if (cursorControllerTypes != null) { cursorControllerTypes.remove(controllerType); } } | /**
* Disable the use of the given controller type by
* removing it from the cursor controller types list.
* @param controllerType GVRControllerType to remove from the list
*/ | Disable the use of the given controller type by removing it from the cursor controller types list | removeControllerType | {
"repo_name": "Samsung/GearVRf",
"path": "GVRf/Framework/framework/src/main/java/org/gearvrf/utility/VrAppSettings.java",
"license": "apache-2.0",
"size": 23783
} | [
"org.gearvrf.io.GVRControllerType"
] | import org.gearvrf.io.GVRControllerType; | import org.gearvrf.io.*; | [
"org.gearvrf.io"
] | org.gearvrf.io; | 484,136 |
public List<Vertex> parseMAP(String code, String name, boolean pin, Network memory) {
try {
List<Vertex> values = new ArrayList<Vertex>();
TextStream stream = new TextStream(code);
Vertex map = memory.createVertex(new Primitive(name));
while (!stream.atEnd()) {
String token = stream.nextWord();
... | List<Vertex> function(String code, String name, boolean pin, Network memory) { try { List<Vertex> values = new ArrayList<Vertex>(); TextStream stream = new TextStream(code); Vertex map = memory.createVertex(new Primitive(name)); while (!stream.atEnd()) { String token = stream.nextWord(); if (!"[".equals(token)) { throw... | /**
* Parse the AIML .map file.
* i.e.
* [["Canada", "Ottawa"], ["USA", "Washington"]]
*/ | Parse the AIML .map file. i.e. [["Canada", "Ottawa"], ["USA", "Washington"]] | parseMAP | {
"repo_name": "BOTlibre/BOTlibre",
"path": "ai-engine/source/org/botlibre/aiml/AIMLParser.java",
"license": "epl-1.0",
"size": 66448
} | [
"java.util.ArrayList",
"java.util.List",
"org.botlibre.BotException",
"org.botlibre.api.knowledge.Network",
"org.botlibre.api.knowledge.Vertex",
"org.botlibre.knowledge.Primitive",
"org.botlibre.self.SelfParseException",
"org.botlibre.thought.language.Language",
"org.botlibre.util.TextStream"
] | import java.util.ArrayList; import java.util.List; import org.botlibre.BotException; import org.botlibre.api.knowledge.Network; import org.botlibre.api.knowledge.Vertex; import org.botlibre.knowledge.Primitive; import org.botlibre.self.SelfParseException; import org.botlibre.thought.language.Language; import org.botlib... | import java.util.*; import org.botlibre.*; import org.botlibre.api.knowledge.*; import org.botlibre.knowledge.*; import org.botlibre.self.*; import org.botlibre.thought.language.*; import org.botlibre.util.*; | [
"java.util",
"org.botlibre",
"org.botlibre.api",
"org.botlibre.knowledge",
"org.botlibre.self",
"org.botlibre.thought",
"org.botlibre.util"
] | java.util; org.botlibre; org.botlibre.api; org.botlibre.knowledge; org.botlibre.self; org.botlibre.thought; org.botlibre.util; | 2,635,455 |
public T sql(String text) {
return expression(new SqlExpression(text));
} | T function(String text) { return expression(new SqlExpression(text)); } | /**
* Evaluates an <a href="http://camel.apache.org/sql.html">SQL
* expression</a>
*
* @param text the expression to be evaluated
* @return the builder to continue processing the DSL
*/ | Evaluates an SQL expression | sql | {
"repo_name": "engagepoint/camel",
"path": "camel-core/src/main/java/org/apache/camel/builder/ExpressionClauseSupport.java",
"license": "apache-2.0",
"size": 26802
} | [
"org.apache.camel.model.language.SqlExpression"
] | import org.apache.camel.model.language.SqlExpression; | import org.apache.camel.model.language.*; | [
"org.apache.camel"
] | org.apache.camel; | 1,179,579 |
public static MozuClient publishDraftsClient(com.mozu.api.DataViewMode dataViewMode, com.mozu.api.contracts.productadmin.PublishingScope publishScope) throws Exception
{
MozuUrl url = com.mozu.api.urls.commerce.catalog.admin.PublishingScopeUrl.publishDraftsUrl();
String verb = "POST";
MozuClient mozuClient ... | static MozuClient function(com.mozu.api.DataViewMode dataViewMode, com.mozu.api.contracts.productadmin.PublishingScope publishScope) throws Exception { MozuUrl url = com.mozu.api.urls.commerce.catalog.admin.PublishingScopeUrl.publishDraftsUrl(); String verb = "POST"; MozuClient mozuClient = (MozuClient) MozuClientFacto... | /**
* Publishes the draft version of product changes for each product code specified in the request, and changes the product publish state to "live".
* <p><pre><code>
* MozuClient mozuClient=PublishDraftsClient(dataViewMode, publishScope);
* client.setBaseAddress(url);
* client.executeRequest();
* </code><... | Publishes the draft version of product changes for each product code specified in the request, and changes the product publish state to "live". <code><code> MozuClient mozuClient=PublishDraftsClient(dataViewMode, publishScope); client.setBaseAddress(url); client.executeRequest(); </code></code> | publishDraftsClient | {
"repo_name": "bhewett/mozu-java",
"path": "mozu-javaasync-core/src/main/java/com/mozu/api/clients/commerce/catalog/admin/PublishingScopeClient.java",
"license": "mit",
"size": 12009
} | [
"com.mozu.api.DataViewMode",
"com.mozu.api.Headers",
"com.mozu.api.MozuClient",
"com.mozu.api.MozuClientFactory",
"com.mozu.api.MozuUrl"
] | import com.mozu.api.DataViewMode; import com.mozu.api.Headers; import com.mozu.api.MozuClient; import com.mozu.api.MozuClientFactory; import com.mozu.api.MozuUrl; | import com.mozu.api.*; | [
"com.mozu.api"
] | com.mozu.api; | 2,027,956 |
EAttribute getReturnType_Multiplicity(); | EAttribute getReturnType_Multiplicity(); | /**
* Returns the meta object for the attribute '{@link org.eclipse.vorto.core.api.model.functionblock.ReturnType#isMultiplicity <em>Multiplicity</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Multiplicity</em>'.
* @see org.eclipse.vorto.core.api.mod... | Returns the meta object for the attribute '<code>org.eclipse.vorto.core.api.model.functionblock.ReturnType#isMultiplicity Multiplicity</code>'. | getReturnType_Multiplicity | {
"repo_name": "erlemantos/eclipse-vorto",
"path": "bundles/org.eclipse.vorto.core/src/org/eclipse/vorto/core/api/model/functionblock/FunctionblockPackage.java",
"license": "epl-1.0",
"size": 46007
} | [
"org.eclipse.emf.ecore.EAttribute"
] | import org.eclipse.emf.ecore.EAttribute; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 892,286 |
public void randomTick(World worldIn, BlockPos pos, IBlockState state, Random random)
{
} | void function(World worldIn, BlockPos pos, IBlockState state, Random random) { } | /**
* Called randomly when setTickRandomly is set to true (used by e.g. crops to grow, etc.)
*/ | Called randomly when setTickRandomly is set to true (used by e.g. crops to grow, etc.) | randomTick | {
"repo_name": "tomtomtom09/CampCraft",
"path": "build/tmp/recompileMc/sources/net/minecraft/block/BlockTripWire.java",
"license": "gpl-3.0",
"size": 10668
} | [
"java.util.Random",
"net.minecraft.block.state.IBlockState",
"net.minecraft.util.BlockPos",
"net.minecraft.world.World"
] | import java.util.Random; import net.minecraft.block.state.IBlockState; import net.minecraft.util.BlockPos; import net.minecraft.world.World; | import java.util.*; import net.minecraft.block.state.*; import net.minecraft.util.*; import net.minecraft.world.*; | [
"java.util",
"net.minecraft.block",
"net.minecraft.util",
"net.minecraft.world"
] | java.util; net.minecraft.block; net.minecraft.util; net.minecraft.world; | 1,328,925 |
public void assertStartsWith(AssertionInfo info, long[] actual, long[] sequence) {
arrays.assertStartsWith(info, failures, actual, sequence);
} | void function(AssertionInfo info, long[] actual, long[] sequence) { arrays.assertStartsWith(info, failures, actual, sequence); } | /**
* Verifies that the given array starts with the given sequence of values, without any other values between them.
* Similar to <code>{@link #assertContainsSequence(AssertionInfo, long[], long[])}</code>, but it also verifies
* that the first element in the sequence is also the first element of the given arr... | Verifies that the given array starts with the given sequence of values, without any other values between them. Similar to <code><code>#assertContainsSequence(AssertionInfo, long[], long[])</code></code>, but it also verifies that the first element in the sequence is also the first element of the given array | assertStartsWith | {
"repo_name": "nicstrong/fest-assertions-android",
"path": "fest-assert-android/src/main/java/org/fest/assertions/internal/LongArrays.java",
"license": "apache-2.0",
"size": 10095
} | [
"org.fest.assertions.core.AssertionInfo"
] | import org.fest.assertions.core.AssertionInfo; | import org.fest.assertions.core.*; | [
"org.fest.assertions"
] | org.fest.assertions; | 564,295 |
public void startHTTPServer() {
try {
synchronized (serverMonitor) {
server.start();
}
} catch (IOException e) {
e.printStackTrace();
}
} | void function() { try { synchronized (serverMonitor) { server.start(); } } catch (IOException e) { e.printStackTrace(); } } | /**
* Starts the http server
*/ | Starts the http server | startHTTPServer | {
"repo_name": "Blaubot/Blaubot",
"path": "examples/blaubot-cam-server/src/main/java/eu/hgross/blaubot/blaubotcam/server/service/IPCamServer.java",
"license": "mit",
"size": 16851
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 1,923,939 |
public void primitivePaint(Graphics2D g2d) {
if (backgroundPaint != null) {
g2d.setPaint(backgroundPaint);
g2d.fill(g2d.getClip()); // Fast paint for huge background area
}
super.primitivePaint(g2d);
} | void function(Graphics2D g2d) { if (backgroundPaint != null) { g2d.setPaint(backgroundPaint); g2d.fill(g2d.getClip()); } super.primitivePaint(g2d); } | /**
* Paints this node without applying Filter, Mask, Composite, and clip.
*
* @param g2d the Graphics2D to use
*/ | Paints this node without applying Filter, Mask, Composite, and clip | primitivePaint | {
"repo_name": "srnsw/xena",
"path": "plugins/image/ext/src/batik-1.7/sources/org/apache/batik/gvt/CanvasGraphicsNode.java",
"license": "gpl-3.0",
"size": 5153
} | [
"java.awt.Graphics2D"
] | import java.awt.Graphics2D; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,282,578 |
Stream<PortDescription> getPortDescriptions(ProviderId providerId, DeviceId deviceId); | Stream<PortDescription> getPortDescriptions(ProviderId providerId, DeviceId deviceId); | /**
* Returns the stream of port descriptions that belong to the specified device.
*
* @param providerId provider identifier
* @param deviceId device identifier
* @return stream of device portdescriptions
*/ | Returns the stream of port descriptions that belong to the specified device | getPortDescriptions | {
"repo_name": "oplinkoms/onos",
"path": "core/api/src/main/java/org/onosproject/net/device/DeviceStore.java",
"license": "apache-2.0",
"size": 7498
} | [
"java.util.stream.Stream",
"org.onosproject.net.DeviceId",
"org.onosproject.net.provider.ProviderId"
] | import java.util.stream.Stream; import org.onosproject.net.DeviceId; import org.onosproject.net.provider.ProviderId; | import java.util.stream.*; import org.onosproject.net.*; import org.onosproject.net.provider.*; | [
"java.util",
"org.onosproject.net"
] | java.util; org.onosproject.net; | 1,728,374 |
public Execution getExecution() {
return associationManager.getExecution();
} | Execution function() { return associationManager.getExecution(); } | /**
* Returns the currently associated execution or 'null'
*/ | Returns the currently associated execution or 'null' | getExecution | {
"repo_name": "stephraleigh/flowable-engine",
"path": "modules/flowable-cdi/src/main/java/org/flowable/cdi/BusinessProcess.java",
"license": "apache-2.0",
"size": 20159
} | [
"org.flowable.engine.runtime.Execution"
] | import org.flowable.engine.runtime.Execution; | import org.flowable.engine.runtime.*; | [
"org.flowable.engine"
] | org.flowable.engine; | 1,752,664 |
public final String getValue()
{
if (NO_RAW_INPUT.equals(rawInput))
{
return getModelValue();
}
else
{
if (getEscapeModelStrings() && rawInput != null)
{
return Strings.escapeMarkup(rawInput).toString();
}
return rawInput;
}
} | final String function() { if (NO_RAW_INPUT.equals(rawInput)) { return getModelValue(); } else { if (getEscapeModelStrings() && rawInput != null) { return Strings.escapeMarkup(rawInput).toString(); } return rawInput; } } | /**
* Gets current value for a form component, which can be either input data entered by the user,
* or the component's model object if no input was provided.
*
* @return The value
*/ | Gets current value for a form component, which can be either input data entered by the user, or the component's model object if no input was provided | getValue | {
"repo_name": "mafulafunk/wicket",
"path": "wicket-core/src/main/java/org/apache/wicket/markup/html/form/FormComponent.java",
"license": "apache-2.0",
"size": 43022
} | [
"org.apache.wicket.util.string.Strings"
] | import org.apache.wicket.util.string.Strings; | import org.apache.wicket.util.string.*; | [
"org.apache.wicket"
] | org.apache.wicket; | 2,437,449 |
public static boolean hasPages(Model model,
org.ontoware.rdf2go.model.node.Resource instanceResource) {
return Base.has(model, instanceResource, PAGE);
} | static boolean function(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) { return Base.has(model, instanceResource, PAGE); } | /**
* Check if org.ontoware.rdfreactor.generator.java.JProperty@47a89031 has at
* least one value set
*
* @param model an RDF2Go model
* @param resource an RDF2Go resource
* @return true if this property has at least one value [Generated from
* RDFReactor template rule #get0h... | Check if org.ontoware.rdfreactor.generator.java.JProperty@47a89031 has at least one value set | hasPages | {
"repo_name": "m0ep/master-thesis",
"path": "source/apis/rdf2go/rdf2go-foaf/src/main/java/com/xmlns/foaf/Thing.java",
"license": "mit",
"size": 274766
} | [
"org.ontoware.rdf2go.model.Model",
"org.ontoware.rdfreactor.runtime.Base"
] | import org.ontoware.rdf2go.model.Model; import org.ontoware.rdfreactor.runtime.Base; | import org.ontoware.rdf2go.model.*; import org.ontoware.rdfreactor.runtime.*; | [
"org.ontoware.rdf2go",
"org.ontoware.rdfreactor"
] | org.ontoware.rdf2go; org.ontoware.rdfreactor; | 2,810,022 |
public List pendingActivations(); | List function(); | /**
* Returns a list of users that haven't yet activated their accounts
* @return
*/ | Returns a list of users that haven't yet activated their accounts | pendingActivations | {
"repo_name": "RSJJ/JForum",
"path": "src/net/jforum/dao/UserDAO.java",
"license": "bsd-3-clause",
"size": 11728
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,422,839 |
public static boolean comparable(Class<?> arg1, Class<?> arg2) {
if (arg1.equals(arg2)
&& (arg1.equals(String.class) || arg1.equals(Boolean.class)
|| arg1.equals(Date.class) || arg1.equals(Short.class)
|| arg1.equals(Integer.class) || arg1.equals(Long.... | static boolean function(Class<?> arg1, Class<?> arg2) { if (arg1.equals(arg2) && (arg1.equals(String.class) arg1.equals(Boolean.class) arg1.equals(Date.class) arg1.equals(Short.class) arg1.equals(Integer.class) arg1.equals(Long.class) arg1.equals(Float.class) arg1.equals(Double.class) arg1.equals(BigDecimal.class) arg1... | /**
* Check whether the two arguments are of comparable types i.e. they are of similiar type
* and we know how to handle that type
* @param arg1 the first argument
* @param arg2 the second argument
* @return whether the types are comparable
*/ | Check whether the two arguments are of comparable types i.e. they are of similiar type and we know how to handle that type | comparable | {
"repo_name": "joshkh/intermine",
"path": "intermine/objectstore/main/src/org/intermine/objectstore/query/SimpleConstraint.java",
"license": "lgpl-2.1",
"size": 9487
} | [
"java.math.BigDecimal",
"java.util.Date"
] | import java.math.BigDecimal; import java.util.Date; | import java.math.*; import java.util.*; | [
"java.math",
"java.util"
] | java.math; java.util; | 2,246,559 |
@Test
public void addManyMultiReference() throws UnsupportedOperationException, UnsupportedNotificationException {
final TestElement useCase = Create.testElement();
final TestElement actor = Create.testElement();
final TestElement useCase2 = Create.testElement();
final TestElement useCase3 = Create.tes... | void function() throws UnsupportedOperationException, UnsupportedNotificationException { final TestElement useCase = Create.testElement(); final TestElement actor = Create.testElement(); final TestElement useCase2 = Create.testElement(); final TestElement useCase3 = Create.testElement(); final List<TestElement> useCase... | /**
* Change a multi reference and check the generated operation.
*
* @throws UnsupportedOperationException on test fail
* @throws UnsupportedNotificationException on test fail
*/ | Change a multi reference and check the generated operation | addManyMultiReference | {
"repo_name": "edgarmueller/emfstore-rest",
"path": "tests/org.eclipse.emf.emfstore.client.recording.test/src/org/eclipse/emf/emfstore/client/recording/test/MultiReferenceOperationTest.java",
"license": "epl-1.0",
"size": 42971
} | [
"java.util.ArrayList",
"java.util.List",
"org.eclipse.emf.emfstore.client.test.common.dsl.Create",
"org.eclipse.emf.emfstore.internal.client.model.exceptions.UnsupportedNotificationException",
"org.eclipse.emf.emfstore.internal.client.model.util.EMFStoreCommand",
"org.eclipse.emf.emfstore.test.model.TestE... | import java.util.ArrayList; import java.util.List; import org.eclipse.emf.emfstore.client.test.common.dsl.Create; import org.eclipse.emf.emfstore.internal.client.model.exceptions.UnsupportedNotificationException; import org.eclipse.emf.emfstore.internal.client.model.util.EMFStoreCommand; import org.eclipse.emf.emfstore... | import java.util.*; import org.eclipse.emf.emfstore.client.test.common.dsl.*; import org.eclipse.emf.emfstore.internal.client.model.exceptions.*; import org.eclipse.emf.emfstore.internal.client.model.util.*; import org.eclipse.emf.emfstore.test.model.*; | [
"java.util",
"org.eclipse.emf"
] | java.util; org.eclipse.emf; | 1,240,202 |
public com.google.longrunning.Operation longRunningRecognize(com.google.cloud.speech.v1.LongRunningRecognizeRequest request) {
return blockingUnaryCall(
getChannel(), getLongRunningRecognizeMethodHelper(), getCallOptions(), request);
}
}
public static final class SpeechFutureStub extends... | com.google.longrunning.Operation function(com.google.cloud.speech.v1.LongRunningRecognizeRequest request) { return blockingUnaryCall( getChannel(), getLongRunningRecognizeMethodHelper(), getCallOptions(), request); } } public static final class SpeechFutureStub extends io.grpc.stub.AbstractStub<SpeechFutureStub> { priv... | /**
* <pre>
* Performs asynchronous speech recognition: receive results via the
* google.longrunning.Operations interface. Returns either an
* `Operation.error` or an `Operation.response` which contains
* a `LongRunningRecognizeResponse` message.
* </pre>
*/ | <code> Performs asynchronous speech recognition: receive results via the google.longrunning.Operations interface. Returns either an `Operation.error` or an `Operation.response` which contains a `LongRunningRecognizeResponse` message. </code> | longRunningRecognize | {
"repo_name": "pongad/api-client-staging",
"path": "generated/java/grpc-google-cloud-speech-v1/src/main/java/com/google/cloud/speech/v1/SpeechGrpc.java",
"license": "bsd-3-clause",
"size": 21559
} | [
"io.grpc.stub.ClientCalls"
] | import io.grpc.stub.ClientCalls; | import io.grpc.stub.*; | [
"io.grpc.stub"
] | io.grpc.stub; | 598,097 |
public void indicateToRefresh(List<DataObject> containers,
boolean refreshTree)
{
TreeImageDisplay node;
Browser browser = null;
Set<Long> groupIds = new HashSet<Long>();
if (containers != null && containers.size() > 0) {
NodesFinder finder = new NodesFinder(containers);
DataObject ho = containers... | void function(List<DataObject> containers, boolean refreshTree) { TreeImageDisplay node; Browser browser = null; Set<Long> groupIds = new HashSet<Long>(); if (containers != null && containers.size() > 0) { NodesFinder finder = new NodesFinder(containers); DataObject ho = containers.get(0); if (ho instanceof DatasetData... | /**
* Implemented as specified by the {@link TreeViewer} interface.
* @see TreeViewer#indicateToRefresh(List, boolean)
*/ | Implemented as specified by the <code>TreeViewer</code> interface | indicateToRefresh | {
"repo_name": "jballanc/openmicroscopy",
"path": "components/insight/SRC/org/openmicroscopy/shoola/agents/treeviewer/view/TreeViewerComponent.java",
"license": "gpl-2.0",
"size": 155452
} | [
"java.util.HashSet",
"java.util.Iterator",
"java.util.List",
"java.util.Set",
"org.openmicroscopy.shoola.agents.treeviewer.TreeViewerAgent",
"org.openmicroscopy.shoola.agents.treeviewer.browser.Browser",
"org.openmicroscopy.shoola.agents.treeviewer.cmd.ExperimenterVisitor",
"org.openmicroscopy.shoola.... | import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Set; import org.openmicroscopy.shoola.agents.treeviewer.TreeViewerAgent; import org.openmicroscopy.shoola.agents.treeviewer.browser.Browser; import org.openmicroscopy.shoola.agents.treeviewer.cmd.ExperimenterVisitor; import org... | import java.util.*; import org.openmicroscopy.shoola.agents.treeviewer.*; import org.openmicroscopy.shoola.agents.treeviewer.browser.*; import org.openmicroscopy.shoola.agents.treeviewer.cmd.*; import org.openmicroscopy.shoola.agents.util.browser.*; | [
"java.util",
"org.openmicroscopy.shoola"
] | java.util; org.openmicroscopy.shoola; | 702,742 |
EReference getusesClause_IdList(); | EReference getusesClause_IdList(); | /**
* Returns the meta object for the containment reference '{@link org.xtext.example.delphi.delphi.usesClause#getIdList <em>Id List</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference '<em>Id List</em>'.
* @see org.xtext.example.delphi.delphi.use... | Returns the meta object for the containment reference '<code>org.xtext.example.delphi.delphi.usesClause#getIdList Id List</code>'. | getusesClause_IdList | {
"repo_name": "adolfosbh/cs2as",
"path": "org.xtext.example.delphi/src-gen/org/xtext/example/delphi/delphi/DelphiPackage.java",
"license": "epl-1.0",
"size": 434880
} | [
"org.eclipse.emf.ecore.EReference"
] | import org.eclipse.emf.ecore.EReference; | import org.eclipse.emf.ecore.*; | [
"org.eclipse.emf"
] | org.eclipse.emf; | 416,099 |
public final byte[] getBytes()
{
final int length = bytes.length;
final byte[] result = new byte[length];
// Make a defensive copy
System.arraycopy(bytes,0,result,0,length);
return result;
}
private BOM(final byte bom[], final String description)
{
assert(... | final byte[] function() { final int length = bytes.length; final byte[] result = new byte[length]; System.arraycopy(bytes,0,result,0,length); return result; } private BOM(final byte bom[], final String description) { assert(bom != null) : STR; assert(description != null) : STR; assert(description.length() != 0) : STR; ... | /**
* Returns the bytes corresponding to this <code>BOM</code> value.
*/ | Returns the bytes corresponding to this <code>BOM</code> value | getBytes | {
"repo_name": "guide-me/GuideMe",
"path": "src/main/java/org/guideme/guideme/readers/UnicodeBOMInputStream.java",
"license": "mit",
"size": 8354
} | [
"java.io.IOException",
"java.io.InputStream",
"java.io.PushbackInputStream"
] | import java.io.IOException; import java.io.InputStream; import java.io.PushbackInputStream; | import java.io.*; | [
"java.io"
] | java.io; | 2,007,613 |
@SideOnly( Side.CLIENT )
public void setVelocity( double x, double y, double z )
{
this.motionX = x;
this.motionY = y;
this.motionZ = z;
if ( this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F )
{
float f = MathHelper.sqrt_double( x * x + z * ... | @SideOnly( Side.CLIENT ) void function( double x, double y, double z ) { this.motionX = x; this.motionY = y; this.motionZ = z; if ( this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F ) { float f = MathHelper.sqrt_double( x * x + z * z ); this.prevRotationYaw = this.rotationYaw = (float) ( Math.atan2( y, z )... | /**
* Sets the velocity to the args. Args: x, y, z
*/ | Sets the velocity to the args. Args: x, y, z | setVelocity | {
"repo_name": "CodeArtha/OpMod",
"path": "src/main/java/com/codeartha/opmod/entity/EntityQuarrel.java",
"license": "gpl-3.0",
"size": 26449
} | [
"net.minecraft.util.MathHelper"
] | import net.minecraft.util.MathHelper; | import net.minecraft.util.*; | [
"net.minecraft.util"
] | net.minecraft.util; | 1,776,474 |
Map<C, V> mapToColumns(Tuple tuple); | Map<C, V> mapToColumns(Tuple tuple); | /**
* Given a <code>backtype.storm.tuple.Tuple</code> object, map the columns
* of data to write.
*
* @param tuple
* @return
*/ | Given a <code>backtype.storm.tuple.Tuple</code> object, map the columns of data to write | mapToColumns | {
"repo_name": "tempbottle/storm-cassandra",
"path": "src/main/java/com/hmsonline/storm/cassandra/bolt/mapper/TupleMapper.java",
"license": "apache-2.0",
"size": 2137
} | [
"java.util.Map"
] | import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,071,584 |
public ApiContractInner withProtocols(List<Protocol> protocols) {
this.protocols = protocols;
return this;
} | ApiContractInner function(List<Protocol> protocols) { this.protocols = protocols; return this; } | /**
* Set describes on which protocols the operations in this API can be invoked.
*
* @param protocols the protocols value to set
* @return the ApiContractInner object itself.
*/ | Set describes on which protocols the operations in this API can be invoked | withProtocols | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/apimanagement/mgmt-v2019_12_01/src/main/java/com/microsoft/azure/management/apimanagement/v2019_12_01/implementation/ApiContractInner.java",
"license": "mit",
"size": 14657
} | [
"com.microsoft.azure.management.apimanagement.v2019_12_01.Protocol",
"java.util.List"
] | import com.microsoft.azure.management.apimanagement.v2019_12_01.Protocol; import java.util.List; | import com.microsoft.azure.management.apimanagement.v2019_12_01.*; import java.util.*; | [
"com.microsoft.azure",
"java.util"
] | com.microsoft.azure; java.util; | 53,011 |
public Timeslot currentTimeslot ()
{
return findByInstant(timeService.getCurrentTime());
} | Timeslot function () { return findByInstant(timeService.getCurrentTime()); } | /**
* Returns the timeslot for the current time.
*/ | Returns the timeslot for the current time | currentTimeslot | {
"repo_name": "powertac/powertac-core",
"path": "common/src/main/java/org/powertac/common/repo/TimeslotRepo.java",
"license": "apache-2.0",
"size": 7376
} | [
"org.powertac.common.Timeslot"
] | import org.powertac.common.Timeslot; | import org.powertac.common.*; | [
"org.powertac.common"
] | org.powertac.common; | 704,607 |
public static File customProfileDir(String sessionId) {
final File tmpDir;
final String customProfileDirParent;
final File customProfileDir;
tmpDir = new File(System.getProperty("java.io.tmpdir"));
customProfileDirParent =
((tmpDir.exists() && tmpDir.isDirectory()) ? tmpDir.getAbsolutePat... | static File function(String sessionId) { final File tmpDir; final String customProfileDirParent; final File customProfileDir; tmpDir = new File(System.getProperty(STR)); customProfileDirParent = ((tmpDir.exists() && tmpDir.isDirectory()) ? tmpDir.getAbsolutePath() : "."); customProfileDir = new File(customProfileDirPar... | /**
* Return the name of the custom profile directory for a specific seleniumm session
*
* @param sessionId Current selenium session id. Cannot be null.
* @return file path of the custom profile directory for this session.
*/ | Return the name of the custom profile directory for a specific seleniumm session | customProfileDir | {
"repo_name": "p0deje/selenium",
"path": "java/server/src/org/openqa/selenium/server/browserlaunchers/LauncherUtils.java",
"license": "apache-2.0",
"size": 13374
} | [
"java.io.File"
] | import java.io.File; | import java.io.*; | [
"java.io"
] | java.io; | 756,586 |
private EdgeMap<E,V> createEdgeMap(IGraph<E,V> g) {
EdgeMap<E,V> map = new EdgeMap<E,V>();
for (E e:g.getEdges()) {
map.put(e, null);
}
return map;
}
| EdgeMap<E,V> function(IGraph<E,V> g) { EdgeMap<E,V> map = new EdgeMap<E,V>(); for (E e:g.getEdges()) { map.put(e, null); } return map; } | /**
* Creates an edgeMap for the given graph containing all edges of the graph.
* @param g Graph.
*/ | Creates an edgeMap for the given graph containing all edges of the graph | createEdgeMap | {
"repo_name": "BPT-NH/jpbt",
"path": "jbpt-deco/src/main/java/org/jbpt/algo/tree/tctree/TCTree.java",
"license": "gpl-3.0",
"size": 18577
} | [
"org.jbpt.graph.abs.IGraph"
] | import org.jbpt.graph.abs.IGraph; | import org.jbpt.graph.abs.*; | [
"org.jbpt.graph"
] | org.jbpt.graph; | 281,759 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.