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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
protected void scavenge()
{
//don't attempt to scavenge if we are shutting down
if (isStopping() || isStopped())
return;
Thread thread=Thread.currentThread();
ClassLoader old_loader=thread.getContextClassLoader();
try
{
if (_loader!=n... | void function() { if (isStopping() isStopped()) return; Thread thread=Thread.currentThread(); ClassLoader old_loader=thread.getContextClassLoader(); try { if (_loader!=null) thread.setContextClassLoader(_loader); long now=System.currentTimeMillis(); for (Iterator<HashedSession> i=_sessions.values().iterator(); i.hasNex... | /**
* Find sessions that have timed out and invalidate them. This runs in the
* SessionScavenger thread.
*/ | Find sessions that have timed out and invalidate them. This runs in the SessionScavenger thread | scavenge | {
"repo_name": "jamiepg1/jetty.project",
"path": "jetty-server/src/main/java/org/eclipse/jetty/server/session/HashSessionManager.java",
"license": "apache-2.0",
"size": 18593
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 1,550,495 |
public static int slotToIndex(final int slot) {
return slot - 1;
}
protected AnalogModule(final int slot) {
super(slot);
m_module = new tAI(slotToIndex(slot));
setNumChannelsToActivate(SensorBase.kAnalogChannels);
setSampleRate(AnalogModule.kDefaultSam... | static int function(final int slot) { return slot - 1; } protected AnalogModule(final int slot) { super(slot); m_module = new tAI(slotToIndex(slot)); setNumChannelsToActivate(SensorBase.kAnalogChannels); setSampleRate(AnalogModule.kDefaultSampleRate); for (int i = 0; i < SensorBase.kAnalogChannels; i++) { m_module.writ... | /**
* Convert slot number to index.
*
* @param slot The slot in the chassis where the module is plugged in.
* @return An index to represent the module internally.
*/ | Convert slot number to index | slotToIndex | {
"repo_name": "Griffins-1884/RobotCode2012",
"path": "WPILibJ/src/edu/wpi/first/wpilibj/AnalogModule.java",
"license": "bsd-3-clause",
"size": 12893
} | [
"edu.wpi.first.wpilibj.fpga.tAI"
] | import edu.wpi.first.wpilibj.fpga.tAI; | import edu.wpi.first.wpilibj.fpga.*; | [
"edu.wpi.first"
] | edu.wpi.first; | 862,576 |
public boolean removeChild(final INode child) {
final int i = searchChildren(child.getLocalNameBytes());
if (i < 0) {
return false;
}
final INode removed = children.remove(i);
Preconditions.checkState(removed == child);
return true;
} | boolean function(final INode child) { final int i = searchChildren(child.getLocalNameBytes()); if (i < 0) { return false; } final INode removed = children.remove(i); Preconditions.checkState(removed == child); return true; } | /**
* Remove the specified child from this directory.
* The basic remove method which actually calls children.remove(..).
*
* @param child the child inode to be removed
*
* @return true if the child is removed; false if the child is not found.
*/ | Remove the specified child from this directory. The basic remove method which actually calls children.remove(..) | removeChild | {
"repo_name": "lukmajercak/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/INodeDirectory.java",
"license": "apache-2.0",
"size": 36049
} | [
"com.google.common.base.Preconditions"
] | import com.google.common.base.Preconditions; | import com.google.common.base.*; | [
"com.google.common"
] | com.google.common; | 1,988,459 |
public Iterator<String> keys() {
return registry.keySet().iterator();
}
| Iterator<String> function() { return registry.keySet().iterator(); } | /**
* Iterate over URIs
*/ | Iterate over URIs | keys | {
"repo_name": "thesmartenergy/sparql-generate-jena",
"path": "sparql-generate-jena/src/main/java/fr/mines_stetienne/ci/sparql_generate/iterator/IteratorFunctionRegistry.java",
"license": "apache-2.0",
"size": 6215
} | [
"java.util.Iterator"
] | import java.util.Iterator; | import java.util.*; | [
"java.util"
] | java.util; | 324,634 |
public static void setTenantRegLoader(TenantRegistryLoader service) {
tenantRegLoader = service;
} | static void function(TenantRegistryLoader service) { tenantRegLoader = service; } | /**
* This method used to set TenantRegistryLoader
*
* @param service Tenant registry loader for load tenant registry
*/ | This method used to set TenantRegistryLoader | setTenantRegLoader | {
"repo_name": "dhanuka84/product-apim",
"path": "modules/distribution/resources/migration/wso2-api-migration-client/src/main/java/org/wso2/carbon/apimgt/migration/client/internal/ServiceHolder.java",
"license": "apache-2.0",
"size": 3248
} | [
"org.wso2.carbon.registry.core.service.TenantRegistryLoader"
] | import org.wso2.carbon.registry.core.service.TenantRegistryLoader; | import org.wso2.carbon.registry.core.service.*; | [
"org.wso2.carbon"
] | org.wso2.carbon; | 2,045,031 |
public static AbstractJDBCCatalog createCatalog(String catalogName, String defaultDatabase, String username, String pwd, String baseUrl) {
JDBCDialect dialect = JDBCDialects.get(baseUrl).get();
if (dialect instanceof JDBCDialects.PostgresDialect) {
return new PostgresCatalog(catalogName, defaultDatabase, use... | static AbstractJDBCCatalog function(String catalogName, String defaultDatabase, String username, String pwd, String baseUrl) { JDBCDialect dialect = JDBCDialects.get(baseUrl).get(); if (dialect instanceof JDBCDialects.PostgresDialect) { return new PostgresCatalog(catalogName, defaultDatabase, username, pwd, baseUrl); }... | /**
* Create catalog instance from given information.
*/ | Create catalog instance from given information | createCatalog | {
"repo_name": "bowenli86/flink",
"path": "flink-connectors/flink-jdbc/src/main/java/org/apache/flink/api/java/io/jdbc/catalog/JDBCCatalogUtils.java",
"license": "apache-2.0",
"size": 1982
} | [
"org.apache.flink.api.java.io.jdbc.dialect.JDBCDialect",
"org.apache.flink.api.java.io.jdbc.dialect.JDBCDialects"
] | import org.apache.flink.api.java.io.jdbc.dialect.JDBCDialect; import org.apache.flink.api.java.io.jdbc.dialect.JDBCDialects; | import org.apache.flink.api.java.io.jdbc.dialect.*; | [
"org.apache.flink"
] | org.apache.flink; | 1,818,425 |
public void setPublishDateString(String date) throws ParseException {
if (StringUtils.isBlank(date)) {
publishDate = null;
return;
}
publishDate = dateFormat.parse(date);
} | void function(String date) throws ParseException { if (StringUtils.isBlank(date)) { publishDate = null; return; } publishDate = dateFormat.parse(date); } | /**
* Set the publish date as a string. This is just a webflow workaround.
*
* @param date the date string
* @throws ParseException if the date cannot be parsed
*/ | Set the publish date as a string. This is just a webflow workaround | setPublishDateString | {
"repo_name": "bjagg/uPortal",
"path": "uPortal-portlets/src/main/java/org/apereo/portal/portlets/portletadmin/PortletDefinitionForm.java",
"license": "apache-2.0",
"size": 25929
} | [
"java.text.ParseException",
"org.apache.commons.lang3.StringUtils"
] | import java.text.ParseException; import org.apache.commons.lang3.StringUtils; | import java.text.*; import org.apache.commons.lang3.*; | [
"java.text",
"org.apache.commons"
] | java.text; org.apache.commons; | 1,986,928 |
protected boolean isPutMethod(ODataRequest.Method method) {
return ODataRequest.Method.PUT.equals(method);
} | boolean function(ODataRequest.Method method) { return ODataRequest.Method.PUT.equals(method); } | /**
* This method specifies requested method is PUT or not.
*
* @param method is ODataRequest.Method
* @return true if requested method is PUT
*/ | This method specifies requested method is PUT or not | isPutMethod | {
"repo_name": "sdl/odata",
"path": "odata_renderer/src/main/java/com/sdl/odata/unmarshaller/AbstractUnmarshaller.java",
"license": "apache-2.0",
"size": 3357
} | [
"com.sdl.odata.api.service.ODataRequest"
] | import com.sdl.odata.api.service.ODataRequest; | import com.sdl.odata.api.service.*; | [
"com.sdl.odata"
] | com.sdl.odata; | 1,541,114 |
Repository createYumHosted(final String name,
final String blobStoreName,
final boolean strictContentTypeValidation,
final WritePolicy writePolicy,
final int depth); | Repository createYumHosted(final String name, final String blobStoreName, final boolean strictContentTypeValidation, final WritePolicy writePolicy, final int depth); | /**
* Create a Yum hosted repository.
* @param name The name of the new Repository
* @param blobStoreName The BlobStore the Repository should use
* @param strictContentTypeValidation Whether or not the Repository should enforce strict content types
* @param writePolicy The {@link WritePolicy} for the Rep... | Create a Yum hosted repository | createYumHosted | {
"repo_name": "sonatype/nexus-public",
"path": "plugins/nexus-script-plugin/src/main/java/org/sonatype/nexus/script/plugin/RepositoryApi.java",
"license": "epl-1.0",
"size": 25653
} | [
"org.sonatype.nexus.repository.Repository",
"org.sonatype.nexus.repository.config.WritePolicy"
] | import org.sonatype.nexus.repository.Repository; import org.sonatype.nexus.repository.config.WritePolicy; | import org.sonatype.nexus.repository.*; import org.sonatype.nexus.repository.config.*; | [
"org.sonatype.nexus"
] | org.sonatype.nexus; | 630,748 |
public TextPropDefaultViewModel_ nullableTextWithDefaultQuantityRes(@PluralsRes int pluralRes,
int quantity, Object... formatArgs) {
onMutation();
nullableTextWithDefault_StringAttributeData.setValue(pluralRes, quantity, formatArgs);
return this;
} | TextPropDefaultViewModel_ function(@PluralsRes int pluralRes, int quantity, Object... formatArgs) { onMutation(); nullableTextWithDefault_StringAttributeData.setValue(pluralRes, quantity, formatArgs); return this; } | /**
* If a value of 0 is set then this attribute will revert to its default value.
* <p>
* <i>Optional</i>: Default value is R.string.string_resource_value
*
* @see TextPropDefaultView#nullableTextWithDefault(CharSequence)
*/ | If a value of 0 is set then this attribute will revert to its default value. Optional: Default value is R.string.string_resource_value | nullableTextWithDefaultQuantityRes | {
"repo_name": "airbnb/epoxy",
"path": "epoxy-processortest/src/test/resources/TextPropDefaultViewModel_.java",
"license": "apache-2.0",
"size": 15712
} | [
"androidx.annotation.PluralsRes",
"java.lang.Object"
] | import androidx.annotation.PluralsRes; import java.lang.Object; | import androidx.annotation.*; import java.lang.*; | [
"androidx.annotation",
"java.lang"
] | androidx.annotation; java.lang; | 1,118,113 |
public Map<Integer, ESFieldSettings> getFieldSettings(){
System.out.println("ExpensiveField starts detecting configured fields.");
Map<Integer, ESFieldSettings> settings = new LinkedHashMap<Integer, ESFieldSettings>();
List<LinkedHashMap<String, Object>> forceFieldStones = vanillaSettings... | Map<Integer, ESFieldSettings> function(){ System.out.println(STR); Map<Integer, ESFieldSettings> settings = new LinkedHashMap<Integer, ESFieldSettings>(); List<LinkedHashMap<String, Object>> forceFieldStones = vanillaSettings.getForceFieldBlocks(); for(LinkedHashMap<String, Object> stone : forceFieldStones){ if(stone.c... | /**
* Get the map of ItemIds/TypeIds combined with its corresponding ExpensiveFieldSettings.
* @return Map with TypeId as keys and FieldSettings as values.
*/ | Get the map of ItemIds/TypeIds combined with its corresponding ExpensiveFieldSettings | getFieldSettings | {
"repo_name": "Scribblon/ExpensiveStones",
"path": "src/main/java/me/scriblon/plugins/expensivestones/managers/Configurator.java",
"license": "gpl-3.0",
"size": 9009
} | [
"java.util.LinkedHashMap",
"java.util.List",
"java.util.Map",
"me.scriblon.plugins.expensivestones.ESFieldSettings",
"me.scriblon.plugins.expensivestones.utils.Helper",
"net.sacredlabyrinth.Phaed",
"org.bukkit.Material"
] | import java.util.LinkedHashMap; import java.util.List; import java.util.Map; import me.scriblon.plugins.expensivestones.ESFieldSettings; import me.scriblon.plugins.expensivestones.utils.Helper; import net.sacredlabyrinth.Phaed; import org.bukkit.Material; | import java.util.*; import me.scriblon.plugins.expensivestones.*; import me.scriblon.plugins.expensivestones.utils.*; import net.sacredlabyrinth.*; import org.bukkit.*; | [
"java.util",
"me.scriblon.plugins",
"net.sacredlabyrinth",
"org.bukkit"
] | java.util; me.scriblon.plugins; net.sacredlabyrinth; org.bukkit; | 1,157,530 |
public final void putErrorStatus(int sts) {
// Check if there is enough space in the buffer
if ( m_buffer.length - m_pos < 4)
extendBuffer();
// Pack the status value
DataPacker.putIntelInt(sts,m_buffer,m_pos);
m_pos += 4;
// Save the status value
m_errorCode = sts;
}
... | final void function(int sts) { if ( m_buffer.length - m_pos < 4) extendBuffer(); DataPacker.putIntelInt(sts,m_buffer,m_pos); m_pos += 4; m_errorCode = sts; } | /**
* Append an error status to the buffer, also sets the error status value
*
* @param sts int
*/ | Append an error status to the buffer, also sets the error status value | putErrorStatus | {
"repo_name": "loftuxab/community-edition-old",
"path": "projects/alfresco-jlan/source/java/org/alfresco/jlan/smb/dcerpc/DCEBuffer.java",
"license": "lgpl-3.0",
"size": 39587
} | [
"org.alfresco.jlan.util.DataPacker"
] | import org.alfresco.jlan.util.DataPacker; | import org.alfresco.jlan.util.*; | [
"org.alfresco.jlan"
] | org.alfresco.jlan; | 2,865,176 |
public Bookmark open() throws SQLException {
db = DBHelper.getWritableDatabase();
return this;
} | Bookmark function() throws SQLException { db = DBHelper.getWritableDatabase(); return this; } | /**
* open the bookmark database
*
* @return the Bookmark object
* @throws SQLException
*/ | open the bookmark database | open | {
"repo_name": "hitu/pdf-annotation",
"path": "src/cx/pdf/android/pdfview/Bookmark.java",
"license": "gpl-3.0",
"size": 6044
} | [
"android.database.SQLException"
] | import android.database.SQLException; | import android.database.*; | [
"android.database"
] | android.database; | 1,918,943 |
FontMetrics getFontMetrics(Font font); | FontMetrics getFontMetrics(Font font); | /**
* Get the <code>FontMetrics</code> of the specified font in this component.
*
* @param font the specified font
* @return the metrics for the specified font, or null if not supported
* @throws NullPointerException if font is null
* @see #getFont()
*/ | Get the <code>FontMetrics</code> of the specified font in this component | getFontMetrics | {
"repo_name": "unofficial-opensource-apple/gcc_40",
"path": "libjava/javax/accessibility/AccessibleComponent.java",
"license": "gpl-2.0",
"size": 10066
} | [
"java.awt.Font",
"java.awt.FontMetrics"
] | import java.awt.Font; import java.awt.FontMetrics; | import java.awt.*; | [
"java.awt"
] | java.awt; | 2,269,194 |
private boolean removeProjectFromBP(CPListElement existing) {
IPath outputFolder= new Path(fOutputLocation);
IPath newOutputFolder= null;
String message;
if (outputFolder.segmentCount() == 1) {
String outputFolderName= PreferenceConstants.getPreferenceStore().getString(P... | boolean function(CPListElement existing) { IPath outputFolder= new Path(fOutputLocation); IPath newOutputFolder= null; String message; if (outputFolder.segmentCount() == 1) { String outputFolderName= PreferenceConstants.getPreferenceStore().getString(PreferenceConstants.SRCBIN_BINNAME); newOutputFolder= outputFolder.ap... | /**
* Asks to change the output folder to 'proj/bin' when no source folders were existing
*
* @param existing the element to remove
* @return returns <code>true</code> if the element has been removed
*/ | Asks to change the output folder to 'proj/bin' when no source folders were existing | removeProjectFromBP | {
"repo_name": "ceylon/ceylon-ide-eclipse",
"path": "plugins/org.eclipse.ceylon.ide.eclipse.ui/src/org/eclipse/ceylon/ide/eclipse/code/wizard/CreateMultipleResourceFoldersDialog.java",
"license": "epl-1.0",
"size": 14493
} | [
"org.eclipse.core.runtime.IPath",
"org.eclipse.core.runtime.Path",
"org.eclipse.jdt.internal.corext.util.Messages",
"org.eclipse.jdt.internal.ui.viewsupport.BasicElementLabels",
"org.eclipse.jdt.internal.ui.wizards.NewWizardMessages",
"org.eclipse.jdt.internal.ui.wizards.buildpaths.CPListElement",
"org.... | import org.eclipse.core.runtime.IPath; import org.eclipse.core.runtime.Path; import org.eclipse.jdt.internal.corext.util.Messages; import org.eclipse.jdt.internal.ui.viewsupport.BasicElementLabels; import org.eclipse.jdt.internal.ui.wizards.NewWizardMessages; import org.eclipse.jdt.internal.ui.wizards.buildpaths.CPList... | import org.eclipse.core.runtime.*; import org.eclipse.jdt.internal.corext.util.*; import org.eclipse.jdt.internal.ui.viewsupport.*; import org.eclipse.jdt.internal.ui.wizards.*; import org.eclipse.jdt.internal.ui.wizards.buildpaths.*; import org.eclipse.jdt.ui.*; import org.eclipse.jface.dialogs.*; | [
"org.eclipse.core",
"org.eclipse.jdt",
"org.eclipse.jface"
] | org.eclipse.core; org.eclipse.jdt; org.eclipse.jface; | 1,544,668 |
protected void checkAttributes() throws BuildException {
if (server == null) {
throw new BuildException("server attribute must be set!");
}
if (userid == null) {
throw new BuildException("userid attribute must be set!");
}
if (password == null) ... | void function() throws BuildException { if (server == null) { throw new BuildException(STR); } if (userid == null) { throw new BuildException(STR); } if (password == null) { throw new BuildException(STR); } if ((action == LIST_FILES) && (listing == null)) { throw new BuildException(STR + STR); } if (action == MK_DIR &&... | /**
* Checks to see that all required parameters are set.
*
* @throws BuildException if the configuration is not valid.
*/ | Checks to see that all required parameters are set | checkAttributes | {
"repo_name": "gitblit/moxie",
"path": "toolkit/src/all/java/org/moxie/ftp/FTPTask.java",
"license": "apache-2.0",
"size": 29395
} | [
"org.apache.tools.ant.BuildException"
] | import org.apache.tools.ant.BuildException; | import org.apache.tools.ant.*; | [
"org.apache.tools"
] | org.apache.tools; | 1,247,878 |
void end(ResumeVM a); | void end(ResumeVM a); | /**
* Notify for the end of an action.
*
* @param a the action that ends
*/ | Notify for the end of an action | end | {
"repo_name": "btrplace/scheduler",
"path": "api/src/main/java/org/btrplace/model/constraint/SatConstraintChecker.java",
"license": "lgpl-3.0",
"size": 6250
} | [
"org.btrplace.plan.event.ResumeVM"
] | import org.btrplace.plan.event.ResumeVM; | import org.btrplace.plan.event.*; | [
"org.btrplace.plan"
] | org.btrplace.plan; | 1,611,387 |
public FeatureCursor queryFeatures(String[] columns, String where) {
return featureDao.queryIn(columns, queryIdsSQL(), where);
} | FeatureCursor function(String[] columns, String where) { return featureDao.queryIn(columns, queryIdsSQL(), where); } | /**
* Query for features
*
* @param columns columns
* @param where where clause
* @return feature cursor
* @since 3.5.0
*/ | Query for features | queryFeatures | {
"repo_name": "ngageoint/geopackage-android",
"path": "geopackage-sdk/src/main/java/mil/nga/geopackage/extension/nga/index/FeatureTableIndex.java",
"license": "mit",
"size": 276322
} | [
"mil.nga.geopackage.features.user.FeatureCursor"
] | import mil.nga.geopackage.features.user.FeatureCursor; | import mil.nga.geopackage.features.user.*; | [
"mil.nga.geopackage"
] | mil.nga.geopackage; | 347,026 |
@Override
protected void onRestoreInstanceState(Parcelable state) {
if (!(state instanceof SavedState)) {
super.onRestoreInstanceState(state);
return;
}
SavedState savedState = (SavedState) state;
super.onRestoreInstanceState(savedState.getSuperState());
... | void function(Parcelable state) { if (!(state instanceof SavedState)) { super.onRestoreInstanceState(state); return; } SavedState savedState = (SavedState) state; super.onRestoreInstanceState(savedState.getSuperState()); setMaxInRow(savedState.mMaxInRow); checkAt(savedState.mCheckedButtonIndex); } public interface OnCh... | /**
* Restores the state of this layout from a parcelable.
*
* @param state the parcelable
*/ | Restores the state of this layout from a parcelable | onRestoreInstanceState | {
"repo_name": "Gavras/MultiLineRadioGroup",
"path": "multilineradiogroup/src/main/java/com/whygraphics/multilineradiogroup/MultiLineRadioGroup.java",
"license": "mit",
"size": 32776
} | [
"android.os.Parcelable"
] | import android.os.Parcelable; | import android.os.*; | [
"android.os"
] | android.os; | 296,857 |
public void testIteratorOrdering() {
final ArrayBlockingQueue q = new ArrayBlockingQueue(3);
q.add(one);
q.add(two);
q.add(three);
assertEquals("queue should be full", 0, q.remainingCapacity());
int k = 0;
for (Iterator it = q.iterator(); it.hasNext();) {
... | void function() { final ArrayBlockingQueue q = new ArrayBlockingQueue(3); q.add(one); q.add(two); q.add(three); assertEquals(STR, 0, q.remainingCapacity()); int k = 0; for (Iterator it = q.iterator(); it.hasNext();) { assertEquals(++k, it.next()); } assertEquals(3, k); } | /**
* iterator ordering is FIFO
*/ | iterator ordering is FIFO | testIteratorOrdering | {
"repo_name": "md-5/jdk10",
"path": "test/jdk/java/util/concurrent/tck/ArrayBlockingQueueTest.java",
"license": "gpl-2.0",
"size": 33781
} | [
"java.util.Iterator",
"java.util.concurrent.ArrayBlockingQueue"
] | import java.util.Iterator; import java.util.concurrent.ArrayBlockingQueue; | import java.util.*; import java.util.concurrent.*; | [
"java.util"
] | java.util; | 2,174,948 |
// First check the cache.
ObsTimes res = SPObsCache.getRawObsTimes(obs);
if (res != null) return res;
// Default to 0 if the obs record could not be found.
res = ObsTimes.ZERO_TIMES;
// Ask the ObsRecord for the raw observation times.
final ObsLog nodes = ObsLog... | ObsTimes res = SPObsCache.getRawObsTimes(obs); if (res != null) return res; res = ObsTimes.ZERO_TIMES; final ObsLog nodes = ObsLog.getIfExists(obs); if (nodes != null) { final ObsClass obsClass = ObsClassService.lookupObsClass(obs); res = nodes.getExecRecord().getTimes(nodes.getQaRecord(), obsClass.getDefaultChargeClas... | /**
* Gets raw, uncorrected observation times as calculated from the events
* received by the observation's {@link edu.gemini.spModel.obsrecord.ObsExecRecord} (if any). These
* times will not have had any manual corrections applied to them.
*
* @return uncorrected observation times
*/ | Gets raw, uncorrected observation times as calculated from the events received by the observation's <code>edu.gemini.spModel.obsrecord.ObsExecRecord</code> (if any). These times will not have had any manual corrections applied to them | getRawObsTimes | {
"repo_name": "arturog8m/ocs",
"path": "bundle/edu.gemini.pot/src/main/java/edu/gemini/spModel/obs/ObsTimesService.java",
"license": "bsd-3-clause",
"size": 3692
} | [
"edu.gemini.spModel.obsclass.ObsClass",
"edu.gemini.spModel.obslog.ObsLog",
"edu.gemini.spModel.time.ObsTimes"
] | import edu.gemini.spModel.obsclass.ObsClass; import edu.gemini.spModel.obslog.ObsLog; import edu.gemini.spModel.time.ObsTimes; | import edu.gemini.*; | [
"edu.gemini"
] | edu.gemini; | 117,785 |
static String getFontName(AssetManager assets, String filePath) {
TTFAssetInputStream in = null;
try {
InputStream file = assets.open(filePath, AssetManager.ACCESS_RANDOM);
in = new TTFAssetInputStream(file);
return getTTFFontName(in, filePath);
} catch (F... | static String getFontName(AssetManager assets, String filePath) { TTFAssetInputStream in = null; try { InputStream file = assets.open(filePath, AssetManager.ACCESS_RANDOM); in = new TTFAssetInputStream(file); return getTTFFontName(in, filePath); } catch (FileNotFoundException e) { return null; } catch (IOException e) {... | /**
* Retrieve the file name for a font in the asset folder.
*
* @param filePath the full path for the font in the asset folder to retrieve.
*
* @return The file name or null of none could be retrieved.
*/ | Retrieve the file name for a font in the asset folder | getFontName | {
"repo_name": "Ronak-LM/Memoir",
"path": "RTEditor/src/main/java/com/onegravity/rteditor/fonts/TTFAnalyzer.java",
"license": "apache-2.0",
"size": 7691
} | [
"android.content.res.AssetManager",
"com.onegravity.rteditor.utils.io.IOUtils",
"java.io.FileNotFoundException",
"java.io.IOException",
"java.io.InputStream"
] | import android.content.res.AssetManager; import com.onegravity.rteditor.utils.io.IOUtils; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; | import android.content.res.*; import com.onegravity.rteditor.utils.io.*; import java.io.*; | [
"android.content",
"com.onegravity.rteditor",
"java.io"
] | android.content; com.onegravity.rteditor; java.io; | 2,567,198 |
public void konexioaItxi() {
if (this.konexioa != null)
try {
this.konexioa.commit();
this.konexioa.close();
gureDBKS = new DBKS();
} catch (SQLException e) {
}
}
| void function() { if (this.konexioa != null) try { this.konexioa.commit(); this.konexioa.close(); gureDBKS = new DBKS(); } catch (SQLException e) { } } | /**
* Datu basean commit() egiten du egiteke dagoena bukatzeko, konexioa ixten
* du datu basearekin eta klasearen instantzia berri bat sortzen du
*/ | Datu basean commit() egiten du egiteke dagoena bukatzeko, konexioa ixten du datu basearekin eta klasearen instantzia berri bat sortzen du | konexioaItxi | {
"repo_name": "UPV-EHU-Bilbao/winterTwitter",
"path": "WinterIsComing/src/isad/winteriscoming/backend/DBKS.java",
"license": "gpl-3.0",
"size": 3770
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 2,230,673 |
Observable<ServiceResponse<Void>> byteNullWithServiceResponseAsync();
void byteNull(byte[] byteQuery); | Observable<ServiceResponse<Void>> byteNullWithServiceResponseAsync(); void byteNull(byte[] byteQuery); | /**
* Get null as byte array (no query parameters in uri).
*
* @param byteQuery null as byte array (no query parameters in uri)
*/ | Get null as byte array (no query parameters in uri) | byteNull | {
"repo_name": "yugangw-msft/autorest",
"path": "src/generator/AutoRest.Java.Tests/src/main/java/fixtures/url/Queries.java",
"license": "mit",
"size": 53223
} | [
"com.microsoft.rest.ServiceResponse"
] | import com.microsoft.rest.ServiceResponse; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 1,955,336 |
protected final Wom3Node replaceOrAdd(
Wom3Node replace,
Wom3Node replacement,
boolean required)
{
if (replacement == null)
{
if (required)
{
if (getOwnerDocument().getStrictErrorChecking())
throw new NullPointerException(
"Argument is null but child cannot be removed");
}
... | final Wom3Node function( Wom3Node replace, Wom3Node replacement, boolean required) { if (replacement == null) { if (required) { if (getOwnerDocument().getStrictErrorChecking()) throw new NullPointerException( STR); } if (replace != null) { removeChild(replace); } else { ; assertWritableOnDocument(); } } else if (replac... | /**
* For setting the first child of a node with exactly one child.
*/ | For setting the first child of a node with exactly one child | replaceOrAdd | {
"repo_name": "sweble/sweble-wom3",
"path": "sweble-wom3-core/src/main/java/org/sweble/wom3/impl/BackboneWithChildren.java",
"license": "agpl-3.0",
"size": 20673
} | [
"org.sweble.wom3.Wom3Node"
] | import org.sweble.wom3.Wom3Node; | import org.sweble.wom3.*; | [
"org.sweble.wom3"
] | org.sweble.wom3; | 1,871,422 |
public IndexOptions partialFilterExpression(@Nullable final Bson partialFilterExpression) {
this.partialFilterExpression = partialFilterExpression;
return this;
} | IndexOptions function(@Nullable final Bson partialFilterExpression) { this.partialFilterExpression = partialFilterExpression; return this; } | /**
* Sets the filter expression for the documents to be included in the index
*
* @param partialFilterExpression the filter expression for the documents to be included in the index
* @return this
* @mongodb.server.release 3.2
* @since 3.2
*/ | Sets the filter expression for the documents to be included in the index | partialFilterExpression | {
"repo_name": "rozza/mongo-java-driver",
"path": "driver-core/src/main/com/mongodb/client/model/IndexOptions.java",
"license": "apache-2.0",
"size": 16475
} | [
"com.mongodb.lang.Nullable",
"org.bson.conversions.Bson"
] | import com.mongodb.lang.Nullable; import org.bson.conversions.Bson; | import com.mongodb.lang.*; import org.bson.conversions.*; | [
"com.mongodb.lang",
"org.bson.conversions"
] | com.mongodb.lang; org.bson.conversions; | 892,019 |
public Manifest getManifest() throws java.io.IOException {
return (Manifest)getJarFile().getManifest().clone();
} | Manifest function() throws java.io.IOException { return (Manifest)getJarFile().getManifest().clone(); } | /**
* Answers the Manifest associated with the Jar URL
*
* @return java.util.jar.Manifest The JarFile's Manifest
*/ | Answers the Manifest associated with the Jar URL | getManifest | {
"repo_name": "freeVM/freeVM",
"path": "enhanced/archive/classlib/java6/modules/luni/src/main/java/java/net/JarURLConnection.java",
"license": "apache-2.0",
"size": 5772
} | [
"java.io.IOException",
"java.util.jar.Manifest"
] | import java.io.IOException; import java.util.jar.Manifest; | import java.io.*; import java.util.jar.*; | [
"java.io",
"java.util"
] | java.io; java.util; | 599,503 |
@Override
public void setProperties(Map<String,String> map) throws Exception {
super.setProperties(map);
String paths = map.get("trusted");
if (paths != null) {
for (String path : paths.split("\\s*,\\s*")) {
File file = IO.getFile(path);
if (file.isFile()) {
InputStream inStream = new FileInp... | void function(Map<String,String> map) throws Exception { super.setProperties(map); String paths = map.get(STR); if (paths != null) { for (String path : paths.split(STR)) { File file = IO.getFile(path); if (file.isFile()) { InputStream inStream = new FileInputStream(file); try { CertificateFactory cf = CertificateFactor... | /**
* Set the properties
*/ | Set the properties | setProperties | {
"repo_name": "joansmith/bnd",
"path": "biz.aQute.bndlib/src/aQute/bnd/url/HttpsVerification.java",
"license": "apache-2.0",
"size": 3713
} | [
"java.io.File",
"java.io.FileInputStream",
"java.io.InputStream",
"java.security.cert.CertificateFactory",
"java.security.cert.X509Certificate",
"java.util.Map"
] | import java.io.File; import java.io.FileInputStream; import java.io.InputStream; import java.security.cert.CertificateFactory; import java.security.cert.X509Certificate; import java.util.Map; | import java.io.*; import java.security.cert.*; import java.util.*; | [
"java.io",
"java.security",
"java.util"
] | java.io; java.security; java.util; | 185,106 |
private boolean isTransformableRule(QueryRule nestedRule, String expandAttribute) {
return nestedRule != null
&& nestedRule.getField() != null
&& nestedRule.getField().equals(expandAttribute)
&& (nestedRule.getOperator() == QueryRule.Operator.IN
|| nestedRule.getOperator() == Q... | boolean function(QueryRule nestedRule, String expandAttribute) { return nestedRule != null && nestedRule.getField() != null && nestedRule.getField().equals(expandAttribute) && (nestedRule.getOperator() == QueryRule.Operator.IN nestedRule.getOperator() == QueryRule.Operator.EQUALS); } | /**
* Returns <code>true</code> if a rule is 'IN' or 'EQUALS' on the attribute that should be
* expanded
*/ | Returns <code>true</code> if a rule is 'IN' or 'EQUALS' on the attribute that should be expanded | isTransformableRule | {
"repo_name": "marikaris/molgenis",
"path": "molgenis-data-icd10/src/main/java/org/molgenis/data/icd10/CollectionsQueryTransformerImpl.java",
"license": "lgpl-3.0",
"size": 3044
} | [
"org.molgenis.data.QueryRule"
] | import org.molgenis.data.QueryRule; | import org.molgenis.data.*; | [
"org.molgenis.data"
] | org.molgenis.data; | 2,501,930 |
public ServiceFuture<InboundNatRuleInner> getAsync(String resourceGroupName, String loadBalancerName, String inboundNatRuleName, String expand, final ServiceCallback<InboundNatRuleInner> serviceCallback) {
return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, loadBalancerName, inb... | ServiceFuture<InboundNatRuleInner> function(String resourceGroupName, String loadBalancerName, String inboundNatRuleName, String expand, final ServiceCallback<InboundNatRuleInner> serviceCallback) { return ServiceFuture.fromResponse(getWithServiceResponseAsync(resourceGroupName, loadBalancerName, inboundNatRuleName, ex... | /**
* Gets the specified load balancer inbound nat rule.
*
* @param resourceGroupName The name of the resource group.
* @param loadBalancerName The name of the load balancer.
* @param inboundNatRuleName The name of the inbound nat rule.
* @param expand Expands referenced resources.
* ... | Gets the specified load balancer inbound nat rule | getAsync | {
"repo_name": "selvasingh/azure-sdk-for-java",
"path": "sdk/network/mgmt-v2020_04_01/src/main/java/com/microsoft/azure/management/network/v2020_04_01/implementation/InboundNatRulesInner.java",
"license": "mit",
"size": 51227
} | [
"com.microsoft.rest.ServiceCallback",
"com.microsoft.rest.ServiceFuture"
] | import com.microsoft.rest.ServiceCallback; import com.microsoft.rest.ServiceFuture; | import com.microsoft.rest.*; | [
"com.microsoft.rest"
] | com.microsoft.rest; | 1,754,467 |
public static String runAnalysis(BuildEntry build) throws IOException {
Connector connector = Connector.getInstance();
String message = null;
try {
connector.beginConnection();
message = connector.runAnalysis(build);
}finally{
if(connector != null){
connector.endConnection();
}
}
return ... | static String function(BuildEntry build) throws IOException { Connector connector = Connector.getInstance(); String message = null; try { connector.beginConnection(); message = connector.runAnalysis(build); }finally{ if(connector != null){ connector.endConnection(); } } return message; } | /**
* Static version of {@see com.modeln.batam.connector.Connector#runAnalysis(BuildEntry) runAnalysis} function.
*
* @param build : {@link com.modeln.batam.connector.wrapper.BuildEntry BuildEntry} Object.
* @return published message.
* @throws IOException
*/ | Static version of com.modeln.batam.connector.Connector#runAnalysis(BuildEntry) runAnalysis function | runAnalysis | {
"repo_name": "ModelN/batam",
"path": "connectors/java-connector/src/main/java/com/modeln/batam/connector/ConnectorHelper.java",
"license": "mit",
"size": 28367
} | [
"com.modeln.batam.connector.wrapper.BuildEntry",
"java.io.IOException"
] | import com.modeln.batam.connector.wrapper.BuildEntry; import java.io.IOException; | import com.modeln.batam.connector.wrapper.*; import java.io.*; | [
"com.modeln.batam",
"java.io"
] | com.modeln.batam; java.io; | 1,756,966 |
String sList = null;
try {
URL urlBaz = new URL(url);
URLConnection con = urlBaz.openConnection();
InputStream in = con.getInputStream();
String encoding = con.getContentEncoding();
encoding = encoding == null ? "ISO-8859-1... | String sList = null; try { URL urlBaz = new URL(url); URLConnection con = urlBaz.openConnection(); InputStream in = con.getInputStream(); String encoding = con.getContentEncoding(); encoding = encoding == null ? STR : encoding; String body = IOUtils.toString(in, encoding); sList = body; } catch (Exception ex) { sbError... | /**
* With a copy of sitelistdown code, we have an encoding problem
* We change for a new code from https://stackoverflow.com/questions/5769717/how-can-i-get-an-http-response-body-as-a-string-in-java/5769756#5769756
* great article about encoding in java : https://www.codeflow.site/fr/article/java-char-... | With a copy of sitelistdown code, we have an encoding problem We change for a new code from HREF great article about encoding in java : HREF | askList | {
"repo_name": "giloutho/Logfly",
"path": "src/main/java/systemio/textdownload.java",
"license": "gpl-3.0",
"size": 2068
} | [
"java.io.InputStream",
"java.net.URLConnection",
"java.util.logging.Level",
"org.apache.commons.io.IOUtils"
] | import java.io.InputStream; import java.net.URLConnection; import java.util.logging.Level; import org.apache.commons.io.IOUtils; | import java.io.*; import java.net.*; import java.util.logging.*; import org.apache.commons.io.*; | [
"java.io",
"java.net",
"java.util",
"org.apache.commons"
] | java.io; java.net; java.util; org.apache.commons; | 974,293 |
public Rect getOverscanFrameLw(); | Rect function(); | /**
* Retrieve the frame of the area inside the overscan region of the
* display that this window was last laid out in. Must be called with the
* window manager lock held.
*
* @return Rect The rectangle holding the display overscan frame.
*/ | Retrieve the frame of the area inside the overscan region of the display that this window was last laid out in. Must be called with the window manager lock held | getOverscanFrameLw | {
"repo_name": "s20121035/rk3288_android5.1_repo",
"path": "frameworks/base/core/java/android/view/WindowManagerPolicy.java",
"license": "gpl-3.0",
"size": 51708
} | [
"android.graphics.Rect"
] | import android.graphics.Rect; | import android.graphics.*; | [
"android.graphics"
] | android.graphics; | 2,731,583 |
public Set<String> getDisallowEntity() {
return disallowEntity;
} | Set<String> function() { return disallowEntity; } | /**
* Returns the entity names allowed to be parsed, exception on violations.
*/ | Returns the entity names allowed to be parsed, exception on violations | getDisallowEntity | {
"repo_name": "ilscipio/scipio-erp",
"path": "framework/entity/src/org/ofbiz/entity/util/EntitySaxReader.java",
"license": "apache-2.0",
"size": 38543
} | [
"java.util.Set"
] | import java.util.Set; | import java.util.*; | [
"java.util"
] | java.util; | 2,695,592 |
public boolean isSupportedTransformation(ContentTransformer transformer, String sourceMimetype,
String targetMimetype, TransformationOptions options);
| boolean function(ContentTransformer transformer, String sourceMimetype, String targetMimetype, TransformationOptions options); | /**
* Returns true if the supplied mimetype transformation pair is allowed by the list of supported
* and unsupported transformations.
* @param transformer
* @param sourceMimetype
* @param targetMimetype
* @param options not currently used
*/ | Returns true if the supplied mimetype transformation pair is allowed by the list of supported and unsupported transformations | isSupportedTransformation | {
"repo_name": "Alfresco/alfresco-repository",
"path": "src/main/java/org/alfresco/repo/content/transform/TransformerConfig.java",
"license": "lgpl-3.0",
"size": 15683
} | [
"org.alfresco.service.cmr.repository.TransformationOptions"
] | import org.alfresco.service.cmr.repository.TransformationOptions; | import org.alfresco.service.cmr.repository.*; | [
"org.alfresco.service"
] | org.alfresco.service; | 962,672 |
public boolean othersInsertsAreVisible(int type) throws ResourceException; | boolean function(int type) throws ResourceException; | /**
* Indicates whether inserts made by others are visible.
*
* @param type type of the ResultSet i.e. ResultSet.TYPE_XXX
* @return true if inserts by others are visible for the
* ResultSet type; false otherwise
* @throws ResourceException Failed to ... | Indicates whether inserts made by others are visible | othersInsertsAreVisible | {
"repo_name": "darranl/ironjacamar",
"path": "api/src/main/java/javax/resource/cci/ResultSetInfo.java",
"license": "epl-1.0",
"size": 6903
} | [
"javax.resource.ResourceException"
] | import javax.resource.ResourceException; | import javax.resource.*; | [
"javax.resource"
] | javax.resource; | 660,442 |
public void validateUpdatePermission(final Permission permission, final Long permissionId) {
if (ValidatorUtil.isNull(permissionId)) {
LOGGER.warn("Validation fail for permission(permission_id: " + permissionId + "). Error: "
+ messageUtil.getAttributeNotNull("permission... | void function(final Permission permission, final Long permissionId) { if (ValidatorUtil.isNull(permissionId)) { LOGGER.warn(STR + permissionId + STR + messageUtil.getAttributeNotNull(STR)); throw new RequestValidationException(messageUtil.getAttributeNotNull(STR)); } else if (ValidatorUtil.isNull(permission.getName()) ... | /**
* Validate update permission.
*
* @param permission the permission
* @param permissionId the permission id
*/ | Validate update permission | validateUpdatePermission | {
"repo_name": "jonvestal/open-kilda",
"path": "src-gui/src/main/java/org/usermanagement/validator/PermissionValidator.java",
"license": "apache-2.0",
"size": 4606
} | [
"org.usermanagement.dao.entity.PermissionEntity",
"org.usermanagement.exception.RequestValidationException",
"org.usermanagement.model.Permission",
"org.usermanagement.util.ValidatorUtil"
] | import org.usermanagement.dao.entity.PermissionEntity; import org.usermanagement.exception.RequestValidationException; import org.usermanagement.model.Permission; import org.usermanagement.util.ValidatorUtil; | import org.usermanagement.dao.entity.*; import org.usermanagement.exception.*; import org.usermanagement.model.*; import org.usermanagement.util.*; | [
"org.usermanagement.dao",
"org.usermanagement.exception",
"org.usermanagement.model",
"org.usermanagement.util"
] | org.usermanagement.dao; org.usermanagement.exception; org.usermanagement.model; org.usermanagement.util; | 1,788,077 |
@Override
void close() throws IOException; | void close() throws IOException; | /**
* Closes this responder which signals the end of the chunk response.
*/ | Closes this responder which signals the end of the chunk response | close | {
"repo_name": "cdapio/netty-http",
"path": "src/main/java/io/cdap/http/ChunkResponder.java",
"license": "apache-2.0",
"size": 1730
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 444,465 |
@ServiceMethod(returns = ReturnType.SINGLE)
private Mono<PagedResponse<SensitivityLabelInner>> listRecommendedNextSinglePageAsync(String nextLink) {
if (nextLink == null) {
return Mono.error(new IllegalArgumentException("Parameter nextLink is required and cannot be null."));
}
... | @ServiceMethod(returns = ReturnType.SINGLE) Mono<PagedResponse<SensitivityLabelInner>> function(String nextLink) { if (nextLink == null) { return Mono.error(new IllegalArgumentException(STR)); } if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException( STR)); } final String accept = STR... | /**
* Get the next page of items.
*
* @param nextLink The nextLink parameter.
* @throws IllegalArgumentException thrown if parameters fail the validation.
* @throws ManagementException thrown if the request is rejected by server.
* @throws RuntimeException all other wrapped checked excepti... | Get the next page of items | listRecommendedNextSinglePageAsync | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/synapse/azure-resourcemanager-synapse/src/main/java/com/azure/resourcemanager/synapse/implementation/SqlPoolSensitivityLabelsClientImpl.java",
"license": "mit",
"size": 109648
} | [
"com.azure.core.annotation.ReturnType",
"com.azure.core.annotation.ServiceMethod",
"com.azure.core.http.rest.PagedResponse",
"com.azure.core.http.rest.PagedResponseBase",
"com.azure.core.util.FluxUtil",
"com.azure.resourcemanager.synapse.fluent.models.SensitivityLabelInner"
] | import com.azure.core.annotation.ReturnType; import com.azure.core.annotation.ServiceMethod; import com.azure.core.http.rest.PagedResponse; import com.azure.core.http.rest.PagedResponseBase; import com.azure.core.util.FluxUtil; import com.azure.resourcemanager.synapse.fluent.models.SensitivityLabelInner; | import com.azure.core.annotation.*; import com.azure.core.http.rest.*; import com.azure.core.util.*; import com.azure.resourcemanager.synapse.fluent.models.*; | [
"com.azure.core",
"com.azure.resourcemanager"
] | com.azure.core; com.azure.resourcemanager; | 582,644 |
private Waypoint_c createWaypointForPreBP7_1LineSegment(
boolean start, int x, int y,
LineSegment_c segment, Graphedge_c edge, Waypoint_c previousWaypoint)
{
// create the waypoint instance with the given positional data
Waypoint_c waypoint = new Waypoint_c(getGraphicsModelRoot()... | Waypoint_c function( boolean start, int x, int y, LineSegment_c segment, Graphedge_c edge, Waypoint_c previousWaypoint) { Waypoint_c waypoint = new Waypoint_c(getGraphicsModelRoot()); waypoint.setPositionx(x); waypoint.setPositiony(y); if (start) waypoint.relateAcrossR21To(segment); else waypoint.relateAcrossR22To(segm... | /**
* Creates a new waypoint to hold the given positional data for the given
* end (specified by 'start') of the given segment, which is part of
* the given graph-edge containing the given previous-waypoint.
*/ | Creates a new waypoint to hold the given positional data for the given end (specified by 'start') of the given segment, which is part of the given graph-edge containing the given previous-waypoint | createWaypointForPreBP7_1LineSegment | {
"repo_name": "HebaKhaled/bridgepoint",
"path": "src/org.xtuml.bp.io.core/src/org/xtuml/bp/io/core/ImportHelper.java",
"license": "apache-2.0",
"size": 113550
} | [
"java.util.ArrayList",
"java.util.List",
"java.util.Vector"
] | import java.util.ArrayList; import java.util.List; import java.util.Vector; | import java.util.*; | [
"java.util"
] | java.util; | 2,026,351 |
protected JButton createDecreaseButton(int orientation) {
return new TinyScrollButton(orientation, this);
} | JButton function(int orientation) { return new TinyScrollButton(orientation, this); } | /**
* Creates the decrease button of the scrollbar.
*
* @param orientation
* The button's orientation.
* @return The created button.
*/ | Creates the decrease button of the scrollbar | createDecreaseButton | {
"repo_name": "scratchduino/scratch2",
"path": "java/src/de/muntjak/tinylookandfeel/TinyScrollBarUI.java",
"license": "gpl-2.0",
"size": 26363
} | [
"javax.swing.JButton"
] | import javax.swing.JButton; | import javax.swing.*; | [
"javax.swing"
] | javax.swing; | 2,022,679 |
public void initialize() throws Exception {
logger.info("Attempting to initialize resource.");
Resource resource = find(null);
if (resource == null) {
logger.error("Unable to initialize resource!");
} else {
logger.info("Successfully initialized resource.");
}
}
| void function() throws Exception { logger.info(STR); Resource resource = find(null); if (resource == null) { logger.error(STR); } else { logger.info(STR); } } | /**
* Initialze the singleton resource, when the home is initialized.
*/ | Initialze the singleton resource, when the home is initialized | initialize | {
"repo_name": "jmchilton/TINT",
"path": "projects/TropixStorageCaGridService/cagrid/src/edu/umn/msi/tropix/storage/cagrid/service/globus/resource/TropixStorageResourceHome.java",
"license": "epl-1.0",
"size": 3109
} | [
"org.globus.wsrf.Resource"
] | import org.globus.wsrf.Resource; | import org.globus.wsrf.*; | [
"org.globus.wsrf"
] | org.globus.wsrf; | 1,350,825 |
public void clickButton(By locator, String message, int timeout) {
try {
// waitForElementToBeVisible(locator);
waitForElementAndPoll(locator);
LazyWebElement element = null;
if (timeout != 0) {
element = new LazyWebElement(getWebDriver(), locator, timeout);
} else {
element = new LazyWebEle... | void function(By locator, String message, int timeout) { try { waitForElementAndPoll(locator); LazyWebElement element = null; if (timeout != 0) { element = new LazyWebElement(getWebDriver(), locator, timeout); } else { element = new LazyWebElement(getWebDriver(), locator); } clickButton(element, true); } catch (NoSuchE... | /**
* Click button.
*
* @param locator
* the locator
* @param message
* the message
* @param timeout
* the timeout
*/ | Click button | clickButton | {
"repo_name": "confluxtoo/finflux_automation_test",
"path": "FinfluxTestAutomation/src/test/java/com/mifos/pages/MifosWebPage.java",
"license": "mpl-2.0",
"size": 63024
} | [
"com.mifos.testing.framework.webdriver.LazyWebElement",
"org.junit.Assert",
"org.openqa.selenium.By",
"org.openqa.selenium.NoSuchElementException"
] | import com.mifos.testing.framework.webdriver.LazyWebElement; import org.junit.Assert; import org.openqa.selenium.By; import org.openqa.selenium.NoSuchElementException; | import com.mifos.testing.framework.webdriver.*; import org.junit.*; import org.openqa.selenium.*; | [
"com.mifos.testing",
"org.junit",
"org.openqa.selenium"
] | com.mifos.testing; org.junit; org.openqa.selenium; | 1,876,095 |
public Map getPaginationLinks() {
Map links = new HashMap();
if (pageSize > 0 && dataset.size() > 0 && getTotalDataSetSize() > pageSize) {
String pageLinkName = "list_" + uniqueName + "_page";
String[] data = new String[4];
if (!isFirstPage()) {
da... | Map function() { Map links = new HashMap(); if (pageSize > 0 && dataset.size() > 0 && getTotalDataSetSize() > pageSize) { String pageLinkName = "list_" + uniqueName + "_page"; String[] data = new String[4]; if (!isFirstPage()) { data[0] = ICON_FIRST; data[1] = pageLinkName + STR; data[2] = "first"; data[3] = STR; } els... | /**
* Builds a map of bog-standard pagination links complete with images
* @return map (String, String[])
*/ | Builds a map of bog-standard pagination links complete with images | getPaginationLinks | {
"repo_name": "hustodemon/spacewalk",
"path": "java/code/src/com/redhat/rhn/frontend/taglibs/list/DataSetManipulator.java",
"license": "gpl-2.0",
"size": 19148
} | [
"java.util.HashMap",
"java.util.Map"
] | import java.util.HashMap; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 2,891,301 |
Collection<Map.Entry<K, V>> entries(); | Collection<Map.Entry<K, V>> entries(); | /**
* Returns a view collection of all key-value pairs contained in this
* multimap, as {@link Map.Entry} instances.
*
* <p>Changes to the returned collection or the entries it contains will
* update the underlying multimap, and vice versa. However, <i>adding</i> to
* the returned collection is not po... | Returns a view collection of all key-value pairs contained in this multimap, as <code>Map.Entry</code> instances. Changes to the returned collection or the entries it contains will update the underlying multimap, and vice versa. However, adding to the returned collection is not possible | entries | {
"repo_name": "maxvetrenko/guava-libraries-17-0",
"path": "guava/src/com/google/common/collect/Multimap.java",
"license": "apache-2.0",
"size": 14584
} | [
"java.util.Collection",
"java.util.Map"
] | import java.util.Collection; import java.util.Map; | import java.util.*; | [
"java.util"
] | java.util; | 1,619,725 |
public static void print(Object object) {
if (Log.DEBUG > DEBUG_LEVEL) {
String tag = getClassName();
String method = callMethodAndLine();
String content = "";
if (object != null) {
content = object.toString() + " ---- "
... | static void function(Object object) { if (Log.DEBUG > DEBUG_LEVEL) { String tag = getClassName(); String method = callMethodAndLine(); String content = STR ---- STR ## STR ---- STR STR " + method); } } } | /**
* Send a {@link #DEBUG_LEVEL} log message.
*
* @param object The object to print.
*/ | Send a <code>#DEBUG_LEVEL</code> log message | print | {
"repo_name": "FreedomZZQ/YouJoin-Android",
"path": "app/src/main/java/me/zq/youjoin/utils/LogUtils.java",
"license": "mit",
"size": 10134
} | [
"android.util.Log"
] | import android.util.Log; | import android.util.*; | [
"android.util"
] | android.util; | 206,138 |
public void forEach(Consumer<R> consumer) {
if (that.isRight()) {
consumer.accept(get());
}
} | void function(Consumer<R> consumer) { if (that.isRight()) { consumer.accept(get()); } } | /**
* Consumes the right value if Either is right. Will not do any effect otherwise
* @param consumer
*/ | Consumes the right value if Either is right. Will not do any effect otherwise | forEach | {
"repo_name": "tiranuom/java8-functional-helpers",
"path": "src/main/java/org/tix/functional/Either.java",
"license": "mit",
"size": 12893
} | [
"java.util.function.Consumer"
] | import java.util.function.Consumer; | import java.util.function.*; | [
"java.util"
] | java.util; | 2,826,519 |
public void testDelayAssignmentAffinityChanged() throws Exception {
Ignite ignite0 = startServer(0, 1);
TestTcpDiscoverySpi discoSpi0 =
(TestTcpDiscoverySpi)ignite0.configuration().getDiscoverySpi();
TestRecordingCommunicationSpi commSpi0 =
(TestRecordingCommunicatio... | void function() throws Exception { Ignite ignite0 = startServer(0, 1); TestTcpDiscoverySpi discoSpi0 = (TestTcpDiscoverySpi)ignite0.configuration().getDiscoverySpi(); TestRecordingCommunicationSpi commSpi0 = (TestRecordingCommunicationSpi)ignite0.configuration().getCommunicationSpi(); startClient(1, 2); checkAffinity(2... | /**
* Wait for rebalance, send affinity change message, but affinity already changed (new node joined).
*
* @throws Exception If failed.
*/ | Wait for rebalance, send affinity change message, but affinity already changed (new node joined) | testDelayAssignmentAffinityChanged | {
"repo_name": "afinka77/ignite",
"path": "modules/core/src/test/java/org/apache/ignite/internal/processors/cache/distributed/CacheLateAffinityAssignmentTest.java",
"license": "apache-2.0",
"size": 78793
} | [
"org.apache.ignite.Ignite",
"org.apache.ignite.internal.TestRecordingCommunicationSpi"
] | import org.apache.ignite.Ignite; import org.apache.ignite.internal.TestRecordingCommunicationSpi; | import org.apache.ignite.*; import org.apache.ignite.internal.*; | [
"org.apache.ignite"
] | org.apache.ignite; | 1,024,197 |
public void doRead_add_submission_form(RunData data)
{
String option = data.getParameters().getString("option");
if ("cancel".equals(option))
{
// cancel
doCancel_show_submission(data);
}
else if ("preview".equals(option))
{
// preview
doPreview_submission(data);
}
else if ("save".equals... | void function(RunData data) { String option = data.getParameters().getString(STR); if (STR.equals(option)) { doCancel_show_submission(data); } else if (STR.equals(option)) { doPreview_submission(data); } else if ("save".equals(option)) { doSave_submission(data); } else if ("post".equals(option)) { doPost_submission(dat... | /**
* Dispatch function inside add submission page
*/ | Dispatch function inside add submission page | doRead_add_submission_form | {
"repo_name": "frasese/sakai",
"path": "assignment/assignment-tool/tool/src/java/org/sakaiproject/assignment/tool/AssignmentAction.java",
"license": "apache-2.0",
"size": 686269
} | [
"org.sakaiproject.cheftool.RunData",
"org.sakaiproject.content.api.FilePickerHelper",
"org.sakaiproject.site.cover.SiteService",
"org.sakaiproject.tool.api.ToolSession",
"org.sakaiproject.tool.cover.SessionManager"
] | import org.sakaiproject.cheftool.RunData; import org.sakaiproject.content.api.FilePickerHelper; import org.sakaiproject.site.cover.SiteService; import org.sakaiproject.tool.api.ToolSession; import org.sakaiproject.tool.cover.SessionManager; | import org.sakaiproject.cheftool.*; import org.sakaiproject.content.api.*; import org.sakaiproject.site.cover.*; import org.sakaiproject.tool.api.*; import org.sakaiproject.tool.cover.*; | [
"org.sakaiproject.cheftool",
"org.sakaiproject.content",
"org.sakaiproject.site",
"org.sakaiproject.tool"
] | org.sakaiproject.cheftool; org.sakaiproject.content; org.sakaiproject.site; org.sakaiproject.tool; | 1,497,009 |
@Test
public void testShortenString() {
System.out.println("shortenString");
String orig = "12345";
int charsToRemove = 0;
String expResult = orig;
String result = Utils.shortenString(orig, charsToRemove);
assertEquals(expResult, result);
assertTrue("12..... | void function() { System.out.println(STR); String orig = "12345"; int charsToRemove = 0; String expResult = orig; String result = Utils.shortenString(orig, charsToRemove); assertEquals(expResult, result); assertTrue(STR.equals(Utils.shortenString(orig, 1))); assertTrue(STR.equals(Utils.shortenString(orig, 2))); assertT... | /**
* Test of shortenString method, of class Utils.
*/ | Test of shortenString method, of class Utils | testShortenString | {
"repo_name": "gburca/VirtMus",
"path": "VirtMus/test/unit/src/com/ebixio/virtmus/UtilsTest.java",
"license": "gpl-2.0",
"size": 10770
} | [
"org.junit.Assert"
] | import org.junit.Assert; | import org.junit.*; | [
"org.junit"
] | org.junit; | 155,968 |
List<HBaseProtos.SnapshotDescription> listSnapshots() throws IOException; | List<HBaseProtos.SnapshotDescription> listSnapshots() throws IOException; | /**
* List completed snapshots.
*
* @return a list of snapshot descriptors for completed snapshots
* @throws IOException if a network error occurs
*/ | List completed snapshots | listSnapshots | {
"repo_name": "juwi/hbase",
"path": "hbase-client/src/main/java/org/apache/hadoop/hbase/client/Admin.java",
"license": "apache-2.0",
"size": 64785
} | [
"java.io.IOException",
"java.util.List",
"org.apache.hadoop.hbase.protobuf.generated.HBaseProtos"
] | import java.io.IOException; import java.util.List; import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos; | import java.io.*; import java.util.*; import org.apache.hadoop.hbase.protobuf.generated.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 2,507,189 |
public SyncTreeEntry createHeadRecursive(Collection<SyncNodeElement> nodeElements, final SyncHashCache shc, SyncNodeCache cache, int depth) {
SyncTreeEntry ste = null;
ArrayList<SyncNodeElement> nextElements = new ArrayList<SyncNodeElement>();
do {
ste = newNodeOfNodes(nodeElements, shc, cache, depth);
n... | SyncTreeEntry function(Collection<SyncNodeElement> nodeElements, final SyncHashCache shc, SyncNodeCache cache, int depth) { SyncTreeEntry ste = null; ArrayList<SyncNodeElement> nextElements = new ArrayList<SyncNodeElement>(); do { ste = newNodeOfNodes(nodeElements, shc, cache, depth); nextElements.add(new SyncNodeEleme... | /**
* Create a sync tree from the input collection of elements
* @param nodeElements the elements
* @param shc hash cache
* @param cache node cache
* @param depth starting depth (but when called nonrecursively I think it will always be 2).
* @return
*/ | Create a sync tree from the input collection of elements | createHeadRecursive | {
"repo_name": "MobileCloudNetworking/icnaas",
"path": "mcn-ccn-router/ccnx-0.8.2/javasrc/src/main/org/ccnx/ccn/impl/sync/NodeBuilder.java",
"license": "apache-2.0",
"size": 11476
} | [
"java.util.ArrayList",
"java.util.Collection",
"java.util.logging.Level",
"org.ccnx.ccn.impl.support.Log",
"org.ccnx.ccn.io.content.SyncNodeComposite",
"org.ccnx.ccn.protocol.Component"
] | import java.util.ArrayList; import java.util.Collection; import java.util.logging.Level; import org.ccnx.ccn.impl.support.Log; import org.ccnx.ccn.io.content.SyncNodeComposite; import org.ccnx.ccn.protocol.Component; | import java.util.*; import java.util.logging.*; import org.ccnx.ccn.impl.support.*; import org.ccnx.ccn.io.content.*; import org.ccnx.ccn.protocol.*; | [
"java.util",
"org.ccnx.ccn"
] | java.util; org.ccnx.ccn; | 2,674,531 |
public void setBaselineChecks(List baselineChecks) {
this.baselineChecks = baselineChecks;
} | void function(List baselineChecks) { this.baselineChecks = baselineChecks; } | /**
* Sets the current List of baseline checks to the given List
*
* @param baselineChecks
*/ | Sets the current List of baseline checks to the given List | setBaselineChecks | {
"repo_name": "bhutchinson/kfs",
"path": "kfs-core/src/main/java/org/kuali/kfs/fp/businessobject/CashieringTransaction.java",
"license": "agpl-3.0",
"size": 18290
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,027,698 |
@Test
public void testUnrecoverableErrorCheck() {
// normal error
assertFalse(ExecutionFailureHandler.isUnrecoverableError(new Exception()));
// direct unrecoverable error
assertTrue(ExecutionFailureHandler.isUnrecoverableError(new SuppressRestartsException(new Exception())));
// nested unrecoverable er... | void function() { assertFalse(ExecutionFailureHandler.isUnrecoverableError(new Exception())); assertTrue(ExecutionFailureHandler.isUnrecoverableError(new SuppressRestartsException(new Exception()))); assertTrue(ExecutionFailureHandler.isUnrecoverableError( new Exception(new SuppressRestartsException(new Exception()))))... | /**
* Tests the check for unrecoverable error.
*/ | Tests the check for unrecoverable error | testUnrecoverableErrorCheck | {
"repo_name": "gyfora/flink",
"path": "flink-runtime/src/test/java/org/apache/flink/runtime/executiongraph/failover/flip1/ExecutionFailureHandlerTest.java",
"license": "apache-2.0",
"size": 6858
} | [
"org.apache.flink.runtime.execution.SuppressRestartsException",
"org.junit.Assert"
] | import org.apache.flink.runtime.execution.SuppressRestartsException; import org.junit.Assert; | import org.apache.flink.runtime.execution.*; import org.junit.*; | [
"org.apache.flink",
"org.junit"
] | org.apache.flink; org.junit; | 1,484,312 |
protected CSAuthorityFactory getCSAuthorityFactory(final String code) throws FactoryException {
if (csFactory == null) {
throw missingFactory(CSAuthorityFactory.class, code);
}
return csFactory;
} | CSAuthorityFactory function(final String code) throws FactoryException { if (csFactory == null) { throw missingFactory(CSAuthorityFactory.class, code); } return csFactory; } | /**
* Returns the coordinate system factory to use for the specified code. The default
* implementation always returns the factory specified at construction time. Subclasses can
* override this method in order to select a different factory implementation depending on the
* code value.
*
* ... | Returns the coordinate system factory to use for the specified code. The default implementation always returns the factory specified at construction time. Subclasses can override this method in order to select a different factory implementation depending on the code value | getCSAuthorityFactory | {
"repo_name": "geotools/geotools",
"path": "modules/library/referencing/src/main/java/org/geotools/referencing/factory/AuthorityFactoryAdapter.java",
"license": "lgpl-2.1",
"size": 54063
} | [
"org.opengis.referencing.FactoryException",
"org.opengis.referencing.cs.CSAuthorityFactory"
] | import org.opengis.referencing.FactoryException; import org.opengis.referencing.cs.CSAuthorityFactory; | import org.opengis.referencing.*; import org.opengis.referencing.cs.*; | [
"org.opengis.referencing"
] | org.opengis.referencing; | 698,283 |
@Test
public void testLatestMilestone2() throws Exception {
// mod9.2 depends on latest.milestone of mod6.2, but there is no milestone
ResolveReport report = ivy.resolve(new File(
"test/repositories/1/org9/mod9.2/ivys/ivy-1.2.xml"),
getResolveOptions(new String[] {"de... | void function() throws Exception { ResolveReport report = ivy.resolve(new File( STR), getResolveOptions(new String[] {STR})); assertTrue(report.hasError()); ConfigurationResolveReport crr = report.getConfigurationReport(STR); assertNotNull(crr); assertEquals(0, crr.getArtifactsNumber()); } | /**
* Test case for IVY-318.
*
* @throws Exception if something goes wrong
* @see <a href="https://issues.apache.org/jira/browse/IVY-318">IVY-318</a>
*/ | Test case for IVY-318 | testLatestMilestone2 | {
"repo_name": "twogee/ant-ivy",
"path": "test/java/org/apache/ivy/core/resolve/ResolveTest.java",
"license": "apache-2.0",
"size": 306179
} | [
"java.io.File",
"org.apache.ivy.core.report.ConfigurationResolveReport",
"org.apache.ivy.core.report.ResolveReport",
"org.junit.Assert"
] | import java.io.File; import org.apache.ivy.core.report.ConfigurationResolveReport; import org.apache.ivy.core.report.ResolveReport; import org.junit.Assert; | import java.io.*; import org.apache.ivy.core.report.*; import org.junit.*; | [
"java.io",
"org.apache.ivy",
"org.junit"
] | java.io; org.apache.ivy; org.junit; | 884,171 |
public void update(ViewerCell cell) {
cell.setText(getValue((MarkerItem) cell.getElement()));
cell.setImage(null);
} | void function(ViewerCell cell) { cell.setText(getValue((MarkerItem) cell.getElement())); cell.setImage(null); } | /**
* Update the contents of the cell.
*
* @param cell
*/ | Update the contents of the cell | update | {
"repo_name": "elucash/eclipse-oxygen",
"path": "org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/MarkerField.java",
"license": "epl-1.0",
"size": 8421
} | [
"org.eclipse.jface.viewers.ViewerCell"
] | import org.eclipse.jface.viewers.ViewerCell; | import org.eclipse.jface.viewers.*; | [
"org.eclipse.jface"
] | org.eclipse.jface; | 2,441,298 |
public static TapProducer makeTapJunitProducer(String name) {
return new TapProducer(new TapJunitRepresenter(name));
} | static TapProducer function(String name) { return new TapProducer(new TapJunitRepresenter(name)); } | /**
* Create a TAP JUnit producer.
*
* @param name JUnit file name
* @return TapProducer
*/ | Create a TAP JUnit producer | makeTapJunitProducer | {
"repo_name": "tupilabs/tap4j",
"path": "src/main/java/org/tap4j/producer/TapProducerFactory.java",
"license": "mit",
"size": 2626
} | [
"org.tap4j.representer.TapJunitRepresenter"
] | import org.tap4j.representer.TapJunitRepresenter; | import org.tap4j.representer.*; | [
"org.tap4j.representer"
] | org.tap4j.representer; | 1,946,926 |
public void goToMainActivity(final String login, final String password) {
final Intent intent = new Intent(LoginActivity.this, MainActivity.class);
intent.putExtra("login", login);
intent.putExtra("password", password);
this.startActivity(intent);
LoginActivity.this.finish();
}; | void function(final String login, final String password) { final Intent intent = new Intent(LoginActivity.this, MainActivity.class); intent.putExtra("login", login); intent.putExtra(STR, password); this.startActivity(intent); LoginActivity.this.finish(); }; | /**
* Opens up a new main activity, passing it login and password.
*
* @param login
* the login
* @param password
* the password
*/ | Opens up a new main activity, passing it login and password | goToMainActivity | {
"repo_name": "bmteam/pink-ponies",
"path": "PinkPoniesApp/src/ru/pinkponies/app/LoginActivity.java",
"license": "bsd-3-clause",
"size": 2637
} | [
"android.content.Intent"
] | import android.content.Intent; | import android.content.*; | [
"android.content"
] | android.content; | 95,687 |
public CommandLine addArgument(final String argument, boolean handleQuoting) {
if (argument == null)
{
return this;
}
// check if we can really quote the argument - if not throw an
// IllegalArgumentException
if (handleQuoting)
{
StringUtils.qu... | CommandLine function(final String argument, boolean handleQuoting) { if (argument == null) { return this; } if (handleQuoting) { StringUtils.quoteArgument(argument); } arguments.add(new Argument(argument, handleQuoting)); return this; } | /**
* Add a single argument.
*
* @param argument The argument to add
* @param handleQuoting Add the argument with/without handling quoting
* @return The command line itself
*/ | Add a single argument | addArgument | {
"repo_name": "deim0s/XWBEx",
"path": "src/org/apache/commons/exec/CommandLine.java",
"license": "mit",
"size": 13667
} | [
"org.apache.commons.exec.util.StringUtils"
] | import org.apache.commons.exec.util.StringUtils; | import org.apache.commons.exec.util.*; | [
"org.apache.commons"
] | org.apache.commons; | 96,596 |
public void setKeyStore(KeyStore keyStore) {
// do nothing
} | void function(KeyStore keyStore) { } | /**
* Method called by WebSphere Application Server runtime to set the SSL
* KeyStore used for this connection.
*
* @param keyStore
* - the KeyStore currently configured
*/ | Method called by WebSphere Application Server runtime to set the SSL KeyStore used for this connection | setKeyStore | {
"repo_name": "OpenLiberty/open-liberty",
"path": "dev/com.ibm.ws.ssl/src/com/ibm/ws/ssl/core/CertMappingKeyManager.java",
"license": "epl-1.0",
"size": 11449
} | [
"java.security.KeyStore"
] | import java.security.KeyStore; | import java.security.*; | [
"java.security"
] | java.security; | 2,564,518 |
public void moveToCurrentRow() throws SQLException {
throw new NotUpdatable();
} | void function() throws SQLException { throw new NotUpdatable(); } | /**
* JDBC 2.0 Move the cursor to the remembered cursor position, usually the
* current row. Has no effect unless the cursor is on the insert row.
*
* @exception SQLException
* if a database-access error occurs, or the result set is
* not updatable
* @th... | JDBC 2.0 Move the cursor to the remembered cursor position, usually the current row. Has no effect unless the cursor is on the insert row | moveToCurrentRow | {
"repo_name": "martingh15/TPJava",
"path": "TPJavaNotebook/mysql-connector-java-5.1.39/src/com/mysql/jdbc/ResultSetImpl.java",
"license": "mpl-2.0",
"size": 288777
} | [
"java.sql.SQLException"
] | import java.sql.SQLException; | import java.sql.*; | [
"java.sql"
] | java.sql; | 695,230 |
public void setPixelPath(String pixelPath, SetConfigCallback setConfigCallback, boolean... sync) {
if (TextUtils.isEmpty(pixelPath)) {
Tool.executeCallback(listener, Tool.CallbackType.WARNING, "Bad value for pixel path, default value retained");
} else {
setConfig(TrackerConf... | void function(String pixelPath, SetConfigCallback setConfigCallback, boolean... sync) { if (TextUtils.isEmpty(pixelPath)) { Tool.executeCallback(listener, Tool.CallbackType.WARNING, STR); } else { setConfig(TrackerConfigurationKeys.PIXEL_PATH, pixelPath, setConfigCallback, sync); } } | /**
* Set new pixel path
*
* @param pixelPath request path to get pixel
* @param setConfigCallback Callback called when the operation has been done
* @param sync (optional) perform the operation synchronously (default: false)
*/ | Set new pixel path | setPixelPath | {
"repo_name": "at-internet/atinternet-android-sdk",
"path": "ATMobileAnalytics/Tracker/src/main/java/com/atinternet/tracker/Tracker.java",
"license": "mit",
"size": 58353
} | [
"android.text.TextUtils"
] | import android.text.TextUtils; | import android.text.*; | [
"android.text"
] | android.text; | 1,261,483 |
public static long getMinSplitSize(JobContext job) {
return job.getConfiguration().getLong(SPLIT_MINSIZE, 1L);
} | static long function(JobContext job) { return job.getConfiguration().getLong(SPLIT_MINSIZE, 1L); } | /**
* Get the minimum split size
* @param job the job
* @return the minimum number of bytes that can be in a split
*/ | Get the minimum split size | getMinSplitSize | {
"repo_name": "bysslord/hadoop",
"path": "hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/main/java/org/apache/hadoop/mapreduce/lib/input/FileInputFormat.java",
"license": "apache-2.0",
"size": 20816
} | [
"org.apache.hadoop.mapreduce.JobContext"
] | import org.apache.hadoop.mapreduce.JobContext; | import org.apache.hadoop.mapreduce.*; | [
"org.apache.hadoop"
] | org.apache.hadoop; | 134,998 |
public static CloudBigtableScanConfiguration fromConfig(
CloudBigtableTableConfiguration config, Scan scan) {
CloudBigtableScanConfiguration.Builder builder = new CloudBigtableScanConfiguration.Builder();
config.copyConfig(builder);
return builder.withScan(scan).build();
}
public static clas... | static CloudBigtableScanConfiguration function( CloudBigtableTableConfiguration config, Scan scan) { CloudBigtableScanConfiguration.Builder builder = new CloudBigtableScanConfiguration.Builder(); config.copyConfig(builder); return builder.withScan(scan).build(); } public static class Builder extends CloudBigtableTableC... | /**
* Converts a {@link CloudBigtableTableConfiguration} object to a {@link
* CloudBigtableScanConfiguration} that will perform the specified {@link Scan} on the table.
*
* @param config The {@link CloudBigtableTableConfiguration} object.
* @param scan The {@link Scan} to add to the configuration.
* @... | Converts a <code>CloudBigtableTableConfiguration</code> object to a <code>CloudBigtableScanConfiguration</code> that will perform the specified <code>Scan</code> on the table | fromConfig | {
"repo_name": "sduskis/cloud-bigtable-client",
"path": "bigtable-dataflow-parent/bigtable-hbase-beam/src/main/java/com/google/cloud/bigtable/beam/CloudBigtableScanConfiguration.java",
"license": "apache-2.0",
"size": 13907
} | [
"com.google.bigtable.repackaged.com.google.bigtable.v2.ReadRowsRequest",
"org.apache.beam.sdk.options.ValueProvider",
"org.apache.hadoop.hbase.client.Scan"
] | import com.google.bigtable.repackaged.com.google.bigtable.v2.ReadRowsRequest; import org.apache.beam.sdk.options.ValueProvider; import org.apache.hadoop.hbase.client.Scan; | import com.google.bigtable.repackaged.com.google.bigtable.v2.*; import org.apache.beam.sdk.options.*; import org.apache.hadoop.hbase.client.*; | [
"com.google.bigtable",
"org.apache.beam",
"org.apache.hadoop"
] | com.google.bigtable; org.apache.beam; org.apache.hadoop; | 2,596,545 |
private void parseAdvertisements() {
List advertisements = new ArrayList();
Enumeration eachResponse = getResponses();
while (eachResponse.hasMoreElements()) {
Object response = eachResponse.nextElement();
if (response instanceof String) {
String s... | void function() { List advertisements = new ArrayList(); Enumeration eachResponse = getResponses(); while (eachResponse.hasMoreElements()) { Object response = eachResponse.nextElement(); if (response instanceof String) { String str = (String) response; try { Advertisement adv = (Advertisement) AdvertisementFactory.newA... | /**
* Description of the Method
*/ | Description of the Method | parseAdvertisements | {
"repo_name": "idega/net.jxta",
"path": "src/java/net/jxta/impl/protocol/DiscoveryResponse.java",
"license": "gpl-3.0",
"size": 16891
} | [
"java.io.InputStream",
"java.io.StringReader",
"java.util.ArrayList",
"java.util.Enumeration",
"java.util.List",
"net.jxta.document.Advertisement",
"net.jxta.document.AdvertisementFactory",
"net.jxta.document.MimeMediaType",
"org.apache.log4j.Level"
] | import java.io.InputStream; import java.io.StringReader; import java.util.ArrayList; import java.util.Enumeration; import java.util.List; import net.jxta.document.Advertisement; import net.jxta.document.AdvertisementFactory; import net.jxta.document.MimeMediaType; import org.apache.log4j.Level; | import java.io.*; import java.util.*; import net.jxta.document.*; import org.apache.log4j.*; | [
"java.io",
"java.util",
"net.jxta.document",
"org.apache.log4j"
] | java.io; java.util; net.jxta.document; org.apache.log4j; | 587,848 |
GroupIdInformationInner innerModel(); | GroupIdInformationInner innerModel(); | /**
* Gets the inner com.azure.resourcemanager.digitaltwins.fluent.models.GroupIdInformationInner object.
*
* @return the inner object.
*/ | Gets the inner com.azure.resourcemanager.digitaltwins.fluent.models.GroupIdInformationInner object | innerModel | {
"repo_name": "Azure/azure-sdk-for-java",
"path": "sdk/digitaltwins/azure-resourcemanager-digitaltwins/src/main/java/com/azure/resourcemanager/digitaltwins/models/GroupIdInformation.java",
"license": "mit",
"size": 1165
} | [
"com.azure.resourcemanager.digitaltwins.fluent.models.GroupIdInformationInner"
] | import com.azure.resourcemanager.digitaltwins.fluent.models.GroupIdInformationInner; | import com.azure.resourcemanager.digitaltwins.fluent.models.*; | [
"com.azure.resourcemanager"
] | com.azure.resourcemanager; | 1,416,277 |
public int stat() throws IOException
{
return sendCommand(FTPCmd.STAT);
} | int function() throws IOException { return sendCommand(FTPCmd.STAT); } | /***
* A convenience method to send the FTP STAT command to the server,
* receive the reply, and return the reply code.
*
* @return The reply code received from the server.
* @throws FTPConnectionClosedException
* If the FTP server prematurely closes the connection as a result
* ... | A convenience method to send the FTP STAT command to the server, receive the reply, and return the reply code | stat | {
"repo_name": "grtlinux/KIEA_JAVA7",
"path": "KIEA_JAVA7/src/tain/kr/com/commons/net/v01/ftp/FTP.java",
"license": "gpl-3.0",
"size": 77693
} | [
"java.io.IOException"
] | import java.io.IOException; | import java.io.*; | [
"java.io"
] | java.io; | 2,518,742 |
@Override
public void paint(Graphics g, JComponent c) {
super.paint(g, c);
Rectangle clipRect = g.getClipBounds();
if (upperThumbSelected) {
// Paint lower thumb first, then upper thumb.
if (clipRect.intersects(thumbRect)) {
paintLowerThum... | void function(Graphics g, JComponent c) { super.paint(g, c); Rectangle clipRect = g.getClipBounds(); if (upperThumbSelected) { if (clipRect.intersects(thumbRect)) { paintLowerThumb(g); } if (clipRect.intersects(upperThumbRect)) { paintUpperThumb(g); } } else { if (clipRect.intersects(upperThumbRect)) { paintUpperThumb(... | /**
* Paints the slider. The selected thumb is always painted on top of the
* other thumb.
*/ | Paints the slider. The selected thumb is always painted on top of the other thumb | paint | {
"repo_name": "Pablo1990/Epigraph",
"path": "src/main/java/epigraph/GUI/CustomElements/RangeSliderUI.java",
"license": "gpl-3.0",
"size": 20565
} | [
"java.awt.Graphics",
"java.awt.Rectangle",
"javax.swing.JComponent"
] | import java.awt.Graphics; import java.awt.Rectangle; import javax.swing.JComponent; | import java.awt.*; import javax.swing.*; | [
"java.awt",
"javax.swing"
] | java.awt; javax.swing; | 953,533 |
public ProcessInstance getProcessInstance() {
return processInstance;
} | ProcessInstance function() { return processInstance; } | /**
* Get the process instance where the question was asked
*/ | Get the process instance where the question was asked | getProcessInstance | {
"repo_name": "CecileBONIN/Silverpeas-Core",
"path": "ejb-core/formtemplate/src/main/java/com/silverpeas/workflow/engine/instance/QuestionImpl.java",
"license": "agpl-3.0",
"size": 8583
} | [
"com.silverpeas.workflow.api.instance.ProcessInstance"
] | import com.silverpeas.workflow.api.instance.ProcessInstance; | import com.silverpeas.workflow.api.instance.*; | [
"com.silverpeas.workflow"
] | com.silverpeas.workflow; | 1,367,807 |
@Nullable
public PluginInstantiator getPluginInstantiator() {
return parameters.getPluginInstantiator();
} | PluginInstantiator function() { return parameters.getPluginInstantiator(); } | /**
* Returns the {@link PluginInstantiator} associated with this ClassLoader.
*/ | Returns the <code>PluginInstantiator</code> associated with this ClassLoader | getPluginInstantiator | {
"repo_name": "chtyim/cdap",
"path": "cdap-app-fabric/src/main/java/co/cask/cdap/internal/app/runtime/batch/MapReduceClassLoader.java",
"license": "apache-2.0",
"size": 11813
} | [
"co.cask.cdap.internal.app.runtime.plugin.PluginInstantiator"
] | import co.cask.cdap.internal.app.runtime.plugin.PluginInstantiator; | import co.cask.cdap.internal.app.runtime.plugin.*; | [
"co.cask.cdap"
] | co.cask.cdap; | 627,752 |
public void editBase(BaseNode baseNode)
{
listenToCallbacks = false;
owner.setWaitCursor();
this.baseNode = baseNode;
this.base = baseNode.getBase();
try
{
typeN.setValue(base.getTypeID());
nameS.setText(base.getName());
classS.setText(base.getClassName());
... | void function(BaseNode baseNode) { listenToCallbacks = false; owner.setWaitCursor(); this.baseNode = baseNode; this.base = baseNode.getBase(); try { typeN.setValue(base.getTypeID()); nameS.setText(base.getName()); classS.setText(base.getClassName()); classOptionS.setText(base.getClassOptionString()); refreshLabelChoice... | /**
*
* This method is used to retarget the base editor to a new base
* without having to break down and reconstruct the panels.
*/ | This method is used to retarget the base editor to a new base without having to break down and reconstruct the panels | editBase | {
"repo_name": "jonabbey/Ganymede",
"path": "src/ganymede/arlut/csd/ganymede/admin/BaseEditor.java",
"license": "gpl-2.0",
"size": 13445
} | [
"java.rmi.RemoteException"
] | import java.rmi.RemoteException; | import java.rmi.*; | [
"java.rmi"
] | java.rmi; | 703,893 |
public void undeploy() throws ServerDeploymentException {
undeploy(DEPLOYMENT_NAME);
} | void function() throws ServerDeploymentException { undeploy(DEPLOYMENT_NAME); } | /**
* Undeploys the default application from the running server.
*
* @throws ServerDeploymentException if an error occurs undeploying the application
*/ | Undeploys the default application from the running server | undeploy | {
"repo_name": "aloubyansky/wildfly-core",
"path": "testsuite/manualmode/src/test/java/org/jboss/as/test/manualmode/logging/AbstractLoggingTestCase.java",
"license": "lgpl-2.1",
"size": 13662
} | [
"org.jboss.as.controller.client.helpers.standalone.ServerDeploymentHelper"
] | import org.jboss.as.controller.client.helpers.standalone.ServerDeploymentHelper; | import org.jboss.as.controller.client.helpers.standalone.*; | [
"org.jboss.as"
] | org.jboss.as; | 1,071,183 |
@Nonnull
public WorkbookFunctionsBaseRequest buildRequest(@Nonnull final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions) {
final WorkbookFunctionsBaseRequest request = new WorkbookFunctionsBaseRequest(
getRequestUrl(),
getClient(),
... | WorkbookFunctionsBaseRequest function(@Nonnull final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions) { final WorkbookFunctionsBaseRequest request = new WorkbookFunctionsBaseRequest( getRequestUrl(), getClient(), requestOptions); request.body = this.body; return request; } | /**
* Creates the WorkbookFunctionsBaseRequest with specific requestOptions instead of the existing requestOptions
*
* @param requestOptions the options for the request
* @return the WorkbookFunctionsBaseRequest instance
*/ | Creates the WorkbookFunctionsBaseRequest with specific requestOptions instead of the existing requestOptions | buildRequest | {
"repo_name": "microsoftgraph/msgraph-sdk-java",
"path": "src/main/java/com/microsoft/graph/requests/WorkbookFunctionsBaseRequestBuilder.java",
"license": "mit",
"size": 3392
} | [
"com.microsoft.graph.requests.WorkbookFunctionsBaseRequest",
"javax.annotation.Nonnull"
] | import com.microsoft.graph.requests.WorkbookFunctionsBaseRequest; import javax.annotation.Nonnull; | import com.microsoft.graph.requests.*; import javax.annotation.*; | [
"com.microsoft.graph",
"javax.annotation"
] | com.microsoft.graph; javax.annotation; | 733,166 |
public void testConstructor() throws Exception {
new BeanContextChildSupport();
} | void function() throws Exception { new BeanContextChildSupport(); } | /**
* * Test constructor with no parameters.
* <p>
*
* @see BeanContextChildSupport#BeanContextChildSupport()
*/ | Test constructor with no parameters. | testConstructor | {
"repo_name": "freeVM/freeVM",
"path": "enhanced/java/classlib/modules/beans/src/test/java/org/apache/harmony/beans/tests/java/beans/beancontext/BeanContextChildSupportTest.java",
"license": "apache-2.0",
"size": 42114
} | [
"java.beans.beancontext.BeanContextChildSupport"
] | import java.beans.beancontext.BeanContextChildSupport; | import java.beans.beancontext.*; | [
"java.beans"
] | java.beans; | 281,033 |
@Override
public void initTest() {
// CharacterI.i().createBCCX(Vector3f.ZERO);
CharacterLeviPhysI.i().create(Vector3f.ZERO);
PhysicsI.i().setBulletDebugVisualsEnabled(true);
// SubdivisionSurfaceModifier s = new SubdivisionSurfaceModifier(modifierStructure, blenderContext);
// to have fun on flycam m... | void function() { CharacterLeviPhysI.i().create(Vector3f.ZERO); PhysicsI.i().setBulletDebugVisualsEnabled(true); PhysicsProjectileI.i().createGun(EGun.AK47.get()); PhysicsProjectileI.i().createGun(EGun.Glock17.get()); float fFullLength=100; float fYFloor=-7; float fFloorThickness=0.5f; PhysicsData pdFloor = PhysicsI.i(... | /**
* public so can be called from devcons user cmds
*/ | public so can be called from devcons user cmds | initTest | {
"repo_name": "AquariusPower/DevConsLeJME",
"path": "Tests/src/main/java/com/github/devconslejme/tests/TestProjectiles.java",
"license": "bsd-3-clause",
"size": 8119
} | [
"com.github.devconslejme.game.CharacterLeviPhysI",
"com.github.devconslejme.misc.jme.ColorI",
"com.github.devconslejme.misc.jme.PhysicsData",
"com.github.devconslejme.misc.jme.PhysicsI",
"com.github.devconslejme.misc.jme.PhysicsProjectileI",
"com.jme3.math.ColorRGBA",
"com.jme3.math.Vector3f"
] | import com.github.devconslejme.game.CharacterLeviPhysI; import com.github.devconslejme.misc.jme.ColorI; import com.github.devconslejme.misc.jme.PhysicsData; import com.github.devconslejme.misc.jme.PhysicsI; import com.github.devconslejme.misc.jme.PhysicsProjectileI; import com.jme3.math.ColorRGBA; import com.jme3.math.... | import com.github.devconslejme.game.*; import com.github.devconslejme.misc.jme.*; import com.jme3.math.*; | [
"com.github.devconslejme",
"com.jme3.math"
] | com.github.devconslejme; com.jme3.math; | 1,570,262 |
public CharSequence replaceAll(final CharSequence input)
{
final Matcher matcher = pattern.matcher(input);
final StringBuffer output = new StringBuffer();
while (matcher.find())
{
final CharSequence sequence = replacer.apply(matcher);
matcher.appendReplace... | CharSequence function(final CharSequence input) { final Matcher matcher = pattern.matcher(input); final StringBuffer output = new StringBuffer(); while (matcher.find()) { final CharSequence sequence = replacer.apply(matcher); matcher.appendReplacement(output, ""); output.append(sequence); } matcher.appendTail(output); ... | /**
* Replace all occurrences of the pattern in the input, using the given function
*/ | Replace all occurrences of the pattern in the input, using the given function | replaceAll | {
"repo_name": "mrdon/PLUG",
"path": "atlassian-plugins-webresource/src/main/java/com/atlassian/plugin/webresource/transformer/SearchAndReplacer.java",
"license": "bsd-3-clause",
"size": 1436
} | [
"java.util.regex.Matcher"
] | import java.util.regex.Matcher; | import java.util.regex.*; | [
"java.util"
] | java.util; | 864,923 |
void prepareStartCaches(Collection<StartCacheInfo> startCacheInfos) throws IgniteCheckedException {
prepareStartCaches(startCacheInfos, (data, operation) -> {
operation.apply(data);// PROXY
});
} | void prepareStartCaches(Collection<StartCacheInfo> startCacheInfos) throws IgniteCheckedException { prepareStartCaches(startCacheInfos, (data, operation) -> { operation.apply(data); }); } | /**
* Start all input caches in parallel.
*
* @param startCacheInfos All caches information for start.
*/ | Start all input caches in parallel | prepareStartCaches | {
"repo_name": "SomeFire/ignite",
"path": "modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheProcessor.java",
"license": "apache-2.0",
"size": 207339
} | [
"java.util.Collection",
"org.apache.ignite.IgniteCheckedException"
] | import java.util.Collection; import org.apache.ignite.IgniteCheckedException; | import java.util.*; import org.apache.ignite.*; | [
"java.util",
"org.apache.ignite"
] | java.util; org.apache.ignite; | 1,420,313 |
public synchronized void playbackLastMacro() {
if (currentMacro!=null) {
List<MacroRecord> macroRecords = currentMacro.getMacroRecords();
if (!macroRecords.isEmpty()) {
Action[] actions = getActions();
undoManager.beginInternalAtomicEdit();
try {
for (MacroRecord record : macroRecords) {
... | synchronized void function() { if (currentMacro!=null) { List<MacroRecord> macroRecords = currentMacro.getMacroRecords(); if (!macroRecords.isEmpty()) { Action[] actions = getActions(); undoManager.beginInternalAtomicEdit(); try { for (MacroRecord record : macroRecords) { for (Action action : actions) { if ((action ins... | /**
* "Plays back" the last recorded macro in this text area.
*/ | "Plays back" the last recorded macro in this text area | playbackLastMacro | {
"repo_name": "intuit/Tank",
"path": "tools/agent_debugger/src/main/java/org/fife/ui/rtextarea/RTextArea.java",
"license": "epl-1.0",
"size": 50361
} | [
"java.awt.event.ActionEvent",
"java.util.List",
"javax.swing.Action",
"org.fife.ui.rtextarea.Macro"
] | import java.awt.event.ActionEvent; import java.util.List; import javax.swing.Action; import org.fife.ui.rtextarea.Macro; | import java.awt.event.*; import java.util.*; import javax.swing.*; import org.fife.ui.rtextarea.*; | [
"java.awt",
"java.util",
"javax.swing",
"org.fife.ui"
] | java.awt; java.util; javax.swing; org.fife.ui; | 1,805,784 |
IContext decorateContext(IContext context); | IContext decorateContext(IContext context); | /**
* decorateContext: Called to decorate the context. When this is invoked the core elements (http request and response) have
* been populated, but no guarantee is made about what other decoration may also have been completed.
* @param context The context to decorateContext.
* @return IContext The decorated c... | decorateContext: Called to decorate the context. When this is invoked the core elements (http request and response) have been populated, but no guarantee is made about what other decoration may also have been completed | decorateContext | {
"repo_name": "xtivia/xsf",
"path": "framework/src/main/java/com/xtivia/xsf/core/web/IContextDecorator.java",
"license": "lgpl-2.1",
"size": 678
} | [
"com.xtivia.xsf.core.commands.IContext"
] | import com.xtivia.xsf.core.commands.IContext; | import com.xtivia.xsf.core.commands.*; | [
"com.xtivia.xsf"
] | com.xtivia.xsf; | 1,729,707 |
private void readServerElement_1_1(final Namespace namespace, final XMLExtendedStreamReader reader, final ModelNode address, final List<ModelNode> list)
throws XMLStreamException {
parseNamespaces(reader, address, list);
ModelNode serverName = null;
// attributes
final... | void function(final Namespace namespace, final XMLExtendedStreamReader reader, final ModelNode address, final List<ModelNode> list) throws XMLStreamException { parseNamespaces(reader, address, list); ModelNode serverName = null; final int count = reader.getAttributeCount(); for (int i = 0; i < count; i++) { switch (Nam... | /**
* Read the <server/> element based on version 1.1 of the schema.
*
* @param reader the xml stream reader
* @param address address of the parent resource of any resources this method will add
* @param list the list of boot operations to which any new operations should be added
* @th... | Read the element based on version 1.1 of the schema | readServerElement_1_1 | {
"repo_name": "jamezp/wildfly-core",
"path": "server/src/main/java/org/jboss/as/server/parsing/StandaloneXml_Legacy.java",
"license": "lgpl-2.1",
"size": 53634
} | [
"java.util.EnumSet",
"java.util.HashSet",
"java.util.List",
"java.util.Set",
"javax.xml.stream.XMLStreamException",
"org.jboss.as.controller.descriptions.ModelDescriptionConstants",
"org.jboss.as.controller.parsing.Attribute",
"org.jboss.as.controller.parsing.Element",
"org.jboss.as.controller.parsi... | import java.util.EnumSet; import java.util.HashSet; import java.util.List; import java.util.Set; import javax.xml.stream.XMLStreamException; import org.jboss.as.controller.descriptions.ModelDescriptionConstants; import org.jboss.as.controller.parsing.Attribute; import org.jboss.as.controller.parsing.Element; import org... | import java.util.*; import javax.xml.stream.*; import org.jboss.as.controller.descriptions.*; import org.jboss.as.controller.parsing.*; import org.jboss.as.domain.management.parsing.*; import org.jboss.as.server.controller.resources.*; import org.jboss.dmr.*; import org.jboss.staxmapper.*; | [
"java.util",
"javax.xml",
"org.jboss.as",
"org.jboss.dmr",
"org.jboss.staxmapper"
] | java.util; javax.xml; org.jboss.as; org.jboss.dmr; org.jboss.staxmapper; | 1,345,927 |
InputStream getStreamAtSeqNum(long fromSeqNum) throws IOException, LogEntryNotFound; | InputStream getStreamAtSeqNum(long fromSeqNum) throws IOException, LogEntryNotFound; | /**
* Return an input stream ready to read from the persistence starting at the beginning of the
* entry with the specified sequence number.
*
* @param fromSeqNum Sequence number to read from.
* @return A new input stream; the caller takes responsibility for closing it.
* @throws IOExcepti... | Return an input stream ready to read from the persistence starting at the beginning of the entry with the specified sequence number | getStreamAtSeqNum | {
"repo_name": "cloud-software-foundation/c5-replicator",
"path": "c5-replicator-log/src/main/java/c5db/log/LogPersistenceService.java",
"license": "apache-2.0",
"size": 9494
} | [
"java.io.IOException",
"java.io.InputStream"
] | import java.io.IOException; import java.io.InputStream; | import java.io.*; | [
"java.io"
] | java.io; | 707,796 |
public static Scoping scopeAnnotation(final Class<? extends Annotation> scopeAnnotation) {
Objects.requireNonNull(scopeAnnotation, "Scope annotation must not be null.");
return new Scoping(false, null, scopeAnnotation, false, scopeAnnotation.toString());
} | static Scoping function(final Class<? extends Annotation> scopeAnnotation) { Objects.requireNonNull(scopeAnnotation, STR); return new Scoping(false, null, scopeAnnotation, false, scopeAnnotation.toString()); } | /**
* Returns a {@link Scoping} describing scoping using a specific scope annotation.
*
* @param scopeAnnotation the scope annotation
* @return a {@link Scoping} describing scoping using a specific scope annotation
*/ | Returns a <code>Scoping</code> describing scoping using a specific scope annotation | scopeAnnotation | {
"repo_name": "firstStraw/guice-test-helper",
"path": "src/main/java/com/github/firststraw/guice/Scoping.java",
"license": "cc0-1.0",
"size": 6237
} | [
"java.lang.annotation.Annotation",
"java.util.Objects"
] | import java.lang.annotation.Annotation; import java.util.Objects; | import java.lang.annotation.*; import java.util.*; | [
"java.lang",
"java.util"
] | java.lang; java.util; | 668,113 |
public SessionSearchCriteriaVo getSessionSearchCriteriaByAppointment(Booking_AppointmentRefVo appointment)
{
if (appointment == null)
throw new CodingRuntimeException("appointment cannot be null in method getSessionSearchCriteriaByAppointment");
SessionSearchCriteriaVo voSearchCriteria = new SessionSearch... | SessionSearchCriteriaVo function(Booking_AppointmentRefVo appointment) { if (appointment == null) throw new CodingRuntimeException(STR); SessionSearchCriteriaVo voSearchCriteria = new SessionSearchCriteriaVo(); String hql = STR + appointment.getID_Booking_Appointment(); List item = getDomainFactory().find(hql); if(item... | /**
* method searches all available similar sessions that can be booked into when moving the appointment
*/ | method searches all available similar sessions that can be booked into when moving the appointment | getSessionSearchCriteriaByAppointment | {
"repo_name": "open-health-hub/openMAXIMS",
"path": "openmaxims_workspace/Scheduling/src/ims/scheduling/domain/impl/MoveAppointmentDialogImpl.java",
"license": "agpl-3.0",
"size": 23644
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 2,229,894 |
public void addTable(Table table) {
tables.add(table);
} | void function(Table table) { tables.add(table); } | /**
* Add the specified table to the list of tables.
*
* @param table the table
*/ | Add the specified table to the list of tables | addTable | {
"repo_name": "titus08/frostwire-desktop",
"path": "lib/jars-src/h2-1.3.164/org/h2/command/ddl/GrantRevoke.java",
"license": "gpl-3.0",
"size": 5483
} | [
"org.h2.table.Table"
] | import org.h2.table.Table; | import org.h2.table.*; | [
"org.h2.table"
] | org.h2.table; | 1,013,678 |
@Test
public void testTolerateVolumeFailuresAfterAddingMoreVolumes()
throws InterruptedException, ReconfigurationException, IOException {
final File dn0Vol1 = new File(dataDir, "data" + (2 * 0 + 1));
final File dn0Vol2 = new File(dataDir, "data" + (2 * 0 + 2));
final File dn0VolNew = new File(data... | void function() throws InterruptedException, ReconfigurationException, IOException { final File dn0Vol1 = new File(dataDir, "data" + (2 * 0 + 1)); final File dn0Vol2 = new File(dataDir, "data" + (2 * 0 + 2)); final File dn0VolNew = new File(dataDir, STR); final DataNode dn0 = cluster.getDataNodes().get(0); final String... | /**
* Test changing the number of volumes does not impact the disk failure
* tolerance.
*/ | Test changing the number of volumes does not impact the disk failure tolerance | testTolerateVolumeFailuresAfterAddingMoreVolumes | {
"repo_name": "likaiwalkman/hadoop",
"path": "hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestDataNodeVolumeFailure.java",
"license": "apache-2.0",
"size": 23582
} | [
"java.io.File",
"java.io.IOException",
"org.apache.hadoop.conf.ReconfigurationException",
"org.apache.hadoop.hdfs.DFSConfigKeys",
"org.junit.Assert"
] | import java.io.File; import java.io.IOException; import org.apache.hadoop.conf.ReconfigurationException; import org.apache.hadoop.hdfs.DFSConfigKeys; import org.junit.Assert; | import java.io.*; import org.apache.hadoop.conf.*; import org.apache.hadoop.hdfs.*; import org.junit.*; | [
"java.io",
"org.apache.hadoop",
"org.junit"
] | java.io; org.apache.hadoop; org.junit; | 2,202,478 |
public void setTaxSpecialW4Amount(KualiDecimal taxSpecialW4Amount) {
this.taxSpecialW4Amount = taxSpecialW4Amount;
} | void function(KualiDecimal taxSpecialW4Amount) { this.taxSpecialW4Amount = taxSpecialW4Amount; } | /**
* Sets the taxSpecialW4Amount attribute value.
*
* @param taxSpecialW4Amount The taxSpecialW4Amount to set.
*/ | Sets the taxSpecialW4Amount attribute value | setTaxSpecialW4Amount | {
"repo_name": "quikkian-ua-devops/will-financials",
"path": "kfs-core/src/main/java/org/kuali/kfs/fp/businessobject/DisbursementVoucherNonResidentAlienTax.java",
"license": "agpl-3.0",
"size": 10920
} | [
"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,827,044 |
public void setShadowDrawableLeft(Drawable d) {
mShadowDrawableLeft = d;
} | void function(Drawable d) { mShadowDrawableLeft = d; } | /**
* Set a drawable to use as a shadow cast by the right pane onto the left pane
* during opening/closing.
*
* @param d drawable to use as a shadow
*/ | Set a drawable to use as a shadow cast by the right pane onto the left pane during opening/closing | setShadowDrawableLeft | {
"repo_name": "why168/AndroidProjects",
"path": "SwipeBack/app/src/main/java/github/why168/swipeback/view/SwipeBackLayout.java",
"license": "mit",
"size": 72804
} | [
"android.graphics.drawable.Drawable"
] | import android.graphics.drawable.Drawable; | import android.graphics.drawable.*; | [
"android.graphics"
] | android.graphics; | 2,126,963 |
void setDeviceCapabilities(List<String> capabilities); | void setDeviceCapabilities(List<String> capabilities); | /**
* Sets the device capabilities.
* @param capabilities list of capabilities the device has.
*/ | Sets the device capabilities | setDeviceCapabilities | {
"repo_name": "planoAccess/clonedONOS",
"path": "protocols/netconf/api/src/main/java/org/onosproject/netconf/NetconfSession.java",
"license": "apache-2.0",
"size": 3999
} | [
"java.util.List"
] | import java.util.List; | import java.util.*; | [
"java.util"
] | java.util; | 642,616 |
public static void storeBookshelfNames(
ArrayList<String> bookshelvesNames, String userID, DatastoreService datastore) {
long timestamp = System.currentTimeMillis();
Entity bookshelfEntity = new Entity("Bookshelves");
String listJson = BooksAgentHelper.listToJson(bookshelvesNames);
bookshelfEnt... | static void function( ArrayList<String> bookshelvesNames, String userID, DatastoreService datastore) { long timestamp = System.currentTimeMillis(); Entity bookshelfEntity = new Entity(STR); String listJson = BooksAgentHelper.listToJson(bookshelvesNames); bookshelfEntity.setProperty("id", userID); bookshelfEntity.setPro... | /**
* This function stores a list of bookshelf names in DataStore as Bookshelves Entity for a given
* authenticated user
*
* @param bookshelvesNames list of bookshelf names to store
* @param userID String containing current user's unique ID
* @param datastore DatastoreService instance used to access B... | This function stores a list of bookshelf names in DataStore as Bookshelves Entity for a given authenticated user | storeBookshelfNames | {
"repo_name": "googleinterns/step43-2020",
"path": "portfolio/src/main/java/com/google/sps/utils/BooksMemoryUtils.java",
"license": "apache-2.0",
"size": 28388
} | [
"com.google.appengine.api.datastore.DatastoreService",
"com.google.appengine.api.datastore.Entity",
"java.util.ArrayList"
] | import com.google.appengine.api.datastore.DatastoreService; import com.google.appengine.api.datastore.Entity; import java.util.ArrayList; | import com.google.appengine.api.datastore.*; import java.util.*; | [
"com.google.appengine",
"java.util"
] | com.google.appengine; java.util; | 685,738 |
@Override
public Date getDate(String sKey, Date dtDefault) throws ClassCastException {
Date dtRetVal;
if (isNull(sKey)) {
dtRetVal = dtDefault;
} else {
dtRetVal = getDate(sKey);
if (null==dtRetVal) dtRetVal = dtDefault;
}
return dtRetVal;
}
| Date function(String sKey, Date dtDefault) throws ClassCastException { Date dtRetVal; if (isNull(sKey)) { dtRetVal = dtDefault; } else { dtRetVal = getDate(sKey); if (null==dtRetVal) dtRetVal = dtDefault; } return dtRetVal; } | /**
* <p>Get value for a DATETIME field<p>
* @param sKey Field Name
* @param dtDefault Date default value
* @return Date value or default value.
* @throws ClassCastException if sKey field is not of type DATETIME
*/ | Get value for a DATETIME field | getDate | {
"repo_name": "sergiomt/judal",
"path": "table/src/main/java/org/judal/storage/table/impl/AbstractRecordBase.java",
"license": "apache-2.0",
"size": 29039
} | [
"java.util.Date"
] | import java.util.Date; | import java.util.*; | [
"java.util"
] | java.util; | 259,911 |
public Port addRightPort(int position, Port port, Map nestedMap, ParentMap parentMap) {
if (position > numRightPorts) {
throw new RuntimeException("Incorrect port position of right-hand side of cell");
}
return null;
}
| Port function(int position, Port port, Map nestedMap, ParentMap parentMap) { if (position > numRightPorts) { throw new RuntimeException(STR); } return null; } | /**
* Adds a port to the right hand side of the vertex at the specified
* position order
* @param position this ports position in the order of port from top to bottom
* @param port the instance of the new port
* @return the the port
*/ | Adds a port to the right hand side of the vertex at the specified position order | addRightPort | {
"repo_name": "Baltasarq/Gia",
"path": "src/JGraph/examples/com/jgraph/example/portlabels/PortLabelCell.java",
"license": "mit",
"size": 4003
} | [
"java.util.Map",
"org.jgraph.graph.ParentMap",
"org.jgraph.graph.Port"
] | import java.util.Map; import org.jgraph.graph.ParentMap; import org.jgraph.graph.Port; | import java.util.*; import org.jgraph.graph.*; | [
"java.util",
"org.jgraph.graph"
] | java.util; org.jgraph.graph; | 346,299 |
public ClassHolder addClass(String name, String base, NameConverter nconv, ClassDecorator[] decorators,
boolean enumer, BindingHolder holder) {
ClassHolder def = enumer ?
new EnumerationClassHolder(m_nameSet.add(name), base, this, holder, nconv, decorators, false) :
(ClassHol... | ClassHolder function(String name, String base, NameConverter nconv, ClassDecorator[] decorators, boolean enumer, BindingHolder holder) { ClassHolder def = enumer ? new EnumerationClassHolder(m_nameSet.add(name), base, this, holder, nconv, decorators, false) : (ClassHolder)new StructureClassHolder(m_nameSet.add(name), b... | /**
* Add derived class to package. This method is only used when top-level classes are being used for substructures.
*
* @param name preferred name for class
* @param base base class name
* @param nconv name converter for class
* @param decorators class decorators
* @param enumer en... | Add derived class to package. This method is only used when top-level classes are being used for substructures | addClass | {
"repo_name": "vkorbut/jibx",
"path": "jibx/build/src/org/jibx/schema/codegen/PackageHolder.java",
"license": "bsd-3-clause",
"size": 8785
} | [
"org.jibx.binding.model.BindingHolder",
"org.jibx.schema.codegen.extend.ClassDecorator",
"org.jibx.schema.codegen.extend.NameConverter"
] | import org.jibx.binding.model.BindingHolder; import org.jibx.schema.codegen.extend.ClassDecorator; import org.jibx.schema.codegen.extend.NameConverter; | import org.jibx.binding.model.*; import org.jibx.schema.codegen.extend.*; | [
"org.jibx.binding",
"org.jibx.schema"
] | org.jibx.binding; org.jibx.schema; | 422,540 |
public static Result toResult(final ClientProtos.Result proto, final CellScanner scanner)
throws IOException {
List<CellProtos.Cell> values = proto.getCellList();
if (proto.hasExists()) {
if ((values != null && !values.isEmpty()) ||
(proto.hasAssociatedCellCount() && proto.getAssociatedCell... | static Result function(final ClientProtos.Result proto, final CellScanner scanner) throws IOException { List<CellProtos.Cell> values = proto.getCellList(); if (proto.hasExists()) { if ((values != null && !values.isEmpty()) (proto.hasAssociatedCellCount() && proto.getAssociatedCellCount() > 0)) { throw new IllegalArgume... | /**
* Convert a protocol buffer Result to a client Result
*
* @param proto the protocol buffer Result to convert
* @param scanner Optional cell scanner.
* @return the converted client Result
* @throws IOException
*/ | Convert a protocol buffer Result to a client Result | toResult | {
"repo_name": "JingchengDu/hbase",
"path": "hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java",
"license": "apache-2.0",
"size": 69138
} | [
"java.io.IOException",
"java.util.ArrayList",
"java.util.List",
"org.apache.hadoop.hbase.Cell",
"org.apache.hadoop.hbase.CellBuilderType",
"org.apache.hadoop.hbase.CellScanner",
"org.apache.hadoop.hbase.ExtendedCellBuilder",
"org.apache.hadoop.hbase.ExtendedCellBuilderFactory",
"org.apache.hadoop.hb... | import java.io.IOException; import java.util.ArrayList; import java.util.List; import org.apache.hadoop.hbase.Cell; import org.apache.hadoop.hbase.CellBuilderType; import org.apache.hadoop.hbase.CellScanner; import org.apache.hadoop.hbase.ExtendedCellBuilder; import org.apache.hadoop.hbase.ExtendedCellBuilderFactory; i... | import java.io.*; import java.util.*; import org.apache.hadoop.hbase.*; import org.apache.hadoop.hbase.client.*; import org.apache.hadoop.hbase.protobuf.generated.*; | [
"java.io",
"java.util",
"org.apache.hadoop"
] | java.io; java.util; org.apache.hadoop; | 858,062 |
private void click(int which) {
if (which==PHOTO_RECEIPT){
Intent intent =new Intent(ApproverItemListActivity.this,ClaimantReceiptActivity.class);
startActivity(intent);
}else if (which==LOCATION){
if(AppSingleton.getInstance().getCurrentItem().getLocation()==null){
Toast.makeText( ApproverI... | void function(int which) { if (which==PHOTO_RECEIPT){ Intent intent =new Intent(ApproverItemListActivity.this,ClaimantReceiptActivity.class); startActivity(intent); }else if (which==LOCATION){ if(AppSingleton.getInstance().getCurrentItem().getLocation()==null){ Toast.makeText( ApproverItemListActivity.this, STR, Toast.... | /**
* This method will allows approver to get a photo receipt or the location of the expense item after choosing an option.
*/ | This method will allows approver to get a photo receipt or the location of the expense item after choosing an option | click | {
"repo_name": "CMPUT301W15T06/Project",
"path": "App/src/ca/ualberta/CMPUT301W15T06/ApproverItemListActivity.java",
"license": "apache-2.0",
"size": 4672
} | [
"android.content.Intent",
"android.widget.Toast"
] | import android.content.Intent; import android.widget.Toast; | import android.content.*; import android.widget.*; | [
"android.content",
"android.widget"
] | android.content; android.widget; | 1,808,703 |
public static TaggedTimeLimiterMetrics ofTimeLimiterRegistry(
TimeLimiterRegistry timeLimiterRegistry) {
return new TaggedTimeLimiterMetrics(TimeLimiterMetricNames.ofDefaults(), timeLimiterRegistry);
} | static TaggedTimeLimiterMetrics function( TimeLimiterRegistry timeLimiterRegistry) { return new TaggedTimeLimiterMetrics(TimeLimiterMetricNames.ofDefaults(), timeLimiterRegistry); } | /**
* Creates a new binder that uses given {@code registry} as source of time limiters.
*
* @param timeLimiterRegistry the source of time limiters
* @return The {@link TaggedTimeLimiterMetrics} instance.
*/ | Creates a new binder that uses given registry as source of time limiters | ofTimeLimiterRegistry | {
"repo_name": "javaslang/javaslang-circuitbreaker",
"path": "resilience4j-micrometer/src/main/java/io/github/resilience4j/micrometer/tagged/TaggedTimeLimiterMetrics.java",
"license": "apache-2.0",
"size": 3825
} | [
"io.github.resilience4j.timelimiter.TimeLimiterRegistry"
] | import io.github.resilience4j.timelimiter.TimeLimiterRegistry; | import io.github.resilience4j.timelimiter.*; | [
"io.github.resilience4j"
] | io.github.resilience4j; | 577,345 |
@UiHandler("editEmailPropertiesButton")
public void onEditDocumentPropertiesButtonClick(ClickEvent clickEvent) {
presenter.getController().getBatchClassManagementPresenter().getEmailViewPresenter().onEditEmailPropertiesButtonClicked();
} | @UiHandler(STR) void function(ClickEvent clickEvent) { presenter.getController().getBatchClassManagementPresenter().getEmailViewPresenter().onEditEmailPropertiesButtonClicked(); } | /**
* To perform operations on Edit Document Properties Button Click.
*
* @param clickEvent ClickEvent
*/ | To perform operations on Edit Document Properties Button Click | onEditDocumentPropertiesButtonClick | {
"repo_name": "kuzavas/ephesoft",
"path": "dcma-gwt/dcma-gwt-admin/src/main/java/com/ephesoft/dcma/gwt/admin/bm/client/view/email/EmailDetailView.java",
"license": "agpl-3.0",
"size": 8299
} | [
"com.google.gwt.event.dom.client.ClickEvent",
"com.google.gwt.uibinder.client.UiHandler"
] | import com.google.gwt.event.dom.client.ClickEvent; import com.google.gwt.uibinder.client.UiHandler; | import com.google.gwt.event.dom.client.*; import com.google.gwt.uibinder.client.*; | [
"com.google.gwt"
] | com.google.gwt; | 2,735,985 |
public void contentsChanged(ListDataEvent event)
{
firePropertyChange(ACCESSIBLE_VISIBLE_DATA_PROPERTY, Boolean.FALSE,
Boolean.TRUE);
} | void function(ListDataEvent event) { firePropertyChange(ACCESSIBLE_VISIBLE_DATA_PROPERTY, Boolean.FALSE, Boolean.TRUE); } | /**
* Receives notification when items have changed in the
* <code>JList</code>. This method fires a property change event with
* {@link AccessibleContext#ACCESSIBLE_VISIBLE_DATA_PROPERTY}.
*
* @param event the list data event
*/ | Receives notification when items have changed in the <code>JList</code>. This method fires a property change event with <code>AccessibleContext#ACCESSIBLE_VISIBLE_DATA_PROPERTY</code> | contentsChanged | {
"repo_name": "nmacs/lm3s-uclinux",
"path": "lib/classpath/javax/swing/JList.java",
"license": "gpl-2.0",
"size": 78224
} | [
"javax.swing.event.ListDataEvent"
] | import javax.swing.event.ListDataEvent; | import javax.swing.event.*; | [
"javax.swing"
] | javax.swing; | 470,424 |
public static void setDateAt(byte buffer[], Date d, int idx) {
GregorianCalendar cal = new GregorianCalendar();
//System.out.println("Setting date "+d+" at: "+idx);
cal.setTime(d);
int binary = 0;
int year = cal.get(GregorianCalendar.YEAR);
int month = cal.get(GregorianCalendar.MONTH);
int day = cal.ge... | static void function(byte buffer[], Date d, int idx) { GregorianCalendar cal = new GregorianCalendar(); cal.setTime(d); int binary = 0; int year = cal.get(GregorianCalendar.YEAR); int month = cal.get(GregorianCalendar.MONTH); int day = cal.get(GregorianCalendar.DAY_OF_MONTH); year -= 1904; year = year << 9; month++; mo... | /**
* Sets the dateAt attribute of the Record class
*
*@param buffer The new dateAt value
*@param d The new dateAt value
*@param idx The new dateAt value
*/ | Sets the dateAt attribute of the Record class | setDateAt | {
"repo_name": "unwiredben/pilot-link",
"path": "bindings/Java/org/gnu/pilotlink/Record.java",
"license": "gpl-2.0",
"size": 14035
} | [
"java.util.Date",
"java.util.GregorianCalendar"
] | import java.util.Date; import java.util.GregorianCalendar; | import java.util.*; | [
"java.util"
] | java.util; | 504,584 |
public void onSaveInstanceState(Bundle savedInstanceState) {
savedInstanceState.putBoolean(REQUESTING_LOCATION_UPDATES_KEY, mRequestingLocationUpdates);
savedInstanceState.putParcelable(LOCATION_KEY, mCurrentLocation);
savedInstanceState.putString(LAST_UPDATED_TIME_STRING_KEY, mLastUpdateTim... | void function(Bundle savedInstanceState) { savedInstanceState.putBoolean(REQUESTING_LOCATION_UPDATES_KEY, mRequestingLocationUpdates); savedInstanceState.putParcelable(LOCATION_KEY, mCurrentLocation); savedInstanceState.putString(LAST_UPDATED_TIME_STRING_KEY, mLastUpdateTime); super.onSaveInstanceState(savedInstanceSta... | /**
* Stores activity data in the Bundle.
*/ | Stores activity data in the Bundle | onSaveInstanceState | {
"repo_name": "mseshachalam/android-play-location",
"path": "LocationUpdates/app/src/main/java/com/google/android/gms/location/sample/locationupdates/MainActivity.java",
"license": "apache-2.0",
"size": 15325
} | [
"android.os.Bundle"
] | import android.os.Bundle; | import android.os.*; | [
"android.os"
] | android.os; | 248,306 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.